/* ───────────────────────────────────────────────────────────────────────
   brandkit website
   Every color on this page is a brand.json palette member or a warm-tinted
   derivative of #1C1917. The site IS the demo — palette-bound by construction.
   ─────────────────────────────────────────────────────────────────────── */
:root {
  /* brand.json palette — load-bearing, do not edit independent of brand.json */
  --p-ink:      #1C1917;
  --p-bg:       #FAFAF9;
  --p-primary:  #5B21B6;
  --p-accent:   #10B981;
  --p-warn:     #F43F5E;

  /* Warm-tinted neutrals derived from --p-ink (Stone scale, palette-safe) */
  --bg:         var(--p-ink);
  --surface-1:  #211D1B;   /* code, swatch trays */
  --surface-2:  #292524;   /* cards */
  --surface-3:  #312A26;   /* hover, raised */
  --line:       #3F3934;
  --line-soft:  #2C2724;

  --ink:        var(--p-bg);
  --muted:      #A8A29E;
  --muted-2:    #78716C;
  --muted-3:    #57524C;

  /* Off-white that's a derivative of --p-bg — used wherever the mark needs a light surface
     without printing pure #FFFFFF on the page. */
  --light:      #F5F5F4;

  --primary:        var(--p-primary);
  --primary-hover:  #6D28D9;
  --verified:       var(--p-accent);
  --fail:           var(--p-warn);

  --max:   1100px;
  --gap:   1.5rem;
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* very subtle radial warmth so the page isn't dead-flat */
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(91,33,182,0.10), transparent 60%),
    radial-gradient(ellipse 60% 30% at 100% 0%, rgba(16,185,129,0.05), transparent 70%);
  background-attachment: fixed;
}

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.12s, color 0.12s;
}
a:hover { border-bottom-color: var(--verified); color: var(--verified); }

code, pre, .mono {
  font-family: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  font-size: 0.875em;
  font-feature-settings: "ss02", "ss03";
}

/* ───── Topbar ───── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Full-width sticky bar so the background gradient spans the viewport.
     Content edges stay aligned to the same --max column via padding —
     beyond --max the extra space goes into padding instead of margin. */
  padding: 0.55rem max(1.5rem, calc((100% - var(--max)) / 2 + 1.5rem));
  max-width: none;
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(28,25,23,0.92) 70%, rgba(28,25,23,0.0));
  backdrop-filter: blur(6px);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  border: none;
  font-size: 1rem;
}
.topbar .brand img { display: block; }
.topbar nav { display: flex; gap: 1.25rem; align-items: center; }
.topbar nav a { color: var(--muted); border: none; font-size: 0.9rem; }
.topbar nav a:hover { color: var(--ink); }
.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem 0.4rem 0.65rem;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink) !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.gh-btn svg { display: block; flex: none; opacity: 0.92; }
.gh-btn:hover { background: var(--surface-3); border-color: var(--verified); color: var(--verified) !important; }
.gh-btn:hover svg { opacity: 1; }

main { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ───── Generic section heads ───── */
.sec-head { margin-bottom: 1.75rem; }

h1, h2, h3 {
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.1;
}
section h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  margin: 0 0 0.6rem;
}
section h2 br { display: inline; }

