/* ============================================================================
   account-kit.css — the CUSTOMER-ACCOUNT subsystem design system (OB-D customer-account).

   DIRECTION: this INHERITS the live storefront/checkout language — the token layer
   is carried VERBATIM from the built checkout skin (website/internal/public/static/
   cart.css, itself carried from docs/design/cart/concept-b-smart-cart.html) so the
   account screens read as ONE site with the home → shop → cart → checkout. It is the
   STOREFRONT language (Ukraine-blue/yellow · Inter · radius-20 · the .p-card/.gbox/
   .btn vocabulary), NOT the neon-teal CMS admin look (that is a different world —
   docs/design/cms/cms-kit.css).

   TRI-THEME (DD-33, MANDATORY): one token set, three modes — light / dark / system.
   System follows the OS (prefers-color-scheme); an explicit choice persists
   (localStorage['ob-theme']) and is applied FOUC-safe by a blocking <head> script
   before first paint. Every color reads a token, so a theme swap is total.

   This kit reuses the checkout's field/switch/wizard/sum-line idiom and ADDS the
   account components (auth card, dashboard shell, order history, saved addresses,
   profile/security, the subscription manager + on-ramp, verify/reset states).
   NOTE: a DESIGN artifact (mockup fidelity), not the production stylesheet — the
   OB-W build re-implements this feel against the Go plumbing + the customer scope.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* The [hidden] attribute must beat component display rules (.banner/.buy-opt/etc. set an explicit
   display, which would otherwise override the UA [hidden]{display:none}). Carried from cart.css. */
[hidden] { display: none !important; }

/* ---- TRI-THEME TOKENS (DD-33 mechanism; DD-42 SD-1/SD-2 values) ----
   The palette is GENERATED here from tools/designtokens/design-tokens.json. This file used to
   declare the token layer "verbatim from cart.css" — and had already drifted: it still carried the
   PRE-fix --text-tertiary (#94A3B8 / #64748B) on 24 text sites, a third live WCAG AA failure from
   the one defect DD-42 was raised over, and a completely different --f-* set from the cart's.
   "Verbatim from" is a comment; this is a build step. Geometry stays per-surface. */
