:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --surface: #fffdf8;
  --surface-2: #f8f5ef;
  --ink: #111b23;
  --ink-2: #26343f;
  --muted: #5a6670;
  --muted-2: #7a837f;
  --line: #d8d2c7;
  --line-strong: #bcb4a8;
  --red: #d12831;
  --red-dark: #941922;
  --red-soft: #f9e5e4;
  --amber: #9b5c00;
  --amber-soft: #fff0d3;
  --green: #17644d;
  --green-soft: #e4f3ec;
  --blue: #155d7b;
  --blue-soft: #e5f1f6;
  --slate-soft: #edf0f2;
  --shadow: 0 18px 55px rgba(17, 27, 35, 0.09);
  --shadow-small: 0 7px 22px rgba(17, 27, 35, 0.075);
  --radius: 18px;
  --radius-small: 10px;
  --max: 1180px;
  --measure: 760px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
  background: var(--paper);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 84% 2%, rgba(209, 40, 49, 0.08), transparent 28rem),
    linear-gradient(180deg, #f8f5ee 0, var(--paper) 38rem, var(--paper) 100%);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--red);
}

img, svg { display: block; max-width: 100%; }
button, select, textarea { font: inherit; }
button, select { touch-action: manipulation; }

::selection {
  background: var(--red);
  color: white;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.7rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(188, 180, 168, 0.72);
  background: rgba(248, 245, 238, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  width: min(calc(100% - 36px), var(--max));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 790;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 31px;
  padding: 0 0.48rem;
  border-radius: 7px;
  background: var(--red);
  color: white;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-size: 0.92rem;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.nav-link, .nav-button {
  min-height: 39px;
  padding: 0.48rem 0.76rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.nav-link:hover, .nav-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.nav-link[aria-current="page"] {
  border-color: var(--ink);
  color: var(--ink);
}

.hero {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7.5rem) 0 clamp(4rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}

.kicker {
  margin: 0 0 1.15rem;
  color: var(--red-dark);
  font-size: 0.79rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1, h2, h3, .serif {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 620;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.35rem, 7.2vw, 7rem);
  line-height: 0.93;
}

.hero-question {
  display: block;
  margin-top: 0.12em;
  color: var(--red);
}

.hero-dek {
  max-width: 760px;
  margin: 1.8rem 0 0;
  color: var(--ink-2);
  font-size: clamp(1.18rem, 2.2vw, 1.46rem);
  line-height: 1.48;
  letter-spacing: -0.014em;
}

.hero-note {
  width: fit-content;
  max-width: 720px;
  margin-top: 1.65rem;
  padding: 0.72rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.68rem;
  border: 1px solid #e8b8ba;
  border-radius: 10px;
  background: var(--red-soft);
  color: #5f2429;
  font-size: 0.86rem;
  font-weight: 670;
  line-height: 1.45;
}

.note-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 0.72rem;
  font-weight: 850;
}

.byline {
  margin: 1.45rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}
.byline a { color: inherit; text-underline-offset: 0.18em; }

.hero-console {
  position: relative;
  min-height: 500px;
  padding: 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(145deg, #fefcf7, #e8e3da);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-console::before {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  right: -120px;
  top: -120px;
  border: 54px solid rgba(209, 40, 49, 0.08);
  border-radius: 50%;
}

.console-window {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 476px;
  padding: 1rem;
  border: 1px solid #bab3a8;
  border-radius: 18px;
  background: #161f27;
  color: #f6f4ef;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  color: #cbd2d7;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: #ffd8da;
}
.live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff525d;
  box-shadow: 0 0 0 6px rgba(255,82,93,0.12);
  animation: pulse 1.8s ease-in-out infinite;
}

.hero-call-label {
  margin: 1.4rem 0 0.45rem;
  color: #adb6bc;
  font-size: 0.68rem;
  font-weight: 740;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-call {
  margin: 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.waveform {
  height: 74px;
  margin: 1.55rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.waveform span {
  width: 4px;
  height: var(--h, 30%);
  border-radius: 4px;
  background: #ef5961;
  opacity: var(--o, .9);
  animation: wave 1.6s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}

.hero-pipeline {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.52rem;
}

.hero-stage {
  padding: 0.56rem 0.66rem;
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 0.62rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #dce1e4;
  font-size: 0.76rem;
  line-height: 1.3;
}
.hero-stage .stage-index {
  color: #87939a;
  font-variant-numeric: tabular-nums;
}
.hero-stage .stage-state {
  color: #aab4ba;
  font-size: 0.68rem;
}
.hero-stage.boundary {
  border-color: rgba(255,82,93,0.75);
  background: rgba(209,40,49,0.13);
}
.hero-stage.boundary .stage-state { color: #ffb8bd; }

.hero-console-caption {
  margin: 1rem 0 0;
  color: #9da7ad;
  font-size: 0.69rem;
  line-height: 1.4;
}

.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.52);
}

.stats-grid {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  min-height: 175px;
  padding: 2.05rem clamp(1rem, 2vw, 1.8rem);
  border-left: 1px solid var(--line);
}
.stat:last-child { border-right: 1px solid var(--line); }
.stat-value {
  display: block;
  color: var(--ink);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.42;
}
.stat-source {
  display: block;
  margin-top: 0.48rem;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 730;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

main { overflow: clip; }

.section {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.section + .section { border-top: 1px solid var(--line); }

.section-narrow {
  width: min(calc(100% - 36px), var(--measure));
}

.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--red-dark);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

h2 {
  max-width: 930px;
  margin: 0;
  font-size: clamp(2.45rem, 5.4vw, 5.05rem);
  line-height: 0.98;
}

.section-intro {
  max-width: 780px;
  margin: 1.25rem 0 0;
  color: var(--ink-2);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.56;
}

.prose {
  max-width: var(--measure);
  color: var(--ink-2);
}
.prose p { margin: 1.2em 0; }
.prose strong { color: var(--ink); }
.prose a, .source-link, .inline-link {
  color: var(--red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.prose a:hover, .source-link:hover, .inline-link:hover { color: var(--red); }

.pullquote {
  max-width: 900px;
  margin: 3.1rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 5px solid var(--red);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.pullquote cite {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.fact-card {
  min-height: 250px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,253,248,0.76);
}
.fact-card.emphasis {
  border-color: #e9aeb1;
  background: var(--red-soft);
}
.fact-number {
  color: var(--red-dark);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 2.9rem;
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}
.fact-card h3 {
  margin: 1rem 0 0.45rem;
  font-size: 1.35rem;
  line-height: 1.2;
}
.fact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.52;
}

.interactive-wrap {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.78fr);
  align-items: start;
  gap: 1.3rem;
}

.pipeline-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.stage-card {
  position: relative;
  min-height: 232px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.stage-card:hover { transform: translateY(-2px); }
.stage-card[data-risk="high"] {
  border-color: #e19a9e;
  background: #fff9f8;
  box-shadow: 0 8px 26px rgba(148,25,34,0.1);
}
.stage-card[data-risk="filter"] {
  border-color: #e2bf7b;
  background: #fffdf7;
}
.stage-card[data-risk="outside"] {
  border-color: #a9c8bc;
}
.stage-card::after {
  content: "";
  position: absolute;
  left: 1.18rem;
  right: 1.18rem;
  bottom: -0.94rem;
  height: 0.94rem;
  border-left: 1px dashed var(--line-strong);
  pointer-events: none;
}
.stage-card:nth-last-child(-n+2)::after { display: none; }

.stage-head {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
}
.stage-no {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 790;
  font-variant-numeric: tabular-nums;
}
.stage-card[data-risk="high"] .stage-no {
  border-color: var(--red);
  background: var(--red);
  color: white;
}
.stage-card[data-risk="filter"] .stage-no {
  border-color: var(--amber);
  color: var(--amber);
}
.stage-card[data-risk="outside"] .stage-no {
  border-color: var(--green);
  color: var(--green);
}

.stage-title {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 790;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.stage-subtitle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.stage-select-wrap { margin-top: 1rem; }
.stage-select-wrap label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 790;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stage-select {
  width: 100%;
  min-height: 46px;
  padding: 0.66rem 2.55rem 0.66rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background-color: white;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1.25;
}
.stage-select:focus-visible {
  outline: 3px solid rgba(21,93,123,0.26);
  outline-offset: 2px;
  border-color: var(--blue);
}

.stage-assessment {
  margin: 0.8rem 0 0;
  padding-top: 0.72rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.42;
}
.stage-assessment strong { color: var(--ink-2); }

.result-panel {
  position: sticky;
  top: 90px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-status {
  padding: 1.4rem 1.45rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: var(--slate-soft);
}
.result-panel[data-status="high"] .result-status { background: var(--red-soft); }
.result-panel[data-status="filter"] .result-status { background: var(--amber-soft); }
.result-panel[data-status="outside"] .result-status { background: var(--green-soft); }
.result-status-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-title-row {
  margin-top: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.status-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 0.36rem;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 5px rgba(90,102,112,.12);
}
.result-panel[data-status="high"] .status-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(209,40,49,.13); }
.result-panel[data-status="filter"] .status-dot { background: var(--amber); box-shadow: 0 0 0 5px rgba(155,92,0,.13); }
.result-panel[data-status="outside"] .status-dot { background: var(--green); box-shadow: 0 0 0 5px rgba(23,100,77,.13); }
.status-title {
  margin: 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.12rem;
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.status-copy {
  margin: 0.62rem 0 0;
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.5;
}

.call-sim {
  padding: 1.25rem 1.45rem;
  border-bottom: 1px solid var(--line);
}
.sim-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 810;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.fiction-badge {
  padding: 0.22rem 0.43rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.58rem;
}
.caller-line {
  margin: 0.68rem 0 0;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.24rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.sim-output-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.46rem;
}
.sim-output {
  padding: 0.52rem 0.6rem;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 0.5rem;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.69rem;
  line-height: 1.4;
}
.sim-output strong {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sim-output.high { background: var(--red-soft); color: #63252a; }
.sim-output.filter { background: var(--amber-soft); color: #65400a; }
.sim-output.outside { background: var(--green-soft); color: #205844; }

.threshold-box {
  padding: 1.15rem 1.45rem;
  border-bottom: 1px solid var(--line);
}
.threshold-label {
  margin: 0 0 .38rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 810;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.threshold-value {
  margin: 0;
  font-size: .83rem;
  font-weight: 740;
  line-height: 1.45;
}

.human-box {
  padding: 1.05rem 1.45rem;
  border-bottom: 1px solid var(--line);
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}
.switch-copy strong {
  display: block;
  font-size: .79rem;
}
.switch-copy span {
  display: block;
  margin-top: .12rem;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.35;
}
.switch {
  position: relative;
  width: 47px;
  height: 27px;
  flex: 0 0 auto;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch-track {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: #d8d3ca;
  cursor: pointer;
  transition: .18s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: .18s ease;
}
.switch input:checked + .switch-track {
  border-color: var(--green);
  background: var(--green);
}
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(21,93,123,.25); outline-offset: 2px; }
.human-legal-note {
  margin: .72rem 0 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.42;
}
.human-legal-note strong { color: var(--red-dark); }

.duties-box {
  padding: 1.1rem 1.45rem;
}
.duties-title {
  margin: 0 0 .65rem;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 810;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.duty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}
.duty-chip {
  padding: .34rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .61rem;
  font-weight: 690;
  line-height: 1.25;
}
.result-actions {
  padding: 0 1.45rem 1.35rem;
  display: flex;
  gap: .5rem;
}
.button {
  min-height: 42px;
  padding: .64rem .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-size: .7rem;
  font-weight: 790;
  letter-spacing: .015em;
  cursor: pointer;
}
.button:hover { background: var(--ink-2); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.button.secondary:hover { background: var(--surface-2); }
.button:focus-visible { outline: 3px solid rgba(21,93,123,.28); outline-offset: 2px; }
.button-wide { width: 100%; }

.legend {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .95rem;
  color: var(--muted);
  font-size: .7rem;
}
.legend-item { display: inline-flex; align-items: center; gap: .38rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.outside { background: var(--green); }
.legend-dot.filter { background: var(--amber); }
.legend-dot.high { background: var(--red); }
.legend-note { width: 100%; margin: .15rem 0 0; font-size: .67rem; }

.comparison-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.comparison-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.comparison-card.safe { border-top: 6px solid var(--green); }
.comparison-card.risky { border-top: 6px solid var(--red); }
.comparison-label {
  display: inline-flex;
  padding: .3rem .48rem;
  border-radius: 5px;
  font-size: .65rem;
  font-weight: 810;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.safe .comparison-label { color: var(--green); background: var(--green-soft); }
.risky .comparison-label { color: var(--red-dark); background: var(--red-soft); }
.comparison-card h3 { margin: 1rem 0 .7rem; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.1; }
.comparison-card p { margin: 0; color: var(--ink-2); font-size: .93rem; }
.comparison-source {
  margin-top: 1.25rem !important;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: .72rem !important;
}

.callout {
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #e5b7ba;
  border-radius: 12px;
  background: var(--red-soft);
  color: #57262a;
  font-size: .9rem;
}
.callout strong { color: #42151a; }

.procurement-layout {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}
.score-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.score-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.score-head h3 { margin: 0; font-size: 1.45rem; }
.score-total { color: var(--muted); font-size: .71rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.score-bar {
  height: 44px;
  margin-top: 1.25rem;
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
}
.score-seg {
  min-width: 2px;
  display: grid;
  place-items: center;
  color: white;
  font-size: .62rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.score-seg.price { background: #27343e; }
.score-seg.support { background: #50616c; }
.score-seg.link { background: #70818b; }
.score-seg.llm { background: var(--red); }
.score-seg.tts { background: #b5484e; }
.score-seg.tutorials { background: #988675; }
.score-seg.exp { background: #b8aa9c; color: var(--ink); }
.score-seg.method { background: #887768; }
.score-list {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem .9rem;
}
.score-list li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: start;
  gap: .42rem;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.35;
}
.score-key { width: 9px; height: 9px; margin-top: .18rem; border-radius: 2px; }
.score-list b { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.score-foot {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: .69rem;
}

.llm-card {
  padding: clamp(1.55rem, 3vw, 2.4rem);
  border: 1px solid #e6aeb1;
  border-radius: var(--radius);
  background: var(--red-soft);
}
.llm-card .big {
  margin: 0;
  color: var(--red-dark);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: .88;
}
.llm-card h3 { margin: 1rem 0 .65rem; font-size: 1.7rem; line-height: 1.1; }
.llm-card p { margin: .8rem 0 0; color: #592c30; }

.metrics-grid {
  margin-top: 2.1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .72rem;
}
.metric {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,253,248,.74);
}
.metric-icon {
  color: var(--red-dark);
  font-size: 1.1rem;
  font-weight: 850;
}
.metric strong { display: block; margin-top: .45rem; font-size: .8rem; }
.metric span { display: block; margin-top: .23rem; color: var(--muted); font-size: .68rem; line-height: 1.4; }

.timeline {
  position: relative;
  margin: 3.2rem 0 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 114px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
  min-height: 83px;
  display: grid;
  grid-template-columns: 92px 34px 1fr;
  gap: .9rem;
}
.timeline-date {
  padding-top: .1rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 760;
  line-height: 1.3;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin: .12rem auto 0;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.timeline-item.key .timeline-dot { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.timeline-content { padding: 0 0 1.65rem; }
.timeline-content strong { display: block; font-size: .91rem; line-height: 1.35; }
.timeline-content span { display: block; margin-top: .28rem; color: var(--muted); font-size: .76rem; line-height: 1.45; }

.known-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.known-card {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.known-card h3 { margin: 0; font-size: 1.7rem; }
.known-card.unknown { border-color: #e2b674; background: #fffaf0; }
.check-list, .question-list {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .82rem;
}
.check-list li, .question-list li {
  position: relative;
  padding-left: 1.55rem;
  color: var(--ink-2);
  font-size: .86rem;
  line-height: 1.48;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 900;
}
.question-list li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--amber);
  font-weight: 900;
}

.dossier {
  margin-top: 3.2rem;
  counter-reset: dossier;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.dossier-item {
  counter-increment: dossier;
  padding: 1.15rem;
  display: grid;
  grid-template-columns: 33px 1fr;
  gap: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,253,248,.7);
}
.dossier-item::before {
  content: counter(dossier, decimal-leading-zero);
  color: var(--red-dark);
  font-size: .7rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}
.dossier-item strong { display: block; font-size: .84rem; line-height: 1.35; }
.dossier-item span { display: block; margin-top: .24rem; color: var(--muted); font-size: .69rem; line-height: 1.43; }

.request-wrap {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: 1.1rem;
  align-items: start;
}
.request-explain {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.request-explain h3 { margin: 0; font-size: 1.55rem; }
.request-explain p { margin: .85rem 0 0; color: var(--muted); font-size: .84rem; }
.request-box {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #171f26;
  overflow: hidden;
  box-shadow: var(--shadow-small);
}
.request-toolbar {
  padding: .72rem .85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.13);
  color: #bfc8ce;
  font-size: .65rem;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.copy-button {
  padding: .36rem .55rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  background: transparent;
  color: white;
  font-size: .63rem;
  font-weight: 750;
  cursor: pointer;
}
.copy-button:hover { background: rgba(255,255,255,.08); }
.request-text {
  width: 100%;
  min-height: 560px;
  padding: 1.15rem;
  border: 0;
  resize: vertical;
  background: #171f26;
  color: #eef1f2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .73rem;
  line-height: 1.58;
  outline: none;
}
.request-text:focus { box-shadow: inset 0 0 0 3px rgba(255,255,255,.12); }

.source-grid {
  margin-top: 2.7rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.source-card {
  padding: 1.15rem;
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,253,248,.72);
  color: inherit;
  text-decoration: none;
}
.source-card:hover { border-color: var(--red); background: var(--surface); }
.source-no {
  color: var(--red-dark);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.22rem;
  font-weight: 650;
}
.source-card strong { display: block; font-size: .83rem; line-height: 1.35; }
.source-card span { display: block; margin-top: .28rem; color: var(--muted); font-size: .68rem; line-height: 1.42; }

.method-note {
  margin-top: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .8rem;
}
.method-note strong { color: var(--ink); }

.footer {
  border-top: 1px solid var(--line-strong);
  background: #ece7dd;
}
.footer-inner {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: 2.6rem 0 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  color: var(--muted);
  font-size: .72rem;
}
.footer strong { color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; }
.footer a { color: inherit; text-underline-offset: .18em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 500;
  max-width: calc(100% - 32px);
  padding: .72rem 1rem;
  transform: translate(-50%, 20px);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: .76rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #e2b674;
  border-radius: 10px;
  background: var(--amber-soft);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .58; transform: scale(.82); }
}
@keyframes wave {
  from { transform: scaleY(.65); opacity: .56; }
  to { transform: scaleY(1.06); opacity: 1; }
}

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; }
  .hero-console { max-width: 660px; min-height: 430px; }
  .console-window { min-height: 405px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .interactive-wrap { grid-template-columns: 1fr; }
  .result-panel { position: relative; top: 0; }
  .procurement-layout { grid-template-columns: 1fr; }
  .request-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-inner { width: min(calc(100% - 24px), var(--max)); min-height: 62px; }
  .brand-text { display: none; }
  .nav-link.hide-mobile { display: none; }
  .nav-link, .nav-button { min-height: 36px; padding: .42rem .62rem; font-size: .72rem; }
  .hero, .section, .stats-grid, .footer-inner { width: min(calc(100% - 24px), var(--max)); }
  .hero { padding-top: 3.6rem; gap: 2.5rem; }
  h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .hero-dek { font-size: 1.08rem; }
  .hero-console { min-height: 460px; border-radius: 22px; padding: .75rem; }
  .console-window { min-height: 438px; padding: .8rem; }
  .hero-call { font-size: 1.55rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 155px; padding: 1.4rem .9rem; }
  .stat-value { font-size: 2.15rem; }
  .section { padding: 5.3rem 0; }
  h2 { font-size: clamp(2.35rem, 12vw, 3.65rem); }
  .fact-grid { grid-template-columns: 1fr; }
  .fact-card { min-height: 0; }
  .pipeline-panel { grid-template-columns: 1fr; }
  .stage-card { min-height: 0; }
  .stage-card::after { display: block !important; }
  .stage-card:last-child::after { display: none !important; }
  .comparison-grid, .known-grid, .source-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .dossier { grid-template-columns: 1fr; }
  .timeline::before { left: 75px; }
  .timeline-item { grid-template-columns: 55px 24px 1fr; gap: .65rem; }
  .timeline-date { font-size: .62rem; }
  .score-list { grid-template-columns: 1fr; }
  .request-text { min-height: 660px; font-size: .68rem; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .nav-button .share-word { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat, .stat:last-child { border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .hero-console { margin-left: -4px; margin-right: -4px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
  .button { width: 100%; }
  .sim-output { grid-template-columns: 68px 1fr; }
}

@media print {
  .site-nav, .result-actions, .copy-button, .toast { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  body::before { display: none; }
  .hero, .section, .stats-grid, .footer-inner { width: 100%; }
  .hero { display: block; padding: 2rem 0; }
  .hero-console { display: none; }
  .section { padding: 2rem 0; break-inside: avoid; }
  .result-panel { position: static; box-shadow: none; }
  .stage-card, .score-card, .source-card { box-shadow: none; }
  a { color: black !important; text-decoration: underline; }
}

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

.preset-bar {
  margin-top: 1.25rem;
  padding: .8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .48rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,253,248,.68);
}
.preset-label {
  margin-right: .2rem;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 810;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.preset-button {
  min-height: 36px;
  padding: .48rem .65rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .68rem;
  font-weight: 730;
  cursor: pointer;
}
.preset-button:hover, .preset-button.active { border-color: var(--ink); background: var(--ink); color: white; }
.preset-button:focus-visible { outline: 3px solid rgba(21,93,123,.25); outline-offset: 2px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.footer-credit { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; }
.footer-credit a { color: inherit; }
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 44px;
  min-height: 44px;
  padding: .55rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 760;
}
.back-to-top:hover { background: var(--ink); color: white; }
.js-ready .back-to-top {
  position: fixed;
  z-index: 30;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(var(--back-to-top-bottom, 16px), env(safe-area-inset-bottom));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  box-shadow: 0 8px 24px rgba(22, 31, 39, .16);
  transition: opacity .18s ease, transform .18s ease;
}
.js-ready .back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .back-to-top { transition: none; transform: none; }
}
