@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --bg: #ffffff;
  --bg-soft: #f7f5f9;
  --surface: #ffffff;
  --ink: #16141a;
  --ink-2: #4a4652;
  --muted: #7a7583;
  --line: #e7e3ec;
  --line-strong: #d3cdda;
  --grid: #ece9f0;
  --accent: #7446a0;
  --accent-ink: #5d3585;
  --accent-soft: #f2ebf9;
  --query-highlight: #824cde; /* only the user-simulation queries (.chat-query em) */
  --mark-muted: #c4bfcb;
  --retained: #215f9a;
  --superseded: #e17f00;
  --abandoned: #c2235d;
  --tone-better: #6eac1d;
  --tone-similar: #d9912d;
  --tone-worse: #c2235d;
  --tone-better-ink: #4b7a12;
  --tone-similar-ink: #9a5b0c;
  --tone-worse-ink: #c2235d;
  --shadow: 0 1px 2px rgba(22, 20, 26, .04), 0 10px 30px rgba(22, 20, 26, .06);
  --radius: 16px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121016;
    --bg-soft: #19161e;
    --surface: #1c1922;
    --ink: #f3f1f6;
    --ink-2: #c9c4d0;
    --muted: #958f9e;
    --line: #2c2833;
    --line-strong: #3d3846;
    --grid: #27232d;
    --accent: #b48ae0;
    --accent-ink: #cfb0ef;
    --accent-soft: #2a2234;
    --query-highlight: #b794ff;
    --mark-muted: #5e5966;
    --retained: #4a8ad6;
    --superseded: #cf7a12;
    --abandoned: #d9528a;
    --tone-better: #8cc63f;
    --tone-similar: #e0a04a;
    --tone-worse: #e0628f;
    --tone-better-ink: #8cc63f;
    --tone-similar-ink: #e0a04a;
    --tone-worse-ink: #e0628f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121016;
  --bg-soft: #19161e;
  --surface: #1c1922;
  --ink: #f3f1f6;
  --ink-2: #c9c4d0;
  --muted: #958f9e;
  --line: #2c2833;
  --line-strong: #3d3846;
  --grid: #27232d;
  --accent: #b48ae0;
  --accent-ink: #cfb0ef;
  --accent-soft: #2a2234;
  --query-highlight: #b794ff;
  --mark-muted: #5e5966;
  --retained: #4a8ad6;
  --superseded: #cf7a12;
  --abandoned: #d9528a;
  --tone-better: #8cc63f;
  --tone-similar: #e0a04a;
  --tone-worse: #e0628f;
  --tone-better-ink: #8cc63f;
  --tone-similar-ink: #e0a04a;
  --tone-worse-ink: #e0628f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h2, h3 { text-wrap: balance; }