.muted { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.muted code { color: var(--ink); background: var(--surface-1); padding: 0.1em 0.4em; border-radius: 3px; }

/* ───── Section rule (palette-color divider) ───── */
.rule {
  display: flex;
  height: 1px;
  max-width: var(--max);
  margin: 0 auto;
  opacity: 0.6;
}
.rule span { flex: 1; }
.rule span:nth-child(1) { background: var(--p-bg); }
.rule span:nth-child(2) { background: var(--p-primary); }
.rule span:nth-child(3) { background: var(--p-accent); }
.rule span:nth-child(4) { background: var(--p-warn); }

/* ───── PROOF (hero + comparison fused) ───── */
section { padding: 2.75rem 0; }
.proof { padding: 2.5rem 0 3rem; }

.proof-head {
  max-width: 56rem;
  margin: 0 0 1.4rem;
}
.proof-head h1 {
  font-size: clamp(1.95rem, 4vw, 2.85rem);
  margin: 0 0 0.85rem;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.proof-head h1 br { display: inline; }
.proof-head .lede {
  font-size: 1.02rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 40rem;
  line-height: 1.5;
}
.proof-head .lede strong { color: var(--ink); font-weight: 600; }
.proof-head .lede .mono {
  background: var(--surface-1);
  padding: 0.12em 0.45em;
  border-radius: 3px;
  color: var(--ink);
  font-size: 0.85em;
  border: 1px solid var(--line-soft);
}

.cta { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #FAFAF9; border-bottom: none; }
.btn.primary:hover { background: var(--primary-hover); color: #FAFAF9; }
.btn.ghost { border-color: var(--line); color: var(--ink); border-bottom: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--verified); color: var(--verified); }
.btn-mono {
  font: 500 0.78rem/1 "Geist Mono", ui-monospace, monospace;
  background: rgba(255,255,255,0.12);
  padding: 3px 6px;
  border-radius: 3px;
  letter-spacing: -0.005em;
}

/* palette strip (sits between headline and the two cards) */
.palette-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--surface-1);
  font-size: 0.82rem;
  color: var(--muted);
}
.ps-lbl {
  font: 500 0.72rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ps-cap { color: var(--muted-2); font-size: 0.8rem; margin-left: auto; }

.palette {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.palette span {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font: 500 0.72rem/1.5 "Geist Mono", ui-monospace, monospace;
  color: #FAFAF9;
}

/* the two-up — wider, denser, fits above fold @1080p */
.two-up {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 0 0 0.85rem;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
}
.card.winner {
  border-color: rgba(16,185,129,0.55);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.35) inset, 0 0 32px -16px rgba(16,185,129,0.45);
}
.card-hd {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
}
.card-hd h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.card-tag {
  font: 600 0.65rem/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  padding: 4px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}
.card-tag.fail { color: var(--fail); background: rgba(244,63,94,0.10); border: 1px solid rgba(244,63,94,0.30); }
.card-tag.pass { color: var(--verified); background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.35); }

.art {
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: var(--light);
  border: 1px solid var(--line-soft);
}
.art-dark { background: var(--p-ink); border-color: var(--line); }
.art img { max-width: 70%; max-height: 78%; display: block; }
.art .comparison-svg { width: 70%; height: 78%; display: block; }

.metric {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.75rem;
}
.metric .num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  min-width: 2.2ch;
}
.metric-r { display: flex; flex-direction: column; gap: 2px; }
.metric .lbl   { color: var(--ink); font-size: 0.86rem; font-weight: 500; }
.metric .lbl-2 { color: var(--muted); font-size: 0.78rem; font-family: "Geist Mono", ui-monospace, monospace; }
.metric .lbl-2 code { background: transparent; padding: 0; color: var(--muted); }
.metric.pass .num { color: var(--verified); }
.metric.fail .num { color: var(--fail); }

.sw-cap {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.55rem 0 0;
  line-height: 1.45;
}
.sw-cap strong { color: var(--fail); font-weight: 600; }
.card.winner .sw-cap strong { color: var(--verified); }

/* ─── color-diff readout (FAIL: off → target / Δ; PASS: hex ✓) ──────── */
.diff-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.55rem 0.7rem;
  background: var(--surface-1);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
}
.diff-row {
  display: grid;
  grid-template-columns: 14px 64px 12px 14px 64px 1fr;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.diff-row .sw {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  outline: 1px solid rgba(255,255,255,0.06);
  outline-offset: -1px;
  display: inline-block;
}
.diff-row .hex {
  background: transparent;
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}
.diff-row .hex.got  { color: var(--muted); }
.diff-row .hex.want { color: var(--ink); }
.diff-row .arr {
  color: var(--muted-3);
  text-align: center;
  font-size: 0.85rem;
}
.diff-row .delta {
  color: var(--fail);
  font-weight: 600;
  text-align: right;
}
.diff-list.ok .diff-row {
  grid-template-columns: 14px 64px 1fr;
}
.diff-list.ok .hex { color: var(--ink); }
.diff-list.ok .check {
  color: var(--verified);
  font-weight: 700;
  text-align: right;
  font-size: 0.9rem;
}

.caveat {
  margin: 1.15rem 0 0;
  font-size: 0.82rem;
}
.caveat .cv-mark { color: var(--muted-2); margin-right: 0.4rem; }

/* ───── BUNDLE: step-count table ───── */
.bundle h2 { letter-spacing: -0.025em; }
.steps {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.92rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.steps th, .steps td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.steps tbody tr:last-child td { border-bottom: none; }
.steps th {
  font-weight: 500;
  color: var(--muted-2);
  font: 500 0.72rem/1 "Geist Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-1);
}
.steps tbody tr:hover { background: var(--surface-3); }
.steps tbody tr.winner { background: rgba(16,185,129,0.06); }
.steps tbody tr.winner:hover { background: rgba(16,185,129,0.10); }
.steps tbody tr.winner td:first-child strong { color: var(--verified); }
.steps td:last-child { width: 1%; text-align: right; padding-right: 1.2rem; }
.step-count {
  font: 600 1.35rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--fail);
  font-variant-numeric: tabular-nums;
}
.step-count.pass { color: var(--verified); }
.steps td code { background: var(--surface-1); padding: 0.12em 0.45em; border-radius: 3px; font-size: 0.85em; }

/* ───── CONTEXTUAL bundle mockups ───── */
.contextual { padding-bottom: 3rem; }
.ctx {
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  overflow: hidden;
}
.ctx figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-1);
  border-top: 1px solid var(--line-soft);
}
.ctx figcaption code { color: var(--ink); background: rgba(255,255,255,0.05); padding: 0.1em 0.35em; border-radius: 3px; }

