:root {
  --ink: #171714;
  --ink-soft: #3f3f39;
  --paper: #fbfaf6;
  --paper-2: #f1eee5;
  --paper-3: #e6e0d4;
  --rock: #5f5c54;
  --accent: #f2c94c;
  --accent-strong: #d3a80a;
  --teal: #0d625f;
  --teal-pale: #dff0ed;
  --alert: #8a2b2b;
  --white: #ffffff;
  --border: #cbc4b6;
  --shadow: 0 16px 40px rgba(23, 23, 20, .08);
  --radius: 18px;
  --radius-sm: 10px;
  --max: 1180px;
  --focus: #005fcc;
  --space-1: .35rem;
  --space-2: .65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.25rem;
  --space-7: 5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}
a { color: var(--teal); text-decoration-thickness: .09em; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .16em; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button, .button { min-height: 44px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute; left: .75rem; top: -5rem; z-index: 1000;
  background: var(--ink); color: var(--white); padding: .75rem 1rem; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

.shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), 780px); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251,250,246,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-row { display:flex; gap:1rem; align-items:center; justify-content:space-between; min-height:72px; }
.brand { display:inline-flex; align-items:center; gap:.65rem; color:var(--ink); text-decoration:none; font-weight:900; letter-spacing:-.04em; font-size:1.35rem; }
.brand-mark { width:32px; height:32px; border-radius:9px 9px 12px 7px; background:var(--ink); position:relative; transform:rotate(-3deg); }
.brand-mark::after { content:""; position:absolute; width:13px; height:5px; background:var(--accent); border-radius:4px; right:4px; bottom:5px; }
.nav { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.nav a { color:var(--ink); font-weight:700; text-decoration:none; padding:.5rem .25rem; }
.nav a[aria-current="page"] { border-bottom:3px solid var(--accent-strong); }
.nav-toggle { display:none; border:1px solid var(--border); background:var(--paper); border-radius:10px; padding:.55rem .75rem; font-weight:800; }

.hero { padding: clamp(3.2rem, 8vw, 7.5rem) 0 var(--space-7); overflow:hidden; }
.hero-grid { display:grid; grid-template-columns: minmax(0,1.22fr) minmax(280px,.78fr); gap:clamp(2rem,6vw,5rem); align-items:center; }
.eyebrow { text-transform:uppercase; letter-spacing:.14em; font-size:.78rem; font-weight:900; color:var(--rock); margin:0 0 .7rem; }
h1,h2,h3 { line-height:1.06; letter-spacing:-.035em; margin-top:0; }
h1 { font-size:clamp(2.8rem,7vw,6.4rem); margin-bottom:1.2rem; }
h2 { font-size:clamp(2rem,4vw,3.5rem); margin-bottom:1rem; }
h3 { font-size:1.35rem; }
.lead { font-size:clamp(1.15rem,2vw,1.45rem); max-width:720px; color:var(--ink-soft); }
.hero-actions, .actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.5rem; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; text-decoration:none; padding:.85rem 1.05rem; border-radius:12px; border:2px solid var(--ink); background:var(--ink); color:var(--white); font-weight:900; cursor:pointer; }
.button:hover { transform:translateY(-1px); }
.button.secondary { background:transparent; color:var(--ink); }
.button.accent { background:var(--accent); color:var(--ink); border-color:var(--ink); }
.button.small { min-height:38px; padding:.55rem .75rem; font-size:.92rem; }

