/*
 * FreeSmsOtp design system — light, calm, data-first (owner brief 2026-09-23).
 * One accent (teal) so money, codes and delivery numbers are what stands out;
 * generous spacing; tabular numerals everywhere a figure can be compared.
 * No framework, no webfont: the system stack renders instantly and costs 0 KB.
 */
@layer fonts, tokens, base, layout, components, utilities;

@layer fonts {
  /* Self-hosted so no third party sees a visitor and the CSP stays closed. */
  @font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/assets/fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700 800; font-display: swap; src: url(/assets/fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  @font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/figtree-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/fonts/figtree-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
  @font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/assets/fonts/jetbrains-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/assets/fonts/jetbrains-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
}

@layer tokens {
  :root {
    /* Brand identity v1: ink ground, signal green for "delivered", volt as the single spark. */
    --brand-50:  #e8f7f0;
    --brand-100: #d3f0e3;
    --brand-200: #b7e3ce;
    --brand-500: #0ba36b;
    --brand-600: #08734c;
    --brand-700: #065f3e;
    --volt:      #d6f24b;

    --ink:     #0a1a16;
    --ink-2:   #33443d;
    --muted:   #5a6b64;
    --line:    #e4e1d9;
    --line-2:  #d9d5cb;
    --surface: #ffffff;
    --surface-2: #f6f4ef;
    --surface-3: #f0eee7;

    --ok:    #08734c;
    --ok-bg: #e8f7f0;
    --warn:  #8a5a08;
    --warn-bg: #fff6e3;
    --bad:   #a32013;
    --bad-bg: #fdeeec;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / .06), 0 1px 3px rgb(15 23 42 / .04);
    --shadow-md: 0 4px 12px rgb(15 23 42 / .08);
    --ring: 0 0 0 3px var(--brand-200);

    --font: "Figtree", system-ui, "Segoe UI", sans-serif;
    --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --page: 68rem;
    --gap: clamp(1rem, 3vw, 1.75rem);
  }

  /*
   * Light only, on purpose. The identity is ivory ground + ink bands + one
   * green; an auto dark theme turned the whole page into one dark block and
   * the ink hero stopped reading as a band at all (seen 2026-09-23). A proper
   * dark theme is its own design pass, not a token flip.
   */
  :root { color-scheme: light; }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
  body {
    margin: 0;
    background: var(--surface-2);
    color: var(--ink);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
    /* Full-bleed bands paint beyond their column; clip, so no page ever scrolls sideways
       (clip, not hidden: hidden would break the sticky header). */
    overflow-x: clip;
  }
  h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; letter-spacing: -.035em; margin: 0 0 .5rem; }
  h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
  h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); margin-top: 2.5rem; }
  h3 { font-size: 1.05rem; margin-top: 1.5rem; }
  p { margin: 0 0 1rem; }
  a { color: var(--brand-600); text-underline-offset: 2px; }
  a:hover { color: var(--brand-700); }
  code, pre, .mono { font-family: var(--mono); font-size: .9em; }
  :focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
  ::selection { background: var(--brand-100); color: var(--ink); }
  img, svg { max-width: 100%; height: auto; }
  /* The icon sprite must take no space, whatever a UA does with [hidden]. */
  .sprite, svg[hidden] { display: none !important; }
  /*
   * [hidden] is how our screens hide the parts that do not apply yet — the
   * "refunded" panel on an order that is still listening, for one. A class that
   * sets display (flex, grid) outranks the UA rule for the attribute, so those
   * blocks reappeared on /orders/{id} (seen 2026-09-24). This settles it once,
   * for every component, rather than per class.
   */
  [hidden] { display: none !important; }
}

