  :root {
    /* Cool, crisp near-white light theme */
    --bg: #FAFAFA;
    --bg-raised: #FFFFFF;
    --bg-sunken: #F2F2F3;
    --surface: #FFFFFF;
    --ink: #111113;
    --ink-2: #2A2A2D;
    --ink-3: #62626A;
    --ink-4: #9A9AA2;
    --line: #E9E9EC;
    --line-strong: #D7D7DC;

    /* Refined mustard/amber — not fluorescent */
    --accent: #E0A92A;
    --accent-hover: #C8941B;
    --accent-soft: #FBEFCB;
    --accent-ink: #3C2A06;
    /* High-contrast accent for body text use (AA on white: ~6.0:1) */
    --accent-text: #7A5710;
    /* Display accent — brighter gold for large headlines (large-text AA 3:1) */
    --accent-display: #B07F1A;

    --success: #3E8B5C;
    --error: #C64A3B;
    --warning: #D49017;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-xs: 0 1px 0 rgba(28,26,23,.04);
    --shadow-sm: 0 1px 2px rgba(28,26,23,.06), 0 1px 0 rgba(28,26,23,.03);
    --shadow-md: 0 8px 24px -12px rgba(28,26,23,.18), 0 2px 4px rgba(28,26,23,.04);
    --shadow-lg: 0 24px 60px -24px rgba(28,26,23,.28), 0 4px 12px rgba(28,26,23,.06);

    --font-display: 'Rubik', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-sans: 'Rubik', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

    --max: 1200px;
  }

  [data-theme="dark"] {
    /* Deliberate dark theme — cool near-black with muted, non-glowing accent */
    --bg: #0E0F11;
    --bg-raised: #17181B;
    --bg-sunken: #0A0B0D;
    --surface: #1B1D20;
    --ink: #ECEAE4;
    --ink-2: #C7C3B9;
    --ink-3: #8B8678;
    --ink-4: #5A564D;
    --line: #24262A;
    --line-strong: #2F3136;

    /* Muted amber that doesn't glow on dark — lower chroma */
    --accent: #C49A3E;
    --accent-hover: #D7AC4E;
    --accent-soft: #1F1B12;
    --accent-ink: #15110A;
    --accent-text: #E0B855;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  html { background: var(--bg); }
  body {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .35s ease, color .35s ease;
  }
  ::selection { background: var(--accent); color: var(--accent-ink); }

  a { color: inherit; text-decoration: none; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  input { font: inherit; color: inherit; }

  h1,h2,h3,h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
  .serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; }
  .mono { font-family: var(--font-mono); letter-spacing: 0; }

  /* ---- Layout ---- */
  .wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
  @media (max-width: 640px){ .wrap { padding: 0 18px; } }

  /* ---- Header ---- */
  /* NOTE: do NOT use backdrop-filter on the sticky header. backdrop-filter
     creates a containing block for absolutely-positioned descendants,
     which traps the language dropdown and causes it to render clipped/glitched.
     Use a solid background instead. */
  .site-header {
    position: sticky; top: 0; z-index: 40;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    display: grid; grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 64px;
    gap: 18px;
  }
  .header-inner .brand { justify-self: start; }
  .header-inner .header-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
  .brand { display: flex; align-items: center; gap: 10px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name {
    font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em;
    line-height: 1; padding-top: 2px; font-weight: 600;
  }
  .brand-name em { font-style: italic; color: var(--ink-3); font-weight: 400;}
  nav.primary { display: flex; gap: 2px; justify-self: center; flex-wrap: nowrap; }
  nav.primary a {
    padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2);
    transition: background .15s, color .15s; white-space: nowrap;
  }
  nav.primary a {
    position: relative;
  }
  nav.primary a:hover { background: var(--bg-sunken); color: var(--ink); }
  nav.primary a.is-active {
    color: var(--ink);
    font-weight: 600;
    background: var(--bg-sunken);
  }
  nav.primary a.is-active::after {
    content: '';
    position: absolute;
    left: 10px; right: 10px; bottom: -10px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
  }
  .header-right { display: flex; align-items: center; gap: 6px; }
  .iconbtn {
    width: 36px; height: 36px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-2);
    transition: background .15s ease, color .15s ease;
  }
  .iconbtn:hover { background: var(--bg-sunken); color: var(--ink); }
  /* .lang-btn rules now live in langswitch.css */
  .hamburger { display: none; }
  @media (max-width: 1024px) {
    nav.primary { display: none; }
    .hamburger { display: inline-flex; }
  }
  @media (max-width: 520px) {
    .brand-name { font-size: 16px; }
    .header-inner { gap: 10px; height: 58px; }
  }

  /* ---- Buttons ---- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 18px; height: 44px; border-radius: 11px;
    font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
    transition: transform .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
    border: 1px solid transparent; white-space: nowrap;
  }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.4); }
  .btn-primary:hover { background: var(--accent-hover); }
  .btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
  .btn-secondary:hover { background: var(--bg-raised); }
  .btn-ghost { color: var(--ink-2); }
  .btn-ghost:hover { background: var(--bg-sunken); color: var(--ink); }
  .btn-lg { height: 54px; padding: 0 24px; border-radius: 13px; font-size: 16px; }

  /* ---- Hero ---- */
  .hero { padding: 48px 0 36px; position: relative; overflow: hidden; text-align: center; }
  @media (max-width: 640px) { .hero { padding: 32px 0 24px; } }

  .hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ink-3); padding: 6px 12px; border: 1px solid var(--line);
    border-radius: 999px; background: var(--bg-raised);
    font-family: var(--font-mono); font-weight: 500;
  }
  .hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklab, var(--success) 22%, transparent); }

  .hero h1 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 16px auto 12px;
    max-width: 22ch;
    font-weight: 600;
  }
  .hero h1 .accent { color: var(--ink); position: relative; }
  .hero h1 em, h1 em, h2 em, .section-title em { font-style: normal; color: var(--accent-display); font-weight: 600; }
  [data-theme="dark"] .hero h1 em, [data-theme="dark"] h1 em, [data-theme="dark"] h2 em, [data-theme="dark"] .section-title em { color: var(--accent-hover); }

  .hero-sub {
    font-size: clamp(14px, 1.2vw, 16px);
    color: var(--ink-3); max-width: 56ch; line-height: 1.55;
    margin: 0 auto 20px;
  }

  /* Input */
  .search {
    max-width: 620px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    padding: 8px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-md);
    transition: border-color .2s, box-shadow .2s;
  }
  .search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent), var(--shadow-md);
  }
  .search-inner { flex: 1; display: flex; align-items: center; gap: 2px; padding: 0 10px 0 14px; }
  .search .at { color: var(--ink-4); font-size: 18px; font-weight: 500; }
  .search input {
    flex: 1; border: 0; background: transparent; outline: none;
    padding: 14px 6px; font-size: 17px; color: var(--ink);
    min-width: 0;
  }
  .search input::placeholder { color: var(--ink-4); }
  .search .btn { height: 48px; }

  /* Paste button (lives inside .search-inner, right of the input) */
  .paste-btn {
    display: inline-flex; align-items: center; gap: 5px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--bg-sunken);
    color: var(--ink-2);
    border: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    flex-shrink: 0;
  }
  .paste-btn:hover { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
  .paste-btn:active { transform: scale(.97); }
  .paste-btn.paste-ok {
    background: color-mix(in oklab, var(--success) 18%, var(--surface));
    color: var(--success);
    border-color: color-mix(in oklab, var(--success) 40%, var(--line));
  }
  .paste-btn svg { display: block; }
  @media (max-width: 560px) {
    .paste-btn span { display: none; } /* on mobile keep just the icon */
    .paste-btn { padding: 0 9px; }
  }
  @media (max-width: 520px) {
    .search { flex-direction: column; align-items: stretch; padding: 8px; }
    .search-inner { padding: 0 8px; }
    .search input { padding: 14px 6px 6px; font-size: 16px; }
    .search .btn { width: 100%; }
  }

  .helper {
    margin-top: 14px; color: var(--ink-3); font-size: 13.5px;
    text-align: center;
  }
  .helper code {
    font-family: var(--font-mono); font-size: 12.5px;
    padding: 2px 6px; background: var(--bg-sunken); border-radius: 5px;
    color: var(--ink-2); border: 1px solid var(--line);
  }

  .trust {
    margin: 44px auto 0;
    display: grid; grid-template-columns: repeat(4, auto); gap: 28px;
    justify-content: center;
    max-width: 860px;
  }
  @media (max-width: 720px) { .trust { grid-template-columns: repeat(2, auto); gap: 16px 28px; } }
  .trust-item { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
  .trust-item .ti-ico {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    width: auto; height: auto; background: none; border: none; padding: 0;
  }
  .trust-item .ti-ico img { width: 22px; height: 22px; display: block; }

  /* (hero arc removed) */
  @media (max-width: 900px) { .hero-arc { display: none; } }

  /* Hero tools — quick links right under the search button */
  .hero-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 36px auto 0;
    max-width: 920px;
    text-align: left;
  }
  @media (max-width: 860px) { .hero-tools { grid-template-columns: 1fr; gap: 10px; max-width: 520px; } }
  .hero-tool {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-decoration: none;
    color: var(--ink-1);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
  }
  .hero-tool:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  .hero-tool-ico {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
    width: auto; height: auto; background: none; border: none; padding: 0;
    color: var(--accent);
  }
  .hero-tool-ico img { width: 32px; height: 32px; display: block; }
  .hero-tool-ico > svg { width: 28px; height: 28px; }
  .hero-tool-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .hero-tool-title {
    font-family: var(--font-display);
    font-size: 15px; font-weight: 600;
    color: var(--ink-1);
    line-height: 1.2;
  }
  .hero-tool-sub {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 2px;
    line-height: 1.4;
  }
  .hero-tool-arrow {
    color: var(--ink-3);
    font-size: 18px;
    transition: transform .15s ease, color .15s ease;
  }
  .hero-tool:hover .hero-tool-arrow {
    color: var(--accent-hover);
    transform: translateX(2px);
  }

  /* ---- Section primitives ---- */
  section.block { padding: 88px 0; border-top: 1px solid var(--line); }
  @media (max-width: 640px) { section.block { padding: 56px 0; } }
  /* Header bundle: eyebrow + title + sub, always centered for consistency with hero */
  section.block > .wrap > .section-eyebrow,
  section.block > .wrap > .section-title,
  section.block > .wrap > .section-sub {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .section-eyebrow {
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px;
  }
  .section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 3.4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.02em;
    max-width: 22ch;
    font-weight: 600;
  }
  .section-title em { font-style: normal; color: var(--accent-hover); font-weight: 600; }
  .section-sub { color: var(--ink-3); margin-top: 12px; font-size: 17px; max-width: 60ch; }
  /* On the explain block, the two-column grid is what holds the body — keep its
     internal text left-aligned but the eyebrow/title above stay centered. */
  .explain { margin-top: 36px; }

  /* ---- Results grid ---- */
  .results { margin-top: 36px; }
  .results-head {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 18px;
    margin-bottom: 18px;
  }
  .results-user {
    display: flex; align-items: center; gap: 12px;
  }
  .avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #D97757 100%);
    display: flex; align-items: center; justify-content: center;
    color: #2A1C00; font-weight: 600; font-size: 18px;
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--accent);
  }
  .u-name { font-family: var(--font-display); font-size: 24px; line-height: 1.1;}
  .u-meta { color: var(--ink-3); font-size: 13px; font-family: var(--font-mono); }

  .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
  @media (max-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 640px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

  .card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
  .card { padding: 0; border: 1px solid var(--line); }
  .card-media {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.92);
    background: var(--bg-sunken);
  }
  .card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .card-media.is-empty {
    background: linear-gradient(135deg, #1d1a14 0%, #2a241a 100%);
  }
  .card-media .card-play svg {
    width: 44px; height: 44px;
    fill: rgba(255,255,255,.85);
    filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
  }
  .card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
    pointer-events: none;
  }
  .card-badge {
    position: absolute; top: 10px; left: 10px;
    font-family: var(--font-mono); font-size: 11px; line-height: 1;
    padding: 6px 9px; border-radius: 999px;
    background: rgba(0,0,0,.55); color: #fff;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: inline-flex; align-items: center; gap: 5px;
    pointer-events: none;
  }
  .card-badge svg { display: block; }

  /* Skeleton */
  .skeleton {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg-sunken) 0%, color-mix(in oklab, var(--bg-raised) 70%, white 10%) 50%, var(--bg-sunken) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
  }
  @keyframes shimmer { from {background-position: 200% 0;} to {background-position: -200% 0;} }

  .empty, .errorstate {
    padding: 48px 24px; text-align: center;
    background: var(--bg-raised); border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
  }
  .empty h3, .errorstate h3 { font-family: var(--font-display); font-size: 26px; margin-bottom: 6px; }
  .empty p, .errorstate p { color: var(--ink-3); margin: 0; }

  /* ---- Story modal ---- */
  .modal-root {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(20,18,14,.72);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: fade .2s ease;
  }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  .story-frame {
    position: relative;
    width: min(420px, 100%);
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,.5);
    animation: scaleIn .24s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes scaleIn { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
  .story-media {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.9); font-family: var(--font-mono); font-size: 13px;
  }
  .story-bars {
    position: absolute; top: 12px; left: 12px; right: 12px;
    display: flex; gap: 4px;
  }
  .story-bars .bar {
    flex: 1; height: 3px; border-radius: 2px;
    background: rgba(255,255,255,.28); overflow: hidden;
  }
  .story-bars .bar .fill {
    display: block; height: 100%; background: #fff;
    width: 0%; transition: width .2s linear;
  }
  .story-top {
    position: absolute; top: 28px; left: 14px; right: 14px;
    display: flex; justify-content: space-between; align-items: center;
    color: #fff;
  }
  .story-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
  .story-user .av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #D97757);
    display: flex; align-items: center; justify-content: center;
    color: #2A1C00; font-weight: 600; font-size: 13px;
  }
  .story-actions { display: flex; gap: 6px; }
  .story-actions .iconbtn { color: #fff; background: rgba(255,255,255,.12); }
  .story-actions .iconbtn:hover { background: rgba(255,255,255,.22); color: #fff;}
  .story-nav-left, .story-nav-right {
    position: absolute; top: 0; bottom: 0; width: 40%;
    cursor: pointer;
  }
  .story-nav-left { left: 0; } .story-nav-right { right: 0; }
  .story-counter {
    position: absolute; bottom: 14px; left: 14px; right: 14px;
    color: rgba(255,255,255,.7); font-family: var(--font-mono); font-size: 11px;
    display: flex; justify-content: space-between;
  }
  .close-overlay { position: absolute; top: 14px; right: 14px; z-index: 2;}

  @media (max-width: 520px) {
    .modal-root { padding: 0; }
    .story-frame { border-radius: 0; width: 100%; height: 100%; aspect-ratio: auto; }
  }

  /* ---- How it works ---- */
  .steps {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin-top: 32px;
    max-width: 920px;
    margin-left: auto; margin-right: auto;
  }
  @media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
  .step {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
  }
  .step-num {
    font-family: var(--font-display); font-style: normal; font-weight: 600;
    font-size: 54px; line-height: 1; color: var(--accent-text);
    margin-bottom: 18px; display: block;
    letter-spacing: -0.03em;
  }
  [data-theme="dark"] .step-num { color: var(--accent); }
  .step h3 { font-family: var(--font-display); font-size: 24px; margin-bottom: 6px; }
  .step p { color: var(--ink-3); margin: 0; font-size: 15px; line-height: 1.6; }

  /* ---- Features grid (2-col cap for cleaner desktop rhythm) ---- */
  .features {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    background: var(--line); border: 1px solid var(--line);
    border-radius: var(--radius-lg); overflow: hidden;
    margin-top: 32px;
    max-width: 920px;
    margin-left: auto; margin-right: auto;
  }
  @media (max-width: 560px) { .features { grid-template-columns: 1fr;} }
  .feat {
    background: var(--bg-raised);
    padding: 28px;
  }
  /* Icon — no container, no background. Sits at the top-left of the card,
     naturally inline so it doesn't stretch to full card width (which would
     centre it). Bigger size since there's no container framing it. */
  .feat-ico {
    display: inline-flex;
    align-items: center;
    margin: 0 0 14px;
    background: none; border: none; padding: 0;
    color: var(--accent);
  }
  [data-theme="dark"] .feat-ico { color: var(--accent); background: none; }
  .feat-ico img { width: 40px; height: 40px; display: block; }
  /* Fallback stroke-SVGs (un-converted pages) inherit accent color */
  .feat-ico > svg { width: 32px; height: 32px; }
  .feat h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 6px; }
  .feat p { color: var(--ink-3); font-size: 14.5px; line-height: 1.6; margin: 0; }

  /* ---- Explainer pull quote ---- */
  .explain {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start;
    margin-top: 40px;
  }
  @media (max-width: 860px) { .explain { grid-template-columns: 1fr; gap: 30px; } }
  .explain p { color: var(--ink-2); font-size: 16.5px; line-height: 1.7; margin: 0 0 18px; }
  .pull {
    border-left: 2px solid var(--accent);
    padding: 8px 0 8px 24px;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.1vw, 24px);
    line-height: 1.35; letter-spacing: -0.01em;
    color: var(--ink);
    font-weight: 500;
  }

  /* ---- FAQ ---- */
  .faq-list {
    margin-top: 32px;
    border-top: 1px solid var(--line);
  }
  .faq-item {
    border-bottom: 1px solid var(--line);
  }
  .faq-q {
    width: 100%; text-align: left; padding: 22px 0;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px;
    font-size: 17px; color: var(--ink); font-weight: 500;
  }
  .faq-q:hover { color: var(--accent-hover); }
  .faq-icon {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--line-strong); color: var(--ink-3);
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    transition: transform .2s ease, background .2s, color .2s;
  }
  .faq-item.open .faq-icon { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: rotate(45deg); }
  .faq-a {
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease, padding .3s ease;
    color: var(--ink-3); font-size: 15.5px; line-height: 1.65;
  }
  .faq-item.open .faq-a { max-height: 260px; padding: 0 0 22px; }

  /* ---- Downloader CTA ---- */
  .dl-banner {
    margin-top: 32px;
    background: var(--ink); color: var(--bg);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: flex; justify-content: space-between; align-items: center; gap: 30px;
    position: relative; overflow: hidden;
  }
  [data-theme="dark"] .dl-banner { background: var(--accent); color: var(--accent-ink); }
  .dl-banner h3 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); line-height: 1.1; max-width: 16ch; }
  .dl-banner p { color: color-mix(in oklab, currentColor 70%, transparent); margin: 6px 0 0; font-size: 15.5px; max-width: 40ch; }
  .dl-banner .btn-primary { background: var(--accent); color: var(--accent-ink); }
  [data-theme="dark"] .dl-banner .btn-primary { background: var(--ink); color: var(--bg); }
  @media (max-width: 720px) {
    .dl-banner { flex-direction: column; align-items: flex-start; padding: 28px; }
  }

  /* ---- Footer ---- */
  footer.site-footer {
    border-top: 1px solid var(--line);
    padding: 60px 0 40px;
    background: var(--bg-sunken);
    margin-top: 40px;
  }
  .f-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  }
  @media (max-width: 860px) { .f-grid { grid-template-columns: 1fr 1fr; gap: 32px;} }
  @media (max-width: 480px) { .f-grid { grid-template-columns: 1fr; gap: 28px;} }
  .f-grid h4 {
    font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 14px;
    font-weight: 500;
  }
  .f-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
  .f-grid a { color: var(--ink-2); font-size: 14.5px; }
  .f-grid a:hover { color: var(--ink); }
  .f-brand p { color: var(--ink-3); font-size: 14px; max-width: 36ch; margin: 12px 0 18px;}
  .social { display: flex; gap: 8px; }
  .social .iconbtn { background: var(--surface); border: 1px solid var(--line); width: 34px; height: 34px;}
  .f-bottom {
    margin-top: 50px; padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center; gap: 20px;
    color: var(--ink-3); font-size: 13px; flex-wrap: wrap;
  }
  .f-bottom .disclaimer { font-family: var(--font-mono); }

  /* Friends / partner-link strip — single line, modest, above the copyright row */
  .f-friends {
    margin-top: 28px; padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    color: var(--ink-3); font-size: 13px;
  }
  .f-friends-label { font-weight: 600; letter-spacing: 0.02em; }
  .f-friends a { color: var(--ink-2); text-decoration: none; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
  .f-friends a:hover { background: var(--bg-sunken); color: var(--ink); border-color: var(--line-strong); }

  /* ---- Toast ---- */
  .toast-wrap {
    position: fixed; right: 20px; bottom: 20px; z-index: 200;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
  }
  @media (max-width: 640px) { .toast-wrap { left: 16px; right: 16px; align-items: center; } }
  .toast {
    pointer-events: auto;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-lg);
    font-size: 14.5px; color: var(--ink);
    animation: toastIn .25s cubic-bezier(.2,.8,.2,1);
    max-width: 360px;
  }
  @keyframes toastIn { from { transform: translateY(8px); opacity: 0;} to { transform: none; opacity: 1;} }
  .toast .ti { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto;}
  .toast.success .ti { background: var(--success); }
  .toast.error .ti { background: var(--error); }
  .toast.info .ti { background: var(--ink-3); }

  /* ---- Tweaks panel ---- */
  .tweaks-panel {
    position: fixed; bottom: 20px; right: 20px; z-index: 150;
    width: 280px;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 14px; box-shadow: var(--shadow-lg);
    padding: 16px;
    font-family: var(--font-sans);
    display: none;
  }
  .tweaks-panel.open { display: block; }
  .tweaks-panel h4 { font-size: 13px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0 0 12px; font-weight: 500;}
  .tweak-row { margin-bottom: 14px; }
  .tweak-row > label { font-size: 12.5px; color: var(--ink-3); display: block; margin-bottom: 6px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em;}
  .swatches { display: flex; gap: 6px; }
  .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s; }
  .sw:hover { transform: scale(1.1); }
  .sw.active { border-color: var(--ink); }
  .segment { display: inline-flex; background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px;}
  .segment button { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; color: var(--ink-3);}
  .segment button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs);}

  /* Cookie bar */
  .cookie {
    position: fixed; bottom: 16px; left: 16px; z-index: 90;
    background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: 12px; padding: 14px 16px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow-md); max-width: 460px;
    font-size: 13.5px; color: var(--ink-2);
  }
  @media (max-width: 640px) { .cookie { right: 16px; flex-wrap: wrap; } }

  /* Utility */
  .chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--bg-raised); border: 1px solid var(--line);
    font-size: 12px; color: var(--ink-3); font-family: var(--font-mono);
  }

  /* Mobile menu styles now live in langswitch.css */
  /* ---- Result tabs ---- */
  .tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin: 8px 0 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: var(--ink-3);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color .15s ease;
  }
  .tab-btn:hover { color: var(--ink-1); }
  .tab-btn.is-active { color: var(--accent-hover); }
  .tab-btn.is-active::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px; bottom: -1px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
  }
  .tab-count {
    margin-left: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: .7;
  }

  /* ---- Vertical card placeholder (for snaps without a thumbnail) ---- */
  .card-media.is-empty {
    background: linear-gradient(135deg, #1d1a14 0%, #2a241a 100%);
  }
  .card-play {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
  }
  .card-play svg {
    width: 44px; height: 44px;
    fill: rgba(255,255,255,.85);
    filter: drop-shadow(0 2px 12px rgba(0,0,0,.5));
  }

  /* ---- Mobile: stack profile header ---- */
  @media (max-width: 640px) {
    .results-head {
      flex-direction: column;
      align-items: stretch;
      gap: 14px;
    }
    .results-user { gap: 14px; }
    .avatar { width: 56px; height: 56px; font-size: 22px; }
    .u-name { font-size: 20px; }
    .u-meta { font-size: 12px; word-break: break-word; }
    .results-actions {
      display: flex; gap: 8px;
    }
    .results-actions .btn {
      flex: 1;
    }
    .tabs { margin: 4px -16px 16px; padding: 0 16px; }
    .tab-btn { font-size: 15px; padding: 10px 12px; }
  }

  /* Guide Images */
  .guide-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 24px 0;
  }
  .guide-img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid var(--line);
    display: block;
  }
  [data-theme="dark"] .guide-img { box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
  
  .guide-wrapper.mobile-frame {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  
  .guide-label {
    position: absolute;
    background-color: #ffd700;
    color: #111;
    font-weight: 700;
    font-size: 16px;
    padding: 6px 14px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 10;
    white-space: nowrap;
    border: 2px solid #000;
  }
  
  .guide-cursor {
    position: absolute;
    font-size: 32px;
    z-index: 11;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    pointer-events: none;
    transform: rotate(-45deg);
  }

  /* Guide specific layout styles (How it works) */
  .guide-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
  }
  .guide-section h1 {
    font-family: var(--font-display);
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--ink);
    line-height: 1.2;
  }
  .guide-section p {
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 16px;
  }
  .guide-section h2 {
    font-family: var(--font-display);
    font-size: 24px;
    margin-top: 50px;
    margin-bottom: 16px;
    color: var(--ink);
  }
  .guide-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
  .guide-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
  }
  .guide-item-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 15px;
    margin-top: 2px;
  }
  .guide-item-text {
    flex: 1;
  }
  .guide-item-text p {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
  }
  .guide-item-text strong {
    font-weight: 600;
    color: var(--ink);
  }
  .guide-item-text .guide-wrapper {
    margin-top: 16px;
  }

  /* ---- Theme toggle button — sun/moon morph, button spin, body fade ---- */
  /* Smooth global colour transition on theme swap. Scope to bg + colours so
     layout-affecting properties aren't animated (avoids jank). */
  body, .site-header, .site-footer, .feat, .step, .faq-item, .faq-a,
  .trending-card, .recent-strip, .recent-pill, .hero, .block, .btn {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease;
  }
  /* The button itself — relative positioning so the two icons can stack. */
  .theme-toggle { position: relative; overflow: visible; }
  .theme-toggle .theme-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 17px; height: 17px;
    transition: opacity .3s ease, transform .45s cubic-bezier(.34,1.56,.64,1);
  }
  /* Light theme → sun visible, moon tucked away spinning behind. */
  [data-theme="light"] .theme-sun  { opacity: 1; transform: rotate(0)      scale(1);   }
  [data-theme="light"] .theme-moon { opacity: 0; transform: rotate(-90deg) scale(.4);  }
  /* Dark theme → moon visible, sun tucked. */
  [data-theme="dark"]  .theme-sun  { opacity: 0; transform: rotate(90deg)  scale(.4);  }
  [data-theme="dark"]  .theme-moon { opacity: 1; transform: rotate(0)      scale(1);   }
  /* One-shot spin on click — JS adds .is-spinning for 500ms. */
  @keyframes themeToggleSpin {
    0%   { transform: rotate(0) scale(1); }
    40%  { transform: rotate(-25deg) scale(.92); }
    100% { transform: rotate(360deg) scale(1); }
  }
  .theme-toggle.is-spinning { animation: themeToggleSpin .5s cubic-bezier(.34,1.56,.64,1); }

  /* View Transitions API — radial wipe from the button's centre. Chrome 111+,
     Edge 111+, Safari 18+. Browsers without the API fall back to the body
     transition + icon morph above. JS sets --vt-x / --vt-y to the click origin. */
  ::view-transition-old(root), ::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
  }
  ::view-transition-new(root) {
    animation: vtRevealClip .55s cubic-bezier(.22,1,.36,1) both;
  }
  ::view-transition-old(root) {
    animation: vtFadeOut .35s ease both;
  }
  @keyframes vtRevealClip {
    from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 50%)); }
    to   { clip-path: circle(160% at var(--vt-x, 50%) var(--vt-y, 50%)); }
  }
  @keyframes vtFadeOut {
    to { opacity: .6; }
  }
  /* Honour reduced-motion users — no spin, no wipe, instant swap. */
  @media (prefers-reduced-motion: reduce) {
    .theme-toggle .theme-icon, body, .site-header, .site-footer { transition: none !important; }
    .theme-toggle.is-spinning { animation: none; }
    ::view-transition-new(root), ::view-transition-old(root) { animation: none !important; }
  }

  /* ---- Recent profiles — discoverable pill + popup panel under search ---- */
  .recent-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 14px auto 0;
    max-width: 720px;
  }
  .recent-trigger {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px 7px 12px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
  }
  .recent-trigger:hover { background: var(--bg-sunken); border-color: var(--line-strong); color: var(--ink); }
  .recent-wrap.is-open .recent-trigger { background: var(--bg-sunken); border-color: var(--accent); color: var(--ink); }
  .recent-trigger svg { opacity: .65; }
  .recent-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--accent-soft); color: var(--accent-ink);
    border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 1;
  }
  .recent-caret { transition: transform .18s ease; }
  .recent-wrap.is-open .recent-caret { transform: rotate(180deg); }

  .recent-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 24px 60px -16px rgba(0,0,0,0.25), 0 6px 20px rgba(0,0,0,0.06);
    z-index: 50;
    padding: 14px;
    animation: recentPanelIn .18s cubic-bezier(.4,.2,.2,1);
  }
  @keyframes recentPanelIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
  .recent-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; padding: 0 6px;
  }
  .recent-panel-title {
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-3);
  }
  .recent-clear {
    background: none; border: none;
    color: var(--ink-3); font-size: 12px; font-weight: 500;
    cursor: pointer; padding: 4px 8px; border-radius: 6px;
    font-family: inherit;
  }
  .recent-clear:hover { background: var(--bg-sunken); color: var(--error); }
  .recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
    list-style: none; margin: 0; padding: 0;
  }
  .recent-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink);
    transition: background .12s;
  }
  .recent-item:hover { background: var(--bg-sunken); }
  .recent-avatar {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    font-family: var(--font-display);
  }
  .recent-handle {
    font-size: 14px; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  @media (max-width: 480px) {
    .recent-panel { width: calc(100vw - 24px); }
  }

  /* ---- A11y: body-text links must underline (color alone fails WCAG) ---- */
  .block p a, .block li a, .faq-a a, .guide-item-text a, .hero-sub a {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
  }
  [data-theme="dark"] .block p a, [data-theme="dark"] .block li a,
  [data-theme="dark"] .faq-a a, [data-theme="dark"] .guide-item-text a,
  [data-theme="dark"] .hero-sub a { color: var(--accent-hover); }
  .block p a:hover, .block li a:hover, .faq-a a:hover {
    text-decoration-thickness: 2px;
  }

  /* ──── Premium Micro-Interactions & Animations ──── */

  /* Button hover and active push state */
  .btn, .paste-btn, .recent-trigger, .theme-toggle, .hamburger {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .btn:hover, .paste-btn:hover, .recent-trigger:hover {
    transform: translateY(-1.5px) scale(1.015);
  }
  .btn:active, .paste-btn:active, .recent-trigger:active {
    transform: translateY(0.5px) scale(0.985);
  }

  /* Form input focus state glow and organic border transition */
  .search-inner {
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .search-inner:focus-within {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
  }

  /* SVG / Icon spin/nudge micro-interactions on hover */
  .btn:hover svg {
    animation: svgNudge 0.4s ease-in-out;
  }
  @keyframes svgNudge {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
  }

  /* Features & step card hover organic lift */
  .feat, .step, .related-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  }
  .feat:hover, .step:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--accent) !important;
    box-shadow: 0 12px 24px -10px rgba(196, 154, 62, 0.15) !important;
  }

  /* Twemoji bounce micro-animation on feature/step hover */
  .feat:hover .feat-ico img, .step:hover .ti-ico img {
    animation: emojiBounce 0.6s cubic-bezier(0.28, 0.84, 0.42, 1);
  }
  @keyframes emojiBounce {
    0%   { transform: scale(1) translateY(0); }
    30%  { transform: scale(1.15) translateY(-5px); }
    50%  { transform: scale(0.9) translateY(0); }
    75%  { transform: scale(1.05) translateY(-1.5px); }
    100% { transform: scale(1) translateY(0); }
  }

  /* Header brand logo gentle rotation hover */
  .brand:hover .brand-mark {
    animation: brandLogoShake 0.6s ease-in-out;
  }
  @keyframes brandLogoShake {
    0% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0); }
  }

  /* Smooth scroll to anchors */
  html {
    scroll-behavior: smooth;
  }