/* 1. browser tab chrome */
.ctx-tab .tab-strip {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 8px 0;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line-soft);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  font-size: 0.8rem;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tab img { display: block; flex: none; }
.tab-active {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-color: var(--surface-2);
  margin-bottom: -1px;
  font-weight: 500;
}
.tab-dim {
  background: rgba(255,255,255,0.025);
  color: var(--muted-2);
  border: 1px solid transparent;
}
.tab-fav-stub {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--muted-3);
  display: inline-block;
}
.tab-x { color: var(--muted-3); margin-left: 4px; font-size: 0.95rem; line-height: 1; }
.tab-new {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 1.1rem;
  padding: 0 8px;
  align-self: center;
}
.addr-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 14px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.addr-lock { color: var(--verified); font-size: 0.85rem; }
.addr-url { color: var(--ink); }

/* 2. unfurl card */
.ctx-unfurl { padding: 1.25rem; }
.unfurl-card {
  display: flex;
  background: var(--surface-1);
  border-left: 4px solid var(--p-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  overflow: hidden;
  max-width: 580px;
}
.unfurl-bar { width: 0; }
.unfurl-body {
  padding: 0.9rem 1rem 1rem;
  flex: 1;
  min-width: 0;
}
.unfurl-site { margin: 0; font-size: 0.74rem; color: var(--muted-2); }
.unfurl-title { margin: 4px 0 4px; font-size: 0.95rem; color: var(--ink); font-weight: 600; line-height: 1.3; }
.unfurl-desc { margin: 0 0 0.7rem; font-size: 0.82rem; color: var(--muted); line-height: 1.4; }
.unfurl-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
}

