:root {
    color-scheme: dark;
    --ground: #09090b;
    --surface: #121214;
    --raised: #18181b;
    --hover: #1e1e22;
    --line: #232327;
    --line-strong: #2f2f35;
    --text: #f4f4f5;
    --text-2: #a1a1aa;
    --muted: #6b6b75;
    --accent: #8b9cff;
    --accent-soft: rgba(139, 156, 255, 0.14);
    --sk1: #1e1e23;
    --sk2: #2b2b31;
    --sk3: #3a3a42;
    --font-ui: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
    --font-display: "Bricolage Grotesque", "Instrument Sans", "Helvetica Neue", sans-serif;
    --font-mono: "DM Mono", "SF Mono", Menlo, monospace;
    --r-xl: 28px;
    --r-lg: 20px;
    --r-md: 14px;
    --r-sm: 10px;
    --r-pill: 999px;
    --nav-h: 64px;
  }

  * { box-sizing: border-box; }

  /*
   * The hidden attribute has to actually hide.
   *
   * The UA stylesheet's [hidden] { display: none } is a type-less selector, so ANY class that
   * sets display beats it — .btn and .pill both set inline-flex. The pages set el.hidden = true
   * from script and trusted it, so a Free account saw "Create an account" and "Included with
   * every account" at once, and every visitor saw the Pro card's "Current plan" badge whether
   * they held the plan or not. The script was right; the stylesheet quietly ignored it.
   *
   * !important so no later rule can take the behaviour away again. An element that needs to
   * stay laid out while inert wants aria-hidden or a class of its own, not this attribute.
   */
  [hidden] { display: none !important; }
  html { background: var(--ground); }
  body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
  }
  button, input { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
  svg { display: block; }

  /* ---------- Nav ---------- */
  .nav {
    position: sticky; top: 0; z-index: 40;
    height: var(--nav-h);
    display: flex; align-items: center; gap: 20px;
    padding: 0 28px;
    background: rgba(9, 9, 11, 0.78);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
  }
  .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
  .brand-mark {
    width: 28px; height: 28px; border-radius: 9px;
    background: linear-gradient(135deg, #f4f4f5, #a1a1aa);
    position: relative; overflow: hidden;
  }
  .brand-mark::after {
    content: ""; position: absolute; inset: 7px 7px 7px 13px;
    background: var(--ground); border-radius: 3px 8px 8px 3px;
  }
  .nav-right { display: flex; align-items: center; gap: 8px; flex: none; }
  .btn {
    height: 36px; padding: 0 16px; border-radius: var(--r-pill);
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 500; white-space: nowrap;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, transform .15s;
  }
  .btn-ghost { color: var(--text-2); }
  .btn-ghost:hover { color: var(--text); background: var(--raised); }
  /*
   * A solid button states BOTH colours, and does so with enough specificity to keep them.
   *
   * `a.btn { color: inherit }` below is (0,1,1) and beat `.btn-solid` at (0,1,0), so every
   * solid button that happened to be a link threw its foreground away and inherited the page's
   * near-white text — on a near-white background. The locked-demo modal's call to action was
   * unreadable for exactly that reason. Matching the anchor form here settles it, rather than
   * relying on which rule happens to come last.
   *
   * Contrast against #09090b text: #f4f4f5 is 18.1:1, #ffffff 19.9:1 and #e4e4e7 15.7:1, all far past the
   * 4.5:1 that AA asks for. The disabled state is the one that does not meet it, deliberately —
   * it is not actionable text, and it has to read as unavailable.
   */
  .btn-solid, a.btn.btn-solid { background: var(--text); color: var(--ground); }
  .btn-solid:hover, a.btn.btn-solid:hover { background: #fff; color: var(--ground); }
  .btn-solid:focus-visible, a.btn.btn-solid:focus-visible {
    background: #fff; color: var(--ground);
    outline: 2px solid var(--accent); outline-offset: 2px;
  }
  .btn-solid:active, a.btn.btn-solid:active { background: #e4e4e7; color: var(--ground); }
  .btn-solid:disabled, .btn-solid[aria-disabled="true"], a.btn.btn-solid[aria-disabled="true"] {
    background: var(--line-strong); color: var(--muted); cursor: not-allowed;
  }

  /* ---------- Hero + search ---------- */
  .hero {
    padding: 80px 28px 44px;
    text-align: center;
  }
  .hero h1 {
    font-family: var(--font-display);
    font-weight: 500; font-size: clamp(36px, 5vw, 56px);
    line-height: 1.02; letter-spacing: -0.03em;
    margin: 0 0 12px; text-wrap: balance;
  }
  .hero h1 em { font-style: normal; color: var(--text-2); }
  .hero p { margin: 0 0 32px; color: var(--muted); font-size: 16px; }
  .probe { height: 1px; }
  .search {
    position: relative; margin: 0 auto;
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    transition: border-color .2s, box-shadow .2s, background .2s, opacity .2s, transform .2s;
  }
  .hero-search {
    max-width: 880px; height: 64px; padding: 0 10px 0 22px;
    border-color: var(--line-strong);
    box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 30px 80px -30px rgba(0,0,0,0.9);
  }
  .hero-search input { font-size: 17px; }
  /* Full-width search bar that appears under the top bar on scroll; the whole bar is the field */
  .scroll-search {
    display: none; align-items: center; gap: 14px;
    height: 52px; padding: 0 28px; margin: 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted); cursor: text;
    transition: background .15s;
  }
  .rail.stuck .scroll-search { display: flex; }
  .scroll-search:focus-within { background: rgba(255,255,255,.025); color: var(--text-2); }
  .scroll-search svg { flex: none; }
  .scroll-search input {
    flex: 1; min-width: 0; height: 100%;
    background: transparent; border: 0; outline: 0;
    font-size: 15px; letter-spacing: -0.01em; color: var(--text);
  }
  .scroll-search input::placeholder { color: var(--muted); }
  .nav { gap: 28px; justify-content: space-between; }
  .nav-switch {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: inline-flex; padding: 3px; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  }
  .nav-switch a {
    height: 32px; padding: 0 16px; border-radius: var(--r-pill);
    display: inline-flex; align-items: center;
    color: var(--text-2); font-weight: 500; font-size: 13px; text-decoration: none;
    transition: background .15s, color .15s;
  }
  .nav-switch a:hover { color: var(--text); }
  .nav-switch a[aria-current="page"] { background: var(--hover); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
  .simple { max-width: 760px; margin: 0 auto; padding: 56px 28px 96px; }
  .simple.wide { max-width: none; padding-top: 40px; }
  #savedGrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-flow: dense; align-items: start; }
  #savedGrid .card[data-kind="web"] { grid-column: span 2; }
  #savedGrid .save { opacity: 1; transform: none; }
  .fy-section { margin-top: 36px; }
  .fy-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
  .fy-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  .fy-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 18px; }
  .fy-row.wide { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .fy-card { display: flex; flex-direction: column; gap: 12px; }
  .fy-card[data-kind="web"] { grid-column: span 2; }
  .fy-shot { position: relative; border-radius: var(--r-lg); border: 1px dashed var(--line-strong); background: var(--surface); display: grid; place-items: center; }
  .fy-card[data-kind="mobile"] .fy-shot { aspect-ratio: 9 / 19.5; }
  .fy-card[data-kind="web"] .fy-shot, .fy-card[data-kind="flow"] .fy-shot, .fy-card[data-kind="module"] .fy-shot { aspect-ratio: 16 / 10; }
  .fy-soon { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--ground); }
  .fy-card .meta .sk { background: var(--sk2); border-radius: 6px; }
  .toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); z-index: 60; padding: 10px 16px; border-radius: var(--r-pill); background: var(--raised); border: 1px solid var(--line-strong); color: var(--text); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 20px 40px -16px rgba(0,0,0,.9); }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }
  .simple[hidden] { display: none; }
  .simple-head { margin-bottom: 28px; }
  .simple-head h1 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 32px; letter-spacing: -0.03em; }
  .empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 56px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-xl); }
  .empty-art { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--raised), var(--line-strong)); margin-bottom: 8px; }
  .empty h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
  .empty p { margin: 0 0 10px; color: var(--muted); max-width: 360px; }
  .build-form { display: flex; flex-direction: column; gap: 14px; }
  .build-form textarea { font: inherit; width: 100%; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-strong); color: var(--text); outline: 0; resize: vertical; font-size: 15px; line-height: 1.5; }
  .build-form textarea:focus { border-color: rgba(139,156,255,.55); box-shadow: 0 0 0 4px var(--accent-soft); }
  .build-row { display: flex; align-items: center; gap: 14px; }
  .build-row .btn { margin-left: auto; }
  .build-note { margin-top: 28px; padding: 14px 16px; border-radius: var(--r-md); background: var(--raised); color: var(--text-2); font-size: 13px; line-height: 1.5; }
  .build-note b { color: var(--text); }
  .build-note a { color: var(--text); margin-left: 6px; }
  .search-go {
    height: 44px; padding: 0 20px; border-radius: var(--r-pill); flex: none;
    background: var(--text); color: var(--ground); font-weight: 600;
  }
  .search-go:hover { background: #fff; }
  .search:hover { border-color: var(--line-strong); }
  .search:focus-within {
    border-color: rgba(139, 156, 255, 0.55);
    background: var(--raised);
    box-shadow: 0 0 0 4px var(--accent-soft);
  }
  .search svg { color: var(--muted); flex: none; }
  .search input {
    flex: 1; min-width: 0; height: 100%;
    background: transparent; border: 0; outline: 0;
    font-size: 14px; letter-spacing: -0.01em;
  }
  .search input::placeholder { color: var(--muted); }
  .kbd {
    display: inline-flex; gap: 3px; align-items: center;
    font-family: var(--font-mono); font-size: 11px; color: var(--muted);
    padding: 5px 8px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--ground);
  }


  /* ---------- Filter rail ---------- */
  .rail {
    position: sticky; top: var(--nav-h); z-index: 30;
    background: rgba(9, 9, 11, 0.82);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
  }
  .rail-inner {
    padding: 12px 28px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  .seg {
    display: inline-flex; padding: 3px; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  }
  .seg button {
    height: 30px; padding: 0 14px; border-radius: var(--r-pill);
    color: var(--text-2); font-weight: 500; font-size: 13px;
    display: inline-flex; align-items: center; gap: 7px;
    transition: background .15s, color .15s;
  }
  .seg button:hover { color: var(--text); }
  .seg button[aria-pressed="true"] { background: var(--hover); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
  .rail-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

  .fwrap { position: relative; }
  .fwrap[hidden] { display: none; }
  .fbtn {
    height: 36px; padding: 0 12px 0 14px; border-radius: var(--r-pill);
    border: 1px solid var(--line); background: var(--surface);
    color: var(--text-2); font-weight: 500; font-size: 13px;
    display: inline-flex; align-items: center; gap: 8px;
    transition: border-color .15s, color .15s, background .15s;
  }
  .fbtn:hover, .fbtn[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); background: var(--raised); }
  .fbtn .n {
    font-family: var(--font-mono); font-size: 11px; line-height: 1;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    display: none; align-items: center; justify-content: center;
    background: var(--text); color: var(--ground);
  }
  .fbtn[data-count]:not([data-count="0"]) .n { display: inline-flex; }
  .fbtn svg { color: var(--muted); transition: transform .15s; }
  .fbtn[aria-expanded="true"] svg { transform: rotate(180deg); }

  .pop {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
    min-width: 220px; padding: 6px;
    background: var(--raised); border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    box-shadow: 0 24px 60px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.4);
    display: none;
  }
  .pop[data-open] { display: block; animation: pop .14s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
  .pop-head { padding: 6px 10px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .opt {
    width: 100%; display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--r-sm);
    text-align: left; color: var(--text-2); font-size: 13px;
  }
  .opt:hover { background: var(--hover); color: var(--text); }
  .opt .box {
    width: 16px; height: 16px; border-radius: 5px; flex: none;
    border: 1px solid var(--line-strong); background: var(--surface);
    display: grid; place-items: center;
  }
  .opt .box svg { opacity: 0; }
  .opt[aria-checked="true"] { color: var(--text); }
  .opt[aria-checked="true"] .box { background: var(--text); border-color: var(--text); }
  .opt[aria-checked="true"] .box svg { opacity: 1; color: var(--ground); }
  .opt .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

  .rail-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .count b { color: var(--text-2); font-weight: 500; }

  .active-row {
    padding: 0 28px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  }
  .active-row:not(:empty) { padding-top: 16px; }
  .achip {
    height: 30px; padding: 0 6px 0 12px; border-radius: var(--r-pill);
    background: var(--accent-soft); color: var(--text);
    border: 1px solid rgba(139,156,255,.25);
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  }
  .achip small { color: var(--text-2); font-size: 12px; }
  .achip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
  .achip button:hover { background: rgba(255,255,255,.1); color: var(--text); }
  .clear-all { color: var(--muted); font-size: 13px; padding: 4px 8px; border-radius: var(--r-sm); }
  .clear-all:hover { color: var(--text); background: var(--raised); }

  /* ---------- Results + grid ---------- */
  .results { padding: 24px 28px 96px; }
  .results-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
  .results-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  .results-head h2 q { quotes: "“" "”"; color: var(--accent); }
  .results-head .sub { color: var(--muted); font-size: 13px; }

  /* One kind at a time: mobile cards are 9:19.5 portraits, web cards 16:10 desktops */
  .grid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .grid[data-kind="web"] { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
  .card { display: flex; flex-direction: column; gap: 12px; }
  .shot {
    position: relative; overflow: hidden; container-type: inline-size;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: border-color .2s, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
  }
  /*
   * The preview fills the card, and something is always behind it.
   *
   * .shot-fallback sits underneath the picture and shows through only when there is no picture
   * or the one there is fails to load — the <img> removes itself on error. A missing preview
   * therefore reads as a labelled, deliberate state instead of the blank dark rectangle it used
   * to be, which was indistinguishable from a broken page.
   */
  .card.demo .shot > img {
    position: absolute; inset: 0; z-index: 1;
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    display: block; background: var(--surface);
  }
  .shot-fallback {
    position: absolute; inset: 0; z-index: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 20px; text-align: center;
    background:
      repeating-linear-gradient(135deg, var(--raised) 0 10px, var(--surface) 10px 20px);
    color: var(--text-2);
  }
  .shot-fallback-title { font-size: 13px; font-weight: 500; color: var(--text); }
  .shot-fallback-note {
    font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  }
  .card[data-kind="mobile"] .shot { aspect-ratio: 9 / 19.5; }
  .card[data-kind="web"] .shot { aspect-ratio: 16 / 10; }
  .card.loading .shot { aspect-ratio: 9 / 19.5; }
  .card.loading[data-kind="web"] .shot { aspect-ratio: 16 / 10; }
  .card:hover .shot {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: 0 30px 50px -24px rgba(0,0,0,.9);
  }
  .save {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(9,9,11,.72); border: 1px solid var(--line-strong);
    color: var(--text-2); display: grid; place-items: center;
    opacity: 0; transform: translateY(-4px);
    transition: opacity .15s, transform .15s, color .15s;
    backdrop-filter: blur(8px);
  }
  .card:hover .save, .save[aria-pressed="true"] { opacity: 1; transform: none; }
  .save[aria-pressed="true"] { color: var(--text); background: var(--raised); }
  .save[aria-pressed="true"] svg { fill: currentColor; }
  .tag {
    position: absolute; left: 12px; bottom: 12px; z-index: 2;
    height: 26px; padding: 0 10px; border-radius: var(--r-pill);
    background: rgba(9,9,11,.72); border: 1px solid var(--line-strong);
    color: var(--text-2); font-size: 11px; font-weight: 500; letter-spacing: .02em;
    display: inline-flex; align-items: center;
    backdrop-filter: blur(8px);
  }

  .meta { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
  .meta .name { font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
  .meta .sub { color: var(--muted); font-size: 12px; }

  .sentinel { height: 1px; }
  .status { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0 0; font-family: var(--font-mono); }
  .status[hidden] { display: none; }
  .to-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 40;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--raised); border: 1px solid var(--line-strong); color: var(--text-2);
    display: grid; place-items: center;
    opacity: 0; pointer-events: none; transform: translateY(8px);
    transition: opacity .2s, transform .2s;
    box-shadow: 0 20px 40px -16px rgba(0,0,0,.9);
  }
  .to-top.show { opacity: 1; pointer-events: auto; transform: none; }
  .to-top:hover { color: var(--text); background: var(--hover); }

  /* ---------- Auth ---------- */
  .user-menu { position: relative; }
  .avatar-btn {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--raised); border: 1px solid var(--line-strong);
    color: var(--text); font-weight: 600; font-size: 13px;
    display: grid; place-items: center;
  }
  .avatar-btn:hover { background: var(--hover); }
  .user-pop { left: auto; right: 0; min-width: 200px; }
  .modal {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center; padding: 20px;
    background: rgba(9,9,11,.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .modal[hidden] { display: none; }
  .dialog {
    width: 100%; max-width: 400px; padding: 28px;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--r-xl);
    box-shadow: 0 40px 100px -30px rgba(0,0,0,.95);
    animation: pop .16s ease-out;
  }
  .dialog-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .dialog h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; }
  .dialog p { margin: 0; color: var(--muted); font-size: 13px; }
  .dialog .close { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; color: var(--muted); display: grid; place-items: center; flex: none; }
  .dialog .close:hover { background: var(--raised); color: var(--text); }
  .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
  .field label { font-size: 12px; font-weight: 500; color: var(--text-2); }
  .field input {
    height: 44px; padding: 0 14px; border-radius: var(--r-md);
    background: var(--ground); border: 1px solid var(--line-strong); outline: 0;
    transition: border-color .15s, box-shadow .15s;
  }
  .field input:focus { border-color: rgba(139,156,255,.55); box-shadow: 0 0 0 4px var(--accent-soft); }
  .field-row { display: flex; justify-content: space-between; align-items: center; }
  .link { color: var(--muted); font-size: 12px; padding: 0; }
  .link:hover { color: var(--text); text-decoration: underline; }
  .btn-block { width: 100%; height: 44px; justify-content: center; font-weight: 600; margin-top: 4px; }
  .btn-block:disabled { opacity: .6; cursor: default; }
  .btn-block.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .auth-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.4; background: var(--raised); color: var(--text-2); }
  .auth-msg[data-kind="error"] { background: rgba(255, 107, 107, .1); color: #ff9b9b; }
  .auth-msg[data-kind="ok"] { background: var(--accent-soft); color: var(--text); }
  .auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
  .auth-switch button { color: var(--text); font-weight: 500; padding: 0; }
  .auth-switch button:hover { text-decoration: underline; }

  @media (max-width: 720px) {
    .nav { padding: 0 16px; gap: 16px; }
    .nav-switch { position: static; transform: none; }
    .nav-switch a { padding: 0 10px; font-size: 12px; }
    .btn-ghost, .kbd, .search-go { display: none; }
    .scroll-search { padding: 0 16px; height: 48px; }
    .hero { padding: 56px 16px 32px; }
    .hero-search { height: 54px; padding-left: 16px; }
    .hero { padding: 48px 16px 28px; }
    .rail-inner, .results, .active-row { padding-left: 16px; padding-right: 16px; }
    .rail-right { margin-left: 0; width: 100%; justify-content: space-between; }
    .grid, .grid[data-kind="web"] { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
    .grid[data-kind="web"] { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  /* ---------- Links styled as controls ---------- */
  a.btn, a.opt, .brand { text-decoration: none; color: inherit; }
  .hero p a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
  .hero p a:hover { color: var(--accent); }
  .crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; flex: 1; }
  .crumb::before { content: "/"; color: var(--line-strong); margin-right: 2px; }
  .crumb span { color: var(--text); font-weight: 500; }

  /* ---------- Brand editor (tabs · config · preview) ---------- */
  .gate { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 40px 20px; }
  .gate[hidden] { display: none; }
  body:not([data-auth-state]) .gate, body:not([data-auth-state]) .simple { visibility: hidden; }
  .gate-card { max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .gate-card h1 { margin: 6px 0 0; font-family: var(--font-display); font-weight: 500; font-size: 34px; letter-spacing: -0.03em; line-height: 1.05; }
  .gate-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
  .gate-actions { display: flex; gap: 8px; margin-top: 10px; }
  .gate-note { font-size: 12px !important; }

  .editor { display: grid; grid-template-columns: 220px minmax(460px, 1fr) minmax(0, 1.1fr); min-height: calc(100vh - var(--nav-h)); }
  .editor[hidden] { display: none; }
  .editor-tabs { border-right: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); display: flex; flex-direction: column; padding: 22px 14px 18px; gap: 18px; }
  .editor-title { padding: 0 8px; }
  .editor-title h1 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .editor-sub { margin: 0; color: var(--muted); font-size: 13px; }
  .editor-sub[data-kind="dirty"] { color: var(--accent); }
  .editor-sub[data-kind="error"] { color: #ff9b9b; }
  .tab-list { display: flex; flex-direction: column; gap: 2px; }
  .tab-btn { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; font-size: 14px; text-align: left; }
  .tab-btn svg { color: var(--muted); opacity: 0; transition: opacity .15s; }
  .tab-btn:hover { background: var(--raised); color: var(--text); }
  .tab-btn[aria-selected="true"] { background: var(--hover); color: var(--text); }
  .tab-btn[aria-selected="true"] svg { opacity: 1; }
  .editor-tabs-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; align-items: center; }
  .editor-tabs-foot .link { font-size: 12px; }

  .editor-config { border-right: 1px solid var(--line); }
  .config-form { position: sticky; top: var(--nav-h); max-height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 4px; }
  .config-head { margin-bottom: 18px; }
  .config-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
  #configFields { display: flex; flex-wrap: wrap; gap: 16px 12px; }
  #configFields .field { margin: 0; flex: 1 1 100%; }
  #configFields .field.half { flex-basis: calc(50% - 6px); }
  #configFields .field.third { flex-basis: calc(33.333% - 8px); }
  .hint-text { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
  .field-heading { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px !important; }
  .field-heading label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
  .role-field .field-row { margin-bottom: 6px; }
  .seg-sm { padding: 2px; }
  .seg-sm button { height: 26px; padding: 0 10px; font-size: 12px; }
  .field textarea { font: inherit; padding: 12px 14px; border-radius: var(--r-md); background: var(--ground); border: 1px solid var(--line-strong); color: var(--text); outline: 0; resize: vertical; min-height: 44px; line-height: 1.45; font-size: 14px; }
  .field textarea:focus { border-color: rgba(139,156,255,.55); box-shadow: 0 0 0 4px var(--accent-soft); }
  .field select { height: 44px; padding: 0 36px 0 14px; border-radius: var(--r-md); background: var(--ground); border: 1px solid var(--line-strong); color: var(--text); outline: 0; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6b75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; text-transform: capitalize; }
  .field select:focus { border-color: rgba(139,156,255,.55); box-shadow: 0 0 0 4px var(--accent-soft); }
  .color-field { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 6px; border-radius: var(--r-md); background: var(--ground); border: 1px solid var(--line-strong); }
  .color-field:focus-within { border-color: rgba(139,156,255,.55); box-shadow: 0 0 0 4px var(--accent-soft); }
  .color-field input[type="color"] { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; flex: none; }
  .color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
  .color-field input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-strong); border-radius: 8px; }
  .color-field input[type="text"] { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; font-family: var(--font-mono); font-size: 13px; text-transform: lowercase; }
  .image-field { display: flex; align-items: center; gap: 10px; }
  .image-field img, .image-empty { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--ground); border: 1px solid var(--line-strong); flex: none; }
  .image-field input[type="file"] { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
  .hint { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
  input[type="range"] { width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
  input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
  input[type="range"].hue::-webkit-slider-runnable-track { background: linear-gradient(90deg, hsl(0 40% 50%), hsl(60 40% 50%), hsl(120 40% 50%), hsl(180 40% 50%), hsl(240 40% 50%), hsl(300 40% 50%), hsl(360 40% 50%)); }
  input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--text); border: 2px solid var(--ground); box-shadow: 0 0 0 1px var(--line-strong); }
  input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
  input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 2px solid var(--ground); }
  .seg-block { display: flex; width: 100%; }
  .seg-block button { flex: 1; justify-content: center; padding: 0 8px; }
  .btn:disabled { opacity: .5; cursor: default; }

  .preview { padding: 24px 28px 60px; min-width: 0; }
  .preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
  .preview-head h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
  .preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 18px; align-items: start; }
  .preview-grid .card[data-kind="web"] { grid-column: span 2; }
  .preview-grid[data-show="mobile"] { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

  @media (max-width: 1180px) { .editor { grid-template-columns: 200px 1fr; } .preview { grid-column: 1 / -1; border-top: 1px solid var(--line); } .editor-config { border-right: 0; } .config-form { position: static; max-height: none; } .preview-grid { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 820px) {
    .editor { grid-template-columns: 1fr; }
    .editor-tabs { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .tab-list { flex-direction: row; flex-wrap: wrap; }
    .tab-btn svg { display: none; }
    .preview-grid { grid-template-columns: repeat(2, 1fr); }
    .crumb { display: none; }
  }

  /* ---------- Prototype viewer ---------- */
  .viewer { position: fixed; inset: 0; z-index: 90; background: rgba(9,9,11,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: grid; grid-template-rows: auto 1fr auto; }
  .viewer[hidden] { display: none; }
  .viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
  .viewer-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .viewer-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
  .viewer-state { color: var(--muted); font-size: 13px; }
  .viewer-tools { display: flex; align-items: center; gap: 6px; }
  .viewer-tools .btn[aria-pressed="true"] { background: var(--raised); color: var(--text); }
  .viewer-body { display: flex; min-height: 0; }
  .viewer-stage { flex: 1; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 24px; }
  .viewer-stage .shot { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); }
  .viewer-info { width: 340px; flex: none; border-left: 1px solid var(--line); padding: 22px 22px 40px; overflow-y: auto; font-size: 13px; line-height: 1.55; color: var(--text-2); }
  .viewer-info[hidden] { display: none; }
  .viewer-info h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
  .viewer-info h4 { margin: 18px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .viewer-info p { margin: 0 0 8px; }
  .viewer-info ol { margin: 0; padding-left: 18px; }
  .viewer-info li { margin-bottom: 4px; }
  .viewer-info b { color: var(--text); font-weight: 500; }
  .viewer-hint { color: var(--muted); font-size: 12px; }
  .viewer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--line); }
  .viewer-states { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
  .viewer-states button { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border-radius: var(--r-pill); color: var(--text-2); font-size: 13px; font-weight: 500; border: 1px solid transparent; }
  .viewer-states button:hover { color: var(--text); background: var(--raised); }
  .viewer-states button[aria-pressed="true"] { background: var(--hover); color: var(--text); border-color: var(--line-strong); }
  .viewer-step { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; background: var(--surface); border: 1px solid var(--line-strong); }
  .viewer-states button[aria-pressed="true"] .viewer-step { background: var(--text); color: var(--ground); border-color: var(--text); }
  .card .shot { cursor: zoom-in; }
  .card .meta .sub b { color: var(--text-2); font-weight: 500; }
  @media (max-width: 900px) { .viewer-info { display: none; } .viewer-tools .btn:not(#vClose) { display: none; } .viewer-states button span:not(.viewer-step) { display: none; } }

  /* ---------- Demo viewer & demo cards ---------- */
  .demo-frame { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); }
  .demo-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
  .demo-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
  .demo-loading[hidden] { display: none; }
  .tiny-note { font-family: var(--font-mono); font-size: 11px; color: var(--muted); white-space: nowrap; }
  .card.demo .shot { aspect-ratio: 16 / 10; background: var(--surface); }
  .card.demo[data-kind="mobile"] .shot { aspect-ratio: 9 / 19.5; }
  .card.demo .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .card.demo .shot iframe { position: absolute; top: 0; left: 0; border: 0; pointer-events: none; transform-origin: 0 0; background: transparent; }
  .card.demo .shot .demo-badge { position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(9,9,11,.72); color: var(--text-2); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); }
  .kind-switch { margin-right: 4px; }

  /* ---------- Inspiration ---------- */
  .insp-hero { padding-bottom: 28px; }
  .insp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
  .insp-tag { height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
  .insp-tag:hover { color: var(--text); border-color: var(--line-strong); }
  .insp-tag[aria-pressed="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
  .rail-count { margin-left: auto; color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
  .insp-wrap { padding: 28px 28px 96px; }
  .insp-grid { columns: 4 280px; column-gap: 18px; }
  .insp-card { position: relative; break-inside: avoid; margin: 0 0 18px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; transition: border-color .2s, transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
  .insp-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .insp-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 30px 50px -24px rgba(0,0,0,.9); }
  .insp-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px; display: flex; flex-direction: column; gap: 2px; background: linear-gradient(to top, rgba(9,9,11,.85), rgba(9,9,11,0)); color: #fff; opacity: 0; transition: opacity .18s; pointer-events: none; }
  .insp-card figcaption b { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
  .insp-card figcaption span { font-size: 11.5px; opacity: .75; }
  .insp-card:hover figcaption { opacity: 1; }
  .insp-card:hover .save { opacity: 1; transform: none; }
  .insp-viewer { grid-template-rows: auto 1fr; grid-template-columns: 1fr 320px; }
  .insp-viewer .viewer-top { grid-column: 1 / -1; }
  .insp-stage { display: grid; place-items: center; padding: 28px; min-height: 0; cursor: zoom-out; }
  .insp-stage img { max-width: 100%; max-height: calc(100vh - 140px); border-radius: var(--r-lg); border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9); cursor: default; }
  .insp-about { border-left: 1px solid var(--line); padding: 22px 22px 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
  .insp-about h4 { margin: 8px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
  .insp-pal { display: flex; gap: 6px; }
  .insp-swatch { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); cursor: copy; }
  .insp-tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
  .insp-chip { padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
  .insp-mood { margin: 0; font-family: var(--font-display); font-size: 18px; letter-spacing: -0.02em; }
  .insp-prompt { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
  @media (max-width: 900px) { .insp-viewer { grid-template-columns: 1fr; } .insp-about { display: none; } }
  /* Demo viewer: edge to edge, no footer; web fills the stage, mobile stays a centred phone */
  .demo-viewer { grid-template-rows: auto 1fr; }
  .demo-viewer .viewer-stage { padding: 0; display: block; }
  .demo-viewer[data-platform="mobile"] .viewer-stage { display: grid; place-items: center; padding: 24px; }
  .demo-viewer[data-platform="web"] .demo-frame { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .ibtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s; }
  .ibtn:hover, .ibtn[aria-pressed="true"] { background: var(--raised); color: var(--text); }
  .toast { z-index: 120; }
  #dSave[aria-pressed="true"] svg { fill: currentColor; }
  /* Toggle switch (rail) */
  .switch { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 8px; border-radius: var(--r-pill); color: var(--text-2); font-size: 13px; font-weight: 500; transition: color .15s; }
  .switch:hover { color: var(--text); }
  .switch[hidden] { display: none; }
  .switch-track { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-strong); transition: background .18s, border-color .18s; }
  .switch-knob { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .18s cubic-bezier(.2,.8,.2,1), background .18s; }
  .switch[aria-checked="true"] { color: var(--text); }
  .switch[aria-checked="true"] .switch-track { background: var(--text); border-color: var(--text); }
  .switch[aria-checked="true"] .switch-knob { transform: translateX(14px); background: var(--ground); }
  .card.demo .shot iframe { transition: opacity .8s ease; }
  .card.demo .shot iframe.pending { opacity: 0; }

  /* ---------- Commerce: pricing, account & billing, legal ---------- */
  .page-wrap { max-width: 1040px; margin: 0 auto; padding: 56px 28px 96px; }
  .page-wrap.narrow { max-width: 760px; }
  .page-head { text-align: center; margin-bottom: 36px; }
  .page-head h1 { font-family: var(--font-display); font-weight: 500; font-size: 40px; letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 10px; }
  .page-head p { margin: 0 auto; color: var(--text-2); max-width: 560px; font-size: 15px; }
  .page-head.left { text-align: left; }
  .page-head.left p { margin-left: 0; }

  .plan-toggle { display: flex; justify-content: center; margin: 0 0 32px; }
  .plan-toggle .seg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; display: inline-flex; gap: 2px; }
  .plan-toggle button { height: 32px; padding: 0 16px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 500; font-size: 13px; }
  .plan-toggle button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
  .plan-save { margin-left: 8px; font-size: 11px; color: var(--accent); font-weight: 600; }

  .plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
  .plan { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); padding: 26px 24px; display: flex; flex-direction: column; gap: 16px; }
  .plan[data-featured] { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--accent-soft); }
  .plan h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .01em; }
  .plan .price { font-family: var(--font-display); font-size: 40px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
  .plan .price span { font-family: var(--font-ui); font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
  .plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; color: var(--text-2); font-size: 14px; }
  .plan li { display: flex; gap: 9px; align-items: flex-start; }
  .plan li svg { flex: none; margin-top: 3px; color: var(--accent); }
  .plan .btn { justify-content: center; height: 40px; }
  .plan-note { font-size: 12px; color: var(--muted); line-height: 1.5; }
  .plan-note a { color: var(--text-2); }

  /* The page's waiting, failing and timed-out states. Same card language as the billing
     cards beside it, so a page that cannot show an account still looks like the account page
     rather than an error screen bolted on. */
  .account-status {
    max-width: 560px; margin: 24px auto 0; padding: 24px;
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  }
  .account-status[hidden] { display: none; }
  .account-status h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 19px; letter-spacing: -0.02em; }
  .account-status p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
  .account-status .gate-actions { margin-top: 6px; }

  .commerce-msg { margin: 20px auto 0; max-width: 560px; padding: 12px 16px; border-radius: var(--r-md); font-size: 13px; line-height: 1.5; text-align: center; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
  .commerce-msg[data-kind="error"] { border-color: #7f1d1d; background: rgba(127,29,29,.18); color: #fecaca; }
  .commerce-msg[data-kind="ok"] { border-color: #14532d; background: rgba(20,83,45,.2); color: #bbf7d0; }
  .commerce-msg[data-kind="warn"] { border-color: #78350f; background: rgba(120,53,15,.2); color: #fde68a; }
  .commerce-msg[hidden] { display: none; }

  .bill-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .bill-card { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); padding: 22px 24px; }
  .bill-card h2 { margin: 0 0 14px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .bill-plan { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 4px; }
  .bill-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .bill-row:first-of-type { border-top: 0; }
  .bill-row dt { color: var(--muted); margin: 0; }
  .bill-row dd { margin: 0; color: var(--text); text-align: right; }
  .bill-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

  .pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--text-2); }
  .pill[data-tone="ok"] { border-color: #14532d; background: rgba(20,83,45,.25); color: #bbf7d0; }
  .pill[data-tone="warn"] { border-color: #78350f; background: rgba(120,53,15,.25); color: #fde68a; }
  .pill[data-tone="off"] { border-color: var(--line-strong); color: var(--muted); }

  .orders { width: 100%; border-collapse: collapse; font-size: 13px; }
  .orders th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 12px 10px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
  .orders td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); color: var(--text-2); }
  .orders td:last-child, .orders th:last-child { text-align: right; padding-right: 0; }
  .orders td b { color: var(--text); font-weight: 500; }

  .prose { color: var(--text-2); font-size: 15px; line-height: 1.65; }
  .prose h2 { color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin: 32px 0 10px; }
  .prose h2:first-child { margin-top: 0; }
  .prose p, .prose li { margin: 0 0 12px; }
  .prose ul { padding-left: 20px; }
  .prose a { color: var(--text); }
  .prose code { font-family: var(--font-mono); font-size: 13px; background: var(--raised); padding: 1px 5px; border-radius: 5px; }
  .legal-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); margin-bottom: 8px; }
  .legal-review { margin: 0 0 28px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid #78350f; background: rgba(120,53,15,.18); color: #fde68a; font-size: 13px; line-height: 1.5; }

  /* Cancellation: the route, the home-page call to action, and the channels beside it. The
     Refund & Cancellation Policy requires this to be plainly readable, so it is text in the
     page rather than an icon or a disclosure that has to be opened. */
  .cancel-cta { max-width: 720px; margin: 72px auto 0; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); }
  .cancel-cta h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .cancel-cta-link { font-size: 16px; font-weight: 600; color: var(--text); }
  .cancel-channels { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
  .cancel-channels h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .channel-list { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
  .channel-list a { color: var(--text); overflow-wrap: anywhere; }

  .site-foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
  .site-foot a { color: var(--text-2); text-decoration: none; }
  .site-foot a:hover { color: var(--text); }
  .site-foot .foot-legal { width: 100%; text-align: center; color: var(--muted); font-size: 12px; margin-top: 4px; }

  @media (max-width: 860px) {
    .plans, .bill-grid { grid-template-columns: 1fr; }
    .page-wrap { padding: 40px 16px 72px; }
    .page-head h1 { font-size: 30px; }
  }

  /* The pre-payment disclosure block: price, cadence, automatic renewal, no trial, and who the
     seller of record is. It sits directly above the acceptance control, which is where the
     legal package requires these facts to appear. */
  .checkout-block { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
  .checkout-block p { margin: 0; }
  .checkout-block .checkout-plan { color: var(--text); font-weight: 600; }

  .consent { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
  .consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--text-2); cursor: pointer; }
  .consent-check input { flex: none; margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
  .consent-links { margin: 0; padding-left: 26px; font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .consent-links a { color: var(--text-2); }
  .consent-links a:hover { color: var(--text); }
  /* Read by assistive technology, invisible on screen, and it takes no space. */
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

  .deletion-guard { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid #78350f; background: rgba(120,53,15,.18); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
  .deletion-guard p { margin: 0; font-size: 13px; line-height: 1.5; color: #fde68a; }
  .deletion-guard[hidden] { display: none; }

  /* A demo nobody may open yet: the card and the viewer both say so, in the same words. */
  .demo-locked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; height: 100%; padding: 40px 28px; background: var(--surface); border-radius: var(--r-lg); }
  .demo-locked h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
  /*
   * The upgrade prompt sits OVER the demo, which keeps running underneath. That is the whole
   * point of it: the person is allowed to be here, and only the download is being refused, so
   * dismissing it has to leave them exactly where they were.
   */
  .demo-upsell {
    position: absolute; inset: 0; z-index: 5;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(9, 9, 11, .72);
  }
  .demo-upsell-card {
    width: min(420px, 100%); padding: 26px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--r-lg); box-shadow: 0 40px 80px -30px rgba(0,0,0,.9);
  }
  .demo-upsell-card h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
  .demo-upsell-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; }
  .demo-locked p { margin: 0; max-width: 420px; color: var(--muted); font-size: 14px; line-height: 1.55; }
  .card .lock { position: absolute; inset: auto 10px 10px auto; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(9,9,11,.82); color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--line-strong); }