:root,:root[data-theme="light"]{
  color-scheme:light;
  /* brand */
  --ukraine-blue:#0057B7;
  --ukraine-yellow:#FFD700;
  --ukraine-blue-light:#4A90E2;
  --ukraine-yellow-light:#FFE55C;
  --ukraine-blue-hover:#0064cf;
  --ukraine-yellow-ink:#0A1628;
  --ukraine-gradient:linear-gradient(135deg,#0057B7 0%,#FFD700 100%);
  /* surfaces */
  --bg-primary:#FFFFFF;
  --bg-secondary:#F8F9FB;
  --bg-accent:#EEF2F7;
  --warm-tint:#FFFBEB;
  --warm-band:linear-gradient(180deg,#FFFCF2 0%,#F8F9FB 100%);
  /* text */
  --text-primary:#0A1628;
  --text-secondary:#475569;
  --text-tertiary:#636E7C;
  /* lines and elevation */
  --border:rgba(15,23,42,.08);
  --border-strong:rgba(15,23,42,.16);
  --shadow:0 4px 24px rgba(0,0,0,.06);
  --shadow-lg:0 12px 48px rgba(0,0,0,.10);
  --shadow-color:rgba(0,0,0,.18);
  --scrim:rgba(4,10,22,.55);
  /* accent */
  --accent:var(--ukraine-blue);
  --accent-ink:#0057B7;
  --on-accent:#FFFFFF;
  --fc:var(--ukraine-blue);
  /* semantic state */
  --ok:#1A7743;
  --ok-bg:rgba(26,119,67,.12);
  --warn:#846718;
  --warn-bg:rgba(255,215,0,.14);
  --danger:#CA2D2D;
  --danger-bg:rgba(202,45,45,.10);
  --info:#0057B7;
  --info-bg:rgba(0,87,183,.08);
  /* typography */
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}

:root[data-theme="dark"]{
  color-scheme:dark;
  /* brand */
  --ukraine-blue-light:#60A5FA;
  --ukraine-yellow-light:#FBBF24;
  --ukraine-blue-hover:#1f76d6;
  /* surfaces */
  --bg-primary:#0A1628;
  --bg-secondary:#0F1B2D;
  --bg-accent:#1E293B;
  --warm-tint:#15233c;
  --warm-band:linear-gradient(180deg,#12203a 0%,#0F1B2D 100%);
  /* text */
  --text-primary:#F8FAFC;
  --text-secondary:#CBD5E1;
  --text-tertiary:#8592A4;
  /* lines and elevation */
  --border:rgba(248,250,252,.08);
  --border-strong:rgba(248,250,252,.18);
  --shadow:0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:0 12px 48px rgba(0,0,0,.7);
  --shadow-color:rgba(0,0,0,.5);
  /* accent */
  --accent-ink:#7DB2F5;
  /* semantic state */
  --ok:#5BD98C;
  --ok-bg:rgba(91,217,140,.14);
  --warn:#FBBF24;
  --warn-bg:rgba(251,191,36,.14);
  --danger:#E07171;
  --danger-bg:rgba(224,113,113,.12);
  --info:#7DB2F5;
  --info-bg:rgba(125,178,245,.10);
}

@media (prefers-color-scheme:dark){
:root:not([data-theme="light"]){
  color-scheme:dark;
  /* brand */
  --ukraine-blue-light:#60A5FA;
  --ukraine-yellow-light:#FBBF24;
  --ukraine-blue-hover:#1f76d6;
  /* surfaces */
  --bg-primary:#0A1628;
  --bg-secondary:#0F1B2D;
  --bg-accent:#1E293B;
  --warm-tint:#15233c;
  --warm-band:linear-gradient(180deg,#12203a 0%,#0F1B2D 100%);
  /* text */
  --text-primary:#F8FAFC;
  --text-secondary:#CBD5E1;
  --text-tertiary:#8592A4;
  /* lines and elevation */
  --border:rgba(248,250,252,.08);
  --border-strong:rgba(248,250,252,.18);
  --shadow:0 4px 24px rgba(0,0,0,.5);
  --shadow-lg:0 12px 48px rgba(0,0,0,.7);
  --shadow-color:rgba(0,0,0,.5);
  /* accent */
  --accent-ink:#7DB2F5;
  /* semantic state */
  --ok:#5BD98C;
  --ok-bg:rgba(91,217,140,.14);
  --warn:#FBBF24;
  --warn-bg:rgba(251,191,36,.14);
  --danger:#E07171;
  --danger-bg:rgba(224,113,113,.12);
  --info:#7DB2F5;
  --info-bg:rgba(125,178,245,.10);
}
}
:root {
  --radius:20px; --radius-sm:12px; --radius-pill:999px;
  --header-h:72px; --maxw:1160px; --pad:clamp(18px,4vw,36px);
}

html { scroll-behavior:smooth; scroll-padding-top:calc(var(--header-h) + 16px); -webkit-text-size-adjust:100%; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }
body {
  font-family:var(--font); background:var(--bg-primary); color:var(--text-primary);
  line-height:1.6; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  transition:background-color .5s cubic-bezier(.4,0,.2,1), color .5s cubic-bezier(.4,0,.2,1);
}
img { max-width:100%; display:block; } button { font-family:inherit; cursor:pointer; }
a { color:var(--ukraine-blue); text-decoration:none; }
h1,h2,h3,h4 { line-height:1.14; letter-spacing:-.02em; font-weight:800; }
:where(a,button,input,textarea,select,[tabindex]):focus-visible { outline:2.5px solid var(--ukraine-blue-light); outline-offset:2px; border-radius:8px; }
.container { width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); border:0; }
.muted { color:var(--text-secondary); } .muted-2 { color:var(--text-tertiary); }
.shimmer { background:linear-gradient(135deg,var(--ukraine-blue) 0%,var(--ukraine-yellow) 33%,var(--ukraine-blue) 66%,var(--ukraine-yellow) 100%);
  background-size:300% auto; -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
html.motion-live .shimmer { animation:shimmer 6s linear infinite; }
@keyframes shimmer { 0%{ background-position:0% center; } 100%{ background-position:300% center; } }

/* ============ HEADER (storefront chrome + the account affordance) ============ */
.hdr { position:sticky; top:0; z-index:50; height:var(--header-h);
  background:color-mix(in srgb, var(--bg-primary) 84%, transparent);
  backdrop-filter:saturate(150%) blur(14px); border-bottom:1px solid var(--border); }
.hdr__in { max-width:var(--maxw); height:100%; margin-inline:auto; padding-inline:var(--pad);
  display:flex; align-items:center; gap:20px; }
.hdr__brand { display:inline-flex; align-items:center; gap:9px; font-weight:900; font-size:1.1rem; letter-spacing:-.02em; color:var(--text-primary); }
.hdr__brand .mark { width:26px; height:26px; border-radius:8px; background:var(--ukraine-gradient);
  display:grid; place-items:center; color:var(--on-accent); font-size:.9rem; box-shadow:var(--shadow); }
.hdr__nav { margin-left:auto; display:flex; align-items:center; gap:18px; font-weight:600; font-size:.9rem; }
.hdr__nav a.navlink { color:var(--text-secondary); transition:color .2s; }
.hdr__nav a.navlink:hover, .hdr__nav a.navlink[aria-current]{ color:var(--text-primary); }
@media (max-width:820px){ .hdr__nav .hide-sm{ display:none; } }

/* tri-theme switch — the home's 3-way light/dark/system control (DD-33 SD-1) */
.theme-switch { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--border-strong);
  border-radius:var(--radius-pill); background:var(--bg-secondary); }
.theme-opt { width:30px; height:30px; border:0; border-radius:var(--radius-pill); background:transparent; cursor:pointer;
  color:var(--text-tertiary); display:grid; place-items:center; transition:background .2s, color .2s; }
.theme-opt svg { width:16px; height:16px; }
.theme-opt:hover { color:var(--text-secondary); }
.theme-opt[aria-pressed="true"]{ background:var(--bg-primary); color:var(--ukraine-blue); box-shadow:var(--shadow); }
:root[data-theme="dark"] .theme-opt[aria-pressed="true"]{ color:var(--ukraine-yellow); }

/* the ACCOUNT chip in the header — signed-out = "Sign in"; signed-in = avatar + name */
.acct-chip { display:inline-flex; align-items:center; gap:8px; padding:7px 14px 7px 8px; border-radius:var(--radius-pill);
  border:1px solid var(--border-strong); background:var(--bg-primary); color:var(--text-primary); font-weight:700; font-size:.88rem;
  transition:border-color .2s, transform .2s; }
.acct-chip:hover { border-color:var(--ukraine-blue); transform:translateY(-1px); }
.acct-chip.signed-out { padding:9px 16px; }
.cart-btn { display:inline-flex; align-items:center; gap:8px; padding:9px 15px; border-radius:var(--radius-pill);
  border:1px solid var(--border-strong); background:var(--bg-primary); color:var(--text-primary); font-weight:700; font-size:.88rem; }
.cart-btn svg { width:17px; height:17px; }
.cart-badge { min-width:20px; height:20px; padding:0 6px; border-radius:var(--radius-pill); background:var(--ukraine-blue);
  color:var(--on-accent); font-size:.72rem; font-weight:800; display:grid; place-items:center; }

/* the avatar (initials) — reused in the header chip + the dashboard head */
.avatar { width:30px; height:30px; border-radius:50%; background:var(--ukraine-gradient); color:var(--on-accent);
  display:grid; place-items:center; font-size:.78rem; font-weight:800; letter-spacing:.02em; flex:0 0 auto; }
.avatar--lg { width:52px; height:52px; font-size:1.15rem; }

/* ============ BUTTONS (checkout/home vocabulary) ============ */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:9px; cursor:pointer;
  font-weight:700; font-size:.95rem; letter-spacing:.01em; padding:14px 26px; border-radius:var(--radius-sm);
  border:2px solid transparent; background:var(--ukraine-blue); color:var(--on-accent);
  transition:background .25s, border-color .25s, transform .25s, box-shadow .25s, color .25s; }
.btn svg { width:18px; height:18px; }
.btn:hover { background:var(--ukraine-blue-hover); transform:translateY(-3px); box-shadow:var(--shadow-lg); }
.btn-ghost { background:transparent; color:var(--text-primary); border-color:var(--border-strong); }
.btn-ghost:hover { background:transparent; border-color:var(--ukraine-blue); color:var(--ukraine-blue); transform:translateY(-2px); box-shadow:none; }
.btn-soft { background:var(--bg-accent); color:var(--text-primary); }
.btn-soft:hover { background:var(--bg-accent); color:var(--ukraine-blue); }
.btn-danger { background:transparent; color:var(--danger); border-color:color-mix(in srgb,var(--danger) 40%, transparent); }
.btn-danger:hover { background:var(--danger-bg); color:var(--danger); border-color:var(--danger); transform:none; box-shadow:none; }
.btn-lg { padding:17px 34px; font-size:1.02rem; } .btn-sm { padding:9px 16px; font-size:.85rem; }
.btn-block { width:100%; }
.btn[disabled], .btn.is-disabled { opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }
.btn.is-busy { position:relative; color:transparent; pointer-events:none; }
.btn.is-busy::after { content:''; position:absolute; width:18px; height:18px; border-radius:50%;
  border:2.5px solid color-mix(in srgb,var(--on-accent) 50%,transparent); border-top-color:var(--on-accent); animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.linkbtn { background:none; border:0; padding:0; color:var(--ukraine-blue); font-weight:700; font-size:inherit; cursor:pointer; }
.linkbtn:hover { text-decoration:underline; }

/* ============ EYEBROW / PILL / CHIP ============ */
.eyebrow { display:inline-flex; align-items:center; gap:10px; font-size:.76rem; font-weight:800;
  letter-spacing:.16em; text-transform:uppercase; color:var(--ukraine-blue); }
.eyebrow::before { content:''; width:24px; height:2px; background:var(--ukraine-gradient); }
:root[data-theme="dark"] .eyebrow { color:var(--accent-ink); }
.pill { display:inline-flex; align-items:center; gap:7px; padding:5px 12px; border-radius:var(--radius-pill);
  background:var(--bg-secondary); border:1px solid var(--border); font-size:.76rem; font-weight:700; color:var(--text-secondary); }
.pill .dot { width:8px; height:8px; border-radius:50%; background:var(--fc,var(--ukraine-blue)); flex:0 0 auto; }
.status-pill { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:var(--radius-pill);
  font-size:.74rem; font-weight:800; letter-spacing:.02em; }
.status-pill .dot { width:7px; height:7px; border-radius:50%; background:currentColor; }
.status-pill--ok { color:var(--ok); background:var(--ok-bg); }
.status-pill--warn { color:var(--warn); background:var(--warn-bg); }
.status-pill--info { color:var(--info); background:var(--info-bg); }
.status-pill--muted { color:var(--text-tertiary); background:var(--bg-accent); }

/* ============ FIELDS (verbatim idiom from the checkout wizard) ============ */
.field { margin-bottom:16px; }
.field > label { display:flex; align-items:center; font-weight:700; font-size:.85rem; margin-bottom:6px; }
.field .opt { color:var(--text-tertiary); font-weight:500; font-size:.78rem; margin-left:6px; }
.field .label-link { margin-left:auto; font-size:.8rem; font-weight:700; color:var(--ukraine-blue); }
.field input, .field textarea, .field select {
  width:100%; padding:13px 14px; border:2px solid var(--border-strong); border-radius:var(--radius-sm);
  background:var(--bg-primary); color:var(--text-primary); font-size:1rem; font-family:inherit; transition:border-color .2s, box-shadow .2s; }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field textarea, :root[data-theme="dark"] .field select { background:var(--bg-accent); }
.field input:focus, .field textarea:focus, .field select:focus { outline:none; border-color:var(--ukraine-blue); box-shadow:0 0 0 4px var(--info-bg); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; } @media(max-width:520px){ .field-row{ grid-template-columns:1fr; } }
.field.err input, .field.err select { border-color:var(--danger); }
.field .field-msg { margin-top:6px; font-size:.8rem; font-weight:600; color:var(--danger); display:flex; align-items:center; gap:6px; }
.field .field-hint { margin-top:6px; font-size:.8rem; color:var(--text-tertiary); }
/* an input with a trailing control (password reveal) */
.input-wrap { position:relative; }
.input-wrap input { padding-right:46px; }
.input-affix { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:34px; height:34px;
  border:0; background:transparent; border-radius:8px; color:var(--text-tertiary); display:grid; place-items:center; }
.input-affix:hover { color:var(--text-primary); background:var(--bg-accent); }
.input-affix svg { width:18px; height:18px; }

/* password strength meter + requirements */
.pw-meter { display:flex; gap:6px; margin-top:10px; }
.pw-meter i { height:5px; flex:1; border-radius:var(--radius-pill); background:var(--bg-accent); transition:background .3s; }
.pw-meter[data-score="1"] i:nth-child(-n+1), .pw-meter[data-score="2"] i:nth-child(-n+2),
.pw-meter[data-score="3"] i:nth-child(-n+3), .pw-meter[data-score="4"] i:nth-child(-n+4){ background:var(--score-c,var(--ok)); }
.pw-meter[data-score="1"]{ --score-c:var(--danger); } .pw-meter[data-score="2"]{ --score-c:var(--warn); }
.pw-meter[data-score="3"]{ --score-c:var(--ukraine-blue); } .pw-meter[data-score="4"]{ --score-c:var(--ok); }
.pw-note { margin-top:7px; font-size:.8rem; color:var(--text-tertiary); }
.pw-reqs { list-style:none; display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; }
.pw-reqs li { font-size:.8rem; color:var(--text-tertiary); display:inline-flex; align-items:center; gap:6px; }
.pw-reqs li::before { content:'○'; font-size:.7rem; }
.pw-reqs li.ok { color:var(--ok); } .pw-reqs li.ok::before { content:'✓'; }

/* ============ BANNERS / ALERTS (verify · error · locked · reset-sent) ============ */
.banner { display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:var(--radius-sm);
  border:1px solid var(--border); background:var(--bg-secondary); font-size:.92rem; }
.banner .g { flex:0 0 auto; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:.8rem;
  font-weight:800; color:var(--on-accent); }
.banner b { color:var(--text-primary); }
.banner--ok { background:var(--ok-bg); border-color:color-mix(in srgb,var(--ok) 30%, transparent); color:var(--text-primary); } .banner--ok .g { background:var(--ok); }
.banner--warn { background:var(--warn-bg); border-color:color-mix(in srgb,var(--warn) 34%, transparent); } .banner--warn .g { background:var(--warn); }
.banner--bad { background:var(--danger-bg); border-color:color-mix(in srgb,var(--danger) 34%, transparent); } .banner--bad .g { background:var(--danger); }
.banner--info { background:var(--info-bg); border-color:color-mix(in srgb,var(--info) 26%, transparent); } .banner--info .g { background:var(--info); }
.banner .banner-cta { margin-left:auto; align-self:center; }
.mono { font-variant-numeric:tabular-nums; font-feature-settings:'tnum'; }

/* ============ TOGGLE SWITCH (trust-device · auto-renew) — verbatim from checkout ============ */
.switch { position:relative; width:46px; height:26px; flex-shrink:0; display:inline-block; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider { position:absolute; inset:0; background:var(--border-strong); border-radius:var(--radius-pill); transition:.3s; cursor:pointer; }
.switch .slider::before { content:''; position:absolute; height:20px; width:20px; left:3px; top:3px; background:var(--on-accent); border-radius:50%; transition:.3s; }
.switch input:checked + .slider { background:var(--ukraine-blue); } .switch input:checked + .slider::before { transform:translateX(20px); }
.toggle-row { display:flex; align-items:center; gap:14px; }
.toggle-row .toggle-copy b { display:block; font-size:.92rem; } .toggle-row .toggle-copy small { color:var(--text-secondary); font-size:.82rem; }

/* ============ CARD / PANEL ============ */
.card { background:var(--bg-primary); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:var(--shadow); }
.panel { background:var(--bg-primary); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.panel__head { display:flex; align-items:center; gap:12px; padding:18px 22px; border-bottom:1px solid var(--border); }
.panel__head h2, .panel__head h3 { font-size:1.15rem; } .panel__head .panel-cta { margin-left:auto; }
.panel__body { padding:22px; }
.divider { display:flex; align-items:center; gap:14px; margin:20px 0; color:var(--text-tertiary); font-size:.82rem; font-weight:600; }
.divider::before, .divider::after { content:''; flex:1; height:1px; background:var(--border); }
.stack > * + * { margin-top:14px; }

/* ============ AUTH (sign in / sign up / forgot / reset / verify) ============ */
.auth { min-height:calc(100vh - var(--header-h)); display:grid; place-items:center; padding:40px var(--pad) 80px;
  background:var(--warm-band); }
.auth__card { width:100%; max-width:440px; background:var(--bg-primary); border:1px solid var(--border);
  border-radius:var(--radius); box-shadow:var(--shadow-lg); padding:clamp(26px,4vw,40px); }
.auth__logo { width:46px; height:46px; border-radius:13px; background:var(--ukraine-gradient); color:var(--on-accent);
  display:grid; place-items:center; font-size:1.3rem; box-shadow:var(--shadow); margin-bottom:18px; }
.auth__card h1 { font-size:1.7rem; margin:12px 0 6px; }
.auth__card .sub { color:var(--text-secondary); font-size:.96rem; margin-bottom:22px; }
.auth__card form { margin-top:4px; }
.auth__foot { margin-top:20px; text-align:center; font-size:.9rem; color:var(--text-secondary); }
.auth__foot a, .auth__foot .linkbtn { font-weight:700; }
.auth__meta { margin-top:18px; text-align:center; font-size:.82rem; color:var(--text-tertiary); }

/* segmented control (switch auth screens in the mockup; also the frequency toggle) */
.seg { display:inline-flex; padding:3px; border:1px solid var(--border-strong); border-radius:var(--radius-pill); background:var(--bg-secondary); gap:2px; }
.seg button { border:0; background:transparent; color:var(--text-secondary); font-weight:700; font-size:.86rem;
  padding:8px 16px; border-radius:var(--radius-pill); cursor:pointer; transition:background .2s, color .2s; }
.seg button[aria-selected="true"]{ background:var(--bg-primary); color:var(--ukraine-blue); box-shadow:var(--shadow); }
.seg--block { display:flex; } .seg--block button { flex:1; }

/* the big centered glyph state (verify / reset-sent / expired) */
.hero-state { text-align:center; }
.hero-state .glyph { width:84px; height:84px; margin:0 auto 8px; border-radius:50%; display:grid; place-items:center; font-size:2.4rem; }
.hero-state .glyph--ok { background:var(--ok-bg); color:var(--ok); }
.hero-state .glyph--info { background:var(--info-bg); color:var(--info); }
.hero-state .glyph--warn { background:var(--warn-bg); color:var(--warn); }
.hero-state .glyph--mail { background:var(--warm-tint); }

/* ============ DASHBOARD SHELL (sidebar + main) ============ */
.dash { max-width:var(--maxw); margin-inline:auto; padding:26px var(--pad) 80px; display:grid;
  grid-template-columns:250px 1fr; gap:32px; align-items:start; }
.dash__side { position:sticky; top:calc(var(--header-h) + 22px); display:flex; flex-direction:column; gap:6px; }
.dash__id { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-secondary); margin-bottom:10px; }
.dash__id .who b { display:block; font-size:.96rem; } .dash__id .who small { color:var(--text-tertiary); font-size:.8rem; }
.dash__nav { display:flex; flex-direction:column; gap:3px; }
.dash__nav a { display:flex; align-items:center; gap:11px; padding:11px 14px; border-radius:var(--radius-sm); color:var(--text-secondary);
  font-weight:650; font-size:.94rem; transition:background .2s, color .2s; }
.dash__nav a svg { width:18px; height:18px; flex:0 0 auto; }
.dash__nav a:hover { background:var(--bg-secondary); color:var(--text-primary); }
.dash__nav a[aria-current="true"]{ background:var(--bg-accent); color:var(--ukraine-blue); }
:root[data-theme="dark"] .dash__nav a[aria-current="true"]{ color:var(--ukraine-yellow); }
.dash__nav .count { margin-left:auto; font-size:.76rem; font-weight:800; color:var(--text-tertiary); }
.dash__nav .signout { margin-top:8px; color:var(--text-tertiary); }
.dash__main { min-width:0; display:flex; flex-direction:column; gap:22px; }
.dash__head h1 { font-size:clamp(1.6rem,3.4vw,2.2rem); }
.dash__head p { color:var(--text-secondary); margin-top:4px; }
.dash-pane { display:flex; flex-direction:column; gap:22px; }
.dash-pane[hidden]{ display:none; }
@media (max-width:820px){
  .dash { grid-template-columns:1fr; gap:18px; }
  .dash__side { position:static; }
  .dash__id { display:none; }
  .dash__nav { flex-direction:row; overflow-x:auto; gap:6px; padding-bottom:4px; -webkit-overflow-scrolling:touch; }
  .dash__nav a { white-space:nowrap; } .dash__nav a svg { display:none; } .dash__nav .signout { margin-top:0; }
}

/* summary/stat tiles on the overview */
.tile-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; }
.tile { border:1px solid var(--border); border-radius:var(--radius-sm); padding:18px; background:var(--bg-primary); }
.tile .k { font-size:.78rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text-tertiary); }
.tile .v { font-size:1.5rem; font-weight:900; margin-top:6px; font-variant-numeric:tabular-nums; }
.tile .s { font-size:.82rem; color:var(--text-secondary); margin-top:4px; }

/* ============ ORDER HISTORY ============ */
.order-list { display:flex; flex-direction:column; gap:14px; }
.order-card { border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; background:var(--bg-primary);
  display:grid; grid-template-columns:1fr auto; gap:14px 18px; align-items:center; transition:border-color .25s, box-shadow .25s, transform .25s; }
.order-card:hover { border-color:var(--border-strong); box-shadow:var(--shadow); }
.order-card__top { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.order-card__ref { font-weight:800; font-variant-numeric:tabular-nums; }
.order-card__date { color:var(--text-tertiary); font-size:.86rem; }
.order-card__items { display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; }
.swatch-row { display:inline-flex; }
.swatch { width:26px; height:26px; border-radius:50%; border:2px solid var(--bg-primary); margin-left:-8px; display:grid; place-items:center; font-size:.8rem; box-shadow:var(--shadow); }
.swatch:first-child { margin-left:0; }
.order-card__summary { color:var(--text-secondary); font-size:.9rem; }
.order-card__right { display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.order-card__total { font-weight:800; font-size:1.1rem; font-variant-numeric:tabular-nums; }
.order-card__actions { display:flex; gap:8px; }
@media (max-width:560px){ .order-card { grid-template-columns:1fr; } .order-card__right { align-items:flex-start; } }

/* order-detail timeline (reused from confirmation) */
.timeline { display:flex; flex-direction:column; gap:2px; }
.tl-item { display:flex; gap:14px; padding:8px 0; }
.tl-num { width:28px; height:28px; border-radius:50%; background:var(--bg-accent); color:var(--text-secondary);
  display:grid; place-items:center; font-weight:800; font-size:.82rem; flex:0 0 auto; }
.tl-item.done .tl-num { background:var(--ok); color:var(--on-accent); } .tl-item.now .tl-num { background:var(--ukraine-blue); color:var(--on-accent); }
.tl-item b { display:block; font-size:.95rem; } .tl-item span { color:var(--text-secondary); font-size:.85rem; }
.tl-item::after{ } /* connector omitted for mockup simplicity */

/* ============ SAVED ADDRESSES ============ */
.addr-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px; }
.addr-card { position:relative; border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px; background:var(--bg-primary); }
.addr-card.is-default { border-color:color-mix(in srgb,var(--ukraine-blue) 40%, var(--border)); }
.addr-card .addr-tag { display:inline-flex; align-items:center; gap:6px; font-size:.72rem; font-weight:800; letter-spacing:.04em;
  text-transform:uppercase; color:var(--text-tertiary); margin-bottom:8px; }
.addr-card.is-default .addr-tag { color:var(--ukraine-blue); }
.addr-card .addr-body { line-height:1.5; font-size:.94rem; }
.addr-card .addr-body b { font-weight:800; }
.addr-card .addr-actions { display:flex; gap:12px; margin-top:14px; font-size:.85rem; font-weight:700; }
.addr-card--add { border:2px dashed var(--border-strong); background:var(--bg-secondary); display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:8px; min-height:150px; color:var(--text-secondary); cursor:pointer; transition:border-color .2s, color .2s; }
.addr-card--add:hover { border-color:var(--ukraine-blue); color:var(--ukraine-blue); }
.addr-card--add .plus { width:40px; height:40px; border-radius:50%; background:var(--bg-accent); display:grid; place-items:center; font-size:1.4rem; }

/* ============ PROFILE / SECURITY ============ */
.security-list { display:flex; flex-direction:column; }
.security-item { display:flex; align-items:center; gap:16px; padding:16px 0; border-bottom:1px solid var(--border); }
.security-item:last-child { border-bottom:0; }
.security-item .si-copy { flex:1; min-width:0; }
.security-item .si-copy b { display:block; font-size:.95rem; } .security-item .si-copy span { color:var(--text-secondary); font-size:.88rem; }
.danger-zone { border:1px solid color-mix(in srgb,var(--danger) 30%, var(--border)); border-radius:var(--radius); padding:20px; background:var(--danger-bg); }
.danger-zone h3 { color:var(--danger); font-size:1.02rem; margin-bottom:6px; }
.danger-zone p { color:var(--text-secondary); font-size:.9rem; margin-bottom:14px; }

/* ============ SUBSCRIPTION — the manager ============ */
.sub-hero { border-radius:var(--radius); overflow:hidden; border:1px solid var(--border); background:var(--warm-band); box-shadow:var(--shadow); }
.sub-hero__in { display:grid; grid-template-columns:1.1fr .9fr; gap:24px; padding:clamp(22px,4vw,34px); align-items:center; }
.sub-hero .club-eyebrow { color:var(--ukraine-blue); }
.sub-hero h2 { font-size:clamp(1.5rem,3.4vw,2.1rem); margin:10px 0 8px; }
.sub-hero .next { display:inline-flex; align-items:baseline; gap:10px; margin-top:6px; }
.sub-hero .next .big { font-size:1.5rem; font-weight:900; }
.sub-hero__aside { background:var(--bg-primary); border:1px solid var(--border); border-radius:var(--radius-sm); padding:18px; }
.sub-hero__aside .row { display:flex; justify-content:space-between; padding:7px 0; border-bottom:1px solid var(--border); font-size:.9rem; }
.sub-hero__aside .row:last-child { border-bottom:0; } .sub-hero__aside .row b { font-weight:800; }
@media (max-width:720px){ .sub-hero__in { grid-template-columns:1fr; } }

/* frequency toggle (weekly / monthly — STRUCTURE, DD-28 SD-4) */
.freq { display:inline-flex; padding:3px; border:1px solid var(--border-strong); border-radius:var(--radius-pill); background:var(--bg-secondary); }
.freq button { border:0; background:transparent; color:var(--text-secondary); font-weight:700; font-size:.9rem; padding:9px 20px; border-radius:var(--radius-pill); cursor:pointer; transition:.2s; }
.freq button[aria-selected="true"]{ background:var(--ukraine-blue); color:var(--on-accent); }

/* the upcoming-deliveries timeline with skip */
.deliveries { display:flex; flex-direction:column; gap:10px; }
.delivery { display:flex; align-items:center; gap:14px; padding:14px 16px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-primary); }
.delivery .d-date { display:flex; flex-direction:column; align-items:center; width:52px; flex:0 0 auto; }
.delivery .d-date .dow { font-size:.72rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--text-tertiary); }
.delivery .d-date .dnum { font-size:1.35rem; font-weight:900; line-height:1; }
.delivery .d-body { flex:1; min-width:0; } .delivery .d-body b { font-size:.94rem; } .delivery .d-body span { display:block; color:var(--text-secondary); font-size:.85rem; }
.delivery.is-next { border-color:color-mix(in srgb,var(--ukraine-blue) 42%, var(--border)); background:var(--info-bg); }
.delivery.is-skipped { opacity:.55; }
.delivery.is-skipped .d-body b { text-decoration:line-through; }
.sub-controls { display:flex; gap:10px; flex-wrap:wrap; margin-top:4px; }

/* the subscribe ON-RAMP (plan card + subscribe/one-time toggle on a box) */
.plan-card { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:var(--bg-primary); box-shadow:var(--shadow); }
.plan-card.is-featured { border-color:color-mix(in srgb,var(--ukraine-yellow) 60%, var(--border)); }
.plan-card__media { height:150px; display:grid; place-items:center; font-size:3rem; background:linear-gradient(150deg,var(--bg-accent),var(--bg-secondary)); position:relative; }
.plan-card__badge { position:absolute; top:12px; left:12px; background:var(--ukraine-blue); color:var(--on-accent); font-size:.7rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; padding:4px 11px; border-radius:var(--radius-pill); }
.plan-card__body { padding:20px; display:flex; flex-direction:column; gap:10px; }
.plan-card__body h3 { font-size:1.28rem; }
.buy-mode { display:grid; gap:10px; }
.buy-opt { display:flex; align-items:flex-start; gap:12px; padding:13px 15px; border:2px solid var(--border-strong); border-radius:var(--radius-sm); cursor:pointer; transition:border-color .2s, background .2s; }
.buy-opt:hover { border-color:var(--ukraine-blue); }
.buy-opt.on { border-color:var(--ukraine-blue); background:var(--info-bg); }
.buy-opt input { margin-top:3px; accent-color:var(--ukraine-blue); }
.buy-opt .bo-copy b { display:block; font-size:.94rem; } .buy-opt .bo-copy small { color:var(--text-secondary); font-size:.83rem; }
.buy-opt .bo-price { margin-left:auto; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.buy-opt .save-tag { display:inline-block; margin-top:4px; font-size:.72rem; font-weight:800; color:var(--ok); }

/* ============ CHECKOUT INTEGRATION (the sign-in affordance + steps rail) ============ */
.co-signin { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:13px 16px; border:1px solid var(--border);
  border-radius:var(--radius-sm); background:var(--bg-secondary); margin-bottom:18px; font-size:.92rem; }
.co-signin .g { font-size:1.1rem; } .co-signin b { font-weight:800; }
.co-signin .co-signin-cta { margin-left:auto; }
.co-signin__panel { margin-bottom:18px; border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--bg-primary); padding:18px; }
.co-signin__panel[hidden]{ display:none; }
.co-identity { display:flex; align-items:center; gap:12px; padding:12px 16px; border:1px solid color-mix(in srgb,var(--ok) 34%, var(--border));
  border-radius:var(--radius-sm); background:var(--ok-bg); margin-bottom:18px; }
.co-identity .who b { display:block; } .co-identity .who small { color:var(--text-secondary); font-size:.84rem; }
.co-identity .co-identity-cta { margin-left:auto; }
/* the saved-address picker that replaces manual entry when signed in */
.saved-pick { display:grid; gap:10px; margin-bottom:14px; }
.saved-opt { display:flex; align-items:flex-start; gap:12px; padding:13px 15px; border:2px solid var(--border-strong); border-radius:var(--radius-sm); cursor:pointer; }
.saved-opt.on { border-color:var(--ukraine-blue); background:var(--info-bg); }
.saved-opt input { margin-top:3px; accent-color:var(--ukraine-blue); }
.saved-opt .so-body { font-size:.92rem; line-height:1.45; } .saved-opt .so-body b { font-weight:800; }

/* steps rail (verbatim idiom from checkout.html) */
.steps { display:flex; align-items:center; gap:8px; margin:22px 0 26px; justify-content:center; flex-wrap:wrap; }
.step-pip { display:flex; align-items:center; gap:8px; } .step-bar { width:34px; height:2px; background:var(--border-strong); }
.step-pip .pip { width:30px; height:30px; border-radius:50%; border:2px solid var(--border-strong); display:grid; place-items:center; font-weight:800; font-size:.86rem; color:var(--text-tertiary); }
.step-pip.on .pip { background:var(--ukraine-gradient); color:var(--on-accent); border-color:transparent; }
.step-pip.done .pip { background:var(--ok); color:var(--on-accent); border-color:transparent; }
.step-pip .nm { font-size:.82rem; font-weight:700; color:var(--text-secondary); } .step-pip.on .nm { color:var(--text-primary); }
@media(max-width:600px){ .step-pip .nm{ display:none; } .step-bar{ width:16px; } }
.sum-line { display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--border); font-size:.95rem; }
.sum-line .lbl { color:var(--text-secondary); }
.sum-line.total { border-bottom:none; border-top:2px solid var(--ukraine-blue); margin-top:8px; padding-top:14px; font-size:1.25rem; font-weight:800; }
.sum-line.total .amt { color:var(--ukraine-blue); } :root[data-theme="dark"] .sum-line.total .amt { color:var(--ukraine-yellow); }

