/* HazardGrid — hazardgrid.com
   Regulatory instrument panel. Dark green-undertone base, mint signal,
   hazard amber. One stylesheet, no imports. */

:root {
  --bg:        #0C0F0D;
  --bg-2:      #111714;
  --surf:      #161E1A;
  --surf-2:    #1D2723;
  --line:      #263029;
  --line-soft: #1B2320;
  --fg:        #E9F0EB;
  --fg-dim:    #93A39A;
  --fg-mute:   #6B7A72;
  --acc:       #48F09B;
  --acc-dim:   #2FBE79;
  --acc-glow:  rgba(72, 240, 155, .14);
  --amber:     #FFC24A;
  --red:       #FF6B5A;

  --display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1140px;
  --gut: 20px;
  --r: 4px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

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

img { max-width: 100%; height: auto; display: block; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.2rem, 6.5vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.02rem; letter-spacing: .01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--acc); color: #06110B; padding: 10px 16px;
  font-family: var(--mono); font-size: .82rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ── Hazard tape ─────────────────────────────────────────────
   The one literal nod to the name. Appears once, at the very top. */
.tape {
  height: 5px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--amber) 0 10px,
    #0C0F0D 10px 20px
  );
}

/* ── Header ───────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12, 15, 13, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.32rem;
  letter-spacing: .02em; text-transform: uppercase;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--fg); }
.brand b { color: var(--acc); font-weight: 700; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a {
  color: var(--fg-dim); font-size: .9rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--acc); text-decoration: none; }

.age {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  color: var(--amber); border: 1px solid var(--amber);
  padding: 2px 7px; border-radius: 2px; white-space: nowrap;
}

.burger {
  margin-left: auto; display: none;
  background: none; border: 1px solid var(--line); color: var(--fg);
  width: 40px; height: 36px; border-radius: var(--r); cursor: pointer;
  font-size: 1.1rem; line-height: 1;
}

@media (max-width: 860px) {
  .burger { display: block; }
  .nav {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    margin-left: 0; padding: 6px 0;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px var(--gut); border-top: 1px solid var(--line-soft); }
  .nav .age { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 68px 0 52px;
  border-bottom: 1px solid var(--line);
}
/* The grid. Hairlines on a 44px module, fading downward. */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute;
  top: -160px; left: 50%; transform: translateX(-50%);
  width: 620px; height: 320px; border-radius: 50%;
  background: var(--acc-glow); filter: blur(90px);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--mono); font-size: .76rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--acc); margin: 0 0 16px;
}
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--acc); }
.lede {
  max-width: 56ch; color: var(--fg-dim); font-size: 1.06rem;
  margin: 18px 0 26px;
}

/* Register readout — the hero's thesis: this site is the register. */
.readout {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surf); overflow: hidden; max-width: 720px;
}
.readout div { padding: 13px 16px; border-right: 1px solid var(--line); }
.readout div:last-child { border-right: 0; }
.readout dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-mute); margin: 0 0 4px;
}
.readout dd {
  margin: 0; font-family: var(--display); font-size: 1.42rem;
  font-weight: 700; line-height: 1;
}
.readout dd small {
  font-family: var(--mono); font-size: .74rem; font-weight: 400;
  color: var(--fg-dim); display: block; margin-top: 5px;
  text-transform: none; letter-spacing: 0;
}
@media (max-width: 560px) {
  .readout div { border-right: 0; border-bottom: 1px solid var(--line); }
  .readout div:last-child { border-bottom: 0; }
}

/* ── Sections ─────────────────────────────────────────────── */
.sec { padding: 56px 0; }
.sec + .sec { border-top: 1px solid var(--line-soft); }
.sec-hd { margin-bottom: 28px; max-width: 68ch; }
.sec-hd p { color: var(--fg-dim); margin: 10px 0 0; }

/* ── Filter chips ─────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  background: var(--surf); color: var(--fg-dim);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 7px 15px; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { color: var(--fg); border-color: var(--fg-mute); }
.chip[aria-pressed="true"] {
  background: var(--acc-glow); color: var(--acc); border-color: var(--acc-dim);
}

/* ── Toplist: the ledger ──────────────────────────────────── */
.ledger { display: grid; gap: 12px; }

