/* PROJiTECH — plan-sheet brutalist system. Light by default, follows prefers-color-scheme. */
:root {
  --bg: #F4F2ED;
  --surface: #FFFFFF;
  --text: #1B1E21;
  --primary: #1B1E21;
  --accent: #FFD23F;
  --on-primary: #FFD23F;
  --on-accent: #1B1E21;
  --muted: #3F4348;
  --link: #B23C0A;
  --line: #1B1E21;
  --line-soft: #C9C4B8;
  --grid: rgba(27, 30, 33, .06);
  --over: #B3261E;
  --under: #1F5FA8;
  --ok: #2E6B3A;
  --band: #1B1E21;
  --on-band: #F4F2ED;
  --band-muted: #DEDBD3;
  --asphalt: #1B1E21;
  --lane: #FFD23F;
  --fh: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --fb: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fm: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1240px;
  --pad: clamp(16px, 5vw, 32px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1E2124;
    --text: #F4F2ED;
    --primary: #FFD23F;
    --on-primary: #1B1E21;
    --muted: #C3C7CC;
    --link: #FFD23F;
    --line: #E9E6DF;
    --line-soft: #4A4F55;
    --grid: rgba(244, 242, 237, .06);
    --over: #F2A09A;
    --under: #9EC3F0;
    --ok: #9BD3A6;
    --band: #0A0B0C;
  }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--text); --line-soft: var(--line); --grid: transparent; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--fh);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
  margin: 0 0 .5em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(2.25rem, 4.6vw + 1rem, 4.6rem); }
