/* ---------- tokens ---------- */
:root {
  --ink: #0e1014;
  --ink-2: #1c2027;
  --ink-3: #444a55;
  --ink-4: #6c7280;
  --ink-5: #9aa0aa;
  --line: #e6e6ea;
  --line-2: #ececf0;
  --bg: #f7f7f5;
  --paper: #ffffff;
  --paper-2: #fbfbf9;

  --brand: #4B3BF1;     /* Musth */
  --brand-2: #7566F5;
  --brand-tint: #eeebff;
  --brand-tint-2: #f6f4ff;

  --ok: #1f7a4d;
  --ok-tint: #e7f4ec;
  --warn: #8a5a00;
  --warn-tint: #fcf1d9;
  --bad: #9a2434;
  --bad-tint: #fbe7ea;

  --radius: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 0 rgba(14,16,20,0.04), 0 1px 2px rgba(14,16,20,0.04);
  --shadow-md: 0 1px 0 rgba(14,16,20,0.04), 0 6px 24px -10px rgba(14,16,20,0.10);

  --font-sans: "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs: 12.5px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 19px;
  --text-xl: 24px;
  --text-2xl: clamp(32px, 4.2vw, 48px);
  --text-hero: clamp(40px, 6vw, 76px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(75,59,241,0.4); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--brand); }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.logo span { color: var(--ink); font-size: var(--text-sm); }
nav { display: flex; gap: 22px; }
nav a {
  font-size: var(--text-sm);
  color: var(--ink-3);
  text-decoration: none;
}
nav a:hover { color: var(--ink); }
@media (max-width: 720px) { nav { display: none; } }

/* ---------- hero ---------- */
.hero {
  padding: 88px 28px 56px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  font-weight: 500;
  margin-bottom: 28px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); display: inline-block; box-shadow: 0 0 0 4px var(--brand-tint); }
.hero h1 {
  font-size: var(--text-hero);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 28px;
  max-width: 22ch;
}
.hero-accent { color: var(--brand); }
.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 65ch;
  margin: 0 0 40px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 8px;
}
.hero-meta > div { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .k { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-4); }
.hero-meta .v { font-size: var(--text-sm); color: var(--ink-2); }
@media (max-width: 800px) { .hero-meta { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- TLDR ---------- */
.tldr { padding: 28px 28px 24px; }
.tldr-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
}
.tldr-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 10px;
}
.tldr-card p { margin: 0; font-size: var(--text-lg); line-height: 1.6; color: var(--ink-2); }

/* ---------- sections ---------- */
.section { padding: 80px 28px; }
.section h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 40px;
  font-weight: 700;
  display: flex; align-items: baseline; gap: 18px;
}
.num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-5);
  letter-spacing: 0;
  padding-top: 4px;
}
.section-lede {
  font-size: var(--text-base);
  color: var(--ink-3);
  max-width: 70ch;
  margin: -16px 0 36px;
}

/* ---------- two col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.two-col h3 {
  font-size: var(--text-lg);
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.two-col p { color: var(--ink-2); margin: 0 0 12px; }
.muted { color: var(--ink-4); font-size: var(--text-sm); }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- stack strip ---------- */
.stack-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.strip-item { padding: 20px 22px; border-right: 1px solid var(--line); }
.strip-item:last-child { border-right: none; }
.strip-k { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-4); margin-bottom: 6px; }
.strip-v { font-size: var(--text-sm); color: var(--ink-2); }
@media (max-width: 800px) {
  .stack-strip { grid-template-columns: 1fr; }
  .strip-item { border-right: none; border-bottom: 1px solid var(--line); }
  .strip-item:last-child { border-bottom: none; }
}