@layer layout {
  /*
   * Phone first (2026-09-27): every rule below is the phone layout; min-width
   * queries add the tablet and desktop arrangement on top.
   */
  .site-header {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .2s ease;
  }
  .site-header.scrolled { box-shadow: 0 6px 20px -12px rgb(10 26 22 / .35); }
  .site-header > .bar, main, .site-footer > .cols, .site-footer > .fine, .footer-cta {
    max-width: var(--page); margin-inline: auto; padding-inline: var(--gap);
  }
  .site-header > .bar { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; }
  @media (min-width: 64rem) { .site-header > .bar { gap: 1.5rem; min-height: 4rem; } }

  main { padding-block: 1rem 3.5rem; }
  main.wide { max-width: 92rem; }
  main.full { max-width: none; padding: 0; }
  @media (min-width: 48rem) { main { padding-block: 1.5rem 4.5rem; } }

  /* --- footer ---------------------------------------------------------- */
  .site-footer {
    margin-top: 3rem; color: var(--on-night-2, #c4d3cc);
    background:
      radial-gradient(50rem 22rem at 90% -10%, rgb(11 163 107 / .28), transparent 65%),
      linear-gradient(170deg, #061310, #0a1a16 55%, #10231d);
  }
  main.full + .site-footer { margin-top: 0; }
  .footer-cta {
    display: grid; gap: 1.25rem; padding-block: 2.5rem 2rem;
    border-bottom: 1px solid rgb(255 255 255 / .1);
  }
  .footer-cta h2 { color: #fff; margin: 0 0 .4rem; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
  .footer-cta p { margin: 0; color: #c4d3cc; max-width: 34rem; }
  .footer-cta-actions { display: grid; gap: .6rem; }
  .footer-cta-actions .button { justify-content: center; padding: .85rem 1.3rem; }
  @media (min-width: 40rem) {
    .footer-cta-actions { display: flex; flex-wrap: wrap; }
  }
  @media (min-width: 56rem) {
    .footer-cta { grid-template-columns: 1fr auto; align-items: center; padding-block: 3rem 2.5rem; }
  }
  .site-footer > .cols {
    display: grid; gap: 2rem 1.5rem; padding-block: 2.25rem 1.5rem;
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
  @media (min-width: 56rem) {
    .site-footer > .cols { grid-template-columns: 1.6fr repeat(4, 1fr); padding-block: 3rem 2rem; }
    .footer-brand { grid-column: auto; }
  }
  .footer-brand p { margin: .75rem 0 1rem; font-size: .92rem; line-height: 1.6; max-width: 22rem; }
  .site-footer .footer-trust { display: flex; flex-wrap: wrap; gap: .4rem; }
  .footer-trust li {
    display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600;
    padding: .3rem .6rem; border-radius: 999px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12); color: #e6efe9;
  }
  .footer-trust .ico { width: .95rem; height: .95rem; color: var(--volt); }
  .site-footer h3 { font-family: var(--font); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #8fa79c; margin: 0 0 .8rem; }
  .site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
  .site-footer ul a { display: inline-block; padding: .3rem 0; color: #dfe8e3; text-decoration: none; font-size: .93rem; overflow-wrap: anywhere; }
  .site-footer a:hover { color: #fff; text-decoration: underline; }
  .site-footer > .fine {
    padding-block: 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); border-top: 1px solid rgb(255 255 255 / .1);
    color: #8fa79c; font-size: .82rem;
    display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  }
  .site-footer > .fine a { color: #c4d3cc; text-decoration: none; }
}

@layer components {
  /* --- brand + navigation --------------------------------------------- */
  .brand {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em;
    color: var(--ink); text-decoration: none;
  }
  .brand .mark { width: 1.75rem; height: 1.75rem; flex: none; }
  .nav { display: flex; flex-wrap: wrap; gap: .25rem; margin-inline-end: auto; }
  .nav a {
    color: var(--ink-2); text-decoration: none; font-weight: 500;
    padding: .4rem .7rem; border-radius: var(--radius-sm);
  }
  .nav a:hover { background: var(--surface-3); color: var(--ink); }
  .nav a[aria-current] { color: var(--brand-700); background: var(--brand-50); }
  .site-header .nav { flex-wrap: nowrap; gap: .1rem; }
  /* Phone first: the header shows brand + call to action + menu button; the
     full navigation appears from 64rem. (Here, not in the layout layer: the
     components layer wins over it whatever the specificity.) */
  .site-header > .bar .nav { display: none; }
  .site-header > .bar .header-actions { margin-inline-start: auto; }
  .site-header .header-actions .button { white-space: nowrap; }
  @media (max-width: 22.5rem) {
    .site-header > .bar { gap: .5rem; }
    .site-header .brand { font-size: 1rem; gap: .4rem; }
    .site-header .brand .mark { width: 1.5rem; height: 1.5rem; }
    .site-header .header-actions .button { padding-inline: .6rem; }
  }
  .hide-mobile { display: none !important; }
  @media (min-width: 40rem) { .hide-mobile { display: inline-flex !important; } }
  @media (min-width: 64rem) {
    .site-header > .bar .nav { display: flex; margin-inline-end: auto; }
    .site-header > .bar .header-actions { margin-inline-start: 0; }
    .menu-toggle { display: none !important; }
  }
  .site-header .nav > a, .site-header .mega-link { font-size: .95rem; white-space: nowrap; }

  .skip-link {
    position: absolute; left: .75rem; top: -3rem; z-index: 100; padding: .6rem 1rem; border-radius: var(--radius-sm);
    background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; transition: top .15s ease;
  }
  .skip-link:focus { top: .75rem; color: #fff; }

  /* --- phone menu ---------------------------------------------------------- */
  .menu-toggle {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-inline-end: -.4rem;
    border-radius: 12px; color: var(--ink); text-decoration: none;
  }
  .menu-toggle:hover, .menu-toggle[aria-expanded="true"] { background: var(--surface-3); color: var(--ink); }
  .menu-toggle .ico { width: 1.5rem; height: 1.5rem; }

  .drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; pointer-events: none; }
  .drawer.open, .drawer:target { visibility: visible; pointer-events: auto; }
  .drawer-scrim {
    position: absolute; inset: 0; background: rgb(6 19 16 / .55); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .22s ease;
  }
  .drawer-panel {
    position: absolute; inset: 0 0 0 auto; width: min(24rem, 100%);
    display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; overscroll-behavior: contain;
    padding: .6rem var(--gap) calc(1.25rem + env(safe-area-inset-bottom));
    background: var(--surface); box-shadow: -24px 0 48px -24px rgb(0 0 0 / .45);
    transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  }
  .drawer.open .drawer-scrim, .drawer:target .drawer-scrim { opacity: 1; }
  .drawer.open .drawer-panel, .drawer:target .drawer-panel { transform: none; }
  html.menu-open, html.menu-open body { overflow: hidden; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 2.9rem; }
  .menu-close {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-inline-end: -.4rem;
    border-radius: 12px; color: var(--ink); background: var(--surface-3);
  }
  .menu-close .ico { width: 1.35rem; height: 1.35rem; }
  .drawer-nav { display: grid; gap: .15rem; }
  .drawer-nav a {
    display: flex; align-items: center; gap: .85rem; padding: .65rem .5rem; border-radius: 12px;
    color: var(--ink); text-decoration: none;
  }
  .drawer-nav a:hover, .drawer-nav a:focus-visible { background: var(--surface-2); color: var(--ink); }
  .drawer-nav b { display: block; font-size: 1rem; font-weight: 700; }
  .drawer-nav small { display: block; color: var(--muted); font-size: .82rem; }
  .drawer-ico {
    flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px;
    background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-600);
  }
  .drawer-ico .ico { width: 1.2rem; height: 1.2rem; }
  .drawer-label { margin: .5rem 0 0; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .drawer-apps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
  .drawer-apps a {
    display: inline-block; padding: .45rem .8rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
    border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none; background: var(--surface);
  }
  .drawer-apps a:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
  .drawer-groups { flex: none; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
  .drawer-group + .drawer-group { border-top: 1px solid var(--line); }
  .drawer-group summary {
    display: flex; align-items: center; gap: .65rem; padding: .75rem .85rem;
    font-weight: 700; font-size: .95rem; cursor: pointer; list-style: none;
  }
  .drawer-group summary::-webkit-details-marker { display: none; }
  .drawer-group summary .ico { width: 1.1rem; height: 1.1rem; color: var(--brand-600); flex: none; }
  .drawer-group summary span { flex: 1; }
  .drawer-group summary small { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
  .drawer-group summary::after {
    content: ""; width: .5rem; height: .5rem; flex: none; margin-inline-start: .25rem;
    border-inline-end: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px); transition: transform .15s ease;
  }
  .drawer-group[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .drawer-group[open] summary { background: var(--surface-2); }
  .drawer-group .drawer-apps { padding: .7rem .85rem .85rem; }
  .drawer-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; text-decoration: none; }
  .drawer-more .ico { width: 1rem; height: 1rem; }
  .drawer-user {
    display: flex; align-items: center; gap: .75rem; padding: .75rem .8rem; border-radius: 16px;
    background: linear-gradient(145deg, var(--brand-50), var(--surface-2)); border: 1px solid var(--brand-200);
    color: var(--ink); text-decoration: none;
  }
  .drawer-user:hover { color: var(--ink); border-color: var(--brand-500); }
  .drawer-avatar {
    flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: linear-gradient(145deg, #12b87a, #08734c); color: #fff; font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  }
  .drawer-user-text { display: grid; min-width: 0; }
  .drawer-user-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .95rem; }
  .drawer-user-text small { color: var(--muted); font-size: .8rem; }
  .drawer-nav a[aria-current] { background: var(--brand-50); }
  .drawer-nav a[aria-current] b { color: var(--brand-700); }
  .drawer-badge { margin-inline-start: auto; min-width: 1.4rem; padding: .1rem .45rem; border-radius: 999px; background: #e5484d; color: #fff; font-size: .72rem; text-align: center; }
  .drawer-logout { width: 100%; color: var(--bad) !important; }
  .drawer-cta { display: grid; gap: .55rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
  .drawer-cta .button { justify-content: center; padding: .85rem 1rem; }
  .drawer-fine { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .8rem; color: var(--muted); }
  .drawer-fine .ico { width: 1rem; height: 1rem; color: var(--brand-600); }
  @media (prefers-reduced-motion: reduce) { .drawer-panel, .drawer-scrim { transition: none; } }

  /* --- page head: the band every public sub page opens with ---------------- */
  /*
   * Full-bleed without 100vw (which overflows by the scrollbar): the colour is
   * a box-shadow spread sideways and clipped to the band's own height.
   */
  .page-head, .site main:not(.full) > .crumbs {
    position: relative; background: #0b1c17; color: #c4d3cc;
    box-shadow: 0 0 0 100vmax #0b1c17; clip-path: inset(0 -100vmax);
  }
  .page-head { margin: -1px 0 1.75rem; padding: .25rem 0 2rem; isolation: isolate; }
  /* Glow and grid on a full-width layer, so they are not cut at the column edge. */
  .page-head::before {
    content: ""; position: absolute; z-index: -1; inset: -4rem calc(50% - 50vw) 0; pointer-events: none;
    background:
      radial-gradient(38rem 20rem at calc(50% + 22rem) 0%, rgb(11 163 107 / .42), transparent 70%),
      linear-gradient(rgb(255 255 255 / .035) 1px, transparent 1px) 0 0 / 56px 56px,
      linear-gradient(90deg, rgb(255 255 255 / .035) 1px, transparent 1px) 0 0 / 56px 56px;
    mask-image: linear-gradient(to bottom, #000 40%, transparent);
  }
  .site main:not(.full) > .crumbs { margin: -1rem 0 0; padding: 1rem 0 .75rem; }
  .site main:not(.full) > .crumbs + .page-head { padding-top: .5rem; }
  @media (min-width: 48rem) {
    .site main:not(.full) > .crumbs { margin-top: -1.5rem; padding-top: 1.25rem; }
    .page-head { padding-bottom: 2.75rem; margin-bottom: 2.25rem; }
  }
  .page-head h1 { color: #fff; margin: 0 0 .6rem; max-width: 24ch; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.9rem); letter-spacing: -.04em; }
  .page-head .lead { color: #c4d3cc; margin: 0; max-width: 42rem; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
  .page-head .eyebrow-dark {
    display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .9rem;
    font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--volt); background: rgb(214 242 75 / .1); border: 1px solid rgb(214 242 75 / .32); border-radius: 999px; padding: .28rem .7rem;
  }
  .page-head .eyebrow-dark .ico { width: 1rem; height: 1rem; }
  .page-head-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
  .page-head-actions .button { padding: .8rem 1.3rem; }
  .page-head-actions .button.on-dark, .page-head .button.on-dark { background: rgb(255 255 255 / .07); color: #f6f4ef; border-color: rgb(255 255 255 / .24); }
  .page-head-actions .button.on-dark:hover { background: rgb(255 255 255 / .15); color: #fff; }
  @media (max-width: 39.99rem) { .page-head-actions .button { flex: 1 1 100%; } }
  .head-facts { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
  .head-facts li {
    display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 600; color: #e6efe9;
    padding: .35rem .7rem; border-radius: 999px; background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12);
  }
  .head-facts .ico { width: 1rem; height: 1rem; color: #2fd08f; }
  .head-facts b { font-family: var(--mono); color: #fff; }
  /* --- Apps dropdown ---------------------------------------------------- */
  /* Hidden by visibility rather than display: hover has to be able to open it,
     and [hidden] is display:none !important everywhere. */
  .mega-item { display: flex; align-items: center; position: relative; }
  .mega-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.5rem; height: 1.5rem; padding: 0; flex: none; margin-inline-start: -.35rem;
    border: 0; background: none; color: var(--ink-2); cursor: pointer;
    border-radius: var(--radius-sm);
  }
  .mega-toggle:hover { background: var(--surface-3); color: var(--ink); }
  .mega-toggle svg { transition: transform .15s ease; }
  .mega-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  /* A card under the item: group tabs on the left, the open group's apps on
     the right. Every written article is in it; /services/ is the catalogue. */
  .mega {
    position: absolute; top: calc(100% + .5rem); inset-inline-start: -.5rem;
    visibility: hidden; opacity: 0; transform: translateY(-.25rem);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
    display: grid; grid-template-columns: 16rem minmax(0, 1fr);
    width: min(58rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 6rem)); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: 0 1.25rem 2rem -1rem rgb(0 0 0 / 22%);
    z-index: 30;
  }
  .mega-tabs {
    display: flex; flex-direction: column; gap: .15rem; padding: .7rem;
    background: var(--surface-2); border-inline-end: 1px solid var(--line); overflow-y: auto;
  }
  .mega-tab {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    padding: .55rem .65rem; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 600;
    text-align: start; cursor: pointer;
  }
  .mega-tab .ico { width: 1.05rem; height: 1.05rem; flex: none; color: var(--brand-600); }
  .mega-tab span { flex: 1; white-space: nowrap; }
  .mega-tab small {
    font-family: var(--mono); font-size: .72rem; font-weight: 600; color: var(--muted);
    padding: .05rem .4rem; border-radius: 999px; background: var(--surface);
  }
  .mega-tab:hover { background: var(--surface); color: var(--ink); }
  .mega-tab[aria-selected="true"] { background: var(--surface); color: var(--brand-700); box-shadow: 0 1px 0 var(--line), inset 3px 0 0 var(--brand-600); }
  .mega-tab:focus-visible { outline: 2px solid var(--brand-600); outline-offset: -2px; }
  .mega-panes { display: flex; flex-direction: column; min-height: 0; padding: .9rem 1.1rem .7rem; overflow-y: auto; }
  .mega-pane-head {
    margin: 0 0 .5rem .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--muted);
  }
  .mega-pane + .mega-pane { margin-top: .75rem; }
  .mega[data-tabs] .mega-pane + .mega-pane { margin-top: 0; }
  .mega-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin: auto 0 0; padding-top: .6rem; border-top: 1px solid var(--line);
    font-size: .8rem; color: var(--muted);
  }
  .mega-toggle[aria-expanded="true"] + .mega { visibility: visible; opacity: 1; transform: none; }
  /* Hover opens it only where hovering means something; on touch the hover state
     sticks after the tap and the card will not close again. */
  @media (hover: hover) and (pointer: fine) {
    .mega-item:hover > .mega { visibility: visible; opacity: 1; transform: none; }
  }
  .mega-list {
    list-style: none; margin: 0 0 .6rem; padding: 0;
    columns: 4; column-gap: 1rem;
  }
  .mega-list a {
    display: block; padding: .2rem .4rem; border-radius: var(--radius-sm);
    color: var(--ink-2); text-decoration: none; font-size: .88rem; white-space: nowrap;
  }
  .mega-list a:hover { background: var(--brand-50); color: var(--brand-700); }
  .mega-all { color: var(--brand-700); text-decoration: none; font-weight: 600; font-size: .85rem; white-space: nowrap; }
  .mega-all:hover { text-decoration: underline; }
  @media (prefers-reduced-motion: reduce) {
    .mega, .mega-toggle svg { transition: none; }
  }
  /* Narrow screens: anchor the card to the header instead of the item, and drop
     to two columns — five would not fit. */
  @media (max-width: 52rem) {
    .mega-item { position: static; }
    .mega { inset-inline: var(--gap); width: auto; max-width: none; max-height: calc(100vh - 9rem); grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
    .mega-tabs { flex-direction: row; overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .mega-tab { width: auto; white-space: nowrap; }
    .mega-tab[aria-selected="true"] { box-shadow: 0 1px 0 var(--line), inset 0 -3px 0 var(--brand-600); }
    .mega-list { columns: 2; column-gap: 1rem; }
  }

  .header-actions { display: flex; align-items: center; gap: .5rem; }
  .crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 1rem; overflow-wrap: anywhere; }
  .crumbs a { color: var(--muted); text-decoration: none; }
  .crumbs a:hover { color: var(--brand-600); text-decoration: underline; }
  .crumbs .sep { opacity: .5; margin-inline: .15rem; }
  .site main:not(.full) > .crumbs, .site main:not(.full) > .crumbs a { color: #8fa79c; }
  .site main:not(.full) > .crumbs a:hover { color: #fff; }
  .site main:not(.full) > .crumbs [aria-current] { color: #dfe8e3; }

  /* --- buttons --------------------------------------------------------- */
  .button, button {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    font: inherit; font-weight: 600; line-height: 1.2;
    padding: .7rem 1.15rem; border: 1px solid transparent; border-radius: var(--radius-sm);
    background: var(--brand-500); color: #fff; text-decoration: none; cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .05s ease;
  }
  .button:hover, button:hover { background: var(--brand-600); color: #fff; }
  .button:active, button:active { transform: translateY(1px); }
  .button.secondary, button.secondary {
    background: var(--surface); color: var(--brand-700); border-color: var(--line-2);
  }
  .button.secondary:hover, button.secondary:hover { background: var(--surface-3); color: var(--brand-700); }
  .button.ghost, button.ghost { background: none; color: var(--ink-2); }
  .button.ghost:hover, button.ghost:hover { background: var(--surface-3); color: var(--ink); }
  .button.small, button.small { padding: .4rem .7rem; font-size: .875rem; }
  button.link { background: none; color: var(--brand-600); padding: 0; font-weight: 500; border: 0; }
  button[disabled] { opacity: .5; cursor: not-allowed; }

  /* --- cards, panels, notices ------------------------------------------ */
  .card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
  }
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
  .notice {
    background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand-500);
    border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 1.25rem 0;
  }
  .alert { background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); border-radius: var(--radius-sm); padding: .75rem 1rem; }
  .alert-text { color: var(--bad); font-weight: 600; }

  /* --- hero + stats ---------------------------------------------------- */
  .hero { padding: 2.5rem 0 1rem; max-width: 46rem; }
  .hero .lead { font-size: 1.15rem; color: var(--ink-2); margin-bottom: 1.5rem; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
  .lead { color: var(--ink-2); font-size: 1.05rem; max-width: 46rem; }
  .facts { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin: 1.5rem 0; }
  .facts > div {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .9rem 1rem; display: grid; gap: .15rem; box-shadow: var(--shadow-sm);
  }
  .facts.value-props { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .facts.value-props strong { font-size: 1.1rem; }
  .facts.value-props span { line-height: 1.5; }
  .facts strong { font-family: var(--display); font-size: 1.6rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .facts span { color: var(--muted); font-size: .85rem; }

  /* --- tables ---------------------------------------------------------- */
  .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
  .offers, .ledger { border-collapse: collapse; width: 100%; font-size: .95rem; }
  .offers th, .ledger th {
    text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); font-weight: 600; padding: .7rem .9rem; background: var(--surface-2);
    border-bottom: 1px solid var(--line); white-space: nowrap;
  }
  .offers td, .ledger td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .offers tr:last-child td, .ledger tr:last-child td { border-bottom: 0; }
  .offers tbody tr:hover { background: var(--surface-2); }
  .offers td:has(strong), .num { font-variant-numeric: tabular-nums; }
  .offers a { font-weight: 500; text-decoration: none; }
  .offers a:hover { text-decoration: underline; }
  /* Phones: each row becomes a card — name on top, the figures under it with
     their column name, the Buy button on the right. No sideways scrolling. */
  @media (max-width: 39.99rem) {
    .table-wrap:has(> .offers) { overflow: visible; border: 0; background: none; box-shadow: none; }
    .offers thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .offers, .offers tbody { display: block; }
    .offers tr {
      display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .9rem; align-items: center;
      padding: .8rem .95rem; margin-bottom: .55rem; background: var(--surface);
      border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm);
    }
    .offers tbody tr:hover { background: var(--surface); }
    .offers td { display: block; padding: 0; border: 0 !important; grid-column: 1; font-size: .9rem; }
    .offers td:first-child { font-size: 1.02rem; }
    .offers td:first-child a { font-weight: 700; }
    .offers td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-size: .78rem; font-weight: 600; font-family: var(--font); }
    .offers td:has(> .button) { grid-column: 2; grid-row: 1 / span 4; }
    .offers td:has(> .button) .button { padding: .6rem 1.1rem; }
  }

  /* --- tiles + lists ---------------------------------------------------- */
  .grid { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
  .tile {
    display: grid; gap: .15rem; padding: .85rem 1rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
  }
  .tile:hover { border-color: var(--brand-200); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--ink); }
  .tile .small { color: var(--muted); font-weight: 400; font-size: .8rem; }
  .numbers .tile { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
  .inline-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
  .inline-list a { text-decoration: none; }
  .inline-list a:hover { text-decoration: underline; }
  .steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
  .steps li::marker { color: var(--brand-500); font-weight: 700; }

  /* --- badges ----------------------------------------------------------- */
  .pill, .badge {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px;
    background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200);
  }
  .badge.ok { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
  .badge.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
  .badge.bad { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
  .badge.neutral { background: var(--surface-3); color: var(--muted); border-color: var(--line); }

  /* --- forms ------------------------------------------------------------ */
  .stack { display: grid; gap: 1rem; }
  .stack label, .field { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
  input[type=email], input[type=password], input[type=text], input[type=number], input[type=search], select {
    font: inherit; font-weight: 400; padding: .65rem .8rem;
    border: 1px solid var(--line-2); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink); width: 100%;
  }
  input:focus, select:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
  .auth { max-width: 26rem; margin-inline: auto; }
  .auth .panel { padding: 1.5rem; }
  .radio { display: flex !important; gap: .55rem; align-items: center; font-weight: 400 !important; }
  fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
  legend { font-weight: 600; padding-inline: .35rem; }
  .row-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
  .row-form input, .row-form select { width: auto; }
  .row-form input[type=number] { width: 7rem; }
  .narrow { max-width: 32rem; }
  .admin-actions { display: grid; gap: .5rem; margin: 1.25rem 0; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

  /* --- order + inbox ----------------------------------------------------- */
  .phone { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
  .code {
    font-family: var(--mono); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); font-weight: 700;
    letter-spacing: .14em; color: var(--brand-600); margin: .3rem 0;
  }
  .phone, .num, .offers td:has(strong) { font-family: var(--mono); font-variant-numeric: tabular-nums; }
  .sms { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand-500); border-radius: var(--radius-sm); padding: .8rem 1rem; margin: .7rem 0; box-shadow: var(--shadow-sm); }
  .inbox { min-height: 6rem; display: grid; gap: .1rem; }
  .inbox .sms p { margin: .2rem 0; overflow-wrap: anywhere; }
  .status-received { color: var(--ok); font-weight: 600; }
  .order { max-width: 44rem; }
  .order-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1rem; }
  .order-panel { padding: 1.5rem; }
  .order-number { padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
  .order-number .phone { margin: .2rem 0 0; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
  .order #status { margin-bottom: .5rem; }
  .actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1.25rem; }
  .balance strong { font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .balance p { margin: 0; }
  .balance-panel { padding: 1.25rem 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
  .account { max-width: 48rem; }

  /* --- misc -------------------------------------------------------------- */
  .facts-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 1rem 0; }
  .facts-list dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
  .facts-list dd { margin: 0; }
  @media (max-width: 39.99rem) {
    .facts-list { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
    .facts-list dd { margin-bottom: .8rem; }
  }
  details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
  details summary { cursor: pointer; font-weight: 600; }
  details[open] summary { margin-bottom: .5rem; }
  /* The article column is 46rem, but its page head spans the page: the head
     must sit in the centred main column for its full-width layer to line up. */
  .guide > :not(.page-head) { max-width: 46rem; }
  .guide h2 { margin-top: 2.25rem; }
  .guide p, .guide li { color: var(--ink-2); line-height: 1.7; }
  .guide ul, .guide ol { padding-left: 1.2rem; display: grid; gap: .35rem; }
  .guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
  @media (min-width: 48rem) { .guide-list { grid-template-columns: 1fr 1fr; gap: 1rem; } }
  .guide-card {
    display: flex; gap: .9rem; align-items: flex-start; height: 100%; padding: 1.1rem 1.15rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
    color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  }
  .guide-card:hover { border-color: var(--brand-200); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
  .guide-ico {
    flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px;
    background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-600);
  }
  .guide-ico .ico { width: 1.25rem; height: 1.25rem; }
  .guide-text { display: grid; gap: .3rem; margin-inline-end: auto; }
  .guide-text b { font-size: 1.05rem; line-height: 1.35; }
  .guide-text span { color: var(--muted); font-size: .9rem; line-height: 1.5; }
  .guide-go { flex: none; width: 1.1rem; height: 1.1rem; color: var(--brand-600); margin-top: .25rem; }

  .list-filter {
    display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; max-width: 30rem;
    border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 .9rem; background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .list-filter:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
  .list-filter .ico { width: 1.1rem; height: 1.1rem; color: var(--muted); }
  .list-filter input { border: 0; padding: .8rem 0; background: none; box-shadow: none; font-size: 1rem; }
  .list-filter input:focus { box-shadow: none; }
  .page-phone { font-family: var(--mono) !important; letter-spacing: .01em !important; overflow-wrap: anywhere; }
  .error-page { text-align: center; padding-block: 3rem; }
  .error-page h1 { font-size: clamp(3rem, 2rem + 5vw, 5rem); color: var(--brand-500); margin-bottom: .25rem; }
  .debug { overflow-x: auto; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .8rem; }
  .admin .facts { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
}

@layer utilities {
  .muted { color: var(--muted); }
  .small { font-size: .85rem; }
  .center { text-align: center; }
  .mt-0 { margin-top: 0; }
  .mt-2 { margin-top: 2rem; }
  .visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}

@layer components {
  /* --- public offer page (/buy/{app}) ---------------------------------- */
  .buy-hero { margin-bottom: 1.5rem; }
  .buy-hero h1 { letter-spacing: -.03em; }
  .buy-facts {
    list-style: none; margin: 1.1rem 0 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: .5rem .75rem; font-size: .9rem; color: var(--ink-2);
  }
  .buy-facts li {
    display: inline-flex; align-items: center; gap: .45rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .8rem;
  }
  .buy-facts .ico { width: 1rem; height: 1rem; color: var(--brand-600); }

  .offer-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
  .offer {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; display: grid; gap: .7rem; align-content: start;
    transition: border-color .15s ease, transform .12s ease;
  }
  .offer:hover { border-color: var(--brand-200); transform: translateY(-1px); }
  .offer header { display: flex; align-items: center; gap: .7rem; }
  .offer-iso {
    flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--line);
    font-family: var(--mono); font-size: .78rem; font-weight: 800; color: var(--ink-2);
  }
  .offer-where { display: grid; min-width: 0; margin-inline-end: auto; }
  .offer-where b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .offer-price { font-family: var(--mono); font-size: 1.1rem; font-weight: 800; }
  .offer-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
  .offer .button.full-width, .full-width { width: 100%; justify-content: center; }
  .offer-foot { margin-top: 1rem; }

  .empty-offer { padding: 1.5rem; max-width: 40rem; }
  .buy-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
  .buy-cta {
    margin-top: 2rem; padding: 1.5rem; border-radius: var(--radius);
    background: var(--brand-50); border: 1px solid var(--brand-200);
    display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
  }
  .buy-cta p { margin: .3rem 0 0; color: var(--ink-2); max-width: 34rem; }
  .buy-cta .buy-actions { margin: 0; }
}

@layer components {
  /* --- app hub editorial blocks (doc 20 §3) ---------------------------- */
  .app-facts {
    display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    margin: 1.25rem 0 1.5rem; padding: 0;
  }
  .app-facts div {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem;
  }
  .app-facts dt { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .app-facts dd { margin: .2rem 0 0; font-weight: 600; }
  .app-hero {
    display: block; width: 100%; height: auto; margin: 1.25rem 0 1.5rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  }
  .app-causes { display: grid; gap: .6rem; padding-left: 1.2rem; }
  .app-causes li { line-height: 1.6; }
  .app-causes strong { color: var(--ink); }
}

@layer components {
  /* --- reference article components (doc 21 §J1) ------------------------ */
  .quick-answer {
    margin: 1.5rem 0; padding: 1.1rem 1.25rem; border-radius: var(--radius);
    background: var(--brand-50); border: 1px solid var(--brand-200);
  }
  .quick-answer h2 { margin: 0 0 .35rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-700); }
  .quick-answer p { margin: 0; font-size: 1.05rem; line-height: 1.6; }

  .toc { margin: 1.5rem 0; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .toc h2 { margin: 0 0 .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
  .toc ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; column-gap: 1.5rem; }
  @media (min-width: 46rem) { .toc ol { grid-template-columns: 1fr 1fr; } }
  .toc a { text-decoration: none; }
  .toc a:hover { text-decoration: underline; }

  .takeaways { margin: 1.25rem 0; padding: 1rem 1.25rem; border-left: 3px solid var(--brand-500); background: var(--surface-2); border-radius: 0 12px 12px 0; }
  .takeaways h3 { margin: 0 0 .4rem; font-size: 1rem; }
  .takeaways ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }

  .app-figure { margin: 1.5rem 0; }
  .app-figure img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
  .app-figure figcaption { margin-top: .5rem; font-size: .85rem; color: var(--muted); }
  .app-figure .credit { display: inline-block; margin-left: .35rem; opacity: .85; }

  .decision-tree { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: .6rem; counter-reset: dt; }
  .decision-tree li {
    position: relative; padding: .85rem 1rem .85rem 2.6rem; border: 1px solid var(--line);
    border-radius: 12px; background: var(--surface); display: grid; gap: .3rem;
  }
  .decision-tree li::before {
    counter-increment: dt; content: counter(dt);
    position: absolute; left: .85rem; top: .9rem; width: 1.4rem; height: 1.4rem; border-radius: 999px;
    display: grid; place-items: center; background: var(--brand-50); border: 1px solid var(--brand-200);
    color: var(--brand-700); font-size: .72rem; font-weight: 800;
  }
  .dt-q { font-weight: 700; }
  .dt-a { font-size: .92rem; color: var(--ink-2); }
  .dt-a b { display: inline-block; min-width: 2.4rem; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
  .dt-a.yes b { color: var(--ok); }
  .dt-a.no b { color: var(--warn); }

  .checklist { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .45rem; }
  .checklist li { position: relative; padding-left: 1.9rem; }
  .checklist li::before {
    content: ""; position: absolute; left: 0; top: .15rem; width: 1.15rem; height: 1.15rem;
    border: 2px solid var(--brand-500); border-radius: 5px;
  }

  .steps { display: grid; gap: .5rem; padding-left: 1.2rem; }
  .steps li { line-height: 1.6; }
  .setup-cols { display: grid; gap: 1.5rem; }
  @media (min-width: 46rem) { .setup-cols { grid-template-columns: 1fr 1fr; } }

  .compare th { white-space: nowrap; }
  .compare td { vertical-align: top; }
  .sources { margin: 2rem 0 0; padding: 1rem 1.25rem; border: 1px dashed var(--line-2); border-radius: var(--radius); }
  .sources h2 { margin: 0 0 .5rem; font-size: 1rem; }
  .sources ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
  .verified-line { margin-top: 1.5rem; }
}

@layer components {
  /* Dark-ground overrides for the footer. They live in this layer on purpose:
     .brand and .button are components, and a layout-layer rule never beats them. */
  .site-footer .brand { color: #fff; }
  .site-footer .button.on-dark { background: rgb(255 255 255 / .07); color: #f6f4ef; border-color: rgb(255 255 255 / .24); }
  .site-footer .button.on-dark:hover { background: rgb(255 255 255 / .15); color: #fff; }
}

/*
 * App shell (2026-09-27): on a phone the site behaves like an installed app —
 * a bottom tab bar, an install sheet, native-feeling taps, cross-page
 * transitions — and, once installed (html.standalone), a back button and
 * safe-area padding instead of browser chrome.
 */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

@layer components {
  html { -webkit-tap-highlight-color: transparent; }
  .site-header { view-transition-name: appbar; padding-top: env(safe-area-inset-top); }
  .app-tabs, .panel-tabs { view-transition-name: tabbar; }
  .site-header > .bar { padding-inline: max(var(--gap), env(safe-area-inset-left)) max(var(--gap), env(safe-area-inset-right)); }

  @media (pointer: coarse) {
    a, button, .button, summary, label { touch-action: manipulation; }
    .button:active, .tile:active, .chip:active, .guide-card:active, .feature-card:active,
    .offers tr:active, .drawer-nav a:active, .svc:active, .ctry:active { transform: scale(.975); transition-duration: .06s; }
    .app-tabs a, .panel-tabs a, .drawer-nav, .menu-toggle { -webkit-user-select: none; user-select: none; }
  }

  /* --- bottom tab bar (public pages; the panel has its own) --------------- */
  .app-tabs {
    position: fixed; inset: auto 0 0 0; z-index: 35;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: .35rem max(.25rem, env(safe-area-inset-left)) calc(.35rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-right));
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgb(10 26 22 / .35);
  }
  .app-tabs a {
    position: relative; display: grid; justify-items: center; gap: .12rem; padding: .4rem .15rem .3rem;
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 700; letter-spacing: .01em; border-radius: 12px;
  }
  .app-tabs .ico { width: 1.4rem; height: 1.4rem; transition: transform .15s ease; }
  .app-tabs a[aria-current] { color: var(--brand-700); }
  .app-tabs a[aria-current]::before {
    content: ""; position: absolute; top: .15rem; left: 50%; translate: -50% 0; width: 3.2rem; height: 1.9rem; border-radius: 999px;
    background: var(--brand-50); z-index: -1;
  }
  .app-tabs a:active .ico { transform: scale(.9); }
  body.site { padding-bottom: calc(4.1rem + env(safe-area-inset-bottom)); }
  @media (min-width: 64rem) {
    .app-tabs { display: none; }
    body.site { padding-bottom: 0; }
  }

  /* --- app bar back button (installed app only) --------------------------- */
  .appbar-back {
    display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; margin-inline-start: -.5rem; flex: none;
    border-radius: 12px; background: none; color: var(--ink); border: 0;
  }
  .appbar-back:hover { background: var(--surface-3); color: var(--ink); }
  .appbar-back .ico { width: 1.4rem; height: 1.4rem; }
  .appbar-back:not([hidden]) + .brand span { display: none; }

  /* --- install sheet ------------------------------------------------------- */
  .install-sheet { position: fixed; inset: 0; z-index: 95; display: grid; align-items: end; }
  .install-scrim { position: absolute; inset: 0; background: rgb(6 19 16 / .5); opacity: 0; transition: opacity .25s ease; }
  .install-card {
    position: relative; margin: 0 auto; width: min(32rem, 100%);
    padding: .6rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -20px 50px -20px rgb(0 0 0 / .45);
    transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    display: grid; gap: 1rem;
  }
  .install-sheet.open .install-scrim { opacity: 1; }
  .install-sheet.open .install-card { transform: none; }
  .install-grip { justify-self: center; width: 2.5rem; height: .3rem; border-radius: 999px; background: var(--line-2); }
  .install-head { display: flex; gap: .9rem; align-items: center; }
  .install-icon { width: 3.5rem; height: 3.5rem; border-radius: 16px; box-shadow: 0 8px 20px -10px rgb(11 163 107 / .8); flex: none; }
  .install-head h2 { margin: 0 0 .15rem; font-size: 1.2rem; }
  .install-head p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
  .install-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
  .install-points li { display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: var(--ink-2); }
  .install-points .ico { width: 1.15rem; height: 1.15rem; color: var(--brand-600); }
  .install-ios { margin: 0; padding: .85rem 1rem .85rem 2.2rem; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: .45rem; font-size: .92rem; }
  .install-key { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 700; }
  .install-key .ico { width: 1rem; height: 1rem; color: #0a84ff; }
  .install-other { margin: 0; font-size: .92rem; color: var(--ink-2); }
  .install-actions { display: grid; gap: .5rem; }
  .install-actions .button { justify-content: center; padding: .85rem 1rem; }
  @media (prefers-reduced-motion: reduce) { .install-card, .install-scrim { transition: none; } }

  .drawer-install {
    display: flex; align-items: center; gap: .6rem; width: 100%; padding: .8rem .9rem; border-radius: 14px;
    background: var(--brand-50); border: 1px solid var(--brand-200); color: var(--brand-700); font-weight: 700;
  }
  .drawer-install:hover { background: var(--brand-100); color: var(--brand-700); }
  .drawer-install .ico { width: 1.2rem; height: 1.2rem; }
  .footer-install { background: none; border: 0; padding: .3rem 0; color: #dfe8e3; font: inherit; font-size: .93rem; font-weight: 400; cursor: pointer; }
  .footer-install:hover { background: none; color: #fff; text-decoration: underline; }

  /* --- signed-in visitor (html.member, set by member.js from the fso_app flag) -- */
  html:not(.member) .member-only { display: none !important; }
  html.member .guest-only { display: none !important; }

  /* --- the signed-in app's tab bar (panel, and public pages for members) ---- */
  .panel-tabs { display: none; }
  @media (max-width: 63.99rem) {
    .panel-tabs {
      position: fixed; inset: auto 0 0 0; z-index: 35;
      display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
      padding: .3rem max(.25rem, env(safe-area-inset-left)) calc(.35rem + env(safe-area-inset-bottom)) max(.25rem, env(safe-area-inset-right));
      background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px);
      border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgb(10 26 22 / .35);
    }
    html:not(.member) .panel-tabs.member-tabs { display: none; }
    html.member body.site { padding-bottom: calc(4.3rem + env(safe-area-inset-bottom)); }
  }
  .panel-tabs a {
    position: relative; display: grid; justify-items: center; gap: .1rem; padding: .35rem .1rem .25rem;
    color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 700; border-radius: 12px;
  }
  .panel-tabs .tab-ico { position: relative; display: grid; place-items: center; width: 3.1rem; height: 1.85rem; border-radius: 999px; transition: background .15s ease; }
  .panel-tabs .ico { width: 1.4rem; height: 1.4rem; }
  .panel-tabs a[aria-current] { color: var(--brand-700); }
  .panel-tabs a[aria-current] .tab-ico { background: var(--brand-50); }
  .panel-tabs .tab-buy .tab-ico {
    width: 3.3rem; height: 3.3rem; margin-top: -1.35rem; border-radius: 18px;
    background: linear-gradient(145deg, #12b87a, #0ba36b 55%, #08734c); color: #fff;
    box-shadow: 0 10px 22px -10px rgb(11 163 107 / .95), 0 0 0 4px var(--surface);
  }
  .panel-tabs .tab-buy .ico { width: 1.6rem; height: 1.6rem; }
  .panel-tabs .tab-buy { color: var(--ink-2); }
  .panel-tabs .tab-buy[aria-current] .tab-ico { background: linear-gradient(145deg, #0ba36b, #065f3e); }
  .panel-tabs a:active .tab-ico { transform: scale(.92); }
  .tab-badge {
    position: absolute; top: -.1rem; right: .35rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem;
    display: grid; place-items: center; border-radius: 999px; font-size: .62rem; font-weight: 800; line-height: 1;
    background: #e5484d; color: #fff; box-shadow: 0 0 0 2px var(--surface);
  }

  /* --- toast -------------------------------------------------------------- */
  .toast {
    position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 96; translate: -50% 1rem;
    max-width: min(24rem, calc(100vw - 2rem)); padding: .7rem 1.1rem; border-radius: 14px;
    background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem; box-shadow: 0 16px 36px -16px rgb(0 0 0 / .6);
    opacity: 0; transition: opacity .2s ease, translate .2s ease; pointer-events: none;
  }
  .toast.show { opacity: 1; translate: -50% 0; }
  @media (min-width: 64rem) { .toast { bottom: 2rem; } }

  /* --- pull to refresh (installed app) ------------------------------------ */
  .ptr {
    position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + .5rem); z-index: 60; translate: -50% -3.5rem;
    width: 2.4rem; height: 2.4rem; border-radius: 999px; display: grid; place-items: center;
    background: var(--surface); box-shadow: 0 6px 18px -8px rgb(0 0 0 / .45); color: var(--brand-600);
  }
  .ptr .ico { width: 1.3rem; height: 1.3rem; }
  .ptr.go .ico { animation: wiz-spin .8s linear infinite; }
  @keyframes wiz-spin { to { transform: rotate(360deg); } }
  /* --- installed app ------------------------------------------------------- */
  html.standalone body { overscroll-behavior-y: none; }
  html.standalone .footer-cta, html.standalone .hide-in-app { display: none !important; }
  html.standalone .site-footer { margin-top: 2rem; }

  /* --- offline screen (public/offline.html) --------------------------------- */
  .offline-body { min-height: 100dvh; display: grid; place-items: center; }
  .offline-screen {
    max-width: 26rem; text-align: center; display: grid; justify-items: center; gap: .25rem;
    padding: calc(2rem + env(safe-area-inset-top)) 1.5rem calc(2rem + env(safe-area-inset-bottom));
  }
  .offline-icon { width: 4.5rem; height: 4.5rem; border-radius: 20px; margin-bottom: .75rem; box-shadow: 0 12px 28px -14px rgb(11 163 107 / .8); filter: grayscale(.4); }
  .offline-screen .button { margin: .75rem 0 1rem; min-width: 12rem; }
}