/* NieroCheck — survey-sheet look: cool paper, ink navy, plan blue, boundary red used only for outlines. */
:root {
  --paper: #f3f6f9;
  --sheet: #ffffff;
  --ink: #13233b;
  --muted: #56667b;
  --plan: #2457a6;
  --plan-soft: #e3ecf8;
  --boundary: #c42e2e;
  --grid: #d5dee8;
  --line: #c3cfdc;
  --ok: #2e7d4f;
  --radius-s: 4px;
  --radius-m: 10px;
  --display: "Archivo", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
}
a { color: var(--plan); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--plan); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--sheet); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand {
  font: 800 22px/1 var(--display);
  font-stretch: 112%;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand svg { flex: none; }
.brand .tld { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: 20px; font-size: 15px; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--plan); }

/* Type */
h1, h2, h3 { font-family: var(--display); color: var(--ink); margin: 0; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.04; font-weight: 800; font-stretch: 108%; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; font-weight: 750; font-stretch: 104%; letter-spacing: -0.01em; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: 19px; color: var(--muted); max-width: 54ch; }
.small { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { max-width: 13ch; margin-bottom: 18px; }

.search { margin-top: 28px; position: relative; max-width: 560px; }
.search label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.search-row { display: flex; gap: 8px; }
.search input {
  flex: 1;
  min-width: 0;
  font: 400 18px var(--body);
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--sheet);
  color: var(--ink);
}
.search input::placeholder { color: #8a97a8; }
.btn {
  font: 700 17px var(--display);
  font-stretch: 104%;
  padding: 0 22px;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--plan);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #1c4787; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.examples { margin-top: 12px; font-size: 15px; color: var(--muted); }
.examples button {
  font: inherit;
  color: var(--plan);
  background: none;
  border: 0;
  padding: 0;
  margin-right: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.results:empty { display: none; }
.results li + li { border-top: 1px solid var(--grid); }
.results a { display: block; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.results a:hover, .results a:focus-visible { background: var(--plan-soft); }
.results .meta { display: block; font-size: 14px; color: var(--muted); }
.msg { margin-top: 12px; font-size: 15px; }
.msg.err { color: var(--boundary); }

/* The drawing: the one bold element on every page */
.drawing { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.drawing svg { display: block; width: 100%; height: auto; }
.drawing figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.fp-grid { stroke: var(--grid); stroke-width: 1; }
.fp-shape { fill: rgba(196, 46, 46, 0.07); stroke: var(--boundary); stroke-width: 2.5; stroke-linejoin: round; }
.fp-dim { stroke: var(--ink); stroke-width: 1; }
.fp-text { font: 600 13px var(--body); fill: var(--ink); }
.fp-area { font: 800 22px var(--display); fill: var(--ink); }
.fp-north { font: 700 12px var(--body); fill: var(--muted); }
.fp-north-arrow { fill: var(--ink); }

/* Sections */
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.band.white { background: var(--sheet); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 28px; }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--muted); font-size: 16px; }
.soon { margin-top: 36px; padding-top: 20px; border-top: 1px dashed var(--line); }
.soon ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.soon li { margin-bottom: 4px; }

/* Address page */
.addr-head { padding: 40px 0 28px; }
.addr-head h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: none; }
.addr-head .place { color: var(--muted); margin-top: 10px; font-size: 18px; }
.addr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 40px; }

.facts { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; font-size: 16px; }
.facts caption { text-align: left; font: 700 19px var(--display); padding: 0 0 12px; }
.facts th, .facts td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { font-weight: 500; color: var(--muted); width: 42%; }
.facts td { font-weight: 600; }
.facts .src { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }

#map { height: 340px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--grid); }
.stack > * + * { margin-top: 24px; }

.note { background: var(--plan-soft); border-radius: var(--radius-m); padding: 18px 20px; font-size: 16px; }
.note h3 { margin-bottom: 6px; }
.note ul { margin: 6px 0 0; padding-left: 20px; }

.empty { padding: 60px 0; max-width: 60ch; }

/* Prose pages */
.prose { max-width: 70ch; padding: 48px 0 64px; }
.prose h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 20px; }
.prose h2 { font-size: 22px; margin: 32px 0 10px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--sheet); padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; gap: 18px; }

