@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,400..700&display=swap");

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f5f3ef;
  --text: #17161a;
  --muted: #5c5a63;
  --faint: #86838d;
  --line: #e3e0da;
  --line-soft: #efece7;
  --accent: #8c2f3d;
  --accent-soft: #d9a7ae;
  --accent-faint: #f0dfe1;
  --chart-single: #fff7f8;
  --chart-success: #e4b4bd;
  --chart-success-ink: #9b3040;
  --chart-attempt: #cbeef7;
  --chart-attempt-ink: #087c9e;
  --ok: #3f7c56;
  --ok-bg: rgba(80, 140, 100, 0.14);
  --warn: #96702c;
  --warn-bg: rgba(190, 140, 60, 0.16);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Google Sans Flex", "Google Sans", Arial, sans-serif;
  --sans: "Google Sans Flex", "Google Sans", Arial, sans-serif;
  color-scheme: light;
  --nav-h: 54px;
  --measure: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px; top: 12px; z-index: 100;
  background: var(--surface); color: var(--text);
  padding: 8px 14px; border: 1px solid var(--accent); border-radius: 6px;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
}

a { color: var(--accent); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--accent-faint);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-word;
}

/* ========================= nav ========================= */

#topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  flex: none;
}

.mark-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
  flex: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.current { color: var(--accent); background: var(--accent-faint); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* EN/DE switch. */
.lang-toggle {
  display: inline-flex;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}

.lang-btn {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 8px;
  height: 28px;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active { background: var(--accent-faint); color: var(--accent); }

/* German runs long; the nav gives up the wordmark before the controls. */
@media (max-width: 1040px) {
  :root[data-lang="de"] .mark-text { display: none; }
}

.nav-cta {
  flex: none;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--surface);
  background: var(--accent);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.88; }


/* ========================= hero ========================= */

header#top {
  padding-block: 64px 0;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  margin: 0 0 24px;
}

.badge-tag {
  background: var(--accent);
  color: var(--surface);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}


h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.5vw, 62px);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  max-width: 18ch;
}

.tagline {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.45;
  color: var(--text);
  max-width: 62ch;
  margin: 0 0 18px;
}

.hero-body {
  color: var(--muted);
  max-width: 68ch;
  font-size: 17px;
  margin: 0 0 28px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.cta a {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14.5px;
  border: 1px solid var(--line);
}

.cta-primary {
  background: var(--accent);
  color: var(--surface) !important;
  border-color: var(--accent) !important;
  font-weight: 500;
}
.cta-primary:hover { opacity: 0.88; }


.cta-secondary {
  background: var(--surface);
  color: var(--text) !important;
}
.cta-secondary:hover { border-color: var(--accent); color: var(--accent) !important; }

.byline {
  color: var(--faint);
  font-size: 13.5px;
  margin: 0 0 56px;
}

/* ========================= sections ========================= */

section {
  padding-block: 64px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-family: var(--sans);
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
  font-weight: 650;
  margin: 0 0 12px;
}

.section-lead {
  font-size: 19px;
  line-height: 1.5;
  max-width: 68ch;
  margin: 0 0 32px;
  color: var(--text);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head .section-lead { margin-bottom: 20px; }
.section-head .controls { margin-bottom: 10px; }
.section-head > div:first-child { flex: 1 1 380px; }

h3.sub {
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.cols-2 {
  columns: 2;
  column-gap: 44px;
  max-width: 100%;
}
.cols-2 p { break-inside: avoid; margin-bottom: 16px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-top: 40px;
}
.grid-2 h3.sub:first-child { margin-top: 0; }

/* ========================= finding cards ========================= */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--accent-soft); }

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.card h3 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 10px;
}

.card p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 14px;
}

.card strong { color: var(--text); font-weight: 600; }

.card-link {
  margin-top: auto;
  font-size: 12.5px;
  font-family: var(--mono);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.card-link:hover { text-decoration: underline; }

/* ========================= tables ========================= */

.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

thead th {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: bottom;
}

.th-sub {
  display: block;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
  margin-top: 3px;
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: 13px; }

tr.total td {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  font-weight: 600;
  color: var(--text);
}

tr.sep td {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--surface-2);
  padding: 7px 14px 7px 0;
  border-bottom: 1px solid var(--line);
}