.rock-panel { position:relative; background:var(--ink); color:var(--white); border-radius:28px; padding:2rem; box-shadow:var(--shadow); min-height:390px; }
.rock-panel::before, .rock-panel::after { content:""; position:absolute; border:2px solid rgba(255,255,255,.22); border-radius:45% 55% 47% 53%; inset:11% 9% 36% 18%; transform:rotate(8deg); }
.rock-panel::after { inset:34% 16% 11% 7%; transform:rotate(-5deg); }
.rock-panel-content { position:relative; z-index:1; }
.rock-panel .tag { display:inline-block; color:var(--ink); background:var(--accent); padding:.35rem .6rem; border-radius:999px; font-weight:900; }
.rock-panel blockquote { margin:4rem 0 0; font-size:2rem; line-height:1.08; font-weight:900; letter-spacing:-.04em; }
.rock-panel p { color:#e9e5dc; }

.section { padding:var(--space-7) 0; }
.section.alt { background:var(--paper-2); border-block:1px solid var(--border); }
.section-intro { max-width:760px; margin-bottom:2rem; }
.grid { display:grid; gap:1rem; }
.grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:1.35rem; box-shadow:0 8px 24px rgba(23,23,20,.035); }
.card h3 { margin-bottom:.5rem; }
.card p:last-child { margin-bottom:0; }
.card-link { color:inherit; text-decoration:none; display:block; height:100%; }
.card-link:hover .link-arrow { transform:translateX(4px); }
.link-arrow { display:inline-block; transition:.15s ease; font-weight:900; }
.icon-tile { width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:var(--accent); font-weight:1000; margin-bottom:1rem; }

.trust-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; padding:1.2rem 0; border-block:1px solid var(--border); }
.trust-item { display:flex; gap:.7rem; align-items:flex-start; font-size:.95rem; }
.trust-item strong { display:block; }

.callout { border-left:5px solid var(--accent-strong); background:var(--white); padding:1rem 1.1rem; border-radius:0 12px 12px 0; }
.callout.info { border-left-color:var(--teal); background:var(--teal-pale); }
.callout.warning { border-left-color:var(--alert); background:#f8e8e8; }
.stack-top { margin-top:1rem; }

.tool-header { padding:3rem 0 2rem; }
.tool-shell { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:2rem; align-items:start; padding-bottom:5rem; }
.tool-panel { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:clamp(1rem,3vw,2rem); }
.tool-aside { position:sticky; top:96px; }
.fieldset { border:0; padding:0; margin:0 0 1.6rem; }
.fieldset legend { font-size:1.15rem; font-weight:900; margin-bottom:.7rem; }
.option-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; }
.option { position:relative; }
.option input { position:absolute; opacity:0; pointer-events:none; }
.option label { display:block; border:2px solid var(--border); background:var(--paper); border-radius:12px; padding:.8rem .9rem; cursor:pointer; font-weight:750; min-height:52px; }
.option input:checked + label { border-color:var(--ink); background:var(--accent); }
.option input:focus-visible + label { outline:3px solid var(--focus); outline-offset:3px; }
label.block { display:block; font-weight:850; margin-bottom:.35rem; }
select, input[type="search"], input[type="number"], input[type="text"] { width:100%; border:2px solid var(--border); background:var(--white); border-radius:10px; padding:.75rem .8rem; min-height:46px; color:var(--ink); }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.2rem; }
.help { color:var(--ink-soft); font-size:.9rem; margin-top:.35rem; }