/* ---------- option cards ---------- */
.option {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.option--bad { background: linear-gradient(180deg, #fffafb 0%, var(--paper) 60%); }
.option--ok  { background: linear-gradient(180deg, #fffcf2 0%, var(--paper) 60%); }
.option--best {
  background: linear-gradient(180deg, var(--brand-tint-2) 0%, var(--paper) 70%);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-md);
}
.option-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.opt-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.option--best .opt-tag { color: var(--brand); font-weight: 600; }
.opt-verdict {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bad-tint);
  color: var(--bad);
  font-weight: 600;
}
.option--ok .opt-verdict   { background: var(--warn-tint); color: var(--warn); }
.option--best .opt-verdict { background: var(--brand-tint); color: var(--brand); }
.option h3 {
  font-size: var(--text-xl);
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.opt-desc {
  color: var(--ink-3);
  font-size: var(--text-base);
  margin: 0 0 24px;
  max-width: 75ch;
}
.reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
}
@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; } }
.reason-h {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: 6px;
  color: var(--ink);
}
.reason p { margin: 0; color: var(--ink-3); font-size: var(--text-sm); line-height: 1.6; }
.x, .ok, .warn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.x  { background: var(--bad-tint);   color: var(--bad); }
.ok { background: var(--ok-tint);    color: var(--ok); }
.warn { background: var(--warn-tint); color: var(--warn); }

/* ---------- score table ---------- */
.score-table {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}
.score-row {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 1.2fr 1.25fr 1.4fr;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.score-row > div:last-child { background: var(--brand-tint-2); }
.score-row.score-head > div:last-child { background: color-mix(in srgb, var(--brand-tint) 70%, var(--paper-2)); }
.score-row:last-child { border-bottom: none; }
.score-row > div { padding: 18px 18px; border-right: 1px solid var(--line-2); color: var(--ink-2); }
.score-row > div:last-child { border-right: none; }
.score-row > div:first-child {
  background: var(--paper-2);
  font-weight: 600;
  color: var(--ink);
}
.score-head { background: var(--paper-2); }
.score-head > div { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-4); font-weight: 600; }
.score-head > div.best { color: var(--brand); }
.pill {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 8px;
}
.pill-bad  { background: var(--bad-tint);   color: var(--bad); }
.pill-ok   { background: var(--ok-tint);    color: var(--ok); }
.pill-warn { background: var(--warn-tint);  color: var(--warn); }
@media (max-width: 900px) {
  .score-row { grid-template-columns: 1fr; }
  .score-row > div { border-right: none; border-bottom: 1px solid var(--line-2); }
  .score-row > div:last-child { border-bottom: none; }
  .score-head { display: none; }
  .score-row > div:first-child::after { content: ""; }
  .score-row > div::before {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-4);
    margin-bottom: 6px;
    font-weight: 600;
  }
  .score-row > div:nth-child(2)::before { content: "A · Edit upstream"; }
  .score-row > div:nth-child(3)::before { content: "B · Separate TS service"; }
  .score-row > div:nth-child(4)::before { content: "C · TS + vault middleware"; }
  .score-row > div:nth-child(5)::before { content: "D · Custom source in vault"; color: var(--brand); }
  .score-row > div:last-child { background: var(--brand-tint-2); }
}

/* ---------- arch diagram ---------- */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 28px;
}
.arch-col { display: flex; flex-direction: column; gap: 12px; }
.arch-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 4px;
}
.arch-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.arch-box.vault {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  background: linear-gradient(180deg, var(--brand-tint-2) 0%, var(--paper) 100%);
}
.arch-box.gw {
  border-color: color-mix(in srgb, #b6a55c 35%, var(--line));
  background: linear-gradient(180deg, #fffaee 0%, var(--paper) 100%);
}
.arch-title { font-weight: 600; font-size: var(--text-sm); color: var(--ink); margin-bottom: 6px; letter-spacing: -0.005em; }
.arch-sub { font-size: var(--text-xs); color: var(--ink-4); }
.arch-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.arch-list li {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 4px 0;
  border-top: 1px dashed var(--line-2);
  line-height: 1.45;
}
.arch-list li:first-child { border-top: none; padding-top: 6px; }
.arch-arrow {
  align-self: center;
  color: var(--ink-5);
  font-size: 22px;
  font-weight: 300;
}
.arch-note { font-size: var(--text-xs); color: var(--ink-4); font-style: italic; padding: 4px 4px; }
@media (max-width: 900px) {
  .arch-grid { grid-template-columns: 1fr; }
  .arch-arrow { transform: rotate(90deg); justify-self: center; padding: 4px 0; }
}

.callout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-top: 28px;
}
.callout-k {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--brand); font-weight: 600;
  margin-bottom: 8px;
}
.callout p { margin: 0; color: var(--ink-2); font-size: var(--text-base); }

