/* {COMPANY} — Measured Truth site. Plain CSS, no build step. */
:root {
  --bg: #0d100f; --panel: #131715; --panel2: #101412;
  --border: #232825; --border-soft: #1a1f1c;
  --text: #e8ece9; --muted: #a2aaa4;
  --accent: #8ee6a1; --accent-ink: #0d100f;
  --amber: #e6b45c; --red: #e88268;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}
[data-theme="light"] {
  --bg: #f2f4f2; --panel: #ffffff; --panel2: #eaeeea;
  --border: #c9d1ca; --border-soft: #dde3de;
  --text: #151a16; --muted: #47514a;
  --accent: #14672f; --accent-ink: #ffffff;
  --amber: #8a5a10; --red: #a83a24;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; margin-top: 0; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; z-index: 100; font-weight: 600; }
.skip:focus { left: 12px; top: 12px; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
header.site .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-family: var(--mono); font-size: 15px; letter-spacing: 0.04em; color: var(--accent); text-decoration: none; font-weight: 500; }
nav.main { display: flex; gap: 22px; margin-left: auto; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--text); text-decoration: none; font-size: 15px; padding: 6px 2px; }
nav.main a:hover { color: var(--accent); }
nav.main a[aria-current="page"] { color: var(--accent); border-bottom: 2px solid var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: 12px 22px; font-weight: 700; font-size: 15px; text-decoration: none;
  border-radius: 2px; border: 1px solid var(--accent); white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
#theme-toggle {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  font-family: var(--mono); font-size: 12px; padding: 8px 12px; cursor: pointer; border-radius: 2px;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* sections */
main { display: block; }
section.band { padding: 72px 0; border-bottom: 1px solid var(--border-soft); }
section.band.alt { background: var(--panel2); }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 18px; font-weight: 500;
}
.lede { font-size: 19px; color: var(--muted); max-width: 46em; }
.measure { max-width: 46em; }

/* hero */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--border-soft); }
.hero h1 { max-width: 21em; }
.hero .lede { margin: 22px 0 30px; }
.cta-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cta-note { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* cards */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 26px; }
.card h3 { margin-top: 0; }
.card .k { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; display: block; margin-bottom: 10px; }

/* tier map table */
.tiermap { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.tiermap-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.tiermap-head .file { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.sample-flag { font-family: var(--mono); font-size: 11px; color: var(--amber); letter-spacing: 0.08em; }
table.tiers { width: 100%; border-collapse: collapse; font-size: 15px; }
table.tiers th {
  text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
table.tiers td { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table.tiers tr:last-child td { border-bottom: none; }
td.cam { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.tier-chip { font-family: var(--mono); font-size: 12px; font-weight: 500; white-space: nowrap; }
.t1 { color: var(--accent); } .t2 { color: var(--amber); } .t3 { color: var(--red); }
td.verdict { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* loop diagram */
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: stage; }
.loop .stage { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 20px; position: relative; }
.loop .stage .num { font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 8px; }
.loop .stage h3 { font-size: 17px; margin-bottom: 6px; }
.loop .stage p { font-size: 14px; color: var(--muted); margin: 0; }

/* gates */
.gate { border-left: 2px solid var(--accent); padding: 4px 0 4px 24px; margin-bottom: 32px; }
.gate h3 { margin-bottom: 8px; }
.gate p { color: var(--muted); max-width: 52em; }
.gate .enforced { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; display: block; margin-bottom: 8px; }

/* case studies */
.case { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 28px; margin-bottom: 20px; }
.case h3 { margin-top: 0; }
.case dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin: 18px 0 6px; }
.case dd { margin: 0; color: var(--muted); font-size: 15.5px; }
.disclaimer {
  background: var(--panel); border: 1px solid var(--amber); border-radius: 4px;
  padding: 20px 24px; margin: 0 0 32px; font-size: 15.5px;
}
.disclaimer strong { color: var(--amber); }

/* never list */
.never { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.never li { background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 20px 24px; }
.never li strong { display: block; margin-bottom: 4px; }
.never li .no { font-family: var(--mono); color: var(--red); margin-right: 8px; }

/* checklists */
ul.checks { padding-left: 0; list-style: none; }
ul.checks li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--border-soft); }
ul.checks li::before { content: "▸"; position: absolute; left: 4px; color: var(--accent); font-family: var(--mono); }

/* ordered deliverables */
ol.deliver { counter-reset: d; list-style: none; padding: 0; display: grid; gap: 16px; }
ol.deliver li { counter-increment: d; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; padding: 22px 22px 22px 64px; position: relative; }
ol.deliver li::before {
  content: "0" counter(d); position: absolute; left: 20px; top: 22px;
  font-family: var(--mono); font-size: 13px; color: var(--accent);
}
ol.deliver li strong { display: block; margin-bottom: 4px; }
ol.deliver li p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* footer */
footer.site { padding: 48px 0 64px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; font-size: 14px; }
footer.site a:hover { color: var(--accent); }
.foot-note { font-family: var(--mono); font-size: 12px; color: var(--muted); max-width: 40em; }

@media (max-width: 720px) {
  section.band { padding: 52px 0; }
  .hero { padding: 60px 0 52px; }
  table.tiers .hide-sm { display: none; }
}
