
:root {
  --ink: #0e0f0e;
  --ink-soft: #454a46;
  --muted: #7c837c;
  --paper: #ffffff;
  --ground: #f5f6f2;
  --rule: #e4e6df;
  --rule-strong: #c3c7bf;
  --black: #0b0c0b;
  --lime: #c8f31d;
  --lime-deep: #a4c900;
  --lime-wash: #f4fbcb;
  --danger: #cf1f2b;
  --danger-wash: #fdedec;
  --safe: #0f7a4d;
  --safe-wash: #e4f4ec;
  --warn: #a9690a;
  --warn-wash: #fbf0d6;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 200ms;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  background-image: linear-gradient(rgba(11, 12, 11, 0.028) 1px, transparent 1px);
  background-size: 100% 30px;
  color: var(--ink);
  font: 400 clamp(16px, 0.5vw + 14px, 17px) / 1.62 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--sans); line-height: 1.08; margin: 0; font-weight: 800; }
h1 { font-size: clamp(2.15rem, 5vw, 3.5rem); letter-spacing: -0.035em; text-transform: uppercase; }
h2 { font-size: clamp(1.35rem, 2.1vw, 1.72rem); letter-spacing: -0.025em; }
h3 { font-size: 1.06rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 2px; }
ul, ol { padding-left: 1.15em; margin: 0 0 1em; }
li { margin-bottom: 0.45em; }
strong { font-weight: 700; }
em { font-style: italic; }

.kicker, .crumb-line, .mini-label, .msg-tag, .chip, .sev, .fig-cap, .ladder-rung small,
.meter-row .val, .checklist-step .num, .brand .mark, .posture .pt-label {
  font-family: var(--mono);
}

.skip { position: absolute; left: -9999px; top: 0; padding: 12px 18px; background: var(--lime); color: var(--black); z-index: 30; text-decoration: none; }
.skip:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- masthead */
.top { position: sticky; top: 0; z-index: 20; background: var(--black); border-bottom: 5px solid var(--lime); }
.bar { max-width: var(--max); margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font-weight: 800; letter-spacing: -0.02em; margin-right: auto; font-size: 1.06rem;
  text-transform: uppercase;
}
.brand .mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 4px;
  background: var(--lime); color: var(--black); font: 800 0.7rem/1 var(--mono); letter-spacing: 0.04em;
}
.menu { display: flex; gap: 2px; flex-wrap: wrap; }
.menu a {
  color: #b9beb6; text-decoration: none; font-size: 0.82rem; padding: 7px 11px; border-radius: 3px;
  border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: 0.03em;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.menu a:hover { color: var(--black); background: var(--lime); border-color: var(--lime-deep); }
.menu a[aria-current="page"] { color: var(--black); background: var(--lime); border-color: var(--lime); }

/* ---------------------------------------------------------------- buttons */
.btn, .ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 4px;
  font-weight: 750; font-size: 0.88rem; text-decoration: none; border: 2px solid transparent;
  text-transform: uppercase; letter-spacing: 0.03em;
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn { background: var(--lime); color: var(--black); }
.btn:hover { background: var(--lime-deep); transform: translateY(-1px); }
.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.ghost:hover { border-color: var(--ink); background: var(--paper); transform: translateY(-1px); }
.top .btn { padding: 8px 13px; font-size: 0.78rem; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: var(--max); margin: 0 auto; padding: 0 22px 72px; }
main { display: block; }

.page-hero { padding: clamp(34px, 5vw, 56px) 0 28px; border-bottom: 3px solid var(--ink); margin-bottom: 34px; }
.crumb-line { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.eyebrow {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--black); background: var(--lime); padding: 5px 11px; border-radius: 3px; margin-bottom: 18px;
  font-weight: 700;
}
.hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: start; }
.page-hero h1 { max-width: 22ch; }
.lede { max-width: 60ch; margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* posture card in the hero */
.posture { background: var(--paper); border: 2px solid var(--ink); border-radius: 5px; padding: 18px 18px 14px; box-shadow: 6px 6px 0 var(--ink); }
.posture .pt-label { display: block; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.posture ul { list-style: none; padding: 0; margin: 0; }
.posture li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 0.86rem; }
.posture li:first-child { border-top: 0; }
.posture .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; }
.posture .dot.bad { background: var(--danger); }
.posture .dot.good { background: var(--safe); }
.posture .dot.todo { background: var(--warn); }
.posture b { display: block; }

