/* account-frame-and-header: the 24 px blue frame every account page and
   the sign-in page sit in, the panel inset in it, and the account header.
   Every value is the owner's artboards' own (WebDashboard and the nine
   other account artboards, which draw the header identically; WebSignIn
   for its frame; WebHomeMobile for the round menu button), through the
   tokens of design.css. The account artboards have no phone version: at
   phone width the header takes the landing page's pattern, the brand and
   a round glass button that opens the links. */

.frame {
  margin: 0;
  min-height: 100vh;
  box-sizing: border-box;
  padding: var(--frame-width);
  background: var(--frame);
  color: var(--ink);
  font: var(--type-page-account);
}

.frame-sign-in {
  background: var(--frame-sign-in);
  font: var(--type-page-landing);
}

.frame .frame-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: calc(100vh - 2 * var(--frame-width));
  border-radius: var(--radius-frame);
  overflow: clip;
  box-shadow: var(--frame-panel-edge), var(--shadow-frame);
  background: var(--frame-panel);
  /* pricing-pages (D54): the header wraps by its text's room, below. */
  container-type: inline-size;
}

/* WebSignIn's panel: the lavender slab with its pale glow, and a deeper
   shadow. The older frame of account.css (`.account-auth`) gives way. */
.frame-sign-in .frame-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: var(--frame-panel-edge), 0 30px 80px rgba(10, 16, 60, 0.4);
  background: radial-gradient(40% 55% at 50% 58%, #f7f6fd, rgba(247, 246, 253, 0) 75%), var(--slab);
}

.frame .account-auth::before {
  content: none;
}

.frame-panel > main {
  position: relative;
  flex: 1;
}

.frame-header {
  position: relative;
  z-index: 1;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 36px 18px;
}

.frame-sign-in .frame-header {
  padding: 32px 40px 0;
}

.frame-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 2px;
}

.frame-menu-panel nav a,
.frame-nav a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  font: var(--type-nav);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.frame-menu-panel nav a[aria-current="page"],
.frame-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.frame-balance {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  box-sizing: border-box;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.frame-balance span {
  color: var(--accent);
  font-weight: 600;
}

.frame-header .frame-call {
  flex: none;
  background: var(--inverse);
  color: var(--on-inverse);
}

.frame-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 2px solid var(--ink);
  border-radius: var(--radius-full);
  background: var(--avatar-lilac);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.frame-menu {
  display: none;
}

/* WebHomeMobile's menu button: 44 px, round, glass. */
.frame-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 6px 16px rgba(27, 36, 99, 0.12);
  list-style: none;
  cursor: pointer;
}

.frame-menu summary::-webkit-details-marker {
  display: none;
}

.frame-menu-panel {
  position: absolute;
  top: 100%;
  left: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: var(--radius-xl);
}

.frame-menu-panel nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frame-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

/* Too narrow for one row: the links take a row of their own under the
   brand, the balance, "Make a call" and the avatar. */
@media (max-width: 1380px) {
  .frame-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .frame-header > .frame-balance {
    margin-left: auto;
  }
  .frame-header > .frame-nav {
    order: 1;
    flex-basis: 100%;
  }
}

/* The owner's ninth link needs a little more room than standard accounts. */
@media (min-width: 1381px) and (max-width: 1520px) {
  .frame-header-owner { flex-wrap: wrap; row-gap: 8px; }
  .frame-header-owner > .frame-balance { margin-left: auto; }
  .frame-header-owner > .frame-nav { order: 1; flex-basis: 100%; }
}

/* Phone width: the brand, the avatar and the round menu button. */
@media (max-width: 900px) {
  .frame-header > :is(.frame-nav, .frame-balance, .frame-call) {
    display: none;
  }
  .frame-header > .frame-avatar {
    margin-left: auto;
  }
  .frame-menu {
    display: block;
  }
}

/* WebHomeMobile's slab: 10 px from the window's edges, 32 px corners;
   its header 14 px from the top, 18 px from the left and 14 px from the
   right. */
@media (max-width: 600px) {
  .frame {
    padding: 10px;
  }
  .frame .frame-panel {
    min-height: calc(100vh - 20px);
    border-radius: 32px;
  }
  .frame-header {
    padding: 14px 14px 10px 18px;
  }
  .frame-sign-in .frame-header {
    padding: 14px 14px 0 18px;
  }
}

/* pricing-pages: WebDashboardBalance's pill under the Middle plan: a sum
   of dollars in ink, what it comes to beside it in the accent. */
.frame-balance b { font-weight: 600; color: var(--ink); }

/* pricing-pages (D54): the same switch by the room the header's text
   needs, a container query in em on the panel (92em is 1380 px at 15 px
   text), so with large text the links take their own row sooner and the
   header never runs past its panel. */
@container (max-width: 92em) {
  .frame-header {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .frame-header > .frame-balance {
    margin-left: auto;
  }
  .frame-header > .frame-nav {
    order: 1;
    flex-basis: 100%;
  }
}
