/*
  Touchstone Assay — Dated SIU. A benchmark price assessment, not a product landing page.
  Register: commodity price sheet / market-data bulletin. Precise, quiet, data-forward.
  No gradients. No coin imagery. No marketing language. No red-for-down: falling prices
  are the expected, healthy direction for a compute-cost index and are annotated as such,
  not styled as a loss.
*/

:root {
  --bg: #fbfaf7;
  --surface: #f3f1ea;
  --ink: #16161a;
  --ink-muted: #5c5c61;
  --rule: #d9d6cc;
  --rule-strong: #16161a;
  --accent: #24466f;
  --mono:
    ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", "JetBrains Mono", Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --content-width: 46rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 4rem;
}

/* ---- header ---- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 2rem;
}

.site-header .wordmark {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.site-header .tagline {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

nav.site-nav {
  font-size: 0.9rem;
}

nav.site-nav a {
  margin-left: 1rem;
}

nav.site-nav a:first-child {
  margin-left: 0;
}

/* ---- headline ---- */

.headline {
  margin-bottom: 2rem;
}

.headline .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.headline .figure {
  font-family: var(--mono);
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.headline .meta {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
}

.badge.status-final {
  background: var(--ink);
  color: var(--bg);
}

.badge.status-provisional {
  background: transparent;
}

.badge.status-superseded {
  background: transparent;
  border-style: dashed;
  color: var(--ink-muted);
  text-decoration: none;
}

.badge.status-superseded:hover {
  color: var(--ink);
}

tr.superseded td {
  color: var(--ink-muted);
}

.change-note {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border-left: 2px solid var(--ink);
}

.change-note .delta {
  font-family: var(--mono);
}

/* ---- sections ---- */

section.block {
  margin: 2.25rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

section.block > h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 0.9rem;
  font-weight: 600;
}

section.block > p.note {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0;
}

/* ---- tables ---- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-family: var(--mono);
  font-size: 0.88rem;
}

thead th {
  text-align: right;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
  background: var(--surface);
}

thead th:first-child,
tbody td:first-child {
  text-align: left;
}

tbody td {
  text-align: right;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

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

tr.excluded td {
  color: var(--ink-muted);
}

tr.excluded .reason {
  font-family: var(--sans);
  font-size: 0.78rem;
}

/* ---- key/value blocks (signature, anchor, cost of production) ---- */

dl.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.9rem;
  margin: 0;
}

dl.kv dt {
  color: var(--ink-muted);
}

dl.kv dd {
  margin: 0;
  font-family: var(--mono);
  word-break: break-all;
}

/* ---- links list (raw runs, previous prints) ---- */

ul.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
}

ul.link-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

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

ul.link-list .siu {
  color: var(--ink-muted);
}

/* ---- footer ---- */

footer.site-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

footer.site-footer p {
  margin: 0.4rem 0;
}

/* ---- empty state ---- */

.empty-state {
  padding: 3rem 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

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

/* ---- series / models: inline SVG charts (no client JS, no chart library) ---- */

.series-chart {
  width: 100%;
  height: auto;
  display: block;
}

.series-axis {
  stroke: var(--rule);
  stroke-width: 1;
}

.series-line,
.model-line {
  stroke: var(--ink);
  stroke-width: 1.5;
}

.series-point {
  stroke: var(--ink);
  stroke-width: 1.5;
  fill: var(--bg);
}

.series-point-final {
  fill: var(--ink);
}

/* A superseded print stays on the chart — dropping it would make the chart disagree with the
   Prints list — but rendered distinctly: hollow and muted, never the same weight as a real,
   standing point. */
.series-point-superseded {
  stroke: var(--ink-muted);
  stroke-dasharray: 2 1;
  fill: var(--bg);
}

.series-annotation {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-muted);
  font-style: italic;
}

.series-axis-label {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-muted);
}

.legend-marker {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 0.3rem 0 0.9rem;
}

.legend-marker:first-child {
  margin-left: 0;
}

.legend-marker.series-point-final {
  background: var(--ink);
}

.legend-marker.series-point-superseded {
  border-color: var(--ink-muted);
  border-style: dashed;
}

.legend-marker.model-line-legend {
  border-radius: 0;
  width: 1.1rem;
  height: 0;
  border: none;
  border-top: 2px solid var(--ink);
  vertical-align: middle;
}

/* Model identity, not a value judgment — dash pattern distinguishes lines, not color, to stay
   consistent with the site's monochrome register. */
.model-line-1,
.model-line-legend.model-line-1 {
  stroke-dasharray: 6 3;
  border-top-style: dashed;
}
.model-line-2,
.model-line-legend.model-line-2 {
  stroke-dasharray: 2 2;
  border-top-style: dotted;
}
.model-line-3,
.model-line-legend.model-line-3 {
  stroke-dasharray: 8 2 2 2;
}
.model-line-4,
.model-line-legend.model-line-4 {
  stroke-dasharray: 4 4 1 4;
}
.model-line-5,
.model-line-legend.model-line-5 {
  stroke-dasharray: 1 3;
}

/* ---- verify-yourself block ---- */

ol.verify-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.6;
}

ol.verify-steps li {
  margin-bottom: 0.4rem;
}

ol.verify-steps code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface);
  padding: 0.05rem 0.3rem;
}

/* ---- homepage: hero ---- */

.hero {
  padding: 1.5rem 0 2rem;
}

.hero .logo {
  display: block;
  height: 2.25rem;
  width: auto;
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.35rem);
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.hero .subhead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
}

.hero .quote-strip {
  border: 1px solid var(--rule-strong);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.hero .quote-strip .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.hero .quote-strip .figure {
  font-family: var(--mono);
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
}

.hero .quote-strip .meta {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.hero .footnote {
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ---- homepage: section heading (serif, larger than the print-page label style) ---- */

.section-heading {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

/* ---- homepage: three-column layout (The Problem) ---- */

.col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.col-grid .col h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.col-grid .col p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ---- homepage: cards (How It Works) ---- */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  border: 1px solid var(--rule);
  padding: 1.1rem 1.25rem;
}

.card h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.5rem;
}

.card p {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ---- homepage: annotated code block (402 response example) ---- */

.code-block {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.code-block pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre;
}

.code-block .annotation {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ---- homepage: diagram placeholder ---- */

.diagram {
  border: 1px dashed var(--rule);
  padding: 1.25rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin: 1rem 0;
}

.diagram img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.diagram .caption {
  margin-top: 0.6rem;
  font-style: italic;
}

/* ---- homepage: roadmap ---- */

ol.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: roadmap;
}

ol.roadmap li {
  counter-increment: roadmap;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
}

ol.roadmap li:last-child {
  border-bottom: none;
}

ol.roadmap li::before {
  content: counter(roadmap);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-muted);
  flex: none;
  width: 1.25rem;
}

ol.roadmap .roadmap-body h3 {
  font-family: var(--mono);
  font-size: 0.88rem;
  margin: 0 0 0.3rem;
}

ol.roadmap .roadmap-body p {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
}

/* ---- homepage: placeholder notice (dev-only labeling for unreplaced assets) ---- */

.placeholder-notice {
  font-size: 0.78rem;
  color: var(--ink-muted);
  border: 1px dashed var(--rule);
  padding: 0.3rem 0.6rem;
  display: inline-block;
  margin-top: 0.5rem;
}

/* ---- mobile-first: base styles above are the small-screen layout;
       widen spacing slightly on larger viewports. ---- */
@media (min-width: 40rem) {
  .container {
    padding: 2rem 2rem 5rem;
  }

  .site-header {
    padding-top: 2.5rem;
  }

  .col-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
