:root {
  --bg: #ffffff;
  --sidebar: #fbfbfb;
  --surface: #ffffff;
  --hover: #f4f4f5;
  --border: #ebebed;
  --border-strong: #d9d9de;
  --text: #0f0f10;
  --text-2: #5c5c64;
  --text-3: #8b8b93;
  --primary: #0f0f10;
  --on-primary: #ffffff;
  --accent: #0e9f6e;
  --accent-soft: #e6f6ef;
  --danger: #c8341c;
  --danger-soft: #fdeceb;
  --warn: #9a5b00;
  --warn-soft: #fff3df;
  --mask: 14, 159, 110;
  --lookalike: 214, 88, 150;
  --shadow: 0 1px 2px rgba(15, 15, 16, .04), 0 6px 24px rgba(15, 15, 16, .05);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --sidebar: #111113;
    --surface: #151517;
    --hover: #1e1e21;
    --border: #26262a;
    --border-strong: #36363c;
    --text: #f3f3f4;
    --text-2: #a9a9b1;
    --text-3: #76767e;
    --primary: #f3f3f4;
    --on-primary: #0c0c0d;
    --accent: #34d39e;
    --accent-soft: #0f2a20;
    --danger: #ff7a66;
    --danger-soft: #2f1613;
    --warn: #f2b45a;
    --warn-soft: #2d2210;
    --mask: 52, 211, 158;
    --lookalike: 244, 128, 186;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6;
      stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout: sidebar and main column */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column; gap: 20px; padding: 18px 14px;
  background: var(--sidebar); border-right: 1px solid var(--border);
  transition: width .18s ease;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; text-decoration: none;
         font-weight: 650; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark rect { fill: var(--primary); stroke: none; }
.brand-mark path { stroke: var(--on-primary); stroke-width: 2.4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
            text-decoration: none; color: var(--text-2); font-weight: 500; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--hover); color: var(--text); }
.nav-bottom { margin-top: auto; }
.nav-bottom + .sidebar-foot { margin-top: 0; }
.sidebar-foot { margin-top: auto; padding: 12px; border: 1px solid var(--border); border-radius: 12px;
                background: var(--surface); font-size: 13px; color: var(--text-2); }
.sidebar-foot .foot-title { margin-bottom: 8px; font-weight: 600; color: var(--text); }
.sidebar-foot .foot-row { display: flex; justify-content: space-between; gap: 8px; }
.sidebar-foot .foot-row + .meter { margin: 6px 0 10px; }
.sidebar-foot .meter:last-child { margin-bottom: 0; }
.sidebar-foot strong { color: var(--text); font-weight: 600; }
.sidebar-foot .paused { margin-top: 10px; color: var(--danger); }
.sidebar-user { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 0 4px;
                font-size: 13px; color: var(--text-2); }
.sidebar-user[hidden] { display: none; }
.user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user a { flex: none; color: var(--text-2); text-decoration: none; }
.sidebar-user a:hover { color: var(--text); text-decoration: underline; }

.app.collapsed .sidebar { width: 72px; }
.app.collapsed .nav-text { display: none; }
.app.collapsed .brand, .app.collapsed .nav-item { justify-content: center; padding-inline: 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
          height: 60px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
          backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.crumb { font-weight: 550; }
.topbar-right { margin-left: auto; }
.view { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 32px 64px; }
.scrim { display: none; }

/* Controls */
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
            border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
       border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
       text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer; }
.btn:hover { background: var(--hover); }
.btn-ghost { border-color: var(--border); }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--hover); gap: 2px; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px;
                    font-size: 13px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.meter { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.full > span { background: var(--danger); }

/* Home: composer */
.hero { display: flex; flex-direction: column; align-items: center; padding: 48px 0 8px; }
.hero-title { margin: 0 0 28px; font-size: clamp(28px, 4vw, 40px); font-weight: 550;
              letter-spacing: -.025em; text-align: center; }
.composer { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 760px;
            padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 999px;
            background: var(--surface); box-shadow: var(--shadow); transition: border-color .15s; }
.composer:focus-within, .composer.ready { border-color: var(--border-strong); }
.attach { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
          border: 0; background: var(--hover); cursor: pointer; color: var(--text); }
.attach:hover { background: var(--border); }
.composer-input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent;
                  font-size: 16px; padding: 0 6px; }
.composer-input::placeholder { color: var(--text-3); }
.send { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%;
        border: 0; background: var(--primary); color: var(--on-primary); cursor: pointer; }