.row {
  display: grid;
  grid-template-columns: 62px 1fr;
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .18s, transform .18s;
}
.row:hover { border-color: #33423A; transform: translateY(-1px); }
.row[hidden] { display: none; }

/* Outline rank numerals — ledger row numbers, not decoration. */
.rank {
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 18px;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono); font-size: 1.6rem; font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px #4B5D53;
}
/* Firefox has no text-stroke — fall back to a solid muted numeral. */
@supports not (-webkit-text-stroke: 1px #000) {
  .rank { color: var(--fg-mute); }
}
.row:nth-child(-n+3) .rank { -webkit-text-stroke-color: var(--acc-dim); }

.row-body { padding: 18px 20px; min-width: 0; }

.row-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 12px;
}
/* Optional brand mark. Renders only when a file exists in assets/logos/. */
.logo {
  width: 92px; height: 38px; flex: none;
  object-fit: contain; object-position: left center;
  background: var(--surf-2); border: 1px solid var(--line);
  border-radius: 3px; padding: 4px 8px;
}
.logo-lg { width: 132px; height: 52px; margin-bottom: 16px; }
.row-name { font-family: var(--display); font-size: 1.3rem; font-weight: 700;
  text-transform: uppercase; margin: 0; }
.row-name a { color: var(--fg); }
.row-name a:hover { color: var(--acc); text-decoration: none; }

.score { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.score-n {
  font-family: var(--mono); font-weight: 600; font-size: 1.08rem;
  color: var(--amber);
}
.bar { width: 76px; height: 5px; background: var(--surf-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--amber); border-radius: 3px; }

/* Licence chip — machine-stamped register entry. */
.lic {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--acc); background: var(--acc-glow);
  border: 1px solid rgba(72, 240, 155, .3);
  border-radius: 2px; padding: 3px 8px;
}
.lic::before { content: "✓"; font-weight: 700; }

.stamp {
  font-family: var(--mono); font-size: .7rem; color: var(--fg-mute);
  letter-spacing: .04em;
}

.offer { margin: 0 0 12px; }
.offer-l {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-mute); display: block;
}
.offer-v {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  line-height: 1.2; color: var(--fg);
}
.offer-v span { color: var(--acc); }

.feats {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.feats li {
  font-size: .88rem; color: var(--fg-dim);
  position: relative; padding-left: 16px;
}
.feats li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--acc-dim); font-size: .8rem;
}

.row-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.terms {
  font-family: var(--mono); font-size: .7rem; color: var(--fg-mute);
  margin-left: auto;
}

