/* ============================================================================
   Render Control landing stylesheet
   ----------------------------------------------------------------------------
   Structure (cascade order matters; append new rules to the END of a layer):
     1. Design tokens        :root vars (colors, shadows, radii, type)
     2. Base + components    panel / well / btn / led / lcd / switch / label
     3. Layout sections      topbar, hero, caps mosaic, steps, plans, faq, footer
     4. Motion               reveals, boot sequence, tilt, cursor glow
                             (all gated behind html.anim; killed by
                             prefers-reduced-motion)
     5. Responsive tiers     820 / 560 down, 1600 / 2200 / 3000 ultrawide up
     6. Dark theme           html.theme-dark token overrides + surfaces
     7. Small-screen         <=430px hardening (appended; keep last)
   ----------------------------------------------------------------------------
   Conventions:
     - Cache-busting: bump ?v=N on the <link> in index.html on EVERY change
       (assets are browser-cached for a day via _headers).
     - Colors flow through tokens; dark mode = re-declaring tokens. Never
       hardcode a color in a component without a dark override.
     - No em dashes in rendered content. No backdrop-filter (banned).
   ========================================================================== */

    /* ============ Skeuomorphic "stitched leather" console, bronze ============ */
    :root {
      /* leather grain tiles (original, generated; see scripts/gen_leather.py) */
      --leather-tan:     url("assets/leather-tan.png");
      --leather-dark:    url("assets/leather-espresso.png");
      --leather-bronze:  url("assets/leather-bronze.png");

      --ink:        #2E1C0E;   /* dark espresso engraving (on tan panels)  */
      --ink-dim:    #3A2410;
      --ink-faint:  #4B3218;
      --cream:      #ECDDC4;   /* light text on the dark leather desk      */
      --cream-dim:  #C7AE86;

      --accent:      #CC7A2C;  /* caramel: LEDs / active / REC             */
      --accent-deep: #6F340A;
      --green:       #5E9E4C;  /* online LED                               */
      --amber:       #D99A3C;

      /* stitching thread + bevel light/shadow (light from top-left). */
      --stitch: rgba(120, 96, 64, 0.28);
      --hi:   rgba(255, 240, 214, 0.55);
      --hi-2: rgba(255, 240, 214, 0.28);
      --sh:   rgba(8, 4, 1, 0.55);
      --sh-2: rgba(8, 4, 1, 0.40);
      /* machined slab: the visible milled side of every panel */
      --edge: #b1aa9b;
      /* engraved type: the light lip a stamped letterform catches */
      --engrave: rgba(255, 250, 240, 0.5);

      --raise:    -6px -6px 15px var(--hi-2),  0 9px 0 -3px var(--edge),  9px 15px 28px var(--sh),  inset 0 1px 0 var(--hi);
      --raise-sm: -4px -4px 10px var(--hi-2),  0 6px 0 -2px var(--edge),  5px 10px 17px var(--sh-2), inset 0 1px 0 var(--hi);
      --inset:    inset 4px 4px 10px var(--sh), inset -3px -3px 7px var(--hi-2);
      --inset-sm: inset 2px 2px 6px var(--sh), inset -2px -2px 5px var(--hi-2);

      --radius: 22px;
      --radius-sm: 14px;
      --maxw: 980px;

      --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
      --sans: "DM Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    }

    * { box-sizing: border-box; }

    /* skip-navigation link: off-screen until keyboard focus lands on it */
    .skip-link {
      position: absolute; left: -9999px; top: 14px; z-index: 100;
      display: inline-block; padding: 12px 20px; border-radius: 999px;
      font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
      color: #fff8f0; text-decoration: none; text-shadow: 0 1px 1px rgba(70,34,6,0.6);
      background: linear-gradient(180deg, #e79a34, #a5581c);
      box-shadow: var(--raise-sm);
    }
    .skip-link:focus-visible { left: 14px; }

    html, body {
      margin: 0; padding: 0;
      color: var(--cream);
      font-family: var(--sans);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }

    /* espresso leather desk: tiled grain + a dark wash so panels read lifted */
    body {
      position: relative;
      min-height: 100vh;
      background:
        radial-gradient(1100px 700px at 50% -14%, rgba(255,226,184,0.18), transparent 60%),
        linear-gradient(180deg, #bebab0, #a7a397);
      background-size: auto, auto;
      background-repeat: no-repeat, no-repeat;
      overflow-x: hidden;
    }
    /* faint blueprint construction grid (cheap, static) */
    body::before {
      content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
      background-image:
        repeating-linear-gradient(90deg, rgba(255,232,200,0.05) 0 1px, transparent 1px 86px),
        repeating-linear-gradient(0deg,  rgba(255,232,200,0.05) 0 1px, transparent 1px 86px);
    }
    .wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

    /* engraved label type; `--label` flips per surface (desk vs panel) */
    .label {
      font-size: 0.6875rem; letter-spacing: 0.22em; text-transform: uppercase;
      font-weight: 800; color: var(--label, var(--cream-dim));
    }
    .mono { font-family: var(--mono); }

    /* ---------- panels (tan leather + dashed stitching) ---------- */
    .panel {
      --label: var(--ink-dim);
      position: relative;
      color: var(--ink);
      background: linear-gradient(180deg, #e7e2d7, #d8d3c7);
      border-radius: var(--radius);
      box-shadow: var(--raise);
    }
    .panel::before { /* top edge highlight */
      content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
      background: linear-gradient(180deg, rgba(255,240,214,0.85), rgba(255,240,214,0) 36%);
      -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
      -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
    }
    .panel::after { /* dashed leather stitch, inset from the edge */
      content: ""; position: absolute; inset: 9px; pointer-events: none;
      border: 1.6px dashed var(--stitch);
      border-radius: calc(var(--radius) - 8px);
    }
    .panel > * { position: relative; z-index: 1; }

    .well {
      background: linear-gradient(180deg, #cec9bd, #bfbaad);
      border-radius: var(--radius-sm);
      box-shadow: var(--inset);
    }

    /* ---------- LED ---------- */
    .led {
      width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto;
      background:
        radial-gradient(circle at 36% 30%, #fff8, transparent 45%),
        radial-gradient(circle at 50% 55%, #6b513a, #3a2a1c 90%);
      box-shadow:
        inset 0 -1px 2px rgba(0,0,0,0.45), inset 0 1px 1px rgba(255,240,214,0.4),
        0 0 0 1px rgba(0,0,0,0.3);
      transition: background 0.2s ease, box-shadow 0.2s ease;
    }
    .led.on {
      background:
        radial-gradient(circle at 36% 30%, #ffffffcc, transparent 42%),
        radial-gradient(circle at 50% 55%, var(--c), color-mix(in srgb, var(--c) 50%, #000) 95%);
      box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.7),
        0 0 8px 1px color-mix(in srgb, var(--c) 78%, transparent),
        0 0 16px 2px color-mix(in srgb, var(--c) 48%, transparent);
    }
    .led.red   { --c: var(--accent); }
    .led.green { --c: var(--green); }
    .led.amber { --c: var(--amber); }
    .led.pulse { animation: led-breathe 3.4s ease-in-out infinite; }
    @keyframes led-breathe {
      0%, 100% { filter: brightness(1); }
      50%      { filter: brightness(1.4); }
    }
    /* Nav links, CTA buttons, and FAQ triggers keep their LED unlit until
       hovered/focused — a hover affordance instead of a page full of
       constantly-lit decoration. (.led.on elsewhere — the phone-demo status
       lights — is untouched: this only lights a .led that ISN'T already .on.) */
    a:hover .led:not(.on), a:focus-visible .led:not(.on),
    summary:hover .led:not(.on), summary:focus-visible .led:not(.on) {
      background:
        radial-gradient(circle at 36% 30%, #ffffffcc, transparent 42%),
        radial-gradient(circle at 50% 55%, var(--c), color-mix(in srgb, var(--c) 50%, #000) 95%);
      box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.7),
        0 0 8px 1px color-mix(in srgb, var(--c) 78%, transparent),
        0 0 16px 2px color-mix(in srgb, var(--c) 48%, transparent);
    }

    /* ---------- LCD display (dark green readout reads great on leather) ---------- */
    .lcd {
      position: relative; overflow: hidden;
      background: linear-gradient(180deg, #0e1813, #0a120d);
      border-radius: 12px;
      box-shadow:
        inset 3px 3px 8px rgba(0,0,0,0.8), inset -2px -2px 5px rgba(80,120,95,0.10),
        0 1px 0 var(--hi);
      padding: 16px 18px;
      color: #6fe7a0;
      font-family: var(--mono);
      text-shadow: 0 0 7px rgba(70,240,150,0.45);
    }
    .lcd::after { /* scanlines */
      content: ""; position: absolute; inset: 0; pointer-events: none;
      background: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px);
    }
    .lcd .big { font-size: clamp(1.125rem, 3vw, 1.625rem); font-weight: 700; letter-spacing: 0.06em; }
    .lcd .row { display: flex; justify-content: space-between; gap: 14px; font-size: 0.78125rem; letter-spacing: 0.08em; opacity: 0.92; }
    .lcd .amber { color: #f3c25a; text-shadow: 0 0 7px rgba(243,180,60,0.5); }
    .lcd .bar { height: 10px; border-radius: 5px; background: rgba(70,240,150,0.14); margin-top: 8px; box-shadow: inset 0 0 6px rgba(0,0,0,0.6); overflow: hidden; }
    .lcd .bar > i { display: block; height: 100%; width: 48%; border-radius: 5px; background: linear-gradient(90deg, #2fae6a, #6fe7a0); box-shadow: 0 0 8px rgba(70,240,150,0.6); }

    /* ---------- knob (brass) ---------- */
    .dial { position: relative; width: 132px; height: 132px; display: grid; place-items: center; flex: 0 0 auto; }
    .dial::before { /* tick ring */
      content: ""; position: absolute; inset: 0; border-radius: 50%;
      background: repeating-conic-gradient(from -135deg, #7a5a32 0 1.1deg, transparent 1.1deg 8deg);
      -webkit-mask: radial-gradient(circle, transparent 54px, #000 55px 62px, transparent 63px);
              mask: radial-gradient(circle, transparent 54px, #000 55px 62px, transparent 63px);
      opacity: 0.8;
    }
    .knob {
      position: relative; width: 96px; height: 96px; border-radius: 50%;
      background: radial-gradient(circle at 38% 30%, #f4dcab, #c69a5e 55%, #8a6634 100%);
      box-shadow:
        -6px -6px 13px var(--hi-2), 8px 10px 22px var(--sh),
        inset 0 2px 3px rgba(255,238,210,0.8), inset 0 -7px 13px rgba(40,22,6,0.5);
    }
    .knob::after { /* indicator notch */
      content: ""; position: absolute; top: 11px; left: 50%; width: 5px; height: 26px;
      margin-left: -2.5px; border-radius: 3px; background: var(--accent);
      box-shadow: 0 0 6px rgba(204,122,44,0.7), 0 1px 1px rgba(255,240,214,0.5);
      transform-origin: 50% 37px; transform: rotate(var(--knob-rot, -34deg));
    }

    /* ---------- hardware toggle ---------- */
    .switch {
      position: relative; width: 76px; height: 34px; border-radius: 18px; flex: 0 0 auto;
      background: linear-gradient(180deg, #c6c1b5, #b6b1a4);
      box-shadow: var(--inset-sm);
    }
    .switch.on { background: linear-gradient(180deg, #e6962e, var(--accent-deep)); box-shadow: inset 0 2px 5px rgba(60,30,6,0.55), inset 0 -1px 2px rgba(255,240,214,0.25); }
    .switch .thumb {
      position: absolute; top: 3px; left: 3px; width: 32px; height: 28px; border-radius: 9px;
      background: linear-gradient(180deg, #f6e6c5, #d8b886);
      box-shadow: -2px -2px 5px rgba(255,240,214,0.5), 3px 4px 8px rgba(8,4,1,0.5), inset 0 1px 0 #fff3;
      transition: left 0.18s cubic-bezier(0.3,1.4,0.5,1);
      background-image: repeating-linear-gradient(90deg, rgba(120,80,40,0.0) 0 4px, rgba(120,80,40,0.3) 4px 5px);
    }
    .switch.on .thumb { left: 41px; }

    /* ---------- push buttons (bronze leather + stitch) ---------- */
    .btn {
      position: relative; display: inline-flex; align-items: center; gap: 10px;
      padding: 15px 26px; border-radius: 14px; border: 0; cursor: pointer;
      font-family: var(--sans); font-size: 0.875rem; font-weight: 800;
      letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
      background: linear-gradient(180deg, #e6e1d6, #d3cdc0);
      box-shadow: var(--raise-sm);
      transition: transform 0.08s ease, box-shadow 0.12s ease;
    }
    .btn::after { /* stitch */
      content: ""; position: absolute; inset: 5px; pointer-events: none;
      border: 1.3px dashed var(--stitch); border-radius: 10px;
    }
    .btn > * { position: relative; z-index: 1; }
    .btn:hover { text-decoration: none; }
    .btn:active { transform: translateY(2px); box-shadow: var(--inset-sm); }
    .btn .led { width: 11px; height: 11px; }
    .btn-primary {
      color: #fff8f0; text-shadow: 0 1px 1px rgba(70,34,6,0.6);
      background: linear-gradient(180deg, #e79a34, #a5581c);
      box-shadow:
        -4px -4px 11px var(--hi-2), 6px 9px 20px rgba(70,34,6,0.5),
        inset 0 1px 0 rgba(255,240,214,0.4), inset 0 -3px 6px rgba(70,34,6,0.45);
    }
    .btn-primary::after { border-color: rgba(255,240,214,0.6); }
    .btn-primary:active { transform: translateY(2px); box-shadow: inset 3px 3px 8px rgba(50,24,4,0.6), inset -2px -2px 5px rgba(255,240,214,0.2); }

    /* ---------- topbar ---------- */
    .topbar {
      max-width: var(--maxw); margin: 14px auto 0; padding: 12px 18px;
      display: flex; align-items: center; justify-content: space-between; gap: 16px;
      position: sticky; top: 8px; z-index: 50; border-radius: 16px;
      transition: background 0.25s ease, box-shadow 0.25s ease;
    }
    /* Nav becomes a solid machined bar once the page scrolls (a functional
       state change; deliberately opaque, no glass blur). */
    .topbar.scrolled {
      background: linear-gradient(180deg, #e9e4d9, #d8d3c7);
      box-shadow: 0 5px 0 -2px var(--edge), 0 10px 26px rgba(8,4,1,0.28), inset 0 1px 0 rgba(255,250,240,0.6);
    }
    /* Keyboard focus ring (a11y / Button "focused" state) in the brand accent. */
    :focus-visible { outline: 3px solid rgba(204,122,44,0.9); outline-offset: 2px; border-radius: 6px; }
    .brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.125rem; letter-spacing: 0.06em; color: var(--ink); }
    .nav { display: inline-flex; align-items: center; gap: 18px; }
    .nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-dim); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding: 13px 6px; margin: -13px -6px; }
    .nav a:hover { color: var(--ink); text-decoration: none; }
    .chip {
      font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
      color: var(--cream-dim); padding: 9px 14px; border-radius: 999px; color: var(--ink);
    }

    /* ---------- hero ---------- */
    .hero { padding: 30px 22px 14px; }
    .console {
      padding: 28px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 26px; align-items: stretch;
    }
    .hero-left { display: flex; flex-direction: column; justify-content: center; }
    .eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px; }
    /* No longer inside .panel (the hero box was removed), so the label can't
       inherit --label from it; it now sits on the desk background like the
       other freestanding kickers, so give it the same --ink-dim reading. */
    .eyebrow .label { color: var(--ink-dim); }
    h1 { font-size: clamp(2.25rem, 5.6vw, 3.5rem); line-height: 1.04; margin: 0 0 16px; font-weight: 900; letter-spacing: -0.01em; color: var(--ink); }
    /* Focal accent on the headline metaphor word. accent-deep is a high-contrast
       burnt-orange focal on the light tan desk (bright caramel #CC7A2C would drop
       to ~1.5:1 there), and it already remaps to a glowing #E79A34 in dark mode. */
    h1 .red { color: var(--accent-deep); }
    /* Tagline is the dominant sub-hero voice: larger + darker than the fine print. */
    .tagline { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; color: var(--ink); margin: 0 0 22px; max-width: 44ch; }
    .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
    .platform-note { margin-top: 16px; font-size: 0.75rem; color: var(--ink-faint); }
    .platform-note strong { color: var(--ink); }
    /* A quiet one-line reassurance under the demo button (no longer a CTA itself). */
    .open-cta { margin: 10px 0 0; font-size: 0.9375rem; color: var(--ink-faint); line-height: 1.5; }
    .open-cta a { color: var(--accent-deep); font-weight: 800; white-space: nowrap; }
    .open-cta a:hover { text-decoration: underline; }
    .open-cta em { color: var(--ink); font-style: normal; font-weight: 800; }

    /* device cluster on the right */
    .cluster { display: flex; flex-direction: column; gap: 16px; }
    /* Hero media: an autoplaying phone-recording of the app, framed like a phone.
       Sits in the cluster cell so it still gets the cursor-swivel / scroll
       parallax. Reuses .phone-screen / .phone-cam; the bezel is .hero-phone (NOT
       .phone, so the demo section keeps its own scroll-swivel target). */
    .hero-media { justify-content: center; align-items: center; }
    .hero-phone {
      position: relative; width: min(300px, 84%); padding: 12px; border-radius: 44px;
      background: linear-gradient(180deg, #3c3934, #16140f);
      box-shadow: -6px -6px 15px var(--hi-2), 10px 14px 32px var(--sh),
        inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.6);
    }
    .hero-phone::before { /* power + volume nub on the right edge */
      content: ""; position: absolute; right: -3px; top: 96px; width: 3.5px; height: 52px;
      border-radius: 2px; background: #23201b; box-shadow: 0 66px 0 #23201b;
    }
    .hero-phone .phone-screen { border-radius: 33px; aspect-ratio: 1080 / 2258; }
    .hero-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
    .module { padding: 16px; display: flex; align-items: center; gap: 16px; }
    .module .meta { display: flex; flex-direction: column; gap: 4px; }
    .module .val { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
    .module .label { color: var(--ink-dim); }
    .seg { display: inline-flex; background: rgba(8,4,1,0.3); border-radius: 11px; box-shadow: var(--inset-sm); padding: 4px; gap: 4px; }
    .seg span { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-dim); padding: 6px 12px; border-radius: 8px; }
    .seg span.active { color: #fff8f0; background: linear-gradient(180deg, #e6962e, var(--accent-deep)); box-shadow: var(--raise-sm); }

    /* ---------- sections ---------- */
    section { padding: clamp(56px, 8vw, 88px) 0; }
    .section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
    .section-head h2 { font-size: clamp(1.375rem, 3.4vw, 1.875rem); font-weight: 900; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
    main.wrap h2 { color: var(--ink); }
    /* Section headings sit one clear step below the hero h1: smaller AND lighter
       (weight 800 vs the h1's 900), with a uniform title gap so each section
       opens with the same cadence now that the eyebrow kickers are gone. */
    main.wrap section > h2 {
      font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.015em;
      margin: 0 0 clamp(14px, 2vw, 20px); color: var(--ink);
    }
    .section-head .label { color: var(--ink-dim); }

    .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
    /* staggered bench line, not a lockstep row */
    .steps .step:nth-child(2) { margin-top: 26px; }
    .step { padding: 26px 24px; }
    .step .num {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      width: 46px; height: 46px; border-radius: 13px; margin-bottom: 16px;
      font-family: var(--mono); font-weight: 800; font-size: 1.1875rem; color: var(--accent);
      background: rgba(8,4,1,0.3); box-shadow: var(--inset); text-shadow: 0 0 8px rgba(204,122,44,0.4);
    }
    .step h3 { margin: 0 0 9px; font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.005em; color: var(--ink); }
    .step p { margin: 0; color: var(--ink-dim); font-size: 0.90625rem; }

    .repo { padding: 24px 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
    .repo .t { flex: 1 1 320px; min-width: 0; }
    .repo h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; }
    .repo p { margin: 0; color: var(--ink-dim); font-size: 0.90625rem; }
    .repo .url {
      flex: 1 1 280px; display: block; font-family: var(--mono); font-size: 0.8125rem;
      color: #6fe7a0; word-break: break-all; padding: 14px 16px; border-radius: 12px;
      background: linear-gradient(180deg, #0e1813, #0a120d);
      box-shadow: inset 3px 3px 7px rgba(0,0,0,0.7); text-shadow: 0 0 6px rgba(70,240,150,0.4);
      position: relative; z-index: 1;
    }
    .repo .url:hover { text-decoration: none; color: #8ff0bb; }
    .gets { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
    .gets li { position: relative; padding-left: 24px; color: var(--ink-dim); font-size: 0.90625rem; }
    .gets li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }
    .buy-side { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
    .buy-side .note { margin: 0; text-align: center; font-size: 0.75rem; color: var(--ink-faint); }
    .plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: stretch; max-width: 680px; margin: 0 auto; }
    .gets li.x::before { content: "\2715"; color: var(--ink-faint); }
    .gets li.x { color: var(--ink-faint); }
    .plan { padding: 26px 24px; display: flex; flex-direction: column; gap: 11px; position: relative; }
    .plan-badge {
      position: absolute; top: 16px; right: 16px; z-index: 2;
      font-size: 0.625rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
      color: #fff8f0; padding: 5px 11px; border-radius: 999px;
      background: linear-gradient(180deg, #e6962e, var(--accent-deep)); box-shadow: var(--raise-sm);
    }
    .price { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
    /* The price is the terminal focal point of the accent path (headline word ->
       demo CTA -> price). accent-deep reads on tan in light and remaps bright in dark. */
    .price .amount { font-size: 2.5rem; font-weight: 900; color: var(--accent-deep); letter-spacing: -0.02em; line-height: 1; }
    .price .per { font-size: 0.875rem; font-weight: 800; color: var(--ink-faint); }
    .plan-sub { margin: 0 0 2px; color: var(--ink-dim); font-size: 0.875rem; }
    .plan .gets { flex: 1 1 auto; margin-bottom: 6px; }
    .buy-foot { text-align: center; margin-top: 18px; font-size: 0.8125rem; color: var(--ink-dim); }
    .buy-foot a { color: var(--accent); font-weight: 800; }
    .buy-foot a:hover { color: var(--amber); text-decoration: none; }
    /* The demo off-ramp gets its own line above the fine print: hesitant buyers
       can go experience the product instead of bouncing at the price. */
    .buy-foot .demo-first { display: block; margin-bottom: 8px; font-size: 0.9375rem; color: var(--accent-deep); }
    .buy-foot .buy-meta { display: block; }
    .buy-foot .refund { display: block; margin-top: 8px; color: var(--ink-faint); font-size: 0.78125rem; }

    /* ---------- rich footer ----------
       Opaque "base plate": the tray the whole console sits in. The solid
       background is REQUIRED so the blueprint construction grid (body::before)
       does not bleed through and read as broken column dividers. */
    footer {
      position: relative; z-index: 1; margin-top: 30px; padding: 44px 22px 40px;
      color: var(--ink-dim);
      background: linear-gradient(180deg, #aca79b, #9c968a);
      box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.45), inset 0 18px 28px -22px rgba(8, 4, 1, 0.5);
    }
    .foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 26px; align-items: start; }
    .foot-brand .brand-line { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1rem; letter-spacing: 0.06em; color: var(--ink); }
    .foot-brand p { margin: 10px 0 0; color: var(--ink-dim); font-size: 0.84375rem; max-width: 320px; }
    .foot-brand .foot-trust { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-faint); font-size: 0.75rem; font-weight: 700; margin-top: 12px; }
    .foot-col { display: flex; flex-direction: column; gap: 9px; }
    .foot-h { font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
    .foot-col a { color: var(--ink-dim); font-size: 0.84375rem; text-decoration: none; padding: 12px 0; margin: -12px 0; }
    .foot-col a:hover { color: var(--accent-deep); text-decoration: underline; }
    .foot-bottom { margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(58,40,20,0.18); color: var(--ink-faint); font-size: 0.78125rem; }
    @media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

    /* ---------- capabilities gallery (device-screen mockups) ----------
       Deliberately ASYMMETRIC: a 6-track mosaic with varied spans and
       staggered tops, laid out like instruments bolted onto a bench, not a
       uniform card grid. Collapses to simple stacks on small screens. */
    .caps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
    .cap:nth-child(1) { grid-column: span 3; }
    .cap:nth-child(2) { grid-column: span 3; margin-top: 24px; }
    .cap:nth-child(3) { grid-column: span 2; }
    .cap:nth-child(4) { grid-column: span 4; }
    .cap:nth-child(5) { grid-column: span 4; margin-top: 20px; }
    .cap:nth-child(6) { grid-column: span 2; }
    .cap { padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 13px; }
    .cap .screen {
      position: relative; overflow: hidden; border-radius: var(--radius-sm); padding: 14px; height: 150px;
      display: flex; flex-direction: column; justify-content: center; gap: 9px;
      background: linear-gradient(180deg, #191512, #100d0a);
      box-shadow: var(--inset);
    }
    .cap .screen.has-shot { padding: 0; }
    .cap .screen.has-shot picture { display: block; width: 100%; height: 100%; }
    .cap .screen.has-shot img.shot { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
    .cap .screen.has-shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--inset); pointer-events: none; }
    .cap h3 { margin: 2px 0 0; font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.005em; color: var(--ink); }
    .cap p { margin: 0; font-size: 0.875rem; color: var(--ink-dim); line-height: 1.55; }
    .mini-lcd { font-family: var(--mono); color: #6fe7a0; text-shadow: 0 0 7px rgba(70,240,150,0.4); display: flex; flex-direction: column; gap: 7px; }
    .mini-lcd .big { font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.05em; display: flex; align-items: center; gap: 8px; }
    .mini-lcd .sub { font-size: 0.6875rem; opacity: 0.92; display: flex; justify-content: space-between; gap: 8px; }
    .mini-lcd .amber { color: #f3c25a; text-shadow: 0 0 7px rgba(243,180,60,0.5); }
    .mini-bar { height: 9px; border-radius: 5px; background: rgba(70,240,150,0.14); box-shadow: inset 0 0 6px rgba(0,0,0,0.6); overflow: hidden; }
    .mini-bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg,#2fae6a,#6fe7a0); box-shadow: 0 0 8px rgba(70,240,150,0.6); }
    .rings { display: flex; gap: 16px; justify-content: center; align-items: center; }
    .ring { width: 78px; height: 78px; }
    .ring .bg { fill: none; stroke: rgba(0,0,0,0.42); stroke-width: 7.5; }
    .ring .fg { fill: none; stroke-width: 7.5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
    .ring .lab { fill: var(--cream); font: 800 0.9375rem var(--mono); text-anchor: middle; }
    .ring .cap2 { fill: var(--cream-dim); font: 700 0.5rem var(--sans); text-anchor: middle; letter-spacing: 0.1em; }
    .mini-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
    .mini-btn { font: 800 0.6875rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream);
      padding: 9px 13px; border-radius: 10px; background: linear-gradient(180deg, rgba(255,240,214,0.14), rgba(8,4,1,0.3)); box-shadow: var(--raise-sm); display: inline-flex; align-items: center; gap: 6px; }
    .mini-btn.go { color: #fff8f0; background: linear-gradient(180deg,#e6962e,var(--accent-deep)); }
    .mini-rows { display: flex; flex-direction: column; gap: 9px; }
    .mini-row { display: flex; align-items: center; gap: 9px; font: 700 0.78125rem var(--sans); color: var(--cream); }
    .mini-row .sz { margin-left: auto; font-family: var(--mono); font-size: 0.6875rem; color: var(--cream-dim); font-weight: 600; }
    .mini-cap { font: 800 0.59375rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim); }
    .mini-switch { width: 40px; height: 20px; border-radius: 11px; background: rgba(8,4,1,0.42); box-shadow: var(--inset-sm); position: relative; flex: 0 0 auto; }
    .mini-switch.on { background: linear-gradient(180deg,#e6962e,var(--accent-deep)); }
    .mini-switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: linear-gradient(180deg,#f6e6c5,#d8b886); box-shadow: 0 1px 2px rgba(0,0,0,0.5); }
    .mini-switch.on i { left: 22px; }
    .caps-foot { text-align: center; margin-top: 20px; font-size: 0.8125rem; color: var(--ink-dim); }
    .caps-intro { color: var(--ink-dim); margin: 0 0 clamp(20px, 3vw, 28px); max-width: 560px; font-size: 0.9375rem; }

    /* ---------- demo video in a phone frame ---------- */
    .demo-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
    .phone {
      position: relative; width: min(320px, 82vw); padding: 13px; border-radius: 48px;
      background: linear-gradient(180deg, #3c3934, #16140f);
      box-shadow:
        -6px -6px 15px var(--hi-2), 10px 14px 32px var(--sh),
        inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.6);
    }
    .phone::before { /* power + volume buttons on the right edge */
      content: ""; position: absolute; right: -3px; top: 112px; width: 3.5px; height: 58px;
      border-radius: 2px; background: #23201b; box-shadow: 0 78px 0 #23201b;
    }
    .phone-screen {
      position: relative; border-radius: 36px; overflow: hidden;
      aspect-ratio: 1080 / 2260; background: #000;
    }
    .phone-screen video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
    .phone-cam {
      position: absolute; top: 11px; left: 50%; transform: translateX(-50%); z-index: 3;
      width: 11px; height: 11px; border-radius: 50%; background: #060708; pointer-events: none;
      box-shadow: inset 0 0 2px 1px #1c2833, 0 0 0 2.5px rgba(255,255,255,0.05);
    }
    .play-shield {
      position: absolute; inset: 0; z-index: 2; border: 0; cursor: pointer;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px;
      background: linear-gradient(180deg, rgba(12,9,6,0.30), rgba(12,9,6,0.62));
    }
    .play-shield.hide { display: none; }
    .play-btn {
      width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
      font-size: 1.625rem; color: #fff8f0; padding-left: 7px;
      background: linear-gradient(180deg, #e79a34, #a5581c);
      box-shadow: 0 10px 26px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,240,214,0.55), inset 0 -3px 6px rgba(70,34,6,0.45);
      transition: transform 0.1s ease;
    }
    .play-shield:hover .play-btn { transform: scale(1.06); }
    .play-note {
      font-family: var(--sans); font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.15em;
      text-transform: uppercase; color: #f2e9da; text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    }
    .demo-cap { margin: 0; font-size: 0.8125rem; color: var(--ink-dim); text-align: center; }

    /* enlarge small text-link touch targets to 44px without shifting layout:
       the negative margin cancels the padding in the box flow */
    .open-cta a, .buy-foot a, .step p a, .tap { display: inline-block; padding: 12px 4px; margin: -12px -4px; }

    /* FAQ accordion — native <details>/<summary>, no JS so it can't break. */
    .faq-item { padding: 0; margin-bottom: 12px; }
    .faq-item > summary.q {
      font-weight: 800; font-size: 0.96875rem; margin: 0; padding: 17px 22px;
      display: flex; align-items: center; gap: 9px; color: var(--ink);
      cursor: pointer; list-style: none; user-select: none;
    }
    .faq-item > summary.q::-webkit-details-marker { display: none; }
    .faq-item > summary.q::marker { content: ""; }
    .faq-item > summary.q:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: inherit; }
    .faq-chevron {
      margin-left: auto; flex: none; width: 9px; height: 9px;
      border-right: 2px solid var(--ink-dim); border-bottom: 2px solid var(--ink-dim);
      transform: rotate(45deg); transition: transform .22s ease;
    }
    .faq-item[open] > summary.q { padding-bottom: 8px; }
    .faq-item[open] .faq-chevron { transform: rotate(-135deg); }
    .faq-item > .a { margin: 0; padding: 0 22px 18px; color: var(--ink-dim); font-size: 0.90625rem; }
    .faq-item .a strong { color: var(--accent-deep); font-weight: 800; }

    footer .label { color: var(--ink-dim); }

    /* cinematic 3D scroll reveal: panels tilt up out of the desk (transforms only).
       Gated behind html.anim (set by JS) so a JS failure never leaves the page blank. */
    html.anim .reveal {
      opacity: 0;
      transform: perspective(1000px) translateY(42px) rotateX(10deg) scale(0.984);
      transform-origin: 50% 88%;
      transition:
        opacity 0.8s cubic-bezier(0.22, 0.68, 0.28, 1),
        transform 0.8s cubic-bezier(0.22, 0.68, 0.28, 1);
      transition-delay: var(--d, 0s);
      will-change: transform, opacity;
    }
    html.anim .reveal.in { opacity: 1; transform: perspective(1000px) translateY(0) rotateX(0deg) scale(1); }

    /* hover depth: cards float toward you */
    .step.panel, .cap.panel, .plan.panel, .faq-item.panel, .repo.panel {
      transition: transform 0.3s cubic-bezier(0.22, 0.68, 0.28, 1), box-shadow 0.3s ease,
        opacity 0.8s cubic-bezier(0.22, 0.68, 0.28, 1);
    }
    .step.panel:hover, .cap.panel:hover, .plan.panel:hover, .faq-item.panel:hover, .repo.panel:hover {
      transform: perspective(900px) rotateX(1.6deg) translateY(-6px) scale(1.012);
      box-shadow: -8px -8px 18px var(--hi-2), 16px 24px 44px var(--sh), inset 0 1px 0 var(--hi);
    }

    /* LED life: tiny desynced shimmer so the console feels powered */
    .led.on:not(.pulse) { animation: led-live 6.4s ease-in-out infinite; animation-delay: var(--fd, 0s); }
    @keyframes led-live {
      0%, 100% { filter: brightness(1); }
      46%      { filter: brightness(0.9); }
      52%      { filter: brightness(1.25); }
      57%      { filter: brightness(1.02); }
      81%      { filter: brightness(1.12); }
    }

    /* scroll-driven elements */
    .hero .cluster, .phone { will-change: transform; }

    /* ---------- render-progress scroll bar: the page itself "renders" ---------- */
    .scroll-progress {
      position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
      background: linear-gradient(90deg, #e79a34, var(--accent-deep));
      box-shadow: 0 0 8px rgba(204, 122, 44, 0.55);
      transform-origin: 0 50%; transform: scaleX(0);
      opacity: 0; pointer-events: none;
    }
    html.anim .scroll-progress { opacity: 1; }

    /* ---------- section LEDs arm as their section scrolls in ---------- */
    html.anim .section-head.reveal .led.on {
      opacity: 0.3; animation: none; transition: opacity 0.5s ease 0.1s;
    }
    html.anim .section-head.reveal.in .led.on {
      opacity: 1;
      animation: led-arm 0.55s cubic-bezier(0.2, 1.6, 0.4, 1),
        led-live 6.4s ease-in-out 0.6s infinite;
    }
    @keyframes led-arm {
      0% { transform: scale(0.55); }
      55% { transform: scale(1.4); }
      100% { transform: scale(1); }
    }

    /* ---------- cursor sheen on tilting cards (JS adds .tilt-sheen) ---------- */
    .tilt-sheen { position: relative; }
    .tilt-sheen::after {
      content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1;
      pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
      background: radial-gradient(420px 300px at var(--mx, 50%) var(--my, 40%),
        rgba(255, 240, 214, 0.55), transparent 62%);
      mix-blend-mode: soft-light;
    }
    .tilt-sheen:hover::after { opacity: 1; }

    /* the hero LCD render loop advances its bar smoothly */
    .lcd .bar > i { transition: width 0.9s linear; }

    /* ---------- console boot sequence (one-shot, on load) ---------- */
    html.anim .lcd { animation: lcd-boot 1.05s ease-out 0.25s backwards; }
    @keyframes lcd-boot {
      0% { opacity: 0; filter: brightness(2.2); }
      12% { opacity: 0.55; }
      18% { opacity: 0.12; }
      30% { opacity: 0.85; filter: brightness(1.6); }
      38% { opacity: 0.4; }
      100% { opacity: 1; filter: brightness(1); }
    }
    html.anim .cluster .module .led.on {
      animation: led-arm 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) backwards,
        led-live 6.4s ease-in-out 1.6s infinite;
    }
    html.anim .cluster .module .led.on:nth-child(1) { animation-delay: 0.95s, 1.6s; }
    html.anim .cluster .module .led.on:nth-child(2) { animation-delay: 1.1s, 1.75s; }
    html.anim .cluster .module .led.on:nth-child(3) { animation-delay: 1.25s, 1.9s; }
    html.anim .switch.on .thumb { animation: thumb-boot 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 1.15s backwards; }
    @keyframes thumb-boot {
      0% { transform: translateX(-38px); }
      100% { transform: none; }
    }

    /* ---------- plan/feature checklists cascade in after their card ---------- */
    html.anim .reveal .gets li { opacity: 0; transform: translateX(-10px); transition: opacity 0.45s ease, transform 0.45s ease; }
    html.anim .reveal.in .gets li { opacity: 1; transform: none; }
    html.anim .reveal.in .gets li:nth-child(1) { transition-delay: 0.28s; }
    html.anim .reveal.in .gets li:nth-child(2) { transition-delay: 0.36s; }
    html.anim .reveal.in .gets li:nth-child(3) { transition-delay: 0.44s; }
    html.anim .reveal.in .gets li:nth-child(4) { transition-delay: 0.52s; }
    html.anim .reveal.in .gets li:nth-child(5) { transition-delay: 0.60s; }

    /* ---------- demo play button quietly invites a click ---------- */
    .play-btn { position: relative; }
    html.anim .play-btn::after {
      content: ""; position: absolute; inset: -3px; border-radius: 50%;
      border: 2px solid rgba(243, 194, 90, 0.85); opacity: 0;
      animation: play-invite 2.8s ease-out 1.4s infinite;
    }
    @keyframes play-invite {
      0% { transform: scale(0.9); opacity: 0.9; }
      60%, 100% { transform: scale(1.45); opacity: 0; }
    }

    /* ---------- cursor desk light (JS-injected on fine pointers) ---------- */
    .cursor-glow {
      position: fixed; left: 0; top: 0; width: 640px; height: 640px;
      margin: -320px 0 0 -320px; z-index: 0; pointer-events: none;
      opacity: 0; transition: opacity 0.6s ease;
      background: radial-gradient(closest-side, rgba(255, 226, 184, 0.34), transparent 70%);
      mix-blend-mode: soft-light; will-change: transform;
    }

    /* ---------- ultrawide (21:9 and beyond) ---------- */
    @media (min-width: 1600px) {
      :root { --maxw: 1180px; }
      .console { gap: 36px; padding: 36px; }
      .plans { max-width: 800px; }
      .caps { gap: 22px; }
      /* widen the overhead key light + darken the desk edges so the extra
         width reads as a lit workbench, not empty margin */
      body {
        background:
          radial-gradient(1700px 900px at 50% -14%, rgba(255, 226, 184, 0.2), transparent 60%),
          linear-gradient(180deg, #bebab0, #a7a397);
      }
      body::after {
        content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
        background: radial-gradient(115% 105% at 50% 38%, transparent 58%, rgba(46, 28, 14, 0.15) 100%);
      }
    }
    @media (min-width: 2200px) {
      :root { --maxw: 1340px; }
      html { font-size: 106.25%; }
      .plans { max-width: 900px; }
    }
    @media (min-width: 3000px) {
      :root { --maxw: 1520px; }
      html { font-size: 112.5%; }
    }

    /* stamped type: headings catch a light lip along their bottom edge,
       like letters pressed into the panel metal */
    h1, h2, .price .amount { text-shadow: 0 1px 0 var(--engrave); }

    /* small tactile touches */
    ::selection { background: #e79a34; color: #fff8f0; }
    html { scroll-padding-top: 84px; }
    @media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
    .foot-col a { transition: color 0.2s ease, transform 0.2s ease; }
    .foot-col a:hover { transform: translateX(3px); }

    @media (max-width: 820px) {
      .console { grid-template-columns: 1fr; }
      .steps { grid-template-columns: 1fr; }
      .steps .step:nth-child(2) { margin-top: 0; }
      .nav .hide-sm { display: none; }
      .repo { flex-direction: column; align-items: stretch; }
      .plans { grid-template-columns: 1fr; }
      .caps { grid-template-columns: repeat(2, 1fr); }
      .cap:nth-child(n) { grid-column: auto; margin-top: 0; }
      /* Stacked hero: the phone-recording is a compact preview under the copy
         (a full-height phone-in-phone dominates a small screen), and its
         cursor/scroll 3D transform is dropped so the video can't jank on touch
         scrolling. The JS sets it inline, so this override needs !important. */
      .hero-phone { width: min(210px, 58%); }
      .cluster { transform: none !important; }
      .hero-media { margin-top: 6px; }
    }
    @media (max-width: 560px) {
      .caps { grid-template-columns: 1fr; }
      /* the decorative version chip gives its spot to the theme switch */
      .nav .chip { display: none; }
    }
    @media (prefers-reduced-motion: reduce) {
      .led.pulse, .led.on { animation: none; }
      .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
      .switch .thumb { transition: none; }
      .btn { transition: none; }
      .step.panel:hover, .cap.panel:hover, .plan.panel:hover, .faq-item.panel:hover, .repo.panel:hover { transform: none; }
      .scroll-progress { display: none; }
      .tilt-sheen::after { display: none; }
      .lcd .bar > i { transition: none; }
      .foot-col a:hover { transform: none; }
      .cursor-glow { display: none; }
      .lcd, .switch.on .thumb, .play-btn::after { animation: none; }
      .theme-toggle .tt-thumb { transition: none; }
    }

    /* ============ dark mode: the espresso-leather night console ============
       Toggled by html.theme-dark (set pre-paint by the head boot script from
       localStorage, falling back to the OS preference; the topbar switch
       flips + persists it). Text/shadow/stitch colors all flow through the
       :root tokens, so most of the theme is this re-declaration; the few
       hardcoded surfaces are overridden below. LCDs, phone screens, and the
       step mockups are already dark and stay untouched. */
    .theme-toggle {
      border: 0; margin: 0; padding: 6px; background: none; cursor: pointer;
      display: inline-flex; align-items: center; border-radius: 999px;
    }
    .theme-toggle .tt-track {
      display: block; position: relative; width: 40px; height: 22px; border-radius: 999px;
      background: linear-gradient(180deg, #cec9bd, #bfbaad);
      box-shadow: var(--inset-sm); transition: background 0.25s ease;
    }
    .theme-toggle .tt-thumb {
      position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
      background: radial-gradient(circle at 35% 30%, #fff8f0, #d8c7a8 70%);
      box-shadow: 0 2px 5px rgba(8, 4, 1, 0.45), inset 0 1px 0 rgba(255, 250, 240, 0.8);
      transition: transform 0.25s cubic-bezier(0.2, 1.3, 0.4, 1), background 0.25s ease;
    }
    html.theme-dark .theme-toggle .tt-track { background: linear-gradient(180deg, #16110d, #241e17); }
    html.theme-dark .theme-toggle .tt-thumb {
      transform: translateX(18px);
      background: radial-gradient(circle at 35% 30%, #ffcf8a, #a5581c 75%);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 9px rgba(231, 154, 52, 0.55);
    }

    html.theme-dark {
      color-scheme: dark;
      --ink:        #F2E7D5;
      --ink-dim:    #D9C6A8;
      --ink-faint:  #AD9575;
      --accent:      #E0913D;
      --accent-deep: #E79A34;
      --green:       #7CBF67;
      --amber:       #E8B45C;
      --stitch: rgba(226, 195, 150, 0.20);
      --hi:   rgba(255, 240, 214, 0.10);
      --hi-2: rgba(255, 240, 214, 0.06);
      --sh:   rgba(0, 0, 0, 0.65);
      --sh-2: rgba(0, 0, 0, 0.50);
      --edge: #120d09;
      --engrave: rgba(0, 0, 0, 0.55);
    }
    html.theme-dark body {
      background:
        radial-gradient(1100px 700px at 50% -14%, rgba(255, 190, 120, 0.09), transparent 60%),
        linear-gradient(180deg, #2a2119, #1b1510);
    }
    html.theme-dark body::before {
      background-image:
        repeating-linear-gradient(90deg, rgba(255, 232, 200, 0.028) 0 1px, transparent 1px 86px),
        repeating-linear-gradient(0deg,  rgba(255, 232, 200, 0.028) 0 1px, transparent 1px 86px);
    }
    html.theme-dark .panel { background: linear-gradient(180deg, #3b3126, #2c241c); }
    html.theme-dark .well { background: linear-gradient(180deg, #221c15, #1c1611); }
    html.theme-dark .btn:not(.btn-primary) { background: linear-gradient(180deg, #453a2d, #332a20); }
    html.theme-dark .topbar.scrolled {
      background: linear-gradient(180deg, #3b3126, #2c241c);
      box-shadow: 0 5px 0 -2px var(--edge), 0 10px 26px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 240, 214, 0.08);
    }
    html.theme-dark footer {
      background: linear-gradient(180deg, #241d16, #17110d);
      box-shadow: inset 0 1px 0 rgba(255, 240, 214, 0.05), inset 0 18px 28px -22px rgba(0, 0, 0, 0.6);
    }
    html.theme-dark .foot-bottom { border-top-color: rgba(236, 221, 196, 0.14); }
    html.theme-dark .cursor-glow {
      background: radial-gradient(closest-side, rgba(255, 200, 140, 0.16), transparent 70%);
      mix-blend-mode: screen;
    }
    html.theme-dark .tilt-sheen::after {
      background: radial-gradient(420px 300px at var(--mx, 50%) var(--my, 40%),
        rgba(255, 220, 170, 0.12), transparent 62%);
      mix-blend-mode: screen;
    }
    @media (min-width: 1600px) {
      html.theme-dark body {
        background:
          radial-gradient(1700px 900px at 50% -14%, rgba(255, 190, 120, 0.10), transparent 60%),
          linear-gradient(180deg, #2a2119, #1b1510);
      }
      html.theme-dark body::after {
        background: radial-gradient(115% 105% at 50% 38%, transparent 58%, rgba(0, 0, 0, 0.32) 100%);
      }
    }

/* ============================================================================
   7. SMALL-SCREEN HARDENING (iPhone SE class, <=430px; and global text safety)
   ========================================================================== */

/* Long tokens (repo URLs, emails) must never force horizontal scroll. */
p, li, h1, h2, h3 { overflow-wrap: break-word; }
.faq-item .a strong, .faq-item .a a { overflow-wrap: anywhere; }

/* Grid/flex items default to min-width:auto, which lets intrinsic content
   (the LCD, the dial module) blow the hero grid wider than the viewport. */
.hero-left, .cluster { min-width: 0; }
.module { flex-wrap: wrap; }

@media (max-width: 430px) {
  /* The desktop padding stack (hero 22 + wrap 22 + console 28 = 72px/side)
     eats 45% of a 320px screen. Compact it. */
  .wrap { padding: 0 14px; }
  .hero { padding: 22px 8px 10px; }
  /* No hero card anymore, so the console's horizontal padding just narrows the
     copy — drop it so text uses the full width (keep a little vertical rhythm). */
  .console { padding: 8px 0 4px; gap: 18px; }

  .topbar { margin: 10px 8px 0; padding: 10px 12px; gap: 10px; }
  .nav { gap: 10px; }
  .nav a { letter-spacing: 0.08em; }
  .brand { font-size: 1rem; gap: 8px; }
  .theme-toggle { padding: 4px; }

  h1 { font-size: clamp(2rem, 8.5vw, 2.5rem); }
  .tagline { font-size: 0.9375rem; }
  .cta .btn { width: 100%; justify-content: center; }

  .price .amount { font-size: 2.125rem; }
  .plan { padding: 20px 16px; }
  .faq-item { padding: 0; }
  .faq-item > summary.q { padding: 15px 16px; }
  .faq-item[open] > summary.q { padding-bottom: 7px; }
  .faq-item > .a { padding: 0 16px 15px; }
  .cap { padding: 14px 12px 16px; }
  footer { padding: 32px 14px 36px; }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
}