.send:disabled { background: var(--border-strong); color: var(--surface); cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 8px; max-width: 38%; flex: none;
        padding: 4px 6px 4px 4px; border-radius: 999px; background: var(--hover); font-size: 13px; }
.chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--border); }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0;
          background: transparent; cursor: pointer; color: var(--text-2); }
.chip-x svg { width: 16px; height: 16px; }
.chip-x:hover { background: var(--border); color: var(--text); }
.hero-note { margin: 14px 0 0; font-size: 13px; color: var(--text-3); text-align: center; }
.hero-note.error { color: var(--danger); }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 40px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 120px;
        border: 0; background: transparent; cursor: pointer; padding: 0; }
.tile-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px;
             border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow);
             transition: transform .15s; }
.tile:hover .tile-icon { transform: translateY(-2px); border-color: var(--border-strong); }
.tile-icon svg { width: 24px; height: 24px; }
.tile-name { font-weight: 550; text-transform: capitalize; }
.tile-sub { margin-top: -8px; font-size: 12px; color: var(--text-3); }

/* Home: result card; Recent: the image cards */
#current { scroll-margin-top: 76px; }
#current:not(:empty) { margin-top: 40px; }
.result { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 28px; padding: 20px;
          border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
          box-shadow: var(--shadow); }
.result-image { position: relative; align-self: start; border-radius: 12px; overflow: hidden;
                background: #000; }
.result-image img, .result-image canvas { display: block; width: 100%; height: auto; }
.result-image canvas { position: absolute; inset: 0; height: 100%; }
.result-image .btn { position: absolute; left: 10px; bottom: 10px; height: 30px; font-size: 13px;
                     background: rgba(15, 15, 16, .72); color: #fff; border: 0; backdrop-filter: blur(4px); }
.result-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.result-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.result-desc { margin: 0; color: var(--text-2); }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
        background: var(--hover); font-size: 13px; color: var(--text-3); }
.step::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.step.done { color: var(--text); }
.step.done::before { background: var(--accent); }
.step.now { color: var(--text); background: var(--accent-soft); }
.step.now::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.step.bad { color: var(--danger); background: var(--danger-soft); }
@keyframes pulse { 50% { opacity: .25; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.facts div { padding: 10px 12px; border-radius: 10px; background: var(--hover); }
.facts dt { font-size: 12px; color: var(--text-3); }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }
.verdict { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; }
.verdict strong { display: block; margin-bottom: 2px; }
.verdict.accept strong { color: var(--accent); }
.verdict.reject strong { color: var(--danger); }
.verdict ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.result-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: auto;
               font-size: 13px; color: var(--text-3); }
.result-foot a { margin-left: auto; color: var(--text); font-weight: 500; }

.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 24px; }
.recent > .empty { grid-column: 1 / -1; }
.more { display: flex; justify-content: center; margin-top: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--text-2);
        text-decoration: none; font-weight: 500; }
.back:hover { color: var(--text); }
.back svg { width: 18px; height: 18px; }
.recent-item { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px;
               background: var(--surface); text-align: left; text-decoration: none; min-width: 0; }
.recent-item:hover { border-color: var(--border-strong); background: var(--hover); }
.recent-item img { width: 64px; height: 64px; flex: none; border-radius: 10px; object-fit: cover; background: #000; }
.recent-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.recent-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-title::first-letter, .result-title::first-letter { text-transform: uppercase; }
.recent-desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2;
               -webkit-box-orient: vertical; overflow: hidden; }
.recent-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--text-3); }
.recent-meta > * { white-space: nowrap; }

/* Pills */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
        font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--hover); color: var(--text-2); }
.pill.ok { background: var(--primary); color: var(--on-primary); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.live { background: var(--accent-soft); color: var(--accent); }

/* Usage */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-title { margin: 0; font-size: 30px; font-weight: 550; letter-spacing: -.02em; }
.subtabs { display: flex; gap: 4px; margin: 20px 0 24px; border-bottom: 1px solid var(--border); }
.subtab { padding: 10px 14px; margin-bottom: -1px; text-decoration: none; color: var(--text-2);
          border-bottom: 2px solid transparent; font-weight: 500; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--text); border-bottom-color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-value { margin: 4px 0 2px; font-size: 26px; font-weight: 600; letter-spacing: -.02em;
              font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 13px; color: var(--text-3); }
.stat .meter { margin-top: 10px; }
.card { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius);
        background: var(--surface); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
             padding: 16px 20px 0; }