/* the post-purchase account offer (on the confirmation page) */
.post-acct { border:1px solid color-mix(in srgb,var(--ukraine-yellow) 50%, var(--border)); border-radius:var(--radius);
  background:var(--warm-tint); padding:22px; text-align:left; }
.post-acct h3 { font-size:1.2rem; margin-bottom:6px; }
.post-acct .why { color:var(--text-secondary); font-size:.92rem; margin-bottom:16px; }
.post-acct .perks { list-style:none; display:flex; flex-wrap:wrap; gap:8px 16px; margin-bottom:16px; }
.post-acct .perks li { font-size:.85rem; color:var(--text-secondary); display:inline-flex; align-items:center; gap:7px; }
.post-acct .perks li::before { content:'✓'; color:var(--ok); font-weight:800; }
.post-acct.is-done { border-color:color-mix(in srgb,var(--ok) 45%, var(--border)); background:var(--ok-bg); text-align:center; }

/* confirmation seal (reused) */
.confirm-wrap { max-width:620px; margin-inline:auto; text-align:center; display:flex; flex-direction:column; gap:16px; }
.seal { font-size:3.4rem; } .order-id { display:inline-block; margin:0 auto; padding:8px 18px; border-radius:var(--radius-pill); background:var(--bg-accent); font-weight:800; font-variant-numeric:tabular-nums; }
.co-badge { display:inline-block; background:var(--warn-bg); color:var(--warn); border:1px solid color-mix(in srgb,var(--warn) 40%,transparent); border-radius:var(--radius-pill); padding:6px 14px; font-size:.82rem; font-weight:700; }

