:root {
  --paper: #f7f4ec;
  --paper-deep: #eee9dc;
  --white: #fffdf8;
  --ink: #17292c;
  --ink-soft: #4d5d5e;
  --teal: #173f45;
  --teal-light: #2f7073;
  --teal-pale: #dcebea;
  --wine: #8d3c4e;
  --wine-pale: #f2e0e3;
  --ochre: #945a18;
  --ochre-pale: #f2e6cf;
  --blue: #3e6682;
  --blue-pale: #dde8ef;
  --line: #d6d0c3;
  --line-dark: #bdc8c5;
  --shadow: 0 22px 55px rgb(23 63 69 / 10%);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--wine);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #a65e0f;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgb(255 253 248 / 95%);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-180%);
  border-radius: 0.3rem;
  background: var(--ink);
  color: white;
}

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

.shell {
  width: min(1180px, calc(100% - 3rem));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  background: var(--teal);
  color: white;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-family: var(--serif);
  font-size: 1.1rem;
  text-decoration: none;
}

.wordmark:hover,
.site-header nav a:hover {
  color: #f4cf91;
}

.wordmark-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.55rem;
}

.site-header nav a {
  color: rgb(255 255 255 / 86%);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 18%, rgb(205 177 120 / 16%), transparent 22rem),
    linear-gradient(135deg, #173f45 0%, #173f45 57%, #204a4e 100%);
  color: white;
}

.hero::after {
  position: absolute;
  right: -10rem;
  bottom: -22rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgb(255 255 255 / 2.5%),
    0 0 0 10rem rgb(255 255 255 / 2%);
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 600px;
  align-items: center;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.7fr);
  gap: clamp(3rem, 8vw, 7rem);
  padding-block: 5.4rem 6rem;
}

