:root {
  color-scheme: light;
  --ink: #171821;
  --ink-soft: #292a36;
  --paper: #f1eee7;
  --paper-deep: #e6e1d6;
  --white: #fffefa;
  --text: #24252d;
  --muted: #686975;
  --line: #cbc6bb;
  --blue: #5266eb;
  --blue-dark: #3d4fc5;
  --blue-soft: #e4e8ff;
  --evidence: #176c69;
  --evidence-soft: #dcecea;
  --risk: #a94635;
  --risk-soft: #f3dfda;
  --focus: #98b6ff;
  --rail: 248px;
  --radius-sm: 5px;
  --radius-md: 10px;
  --shadow-paper: 0 18px 50px rgba(32, 30, 24, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  color: inherit;
}

button,
a,
select,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

a {
  color: inherit;
}

button {
  border: 0;
}

h1,
h2,
h3,
p,
blockquote,
dl,
dd,
ol,
ul,
fieldset {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--rail);
  min-height: 100vh;
  padding: 30px 22px 24px;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #f8f6ef;
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.identity-mark {
  position: relative;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.identity-mark i {
  display: block;
  width: 100%;
  background: #8da0ff;
}

.identity-mark i:nth-child(1) { height: 8px; }
.identity-mark i:nth-child(2) { height: 15px; }
.identity-mark i:nth-child(3) { height: 20px; }

.identity strong,
.identity small {
  display: block;
}

.identity strong {
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.identity small {
  margin-top: 4px;
  color: #aeb0ba;
  font-size: 13px;
  line-height: 1.2;
}

.rail-label,
.eyebrow,
.kicker,
.section-number,
.sheet-index,
.output-kicker {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.rail-label {
  margin: 56px 10px 13px;
  color: #777986;
}

.primary-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #c7c8d0;
  font-size: 15px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-item span {
  color: #6f7180;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.nav-item.is-active {
  background: #2a2c3b;
  color: var(--white);
}

.nav-item.is-active span {
  color: #9fafff;
}

.rail-note {
  margin-top: auto;
  padding: 16px 12px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  border-top: 1px solid #3a3b48;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #70d3c3;
  box-shadow: 0 0 0 4px rgba(112, 211, 195, 0.1);
}

.rail-note strong {
  font-size: 13px;
}

.rail-note p {
  margin-top: 4px;
  color: #92949f;
  font-size: 12px;
  line-height: 1.45;
}

.main-canvas {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 76px;
  padding: 13px clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 238, 231, 0.94);
  backdrop-filter: blur(16px);
}

.eyebrow {
  color: var(--muted);
}

.view-name {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 650;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.review-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.review-state span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d39c43;
}

.text-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: #a6a7af;
  text-underline-offset: 4px;
}

.view {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(42px, 6vw, 92px) clamp(24px, 5vw, 78px) 100px;
  animation: enter-view 280ms ease both;
}

.view[hidden] {
  display: none;
}

@keyframes enter-view {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.68fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: end;
}

.kicker {
  margin-bottom: 20px;
  color: var(--blue-dark);
}

.hero-copy h1,
.page-heading h1 {
  max-width: 950px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
}

.hero-copy h1 {
  font-size: clamp(54px, 7.2vw, 112px);
  line-height: 0.91;
}

.hero-lede {
  max-width: 760px;
  margin-top: 32px;
  color: #4e4f59;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.hero-actions,
.form-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-action,
.secondary-action,
.quiet-action,
.copy-action {
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-action {
  background: var(--blue);
  color: white;
}

.primary-action:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.secondary-action,
.quiet-action {
  border: 1px solid #aaa69c;
  background: transparent;
  color: var(--ink);
}

.secondary-action:hover,
.quiet-action:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.thesis-sheet {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-paper);
}

.thesis-sheet::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 64px;
  height: 4px;
  background: var(--blue);
}

.sheet-index {
  color: var(--muted);
}

.thesis-sheet blockquote {
  margin: 44px 0 50px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(29px, 3vw, 45px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.thesis-sheet dl {
  display: grid;
  border-top: 1px solid var(--line);
}

.thesis-sheet dl div {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.thesis-sheet dt {
  color: var(--muted);
}

.thesis-sheet dd {
  font-weight: 650;
}

.evidence-strip {
  margin-top: clamp(64px, 8vw, 116px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.evidence-strip div {
  min-height: 146px;
  padding: 22px 22px 22px 0;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
}

.evidence-strip div:not(:first-child) {
  padding-left: 22px;
}

.evidence-strip div:last-child {
  border-right: 0;
}

.evidence-strip strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.evidence-strip span {
  max-width: 210px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.section-block {
  margin-top: clamp(84px, 11vw, 150px);
}

.section-intro {
  max-width: 760px;
}

.section-intro.compact {
  max-width: 610px;
}

.section-number {
  margin-bottom: 14px;
  color: var(--blue-dark);
}

.section-intro h2,
.system-stack h2,
.board-column h2,
.measurement-rule h2 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4.6vw, 70px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-intro > p:last-child {
  max-width: 650px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.flywheel {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) 28px) minmax(0, 1fr);
  align-items: center;
}

.flywheel article {
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--white);
}

.flywheel article span,
.vertical-flow article > span,
.article-anatomy li > span,
.blueprint-grid article > span {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.flywheel article h3 {
  margin-top: 62px;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.flywheel article p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.flywheel > i {
  color: #898b94;
  font-family: Georgia, serif;
  font-size: 24px;
  font-style: normal;
  text-align: center;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.stack-list {
  margin-top: 46px;
  border-top: 1px solid var(--ink);
}

.stack-list > div {
  min-height: 91px;
  padding: 19px 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.stack-list span {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
}

.stack-list p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.stack-list strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.boundary-card {
  padding: 28px;
  border-top: 4px solid var(--evidence);
  background: var(--ink-soft);
  color: white;
}

.boundary-card .section-number {
  color: #80d6ca;
}

.boundary-card h3 {
  margin-top: 28px;
  max-width: 430px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.boundary-card ul {
  margin-top: 36px;
  padding: 0;
  list-style: none;
}

.boundary-card li {
  padding: 12px 0;
  display: flex;
  gap: 12px;
  border-top: 1px solid #454652;
  color: #d6d7dc;
  font-size: 14px;
}

.boundary-card li span {
  width: 18px;
  color: #82d9cb;
}

.boundary-footnote {
  margin-top: 22px;
  color: #9ea0aa;
  font-size: 13px;
  line-height: 1.55;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.page-heading > div {
  max-width: 940px;
}

.page-heading h1 {
  font-size: clamp(54px, 6.8vw, 104px);
  line-height: 0.94;
}

.page-heading > div > p:last-child {
  max-width: 760px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.prototype-flag {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid #b9a575;
  color: #745b22;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.maker-layout {
  margin-top: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(370px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.form-sheet,
.output-sheet {
  border: 1px solid var(--line);
  background: var(--white);
}

.form-sheet {
  padding: clamp(24px, 4vw, 48px);
}

.form-sheet fieldset {
  padding: 0 0 40px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-sheet fieldset + fieldset {
  padding-top: 40px;
}

.form-sheet legend {
  width: 100%;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.form-sheet legend span {
  margin-right: 12px;
  color: var(--blue-dark);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.form-sheet label:not(.job-grid label):not(.segmented-control label):not(.evidence-checks label) {
  display: block;
  margin-bottom: 8px;
  color: #484952;
  font-size: 14px;
  font-weight: 650;
}

select,
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid #aaa69c;
  border-radius: 3px;
  background: #fff;
  font-size: 15px;
}

select,
input[type="text"] {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 112px;
  padding: 13px;
  resize: vertical;
  line-height: 1.5;
}

.field-help {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #aaa69c;
  border-radius: 4px;
  overflow: hidden;
}

.segmented-control label {
  position: relative;
  min-width: 0;
  border-right: 1px solid #aaa69c;
  cursor: pointer;
}

.segmented-control label:last-child {
  border-right: 0;
}

.segmented-control input,
.job-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  min-height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.segmented-control input:checked + span {
  background: var(--ink);
  color: white;
}

.segmented-control input:focus-visible + span,
.job-grid input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.job-grid label {
  position: relative;
  cursor: pointer;
}

.job-grid label > span {
  min-height: 94px;
  padding: 15px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #faf9f5;
}

.job-grid strong,
.job-grid small {
  display: block;
}

.job-grid strong {
  font-size: 15px;
}

.job-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.job-grid input:checked + span {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.split-fields {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.evidence-checks {
  margin-bottom: 25px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.evidence-checks label {
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #faf9f5;
  cursor: pointer;
}

.evidence-checks input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.evidence-checks span {
  font-size: 13px;
  line-height: 1.35;
}

.output-sheet {
  position: sticky;
  top: 100px;
  padding: 28px;
  box-shadow: var(--shadow-paper);
}

.output-head {
  padding-bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ink);
}

.output-head h2 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.15;
}

.evidence-state {
  flex: 0 0 auto;
  align-self: start;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.evidence-state.is-partial {
  background: var(--risk-soft);
  color: var(--risk);
}

.evidence-state.is-ready {
  background: var(--evidence-soft);
  color: var(--evidence);
}

.sample-output {
  padding-top: 28px;
}

.output-kicker {
  color: var(--blue-dark);
}

.sample-output h3 {
  margin-top: 12px;
  font-family: Georgia, serif;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sample-output ol {
  margin-top: 31px;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.sample-output li {
  padding: 13px 0;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.sample-output li strong {
  font-size: 13px;
}

.sample-output li span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.missing-proof {
  margin-top: 22px;
  padding: 15px;
  border-left: 3px solid var(--risk);
  background: var(--risk-soft);
}

.missing-proof span {
  color: var(--risk);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.missing-proof p {
  margin-top: 7px;
  color: #6d352c;
  font-size: 13px;
  line-height: 1.45;
}

.copy-action {
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.copy-action:hover {
  background: var(--ink);
  color: white;
}

.copy-status {
  min-height: 18px;
  margin-top: 7px;
  color: var(--evidence);
  font-size: 12px;
  text-align: center;
}

.fact-banner {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
}

.fact-banner p {
  min-height: 110px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.fact-banner p:first-child {
  background: var(--evidence-soft);
}

.fact-banner p:last-child {
  border-left: 1px solid var(--ink);
  background: var(--risk-soft);
}

.fact-banner strong {
  color: var(--ink);
}

.vertical-flow {
  margin-top: 45px;
  border-top: 1px solid var(--ink);
}

.vertical-flow article {
  min-height: 112px;
  padding: 22px 0;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 120px;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.vertical-flow h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.vertical-flow p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.vertical-flow b {
  justify-self: end;
  color: var(--evidence);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comparison-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
}

.board-column {
  padding: clamp(28px, 4vw, 54px);
}

.board-column.risks {
  border-left: 1px solid var(--ink);
  background: #e9e5dc;
}

.board-column.works .section-number {
  color: var(--evidence);
}

.board-column.risks .section-number {
  color: var(--risk);
}

.board-column h2 {
  font-size: clamp(37px, 4vw, 58px);
}

.board-column ul {
  margin-top: 38px;
  padding: 0;
  list-style: none;
}

.board-column li {
  padding: 16px 0;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
}

.board-column li:last-child {
  border-bottom: 1px solid var(--line);
}

.board-column li strong {
  font-size: 15px;
}

.board-column li span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.article-anatomy ol {
  margin-top: 42px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
  list-style: none;
}

.article-anatomy li {
  min-height: 195px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.article-anatomy li strong,
.article-anatomy li small {
  display: block;
}

.article-anatomy li strong {
  margin-top: 47px;
  font-size: 18px;
}

.article-anatomy li small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.blueprint-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.blueprint-grid article {
  min-height: 172px;
  padding: 21px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.blueprint-grid h3 {
  margin-top: 38px;
  font-size: 18px;
}

.blueprint-grid p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.comparison-table-wrap {
  margin-top: 38px;
  overflow-x: auto;
  border: 1px solid var(--ink);
  background: var(--white);
}

table {
  width: 100%;
  min-width: 730px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--ink);
  color: white;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody th {
  width: 28%;
  background: #f4f1ea;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th:last-child,
td:last-child {
  border-right: 0;
}

.isolation-rule {
  margin-top: 32px;
  padding: 24px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 17px;
  align-items: start;
  border-left: 4px solid var(--risk);
  background: var(--risk-soft);
}

.isolation-rule > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--risk);
  border-radius: 50%;
  color: var(--risk);
  font-weight: 800;
}

.isolation-rule strong {
  font-size: 17px;
}

.isolation-rule p {
  margin-top: 6px;
  color: #714037;
  font-size: 14px;
  line-height: 1.5;
}

.library-controls {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #aaa69c;
  border-radius: 3px;
  background: transparent;
  color: #50515a;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.library-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--line);
}

.library-card {
  min-height: 300px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.library-card[hidden] {
  display: none;
}

.library-card > span {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.library-card h2 {
  margin-top: 48px;
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.library-card p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.library-card a {
  width: fit-content;
  margin-top: auto;
  padding-top: 24px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.measurement-rule {
  margin-top: 60px;
  padding: clamp(30px, 5vw, 62px);
  border-top: 4px solid var(--blue);
  background: var(--ink);
  color: white;
}

.measurement-rule .section-number {
  color: #9eacff;
}

.measurement-rule h2 {
  max-width: 900px;
  color: white;
  font-size: clamp(40px, 5vw, 70px);
}

.measurement-rule > p:last-child {
  max-width: 700px;
  margin-top: 22px;
  color: #babbc4;
  font-size: 17px;
  line-height: 1.55;
}

.site-footer {
  padding: 22px clamp(24px, 5vw, 78px);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  :root { --rail: 210px; }

  .rail { padding-inline: 14px; }
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .thesis-sheet { max-width: 650px; }
  .flywheel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .flywheel > i { display: none; }
  .maker-layout { grid-template-columns: 1fr; }
  .output-sheet { position: static; }
  .blueprint-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --rail: 0px; }

  .app-shell { display: block; }

  .rail {
    position: sticky;
    top: 0;
    width: 100%;
    min-height: auto;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid #3b3c49;
  }

  .identity-mark { width: 31px; height: 31px; }
  .identity small { display: none; }
  .rail-label,
  .rail-note { display: none; }

  .primary-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-item {
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding-inline: 10px;
    grid-template-columns: auto 1fr;
    font-size: 13px;
  }

  .nav-item span { display: none; }
  .main-canvas { grid-column: auto; }
  .topbar { top: 64px; min-height: 62px; }
  .review-state { display: none; }
  .view { padding-top: 56px; }
  .two-column { grid-template-columns: 1fr; }
  .boundary-card { max-width: 640px; }
  .page-heading { align-items: start; flex-direction: column; }
  .page-heading .secondary-action { align-self: start; }
  .article-anatomy ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blueprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .rail { grid-template-columns: 35px minmax(0, 1fr); gap: 8px; }
  .identity strong { display: none; }
  .topbar { padding-inline: 18px; }
  .topbar-actions { gap: 10px; }
  .topbar .eyebrow { display: none; }
  .text-link { font-size: 13px; }
  .view { padding: 42px 18px 76px; }
  .hero-copy h1 { font-size: clamp(51px, 15vw, 73px); }
  .hero-lede { font-size: 18px; }
  .thesis-sheet { padding: 22px; }
  .thesis-sheet blockquote { font-size: 34px; }
  .evidence-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-strip div { min-height: 132px; padding: 18px; border-bottom: 1px solid var(--line); }
  .evidence-strip div:not(:first-child) { padding-left: 18px; }
  .evidence-strip div:nth-child(2) { border-right: 0; }
  .evidence-strip div:nth-child(3),
  .evidence-strip div:nth-child(4) { border-bottom: 0; }
  .flywheel { grid-template-columns: 1fr; }
  .flywheel article { min-height: 190px; }
  .flywheel article h3 { margin-top: 36px; }
  .page-heading h1 { font-size: clamp(50px, 14vw, 72px); }
  .page-heading > div > p:last-child { font-size: 17px; }
  .maker-layout { margin-top: 40px; }
  .form-sheet,
  .output-sheet { padding: 21px; }
  .segmented-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented-control label:nth-child(2) { border-right: 0; }
  .segmented-control label:nth-child(-n + 2) { border-bottom: 1px solid #aaa69c; }
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-fields,
  .evidence-checks { grid-template-columns: 1fr; }
  .output-head { flex-direction: column; }
  .evidence-state { align-self: start; }
  .sample-output li { grid-template-columns: 1fr; gap: 5px; }
  .fact-banner { grid-template-columns: 1fr; }
  .fact-banner p:last-child { border-left: 0; border-top: 1px solid var(--ink); }
  .vertical-flow article { grid-template-columns: 36px minmax(0, 1fr); }
  .vertical-flow b { grid-column: 2; justify-self: start; }
  .comparison-board { grid-template-columns: 1fr; }
  .board-column.risks { border-left: 0; border-top: 1px solid var(--ink); }
  .article-anatomy ol,
  .blueprint-grid,
  .library-grid { grid-template-columns: 1fr; }
  .article-anatomy li { min-height: 166px; }
  .library-card { min-height: 270px; }
  .site-footer { padding-inline: 18px; flex-direction: column; }
}

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

@media (forced-colors: active) {
  .status-dot,
  .review-state span { border: 1px solid CanvasText; }
  .nav-item.is-active,
  .primary-action,
  .filter-button.is-active { outline: 2px solid Highlight; }
}
