/* Report Your Road SA
   Visual language borrowed from Australian road signage (AS 1743 / AS 1742):
   warning-sign amber on asphalt, green guide signs for state roads, blue service signs for councils,
   brown tourist-sign tone for the outback. Barlow is drawn from highway sign lettering. */

@font-face { font-family: 'Barlow Condensed'; src: url('/assets/fonts/BarlowCondensed-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/assets/fonts/BarlowCondensed-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/assets/fonts/BarlowCondensed-ExtraBold.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --amber: #FFC20E;
  --amber-deep: #E9AE00;
  --asphalt: #23272B;
  --bitumen: #353B41;
  --aggregate: #8A9198;
  --kerb: #E6E9E6;
  --paper: #FFFFFF;
  --green: #00703C;
  --blue: #0A4DA2;
  --brown: #7A4A24;
  --red: #C8102E;
  --muted: #565D64;

  --display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wrap: 1180px;
  --radius-sign: 7px;
  --radius-field: 4px;
  --header-h: 108px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--asphalt);
  background: var(--kerb);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: #073a7a; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; box-shadow: 0 0 0 5px var(--asphalt); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Header ---------- */
.site-header { background: var(--asphalt); color: #fff; position: sticky; top: 0; z-index: 50; transition: box-shadow .2s ease; }
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 20px rgba(0, 0, 0, .35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: block; }
.brand img { height: 76px; width: auto; }
.site-header nav { display: flex; gap: 1.5rem; }
.nav-short { display: none; }
.site-header nav a {
  color: #fff; text-decoration: none; font-family: var(--display); font-weight: 700;
  font-size: 1.2rem; letter-spacing: .01em; padding: .35rem 0; border-bottom: 3px solid transparent;
}
.site-header nav a:hover { border-bottom-color: var(--aggregate); color: #fff; }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--amber); }

/* ---------- Hero: the one loud moment ---------- */
.hero { background: var(--asphalt); color: #fff; }
.hero-inner {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.25rem);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero-copy { min-width: 0; }
.hero-mark { width: clamp(220px, 25vw, 330px); height: auto; display: block; cursor: pointer; overflow: visible; }

/* Hero sign: the road cracks and the broken bitumen falls away, once, on load. Ends exactly on the static logo.
   Timeline: 0.5s cracks draw -> 0.95s sign jolts -> 1.05s pieces start falling (staggered) -> ~1.9s done. */
.hm-sign, .hm-piece { transform-box: fill-box; transform-origin: 50% 50%; }
.hm-sign { animation: hm-jolt .32s ease-out .95s both; }
.hm-crack { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hm-crack 1.3s ease-out .5s both; }
.hm-l1, .hm-l2, .hm-l3 { animation: hm-fall-l .62s cubic-bezier(.45, 0, .85, .55) both; }
.hm-r1, .hm-r2, .hm-r3 { animation: hm-fall-r .62s cubic-bezier(.45, 0, .85, .55) both; }
.hm-l2 { animation-delay: 1.05s; } .hm-r2 { animation-delay: 1.12s; } .hm-l1 { animation-delay: 1.18s; }
.hm-r3 { animation-delay: 1.24s; } .hm-l3 { animation-delay: 1.3s; }  .hm-r1 { animation-delay: 1.36s; }
@keyframes hm-crack { 0% { stroke-dashoffset: 1; opacity: 1; } 35% { stroke-dashoffset: 0; opacity: 1; } 70% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hm-jolt {
  0% { transform: none; } 25% { transform: translate(-1px, .6px) rotate(-.7deg); }
  55% { transform: translate(.9px, -.4px) rotate(.5deg); } 80% { transform: translate(-.3px, 0) rotate(-.15deg); } 100% { transform: none; }
}
@keyframes hm-fall-l {
  0% { transform: none; opacity: 1; } 18% { transform: translate(-.7px, .5px) rotate(-5deg); opacity: 1; }
  100% { transform: translate(-10px, 24px) rotate(-40deg); opacity: 0; }
}
@keyframes hm-fall-r {
  0% { transform: none; opacity: 1; } 18% { transform: translate(.7px, .5px) rotate(5deg); opacity: 1; }
  100% { transform: translate(10px, 24px) rotate(40deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-pieces, .hm-cracks { display: none; }       /* show the finished logo, no movement */
  .hm-sign { animation: none; }
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.9rem, 7.2vw, 5.75rem);
  line-height: .9; letter-spacing: -.01em; margin: 0 0 1.25rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #CDD1D5; max-width: 52ch; margin: 0 0 1.25rem; }
.tally { margin: 0; color: #CDD1D5; }
.nowrap { white-space: nowrap; }
.pill-cta {
  display: inline-block; vertical-align: .08em; margin-left: .4rem;
  font-family: var(--display); font-weight: 800; font-size: .95rem; line-height: 1; letter-spacing: .06em;
  color: var(--asphalt); background: var(--amber); text-decoration: none;
  padding: .42rem .85rem .38rem; border-radius: 999px; box-shadow: 0 2px 0 #B98900;
}
.pill-cta:hover { background: var(--amber-deep); color: var(--asphalt); }
.pill-cta:active { transform: translateY(1px); box-shadow: 0 1px 0 #B98900; }
.pill-cta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: none; }
.tally strong { font-family: var(--display); font-size: 1.5rem; color: var(--amber); font-weight: 800; }
.tally a { color: #fff; }

/* The road itself: amber edge line, then the dashed white centre line on bitumen */
.roadline {
  height: 34px;
  background:
    linear-gradient(var(--amber), var(--amber)) top / 100% 5px no-repeat,
    linear-gradient(90deg, #F4F4F0 0 55%, transparent 55% 100%) center / 84px 5px repeat-x,
    var(--bitumen);
}

/* The pixel car on the road strip. Drives across, leaves, comes back; bounces like it's on a rough road.
   Size: --car-px = screen pixels per art pixel. Keep it a whole number so the pixels stay crisp
   (3 = small, 4, 5, 6 = current). The car art is 28 x 10 pixels including the exhaust puff. */
.roadline { position: relative; --car-px: 6px; }
.car-track { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--car-px) * 10 + 60px); overflow: hidden; pointer-events: none; }
.car-mover {
  /* Tyres run in the upper lane (between the amber edge line and the dashed centre line): driving on the left, heading right */
  position: absolute; bottom: 20px; left: calc(var(--car-px) * -28 - 12px); width: calc(100% + var(--car-px) * 28 + 12px);
  animation: car-drive 18s linear 1.2s infinite both;
}
.car, .car-svg { width: calc(var(--car-px) * 28); }
.car-svg { display: block; height: calc(var(--car-px) * 10); image-rendering: pixelated; overflow: visible; }
.car-body { animation: car-bump 1.15s steps(1, end) infinite; }
.car-wheels { animation: car-wheel 1.15s steps(1, end) infinite; }
.puff { fill: #8A9198; opacity: 0; }
.puff.p1 { animation: car-puff 1.15s steps(4, end) infinite; }
.puff.p2 { animation: car-puff 1.15s steps(4, end) .55s infinite; }
@keyframes car-drive {
  0%   { transform: translateX(0); }
  62%  { transform: translateX(100%); }    /* across in about 11 s, then a pause off-screen */
  100% { transform: translateX(100%); }
}
/* Body jolts in whole pixels (1 SVG pixel = 3 screen px): small chatter plus the odd pothole thump */
@keyframes car-bump {
  0%   { transform: translateY(0); }
  8%   { transform: translateY(-1px); }
  14%  { transform: translateY(0); }
  30%  { transform: translateY(-1px); }
  34%  { transform: translateY(0); }
  52%  { transform: translateY(-2px) rotate(-3deg); }
  58%  { transform: translateY(-1px) rotate(1deg); }
  64%  { transform: translateY(0); }
  80%  { transform: translateY(-1px); }
  86%  { transform: translateY(0); }
}
@keyframes car-wheel {
  0%   { transform: translateY(0); }
  52%  { transform: translateY(-1px); }
  58%  { transform: translateY(0); }
}
@keyframes car-puff {
  0%   { opacity: .9; transform: translate(0, 0); }
  50%  { opacity: .5; transform: translate(-2px, -1px); }
  100% { opacity: 0;  transform: translate(-4px, -2px); }
}
.car-body, .car-wheels { transform-box: fill-box; transform-origin: 50% 100%; }
.puff { transform-box: fill-box; }
.roadline.is-offscreen .car-mover, .roadline.is-offscreen .car-body, .roadline.is-offscreen .car-wheels,
.roadline.is-offscreen .puff { animation-play-state: paused; }
@media (max-width: 560px) {
  .roadline { --car-px: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .car-mover { animation: none; transform: translateX(14%); }   /* parked */
  .car-body, .car-wheels, .puff { animation: none; }
}

/* ---------- Backlog feature ---------- */
.backlog { background: var(--paper); border-bottom: 1px solid #d6dad6; }
.backlog-inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start; padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.backlog-figure {
  font-family: var(--display); font-weight: 800; font-size: clamp(3.5rem, 8vw, 6.25rem); line-height: .9;
  letter-spacing: -.01em; margin: 0 0 .9rem; color: var(--asphalt);
  padding-bottom: .5rem; border-bottom: 8px solid var(--amber); display: inline-block;
}
.backlog-label { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.15; margin: 0; max-width: 22ch; }
.backlog-copy { max-width: 62ch; padding-top: .35rem; }
.backlog-copy p { margin: 0 0 1rem; font-size: 1.1rem; }
.backlog-copy p.backlog-source { font-size: .85rem; color: var(--muted); margin: 1.25rem 0 0; }
@media (max-width: 900px) {
  .backlog-inner { grid-template-columns: 1fr; }
}

/* ---------- Report tool ---------- */
.tool { padding: clamp(1.75rem, 4vw, 3rem) 0 4rem; }
#report-form {
  display: grid; gap: 2rem 2.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
}
.step-locate { position: sticky; top: calc(var(--header-h) + 1rem); }
.steps-right { display: grid; gap: 2rem; }
.step { background: var(--paper); border-radius: 8px; padding: clamp(1.25rem, 2.5vw, 1.75rem); box-shadow: 0 1px 0 #cfd3cf, 0 0 0 1px #d6dad6; }
.step h2 {
  font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1.1;
  margin: 0 0 .5rem; display: flex; align-items: center; gap: .75rem;
}
.num {
  flex: none; width: 1.9rem; height: 1.9rem; display: grid; place-items: center;
  position: relative; font-size: 1.15rem; font-weight: 800; color: var(--asphalt); isolation: isolate;
}
.num::before {
  content: ""; position: absolute; inset: .2rem; background: var(--amber);
  border: 2px solid var(--asphalt); border-radius: 3px; transform: rotate(45deg); z-index: -1;
}
.help { margin: 0 0 1rem; color: var(--muted); }

.search-row { display: flex; gap: .6rem; margin-bottom: .75rem; }
.place-search { flex: 1; min-width: 0; }
gmp-place-autocomplete { width: 100%; color-scheme: light; }

.map-frame { border: 3px solid var(--asphalt); border-radius: 6px; overflow: hidden; background: #d9dcd9; }
.map-frame #map { height: clamp(340px, 52vh, 520px); width: 100%; }
.ryr-pin { transform: translateY(2px); filter: drop-shadow(0 2px 2px rgba(35, 39, 43, .45)); cursor: grab; }

/* Who-fixes-it panel, styled as a road sign */
.authority { margin-top: 1rem; }
.authority p { margin: .6rem 0; }
.authority.is-loading p { color: var(--muted); }
.authority.is-error p { color: var(--red); font-weight: 500; }
.sign {
  display: grid; gap: .1rem; color: #fff; padding: .9rem 1.1rem 1rem;
  border-radius: var(--radius-sign); box-shadow: inset 0 0 0 3px currentColor, inset 0 0 0 6px var(--sign-bg);
  background: var(--sign-bg);
}
.sign strong { font-family: var(--display); font-weight: 700; font-size: 1.85rem; line-height: 1.05; }
.sign span { font-size: .95rem; opacity: .92; }
.sign .sign-kicker { font-family: var(--display); font-weight: 600; font-size: 1.05rem; opacity: 1; letter-spacing: .02em; }
.sign-state { --sign-bg: var(--green); }
.sign-council { --sign-bg: var(--blue); }
.sign-outback { --sign-bg: var(--brown); }
.note { background: #FFF6D6; border-left: 4px solid var(--amber); padding: .6rem .8rem; border-radius: 0 4px 4px 0; font-size: .95rem; }
.contact { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .3rem; }
.contact a { font-weight: 600; }
.correct { margin: .75rem 0 0; }
.btn-correct { font-size: 1rem; padding: .55rem .9rem; white-space: normal; text-align: left; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .95rem; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkbtn:hover { color: #073a7a; }

/* Fields */
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend, .label { font-weight: 600; display: block; margin-bottom: .45rem; }
.opt { font-weight: 400; color: var(--muted); }
.field { display: block; margin-bottom: 1rem; }
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--asphalt); background: #fff;
  border: 2px solid #A9AFB4; border-radius: var(--radius-field); padding: .65rem .75rem;
}
input:hover, textarea:hover, select:hover { border-color: var(--aggregate); }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--asphalt); }
textarea { resize: vertical; min-height: 6rem; }
[aria-invalid="true"] { border-color: var(--red) !important; }
.field-row { display: grid; grid-template-columns: 8rem 1fr; gap: 0 .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips legend { width: 100%; }
.chip input, .sev input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: .45rem .8rem; border: 2px solid #A9AFB4; border-radius: 999px;
  cursor: pointer; font-size: .95rem; line-height: 1.25; background: #fff;
}
.chip:hover span { border-color: var(--asphalt); }
.chip input:checked + span { background: var(--asphalt); border-color: var(--asphalt); color: var(--amber); font-weight: 600; }
.chip input:checked + span::before { content: "✓"; margin-right: .35em; font-weight: 700; }
.chip input:focus-visible + span, .sev input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.severity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.severity legend { grid-column: 1 / -1; }
.sev span {
  display: block; text-align: center; padding: .6rem .4rem; border: 2px solid var(--asphalt);
  margin-left: -2px; cursor: pointer; font-weight: 500; font-size: .95rem; background: #fff; height: 100%;
}
.sev-1 span { border-radius: 4px 0 0 4px; margin-left: 0; }
.sev-3 span { border-radius: 0 4px 4px 0; }
.sev input:checked + span { background: var(--asphalt); color: var(--amber); font-weight: 700; }
.sev-3 input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }

.check { display: flex; gap: .6rem; align-items: flex-start; margin: .75rem 0; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--asphalt); flex: none; }

.field-error { color: var(--red); font-weight: 500; font-size: .95rem; margin: -.5rem 0 1rem; }
.form-error { color: #fff; background: var(--red); padding: .6rem .8rem; border-radius: 4px; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1;
  padding: .8rem 1.4rem; border-radius: 5px; border: 2px solid var(--asphalt);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--amber); color: var(--asphalt); border-color: var(--asphalt); box-shadow: 0 3px 0 var(--asphalt); }
.btn-primary:hover { background: var(--amber-deep); color: var(--asphalt); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--asphalt); }
.btn-ghost { background: #fff; color: var(--asphalt); font-size: 1.05rem; padding: .7rem 1rem; }
.btn-ghost:hover { background: var(--kerb); color: var(--asphalt); }
.btn[disabled] { opacity: .6; cursor: progress; }
#submit-btn { width: 100%; margin-top: .5rem; font-size: 1.5rem; padding: 1rem; }

/* Done: confirmation overlay */
.done-modal {
  border: 0; padding: 0; background: transparent; color: inherit;
  width: min(100% - 2rem, 720px); max-width: 720px; max-height: calc(100dvh - 2rem);
  margin: auto; overflow: visible;
}
.done-modal::backdrop { background: rgba(35, 39, 43, .78); backdrop-filter: blur(3px); }
.done-modal.done-fallback { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; width: 100%; max-width: none; max-height: none; background: rgba(35, 39, 43, .78); }
.done-card {
  position: relative; background: var(--paper); border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.5rem); max-height: calc(100dvh - 2rem); overflow-y: auto;
  border-top: 8px solid var(--amber); box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.done-fallback .done-card { width: min(100% - 2rem, 720px); }
.done-card h2 { font-family: var(--display); font-weight: 800; font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1; margin: 0 2.5rem .5rem 0; }
.done-close {
  position: absolute; top: .9rem; right: .9rem; width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 2px solid var(--asphalt); border-radius: 50%; background: #fff; color: var(--asphalt); cursor: pointer;
}
.done-close:hover { background: var(--kerb); }
.done-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.modal-open, .modal-open body { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .done-modal[open] .done-card { animation: done-in .22s ease-out; }
  .done-modal[open]::backdrop { animation: done-fade .22s ease-out; }
}
@keyframes done-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes done-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Public map ---------- */
.map-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 520px; }
.map-panel { background: var(--paper); padding: 1.5rem; overflow-y: auto; border-right: 3px solid var(--asphalt); }
.map-panel h1 { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; margin: 0 0 .75rem; }
.big-count { margin: 0 0 1.5rem; }
.big-count strong { display: block; font-family: var(--display); font-weight: 800; font-size: 3.25rem; line-height: 1; }
.legend label { display: flex; align-items: center; gap: .55rem; margin: .4rem 0; cursor: pointer; }
.legend input { accent-color: var(--asphalt); width: 1.1rem; height: 1.1rem; }
.legend b { margin-left: auto; font-family: var(--display); font-size: 1.15rem; }
.dot { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--asphalt); }
.dot-state { background: var(--green); } .dot-council { background: var(--blue); } .dot-outback { background: var(--brown); }
.map-full { width: 100%; height: 100%; min-height: 0; }
.panel-auth { margin-top: 2rem; }
.cluster {
  display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--asphalt);
  border: 3px solid var(--asphalt); font-family: var(--display); font-weight: 800; font-size: 1rem;
  box-shadow: 0 2px 4px rgba(35, 39, 43, .35);
}
.iw { display: grid; gap: .15rem; font-family: var(--body); font-size: .95rem; padding-right: .5rem; }
.iw strong { font-family: var(--display); font-size: 1.3rem; }
.iw-auth { color: var(--c); font-weight: 600; }

/* ---------- Prose pages ---------- */
.prose { background: var(--paper); max-width: 760px; margin: 2.5rem auto 4rem; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 8px; }
.prose h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.25rem, 5vw, 3rem); line-height: 1; margin-top: 0; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin: 2rem 0 .5rem; }

/* ---------- Pothole Dodge ---------- */
.page-game { background: var(--asphalt); }
.game-page { color: #fff; padding: clamp(1.5rem, 4vw, 3rem) 0 3rem; }
.game-page .wrap { max-width: 960px; }
.game-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: .95; margin: 0; }
.game-sub { color: #CDD1D5; margin: .4rem 0 1.25rem; font-size: 1.1rem; }
.game { position: relative; border: 3px solid #000; border-radius: 8px; overflow: hidden; background: #23272B;
  box-shadow: 0 0 0 2px var(--amber), 0 14px 40px rgba(0,0,0,.45); }
.game-hud { display: flex; align-items: center; gap: 1.1rem; padding: .5rem .8rem; background: #1A1D20;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; color: #CDD1D5; }
.game-hud b { color: var(--amber); font-weight: 800; font-size: 1.3rem; }
.hud-best { margin-left: auto; }
.hud-pause { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid #5E656C; border-radius: 6px;
  background: transparent; color: #fff; cursor: pointer; }
.game:not(.is-playing) .hud-pause { visibility: hidden; }
.game.is-playing .game-stage { touch-action: none; }   /* dragging steers the car instead of scrolling the page */
.game-stage { position: relative; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; }
#game-canvas { display: block; width: 100%; image-rendering: pixelated; outline: none; }
.game-ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: .5rem; padding: 1rem; background: rgba(23, 26, 29, .72); }
.game-ov[hidden] { display: none; }
.ov-big { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1; margin: 0; }
.ov-help { margin: 0 0 .4rem; color: #CDD1D5; }
.ov-kicker { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 3.5vw, 1.8rem); color: var(--amber); margin: 0; letter-spacing: .02em; }
.ov-score { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.2rem, 3vw, 1.6rem); }
.ov-score b { font-size: clamp(2.6rem, 8vw, 4rem); font-weight: 800; line-height: 1; vertical-align: -.12em; }
.ov-meta { margin: 0; color: #CDD1D5; font-size: .95rem; }
.ov-pitch { margin: .2rem 0 .3rem; font-weight: 600; }
.ov-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.game-ov .btn { font-size: 1.1rem; padding: .65rem 1.1rem; }
.game-ov .btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.game-ov .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.game-notes { margin-top: 1.25rem; color: #CDD1D5; max-width: 70ch; }
.game-notes a { color: var(--amber); }
.only-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .only-touch { display: inline; } .only-mouse { display: none; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .game-hud { gap: .7rem; font-size: 1rem; padding: .4rem .6rem; }
  .game-hud b { font-size: 1.1rem; }
  .game-ov { gap: .3rem; padding: .5rem; }
  .ov-pitch, .ov-meta { font-size: .85rem; }
  .game-ov .btn { font-size: .98rem; padding: .5rem .8rem; }
  .ov-score b { font-size: 2.2rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--asphalt); color: #B9BEC3; padding: 2rem 0 2.5rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .auth { color: #fff; font-weight: 500; }
.page-map .site-footer { display: none; }   /* map fills the screen; authorisation shown in the panel instead */

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  #report-form { grid-template-columns: 1fr; }
  .step-locate { position: static; }
  .map-layout { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; min-height: 0; }
  .map-panel { border-right: 0; border-top: 3px solid var(--asphalt); order: 2; }
  .page-map .site-footer { display: block; }
}
@media (max-width: 560px) {
  /* Phones: one compact row so the sticky header doesn't eat the screen */
  :root { --header-h: 72px; }
  .header-inner { gap: .75rem; }
  .brand img { height: 52px; }
  .site-header nav { gap: .9rem; }
  .site-header nav a { font-size: 1.05rem; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .search-row { flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .severity { grid-template-columns: 1fr; }
  .sev span, .sev-1 span, .sev-3 span { border-radius: 0; margin-left: 0; margin-top: -2px; }
  .sev-1 span { border-radius: 4px 4px 0 0; margin-top: 0; }
  .sev-3 span { border-radius: 0 0 4px 4px; }
}
@media (max-width: 359px) {
  .brand img { height: 46px; }
  .site-header nav { gap: .7rem; }
  .site-header nav a { font-size: .98rem; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
  * { scroll-behavior: auto !important; transition: none !important; }
}
