
      /* Palette and chrome track the VitePress docs theme so the app and docs
         read as one product: diff-green brand, neutral VitePress grays, Inter +
         mono fonts, and green links / active states. The diff trio (add green,
         remove red, change amber) carries through to badges. Dark is the default
         (and only) theme — the app is dark-first, matching the docs. */
      :root {
        color-scheme: dark;
        --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        --font-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
        font-family: var(--font-sans);
        --canvas: #161618;
        --surface: #1b1b1f;
        --surface-muted: #202127;
        --border: #2e2e32;
        --border-strong: #3c3f44;
        --fg: #e3e3e0;
        --muted: #98989f;
        --accent: #3ad17f;
        --header-bg: #161618;
        --header-fg: #e3e3e0;
        --header-muted: #98989f;
        --success: #3dd68c;
        --success-bg: rgba(46, 194, 126, 0.16);
        --danger: #f0716a;
        --danger-bg: rgba(240, 113, 106, 0.16);
        --change: #e3b357;
        --neutral-bg: rgba(152, 152, 159, 0.16);
        --primary: #1f9d55;
        --primary-hover: #2ec27e;
        --code-bg: #202127;
        --code-fg: #e3e3e0;
        --radius: 8px;
      }
      * { box-sizing: border-box; }
      body { margin: 0; line-height: 1.55; background: var(--canvas); color: var(--fg); }
      a { color: var(--accent); text-decoration: none; }
      a:hover { text-decoration: underline; }
      h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
      h1 { font-size: 1.7rem; }
      /* VitePress-style section break: a hairline divider above each h2. */
      /* Plain by default; .h2-rule opts a section heading into the divider look. */
      h2 { margin-top: 2rem; font-size: 1.3rem; }
      h2.h2-rule { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }

      /* Light nav bar with a hairline base, mirroring the VitePress top nav. */
      header.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.5rem; background: var(--header-bg); color: var(--header-fg); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
      header.bar .brand { font-weight: 700; color: var(--header-fg); font-size: 1.05rem; }
      header.bar .brand:hover { text-decoration: none; opacity: 0.8; }
      nav.links { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
      nav.links a { color: var(--header-muted); font-size: 0.9rem; font-weight: 500; }
      nav.links a:hover { color: var(--header-fg); text-decoration: none; }
      nav.links a.active { color: var(--accent); font-weight: 600; }

      main { padding: 1.75rem 2rem 3rem; }
      main.narrow { max-width: 800px; margin: 0 auto; }
      footer.foot { border-top: 1px solid var(--border); color: var(--muted); padding: 1.5rem; text-align: center; font-size: 0.85rem; }
      footer.foot a { color: var(--muted); }

      code, pre, kbd { font-family: var(--font-mono); }
      /* Inline code keeps a subtle brand tint, as in the VitePress docs. */
      code { background: var(--neutral-bg); color: var(--accent); border-radius: 0.3rem; padding: 0.1rem 0.4rem; font-size: 0.85em; }
      pre.code { background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; padding: 0.9rem 1.1rem; font-size: 0.82rem; line-height: 1.5; }
      pre.code code { background: none; padding: 0; font-size: inherit; color: inherit; }

      /* Bordered "box" wrapping a list/table. */
      .box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
      .box table { margin: 0; }
      .box table tr:last-child td { border-bottom: none; }

      table { border-collapse: collapse; width: 100%; margin-top: 0.5rem; }
      th, td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; vertical-align: middle; }
      thead th { background: var(--surface-muted); font-size: 0.8rem; font-weight: 600; color: var(--muted); }
      .box tbody tr:hover { background: var(--surface-muted); }

      .badge { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.75rem; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
      .passed, .updated, .approved { background: var(--success-bg); color: var(--success); border-color: var(--success); }
      .failed, .missing, .error, .rejected { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
      .pending, .captured { background: var(--neutral-bg); color: var(--muted); border-color: var(--border-strong); }
      .muted { color: var(--muted); }

      /* Pill-shaped, like the VitePress CTA buttons. */
      .btn { display: inline-block; border-radius: 999px; padding: 0.45rem 1.15rem; font-size: 0.9rem; font-weight: 500; border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
      .btn:hover { text-decoration: none; background: var(--surface-muted); border-color: var(--border-strong); }
      .btn-primary { background: var(--primary); color: #fff; border-color: rgba(31, 35, 40, 0.15); }
      .btn-primary:hover { background: var(--primary-hover); color: #fff; }
      .btn-danger { color: var(--danger); border-color: var(--border-strong); }
      .btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
      .btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }

      /* Per-repository tabbed sub-navigation (underline tabs). */
      nav.tabs { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--border); margin: 0.5rem 0 1.5rem; }
      nav.tabs .tab { color: var(--muted); padding: 0.5rem 0.1rem; border-bottom: 2px solid transparent; font-weight: 500; }
      nav.tabs .tab:hover { color: var(--fg); text-decoration: none; }
      nav.tabs .tab.active { color: var(--fg); font-weight: 600; border-bottom-color: var(--accent); }

      /* Settings layout: left side-nav + content pane. Used by user settings
         and repo settings. Collapses to a single column on narrow screens. */
      .settings-layout { display: flex; gap: 2rem; align-items: flex-start; }
      .bar-right { display: flex; align-items: center; gap: 1rem; }
      .bar-link { color: var(--header-muted); font-size: 0.9rem; font-weight: 500; }
      .bar-link:hover { color: var(--header-fg); text-decoration: none; }
      .avatar-menu summary.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--header-fg); }
      .avatar-menu summary.avatar::after { content: ""; }
      .avatar-menu summary.avatar svg { width: 16px; height: 16px; }
      .avatar-menu .dropdown-menu { width: 11rem; }
      .menu-sep { border: 0; border-top: 1px solid var(--border); margin: 0.35rem 0; }
      .repo-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
      .repo-card .repo-card-name { font-weight: 600; font-size: 1.05rem; }
      .mt-xs { margin-top: 0.35rem; }
      /* Header breadcrumb: brand mark, team, repo. */
      .crumb-bar { display: flex; align-items: center; gap: 0.4rem; min-width: 0; flex-wrap: wrap; }
      .crumb-bar .brand { display: inline-flex; margin-right: 0.35rem; }
      .crumb-bar .crumb { color: var(--header-fg); font-weight: 500; }
      .crumb-bar .crumb-repo { font-weight: 700; }
      .crumb-sep { color: var(--muted); }
      .crumb-switch > summary { color: var(--muted); padding: 0 0.15rem; font-size: 1rem; }
      .crumb-switch .dropdown-menu { left: 0; right: auto; width: 15rem; font-size: 0.95rem; }
      .org-avatar.xs { width: 26px; height: 26px; border-radius: 6px; font-size: 0.9rem; }
      .org-head { display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 1rem; }
      .org-head h1 { margin: 0; }
      .org-avatar { width: 48px; height: 48px; border-radius: 10px; background: var(--accent); color: #0c1210; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; flex: none; }
      img.org-avatar { object-fit: cover; background: var(--surface); }
      /* Section heading with a control on the right (e.g. "+ Add"). */
      .split-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
      .split-head h2 { margin: 0; }
      .settings-layout > .side-nav { flex: 0 0 13rem; display: flex; flex-direction: column; gap: 0.15rem; }
      .settings-layout > .settings-content { flex: 1; min-width: 0; }
      /* Section bodies reuse .panel.mt-lg from the old tabbed shell; the first
         block must sit flush with the side-nav's top. */
      .settings-content > .panel:first-child { margin-top: 0; }
      .side-nav a { color: var(--muted); padding: 0.45rem 0.7rem; border-radius: var(--radius); border-left: 2px solid transparent; font-weight: 500; }
      .side-nav a:hover { color: var(--fg); background: var(--surface-muted); text-decoration: none; }
      .side-nav a.active { color: var(--fg); font-weight: 600; border-left-color: var(--accent); background: var(--surface); }
      @media (max-width: 700px) {
        .settings-layout { flex-direction: column; }
        .settings-layout > .side-nav { flex-direction: row; flex-wrap: wrap; flex-basis: auto; }
      }

      /* Empty state and the link-repository form on the profile. */
      .empty { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 2.5rem 1.5rem; text-align: center; }
      .empty h2 { margin: 0 0 0.4rem; }
      .empty .link-repo { max-width: 22rem; margin: 1rem auto 0; text-align: left; }
      /* "New repository" dropdown — CSP-safe native <details>. */
      /* Shared page header: h1 left, optional action right — one rhythm on every page. */
      .page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0.25rem 0 1.25rem; }
      .page-head h1 { margin: 0; }
      details.dropdown { position: relative; }
      details.dropdown > summary { list-style: none; cursor: pointer; }
      details.dropdown > summary::-webkit-details-marker { display: none; }
      details.dropdown > summary::after { content: " ▾"; }
      details.dropdown[open] > summary::after { content: " ▴"; }
      .dropdown-menu { position: absolute; right: 0; z-index: 20; margin-top: 0.5rem; width: min(24rem, 92vw); border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
      .dropdown-section { padding: 0.9rem 1rem; }
      .dropdown-section + .dropdown-section { border-top: 1px solid var(--border); }
      .dropdown-section.is-disabled { opacity: 0.6; }
      .dropdown-title { margin: 0 0 0.3rem; font-weight: 600; }
      .dropdown-hint { margin: 0 0 0.6rem; font-size: 0.85rem; }
      /* Branch selector on the repo Runs/Analytics tabs. */
      .branch-filter { display: inline-block; margin: 0 0 1rem; }
      .branch-filter .dropdown-menu { left: 0; right: auto; width: max(12rem, 16vw); padding: 0.3rem; }
      .team-opt { display: block; width: 100%; text-align: left; padding: 0.4rem 0.6rem; border: 0; background: none; color: var(--fg); font: inherit; cursor: pointer; border-radius: var(--radius); }
      .team-opt:hover { background: var(--surface-2, rgba(127,127,127,0.12)); text-decoration: none; }
      .team-opt.is-active { color: var(--muted); cursor: default; }
      .team-opt.manage { border-top: 1px solid var(--border); margin-top: 0.3rem; padding-top: 0.5rem; color: var(--muted); }
      .role-select { padding: 0.2rem 0.3rem; }
      .rename-input { min-width: 10rem; }
      .panel.danger-zone { border-color: var(--danger); }
      /* Type-to-confirm delete disclosure (repo Settings > General). */
      details.danger-confirm > summary { list-style: none; display: inline-block; cursor: pointer; }
      details.danger-confirm > summary::-webkit-details-marker { display: none; }
      /* Source-platform mark next to a repository's remote URL. */
      .provider-icon { width: 1rem; height: 1rem; vertical-align: -0.15rem; margin-right: 0.35rem; }
      form.link-repo { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
      form.link-repo label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
      form.link-repo input { min-width: 16rem; }
      /* Stacked form: label above input, hint below — for multi-field forms.
         link-repo stays for the compact single-field + button rows. */
      form.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; max-width: 26rem; }
      form.stack .field { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; }
      form.stack label { font-weight: 600; }
      form.stack input, form.stack select { width: 100%; box-sizing: border-box; }
      .hint { margin: 0; font-size: 0.85rem; color: var(--muted); }

      .banner-warn { border: 1px solid var(--danger); background: var(--danger-bg); border-radius: var(--radius); padding: 0.8rem 1rem; }
      /* Success-toned counterpart for sentence-length notices (info notices,
         the closed-beta banner) — unlike .badge it wraps inside its card. */
      .banner-info { border: 1px solid var(--success); background: var(--success-bg); border-radius: var(--radius); padding: 0.8rem 1rem; }

      .hero .tagline { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0; }

      /* Landing hero: a monospace, diff-green gradient name over a single soft
         green halo. The brand mark keeps its own solid color. */
      .hero-lg { position: relative; text-align: center; padding: 4rem 0 2rem; }
      .hero-lg::before {
        content: "";
        position: absolute; top: 0.5rem; left: 50%;
        width: min(640px, 90vw); height: 300px;
        transform: translateX(-50%);
        background: radial-gradient(50% 55% at 50% 40%, rgba(46, 194, 126, 0.26), rgba(46, 194, 126, 0) 70%);
        filter: blur(46px);
        z-index: 0; pointer-events: none;
      }
      .hero-lg > * { position: relative; z-index: 1; }
      .hero-lg h1 { font-family: var(--font-mono); letter-spacing: -0.03em; font-size: clamp(2.1rem, 5vw, 2.75rem); line-height: 1.1; margin: 0 0 0.7rem; }
      .hero-lg .tagline { max-width: 560px; margin: 0 auto; font-size: 1.12rem; }

      /* Hero live diff — the animated terminal from the docs' LiveDiff
         component, ported: a looping, typed-out sequence of real semantic
         diffs. Static first frame is server-rendered; the nonced CAST_SCRIPT
         animates it unless prefers-reduced-motion. */
      .live-diff { width: 100%; max-width: 860px; margin: 2rem auto 0; text-align: left; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.65); font-family: var(--font-mono); }
      .ld-chrome { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--neutral-bg); border-bottom: 1px solid var(--border); }
      .ld-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
      .ld-dot-red { background: #ff7b72; }
      .ld-dot-amber { background: #d29922; }
      .ld-dot-green { background: #3ad17f; }
      /* Home swarm-demo video, framed like a browser window (reuses .ld-dot). */
      .swarm-showcase { text-align: center; }
      .swarm-showcase > p.muted { margin-left: auto; margin-right: auto; }
      .demo-frame { width: 100%; max-width: 900px; margin: 1.7rem auto 1.1rem; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.65); }
      .demo-chrome { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--neutral-bg); border-bottom: 1px solid var(--border); }
      .demo-url { margin-left: 8px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); }
      .demo-video { display: block; width: 100%; height: auto; background: #0d0e11; }
      .ld-title { margin-left: 8px; font-size: 12px; color: var(--muted); }
      .ld-body { padding: 16px 18px; min-height: 208px; font-size: 13.5px; line-height: 1.7; }
      .ld-line { white-space: pre-wrap; word-break: break-word; color: var(--fg); }
      .ld-meta { color: var(--muted); }
      .ld-out { color: var(--fg); opacity: 0.85; }
      .ld-cmd { color: var(--fg); }
      .ld-prompt { color: #3ad17f; }
      .ld-add { color: #3ad17f; }
      .ld-del { color: #ff7b72; }
      .ld-chg { color: #d29922; }
      .ld-cursor { display: inline-block; width: 7px; height: 1em; margin-left: 1px; vertical-align: text-bottom; background: #3ad17f; animation: ld-blink 1s steps(2, start) infinite; }
      @keyframes ld-blink { to { opacity: 0; } }
      @media (prefers-reduced-motion: reduce) { .ld-cursor { animation: none; } }
      .hero-eyebrow { display: flex; align-items: center; justify-content: center; gap: 0.45rem; font-family: var(--font-mono); font-size: 1rem; font-weight: 600; letter-spacing: 0.01em; margin: 0 0 0.7rem; }
      .hero-name {
        background: linear-gradient(120deg, #2ec27e 30%, #178a4c);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
      }

      /* Marketing home — a calmer, more spacious take on the shared chrome:
         wider column, whitespace-led sections (no doc-style h2 dividers), and
         cards that lift on hover with a small neutral icon chip. */
      main.home { max-width: 960px; margin: 0 auto; }
      .home section { margin-top: 3.75rem; }
      .home > section:first-child { margin-top: 0; }
      .home h2 { margin: 0 0 0.5rem; font-size: 1.35rem; letter-spacing: -0.01em; }
      .home section > p.muted { max-width: 900px; }
      .home .features { margin-top: 1.6rem; gap: 1.1rem; }
      .home .features .card {
        padding: 1.15rem 1.25rem; border-radius: 12px;
        transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
      }
      .home .features .card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-muted); }
      .home .features a.card { display: block; color: inherit; text-decoration: none; }
      .home .features .card h3 { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.55rem; font-size: 1rem; font-weight: 600; }
      .home .features .card p { font-size: 0.88rem; line-height: 1.55; }
      .feat-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 2rem; height: 2rem; border-radius: 9px; font-size: 1rem; background: var(--neutral-bg); border: 1px solid var(--border); }
      .home pre.code { border-radius: 12px; padding: 1.1rem 1.25rem; }
      .home .hero-cta { margin-top: 1.7rem; }

      .grid2 { display: grid; gap: 1.5rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
      @media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

      .panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1.25rem 1.4rem; }
      .panel h2 { margin-top: 0; }

      ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
      ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.4rem 2.6rem; }
      ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
      ol.steps > li:last-child { padding-bottom: 0; }
      ol.steps h3 { margin: 0.1rem 0 0.4rem; font-size: 1rem; }

      .toc { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0.8rem 1.2rem; margin: 1.5rem 0; }
      .toc strong { display: block; margin-bottom: 0.4rem; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
      .toc ul { columns: 2; margin: 0; padding-left: 1.1rem; }
      @media (max-width: 600px) { .toc ul { columns: 1; } }

      .signin label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
      input, select, textarea, button { font: inherit; padding: 0.45rem 0.6rem; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: inherit; }
      input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
      ::placeholder { color: var(--muted); opacity: 0.7; }
      input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
      textarea { width: 100%; min-height: 3rem; }

      pre.diff { background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; padding: 0.8rem; white-space: pre-wrap; margin: 0; }
      /* Structured keyed-record diff (check/performance targets). */
      .chg-box { margin-bottom: 0.8rem; }
      .chg-box td { vertical-align: top; }
      .chg-val { white-space: pre-wrap; word-break: break-word; font-size: 0.8rem; }
      .chg-arrow { color: var(--muted); }
      .chg-chips { display: inline-flex; gap: 0.35rem; margin-left: 0.5rem; }
      tr.chg-risky td { background: var(--danger-bg); }

      /* Code-review "files changed" experience for a run's results. */
      .review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
      .review-toolbar .actions { display: flex; gap: 0.5rem; }
      .review-toolbar .btn { padding: 0.3rem 0.7rem; font-size: 0.82rem; }

      details.file { border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); margin-top: 0.8rem; overflow: hidden; }
      details.file.file-failed, details.file.file-error, details.file.file-missing { border-left-color: var(--danger); }
      details.file.file-passed, details.file.file-updated { border-left-color: var(--success); }
      details.file.viewed { border-left-color: var(--success); opacity: 0.75; }

      summary.file-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.9rem; cursor: pointer; list-style: none; user-select: none; }
      summary.file-head::-webkit-details-marker { display: none; }
      summary.file-head:hover { background: var(--surface-muted); }
      .file-head .chevron { color: var(--muted); transition: transform 0.15s; flex: none; }
      .file-head .chevron::before { content: "▶"; font-size: 0.7rem; }
      details.file[open] .file-head .chevron { transform: rotate(90deg); }
      .file-head .file-name { font-weight: 600; }
      details.file.viewed .file-head .file-name { text-decoration: line-through; }
      .file-head .file-path { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .file-head .file-spacer { flex: 1; }
      .file-head .viewed { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--muted); font-weight: 500; padding: 0.15rem 0.4rem; border-radius: var(--radius); flex: none; }
      .file-head .viewed:hover { background: var(--neutral-bg); color: var(--fg); }
      .file-body { padding: 0.9rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.9rem; }

      details.raw { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-muted); }
      details.raw > summary { cursor: pointer; padding: 0.5rem 0.7rem; font-size: 0.82rem; color: var(--muted); font-weight: 500; list-style: none; }
      details.raw > summary::-webkit-details-marker { display: none; }
      details.raw > summary::before { content: "▶ "; font-size: 0.7rem; }
      details.raw[open] > summary::before { content: "▼ "; }
      details.raw > summary:hover { color: var(--fg); }
      details.raw pre.diff { border: none; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface); }
      .screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
      .marker-head { margin: 1.25rem 0 0; font-size: 0.85rem; color: var(--muted); }
      .screenshots figure { margin: 0; }
      .screenshots figcaption { font-weight: 600; margin-bottom: 0.3rem; font-size: 0.85rem; }
      .screenshots img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

      /* Screenshot comparison: CSS-only radio toggle between side-by-side and
         onion skin; the opacity slider is wired in REVIEW_SCRIPT. */
      .shotcmp > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
      .cmp-bar { display: flex; gap: 0.5rem; align-items: center; margin: 1rem 0 0.25rem; }
      .cmp-bar .onion-range { display: none; margin-left: 0.4rem; padding: 0; }
      .shotcmp .cmp-onion-view { display: none; }
      .shotcmp .cmp-onion:checked ~ .cmp-side-view { display: none; }
      .shotcmp .cmp-onion:checked ~ .cmp-onion-view { display: block; margin-top: 0.75rem; }
      .shotcmp .cmp-onion:checked ~ .cmp-bar .onion-range { display: inline-block; }
      .shotcmp .cmp-side:checked ~ .cmp-bar label[for$="-side"],
      .shotcmp .cmp-onion:checked ~ .cmp-bar label[for$="-onion"] { border-color: var(--accent); color: var(--accent); }
      /* GitHub-Actions-style review shell: sticky section nav + content. */
      .gha { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: start; margin-top: 1rem; }
      .gha-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.15rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0.6rem 0; font-size: 0.9rem; }
      .gha-side a { color: var(--fg); padding: 0.3rem 0.9rem; border-left: 2px solid transparent; }
      .gha-side a:hover { background: var(--surface-muted); text-decoration: none; }
      .gha-side a.gha-sub { padding-left: 1.7rem; color: var(--muted); font-family: var(--font-mono); font-size: 0.82rem; }
      .gha-main { min-width: 0; }
      @media (max-width: 900px) { .gha { grid-template-columns: 1fr; } .gha-side { position: static; flex-direction: row; flex-wrap: wrap; } }

      /* Pushes: commit-style rows, the run under review highlighted. */
      .push-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
      .push-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.9rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
      .push-row:last-child { border-bottom: none; }
      .push-row.current { background: var(--surface-muted); box-shadow: inset 2px 0 0 var(--accent); }
      .push-row .push-spacer { flex: 1; }

      /* Snapshot slideshow header: a narrow, wide filmstrip of a directory's
         images, like a video editor's timeline. */
      .filmstrip { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 0.75rem; }
      .filmstrip .frame { position: relative; flex: none; height: 64px; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; background: #fff; }
      .filmstrip .frame img { display: block; height: 100%; width: auto; max-width: 140px; object-fit: cover; }
      .filmstrip .frame:hover { border-color: var(--accent); }
      .filmstrip .frame .frame-meta { position: absolute; right: 2px; bottom: 2px; font-size: 0.65rem; background: rgba(0,0,0,0.55); color: #fff; border-radius: 2px; padding: 0 3px; }

      .history-row .cmp-bar label { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
      .history-row .cmp-bar .onion-range { display: inline-block; }

      .onion-stack { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; max-width: 60rem; }
      .onion-stack img { display: block; width: 100%; height: auto; }
      .onion-stack .onion-top { position: absolute; inset: 0; opacity: 0.5; }
      form.review { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.2rem; margin-top: 0; }
      form.review h2 { margin-top: 0; }
      form.review label { display: block; font-weight: 600; margin-top: 0.6rem; }
      form.review button { margin-top: 0.8rem; }
      form.review select, form.review textarea { width: 100%; }

      /* PR-style verdict header: the current review state up front. */
      .verdict-box { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1.2rem; border: 1px solid var(--border-strong); border-radius: var(--radius); margin: 1rem 0; }
      .verdict-box.approved { border-color: var(--success); }
      .verdict-box.rejected { border-color: var(--danger); }

      /* PR-style timeline: decisions joined by a connector line. */
      .timeline { max-width: 48rem; }
      .timeline .audit-item { position: relative; padding-bottom: 0.9rem; }
      .timeline .audit-item:not(:last-child)::before { content: ""; position: absolute; left: 0.7rem; top: 1.6rem; bottom: -0.2rem; width: 2px; background: var(--border); }

      /* Compact audit trail: one check/pending/declined marker per decision. */
      .audit-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
      .audit-item { display: flex; gap: 0.6rem; align-items: flex-start; }
      .audit-icon { flex: none; width: 1.4rem; height: 1.4rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; border: 1px solid transparent; }
      .audit-icon.approved { background: var(--success-bg); color: var(--success); border-color: var(--success); }
      .audit-icon.rejected { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
      .audit-icon.pending { background: var(--neutral-bg); color: var(--muted); border-color: var(--border-strong); }
      .audit-body { min-width: 0; }
      .audit-who { font-weight: 600; font-size: 0.85rem; word-break: break-word; }
      .audit-note { font-size: 0.82rem; }
      .audit-when { font-size: 0.75rem; }
      .audit-edit { margin-top: 0.35rem; }
      .audit-edit > summary { cursor: pointer; list-style: none; color: var(--accent); font-size: 0.82rem; }
      .audit-edit > summary::-webkit-details-marker { display: none; }
      .audit-edit > summary::after { content: " ▾"; }
      .audit-edit[open] > summary::after { content: " ▴"; }
      .audit-edit form.review { margin-top: 0.6rem; }

      .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 1rem 0; }
      .card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 0.9rem 1rem; }
      .card .value { font-size: 1.8rem; font-weight: 700; }
      .card .label { font-size: 0.8rem; color: var(--muted); }
      .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
      .features .card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
      .trend { display: flex; align-items: stretch; gap: 4px; height: 120px; margin-top: 0.5rem; }
      .trend .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
      .trend .stack { width: 100%; background: rgba(46, 194, 126, 0.45); border-radius: 3px 3px 0 0; }
      .trend .stack .fail { background: rgba(229, 83, 75, 0.6); border-radius: 3px 3px 0 0; }
      .trend .day { font-size: 0.65rem; color: var(--muted); transform: rotate(-45deg); white-space: nowrap; }
      .meter { display: inline-block; width: 90px; height: 0.6rem; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; vertical-align: middle; }
      .meter > span { display: block; height: 100%; background: var(--danger); }

      /* Utility classes replace inline style attributes so the CSP can drop
         unsafe-inline for styles. Dynamic values (trend bars, meters) live in
         a per-page nonced style block instead. */
      .w-full { width: 100%; }
      .inline { display: inline; }
      .text-right { text-align: right; }
      .fw-normal { font-weight: normal; }
      .mt-0 { margin-top: 0; }
      .mt-sm { margin-top: 0.8rem; }
      .mt-lg { margin-top: 2rem; }
      .mb-0 { margin-bottom: 0; }
      .mb-xs { margin-bottom: 0.2rem; }
      .mb-sm { margin-bottom: 0.8rem; }
      .auth-main { max-width: 26rem; margin: 3rem auto; }

      /* Admin panel (Phase 20): stat tiles, inline-SVG charts, wide tables. */
      .admin-main { max-width: 1080px; margin: 0 auto; }
      .admin-main .panel { margin-bottom: 0.8rem; }
      .admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
      .admin-head nav { margin-top: 0; }
      .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 0.5rem 0 1.2rem; }
      @media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
      .stat-tile { margin-bottom: 0 !important; padding: 0.9rem 1.1rem; }
      .stat-value { font-size: 1.55rem; font-weight: 700; line-height: 1.25; }
      .admin-range { margin: 0 0 1rem; }
      .chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
      @media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
      .chart-grid .panel { margin-bottom: 0; }
      .chart { margin: 0; }
      .chart figcaption { font-weight: 600; margin-bottom: 0.5rem; }
      .chart svg { display: block; width: 100%; height: auto; }
      .chart-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.5rem; }
      .chart-key { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); }
      .chart-chip { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
      .admin-table td.num, .admin-table th.num { text-align: right; }
      .inline-form { display: flex; gap: 0.4rem; }
      .admin-filters { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; flex-wrap: wrap; }
      .admin-filters label { color: var(--muted); font-size: 0.85rem; }
      .auth-card h1 { margin-top: 0; }
      .auth-card label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.2rem; }
      .oauth { display: flex; flex-direction: column; gap: 0.6rem; }
      .btn-oauth { text-align: center; }
      .or { display: flex; align-items: center; gap: 0.8rem; color: var(--muted); margin: 1rem 0; }
      .or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
      .hint { font-size: 0.8rem; }
      .verify-banner { border-color: var(--border-strong); }
      .hero-cta { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
      .hero-oauth { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 0.8rem; }
      .btn-lg { padding: 0.6rem 1.4rem; font-size: 1.02rem; }
      .btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
      .local-strip { margin-top: 2rem; opacity: 0.92; }
      .roadmap-list { margin-top: 1.5rem; }
      .roadmap-item { display: flex; gap: 1rem; align-items: center; padding: 0.9rem 0; border-top: 1px solid var(--border); }
      .roadmap-body { flex: 1; }
      .rank-num { min-width: 2rem; font-weight: 700; font-size: 1.1rem; color: var(--accent, #4f46e5); text-align: center; }
      .rank-controls { display: inline-flex; flex-direction: column; gap: 0.2rem; align-items: center; color: var(--muted); text-decoration: none; line-height: 1; }
      .rank-move { padding: 0.15rem 0.55rem; font-size: 0.7rem; line-height: 1.4; }
      .rank-move:disabled { opacity: 0.3; cursor: default; }
      .rank-controls.signin { font-size: 0.75rem; text-align: center; }
      .badge.cat { font-weight: normal; }
      .badge.status { font-weight: 600; }
      .badge.status-proposed { background: var(--neutral-bg); color: var(--muted); border-color: var(--border-strong); }
      .badge.status-planned { background: var(--neutral-bg); color: var(--fg); border-color: var(--border-strong); }
      .badge.status-in-progress { background: var(--success-bg); color: var(--success); border-color: var(--success); }
      .badge.status-shipped { background: rgba(58, 209, 127, 0.28); color: var(--success); border-color: var(--success); }
      .brand { display: inline-flex; align-items: center; gap: 0.4rem; }
      .brand-mark { display: inline-flex; width: 1.4em; height: 1.4em; }
      .brand-mark svg { width: 100%; height: 100%; }
      .hero-mark { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.1em; color: var(--success); }
      .hero-mark svg { width: 100%; height: 100%; }

      /* Skeleton loaders (HEN-489): while a navigation/submit is in flight the
         SKELETON_SCRIPT overlays <main> with shimmer bars approximating the
         destination's layout. Overlay-on-top (never replacing content) so a
         bfcache restore just removes the overlay and the page is intact. */
      main { position: relative; }
      .skeleton-overlay { position: absolute; inset: 0; z-index: 5; background: var(--canvas); display: flex; flex-direction: column; align-content: flex-start; gap: 0.8rem; padding: 1.75rem 2rem; min-height: 60vh; }
      .sk-block { border-radius: var(--radius); flex: none; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-muted) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk-shimmer 1.2s ease-in-out infinite; height: 1rem; width: 100%; }
      @keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
      @media (prefers-reduced-motion: reduce) { .sk-block { animation: none; background: var(--surface); } }
      /* Every variant leads with a title bar + tab strip so the chrome doesn't jump. */
      .skeleton-overlay .sk-block:nth-child(1) { height: 1.8rem; width: 35%; }
      .skeleton-overlay .sk-block:nth-child(2) { height: 2.2rem; width: 60%; }
      .skeleton-table .sk-block:nth-child(n+3) { height: 2.5rem; }
      .skeleton-review .sk-block:nth-child(3) { height: 4rem; width: 45%; }
      .skeleton-review .sk-block:nth-child(n+4) { height: 8rem; }
      .skeleton-cards { flex-flow: row wrap; }
      .skeleton-cards .sk-block:nth-child(1), .skeleton-cards .sk-block:nth-child(2) { flex-basis: 100%; }
      .skeleton-cards .sk-block:nth-child(n+3):nth-child(-n+5) { height: 5rem; flex: 1 1 25%; }
      .skeleton-cards .sk-block:nth-child(n+6) { height: 10rem; flex-basis: 100%; }
      .skeleton-lines .sk-block:nth-child(n+3) { height: 1.1rem; }
      .skeleton-lines .sk-block:nth-child(odd) { width: 85%; }