.eyebrow,
.mini-label {
  margin: 0 0 0.9rem;
  color: var(--ochre);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero .mini-label,
.section-dark .eyebrow,
.citation-band .eyebrow {
  color: #edc789;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
}

h1 {
  max-width: 780px;
  margin-bottom: 1.5rem;
  font-size: clamp(3rem, 6.3vw, 5.5rem);
  letter-spacing: -0.044em;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
}

h3 {
  font-size: 1.45rem;
}

.dek {
  max-width: 740px;
  margin-bottom: 1.25rem;
  color: rgb(255 255 255 / 78%);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.byline {
  margin: 0 0 2rem;
  color: rgb(255 255 255 / 67%);
  font-size: 0.91rem;
  letter-spacing: 0.03em;
}

.byline span {
  padding-inline: 0.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.button-primary {
  background: #efca8d;
  color: var(--teal);
}

.button-primary:hover {
  background: white;
  color: var(--teal);
}

.button-secondary {
  border-color: rgb(255 255 255 / 38%);
  color: white;
}

.button-secondary:hover {
  border-color: white;
  color: white;
}

.hero-theorem {
  position: relative;
  padding: 2.25rem;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 0.3rem;
  background: rgb(6 31 34 / 28%);
  box-shadow: 0 28px 60px rgb(0 0 0 / 12%);
  backdrop-filter: blur(4px);
}

.hero-theorem::before {
  position: absolute;
  top: -1px;
  left: 2.25rem;
  width: 4.5rem;
  height: 3px;
  background: #efca8d;
  content: "";
}

.formula {
  display: grid;
  margin-block: 1.7rem;
  gap: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.formula-divider {
  width: 100%;
  height: 1px;
  background: rgb(255 255 255 / 24%);
}

.hero-theorem > p:last-child {
  margin-bottom: 0;
  color: rgb(255 255 255 / 70%);
  font-size: 0.91rem;
}

.snapshot-strip {
  border-bottom: 1px solid var(--line);
  background: #ebe6da;
}

.snapshot-inner {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.snapshot-inner strong {
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #4f8b74;
  box-shadow: 0 0 0 4px rgb(79 139 116 / 14%);
}

.snapshot-caveat {
  margin-left: auto;
}

.section {
  padding-block: clamp(5rem, 9vw, 8rem);
}

.section-tinted {
  border-block: 1px solid var(--line);
  background: var(--paper-deep);
}

.section-heading {
  display: grid;
  align-items: end;
  margin-bottom: 3.1rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.72fr);
  gap: 4rem;
}

.section-heading > p {
  max-width: 520px;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
}

.compact-heading {
  margin-bottom: 2.3rem;
}

.degree-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.summary-card {
  position: relative;
  min-height: 225px;
  overflow: hidden;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--degree-color, var(--teal));
  border-radius: 0.25rem;
  background: var(--white);
}

.summary-card::after {
  position: absolute;
  right: -1.5rem;
  bottom: -4rem;
  color: var(--degree-pale, var(--teal-pale));
  content: attr(data-degree);
  font-family: var(--serif);
  font-size: 10rem;
  line-height: 1;
  opacity: 0.68;
  pointer-events: none;
}

.summary-card.degree-3 {
  --degree-color: var(--wine);
  --degree-pale: var(--wine-pale);
}

.summary-card.degree-4 {
  --degree-color: var(--ochre);
  --degree-pale: var(--ochre-pale);
}

.summary-card.degree-5 {
  --degree-color: var(--blue);
  --degree-pale: var(--blue-pale);
}

.summary-top,
.summary-metrics {
  position: relative;
  z-index: 1;
}

.degree-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--degree-color);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.degree-pill::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.summary-card h3 {
  margin-block: 0.55rem 1.35rem;
  font-size: 1.65rem;
}

.summary-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.summary-metric {
  display: grid;
  gap: 0.05rem;
}

.summary-metric strong {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
}

.summary-metric span {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.summary-pending {
  position: relative;
  z-index: 1;
  max-width: 80%;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

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

.feature-card {
  display: flex;
  min-height: 410px;
  flex-direction: column;
  padding: clamp(1.7rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--white);
  box-shadow: 0 15px 35px rgb(23 63 69 / 6%);
}

.feature-card.feature-verified {
  border-top: 4px solid var(--teal-light);
}

.feature-card.feature-candidate {
  border-top: 4px solid var(--ochre);
}

.feature-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

.feature-candidate .status-badge {
  background: var(--ochre-pale);
  color: #7d4d16;
}

.status-badge::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.feature-degree {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

.feature-card h3 {
  margin-block: 1.45rem 0.8rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.feature-statement {
  color: var(--ink-soft);
}

.map-diagram {
  display: grid;
  align-items: center;
  margin-block: 1.25rem 1.45rem;
  padding: 1.2rem;
  border-block: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.8rem;
}

.map-node {
  min-width: 0;
}

.map-node:last-child {
  text-align: right;
}

.map-node small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-node a,
.map-node .plain-label {
  display: block;
  overflow: hidden;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.81rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-arrow {
  display: grid;
  place-items: center;
  color: var(--wine);
}

.map-arrow strong {
  font-size: 1.3rem;
  font-weight: 500;
}

.map-arrow small {
  margin-top: -0.2rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-facts {
  display: grid;
  margin: auto 0 0;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.feature-facts div {
  padding: 0.75rem;
  background: #f3f0e8;
}

.feature-facts dt {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.feature-facts dd {
  margin: 0.15rem 0 0;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.feature-caveat {
  margin: 1rem 0 0;
  padding-left: 0.8rem;
  border-left: 2px solid var(--ochre);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.inventory-panel,
.routes-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  align-items: end;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #f1ede3;
  grid-template-columns: minmax(260px, 2fr) minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(120px, 0.65fr) auto;
  gap: 0.8rem;
}

.field {
  display: grid;
  gap: 0.34rem;
}

.field label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.per-page-label select {
  width: 100%;
  min-height: 43px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #c9c3b7;
  border-radius: 0.22rem;
  background: var(--white);
  color: var(--ink);
  font-size: 0.84rem;
}

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-50%);
}

.search-wrap input {
  padding-left: 2.35rem;
}

.reset-button {
  min-height: 43px;
  padding: 0.55rem 0.9rem;
  border: 1px solid #bfb8aa;
  border-radius: 0.22rem;
  background: transparent;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 750;
}

.reset-button:hover {
  background: var(--white);
}

.table-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.result-count {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.result-count strong {
  color: var(--ink);
}

.per-page-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.per-page-label select {
  min-height: 34px;
  padding-block: 0.25rem;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.79rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.82rem 0.85rem;
  border-bottom: 1px solid #e4dfd5;
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #faf8f2;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

tbody tr:hover {
  background: #fbf8f0;
}

.label-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration-color: rgb(23 63 69 / 32%);
  white-space: nowrap;
}

.plain-label {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.label-link::after {
  content: "↗";
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
}

.degree-chip,
.construction-chip,
.table-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  line-height: 1.3;
  white-space: nowrap;
}

.degree-chip {
  width: 2rem;
  height: 2rem;
  justify-content: center;
  color: white;
}

.degree-chip.degree-3 {
  background: var(--wine);
}

.degree-chip.degree-4 {
  background: var(--ochre);
}

.degree-chip.degree-5 {
  background: var(--blue);
}

.construction-chip,
.table-status {
  padding: 0.3rem 0.55rem;
  background: #ece8de;
  color: var(--ink-soft);
}

.table-status.verified {
  background: var(--teal-pale);
  color: var(--teal);
}

.gonality-bound {
  font-family: var(--serif);
  font-size: 0.93rem;
  white-space: nowrap;
}

.muted-value {
  color: #788383;
}

.empty-state {
  padding: 3.5rem 1.25rem;
  color: var(--ink-soft);
  text-align: center;
}

.pagination {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.7rem 1.25rem;
  border-top: 1px solid var(--line);
}

.pagination button,
.pagination span {
  display: inline-grid;
  min-width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.2rem;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--line);
  background: #f1ede3;
  color: var(--teal);
}

.pagination button[aria-current="page"] {
  background: var(--teal);
  color: white;
}

.pagination button:disabled {
  cursor: default;
  opacity: 0.35;
}

.routes-panel {
  margin-top: 2rem;
  box-shadow: none;
}

.routes-heading {
  display: grid;
  padding: 2rem;
  border-bottom: 1px solid var(--line);
  background: #f1ede3;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.1fr);
  gap: 3rem;
}

.routes-heading h3 {
  margin-bottom: 0;
  font-size: 2rem;
}

.routes-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.route-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.route-tools .field-search {
  width: min(420px, 100%);
}

.section-dark {
  background: var(--teal);
  color: white;
}

.light-heading > p {
  color: rgb(255 255 255 / 68%);
}

.method-grid {
  display: grid;
  border-top: 1px solid rgb(255 255 255 / 18%);
  border-left: 1px solid rgb(255 255 255 / 18%);
  grid-template-columns: repeat(4, 1fr);
}

.method-grid article {
  min-height: 280px;
  padding: 1.65rem;
  border-right: 1px solid rgb(255 255 255 / 18%);
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.method-number {
  color: #efca8d;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
}

.method-grid h3 {
  margin-block: 2.7rem 1rem;
  font-size: 1.35rem;
}

.method-grid p {
  margin: 0;
  color: rgb(255 255 255 / 67%);
  font-size: 0.85rem;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 2rem;
  color: rgb(255 255 255 / 67%);
  font-size: 0.77rem;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-legend strong {
  color: white;
}

.legend-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #8fa5a5;
}

.legend-dot.verified {
  background: #efca8d;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.download-card {
  display: grid;
  min-height: 175px;
  align-content: start;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.download-card:hover {
  transform: translateY(-3px);
  border-color: #a7b8b6;
  box-shadow: 0 14px 30px rgb(23 63 69 / 8%);
  color: var(--ink);
}

.download-type {
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.15rem;
  color: var(--wine);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.download-card strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.download-card > span:last-child {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.degree-downloads {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: #f1ede3;
}

.degree-downloads summary {
  color: var(--teal);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.degree-downloads > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  padding-top: 1rem;
  font-size: 0.8rem;
}

.boundary-downloads {
  margin-top: 3.2rem;
  padding-top: 2.7rem;
  border-top: 1px solid var(--line);
}

.boundary-downloads-heading {
  display: grid;
  align-items: end;
  margin-bottom: 1.35rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 3rem;
}

.boundary-downloads-heading h3 {
  margin-bottom: 0;
  font-size: 1.75rem;
}

.boundary-downloads-heading > p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.supplement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.supplement-card {
  display: grid;
  min-height: 155px;
  align-content: start;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.28rem;
  background: #f1ede3;
}

.supplement-card .download-type {
  margin-bottom: 0.8rem;
}

.supplement-card > strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
}

.supplement-card > span:not(.download-type) {
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1rem;
}

.file-links a {
  padding: 0.26rem 0.55rem;
  border: 1px solid #bdb6a8;
  border-radius: 0.18rem;
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.file-links a:hover {
  border-color: var(--teal-light);
  background: var(--white);
}

.workbook-card {
  border-color: #aebfbd;
  background: var(--teal-pale);
}

.citation-band {
  padding-block: 2.5rem;
  background: #8d3c4e;
  color: white;
}

.citation-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.citation-inner p:last-child {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.08rem;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 0.2rem;
  background: transparent;
  color: white;
  font-size: 0.75rem;
  font-weight: 750;
}

.copy-button:hover {
  background: white;
  color: var(--wine);
}

.site-footer {
  background: #102d31;
  color: rgb(255 255 255 / 60%);
}

.footer-inner {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  font-size: 0.75rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: white;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 1rem;
}

.noscript-note {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  max-width: 420px;
  padding: 1rem;
  border: 1px solid #d5b676;
  border-radius: 0.25rem;
  background: #fff7df;
  color: #4d3516;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
}

.skeleton-card {
  background:
    linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 58%) 50%, transparent 70%),
    #e9e4d9;
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite linear;
}

.load-error {
  padding: 2rem;
  border: 1px solid #d7b6b6;
  border-radius: 0.25rem;
  background: #fff1f1;
  color: #6b2e2e;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-theorem {
    max-width: 560px;
  }

  .section-heading,
  .routes-heading,
  .boundary-downloads-heading {
    align-items: start;
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-search {
    grid-column: 1 / -1;
  }

  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .supplement-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workbook-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 2rem, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .site-header nav a:not(:first-child) {
    display: none;
  }

  .hero-grid {
    min-height: auto;
    padding-block: 4rem;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
  }

  .snapshot-inner {
    flex-wrap: wrap;
    padding-block: 0.7rem;
    gap: 0.45rem 0.7rem;
  }

  .snapshot-caveat {
    width: 100%;
    margin-left: 1.25rem;
  }

  .degree-summary,
  .featured-grid,
  .download-grid,
  .supplement-grid {
    grid-template-columns: 1fr;
  }

  .workbook-card {
    grid-column: auto;
  }

  .summary-card {
    min-height: 205px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .field-search {
    grid-column: auto;
  }

  .route-tools,
  .citation-inner,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .route-tools .result-count {
    padding-bottom: 0.2rem;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article {
    min-height: auto;
  }

  .method-grid h3 {
    margin-top: 1.5rem;
  }

  .citation-inner,
  .footer-inner {
    display: flex;
  }

  .copy-button {
    width: fit-content;
  }

  .footer-inner {
    min-height: auto;
    padding-block: 1.5rem;
    gap: 0.45rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    display: grid;
  }

  .hero-theorem {
    padding: 1.5rem;
  }

  .map-diagram {
    grid-template-columns: 1fr;
  }

  .map-node,
  .map-node:last-child {
    text-align: center;
  }

  .map-arrow {
    transform: rotate(90deg);
  }

  .map-arrow small {
    display: none;
  }

  .feature-facts {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination button:nth-of-type(n + 7):not(:last-child) {
    display: none;
  }
}

/* Part 5 companion additions: scope, proof ledgers, and record drawers. */

.hero-statuses {
  display: grid;
  margin: 1.3rem 0 0;
  gap: 0.8rem;
}

.hero-statuses div {
  padding-top: 0.8rem;
  border-top: 1px solid rgb(255 255 255 / 16%);
}

.hero-statuses dt {
  color: #f4cf91;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-statuses dd {
  margin: 0.2rem 0 0;
  color: rgb(255 255 255 / 70%);
  font-size: 0.78rem;
  line-height: 1.55;
}

.section-coverage {
  border-block: 1px solid #d7cdbb;
  background:
    linear-gradient(90deg, rgb(23 63 69 / 3%) 1px, transparent 1px),
    linear-gradient(rgb(23 63 69 / 3%) 1px, transparent 1px),
    var(--paper-deep);
  background-size: 28px 28px;
}

.scope-distinction {
  margin: -1.4rem 0 1.4rem;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--wine);
  background: var(--white);
  color: var(--ink-soft);
  box-shadow: 0 8px 25px rgb(23 63 69 / 6%);
  font-size: 0.88rem;
}

.scope-distinction strong {
  color: var(--ink);
}

.attrition-grid {
  display: grid;
  align-items: stretch;
  margin-bottom: 1.25rem;
  grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
  gap: 0.8rem;
}

.attrition-grid > article {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--white);
}

.attrition-grid h3 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.attrition-arrow {
  display: grid;
  align-content: center;
  justify-items: center;
  color: var(--wine);
  font-family: var(--serif);
  font-size: 2.2rem;
  text-align: center;
}

.attrition-arrow small {
  max-width: 100px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-transform: uppercase;
}

.metric-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.attrition-metric {
  display: grid;
  min-width: 7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.2rem;
  background: #f0ece1;
}

.attrition-metric strong {
  color: var(--teal);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.attrition-metric small {
  color: var(--ink-soft);
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.3;
  text-transform: uppercase;
}

.metric-pending {
  padding: 0.75rem;
  border: 1px dashed #c8bba4;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.coverage-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 0.8rem;
}

.coverage-card {
  min-width: 0;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--white);
}

.coverage-card-primary {
  border-top: 4px solid var(--teal-light);
}

.coverage-card-boundary {
  border-top: 4px solid var(--ochre);
}

.coverage-facts {
  display: grid;
  margin: 0;
  gap: 0.75rem;
}

.coverage-facts div {
  display: grid;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e3ddd1;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.65rem;
}

.coverage-facts dt {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.coverage-facts dd {
  min-width: 0;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  overflow-wrap: anywhere;
}

.coverage-note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.coverage-qualification {
  display: grid;
  margin-top: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid #cbbd9e;
  border-left: 4px solid var(--ochre);
  border-radius: 0.25rem;
  background: #fffaf0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
  gap: 0.25rem;
}

.coverage-qualification[hidden] {
  display: none;
}

.coverage-qualification strong {
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.coverage-qualification[data-state="qualified"] {
  border-left-color: var(--teal-light);
  background: #f4faf7;
}

.plain-checklist {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0.85rem;
}

.plain-checklist li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.plain-checklist li::before {
  position: absolute;
  top: 0.06rem;
  left: 0;
  color: var(--teal-light);
  content: "✓";
  font-weight: 900;
}

.boundary-list li::before {
  color: var(--ochre);
  content: "—";
}

.coverage-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.coverage-links a {
  color: var(--teal);
  font-weight: 750;
}

.feature-card.feature-database,
.feature-card.feature-unknown {
  border-top: 4px solid #8fa5a5;
}

.feature-card.feature-model {
  border-top: 4px solid var(--blue);
}

.feature-card.feature-branch {
  border-top: 4px solid var(--ochre);
}

.feature-tags,
.detail-status-line,
.status-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.status-badge.database,
.status-badge.unknown {
  background: #e8e7e1;
  color: #526061;
}

.status-badge.model {
  background: var(--blue-pale);
  color: #31566f;
}

.status-badge.branch {
  background: var(--ochre-pale);
  color: #754812;
}

.paper-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid #d9b576;
  border-radius: 999px;
  color: #74501f;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paper-badge::before,
.legend-paper,
.paper-marker {
  transform: rotate(45deg);
  background: #c08a35;
  content: "";
}

.paper-badge::before {
  width: 0.4rem;
  height: 0.4rem;
}

.paper-marker {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  color: white;
  font-size: 0;
}

.paper-marker::after {
  transform: rotate(-45deg);
  content: "P";
  font-size: 0.58rem;
  font-weight: 900;
}

.feature-ledger {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  gap: 0.35rem;
}

.feature-ledger-note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.mini-gate {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.26rem 0.45rem;
  border-radius: 0.2rem;
  background: #ece9e1;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
}

.mini-gate i {
  font-style: normal;
  font-weight: 900;
}

.mini-gate.verified {
  background: var(--teal-pale);
  color: var(--teal);
}

.mini-gate.not-verified {
  background: var(--wine-pale);
  color: #743040;
}

.mini-gate.not-applicable {
  background: var(--blue-pale);
  color: var(--blue);
}

.dossier-button,
.row-detail-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-decoration: underline;
  text-decoration-color: rgb(23 63 69 / 30%);
  text-underline-offset: 0.2em;
}

.dossier-button {
  align-self: flex-start;
  margin-top: 1.2rem;
  padding: 0.45rem 0;
  text-transform: uppercase;
}

.dossier-button:hover,
.row-detail-button:hover {
  color: var(--wine);
}

.reading-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: -1.5rem 0 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #d4c6ab;
  border-radius: 0.3rem;
  background: #fff8e9;
}

.reading-note .mini-label {
  margin-bottom: 0.3rem;
}

.reading-note p:last-child {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.reading-note > a {
  flex: none;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
}

.filters {
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(125px, 0.8fr)) minmax(110px, 0.65fr) auto auto;
}

.check-filter {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
}

.check-filter input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
}

.table-scroll-hint {
  display: none;
  margin: 0;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fff7df;
  color: #5d4725;
  font-size: 0.7rem;
  font-weight: 700;
}

.inventory-panel table,
.routes-panel table {
  min-width: 1020px;
}

.table-status.database,
.table-status.unknown {
  background: #ece8de;
  color: var(--ink-soft);
}

.table-status.model {
  background: var(--blue-pale);
  color: var(--blue);
}

.table-status.branch {
  background: var(--ochre-pale);
  color: #754812;
}

.table-status.verified {
  background: var(--teal-pale);
  color: var(--teal);
}

.rank-value small {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.witness-id,
.evidence-id,
.matrix-pair,
.route-position {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  white-space: nowrap;
}

.evidence-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.evidence-link {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.label-link::after {
  content: "";
}

.verification-fields {
  display: grid;
  border-top: 1px solid rgb(255 255 255 / 18%);
  border-left: 1px solid rgb(255 255 255 / 18%);
  grid-template-columns: repeat(3, 1fr);
}

.verification-fields article {
  min-height: 180px;
  padding: 1.4rem;
  border-right: 1px solid rgb(255 255 255 / 18%);
  border-bottom: 1px solid rgb(255 255 255 / 18%);
}

.verification-fields article > span {
  color: #efca8d;
  font-family: var(--serif);
  font-size: 0.78rem;
  font-style: italic;
}

.verification-fields h3 {
  margin-block: 1.4rem 0.5rem;
  font-size: 1.05rem;
}

.verification-fields p {
  margin: 0;
  color: rgb(255 255 255 / 64%);
  font-size: 0.77rem;
}

.legend-dot.model {
  background: #8cb5cd;
}

.legend-dot.branch {
  background: #d8a75a;
}

.legend-paper {
  width: 0.48rem;
  height: 0.48rem;
  flex: none;
}

.verification-link {
  margin: 1.6rem 0 0;
  font-size: 0.78rem;
}

.verification-link a {
  color: #f2d39f;
  font-weight: 750;
}

.method-grid-light {
  border-color: var(--line);
}

.method-grid-light article {
  border-color: var(--line);
  background: var(--white);
}

.method-grid-light p {
  color: var(--ink-soft);
}

.method-grid-light .method-number {
  color: var(--ochre);
}

.resource-group + .resource-group {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.resource-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.resource-heading .mini-label {
  margin-bottom: 0.3rem;
}

.resource-heading h3 {
  margin: 0;
  font-size: 1.55rem;
}

.resource-heading > a,
.resource-heading > span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.resource-heading > a {
  color: var(--teal);
  font-weight: 800;
}

.documentation-grid .download-card {
  border-top: 3px solid var(--teal-light);
}

.validation-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: 0.3rem;
  background: var(--teal);
  color: white;
}

.validation-band .mini-label {
  margin-bottom: 0.25rem;
  color: #edc789;
}

.validation-band h3 {
  margin-bottom: 0.35rem;
  font-size: 1.35rem;
}

.validation-band p:last-child {
  max-width: 680px;
  margin: 0;
  color: rgb(255 255 255 / 68%);
  font-size: 0.78rem;
}

.button-ink {
  flex: none;
  border-color: rgb(255 255 255 / 40%);
  background: white;
  color: var(--teal);
}

.detail-dialog {
  width: min(940px, 100%);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -25px 0 70px rgb(8 30 34 / 26%);
}

.detail-dialog[open] {
  animation: drawer-in 180ms ease-out;
}

.detail-dialog::backdrop {
  background: rgb(8 30 34 / 56%);
  backdrop-filter: blur(2px);
}

body:has(.detail-dialog[open]) {
  overflow: hidden;
}

.dialog-frame {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1.2rem, 4vw, 2.4rem);
  background: var(--white);
}

.dialog-header {
  border-bottom: 1px solid var(--line);
}

.dialog-header .eyebrow {
  margin-bottom: 0.25rem;
}

.dialog-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.dialog-close {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-close:hover {
  background: var(--wine-pale);
  color: var(--wine);
}

.dialog-content {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-footer {
  border-top: 1px solid var(--line);
}

.dialog-footer > a {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
}

.dialog-footer .copy-button {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.dialog-footer .copy-button:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.detail-lead,
.detail-section {
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.detail-lead {
  background: var(--teal);
  color: white;
}

.detail-lead > p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: rgb(255 255 255 / 72%);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.detail-warning {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid #efca8d;
  background: rgb(255 255 255 / 9%);
}

.detail-warning ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
}

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

.detail-section-heading {
  margin-bottom: 1.2rem;
}

.detail-section-heading .mini-label {
  margin-bottom: 0.35rem;
}

.detail-section-heading h3 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.detail-section-heading > p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.detail-facts {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-facts div {
  min-width: 0;
  padding: 0.8rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.detail-facts dt {
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.detail-facts dd {
  min-width: 0;
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.detail-facts code,
.hash {
  font-size: 0.67rem;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.optional-live-links,
.equation-line,
.path-id-block {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--line-dark);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.equation-line strong,
.path-id-block strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

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

.gate-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 0.25rem;
  background: var(--white);
}

.gate-card.gate-verified {
  border-left-color: var(--teal-light);
}

.gate-card.gate-not_verified {
  border-left-color: var(--wine);
}

.gate-card.gate-not_checked {
  border-left-color: #96a1a1;
}

.gate-card.gate-not_applicable {
  border-left-color: var(--blue);
}

.gate-card-top,
.stage5-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.gate-number {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 0.72rem;
  font-style: italic;
}

.gate-card h4,
.stage5-card h4 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.gate-card p,
.stage5-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.gate-card .gate-note {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-style: italic;
}

.stage5-value {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.stage5-value > p {
  margin: 0 0 0.45rem;
}

.compact-value-list {
  margin: 0;
  padding-left: 1rem;
}

.compact-value-list li + li {
  margin-top: 0.3rem;
}

.structured-value {
  display: grid;
  margin: 0.6rem 0 0;
  gap: 0.3rem;
}

.structured-value div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.42fr) minmax(0, 1fr);
  gap: 0.5rem;
}

.structured-value dt {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.structured-value dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.project-gates {
  display: grid;
  gap: 0.45rem;
}

.project-gate {
  display: grid;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--white);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.project-gate.gate-verified {
  border-left-color: var(--teal-light);
}

.project-gate.gate-not_verified {
  border-left-color: var(--wine);
}

.project-gate.gate-not_checked {
  border-left-color: #96a1a1;
}

.project-gate.gate-not_applicable {
  border-left-color: var(--blue);
}

.project-gate > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.project-gate strong {
  color: var(--wine);
  font-family: var(--serif);
}

.project-gate span:not(.enum-badge):not(.evidence-list) {
  font-size: 0.76rem;
}

.project-gate .gate-evidence {
  grid-column: 1 / -1;
}

.gate-card small {
  display: block;
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.6rem;
}

.gate-evidence {
  margin-top: 0.6rem;
}

.enum-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  background: #ece9e1;
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
}

.enum-badge i {
  font-style: normal;
}

.enum-badge.verified {
  background: var(--teal-pale);
  color: var(--teal);
}

.enum-badge.not-verified {
  background: var(--wine-pale);
  color: var(--wine);
}

.enum-badge.not-applicable {
  background: var(--blue-pale);
  color: var(--blue);
}

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

.stage5-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--white);
}

.stage5-heading h4 {
  margin-top: 0;
}

.provenance-block .detail-facts {
  grid-template-columns: 1fr;
}

.source-files {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.source-files summary {
  color: var(--teal);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.source-files ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.source-files li {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.route-chain {
  display: grid;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.route-chain small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.evidence-kind {
  color: rgb(255 255 255 / 70%);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-targets {
  border-block: 1px solid #ced9d5;
  background:
    radial-gradient(circle at 92% 8%, rgb(47 112 115 / 10%), transparent 24rem),
    #e8efeb;
}

.target-scope-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin: -1rem 0 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid #b9cbc6;
  border-left: 4px solid var(--teal-light);
  border-radius: 0.25rem;
  background: rgb(255 253 248 / 78%);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.target-scope-note strong {
  color: var(--ink);
}

.target-scope-note small {
  display: block;
  margin-top: 0.35rem;
  color: var(--wine);
  font-size: 0.68rem;
}

.target-scope-note small[hidden] {
  display: none;
}

.target-scope-note a {
  flex: none;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 800;
}

.target-summary {
  display: grid;
  margin-bottom: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.target-summary article {
  min-width: 0;
  padding: 1rem 1.1rem;
  border: 1px solid #c4d1cd;
  border-radius: 0.25rem;
  background: rgb(255 253 248 / 80%);
}

.target-summary strong,
.target-summary span {
  display: block;
}

.target-summary strong {
  color: var(--teal);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1;
}

.target-summary span {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.35;
  text-transform: uppercase;
}

.target-summary small {
  display: block;
  margin-top: 0.28rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.target-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.2rem;
  margin: -0.15rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #c4d1cd;
  border-radius: 0.25rem;
  background: rgb(255 253 248 / 66%);
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.target-category-summary[hidden] {
  display: none;
}

.target-category-summary strong {
  width: 100%;
  color: var(--ink);
}

.target-category-summary .resolution-batch {
  width: 100%;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #d9dfda;
}

.target-category-summary b {
  color: var(--teal);
}

.targets-panel {
  overflow: hidden;
  border: 1px solid #bdcbc7;
  border-radius: 0.35rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.target-filters {
  grid-template-columns: minmax(250px, 1.7fr) repeat(4, minmax(135px, 0.8fr)) auto;
}

.target-table-scroll table {
  min-width: 1250px;
}

.degree-list {
  display: flex;
  gap: 0.3rem;
}

.boundary-state {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: #ece9e1;
  color: var(--ink-soft);
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.boundary-state::before {
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.boundary-state.resolved {
  background: var(--teal-pale);
  color: var(--teal);
}

.boundary-state.origin-known {
  background: var(--blue-pale);
  color: var(--blue);
}

.boundary-state.pointless {
  background: var(--wine-pale);
  color: var(--wine);
}

.boundary-state.unresolved {
  background: #e6e8e5;
  color: #596766;
}

.targets-panel td > small,
.table-point {
  display: block;
  margin-top: 0.24rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.compact-equation {
  display: inline-block;
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.boundary-verification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.boundary-check {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.boundary-check.gate-verified {
  border-left-color: var(--teal-light);
}

.boundary-check.gate-not_verified {
  border-left-color: var(--wine);
}

.boundary-check.gate-not_checked {
  border-left-color: #96a1a1;
}

.boundary-check.gate-not_applicable {
  border-left-color: var(--blue);
}

.target-ledger-provenance {
  margin-top: 0.7rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.target-ledger-provenance summary {
  color: var(--teal);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
}

.target-ledger-provenance .provenance-block {
  margin-top: 0.8rem;
}

@keyframes drawer-in {
  from {
    transform: translateX(2rem);
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters .field-search {
    grid-column: 1 / -1;
  }

  .target-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .coverage-layout {
    grid-template-columns: 1fr 1fr;
  }

  .coverage-card-primary {
    grid-column: 1 / -1;
  }

  .verification-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .target-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 0.8rem;
    gap: 0.65rem;
  }

  .site-header nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    gap: 1rem;
    scrollbar-width: thin;
  }

  .site-header nav a,
  .site-header nav a:not(:first-child) {
    display: inline-block;
    flex: none;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .scope-distinction {
    margin-top: -0.7rem;
  }

  .attrition-grid,
  .coverage-layout,
  .verification-fields,
  .gate-grid,
  .stage5-grid {
    grid-template-columns: 1fr;
  }

  .attrition-arrow {
    min-height: 70px;
    transform: rotate(90deg);
  }

  .attrition-arrow small {
    display: none;
  }

  .coverage-card-primary {
    grid-column: auto;
  }

  .coverage-links,
  .reading-note,
  .resource-heading,
  .validation-band,
  .target-scope-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .filters .field-search {
    grid-column: auto;
  }

  .target-filters {
    grid-template-columns: 1fr;
  }

  .table-scroll-hint {
    display: block;
  }

  .table-scroll {
    background:
      linear-gradient(to right, var(--white) 30%, transparent),
      linear-gradient(to right, transparent, var(--white) 70%) 100% 0,
      radial-gradient(farthest-side at 0 50%, rgb(23 63 69 / 18%), transparent),
      radial-gradient(farthest-side at 100% 50%, rgb(23 63 69 / 18%), transparent) 100% 0;
    background-attachment: local, local, scroll, scroll;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  }

  .verification-fields article {
    min-height: auto;
  }

  .detail-dialog {
    width: 100%;
  }

  .detail-facts {
    grid-template-columns: 1fr;
  }

  .boundary-verification-grid {
    grid-template-columns: 1fr;
  }

  .route-chain {
    grid-template-columns: 1fr;
  }

  .route-chain > span {
    transform: rotate(90deg);
  }
}

@media (max-width: 480px) {
  .target-summary {
    grid-template-columns: 1fr;
  }

  .coverage-facts div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .dialog-header,
  .dialog-footer,
  .detail-lead,
  .detail-section {
    padding-inline: 1rem;
  }

  .dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dialog-footer .copy-button {
    width: 100%;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .filters,
  .pagination,
  .copy-button,
  .row-detail-button,
  .dossier-button,
  .detail-dialog {
    display: none !important;
  }
}
