:root {
  --co-ink: #182327;
  --co-muted: #526168;
  --co-line: #cbd5d7;
  --co-paper: #ffffff;
  --co-ground: #f2f5f4;
  --co-red: #9d332f;
  --co-teal: #066d69;
  --co-blue: #2a6093;
  --co-green: #38724d;
  --co-gold: #866300;
  --co-violet: #6f4f82;
}

.co-body {
  color: var(--co-ink);
  background: var(--co-ground);
  overflow-x: clip;
}

.co-page {
  --bg-red: var(--co-red);
  --bg-green: var(--co-green);
  --bg-blue: var(--co-blue);
  --bg-gold: var(--co-gold);
  --bg-violet: var(--co-violet);
  --bg-ground: var(--co-ground);
  --bg-line: var(--co-line);
}

.co-page p,
.co-page li,
.co-page dd,
.co-page td,
.co-page th,
.co-page summary {
  font-size: 1.09rem;
  line-height: 1.74;
}

.co-page h1,
.co-page h2,
.co-page h3,
.co-page button,
.co-page input {
  letter-spacing: 0;
}

.co-hero { border-top-color: var(--co-teal); }
.co-kicker { color: var(--co-teal); }
.co-live { border-left-color: var(--co-red); }
.co-observed { display: block; margin-top: 10px; color: var(--co-muted); font-size: 1rem; }
.co-error { color: var(--co-red) !important; font-weight: 800; }
.co-live-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.co-live-metrics dd { color: var(--co-red); overflow-wrap: anywhere; }

.co-node-form {
  max-width: 660px;
  margin-top: 22px;
}

.co-node-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

.co-node-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--co-line);
  background: var(--co-paper);
}

.co-node-form input {
  min-width: 0;
  min-height: 50px;
  padding: 11px 15px;
  border: 0;
  outline: 0;
  color: var(--co-ink);
  background: transparent;
  font-size: 1.08rem;
}

.co-node-form input:focus { box-shadow: inset 0 0 0 2px var(--co-teal); }

.co-node-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 10px 18px;
  border: 0;
  color: #fff;
  background: var(--co-teal);
  font-weight: 800;
}

.co-node-form button:hover { background: #045753; }
.co-node-form button:disabled { cursor: wait; opacity: 0.65; }
.co-node-form button svg { width: 19px; height: 19px; }
.co-node-form small { display: block; margin-top: 7px; color: var(--co-muted); font-size: 0.96rem; }

.co-distinction {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(620px, 1.1fr);
  gap: 40px;
  align-items: center;
  padding: 40px clamp(22px, 4vw, 58px);
  border-top: 1px solid var(--co-line);
  border-bottom: 1px solid var(--co-line);
  background: var(--co-paper);
}

.co-distinction h2 {
  max-width: 760px;
  margin: 5px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.82rem, 2.6vw, 2.48rem);
  line-height: 1.18;
}

.co-distinction p { margin: 0; color: var(--co-muted); }

.co-evidence-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--co-line);
  list-style: none;
}

.co-evidence-path li {
  position: relative;
  min-width: 0;
  padding: 22px 17px;
  border-right: 1px solid var(--co-line);
}