.mono-cell {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.cite-ref {
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.bar-col { width: 32%; min-width: 120px; padding-left: 20px; vertical-align: middle; }

.minibar {
  display: block;
  height: 8px;
  width: var(--w);
  min-width: 2px;
  background: var(--accent-soft);
  border-radius: 2px;
}
.minibar.alert { background: var(--accent); }

td.heat {
  background: color-mix(in srgb, var(--accent) calc(var(--h) * 26%), transparent);
}

td.err {
  background: color-mix(in srgb, var(--accent) calc(var(--e) * 42%), transparent);
  font-weight: 500;
}

.diag .group-a { border-left: 1px solid var(--line); }
.diag .group-b { border-left: 1px solid var(--line); }
.diag td:nth-child(2), .diag td:nth-child(5) { border-left: 1px solid var(--line-soft); }

td.worse { color: var(--accent); font-weight: 600; }
td.better { color: var(--ok); font-weight: 600; }

tr.alarm td { background: var(--accent-faint); }

/* ---- paper-style results figure ---- */

.paper-figure { margin: 28px 0 0; }
.paper-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.paper-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.paper-legend .swatch { width: 20px; height: 12px; display: inline-block; }
.paper-legend .swatch.single { border: 1px solid var(--chart-success-ink); background: var(--chart-single); }
.paper-legend .swatch.success { border: 1px solid var(--chart-success-ink); background: var(--chart-success); }
.paper-legend .swatch.attempt { border: 1px solid var(--chart-attempt-ink); background: var(--chart-attempt); }
.paper-chart-scroll { overflow-x: auto; padding: 20px 0 6px; }
.paper-chart-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.paper-chart {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  min-width: 1000px;
}
.paper-axis {
  position: relative;
  height: 260px;
  padding-right: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
}
.paper-axis::before {
  content: "Rate (%)";
  position: absolute;
  width: 70px;
  left: -24px;
  top: 125px;
  transform: rotate(-90deg);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.paper-axis span { position: absolute; right: 7px; transform: translateY(-50%); }
.paper-axis span:nth-child(1) { top: 0; }
.paper-axis span:nth-child(2) { top: 20%; }
.paper-axis span:nth-child(3) { top: 40%; }
.paper-axis span:nth-child(4) { top: 60%; }
.paper-axis span:nth-child(5) { top: 80%; }
.paper-axis span:nth-child(6) { top: 100%; }
.paper-plot { position: relative; }
.paper-grid {
  position: absolute;
  inset: 0 0 auto;
  height: 260px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 20%;
  pointer-events: none;
}
.paper-groups {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.paper-group { min-width: 0; text-align: center; }
.paper-bars {
  height: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}
.paper-bar { position: relative; width: 21px; flex: none; }
.paper-bar.single { border: 1px solid var(--chart-success-ink); background: var(--chart-single); }
.paper-bar.success { border: 1px solid var(--chart-success-ink); background: var(--chart-success); }
.paper-bar.attempt { border: 1px solid var(--chart-attempt-ink); background: var(--chart-attempt); }
.paper-bar[style="height:0%"] { border: 0; }
.paper-bar span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  color: var(--chart-success-ink);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.paper-bar.attempt span { color: var(--chart-attempt-ink); }
.paper-agent {
  max-width: 96px;
  margin: 12px auto 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
}
.paper-agent a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--accent-soft); }
.paper-agent a:hover, .paper-agent a:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.chart-scroll-hint { display: none; margin: 2px 0 0; color: var(--faint); font-size: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================= captions & notes ========================= */

/* Keep the caption rule aligned with the figure or table above it. */
.caption {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  margin: 12px 0 0;
}
.caption strong { color: var(--text); }

sup.fn {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--accent);
  padding: 0 1px;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
  display: grid;
  gap: 12px;
  max-width: 92ch;
}

.notes li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.notes .n {
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-faint);
  border-radius: 4px;
  width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.note-inline {
  font-size: 15px;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 16px;
  margin-top: 20px;
  max-width: 92ch;
}

.callout {
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 20px 22px;
  font-size: 15px;
}

.callout.compact {
  margin-top: 20px;
  padding: 15px 18px;
}

.callout.compact p { margin: 0; }

/* Two panels from the separate reasoning-effort study. */
.effort-figure {
  margin: 32px 0 0;
  padding: 22px 24px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.effort-figure h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.effort-intro {
  max-width: 82ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 12px;
}
.effort-chart-scroll { overflow-x: auto; }
.effort-plot { display: block; width: 100%; min-width: 780px; height: auto; }
.effort-scroll-hint { display: none; margin: 4px 0 10px; color: var(--faint); font-size: 12px; }
.effort-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.effort-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.effort-swatch { position: relative; width: 25px; height: 12px; color: var(--swatch); }
.effort-swatch::before {
  content: "";
  position: absolute;
  top: 5px;
  width: 25px;
  border-top: 3px solid currentColor;
}
.effort-swatch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 9px;
  width: 8px;
  height: 8px;
  background: currentColor;
}
.effort-swatch.luna { --swatch: #68b4c5; }
.effort-swatch.luna::after { clip-path: polygon(50% 0, 0 100%, 100% 100%); }
.effort-swatch.sol { --swatch: #005365; }
.effort-swatch.sol::after { box-sizing: border-box; background: var(--surface); border: 2px solid currentColor; }
.effort-swatch.terra { --swatch: #00809b; }
.effort-swatch.terra::after { transform: rotate(45deg) scale(0.8); }
.effort-swatch.sol6 { --swatch: #287a62; }
.effort-swatch.sol6::after { border-radius: 50%; }
.effort-values { margin-top: 12px; font-size: 13px; color: var(--muted); }
.effort-values summary { cursor: pointer; width: fit-content; }
.effort-values summary:hover { color: var(--accent); }
.effort-table-scroll { overflow-x: auto; margin-top: 10px; }
.effort-values table { border-collapse: collapse; min-width: 590px; font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.effort-values table:last-child { margin-bottom: 0; }
.effort-values caption { color: var(--text); font-weight: 600; text-align: left; padding-bottom: 6px; }
.effort-values th, .effort-values td { padding: 7px 12px; text-align: right; border-bottom: 1px solid var(--line-soft); }
.effort-values th:first-child { text-align: left; padding-left: 0; white-space: nowrap; }
.effort-values thead th { color: var(--faint); font-weight: 500; }

/* The separate forged-denial diagnostic, redrawn from paper Figure 7. */
#injection {
  background: linear-gradient(180deg, var(--bg), #f8f3f2);
}
.injection-intro {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(0, 2fr);
  gap: 30px;
  align-items: center;
  margin: 0 0 24px;
}
.injection-intro p {
  max-width: 65ch;
  font-size: 16px;
  color: var(--muted);
}
.injection-impact {
  border-left: 4px solid var(--accent);
  padding: 10px 0 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.injection-impact > span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.injection-impact strong {
  color: var(--text);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  white-space: nowrap;
}
.injection-impact strong span { color: var(--accent); }
.injection-impact small { color: var(--muted); font-size: 12px; }
.injection-figure {
  margin: 0;
  padding: 22px 24px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.injection-figure h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.injection-chart-scroll { overflow-x: auto; }
.injection-plot { display: block; width: 100%; min-width: 640px; height: auto; }
.injection-scroll-hint { display: none; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.injection-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.injection-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.injection-swatch { display: inline-block; width: 20px; height: 12px; border: 1px solid #087c9e; }
.injection-swatch.clean { background: #9acbd5; }
.injection-swatch.injected {
  background: repeating-linear-gradient(135deg, white 0 4px, #087c9e 4px 5px);
}
.injection-values { margin-top: 14px; color: var(--muted); font-size: 13px; }
.injection-values summary { cursor: pointer; width: fit-content; }
.injection-values summary:hover { color: var(--accent); }
.injection-values .scroll { margin-top: 10px; }
.injection-callout { margin-top: 20px; }

/* ========================= run setup ========================= */

.setup-copy { max-width: 78ch; }
.setup-copy p { margin: 0 0 18px; }
.setup-copy p:last-child { margin-bottom: 0; }
.setup-example { color: var(--muted); font-size: 15px; }

details.more {
  margin-top: 22px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
}

details.more > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "\25B8  "; color: var(--faint); }
details.more[open] > summary::before { content: "\25BE  "; }
details.more > summary:hover { color: var(--accent); }
details.more[open] > summary { margin-bottom: 4px; }

.authors {
  font-size: 16px;
  line-height: 1.9;
  max-width: 72ch;
  margin: 0 0 10px;
}
.authors sup { font-size: 10px; color: var(--muted); }

.affil {
  font-size: 14px;
  color: var(--muted);
  max-width: 78ch;
  margin: 0 0 6px;
  line-height: 1.7;
}
.affil sup { color: var(--faint); }
.star { color: var(--accent); }

/* ========================= tabs ========================= */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 9px 14px;
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }

body.js .panel { display: none; }
body.js .panel.is-active { display: block; }
.panel > p:first-child { max-width: 88ch; color: var(--muted); }

/* ========================= traces ========================= */

.trace-link {
  margin: 0;
  font-size: 14px;
  padding-top: 4px;
}
.trace-link a { font-weight: 600; text-decoration: none; }
.trace-link a:hover { text-decoration: underline; }

.trace-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.55fr);
  column-gap: 30px;
  row-gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  margin-top: 28px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.trace-card > header {
  grid-column: 1;
  grid-row: 1 / span 4;
  padding-right: 28px;
  border-right: 1px solid var(--line-soft);
}
.trace-card > :not(header) { grid-column: 2; }

.trace-summary {
  margin: 0;
  display: grid;
  gap: 18px;
}
.trace-summary div { margin: 0; }
.trace-summary dt {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}
.trace-summary dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}
.trace-summary div:last-child dd {
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.trace-summary code { background: var(--surface-2); }

.trace {
  display: grid;
  gap: 8px;
}

.step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-2);
  font-size: 14.5px;
  line-height: 1.45;
}

.step .cn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--faint);
  text-align: center;
}
.step .cn:empty { min-width: 24px; justify-self: center; padding: 0; }
.step .cn:empty::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }

.step.said {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}
.step.said em { color: var(--text); font-style: normal; font-weight: 600; }

.step code { background: color-mix(in srgb, var(--accent-faint) 70%, transparent); }

.tag {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}

.tag.block { background: var(--accent-faint); color: var(--accent); }
.tag.allow { background: var(--ok-bg); color: var(--ok); }
.tag.outside, .tag.gap { background: var(--warn-bg); color: var(--warn); }
.tag.raw { background: var(--surface-2); color: var(--muted); }
.tag.verifier, .tag.solved { background: var(--accent); color: var(--surface); }


.trace-card .caption {
  margin: 0;
  padding-top: 12px;
}

/* ========================= cite ========================= */

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
}

.toggle {
  appearance: none;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.toggle:hover { border-color: var(--accent); color: var(--accent); }

.controls { margin-bottom: 20px; }

/* ========================= footer ========================= */

footer {
  padding-block: 44px 72px;
  color: var(--muted);
  font-size: 13.5px;
}

.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.foot-grid > div:first-child { max-width: 56ch; }

.foot-title {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
}

.foot-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.foot-links a { text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }

/* ========================= responsive ========================= */

@media (max-width: 860px) {
  .injection-intro { grid-template-columns: 1fr; gap: 18px; }
  .injection-scroll-hint { display: block; }
  .nav-links { display: none; }
  .mark-text { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
  .nav-actions { margin-left: auto; }
  .cols-2 { columns: 1; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .trace-card { grid-template-columns: 1fr; }
  .trace-card > header {
    grid-column: 1;
    grid-row: auto;
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .trace-card > :not(header) { grid-column: 1; }
}

@media (max-width: 1080px) {
  .chart-scroll-hint, .effort-scroll-hint { display: block; }
}

@media (max-width: 560px) {
  .wrap, .nav-inner { padding: 0 18px; }
  section { padding-block: 44px; }
  header#top { padding-block: 40px 0; }
  .trace-card { padding: 20px 16px; border-radius: 10px; }
  .step { grid-template-columns: 34px 1fr; }
  .step .tag { grid-column: 2; justify-self: start; margin-top: 4px; }
  .cards { grid-template-columns: 1fr; }
  .nav-cta-ext { display: none; }
}

@media print {
  #topnav { position: static; }
  body.js .panel { display: block !important; }
  .cta, .controls { display: none; }
}
