/* theme_07 — High-Contrast Blueprint Spec
   bg #0f172a · surface #1e293b · ink #f8fafc · accent #f59e0b · muted #94a3b8 */

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #273549;
  --ink: #f8fafc;
  --accent: #f59e0b;
  --accent-ink: #0f172a;
  --muted: #94a3b8;
  --line: #334155;
  --ok: #34d399;
  --warn: #fbbf24;
  --fail: #f87171;
  --info: #60a5fa;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.5rem 1rem; z-index: 100; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-mark { width: 28px; height: 28px; }
.site-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  padding: 0.25rem 0.1rem; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }

.disclosure-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.85rem;
  padding: 0.55rem 1.25rem;
  text-align: center;
}
.disclosure-bar a { color: var(--accent); }

main { max-width: 1240px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.hero { padding: 2.5rem 0 2rem; max-width: 48rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 0.5rem;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 1rem; }
h1 .accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.25rem; }
.hero-facts { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.hero-facts li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem 0.9rem; font-size: 0.88rem; color: var(--muted);
}
.hero-facts strong { color: var(--ink); display: block; font-size: 0.95rem; }

.workbench-grid {
  display: grid;
  grid-template-columns: 65fr 35fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 3rem;
}
.workbench-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
}
.panel.sticky { position: sticky; top: 4.5rem; }
.panel-head h2 { margin: 0 0 0.25rem; font-size: 1.15rem; }
.panel-sub { margin: 0 0 1rem; color: var(--muted); font-size: 0.85rem; }

.preset-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.preset-btn {
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.7rem 0.8rem; cursor: pointer; text-align: left;
  font-family: var(--sans); font-size: 0.85rem;
}
.preset-btn .preset-id { font-family: var(--mono); color: var(--accent); font-size: 0.72rem; display: block; }
.preset-btn[aria-checked="true"], .preset-btn.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.preset-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preset-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem 1rem; margin: 0; font-size: 0.85rem; }
.preset-meta dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.preset-meta dd { margin: 0; font-family: var(--mono); }

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.8rem; margin: 0.8rem 0 1rem; }
.control { display: flex; flex-direction: column; gap: 0.3rem; }
.control label { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.control input, .control select {
  width: 100%; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--mono); font-size: 0.9rem; padding: 0.55rem 0.7rem;
}
.control input[type="range"] { padding: 0; }
.control .control-value { color: var(--accent); font-family: var(--mono); font-size: 0.78rem; }

.chart-wrap { display: flex; flex-direction: column; gap: 0.75rem; }
#cost-privacy-chart { width: 100%; height: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.chart-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); font-family: var(--mono); }
.chart-legend span::before { content: "■"; margin-right: 0.35rem; }
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin-top: 0.5rem;
}
.metric {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.8rem;
}
.metric .m-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.metric .m-value { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.metric .m-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 0.8rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th, .data-table td {
  padding: 0.55rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th { background: var(--surface-2); font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td { font-family: var(--mono); }
.data-table td:first-child { font-family: var(--sans); }

.spec-list { display: grid; grid-template-columns: 1fr; gap: 0.4rem; margin: 0 0 1rem; font-size: 0.85rem; }
.spec-list dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.spec-list dd { margin: -0.35rem 0 0.35rem; font-family: var(--mono); word-break: break-all; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  font-family: var(--sans); font-size: 0.85rem; cursor: pointer;
  border-radius: 6px; padding: 0.5rem 0.9rem;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
}
.btn:hover, .btn:focus-visible { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn-ghost { background: transparent; }
.receipt-line { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin: 0.75rem 0 0; word-break: break-all; }

.audit-score {
  display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.8rem; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem; margin-bottom: 0.8rem;
}
.audit-grade { font-family: var(--mono); font-size: 2rem; font-weight: 800; color: var(--accent); }
.audit-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); }
.audit-counts { grid-column: 1 / -1; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.audit-list { display: flex; flex-direction: column; gap: 0.55rem; }
.audit-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.65rem 0.75rem;
}
.audit-id { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
.audit-claim { font-size: 0.88rem; font-weight: 600; }
.audit-evidence { font-size: 0.75rem; color: var(--muted); }
.audit-status select {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.4rem 0.55rem; font-family: var(--mono); font-size: 0.78rem;
}
.audit-status select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.section { margin-bottom: 3rem; }
.section h2 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.sec-tag {
  font-family: var(--mono); font-size: 0.7rem; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 0.15rem 0.6rem;
  vertical-align: middle; font-weight: 400;
}
.section > p { color: var(--muted); max-width: 62rem; }
.subhead { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }
.sensitivity-note { color: var(--muted); font-size: 0.82rem; margin: 0.75rem 0 0; }
ul.notes { color: var(--muted); max-width: 62rem; }
ul.notes code { font-family: var(--mono); color: var(--accent); font-size: 0.85em; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem; }
.footer-brand { font-weight: 700; margin: 0 0 0.5rem; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { color: var(--muted); font-size: 0.78rem; margin: 0; max-width: 62rem; }

@media (max-width: 900px) {
  .workbench-grid { grid-template-columns: 1fr; }
  .panel.sticky { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