/* ---------- tracks ---------- */
.tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 56px;
}
@media (max-width: 880px) { .tracks { grid-template-columns: 1fr; } }
.track {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  min-width: 0; /* allow children with code blocks to shrink */
}
.track-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.track-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--brand-tint);
  color: var(--brand);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.track h3 { margin: 0; font-size: var(--text-lg); letter-spacing: -0.01em; font-weight: 700; }
.track p { color: var(--ink-3); }
.track-list {
  margin: 12px 0 0;
  padding-left: 22px;
}
.track-list li {
  font-size: var(--text-sm);
  color: var(--ink-2);
  padding: 4px 0;
  line-height: 1.55;
}
.tree {
  background: var(--ink);
  color: #d8dae0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 16px 0;
  line-height: 1.6;
  max-width: 100%;
  white-space: pre;
}
.tree code { color: inherit; white-space: pre; }

/* ---------- timeline ---------- */
.timeline-h { font-size: var(--text-lg); margin: 8px 0 16px; font-weight: 600; letter-spacing: -0.005em; }
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.timeline li {
  padding: 14px 0 14px 22px;
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: baseline;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px; top: 22px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--bg);
}
.t-week { font-family: var(--font-mono); font-size: 13px; color: var(--ink-4); }
.t-body { color: var(--ink-2); font-size: var(--text-sm); }
@media (max-width: 720px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- risks ---------- */
.risks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .risks { grid-template-columns: 1fr; } }
.risk {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.risk h4 { margin: 0 0 10px; font-size: var(--text-base); letter-spacing: -0.005em; }
.risk p { margin: 0; color: var(--ink-3); font-size: var(--text-sm); line-height: 1.6; }

/* ---------- why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.why-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-tint);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  margin-bottom: 14px;
}
.why-card h4 { margin: 0 0 10px; font-size: var(--text-lg); letter-spacing: -0.01em; }
.why-card p { margin: 0; color: var(--ink-3); font-size: var(--text-sm); line-height: 1.6; }

/* ---------- next ---------- */
.next-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px 24px 56px;
  box-shadow: var(--shadow-sm);
  margin: 0;
  list-style-position: outside;
}
.next-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-2);
  font-size: var(--text-base);
}
.next-list li:last-child { border-bottom: none; }
.next-list li::marker { color: var(--brand); font-family: var(--font-mono); font-size: 13px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-logo { display: flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 600; font-size: var(--text-sm); }
.foot-logo span { color: var(--ink); }
.foot-note { color: var(--ink-4); font-size: var(--text-xs); margin: 8px 0 0; max-width: 50ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.foot-links a { font-size: var(--text-sm); color: var(--ink-3); text-decoration: none; }
.foot-links a:hover { color: var(--brand); }

/* ---------- kbd / inline code ---------- */
.kbd, :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink-2);
  white-space: nowrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .kbd, :not(pre) > code { white-space: normal; }
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
.option--best .kbd { background: rgba(255,255,255,0.6); border-color: color-mix(in srgb, var(--brand) 18%, var(--line)); }

/* ---------- selection ---------- */
::selection { background: var(--brand-tint); color: var(--ink); }

/* ---------- what changed (v1 vs v2) ---------- */
.changed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 800px) { .changed-grid { grid-template-columns: 1fr; } }
.changed-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.changed-card.v1 {
  background: linear-gradient(180deg, #fbfbfb 0%, var(--paper) 100%);
  border-color: var(--line);
  opacity: 0.92;
}
.changed-card.v2 {
  background: linear-gradient(180deg, var(--brand-tint-2) 0%, var(--paper) 100%);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-md);
}
.changed-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 10px;
}
.changed-card.v2 .changed-tag { color: var(--brand); }
.changed-card h3 {
  margin: 0 0 14px;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  font-weight: 700;
  line-height: 1.3;
}
.changed-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: var(--text-sm);
}
.changed-card ul li { padding: 3px 0; line-height: 1.55; }
.why-changed {
  margin: 8px 0 0;
  padding: 18px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.why-changed strong { color: var(--ink); }

/* ---------- binary diagram ---------- */
.binary-diagram {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 24px 28px;
  box-shadow: var(--shadow-sm);
}
.binary-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-4);
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 22px;
}
.binary-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
}
.binary-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bc-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  font-weight: 600;
  margin-bottom: 4px;
}
.bc-tag.custom-tag { color: var(--brand); }
.bc-box {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.bc-box.custom-box {
  background: linear-gradient(180deg, var(--brand-tint-2) 0%, var(--paper) 100%);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}
.bc-t {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}
.bc-s {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.5;
}
.bc-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.bc-list li {
  font-size: 12px;
  color: var(--ink-3);
  padding: 3px 0;
  border-top: 1px dashed var(--line-2);
  line-height: 1.5;
}
.bc-list li:first-child { border-top: none; padding-top: 6px; }
.bc-file {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  background: rgba(75, 59, 241, 0.06);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}
.binary-hook {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  min-width: 90px;
}
.hook-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--brand) 20%, var(--brand) 80%, transparent);
  min-height: 24px;
}
.hook-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-weight: 600;
  text-align: center;
  padding: 8px 0;
  line-height: 1.4;
}
.hook-label .kbd { display: inline-block; margin: 3px 0; text-transform: none; letter-spacing: 0; }
@media (max-width: 900px) {
  .binary-grid { grid-template-columns: 1fr; }
  .binary-hook { min-width: 0; flex-direction: row; padding: 8px 0; }
  .hook-line { width: 100%; height: 1px; min-height: 0; background: linear-gradient(90deg, transparent, var(--brand) 20%, var(--brand) 80%, transparent); }
  .hook-label { padding: 0 12px; white-space: nowrap; }
}