h2 { font-size: clamp(1.75rem, 2.4vw + 1rem, 3rem); }
h3 { font-size: 1.375rem; font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; box-shadow: 0 0 0 8px var(--accent); }
.band :focus-visible, .site-footer :focus-visible { outline-color: var(--on-band); }
.mono { font-family: var(--fm); font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; background: var(--accent); color: #1B1E21; padding: 12px 16px; font-weight: 600; border: 2px solid #1B1E21; }
.skip:focus { top: 8px; }

.container { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 780px; }
.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 2px solid var(--line); }
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; background: #FFFFFF; padding: 2px 4px; }
.brand img { width: 150px; height: auto; }
.nav-toggle {
  min-height: 48px; min-width: 96px; padding: 0 16px;
  font: 600 1rem/1 var(--fh); text-transform: uppercase; letter-spacing: .06em;
  background: var(--primary); color: var(--on-primary); border: 2px solid var(--primary); border-radius: 2px; cursor: pointer;
}
.nav { display: none; width: 100%; padding-bottom: 16px; }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0 0 12px; padding: 0; border-top: 2px solid var(--line); }
.nav li { border-bottom: 1px solid var(--line-soft); }
.nav a:not(.btn) {
  display: flex; align-items: center; min-height: 56px;
  font: 500 1.0625rem/1.2 var(--fh); text-transform: uppercase; letter-spacing: .05em;
  color: var(--text); text-decoration: none;
}
.nav a[aria-current="page"]:not(.btn) { box-shadow: inset 6px 0 0 var(--accent); padding-left: 14px; }
@media (min-width: 1140px) {
  .hdr { flex-wrap: nowrap; }
  .nav-toggle { display: none; }
  .nav, .nav.open { display: flex; align-items: center; gap: 20px; width: auto; padding: 0; }
  .nav ul { display: flex; gap: 18px; margin: 0; border: 0; }
  .nav li { border: 0; }
  .nav a:not(.btn) { min-height: 48px; font-size: .95rem; border-bottom: 4px solid transparent; padding-top: 4px; }
  .nav a:not(.btn):hover { border-bottom-color: var(--line-soft); }
  .nav a[aria-current="page"]:not(.btn) { box-shadow: none; padding-left: 0; border-bottom-color: var(--accent); }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 24px;
  font: 600 1.0625rem/1.1 var(--fh); text-transform: uppercase; letter-spacing: .06em; text-align: center;
  color: var(--text); background: transparent; border: 2px solid var(--line); border-radius: 2px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover { background: #2A2F33; color: #FFD23F; }
@media (prefers-color-scheme: dark) { .btn-primary:hover { background: #FFE07A; color: #1B1E21; } }
.btn-sm { min-height: 48px; font-size: .95rem; padding: 0 16px; }
.btn[disabled], .btn[aria-disabled="true"] { background: #6B7075; border-color: #6B7075; color: #FFFFFF; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 8px; }
@media (min-width: 640px) { .btn { width: auto; } }
.textbtn { background: none; border: 0; padding: 0 2px; min-height: 48px; font: inherit; color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }

/* Station marker (stake flag) */
.sta {
  display: inline-flex; align-items: center; gap: 0;
  font: 500 .875rem/1 var(--fm); letter-spacing: .04em;
  margin: 0 0 18px; color: #1B1E21;
}
.sta::before { content: ""; width: 4px; height: 28px; background: var(--line); }
.sta span { background: var(--accent); border: 2px solid var(--line); border-left: 0; padding: 5px 10px; }
.eyebrow { font: 500 .875rem/1.4 var(--fm); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }

/* Home road: lane line in the left gutter on phone, horizontal dividers on desktop */
.road { position: relative; }
.road::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 4px;
  background-color: var(--asphalt);
  background-image: repeating-linear-gradient(to bottom, var(--lane) 0 8px, transparent 8px 16px);
  border-inline: 3px solid var(--asphalt); box-sizing: content-box;
}
.road > .sec > .container, .road > .hero .hero-text { padding-left: max(30px, var(--pad)); }
@media (min-width: 900px) {
  .road::before { display: none; }
  .road > .sec > .container, .road > .hero .hero-text { padding-left: var(--pad); }
  .road > .sec + .sec::before, .road > .hero + .sec::before {
    content: ""; display: block; height: 4px; margin-bottom: 72px;
    background-color: var(--asphalt);
    background-image: repeating-linear-gradient(to right, var(--lane) 0 32px, transparent 32px 56px);
    border-block: 4px solid var(--asphalt); box-sizing: content-box;
  }
  .road > .sec { padding-top: 0; }
}
.sec { padding: 56px 0; }
@media (min-width: 900px) { .sec { padding: 88px 0; } }
.sec-head { max-width: 760px; margin-bottom: 32px; }
.sec-head p { font-size: 1.1875rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 2px solid var(--line); background: var(--bg); }
.hero > * { min-width: 0; }
.hero-text { padding: 40px var(--pad) 40px; }
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: 1.25rem; max-width: 36rem; }
.hero-figure { margin: 0; border-top: 2px solid var(--line); background: var(--surface); }
.hero-figure img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .hero-text, .road > .hero .hero-text { padding: 72px 40px 72px max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad))); align-self: center; }
  .hero-figure { border-top: 0; border-left: 2px solid var(--line); }
  .hero-figure img { aspect-ratio: auto; min-height: 100%; }
}