.co-evidence-path li:last-child { border-right: 0; }
.co-evidence-path span { display: grid; width: 32px; height: 32px; margin-bottom: 12px; place-items: center; color: #fff; background: var(--co-teal); font-size: 0.94rem; font-weight: 850; }
.co-evidence-path strong { display: block; line-height: 1.28; }
.co-evidence-path small { display: block; margin-top: 7px; color: var(--co-muted); font-size: 0.92rem; line-height: 1.46; }
.co-tabs button { min-width: 146px; }

.co-model-grid,
.co-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.co-model-card,
.co-chart-card {
  min-width: 0;
  margin: 0;
  padding: 26px;
  border: 1px solid var(--co-line);
  border-radius: 6px;
  background: var(--co-paper);
}

.co-model-card header,
.co-chart-card figcaption {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.co-model-card header > span,
.co-chart-card figcaption > span,
.co-insight-list > article > span,
.co-witness-list header > span {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--co-teal);
  font-size: 0.9rem;
  font-weight: 850;
}

.co-model-card h3,
.co-chart-card h3 {
  margin: 3px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  line-height: 1.26;
}

.co-model-card > p { color: var(--co-muted); }
.co-model-card .math-display { overflow-x: auto; margin: 18px 0; padding: 17px 12px; border-block: 1px solid var(--co-line); }
.co-reading-note { padding: 15px 16px; border-left: 3px solid var(--co-gold); background: #fbf8ed; color: var(--co-ink) !important; }

.co-node-strip {
  display: flex;
  gap: 9px;
  margin: 0 0 24px;
  padding: 14px 0;
  overflow-x: auto;
}

.co-node-strip button {
  flex: 0 0 auto;
  min-height: 43px;
  padding: 8px 14px;
  border: 1px solid var(--co-line);
  border-radius: 4px;
  color: var(--co-ink);
  background: var(--co-paper);
  font-weight: 800;
}

.co-node-strip button[aria-pressed="true"] { border-color: var(--co-teal); color: #fff; background: var(--co-teal); }
.co-node-strip button small { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 650; }

.co-live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  margin-bottom: 24px;
}

.co-live-grid > section {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--co-line);
  background: var(--co-paper);
}

.co-live-grid h3 { margin: 0 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }

.co-chart-stage {
  display: grid;
  min-height: 330px;
  align-items: center;
  overflow-x: auto;
  color: var(--co-ink);
}

.co-network-stage { min-height: 410px; }
.co-chart-stage svg { display: block; width: 100%; min-width: 540px; height: auto; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.co-chart-stage svg text { fill: var(--co-ink); font-size: 13px; }
.co-grid-line { stroke: #d8e0e1; stroke-width: 1; }
.co-axis-line { stroke: #829195; stroke-width: 1.2; }
.co-bar-teal { fill: var(--co-teal); }
.co-bar-red { fill: var(--co-red); }
.co-bar-blue { fill: var(--co-blue); }
.co-bar-gold { fill: var(--co-gold); }
.co-network-edge { stroke: #91a4a5; stroke-linecap: round; }
.co-network-center { fill: var(--co-red); }
.co-network-node { fill: var(--co-teal); }
.co-radar-grid { fill: none; stroke: #cbd5d7; }
.co-radar-area { fill: rgba(6, 109, 105, 0.18); stroke: var(--co-teal); stroke-width: 2.3; }
.co-rank-line { fill: none; stroke-width: 2; opacity: 0.78; }

.co-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--co-line);
  background: var(--co-paper);
}

.co-collocate-table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.co-collocate-table th { padding: 13px 11px; border-bottom: 2px solid var(--co-line); text-align: right; color: var(--co-muted); background: #f5f7f6; font-size: 0.91rem; }
.co-collocate-table th:first-child { text-align: left; }
.co-collocate-table td { padding: 12px 11px; border-bottom: 1px solid #e1e7e8; text-align: right; font-variant-numeric: tabular-nums; font-size: 0.99rem; }
.co-collocate-table td:first-child { text-align: left; font-weight: 800; }
.co-collocate-table tbody tr:hover { background: #f0f7f6; }
.co-collocate-table tbody tr[data-selected="true"] { background: #e6f1ef; }
.co-collocate-table button { width: 100%; border: 0; color: inherit; background: transparent; text-align: left; font-weight: 800; }

.co-caveats { margin-top: 22px; padding: 22px 24px; border-left: 4px solid var(--co-gold); background: #fbf8ed; }
.co-caveats h3 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 1.3rem; }
.co-caveats ul { margin: 0; padding-left: 22px; }
.co-caveats li + li { margin-top: 8px; }

.co-chart-card figcaption p { margin: 0; color: var(--co-muted); font-size: 1rem; line-height: 1.55; }
.co-chart-note { margin: 14px 0 0; padding-top: 15px; border-top: 1px solid var(--co-line); color: var(--co-muted); font-size: 0.98rem !important; }
.co-loading { margin: auto; color: var(--co-muted); text-align: center; }

.co-witness-list,
.co-insight-list { display: grid; gap: 20px; }
.co-witness-list article,
.co-insight-list article { padding: 25px; border: 1px solid var(--co-line); border-radius: 6px; background: var(--co-paper); }
.co-witness-list header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.co-witness-list h3,
.co-insight-list h3 { margin: 2px 0 5px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; }
.co-witness-list header p { margin: 0; color: var(--co-muted); font-size: 0.96rem; }
.co-witness-list header small { color: var(--co-muted); font-size: 0.9rem; }
.co-witness-list blockquote { margin: 20px 0; padding: 16px 19px; border-left: 4px solid var(--co-red); background: #f8f9f8; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; line-height: 1.65; }
.co-witness-list details { margin-top: 14px; border-top: 1px solid var(--co-line); padding-top: 12px; }
.co-witness-list summary { cursor: pointer; color: var(--co-teal); font-weight: 800; }
.co-witness-list details p { color: var(--co-muted); }

.co-insight-list { margin-top: 34px; }
.co-insight-list article { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.co-insight-list p { margin: 8px 0 0; }
.co-local-note { display: flex; gap: 12px; margin: 20px 0; padding: 20px; border: 1px solid var(--co-line); background: #f7f9f8; }
.co-local-note svg { flex: 0 0 22px; width: 22px; color: var(--co-teal); }
.co-glossary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .co-distinction { grid-template-columns: 1fr; }
  .co-live-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .co-live-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-model-grid,
  .co-chart-grid,
  .co-glossary { grid-template-columns: 1fr; }
  .co-evidence-path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-evidence-path li:nth-child(2) { border-right: 0; }
  .co-evidence-path li:nth-child(-n + 2) { border-bottom: 1px solid var(--co-line); }
}

@media (max-width: 640px) {
  .co-page p,
  .co-page li,
  .co-page dd,
  .co-page td,
  .co-page summary { font-size: 1.03rem; line-height: 1.68; }
  .co-live-metrics { grid-template-columns: 1fr; }
  .co-node-form > div { grid-template-columns: 1fr; }
  .co-node-form button { width: 100%; }
  .co-distinction { padding: 28px 18px; }
  .co-evidence-path { grid-template-columns: 1fr; }
  .co-evidence-path li { border-right: 0; border-bottom: 1px solid var(--co-line); }
  .co-evidence-path li:last-child { border-bottom: 0; }
  .co-model-card,
  .co-chart-card,
  .co-live-grid > section,
  .co-witness-list article,
  .co-insight-list article { padding: 19px; }
  .co-witness-list header { grid-template-columns: auto minmax(0, 1fr); }
  .co-witness-list header small { grid-column: 2; }
  .co-chart-stage svg { min-width: 500px; }
}

@media (prefers-reduced-motion: reduce) {
  .co-page * { scroll-behavior: auto !important; transition: none !important; }
}
