﻿/* Presentation only; nav.js owns menu, focus and account state. */
.site-nav { position: sticky; top: 0; height: 72px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 40; }
.site-nav .nav-in { display: flex; align-items: center; height: 72px; gap: 48px; }
.site-nav .brand { font-size: 20px; gap: 10px; }
.site-nav .brand img { width: 32px; height: 32px; }
.site-navigation { display: flex; flex: 1; align-items: center; gap: 28px; min-width: 0; }
.site-navigation > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--dim); }
.site-navigation > a:hover, .site-navigation > a[aria-current] { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; min-width: 0; }
.nav-signin { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--text); white-space: nowrap; }
.site-nav .nav-download { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.nav-account { position: relative; min-width: 0; }
.account-trigger { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 5px 10px 5px 6px; background: var(--bg2); border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; font: inherit; cursor: pointer; max-width: 100%; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: var(--card-hover); border-color: var(--control); }
.nav-avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 6px; background: var(--accent-lo); color: var(--accent-hi); }
.nav-who { display: grid; text-align: left; line-height: 1.3; min-width: 0; }
.nav-who-email { max-width: 166px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.nav-who-plan { font-size: 14px; color: var(--faint); }
.nav-who-plan[data-premium="true"] { color: var(--accent-hi); }
.account-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.nav-avatar svg { width: 20px; height: 20px; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 288px; padding: 8px; border: 1px solid var(--control); border-radius: 10px; background: var(--bg2); box-shadow: 0 16px 40px #0005; }
.account-menu-heading { padding: 12px 12px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.account-menu-heading strong { display: block; font-size: 15px; overflow-wrap: anywhere; }
.account-menu-heading span { display: block; margin-top: 4px; color: var(--dim); font-size: 14px; }
.account-menu > [role="menuitem"] { display: flex; align-items: center; min-height: 44px; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; font: 400 15px/1.5 var(--font); cursor: pointer; }
.account-menu > [role="menuitem"]:hover, .account-menu > [role="menuitem"]:focus-visible { background: var(--card-hover); text-decoration: none; }
.account-menu > [role="separator"] { height: 1px; background: var(--line); margin: 8px 4px; }
.nav-toggle { display: none; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; border: 1px solid var(--control); border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; }
.nav-error { position: absolute; top: 72px; right: 24px; max-width: 320px; padding: 16px; border: 1px solid var(--control); background: var(--bg2); color: var(--text); font-size: 15px; }
@media (min-width: 769px) and (max-width: 1100px) {
  .site-nav .nav-in { gap: 24px; } .site-navigation { gap: 16px; } .nav-actions { gap: 14px; }
  .nav-who-email { max-width: 115px; } .account-trigger .nav-avatar { display: none; }
}
@media (max-width: 768px) {
  .site-nav, .site-nav .nav-in { height: 64px; }
  .site-nav .nav-in { justify-content: space-between; padding-inline: 20px; }
  .site-nav .nav-toggle { display: inline-flex; }
  .site-navigation { position: absolute; inset: 64px 0 auto; display: grid; gap: 0; width: 100%; max-height: calc(100dvh - 64px); overflow-y: auto; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--control); }
  .site-nav[data-nav-ready] .site-navigation:not([data-open]) { display: none; }
  .site-navigation > a { padding: 12px 8px; font-size: 16px; }
  .nav-actions { flex-wrap: wrap; width: 100%; padding: 16px 8px 0; margin: 8px 0 0; border-top: 1px solid var(--line); gap: 20px; }
  .nav-account { flex-basis: 100%; order: -1; }
  .account-trigger { width: 100%; }
  .account-trigger > svg { margin-left: auto; }
  .nav-who-email { max-width: none; }
  .account-menu { position: static; width: auto; margin-top: 8px; box-shadow: none; border: 0; padding: 0; background: var(--bg); }
  .account-menu-heading { display: none; }
  .account-menu > [role="menuitem"] { min-height: 48px; padding-inline: 12px; font-size: 16px; }
  .site-nav .nav-download { flex: 1; }
  .nav-signin { margin-right: auto; }
  .nav-error { top: 64px; left: 20px; right: 20px; max-width: none; }
}
/* A friend's invite link: a short note under the header (nav.js adds it). */
.invite-banner { background: var(--accent-lo); border-bottom: 1px solid #675181; }
.invite-banner-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 12px; }
.invite-banner p { font-size: 15px; line-height: 1.6; color: var(--dim); min-width: 0; }
.invite-banner p strong { color: var(--text); }
.invite-banner-actions { display: flex; align-items: center; gap: 8px; }
.invite-banner-close { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: var(--dim); cursor: pointer; }
.invite-banner-close:hover { background: #ffffff14; color: var(--text); }
.invite-banner-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 768px) {
  .invite-banner-in { padding-inline: 20px; }
  .invite-banner-actions { width: 100%; }
  .invite-banner-actions .btn { flex: 1; }
}