.results { margin-top:2rem; }
.result-card { border:1px solid var(--border); border-radius:15px; padding:1.2rem; margin-bottom:.85rem; background:var(--paper); }
.result-card[data-status="review"] { border-left:5px solid var(--accent-strong); }
.result-top { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.meta { display:flex; gap:.45rem; flex-wrap:wrap; margin:.7rem 0; }
.badge { display:inline-flex; align-items:center; gap:.3rem; padding:.28rem .5rem; border-radius:999px; background:var(--paper-3); color:var(--ink); font-size:.78rem; font-weight:850; }
.badge.good { background:var(--teal-pale); }
.badge.warn { background:#f5e9bd; }
.badge.official { background:var(--ink); color:var(--white); }
.source-note { font-size:.82rem; color:var(--ink-soft); margin-top:.8rem; }
.empty { padding:2rem; text-align:center; border:2px dashed var(--border); border-radius:14px; }

.filters { display:grid; grid-template-columns:2fr repeat(3,minmax(0,1fr)); gap:.8rem; margin-bottom:1.2rem; }
.list-count { color:var(--ink-soft); font-weight:750; margin:.5rem 0 1rem; }

.prose { font-size:1.06rem; }
.prose h2 { margin-top:2.5rem; }
.prose h3 { margin-top:1.8rem; }
.prose li { margin:.35rem 0; }

.footer { border-top:1px solid var(--border); background:var(--paper-2); padding:2.5rem 0; }
.footer-grid { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:2rem; }
.footer a { color:var(--ink); }
.smallprint { color:var(--ink-soft); font-size:.86rem; }

.status-dot { width:.65rem; height:.65rem; background:var(--teal); border-radius:50%; display:inline-block; }
.status-dot.review { background:var(--accent-strong); }

@media (max-width: 900px) {
  .hero-grid, .tool-shell, .footer-grid { grid-template-columns:1fr; }
  .grid.four, .grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tool-aside { position:static; }
  .trust-strip { grid-template-columns:1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display:inline-flex; }
  .nav { display:none; position:absolute; left:1rem; right:1rem; top:68px; background:var(--paper); border:1px solid var(--border); border-radius:14px; padding:1rem; box-shadow:var(--shadow); flex-direction:column; align-items:stretch; }
  .nav.open { display:flex; }
  .nav a { padding:.65rem; }
  .grid.two, .grid.three, .grid.four, .option-grid, .form-row, .filters { grid-template-columns:1fr; }
  h1 { font-size:clamp(2.55rem,14vw,4.3rem); }
  .rock-panel { min-height:330px; }
}

@media print {
  .site-header, .footer, .tool-aside, .no-print, .hero-actions { display:none !important; }
  body { background:white; color:black; }
  .shell, .narrow { width:100%; }
  .tool-shell { display:block; }
  .tool-panel, .result-card { border:1px solid #999; box-shadow:none; break-inside:avoid; }
  a::after { content:" (" attr(href) ")"; font-size:.8em; word-break:break-all; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}

/* Dormant monetisation architecture.
   Slots are created only when data/monetisation.json enables them. */
.ad-slot {
  width:min(100% - 2rem, var(--ad-max-w, 970px));
  min-height:var(--ad-min-h-desktop, 90px);
  margin:1.5rem auto;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background:var(--paper-2);
  display:grid;
  grid-template-rows:auto 1fr;
  align-items:center;
  overflow:hidden;
}
.ad-slot__label {
  display:block;
  padding:.35rem .65rem 0;
  color:var(--ink-soft);
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ad-slot__mount {
  width:100%;
  min-height:inherit;
  display:grid;
  place-items:center;
  padding:.75rem;
}
.ad-slot--reserved .ad-slot__mount { color:var(--ink-soft); font-size:.85rem; }
.tool-aside .ad-slot--sidebar {
  width:100%;
  margin:1rem 0 0;
  min-height:var(--ad-min-h-desktop, 250px);
  position:static;
}
@media (max-width: 720px) {
  .ad-slot { min-height:var(--ad-min-h-mobile, 50px); }
  .ad-slot[data-hide-mobile="true"] { display:none !important; }
}
@media print {
  .ad-slot { display:none !important; }
}

/* v2 guide/content system */
.guide-stack { display:grid; gap:1rem; margin:1.25rem 0; }
.guide-section h2 { margin-top:0; }
.guide-section li + li { margin-top:.55rem; }
.condition-grid .card { min-height:180px; }
.condition-grid h3 { margin-bottom:.4rem; }
@media (max-width: 1100px) { .condition-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 720px) { .condition-grid { grid-template-columns:1fr; } }

.current-detail{padding:.8rem 1rem;border-left:4px solid currentColor;background:rgba(0,0,0,.035);border-radius:.35rem}.route-summary{font-size:.95rem}
@media print{.current-detail{break-inside:avoid}}