/* ---------------------------------------------------------------- blocks */
.block { margin-bottom: 50px; scroll-margin-top: 96px; }
.block > h2 {
  display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 2px solid var(--rule-strong);
}
.block > h2::before {
  content: counter(sect, decimal-leading-zero); counter-increment: sect;
  font: 800 0.72rem/1 var(--mono); color: var(--black); background: var(--lime);
  padding: 5px 7px; border-radius: 3px; flex: none;
}
main { counter-reset: sect; }
.block h2 { max-width: 34ch; }

.mini-nav {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 12px 14px;
  background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--ink);
  border-radius: 4px; margin-bottom: 30px;
}
.mini-label { font-size: 0.69rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.mini-nav a {
  font-size: 0.79rem; text-decoration: none; color: var(--ink); padding: 4px 9px; border: 1px solid var(--rule-strong);
  border-radius: 3px; background: var(--ground);
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.mini-nav a:hover { border-color: var(--ink); background: var(--lime-wash); transform: translateY(-1px); }

.note { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--ink); padding: 16px 18px; border-radius: 4px; margin: 0 0 30px; }
.note p { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.94rem; }
.msg-tag { font-size: 0.67rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink); font-weight: 700; }
.note-warn { border-left-color: var(--warn); background: var(--warn-wash); }
.note-warn .msg-tag { color: var(--warn); }

/* ---------------------------------------------------------------- attack / defence split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 22px 0 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 5px; overflow: hidden; }
.split > div { padding: 20px; }
.split > div + div { border-left: 5px solid var(--lime); }
.split .side-a { background: var(--paper); }
.split .side-b { background: var(--lime-wash); }
.split .kicker { display: block; font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; margin-bottom: 10px; font-weight: 700; }
.side-a .kicker { color: var(--danger); }
.side-b .kicker { color: var(--safe); }
.split h3 { margin-bottom: 8px; }
.split p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---------------------------------------------------------------- risk ladder */
.ladder { background: var(--paper); border: 2px solid var(--ink); border-radius: 5px; padding: 22px 20px 16px; margin: 22px 0 10px; }
.ladder .fig-cap { font-size: 0.67rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; display: block; }
.ladder-rungs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: end; }
.ladder-rung { text-align: center; }
.ladder-rung .rung {
  display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--rule);
  transition: transform var(--fast) var(--ease), background var(--fast) var(--ease);
}
.ladder-rung:nth-child(1) .rung { height: 22px; }
.ladder-rung:nth-child(2) .rung { height: 40px; }
.ladder-rung:nth-child(3) .rung { height: 58px; }
.ladder-rung:nth-child(4) .rung { height: 76px; }
.ladder-rung:nth-child(5) .rung { height: 94px; }
.ladder-rung.lit .rung { background: var(--ink); }
.ladder-rung.risk .rung { background: #f0b6ba; }
.ladder-rung.lit.risk .rung { background: var(--danger); }
.ladder-rung:hover .rung { transform: translateY(-3px); }
.ladder-rung small { display: block; margin-top: 8px; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------------------------------------------------------------- severity chips */
.sevs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 10px; }
.sev { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 11px; border-radius: 3px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink-soft); font-weight: 700; }
.sev.s1 { color: #fff; background: var(--danger); border-color: var(--danger); }
.sev.s2 { color: var(--black); background: var(--lime); border-color: var(--lime-deep); }
.sev.s3 { color: var(--safe); background: var(--safe-wash); border-color: #a9d9c1; }
.sev.todo { color: var(--warn); background: var(--warn-wash); border-color: #e6cc93; }

/* ---------------------------------------------------------------- hardening checklist */
.checklist { display: grid; gap: 10px; margin: 22px 0 10px; }
.checklist-step {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--ink);
  border-radius: 4px; padding: 14px 16px;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.checklist-step:hover { border-left-color: var(--lime-deep); transform: translateX(3px); }
.checklist-step .num { font-size: 0.74rem; font-weight: 700; color: var(--black); background: var(--lime); padding: 4px 6px; border-radius: 3px; }
.checklist-step b { display: block; margin-bottom: 3px; }
.checklist-step p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.checklist-step.done { border-left-color: var(--safe); }
.checklist-step.done .num { background: var(--safe); color: #fff; }

/* ---------------------------------------------------------------- data tables */
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 5px; background: var(--paper); margin: 22px 0 10px; }
table.data { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 0.88rem; }
table.data caption { text-align: left; padding: 14px 16px 0; font-size: 0.79rem; color: var(--muted); }
table.data th, table.data td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--rule); vertical-align: top; }
table.data thead th { background: var(--black); color: #fff; font-size: 0.71rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; border-top: 0; white-space: nowrap; }
table.data tbody tr { transition: background var(--fast) var(--ease); }
table.data tbody tr:hover { background: var(--lime-wash); }
table.data td:first-child { font-weight: 700; }

/* ---------------------------------------------------------------- meter */
.meter { margin: 22px 0 10px; background: var(--paper); border: 2px solid var(--ink); border-radius: 5px; padding: 20px; }
.meter figcaption { font-size: 0.67rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-family: var(--mono); }
.meter-row { display: grid; grid-template-columns: 168px 1fr 92px; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rule); }
.meter-row:first-of-type { border-top: 0; }
.meter-row .name { font-size: 0.88rem; font-weight: 700; }
.meter-row .track { height: 12px; border-radius: 3px; background: var(--ground); border: 1px solid var(--rule); overflow: hidden; }
.meter-row .fill { display: block; height: 100%; background: var(--ink); }
.meter-row.warn .fill { background: var(--warn); }
.meter-row.danger .fill { background: var(--danger); }
.meter-row .val { font-size: 0.79rem; color: var(--ink-soft); text-align: right; }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 10px; margin: 22px 0 10px; }
.faq-item { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 0.99rem; list-style: none; display: flex; gap: 12px; align-items: flex-start; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; font-family: var(--mono); color: var(--black); background: var(--lime); flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 3px; font-size: 1rem; line-height: 1; }
.faq-item[open] summary::before { content: "\2013"; }
.faq-body { padding: 0 18px 6px 52px; color: var(--ink-soft); font-size: 0.93rem; }
.faq-body p { margin: 0 0 14px; }