.card-title { margin: 0; font-size: 15px; font-weight: 600; }
.card-body { padding: 16px 20px 20px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.grid-2 > .card { margin-top: 0; }
.search { height: 36px; min-width: 220px; padding: 0 12px; border: 1px solid var(--border);
          border-radius: 10px; background: var(--surface); outline: 0; }
.search:focus { border-color: var(--border-strong); }
.empty { padding: 28px 20px; text-align: center; color: var(--text-3); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; stroke: none; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart text { fill: var(--text-3); font-size: 12px; font-family: var(--font); }
.chart .bar { fill: var(--accent); }
.chart .band { fill: transparent; }
.chart .bar.hot { opacity: .75; }
.tip { position: absolute; z-index: 2; pointer-events: none; min-width: 160px; padding: 10px 12px;
       border-radius: 10px; background: var(--primary); color: var(--on-primary); font-size: 13px;
       box-shadow: var(--shadow); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.tip b { display: block; margin-bottom: 2px; }

.bars-list { display: flex; flex-direction: column; gap: 14px; }
.bars-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.bars-row .meter { grid-column: 1 / -1; }
.bars-row .num { font-variant-numeric: tabular-nums; color: var(--text-2); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 12px; text-align: left; font-weight: 500; color: var(--text-3); font-size: 13px;
     border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sub { color: var(--text-3); }
td.wrap { white-space: normal; min-width: 220px; max-width: 360px; color: var(--text-2); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.drop-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
                background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(4px); }
.drop-overlay div { padding: 28px 40px; border: 2px dashed var(--border-strong); border-radius: 20px;
                    background: var(--surface); font-size: 18px; font-weight: 550; }

/* Agents: the specialists */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.agents-hero { max-width: 780px; }
.agents-title { margin: 10px 0 12px; font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.03em;
                line-height: 1.08; text-wrap: balance; }
.agents-lede { margin: 0; max-width: 62ch; font-size: 17px; color: var(--text-2); }
.how { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
       gap: 14px; margin: 32px 0 0; padding: 0; }
.how li { counter-increment: how; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
          border: 1px solid var(--border); border-radius: 16px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.how li::before { content: counter(how); display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 8px;
                  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; }
.how b { color: var(--text); font-size: 15px; font-weight: 600; }
.spec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 32px; }
.spec-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 18px;
             background: var(--surface); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.spec-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.spec-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.spec-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.spec-card:hover .spec-cover img { transform: scale(1.04); }
.spec-cover.blank, .spec-hero-image.blank { display: flex; align-items: flex-end;
  background: radial-gradient(120% 100% at 15% 0%, #1d3a30 0%, #0d1311 55%, #070808 100%); }
.spec-blank { padding: 18px 20px; color: rgba(255, 255, 255, .88); font-size: 22px; font-weight: 600;
              letter-spacing: -.02em; line-height: 1.15; }
.spec-hero-image .spec-blank { padding: 26px 28px; font-size: 30px; }
.spec-badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55);
              color: #fff; font-size: 12px; font-weight: 550; backdrop-filter: blur(6px); }
.spec-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.spec-name { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.spec-about { font-size: 14px; color: var(--text-2); }
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 550; }
.tag.quiet { background: var(--hover); color: var(--text-2); }
.foundations { margin: 28px 0 0; font-size: 14px; color: var(--text-3); }

.spec-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.spec-title { margin: 10px 0 12px; font-size: clamp(32px, 4.5vw, 50px); font-weight: 600; letter-spacing: -.035em; line-height: 1.04; }
.spec-lede { margin: 0; max-width: 50ch; font-size: 18px; color: var(--text-2); }
.spec-facts { display: flex; flex-wrap: wrap; gap: 18px 32px; margin-top: 26px; }
.spec-fact { display: flex; flex-direction: column; gap: 2px; }
.spec-fact strong { font-size: 17px; font-weight: 600; }
.spec-fact span { font-size: 13px; color: var(--text-3); }
.spec-hero-figure { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.credit { font-size: 12px; color: var(--text-3); text-decoration: none; }
.credit:hover { color: var(--text-2); text-decoration: underline; }
.spec-hero-image { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: #000; }
.spec-hero-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.spec-section { margin-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.section-title { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.section-lede { margin: 0; max-width: 68ch; font-size: 15px; color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 2px solid rgb(var(--mask)); background: rgba(var(--mask), .2); }
.swatch.rose { border-color: rgb(var(--lookalike)); background: rgba(var(--lookalike), .2); }
.structure { margin-top: 28px; }
.structure-title { margin: 0; font-size: 18px; font-weight: 600; }
.structure-summary { margin: 4px 0 16px; max-width: 72ch; font-size: 14px; color: var(--text-2); }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.example { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.example-image { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #000; }
.example-image img, .example-image canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.example figcaption { font-size: 12px; color: var(--text-3); }
.structure-source { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }
.topics { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.topic { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.topic summary { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; cursor: pointer; font-weight: 550; list-style: none; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary::after { content: "+"; color: var(--text-3); font-weight: 400; }
.topic[open] summary::after { content: "\2212"; }
.prose { max-width: 80ch; padding: 0 18px 16px; font-size: 14px; line-height: 1.65; color: var(--text-2); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 18px; }
.prose li { margin: 4px 0; }
.prose h4 { margin: 14px 0 6px; font-size: 14px; color: var(--text); }
.sub-title { margin: 30px 0 0; font-size: 16px; font-weight: 600; }
.sources { display: flex; flex-direction: column; gap: 8px; max-width: 86ch; margin: 16px 0 0; padding-left: 22px; font-size: 14px; color: var(--text-2); }
.checked { padding: 24px 26px; border-radius: 18px; background: var(--accent-soft); }
.checked .section-lede { color: var(--text); }

/* Narrow screens: the sidebar becomes a drawer */
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 30; left: 0; transform: translateX(-100%); transition: transform .2s ease;
             width: var(--sidebar-w) !important; }
  .app.open .sidebar { transform: none; }
  .app.collapsed .nav-text { display: initial; }
  .app.collapsed .brand, .app.collapsed .nav-item { justify-content: flex-start; padding-inline: 12px; }
  .app.open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .3); }
  .topbar { padding: 0 16px; }
  .view { padding: 20px 16px 48px; }
  .hero { padding-top: 24px; }
  .result { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  .how, .spec-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 560px) {
  .chip-name { display: none; }
  .tiles { gap: 10px; }
  .tile { width: 92px; }
}

.app.landing, .app.landing .main { background: #000; }
.app.landing .sidebar,
.app.landing .topbar { display: none; }
.view[data-view="landing"] {
  position: relative; max-width: none; min-height: 100vh; margin: 0; padding: 0;
  background: #000; color: #fff; overflow: hidden;
}
.landing-shots { position: absolute; inset: 0; }
.landing-shots img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05); opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.landing-shots img.on { opacity: 1; }
.landing-credit { position: absolute; z-index: 2; left: 24px; bottom: 18px; }
.landing-credit .credit { color: rgba(255, 255, 255, .6); text-shadow: 0 0 2px #000; }
.landing-word {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
  color: #fff; font-size: clamp(64px, 10vw, 140px); font-weight: 550; letter-spacing: -.045em;
  line-height: 1; text-decoration: none; text-shadow: 0 0 2px #000, 0 0 24px #000;
}
.landing-word span { color: #34d39e; }
.landing-bar { display: none; }
.app.landing .landing-bar {
  position: fixed; z-index: 2; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px 28px 0; background: none;
}
.landing-links { grid-column: 2; display: flex; gap: 28px; }
.landing-bar a {
  color: #fff; font-size: 14px; font-weight: 500; text-decoration: none;
  text-shadow: 0 0 2px #000, 0 0 16px #000;
}
.landing-bar a.on { text-decoration: underline; text-underline-offset: 6px; }
.landing-bar .landing-dash {
  grid-column: 3; justify-self: end; height: 36px; display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 999px; background: #34d39e; color: #fff; text-shadow: none;
}
.app.panel-open .landing-word { visibility: hidden; }
[data-landing-only] .landing-dash { display: none; }
.landing-panel {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(720px, calc(100% - 48px)); color: #fff; font-weight: 700; text-align: center;
}
.landing-panel h2 { margin: 0 0 14px; font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.landing-panel p { margin: 0; font-size: 17px; line-height: 1.5; color: #eee; }
.landing-panel span { color: #34d39e; }
.landing-example {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0 0;
}
.landing-example img { display: block; width: 100%; border-radius: 10px; }
.landing-example small { display: block; margin-top: 10px; font-size: 13px; font-weight: 500; color: #bbb; }
.landing-example figcaption { grid-column: 1 / -1; }
.landing-example .credit { color: rgba(255, 255, 255, .5); font-weight: 400; }
.landing-go {
  display: inline-flex; margin-top: 22px; height: 44px; align-items: center; padding: 0 18px;
  border-radius: 999px; background: #fff; color: #0f0f10; text-decoration: none; font-weight: 550;
}