/* 3. Chrome Web Store mock */
.ctx-cws { padding: 0; }
.cws-card { background: var(--light); color: #1C1917; }
.cws-marquee { display: block; width: 100%; height: auto; }
.cws-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border-top: 1px solid #E7E5E4;
}
.cws-icon {
  border-radius: 8px;
  display: block;
  flex: none;
  background: var(--light);
}
.cws-text { flex: 1; min-width: 0; }
.cws-title { margin: 0 0 2px; font-size: 1rem; font-weight: 600; color: #1C1917; }
.cws-sub   { margin: 0 0 4px; font-size: 0.78rem; color: #57524C; }
.cws-rate  { margin: 0; font-size: 0.78rem; color: #57524C; letter-spacing: 0.05em; }
.cws-rate .cws-n { color: #78716C; letter-spacing: 0; margin-left: 4px; }
.cws-btn {
  background: #1A73E8;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
  font-family: inherit;
}

/* size strip */
.bundle-caption { margin: 0.25rem 0 0.85rem; font-size: 0.82rem; }
.size-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ss-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 70px;
  height: 80px;
  background: var(--light);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  border-bottom: 1px solid var(--line-soft);
  color: #57524C;
  text-decoration: none;
  font: 500 0.7rem/1 "Geist Mono", ui-monospace, monospace;
  transition: outline 0.12s;
}
.ss-cell img { display: block; image-rendering: -webkit-optimize-contrast; }
.ss-cell:hover { outline: 2px solid var(--verified); outline-offset: 2px; color: var(--verified); }
.ss-cell span { color: #57524C; }
.ss-cell:hover span { color: var(--verified); }

/* ───── TRY (interactive hex-snap) ───── */
.try-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.4rem 1.35rem;
}
.try-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.try-input {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.try-input:focus-within {
  border-color: var(--verified);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
.try-lbl {
  font: 500 0.72rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.try-input input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font: 500 0.95rem/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: -0.005em;
  width: 8ch;
  padding: 0;
}
#snap-random { font-size: 0.85rem; padding: 0.55rem 0.85rem; }

.try-result {
  background: var(--surface-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1.25rem 1rem;
  position: relative;
}
.try-result::before {
  /* palette ribbon, mirrors .codeblock */
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 50px;
  height: 8px;
  background:
    linear-gradient(to right,
      #FAFAF9 0 20%, transparent 20% 22%,
      #5B21B6 22% 42%, transparent 42% 44%,
      #10B981 44% 64%, transparent 64% 66%,
      #F43F5E 66% 86%, transparent 86% 88%,
      #1C1917 88% 100%);
  border-radius: 2px;
  outline: 1px solid rgba(255,255,255,0.06);
  pointer-events: none;
}
.chip-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}
.chip-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.chip-col-out { align-items: flex-end; text-align: right; }
.chip-cap {
  font: 500 0.7rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chip {
  width: 100%;
  height: 64px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: 1px solid rgba(255,255,255,0.05);
  outline-offset: -1px;
  transition: background 0.18s ease;
}
.chip-hex {
  font: 600 0.9rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--p-ink);
  background: rgba(250,250,249,0.85);
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: -0.01em;
  mix-blend-mode: normal;
}
.chip-meta {
  font: 500 0.78rem/1.4 "Geist Mono", ui-monospace, monospace;
  color: var(--muted);
}
.chip-meta strong.ok { color: var(--verified); font-weight: 600; }

.chip-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 5rem;
}
.arr-line {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--line);
}
.arr-head {
  font: 500 1.4rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--verified);
  margin-top: -0.6rem;
}
.arr-delta {
  font: 500 0.72rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.arr-delta strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.chip-row.is-clean .arr-head { color: var(--muted-2); }
.chip-row.is-clean .arr-delta strong { color: var(--verified); }

.try-error {
  margin: 0;
  color: var(--fail);
  font: 500 0.88rem/1.5 "Geist Mono", ui-monospace, monospace;
}
.try-error code { background: rgba(244,63,94,0.10); color: var(--fail); padding: 0.1em 0.4em; border-radius: 3px; }

.try-note { margin: 0.85rem 0 0; font-size: 0.78rem; }
.try-note .cv-mark { color: var(--muted-2); margin-right: 0.4rem; }

/* ───── INSTALL ───── */
.install-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.25rem;
  align-items: start;
  margin: 0 0 1rem;
}
/* Grid items default to min-width: auto (= min-content), and the <pre> children
   use white-space: pre, so without this they refuse to shrink below the longest
   code line and push the whole page wider than the mobile viewport. */
.install-grid > * { min-width: 0; }
.install h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
}
.h3-sub { color: var(--muted-2); font-weight: 400; font-size: 0.85em; }
.install p { margin: 0.65rem 0; }

.codeblock {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.95rem 1.05rem;
  margin: 0 0 0.65rem;
  overflow-x: auto;
}
.codeblock code { color: var(--p-bg); white-space: pre; font-size: 0.85rem; line-height: 1.55; display: block; }
.cb-ribbon {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  display: inline-flex;
  gap: 3px;
  pointer-events: none;
}
.cb-ribbon i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  outline: 1px solid rgba(255,255,255,0.06);
}
.install-foot { margin-top: 1rem; }

/* ───── TOOLS ───── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
@media (max-width: 1000px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
}
.tool {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.5rem 1.65rem;
  position: relative;
  display: flex;
  flex-direction: column;
}
.tool-tag {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 1.2rem;
  padding: 4px 8px;
  border-radius: 3px;
  font: 600 0.66rem/1 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c, var(--ink));
  background: color-mix(in srgb, var(--c, white) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, white) 35%, transparent);
}
.tool h3 { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 500; line-height: 1.25; }
.tool h3 code { color: var(--ink); font-size: 1em; }
.tool p:not(.tool-tag) { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }
.tool p code { color: var(--ink); background: var(--surface-1); padding: 0.1em 0.35em; border-radius: 3px; }

/* ───── FOOTER ───── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2.5rem;
  border-top: 1px solid var(--line-soft);
  margin-top: 1.5rem;
}
.ft-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 1.75rem;
}
.ft-col { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.ft-col .brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 600; font-size: 1.35rem; border: none; }
.ft-tag { color: var(--muted-2); font-size: 0.82rem; margin: 0.15rem 0 0; line-height: 1.45; }
.ft-h {
  margin: 0 0 0.45rem;
  font: 500 0.72rem/1 "Geist Mono", ui-monospace, monospace;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ft-col a {
  color: var(--muted);
  font-size: 0.88rem;
  border: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.ft-col a:hover { color: var(--verified); border-bottom-color: var(--verified); }
.ft-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.5rem 0 0; }
.badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.7rem/1.4 "Geist Mono", ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.badge.warn {
  color: var(--fail);
  border-color: rgba(244,63,94,0.35);
  background: rgba(244,63,94,0.08);
}
.ft-pal { margin-bottom: 0.35rem; flex-wrap: wrap; gap: 3px; }
.ft-pal span { font-size: 0.66rem; padding: 2px 5px; }

.ft-base {
  display: flex;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
}
.ft-base a { color: var(--muted); border: none; }
.ft-base a:hover { color: var(--verified); }

/* ───── Mobile ───── */
@media (max-width: 820px) {
  .install-grid { grid-template-columns: 1fr; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .ft-col.ft-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topbar { padding: 0.45rem 1rem; }
  .topbar nav { gap: 0.85rem; font-size: 0.82rem; }
  .gh-btn span { display: none; }
  .gh-btn { padding: 0.45rem 0.55rem; }

  main { padding: 0 1rem; }
  section { padding: 2rem 0; }
  .proof { padding: 1.5rem 0 2rem; }

  .proof-head h1 { font-size: 1.7rem; }
  .proof-head h1 br { display: none; }
  .proof-head .lede { font-size: 0.95rem; }

  .palette-strip { padding: 0.5rem 0.6rem; gap: 0.55rem; }
  .ps-cap { display: none; }

  .two-up { grid-template-columns: 1fr; gap: 0.85rem; }
  .card { padding: 0.9rem; }
  .art { aspect-ratio: 5 / 3; }
  .metric .num { font-size: 2.2rem; }
  .diff-list { padding: 0.45rem 0.55rem; font-size: 0.74rem; }
  .diff-row { grid-template-columns: 12px 56px 10px 12px 56px 1fr; gap: 5px; }
  .diff-row .sw { width: 12px; height: 12px; }
  .diff-row .hex { font-size: 0.74rem; }
  .diff-list.ok .diff-row { grid-template-columns: 12px 56px 1fr; }

  .steps { font-size: 0.82rem; border-radius: var(--r-md); }
  .steps th, .steps td { padding: 0.6rem 0.65rem; }
  .steps td:last-child { padding-right: 0.7rem; }
  .step-count { font-size: 1.1rem; }

  .tab { max-width: 180px; font-size: 0.75rem; }
  .tab-dim { display: none; }
  .tab-new { display: none; }
  .ctx-unfurl { padding: 0.85rem; }
  .cws-meta { padding: 0.5rem 0.7rem; gap: 0.55rem; }
  .cws-btn { padding: 6px 12px; font-size: 0.78rem; }

  .ss-cell { width: 56px; height: 68px; }

  .try-box { padding: 1rem; }
  .chip-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .chip-col-out { align-items: flex-start; text-align: left; }
  .chip { height: 52px; }
  .chip-arrow {
    flex-direction: row;
    gap: 0.6rem;
    justify-content: center;
    min-width: 0;
  }
  .arr-line { display: none; }
  .arr-head { margin-top: 0; transform: rotate(90deg); }

  .tool-grid { grid-template-columns: 1fr; }

  footer { padding: 2rem 1rem 2rem; }
  .ft-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .ft-base { flex-direction: column; gap: 0.4rem; padding-top: 0.85rem; }
}