/* ---------------------------------------------------------------- lists */
ul.plain, ol.plain { list-style: none; padding-left: 0; margin: 18px 0 10px; }
ul.plain > li, ol.plain > li {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong);
  border-radius: 4px; padding: 13px 16px; margin-bottom: 10px;
  transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
ul.plain > li:hover, ol.plain > li:hover { border-left-color: var(--ink); transform: translateX(2px); }

/* ---------------------------------------------------------------- cta + disclosure */
.next-step {
  display: flex; align-items: center; gap: 22px; justify-content: space-between; flex-wrap: wrap;
  background: var(--black); color: #d7dbd4; border-radius: 5px; padding: 24px 26px; margin: 44px 0 26px;
  border-left: 8px solid var(--lime);
}
.next-step h2 { color: #fff; font-size: 1.2rem; margin: 4px 0 6px; }
.next-step p { margin: 0; color: #a7ada4; font-size: 0.9rem; max-width: 52ch; }
.next-step .kicker { display: inline-block; font-size: 0.67rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--lime); }
.next-step .btn { background: var(--lime); color: var(--black); }
.next-step .btn:hover { background: var(--lime-deep); }

.disclosure { background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--warn); border-radius: 4px; padding: 16px 18px; font-size: 0.85rem; color: var(--ink-soft); }
.disclosure strong { color: var(--ink); }
.link-out { color: var(--ink); font-weight: 700; text-decoration-color: var(--lime-deep); }

/* ---------------------------------------------------------------- footer */
.footer { background: var(--black); color: #9aa097; padding: 46px 22px 30px; margin-top: 24px; border-top: 5px solid var(--lime); }
.foot-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
.footer .brand { color: #fff; margin-bottom: 10px; }
.footer p { font-size: 0.86rem; color: #838a80; }
.footer strong { display: block; color: #fff; font-size: 0.73rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; font-family: var(--mono); }
.footer a { display: block; color: #c2c8bd; text-decoration: none; font-size: 0.87rem; padding: 4px 0; transition: color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.footer a:hover { color: var(--lime); transform: translateX(2px); }
.fine { max-width: var(--max); margin: 30px auto 0; font-size: 0.78rem; color: #7c837a; border-top: 1px solid #262924; padding-top: 20px; }

/* ---------------------------------------------------------------- narrow */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .split { grid-template-columns: 1fr; }
  .split > div + div { border-left: 0; border-top: 5px solid var(--lime); }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 620px) {
  .bar { padding: 10px 16px; gap: 10px; }
  .shell { padding: 0 16px 56px; }
  .menu a { padding: 6px 8px; font-size: 0.76rem; }
  .ladder-rungs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .ladder-rung small { font-size: 0.55rem; }
  .meter-row { grid-template-columns: 120px 1fr 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover, .ghost:hover, .mini-nav a:hover, ul.plain > li:hover, ol.plain > li:hover,
  .checklist-step:hover, .footer a:hover, .ladder-rung:hover .rung {
    transform: none;
  }
}