code {
  padding: .08em .35em;
  border-radius: 5px;
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: .84em;
}
sub { font-size: .7em; }
/* KaTeX's default 1.21em makes inline math look large next to Inter. */
.katex { font-size: 1.1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.prose { max-width: 900px; margin-inline: auto; }
.prose p { color: var(--ink-2); }
.prose p strong, .prose li strong { color: var(--ink); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink-2); font-size: 14px; font-weight: 550; text-decoration: none; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: inline; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  color: var(--ink);
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.button:hover { border-color: var(--accent); }
.button:active { transform: translateY(1px); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Brand marks (arXiv, GitHub, Hugging Face) are filled shapes, not outlines. */
.button svg.icon-brand { fill: currentColor; stroke: none; }
.button-primary { border-color: var(--accent); color: #fff; background: var(--accent); }
:root[data-theme="dark"] .button-primary { color: #16141a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button-primary { color: #16141a; } }
.button-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.button[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }
.button .soon { font-size: 12px; font-weight: 500; opacity: .8; }

/* Hero */
.hero { padding: 72px 0 24px; text-align: center; }
.eyebrow, .section-kicker {
  margin-bottom: 12px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  max-width: 1120px;
  margin: 0 auto 22px;
  font-size: clamp(20px, 5vw, 50px);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.authors { margin-bottom: 28px; color: var(--ink-2); font-size: 17px; }
.authors span { display: block; color: var(--muted); font-size: 15px; }
.authors a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.authors a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
.link-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.tldr {
  display: flex;
  gap: 18px;
  max-width: 800px;
  margin: 0 auto 48px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: left;
}
.tldr p { margin: 0; color: var(--ink-2); }
.tldr strong { color: var(--ink); }
.tldr-label {
  flex: none;
  padding-top: 3px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .08em;
}

/* Figures */
.figure { margin: 0; }
/* An <img>'s width attribute sets its displayed width (capped at the column);
   height follows the image's own proportions. Figures are centered. */
.figure img { margin-inline: auto}
.figure a { display: block; cursor: zoom-in; }
.figure-card {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: clamp(10px, 2vw, 22px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
figcaption, .caption-line {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.figure-hero .figure-card { max-width: 980px; margin-inline: auto; box-shadow: var(--shadow); }
.figure-wide { margin: 36px auto; }
.figure-wide .figure-card { max-width: 980px; margin-inline: auto; }
/* Figure SVGs are transparent; outside a card they need a light backing in dark mode. */
:root[data-theme="dark"] .figure > img,
:root[data-theme="dark"] .figure > a > img { padding: 10px; border-radius: 12px; background: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .figure > img,
  :root:not([data-theme="light"]) .figure > a > img { padding: 10px; border-radius: 12px; background: #fff; }
}

/* Sections */
.section { padding: 64px 0 24px; }
h2 { margin-bottom: 18px; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.03em; }
h3 { margin-bottom: 8px; font-size: 19px; line-height: 1.3; letter-spacing: -.015em; }
.subhead { margin-top: 48px; font-size: 22px; }
.question {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--accent);
}
.question p { margin: 0; color: var(--ink); font-size: 21px; font-weight: 550; line-height: 1.45; letter-spacing: -.01em; }

/* Commit demo */
.commit-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  max-width: 820px;
  margin: 28px auto 36px;
}
.commit-list {
  position: relative;
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  list-style: none;
  font-family: var(--font-mono);
  font-size: 14px;
}
.commit-list::before {
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 25px;
  width: 2px;
  background: var(--line-strong);
  content: "";
}
.commit-list li { position: relative; display: flex; align-items: center; gap: 14px; padding: 7px 0; color: var(--ink-2); }
.commit-dot { flex: none; width: 12px; height: 12px; border: 2px solid var(--muted); border-radius: 50%; background: var(--surface); }
.commit-arrow { width: 48px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-decision {
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.demo-label { color: var(--accent-ink); font-size: 17px; font-weight: 700; }
.demo-decision p { margin: 6px 0 10px; font-weight: 600; line-height: 1.45; }
.chip {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
}

/* Anatomy */
.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  margin-top: 40px;
}
.anatomy-copy > p { color: var(--ink-2); }
.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 18px 0 0; }
.label-group dt { margin-bottom: 8px; color: var(--ink); font-size: 16px; }
.label-group dd { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.label-group dd strong { color: var(--ink); }
.key-dot, .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: .02em;
}
.retained { background: var(--retained); }
.superseded { background: var(--superseded); }
.abandoned { background: var(--abandoned); }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}
.steps li::before {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  content: counter(step);
  font-size: 14px;
  font-weight: 700;
}
:root[data-theme="dark"] .steps li::before { color: #16141a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li::before { color: #16141a; } }
.steps h3 { font-size: 17px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* Chart cards */
.chart-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.chart-card-wide { max-width: 950px; margin: 32px auto; }
/* Charts whose content doesn't need the full page width. */
.chart-card-narrow { max-width: 760px; margin-inline: auto; }
.chart-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.chart-head h3 { margin-bottom: 4px; }
.chart-head p { margin: 0; color: var(--muted); font-size: 14px; }
/* Title on its own line; description left and legend right on the line below. */
.chart-head-stack { display: block; }
.chart-subhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px; }
.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; max-width: 950px; margin: 28px auto 0; }
.chart-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--ink-2); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; white-space: nowrap; }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 7px; border-radius: 3px; }
.swatch-muted { background: var(--mark-muted); }
.swatch-accent { background: var(--accent); }
.arc-key {
  display: inline-block;
  width: 18px;
  height: 9px;
  margin-right: 7px;
  border: 2px solid var(--superseded);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

/* Bar lists (horizontal bars, HTML) */
.bar-list { display: grid; gap: 4px; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 36%) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  outline-offset: 0;
}
.bar-row:hover, .bar-row:focus-visible { background: var(--bg-soft); }
.bar-label { color: var(--ink); font-size: 14px; font-weight: 550; line-height: 1.3; }
.bar-label small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 450; }
.bar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar {
  flex: none;
  height: 14px;
  min-width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.bar.is-muted { background: var(--mark-muted); }
.bar-value { flex: none; color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-list.compact .bar-row { grid-template-columns: 96px minmax(0, 1fr); }
.bar-list.fixed-label .bar-row { grid-template-columns: 230px minmax(0, 1fr); }
.bar-group-title { margin: 6px 0 6px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.bar-group-title + .bar-list { margin-bottom: 14px; }

/* KPI row */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 950px; margin: 32px auto 0; }
.kpi {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi strong { margin: auto 0 2px; padding-top: 4px; font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.kpi-note { color: var(--ink-2); font-size: 13.5px; }

/* Table views */
.table-view { margin-top: 16px; font-size: 14px; }
.table-view summary { width: fit-content; color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.table-scroll { margin-top: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12.5px; font-weight: 650; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.is-total td { font-weight: 650; }

/* Trajectory trail */
.trail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.trail-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.trail-tab {
  max-width: 340px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.trail-tab small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.trail-tab[aria-selected="true"] { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.trail-meta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 12px; }
.trail-meta h3 { margin-bottom: 2px; }
.trail-meta p { margin: 0; color: var(--muted); font-size: 14px; }
.trail-body { display: grid; grid-template-columns: 88px minmax(0, 1fr); }
.trail-lanes {
  display: grid;
  grid-template-rows: repeat(3, 60px);
  padding-top: 34px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}
.trail-lanes span { display: flex; align-items: center; }
.trail-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
#trail { display: block; overflow: visible; }
#trail:focus { outline: none; }
#trail:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.trail-grid line { stroke: var(--grid); stroke-width: 1; }
.trail-path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-linejoin: round; }
.trail-arc { fill: none; stroke: var(--superseded); stroke-width: 1.5; opacity: .55; transition: opacity .15s, stroke-width .15s; }
.trail-arc.is-active { opacity: 1; stroke-width: 2.5; }
.trail-node circle.mark { stroke: var(--surface); stroke-width: 2; transition: r .12s; }
.trail-node .ring { fill: none; stroke: var(--ink); stroke-width: 2; opacity: 0; }
.trail-node.is-active .ring { opacity: 1; }
.trail-node .hit { fill: transparent; cursor: pointer; }
.trail-axis text { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.trail-axis line { stroke: var(--line-strong); }
.trail-detail {
  min-height: 118px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--bg-soft);
}
.detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.detail-head strong { color: var(--ink); font-size: 14px; }
.detail-outcome { display: inline-flex; align-items: center; color: var(--ink-2); font-weight: 600; }
.detail-text { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.55; }
.detail-jump {
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.detail-jump:hover { border-color: var(--superseded); }
.trail-insight { margin-top: 16px; }
.trail-insight span { color: var(--muted); font-size: 13px; font-weight: 700; }
.trail-insight p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.trail-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trail-links .button { height: 36px; font-size: 14px; }
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 20px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--accent-soft);
  text-decoration: none;
  transition: border-color .15s;
}
.cta:hover { border-color: var(--accent); }
.cta strong { display: block; font-size: 17px; }
.cta span { color: var(--ink-2); font-size: 14.5px; }
.cta svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Patterns */
.pattern-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.pattern {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pattern h3 { min-height: 2.6em; margin-bottom: 14px; font-size: 16.5px; }
.pattern ol { position: relative; margin: 0; padding: 0; list-style: none; }
.pattern li {
  position: relative;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.pattern li + li::before {
  position: absolute;
  top: -10px;
  left: 18px;
  width: 1.5px;
  height: 10px;
  background: var(--line-strong);
  content: "";
}
.pattern li.state { border: 1px dashed var(--line-strong); background: transparent; }
.state-tag { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* Rubric */
.rubric { max-width: 820px; margin: 24px auto 28px; overflow-x: auto; }
.rubric td:nth-child(n+3), .rubric th:nth-child(n+3) { text-align: center; white-space: nowrap; }
.rubric td { color: var(--ink-2); }
.rubric td:last-child strong { color: var(--ink); }

/* Dot plot (HTML) */
.dotplot { --label-w: 190px; position: relative; }
.dot-group { margin: 14px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.dot-group:first-child { margin-top: 0; }
.dot-row {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 42px;
  padding: 3px 8px;
  margin: 0 -8px 2px;
  border-radius: 8px;
}
.dot-row:hover, .dot-row:focus-visible { background: var(--bg-soft); }
.dot-label { font-size: 14px; font-weight: 550; line-height: 1.25; }
.dot-label small { display: block; color: var(--muted); font-size: 12px; font-weight: 450; }
.dot-track { position: relative; height: 38px; }
.dot-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.dot-ref { position: absolute; top: -4px; bottom: -4px; width: 1.5px; background: var(--muted); opacity: .6; }
.dot-mark {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--mark-muted);
}
.dot-row.tone-better .dot-mark, .dot.tone-better { background: var(--tone-better); }
.dot-row.tone-similar .dot-mark, .dot.tone-similar { background: var(--tone-similar); }
.dot-row.tone-worse .dot-mark, .dot.tone-worse { background: var(--tone-worse); }
.tone-text-better { color: var(--tone-better-ink); }
.tone-text-similar { color: var(--tone-similar-ink); }
.tone-text-worse { color: var(--tone-worse-ink); }
.dot-row.is-ref .dot-mark { background: var(--muted); }
.dot-value { position: absolute; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot-row.is-accent .dot-value { color: var(--ink); font-weight: 700; }
.dot-axis { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); gap: 14px; margin-top: 4px; }
.dot-axis-track { position: relative; height: 20px; border-top: 1px solid var(--line-strong); }
.dot-axis-track span { position: absolute; top: 3px; transform: translateX(-50%); color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dot-ref-label { position: absolute; top: -22px; transform: translateX(-50%); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.takeaways { margin: 0; padding-left: 20px; color: var(--ink-2); }
.takeaways li { margin-bottom: 10px; padding-left: 4px; }
.takeaways li::marker { color: var(--accent); }

/* Chat (user simulations) */
.chat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 950px; margin: 24px auto 8px; }
.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.chat-query {
  margin: 0 0 4px;
  padding: 14px 16px;
  border-radius: 14px 14px 4px 14px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
}
.chat-query em { color: var(--query-highlight); font-style: normal; font-weight: 600; }
.chat-reply { padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; font-size: 14.5px; line-height: 1.5; }
.chat-reply span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chat-reply.with-skill { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.chat-reply.with-skill span { color: var(--accent-ink); }

.figure-pair { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; max-width: 980px; margin: 28px auto 0; }
.figure-pair .figure { display: grid; grid-template-rows: 1fr auto; }
.figure-pair .figure-card { display: flex; align-items: center; }

/* Citation */
.bibtex { position: relative; }
.bibtex pre {
  margin: 0;
  padding: 18px 84px 18px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { max-width: 760px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; }
.footer-links a { color: var(--ink-2); font-weight: 550; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-links a[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Tooltip */
.tip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(22, 20, 26, .16);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
  pointer-events: none;
}
.tip strong { display: block; color: var(--ink); font-size: 14px; }
.tip-row { display: flex; justify-content: space-between; gap: 16px; font-variant-numeric: tabular-nums; }
.tip-row b { color: var(--ink); font-weight: 650; }

/* Responsive */
@media (max-width: 1000px) {
  .steps, .pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anatomy { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { width: min(1120px, 100% - 32px); }
  .site-header { gap: 12px; padding: 0 16px; }
  .site-nav { display: none; }
  .header-actions { margin-left: auto; }
  .hero { padding-top: 44px; }
  .tldr { flex-direction: column; gap: 6px; padding: 16px 18px; }
  .section { padding-top: 48px; }
  .commit-demo { grid-template-columns: 1fr; gap: 8px; }
  .commit-arrow { transform: rotate(90deg); justify-self: center; }
  .label-grid { grid-template-columns: 1fr; gap: 12px; }
  .steps, .pattern-grid, .chat-grid, .figure-pair { grid-template-columns: 1fr; }
  .chart-card, .trail-card { padding: 18px 16px; }
  .dotplot { --label-w: 112px; }
  .dot-label small { display: none; }
  .bar-row, .bar-list.fixed-label .bar-row { grid-template-columns: minmax(96px, 40%) minmax(0, 1fr); gap: 10px; }
  .trail-body { grid-template-columns: 72px minmax(0, 1fr); }
  .trail-lanes { font-size: 11.5px; }
  .pattern h3 { min-height: 0; }
  .cta { padding: 16px 18px; }
}

@media (max-width: 420px) {
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .link-row .button { flex: 1 1 calc(50% - 10px); justify-content: center; padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