/* ---------- UI mock ---------- */
.ui-h {
  font-size: var(--text-lg);
  margin: 36px 0 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ui-mock {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 360px;
}
.ui-nav {
  background: var(--ink);
  color: #cfd2d8;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ui-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.ui-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(117, 102, 245, 0.18);
}
.ui-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: #a5a9b2;
  border-radius: 6px;
  cursor: default;
}
.ui-nav-item.ui-nav-active {
  background: rgba(75, 59, 241, 0.22);
  color: #fff;
  font-weight: 600;
}
.ui-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: var(--brand);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}
.ui-main { padding: 22px 26px; background: var(--paper-2); }
.ui-crumbs {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-bottom: 14px;
  font-family: var(--font-mono);
}
.ui-sep { padding: 0 6px; color: var(--ink-5); }
.ui-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ui-tab {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ink-4);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: default;
}
.ui-tab.ui-tab-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.ui-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ui-card-h {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
}
.ui-row:last-child { border-bottom: none; }
.ui-row > span:first-child { font-family: var(--font-mono); font-size: 12.5px; }
.ui-pill {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ok-tint);
  color: var(--ok);
}
.ui-pill.ui-pill-warn { background: var(--warn-tint); color: var(--warn); }
.ui-note {
  font-size: 12.5px;
  color: var(--ink-4);
  margin: 14px 0 0;
  line-height: 1.6;
  font-style: italic;
}
@media (max-width: 800px) {
  .ui-mock { grid-template-columns: 1fr; }
  .ui-nav { flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .ui-nav-brand { width: 100%; }
}

/* ---------- phases grid ---------- */
.phases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
@media (max-width: 800px) { .phases { grid-template-columns: 1fr; } }
.phase {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.phase-h {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: -0.005em;
  margin-bottom: 8px;
  color: var(--ink);
}
.phase-n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-tint);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.phase p {
  margin: 0;
  color: var(--ink-3);
  font-size: var(--text-sm);
  line-height: 1.6;
}