/* ============ TOAST + ORDER BAR (inherited mechanics) ============ */
.toast-wrap { position:fixed; left:50%; bottom:calc(var(--header-h) + 8px); transform:translateX(-50%); z-index:80;
  display:flex; flex-direction:column; gap:10px; align-items:center; pointer-events:none; }
.toast { display:inline-flex; align-items:center; gap:10px; padding:12px 18px; border-radius:var(--radius-pill);
  background:var(--text-primary); color:var(--bg-primary); font-weight:700; font-size:.9rem; box-shadow:var(--shadow-lg);
  opacity:0; transform:translateY(12px); transition:opacity .3s, transform .3s; }
.toast.is-in { opacity:1; transform:none; }
.toast .ic { width:20px; height:20px; border-radius:50%; background:var(--ok); color:var(--on-accent); display:grid; place-items:center; font-size:.7rem; }

/* ============ SCROLL REVEALS (GPU-only; degrade-to-visible) ============ */
.reveal-io [data-reveal]{ opacity:0; transform:translateY(26px); }
.reveal-io [data-reveal].is-in{ opacity:1; transform:none;
  transition:opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1); }
@media (prefers-reduced-motion:reduce){
  .reveal-io [data-reveal]{ opacity:1 !important; transform:none !important; }
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
.section { padding:clamp(34px,6vw,64px) 0; }

/* ============ FOOTER ============ */
.ftr { border-top:1px solid var(--border); background:var(--bg-secondary); margin-top:60px; }
.ftr__in { max-width:var(--maxw); margin-inline:auto; padding:32px var(--pad); display:flex; flex-wrap:wrap; gap:16px 40px; align-items:center; }
.ftr__brand { font-weight:900; } .ftr__meta { color:var(--text-tertiary); font-size:.84rem; margin-left:auto; }

/* ============ PROTOTYPE DEMO CHROME (NOT part of the real screens) ============ */
.proto { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:10px var(--pad);
  background:var(--bg-accent); border-bottom:1px dashed var(--border-strong); font-size:.82rem; }
.proto__brand { font-weight:800; display:inline-flex; align-items:center; gap:7px; }
.proto__brand .spark { color:var(--ukraine-blue); }
.proto__crumbs { color:var(--text-secondary); } .proto__spacer { flex:1; }
.proto .jump { padding:7px 12px; border-radius:var(--radius-sm); border:1px solid var(--border-strong); background:var(--bg-primary); color:var(--text-primary); font-size:.82rem; font-family:inherit; }
.proto .demo-states { display:inline-flex; align-items:center; gap:6px; }
.proto .demo-states .lbl { color:var(--text-tertiary); }
.proto .chipbtn { padding:6px 12px; border-radius:var(--radius-pill); border:1px solid var(--border-strong); background:var(--bg-primary); color:var(--text-secondary); font-weight:700; font-size:.78rem; cursor:pointer; }
.proto .chipbtn[aria-pressed="true"]{ background:var(--ukraine-blue); color:var(--on-accent); border-color:transparent; }