/* Panels & cards */
.panel { background: var(--surface); border: 2px solid var(--line); padding: 20px; }
@media (min-width: 700px) { .panel { padding: 28px; } }
.sheet {
  background-color: var(--surface);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.card { background: var(--surface); border: 2px solid var(--line); border-top-width: 10px; padding: 22px; display: flex; flex-direction: column; }
.card:hover { border-top-color: var(--accent); }
.card h3 { margin-top: 6px; }
.card .meta { font: 500 .8125rem/1.3 var(--fm); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.card p:last-child { margin-bottom: 0; }
.card .go { margin-top: auto; padding-top: 8px; font-weight: 600; }
.card .go a { display: inline-flex; align-items: center; min-height: 48px; }
.num { font: 500 .875rem/1 var(--fm); display: inline-block; border: 2px solid var(--line); padding: 6px 8px; margin-bottom: 14px; }
.problem li { list-style: none; }
.plain { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; color: var(--ok); }
.crosses li::before { content: "✕"; color: var(--over); }

/* Steps */
.steps { counter-reset: s; }
.step { border: 2px solid var(--line); background: var(--surface); padding: 22px; }
.step .num { background: var(--accent); color: #1B1E21; border-color: #1B1E21; }

/* Roadmap track */
.track { list-style: none; margin: 0; padding: 0 0 0 40px; position: relative; display: grid; gap: 20px; }
.track::before {
  content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 4px;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 8px, transparent 8px 16px);
}
.track li { position: relative; background: var(--surface); border: 2px solid var(--line); padding: 20px; min-width: 0; }
.track li.later, .track li.next { border-style: dashed; }
.track li::before { content: ""; position: absolute; left: -38px; top: 22px; width: 24px; height: 24px; border: 3px solid var(--line); background: var(--bg); }
.track li.now::before { background: var(--accent); border-color: #1B1E21; }
.track h3 { margin: 8px 0 8px; }
.track p:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .track { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 44px 0 0; }
  .track::before { left: 0; right: 0; top: 14px; bottom: auto; width: auto; height: 4px; background-image: repeating-linear-gradient(to right, var(--line) 0 12px, transparent 12px 24px); }
  .track li::before { left: 18px; top: -42px; }
}
.badge { display: inline-block; font: 500 .8125rem/1 var(--fm); text-transform: uppercase; letter-spacing: .08em; padding: 6px 8px; border: 2px solid var(--line); }
.badge.free { color: var(--ok); border-color: var(--ok); }
.badge.coming, .badge.next, .badge.later { border-style: dashed; }
.badge.now { background: var(--accent); color: #1B1E21; border-color: #1B1E21; }

/* Plans */
.plan { border: 2px solid var(--line); background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.plan.coming { border-style: dashed; background: transparent; }
.plan .price { font: 700 2.5rem/1 var(--fh); text-transform: uppercase; margin: 8px 0 12px; }
.plan .btn { margin-top: auto; }

/* Asphalt band (early access) */
.band { background: var(--band); color: var(--on-band); border-top: 6px solid var(--accent); }
.band h2 { color: var(--on-band); }
.band p, .band label { color: var(--on-band); }
.band .consent, .band .note { color: var(--band-muted); }
.band a { color: #FFD23F; }
.band .btn-primary { background: #FFD23F; color: #1B1E21; border-color: #FFD23F; }
.band .btn-primary:hover { background: #FFE07A; }
.band input { background: #FFFFFF; color: #1B1E21; border-color: #FFFFFF; }
.band .sta { color: #1B1E21; }
.band .sta::before { background: #F4F2ED; }
.band .sta span { border-color: #F4F2ED; }
.ea-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ea-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }
.strip { padding: 40px 0; }
.strip .container { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.strip h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem); margin: 0 0 4px; }
.strip p { margin: 0; }

/* Forms */
.field { margin-bottom: 18px; min-width: 0; }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-size: .975rem; color: var(--muted); margin: -2px 0 8px; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], textarea, select {
  width: 100%; max-width: 100%; min-height: 48px;
  font: 400 1.0625rem/1.4 var(--fb); color: var(--text);
  background: var(--surface); border: 2px solid var(--line); border-radius: 2px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 220px; }
input::placeholder, textarea::placeholder { color: #6A6F74; opacity: 1; }
@media (prefers-color-scheme: dark) { input::placeholder, textarea::placeholder { color: #A3A8AE; } }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--over); border-width: 3px; }
.err { color: var(--over); font-weight: 600; font-size: .975rem; margin: 6px 0 0; }
.err:empty { display: none; }
.band .err { color: #FFB4AB; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 10px 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 400; margin: 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: #1B1E21; }
@media (prefers-color-scheme: dark) { .check input { accent-color: #FFD23F; } }
.check strong { display: block; }
.checks { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .checks.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.counter { font: 500 .9rem/1 var(--fm); }
.counter.near { font-weight: 700; }
.counter.over { color: var(--over); font-weight: 700; }
.row-between { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.formmsg { margin-top: 16px; padding: 14px 16px; border: 2px solid currentColor; font-weight: 600; }
.formmsg:empty { display: none; }
.formmsg.ok { color: var(--ok); }
.formmsg.bad { color: var(--over); }
.band .formmsg.ok { color: #B9E4C2; }
.band .formmsg.bad { color: #FFB4AB; }
.success { border: 2px solid var(--ok); color: var(--text); background: var(--surface); padding: 20px; }
.success strong { color: var(--ok); }
.success-line { margin: 8px 0 0; }
.hero-figure { position: relative; z-index: 1; }
.band .success { background: transparent; border-color: #B9E4C2; color: var(--on-band); }
.band .success strong { color: #B9E4C2; }
.consent { font-size: .975rem; margin-top: 12px; }

/* Notes / callouts */
.note { border-left: 6px solid var(--line); background: var(--bg); padding: 14px 16px; margin: 16px 0; font-size: 1rem; }
.panel .note { background: transparent; }
.note.legal { border-left-color: var(--under); }
.note.warn { border-left-color: var(--over); }
.banner { display: inline-block; background: var(--accent); color: #1B1E21; border: 2px solid #1B1E21; padding: 6px 12px; font-weight: 600; font-size: .975rem; }
.banner[hidden] { display: none; }
.stamp {
  display: inline-block; font: 500 .875rem/1.2 var(--fm); text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent); color: #1B1E21; border: 2px solid #1B1E21; padding: 8px 12px; margin-bottom: 14px; transform: rotate(-1.2deg);
}

/* Tool layout */
.tool-head { padding: 28px 0 8px; }
.crumbs { font: 500 .875rem/1.4 var(--fm); margin-bottom: 12px; }
.crumbs a { color: var(--text); }
.tool-intro { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.tool-intro > * { min-width: 0; }
.tool-intro figure { margin: 0; border: 2px solid var(--line); background: var(--surface); }
.tool-intro figure img { width: 100%; }
@media (min-width: 860px) { .tool-intro { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
@media (max-width: 859px) {
  /* Phone/tablet: the figure is capped at 340px of image so the 600w file in srcset is chosen (sizes="… 340px"). */
  .tool-intro figure { max-width: 344px; }
  .tool-intro figure img { aspect-ratio: 16 / 9; object-fit: cover; }
}
.tool-intro .sub { font-size: 1.25rem; }
.tool-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.tool-grid > * { min-width: 0; }
@media (min-width: 1024px) { .tool-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tool-grid .sticky { position: sticky; top: 92px; } }
.result-empty { color: var(--muted); border: 2px dashed var(--line-soft); padding: 24px; }
.result h2 { font-size: 1.75rem; }
.report section { border-top: 2px solid var(--line); padding: 14px 0 6px; }
.report h3 { font-size: 1.0625rem; letter-spacing: .06em; margin-bottom: 8px; }
.report ul { margin: 0 0 8px; }
.report .none { color: var(--muted); font-style: italic; }
.report .meta { font: 500 .875rem/1.4 var(--fm); color: var(--muted); }
.qty-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.qty-table th, .qty-table td { border: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.qty-table th { font: 600 .8125rem/1.2 var(--fm); text-transform: uppercase; letter-spacing: .04em; background: var(--bg); }
.qty-table td.n { font-family: var(--fm); text-align: right; white-space: nowrap; }
.tablewrap { max-width: 100%; overflow-x: auto; }
.links-row { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 0; list-style: none; }
.links-row a { display: inline-flex; min-height: 48px; align-items: center; font-weight: 600; }

/* Quantity Check rows */
.qrow-head { display: none; }
.qrow { border: 2px solid var(--line); background: var(--surface); padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; grid-template-columns: minmax(0, 3fr) minmax(0, 3.5fr) minmax(0, 3.5fr); }
.qrow > * { min-width: 0; }
.qrow .rn { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; font: 500 .875rem/1 var(--fm); }
.qrow .f-item { grid-column: 1 / -1; }
.qrow label { font-size: .95rem; margin-bottom: 4px; }
.qrow input { font-family: var(--fb); }
.qrow input.numin { font-family: var(--fm); text-align: right; }
.qrow .err { font-size: .875rem; }
.rm { min-height: 48px; min-width: 48px; padding: 0 12px; background: transparent; border: 2px solid var(--line); border-radius: 2px; color: var(--text); font: 600 .9rem/1 var(--fb); cursor: pointer; }
@media (min-width: 900px) {
  .qrow-head, .qrow { grid-template-columns: 56px minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr) 104px; align-items: start; }
  .qrow-head { display: grid; gap: 10px; padding: 0 16px 8px; font: 600 .8125rem/1.2 var(--fm); text-transform: uppercase; letter-spacing: .04em; }
  .qrow { margin-bottom: 0; border-top-width: 0; padding: 10px 14px; }
  .qrow:first-of-type { border-top-width: 2px; }
  .qrow .rn { grid-column: auto; padding-top: 16px; }
  .qrow .rn .rm { display: none; }
  .qrow .f-item { grid-column: auto; }
  .qrow label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .qrow .rm-wide { display: inline-flex !important; align-items: center; justify-content: center; }
}
.rm-wide { display: none !important; }
.st { font: 600 .9375rem/1.2 var(--fm); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.st-over { color: var(--over); }
.st-under { color: var(--under); }
.st-ok { color: var(--ok); }
.st-none { color: var(--text); }
.res-table { width: 100%; border-collapse: collapse; }
.res-table th, .res-table td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.res-table th { font: 600 .8125rem/1.2 var(--fm); text-transform: uppercase; background: var(--bg); }
.res-table td.diff { font-family: var(--fm); white-space: nowrap; }
.res-table tr.r-over td:first-child { box-shadow: inset 6px 0 0 var(--over); }
.res-table tr.r-under td:first-child { box-shadow: inset 6px 0 0 var(--under); }
.res-table tr.r-ok td:first-child { box-shadow: inset 6px 0 0 var(--ok); }
.res-table tr.r-none td:first-child { box-shadow: inset 6px 0 0 var(--line-soft); }
@media (max-width: 759px) {
  .res-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .res-table, .res-table tbody, .res-table tr, .res-table td { display: block; width: 100%; }
  .res-table tr { border: 2px solid var(--line); margin-bottom: 12px; background: var(--surface); }
  .res-table td { border: 0; border-bottom: 1px solid var(--line-soft); padding: 8px 12px 8px 16px; }
  .res-table td:last-child { border-bottom: 0; }
  .res-table td[data-label]::before { content: attr(data-label); display: block; font: 600 .75rem/1.3 var(--fm); text-transform: uppercase; color: var(--muted); }
  .res-table tr.r-over { border-left: 8px solid var(--over); }
  .res-table tr.r-under { border-left: 8px solid var(--under); }
  .res-table tr.r-ok { border-left: 8px solid var(--ok); }
  .res-table tr td:first-child { box-shadow: none !important; }
}
.summary { font: 600 1rem/1.4 var(--fm); margin: 6px 0 14px; }
.chart { margin: 18px 0; border: 2px solid var(--line); background: var(--surface); padding: 12px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.chart .c-band { fill: var(--accent); opacity: .45; }
.chart .c-axis { stroke: var(--text); stroke-width: 2; }
.chart text { fill: var(--text); font-family: var(--fm); font-size: 13px; }
.chart .c-label { font-family: var(--fb); font-size: 14px; }
.chart .c-over { fill: var(--over); }
.chart .c-under { fill: var(--under); }
.chart .c-ok { fill: var(--ok); }
.grid + p, .grid + .note { margin-top: 24px; }
h2.h3 { font-size: 1.375rem; font-weight: 600; }
.panel + .panel { margin-top: 24px; }
.tool-grid > .panel + .panel, .grid > .panel + .panel { margin-top: 0; }
.track ul { margin: 0; padding-left: 1.1em; }
.report.meta { margin-bottom: 8px; }
.formula { font: 500 1rem/1.5 var(--fm); background: var(--surface); border: 2px solid var(--line); padding: 12px 14px; overflow-wrap: anywhere; }

/* Pavement photo */
.drop { border: 3px dashed var(--line); padding: 18px; background: var(--bg); }
.drop .btn-row { margin: 10px 0; }
.file-btn { position: relative; }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--text); outline-offset: 2px; box-shadow: 0 0 0 8px var(--accent); }
.preview { margin: 14px 0 0; border: 2px solid var(--line); background: var(--surface); }
.preview img { width: 100%; max-height: 420px; object-fit: contain; background: #1B1E21; }
.preview figcaption { padding: 8px 12px; font-size: .95rem; }
.preview[hidden] { display: none; }
.guide-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.guide-grid > * { min-width: 0; }
.guide-grid figure { margin: 0; border: 2px solid var(--line); background: var(--surface); }
@media (min-width: 860px) { .guide-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
dl.terms dt { font: 600 1.125rem/1.2 var(--fh); text-transform: uppercase; letter-spacing: .03em; margin-top: 16px; }
dl.terms dd { margin: 4px 0 0; }

/* FAQ */
.faq details { border: 2px solid var(--line); background: var(--surface); margin-bottom: -2px; }
.faq summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; cursor: pointer; font: 600 1.125rem/1.25 var(--fh); text-transform: uppercase; letter-spacing: .02em; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.5rem/1 var(--fm); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 16px 16px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* About */
.about-top { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.about-top > * { min-width: 0; }
.about-top figure { margin: 0; border: 2px solid var(--line); background: var(--surface); }
@media (min-width: 900px) { .about-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.lead { font-size: 1.25rem; }

/* Legal */
.legal-doc { max-width: 760px; }
.legal-doc h2 { font-size: 1.625rem; margin-top: 1.6em; }
.legal-doc .eff { font: 500 .9rem/1.4 var(--fm); }

/* 404 */
.lost { text-align: center; padding: 40px 0 72px; }
.lost figure { margin: 0 auto 28px; max-width: 760px; border: 2px solid var(--line); background: var(--surface); }
.lost h1 { max-width: 18ch; margin-inline: auto; }
.lost .btn-row { justify-content: center; }

/* Footer */
.site-footer { background: var(--band); color: var(--on-band); padding: 48px 0 28px; border-top: 6px solid var(--accent); }
.site-footer a { color: #FFD23F; }
.ft-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.ft-grid > * { min-width: 0; }
@media (min-width: 700px) { .ft-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.ft-h { font-size: 1rem; letter-spacing: .08em; color: #F4F2ED; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .brand { margin-bottom: 12px; }
.ft-mail { overflow-wrap: anywhere; }
.ft-mail a { display: inline-block; padding: 6px 0; }
.ft-small { color: var(--band-muted); font-size: .975rem; border-top: 1px solid #4A4F55; padding-top: 18px; margin: 28px 0 6px; }
.ft-copy { font: 500 .875rem/1.5 var(--fm); color: #F4F2ED; margin: 0; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; background: #FFD23F; color: #1B1E21; border: 2px solid #1B1E21; padding: 12px 20px; font-weight: 600; }
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .card, .nav a { transition: background-color .12s, border-color .12s, color .12s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp { transform: none; }
}
@media print {
  .site-header, .site-footer, .band, .btn, .faq, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