@media (max-width: 620px) {
  .row { grid-template-columns: 42px 1fr; }
  .rank { font-size: 1.15rem; padding-top: 16px; }
  .row-body { padding: 15px 14px; }
  .score { margin-left: 0; width: 100%; }
  .terms { margin-left: 0; width: 100%; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .84rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 11px 20px; border-radius: 3px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-go { background: var(--acc); color: #06110B; }
.btn-go:hover { background: #63F5AB; color: #06110B; }
.btn-alt {
  background: transparent; color: var(--fg); border-color: var(--line);
}
.btn-alt:hover { border-color: var(--acc-dim); color: var(--acc); }
.btn-sm { padding: 8px 14px; font-size: .78rem; }

.link-rev {
  font-family: var(--mono); font-size: .8rem; font-weight: 500;
  color: var(--fg-dim); text-decoration: none;
}
.link-rev:hover { color: var(--acc); text-decoration: none; }

.cta-pair { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ── Comparison table ─────────────────────────────────────── */
.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 660px; font-size: .9rem; }
table.cmp th, table.cmp td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
table.cmp thead th {
  background: var(--bg-2);
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-mute);
  position: sticky; top: 0;
}
table.cmp tbody tr:hover { background: var(--surf); }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.cmp .c-name { font-weight: 600; }
table.cmp .c-name a { color: var(--fg); }
table.cmp .c-name a:hover { color: var(--acc); }
table.cmp .c-bonus { white-space: normal; min-width: 200px; color: var(--fg-dim); }

/* ── Cards / prose blocks ─────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }

.card {
  background: var(--surf); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--fg-dim); font-size: .94rem; }
.card p:last-child { margin-bottom: 0; }

.card-lnk { display: block; text-decoration: none; transition: border-color .18s; }
.card-lnk:hover { border-color: var(--acc-dim); text-decoration: none; }
.card-lnk h3 { color: var(--fg); }

.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: s; position: relative;
  padding: 0 0 18px 46px; border-left: 1px solid var(--line);
  margin-left: 14px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: -14px; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--acc);
}
.steps strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.steps span { color: var(--fg-dim); font-size: .93rem; }

/* ── Review page ──────────────────────────────────────────── */
.crumb {
  font-family: var(--mono); font-size: .74rem; color: var(--fg-mute);
  padding: 16px 0; letter-spacing: .04em;
}
.crumb a { color: var(--fg-dim); }
.crumb a:hover { color: var(--acc); }

.rev-hd {
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: start;
  padding: 8px 0 32px; border-bottom: 1px solid var(--line);
}
.rev-hd h1 { margin-bottom: 12px; }
.rev-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.rev-box {
  background: var(--surf); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px; min-width: 250px;
}
.rev-box .big {
  font-family: var(--display); font-size: 2.9rem; font-weight: 700;
  line-height: 1; color: var(--amber);
}
.rev-box .big sub { font-size: 1rem; color: var(--fg-mute); vertical-align: baseline; }
@media (max-width: 780px) {
  .rev-hd { grid-template-columns: 1fr; }
  .rev-box { min-width: 0; }
}

.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.verdict > div { padding: 20px; }
.verdict > div:first-child { border-right: 1px solid var(--line); }
.verdict h4 { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; margin-bottom: 12px; }
.verdict ul { list-style: none; margin: 0; padding: 0; }
.verdict li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: .93rem; color: var(--fg-dim); }
.verdict li:last-child { margin-bottom: 0; }
.pros h4 { color: var(--acc); }
.cons h4 { color: var(--red); }
.pros li::before { content: "+"; position: absolute; left: 2px; color: var(--acc); font-family: var(--mono); font-weight: 600; }
.cons li::before { content: "−"; position: absolute; left: 2px; color: var(--red); font-family: var(--mono); font-weight: 600; }
@media (max-width: 620px) {
  .verdict { grid-template-columns: 1fr; }
  .verdict > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Score breakdown */
.scores { display: grid; gap: 12px; }
.sc-row { display: grid; grid-template-columns: 1fr 62px 40px; gap: 12px; align-items: center; }
.sc-row span:first-child { font-size: .92rem; color: var(--fg-dim); }
.sc-row .bar { width: 100%; }
.sc-row .num {
  font-family: var(--mono); font-size: .88rem; color: var(--amber);
  text-align: right; font-variant-numeric: tabular-nums;
}

/* Spec list */
.specs { margin: 0; }
.specs div {
  display: grid; grid-template-columns: 190px 1fr; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.specs div:last-child { border-bottom: 0; }
.specs dt {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--fg-mute);
}
.specs dd { margin: 0; font-size: .95rem; }
@media (max-width: 560px) {
  .specs div { grid-template-columns: 1fr; gap: 3px; }
}

/* ── FAQ accordion ────────────────────────────────────────── */
.faq { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line-soft); background: var(--surf); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; padding: 16px 20px; list-style: none;
  font-weight: 600; font-size: .98rem;
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--acc);
  font-family: var(--mono); font-size: 1.2rem; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--acc); }
.faq .ans { padding: 0 20px 18px; color: var(--fg-dim); font-size: .94rem; }

/* ── Callout ──────────────────────────────────────────────── */
.note {
  border-left: 3px solid var(--amber);
  background: rgba(255, 194, 74, .06);
  padding: 16px 20px; border-radius: 0 var(--r) var(--r) 0;
  font-size: .93rem; color: var(--fg-dim);
}
.note strong { color: var(--fg); }

/* ── Prose ────────────────────────────────────────────────── */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 20px; color: var(--fg-dim); }
.prose li { margin-bottom: 7px; }

/* ── Footer ───────────────────────────────────────────────── */
.ftr {
  border-top: 1px solid var(--line); background: var(--bg-2);
  padding: 44px 0 28px; margin-top: 20px;
  font-size: .9rem;
}
.ftr-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px;
  padding-bottom: 30px; border-bottom: 1px solid var(--line);
}
.ftr h4 {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .12em;
  color: var(--fg-mute); margin-bottom: 14px; text-transform: uppercase;
}
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 8px; }
.ftr a { color: var(--fg-dim); }
.ftr a:hover { color: var(--acc); }
.ftr p { color: var(--fg-mute); font-size: .88rem; }
.ftr-btm {
  padding-top: 22px; display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; color: var(--fg-mute); font-size: .82rem;
}
.ftr-btm .age { margin-right: 4px; }
@media (max-width: 720px) { .ftr-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ── Utility ──────────────────────────────────────────────── */
.mt0 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--fg-dim); }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