.skeleton { color: transparent; background: linear-gradient(90deg, var(--grid), #eef2f6, var(--grid)); background-size: 200% 100%; border-radius: 4px; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .hero .wrap, .addr-grid { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 44px; }
  .cols { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .search-row { flex-direction: column; }
  .btn { width: 100%; }
  .facts th { width: 45%; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

/* Language switch, skip link */
.top .wrap { gap: 20px; }
.top nav { margin-left: auto; }
.top nav a[aria-current="page"] { color: var(--plan); font-weight: 600; }
.lang {
  font: 700 14px var(--display);
  color: var(--ink);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  padding: 5px 9px;
  line-height: 1;
}
.lang:hover { background: var(--ink); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Tool list (home, hubs) */
.tool-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tool-list.wide { margin-bottom: 64px; }
.tool-list a { display: block; height: 100%; padding: 18px 20px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; }
.tool-list a:hover { border-color: var(--plan); }
.tool-list strong { display: block; font: 700 18px/1.3 var(--display); margin-bottom: 4px; }
.tool-list span { color: var(--muted); font-size: 15px; }

/* Calculators */
.calc-head { padding: 40px 0 20px; max-width: 70ch; }
.calc-head h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.crumbs { font-size: 14px; margin: 0 0 10px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.calc-form { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select {
  font: 500 17px var(--body); color: var(--ink); background: #fff;
  padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); width: 100%;
}
.field input:not([type="radio"]):not([type="checkbox"]):focus, .field select:focus { border-color: var(--plan); outline: none; box-shadow: 0 0 0 3px var(--plan-soft); }
.radio { display: inline-flex; align-items: center; gap: 8px; margin: 0 18px 6px 0; font-size: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; }
.check input, .radio input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--plan); flex: none; }
[hidden] { display: none !important; }
.calc-result { position: sticky; top: 16px; }
.calc-table tr.total th, .calc-table tr.total td { background: var(--plan-soft); font-size: 18px; }
.calc-table tr.total td { font: 800 20px var(--display); }
.calc-table .src { display: inline; margin-left: 4px; }
.visually-small { font-size: 16px; margin-bottom: 10px; }
.calc-explainer { padding-top: 40px; }
.related { margin-top: 28px; font-size: 15px; }
.note-links { margin: 12px 0 0; font-size: 15px; }
.soon.flush { margin-top: 0; border-top: 0; padding-top: 0; }
.updated { margin-top: 32px; }
.prose .lede { margin-bottom: 8px; }

@media (max-width: 860px) {
  .calc-grid, .tool-list { grid-template-columns: 1fr; }
  .calc-result { position: static; }
  .top .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 0; row-gap: 6px; }
  .lang { margin-left: auto; }
  .top nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding: 6px 0 12px; gap: 18px; white-space: nowrap; }
}

/* Pick on the map */
.link-btn { font: 600 16px var(--body); color: var(--plan); background: none; border: 0; padding: 0; margin-top: 16px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pick { grid-column: 1 / -1; margin-top: 20px; }
#pick-map { height: 420px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--grid); cursor: crosshair; }
.pick-result { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.pick-result p { margin: 0; }
.btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.btn-link:hover { color: #fff; }
@media (max-width: 860px) { #pick-map { height: 360px; } }

/* Sunlight */
.sun h3 { margin-bottom: 4px; }
.table-scroll { overflow-x: auto; }
.sun-table { font-size: 15px; }
.sun-table th, .sun-table td { padding: 10px 12px; white-space: nowrap; }
.sun-table thead th { font-weight: 600; color: var(--ink); background: var(--plan-soft); }
.sun-table tbody th { width: auto; }
.sun-pick { margin: 14px 0 8px; max-width: 280px; }

/* Compare */
.compare-form { grid-template-columns: 1fr 1fr auto; align-items: end; margin-bottom: 8px; }
.compare-table { margin: 16px 0 64px; min-width: 560px; }
.compare-table thead th { background: var(--plan-soft); color: var(--ink); font-weight: 700; }
.compare-table td, .compare-table th { width: 33%; }
@media (max-width: 860px) { .compare-form { grid-template-columns: 1fr; } }

/* Hazards */
#area { margin-top: 0; }
.risk { font-weight: 700; }
.risk-flood10 { color: var(--boundary); }
.risk-flood100 { color: #a35a00; }
.risk-flood500 { color: var(--ink); }

/* Reviews */
.reviews h3 { margin-bottom: 8px; }
.stars { color: #d39a00; letter-spacing: 1px; }
.stars .off { color: var(--line); }
.avg { font-weight: 600; }
.review-list { list-style: none; padding: 0; margin: 12px 0; }
.review { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 10px; }
.review-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.review p { margin: 0; }
.review-form summary { cursor: pointer; font: 700 16px var(--display); color: var(--plan); margin: 10px 0; }
.review-form textarea { font: 400 16px/1.5 var(--body); padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); width: 100%; resize: vertical; }
.star-row { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; width: max-content; gap: 2px; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label { font-size: 36px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; transition: color .1s; }
.star-row label:hover, .star-row label:hover ~ label, .star-row input:checked ~ label { color: #d39a00; }
.star-row input:focus-visible + label { outline: 3px solid var(--plan); border-radius: 4px; }
.star-text { display: block; margin-left: 2px; font-size: 15px; color: var(--muted); vertical-align: middle; }
.hp { position: absolute; left: -9999px; }
.panel-login { max-width: 420px; margin-bottom: 64px; }
.btn.ghost { background: transparent; color: var(--plan); border: 1.5px solid var(--plan); }
.btn.ghost:hover { background: var(--plan-soft); }
.panel-actions { margin-top: 10px !important; display: flex; gap: 8px; flex-wrap: wrap; }
.prices h3 { margin-bottom: 4px; }
.big { font: 800 22px var(--display); }

/* Hero backgrounds and quick actions */
.hero { position: relative; overflow: hidden; }
.hero[data-hero="plan"], .hero[data-hero="city"] { color: #fff; background: #0d1a2e center / cover no-repeat; }
.hero[data-hero="plan"] { background-image: url("/assets/hero-plan.svg"); }
.hero[data-hero="city"] { background-image: url("/assets/hero-city.svg"); background-position: center bottom; }
.hero[data-hero="blueprint"] { background: #eef3f8 url("/assets/hero-blueprint.svg") right center / cover no-repeat; }
.hero[data-hero="plan"]::before, .hero[data-hero="city"]::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 36, .88) 0%, rgba(10, 20, 36, .62) 48%, rgba(10, 20, 36, .15) 100%);
}
.hero[data-hero="blueprint"]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(238, 243, 248, .97) 0%, rgba(238, 243, 248, .85) 48%, rgba(238, 243, 248, 0) 80%); }
.hero .wrap { position: relative; }
.hero[data-hero="plan"] h1, .hero[data-hero="city"] h1 { color: #fff; }
.hero[data-hero="plan"] .lede, .hero[data-hero="city"] .lede { color: #c9d6e6; }
.hero[data-hero="plan"] .search label, .hero[data-hero="city"] .search label { color: #fff; }
.hero[data-hero="plan"] .search input, .hero[data-hero="city"] .search input { border-color: #fff; }
.hero[data-hero="plan"] .hint, .hero[data-hero="city"] .hint, .hero[data-hero="plan"] .msg, .hero[data-hero="city"] .msg { color: #c9d6e6; }
.hero[data-hero="plan"] .msg.err, .hero[data-hero="city"] .msg.err { color: #ffb4b4; }
.hint { margin: 8px 0 0; }

.quick { margin-top: 22px; max-width: 560px; }
.quick-label { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip {
  display: grid; gap: 2px; text-align: center; padding: 10px 8px; cursor: pointer;
  background: var(--sheet); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-s);
  font: 400 13px var(--body);
}
.chip strong { font: 700 15px var(--display); }
.chip span { color: var(--muted); }
.chip:hover { border-color: var(--plan); }
.actions { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; }
.act {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; text-decoration: none;
  font: 600 15px var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
}
.act:hover { border-color: var(--plan); color: var(--plan); }
.act[disabled] { opacity: .6; cursor: progress; }
.hero[data-hero="plan"] .quick-label, .hero[data-hero="city"] .quick-label { color: #c9d6e6; }
.hero[data-hero="plan"] .chip, .hero[data-hero="city"] .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(2px); }
.hero[data-hero="plan"] .chip span, .hero[data-hero="city"] .chip span { color: #b8c7da; }
.hero[data-hero="plan"] .chip:hover, .hero[data-hero="city"] .chip:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.hero[data-hero="plan"] .act, .hero[data-hero="city"] .act { color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero[data-hero="plan"] .act:hover, .hero[data-hero="city"] .act:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .1); }
.hero .drawing { box-shadow: 0 20px 50px rgba(5, 12, 24, .35); }
.pick-band { padding: 32px 0 40px; background: var(--sheet); border-top: 1px solid var(--line); }
.pick-h { font-size: 22px; margin-bottom: 4px; }
@media (max-width: 480px) { .chips { grid-template-columns: 1fr 1fr; } .chips .chip:last-child { display: none; } }
