:root {
  --ink: #1a1a1a;
  --paper: #fdfcfa;
  --rule: #d8d4cc;
  --muted: #6b6558;
  --accent: #7a3b3b;
  --accent-soft: #c98d8d;
  --sage: #6e7f66;
  --sage-soft: #b7c4ae;
  --navy: #3b4a5a;
  --highlight: #f4ece2;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.55;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

header.masthead {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1.25rem;
  margin-bottom: 2.5rem;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

h1.title {
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1rem;
}

.byline {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.byline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.byline-note { max-width: 46em; }

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

.byline .dot { color: var(--rule); }

section { margin: 2.75rem 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

h2 {
  font-size: 1.3rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.4rem;
  margin: 0 0 1.1rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.6rem;
}

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.08rem;
}

.callout {
  background: var(--highlight);
  border-left: 3px solid var(--accent);
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  margin: 1.2rem 0;
}

.callout strong { color: var(--accent); }

ol.recommendations li {
  margin-bottom: 0.8rem;
}

ol.recommendations li strong {
  display: block;
  margin-bottom: 0.15rem;
}

ul.findings {
  counter-reset: finding;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  border: 1px solid var(--rule);
}

ul.findings li {
  counter-increment: finding;
  background: var(--paper);
  margin: 0;
  padding: 1rem 1.4rem 1rem 3.4rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

ul.findings li:last-child {
  border-bottom: none;
}

ul.findings li::before {
  content: counter(finding, decimal-leading-zero);
  position: absolute;
  left: 1.4rem;
  top: 1.05rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

ul.findings li strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.02rem;
}


ul.references {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  padding-left: 1.2rem;
}

ul.references li {
  margin-bottom: 0.5rem;
}

table.positioning {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.78rem;
  margin: 1.2rem 0;
}

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

.table-scroll table.positioning {
  min-width: 520px;
}

.scroll-table {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  margin: 1.2rem 0;
}

.scroll-table table.positioning {
  margin: 0;
}

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

.chart-scroll svg.chart {
  width: 720px;
  max-width: none;
}

@media (min-width: 760px) {
  .chart-scroll svg.chart {
    width: 100%;
  }
}

.scroll-table caption {
  position: sticky;
  top: 0;
  background: var(--paper);
  padding: 0.6rem 0.6rem 0.4rem;
  z-index: 1;
}

.scroll-table thead th {
  position: sticky;
  top: 2.6rem;
  z-index: 1;
}

#accession-language-table td:nth-child(2),
#accession-language-table th:nth-child(2),
#accession-language-table td:nth-child(3),
#accession-language-table th:nth-child(3) {
  white-space: nowrap;
}

table.positioning caption {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-align: left;
  color: var(--muted);
  margin-bottom: 0.4rem;
  caption-side: top;
}

table.positioning th, table.positioning td {
  border: 1px solid var(--rule);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

table.positioning th {
  background: var(--highlight);
  font-weight: 600;
}

table.positioning td.has-tip {
  cursor: help;
}

table.positioning tr.highlight td.has-tip {
  border-bottom: 1px dotted var(--accent);
}

table.positioning tr.highlight td {
  background: #f6ece9;
  font-weight: 600;
}

.chart-block {
  margin: 1.5rem 0 2rem;
}

.specificity-index {
  font-family: var(--sans);
  border: 1px solid var(--rule);
}

.specificity-tier {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.specificity-tier:last-child {
  border-bottom: none;
}

.specificity-tier-label {
  flex: 0 0 auto;
  width: 14.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.specificity-tier-label strong {
  display: inline-block;
  width: 1.4rem;
  color: var(--ink);
}

.specificity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  cursor: help;
  white-space: nowrap;
}

.chip-sage { background: var(--sage); color: var(--paper); }
.chip-sage-soft { background: var(--sage-soft); color: var(--ink); }
.chip-muted { background: var(--rule); color: var(--ink); }
.chip-accent { background: var(--accent-soft); color: var(--ink); }
.chip-flag {
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
}

.chart-caption {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.chart-caption .src { cursor: help; border-bottom: 1px dotted var(--muted); }

svg.chart {
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--sans);
}

.bar-label {
  font-size: 11px;
  fill: var(--ink);
}

.bar-value {
  font-size: 11px;
  font-weight: 600;
  fill: var(--ink);
}

.bar-sub {
  font-size: 9.5px;
  fill: var(--muted);
}

.axis-label {
  font-size: 9.5px;
  fill: var(--muted);
}

.bar-rect {
  cursor: help;
  transition: opacity 0.15s;
}
.bar-rect:hover { opacity: 0.75; }

.ph-tier {
  stroke: var(--accent);
  stroke-width: 2;
}

.tooltip {
  position: fixed;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.72rem;
  padding: 0.5rem 0.65rem;
  border-radius: 3px;
  max-width: 260px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 50;
}
.tooltip.visible { opacity: 1; }

.line-path { fill: none; stroke-width: 2; }
.line-semis { stroke: var(--accent); }
.line-elec { stroke: var(--sage); }
.dot { cursor: help; }

.legend {
  font-family: var(--sans);
  font-size: 0.75rem;
  display: flex;
  gap: 1.2rem;
  margin-top: 0.4rem;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend i { width: 10px; height: 10px; display: inline-block; border-radius: 2px; }

footer.colophon {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
}

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

.soft-flag {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 480px) {
  .page { padding: 2.5rem 1rem 4rem; }
  h1.title { font-size: 1.65rem; }
}

@media print {
  .page { max-width: 100%; padding: 0.5in; }
  .tooltip { display: none !important; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e4da;
    --paper: #171613;
    --rule: #3a382f;
    --muted: #9a9484;
    --accent: #d99b9b;
    --accent-soft: #7a3b3b;
    --sage: #a9bb9f;
    --sage-soft: #4d5c47;
    --highlight: #24221c;
    --navy: #8fa4ba;
  }
  table.positioning tr.highlight td { background: #2a201e; }
}
