/* Sky: the public site's theme (design-language.md, "Public site: Sky").
   Blueberry bands on a pale mist page with deep navy text. Yellow is the action and the progress bar.
   Loaded on public pages after app.css; the staff workspace does not load it. Layout stays compact:
   no card around the form, one-column steps with no side panel, and Continue fixed to the bottom of the screen on phones. */
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 800 900; font-display: swap; src: url('/vendor/fonts-overpass/overpass-latin-800-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Overpass'; font-style: normal; font-weight: 800 900; font-display: swap; src: url('/vendor/fonts-overpass/overpass-latin-ext-800-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---- tokens ---- */
body.public { --display: "Overpass", var(--sans); --band: #121D33; --band-ink: #FFFFFF; --r-ui: 8px; --r-sky: var(--r-ui); --r-sky-in: var(--r-ui); --radius: var(--r-ui); --r-sm: var(--r-ui);
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2310203A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7.5 10 13l5.5-5.5'/%3E%3C/svg%3E");
  --chev-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 7.5 10 13l5.5-5.5'/%3E%3C/svg%3E"); }
/* One radius for everything you can click or type in on the public site (--r-ui). Only true circles (progress dot, status badge) stay round. */
body.public :is(.btn, .pill, .sizes, .iconbtn, .choice, .radio, .chip, .badge, .ptag, .lens, .tag-mode, .jur-chip, .tracker em, .rv header a) { border-radius: var(--r-ui); }
body.public .sz { border-radius: calc(var(--r-ui) - 3px); }
@media (prefers-color-scheme: light) { html:not([data-theme="dark"]) body.public { --bg: #EDF2F5; --bg-2: #F6F9FA; --ink: #10203A; --ink-2: #2B3B55; --ink-3: #475063; --border: rgba(16,32,58,.3); --hairline: rgba(16,32,58,.14); --hover: rgba(16,32,58,.06); --input-border: #10203A; --card-solid: #FFFFFF; --band: #1F3050; } }
html[data-theme="light"] body.public { --bg: #EDF2F5; --bg-2: #F6F9FA; --ink: #10203A; --ink-2: #2B3B55; --ink-3: #475063; --border: rgba(16,32,58,.3); --hairline: rgba(16,32,58,.14); --hover: rgba(16,32,58,.06); --input-border: #10203A; --card-solid: #FFFFFF; --band: #1F3050; }

/* ---- type ---- */
body.public h1, body.public h2, body.public .product { font-family: var(--display); }
body.public h1 { font-weight: 900; letter-spacing: -.015em; }
body.public h2 { font-weight: 800; }

/* ---- chrome: black emergency strip, white header with a rule ---- */
body.public header.top { background: var(--card-solid); border-bottom: 3px solid var(--ink); }
body.public header.top .bar { padding-top: 12px; padding-bottom: 12px; }
body.public main { padding-top: 0; }
body.public main > :first-child { margin-top: 24px; }
body.home main > :first-child, body.report main > :first-child { margin-top: 0; }

/* ---- controls: rounded rectangles, 56 px tall, strong borders ---- */
body.public .btn { border-radius: var(--r-sky); min-height: 56px; padding: 12px 24px; font-size: 1.0625rem; font-weight: 800; }
body.public .btn.small { min-height: 44px; padding: 8px 16px; font-size: .95rem; }
body.public .btn-ghost { border-color: var(--ink); }
body.public .btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
body.public input[type=text], body.public input:not([type]), body.public input[type=email], body.public input[type=tel], body.public input[type=date], body.public input[type=time], body.public input[type=number], body.public select, body.public textarea { border-width: 2px; border-radius: var(--r-sky-in); min-height: 56px; }
body.public .glass { border-radius: var(--r-sky); }

/* ---- full-bleed bands: painted with a spread shadow so the markup stays inside .wrap ---- */
/* Full-bleed bands are a pseudo-element as wide as the window (not a spread shadow clipped by clip-path: that left hairlines
   where the clip edge met a fractional pixel). The markup stays inside .wrap; body.public clips the overflow sideways. */
body.public { overflow-x: clip; }
body.public .home-simple, body.public .rp-top { color: var(--band-ink); position: relative; isolation: isolate; }
body.public .home-simple::before, body.public .rp-top::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--band); }

/* home: the start panel is the band; "Already reported?" sits on the page below a yellow rule */
body.home .home-simple { max-width: 640px; padding: 40px 0 0; margin-top: 0; }
body.home .home-simple h1 { color: #fff; font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; }
body.home .home-simple .lede { color: #E6E9EF; }
body.home .home-actions { gap: 0; }
body.home .home-already { margin-top: 36px; padding: 28px 0 8px; border-top: 0; color: var(--ink); position: relative; }
body.home .home-already::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; background: var(--bg); }
body.home .home-already::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; margin-left: -50vw; height: 6px; background: var(--gold); }
body.home .home-already .btn-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
body.home .home-new a { color: var(--ink); }

/* report steps: one column, the progress band on top, no card around the form */
body.report .rp-wrap { grid-template-columns: minmax(0, 1fr); max-width: 720px; margin-inline: auto; gap: 24px; }
body.report .rp-main { min-width: 0; }
body.report .rp-top { margin: 0 0 24px; padding: 14px 0 20px; align-items: flex-start; }
body.report .rp-top > div { flex: 1 1 260px; min-width: 0; }
body.report .rp-top .prog { color: #E6E9EF; font-size: .95rem; margin-bottom: 12px; }
body.report .rp-top .prog b { color: #fff; }
body.report .rp-top .linkbtn { color: #fff; padding: 10px 0; min-height: 44px; }
body.report .pbar { width: 100%; max-width: 640px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.3); overflow: visible; }
body.report .pbar span { position: relative; border-radius: 99px; }
body.report .pbar span::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--gold); border: 3px solid var(--band); box-shadow: 0 0 0 1.5px var(--gold); box-sizing: border-box; }
body.report .rp-card.glass { background: none; border: 0; border-radius: 0; padding: 0; }
body.report .rp-nav { border-top: 2px solid var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  body.report .pbar span { animation: sky-fill .5s cubic-bezier(.2,0,0,1) both; }
  body.report .pbar .q1 { --from: 0%; } body.report .pbar .q2 { --from: 25%; } body.report .pbar .q3 { --from: 50%; } body.report .pbar .q4 { --from: 75%; }
}
@keyframes sky-fill { from { width: var(--from, 0%); } }

/* ---- phones: two-line emergency strip, compact header, Continue fixed to the bottom ---- */
@media (max-width: 640px) {
  /* Less before the first question: the demo banner shows once per browser, the controls and the progress band are compact. */
  html.banner-seen body.public .banner { display: none; }
  body.report .rp-top { margin-bottom: 14px; padding: 8px 0 12px; }
  body.report .rp-top .prog { margin-bottom: 8px; font-size: .9rem; }
  body.report .rp-top .linkbtn { padding: 2px 0; }
  body.public .emerg { font-size: .85rem; }
  body.public .emerg .wrap { justify-content: space-between; gap: 2px 12px; padding-top: 6px; padding-bottom: 6px; }
  body.public .emerg .pulse, body.public .emerg .em-long { display: none; }
  body.public .crest { width: 40px; height: 40px; }
  body.report .org, body.report header.top .nav { display: none; }
  html:has(body.report .rp-nav) { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  body.report .rp-nav { position: sticky; bottom: 0; z-index: 5; margin: 24px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 2px solid var(--ink); align-items: stretch; gap: 10px; }
}

/* ---- review step: the same visual language as the "Report received" page ----
   A badge and a big heading, the key fact on a card with a yellow rule, a pale note,
   then one white card per section with a strong title, a Change button and larger values. */
body.report .rv-head { display: flex; gap: 16px; align-items: flex-start; }
body.report .rv-head .done { margin: 4px 0 0; flex: none; }
body.report .rv-head .done svg { stroke-width: 2; }
body.report .rv-head h1 { margin: 0 0 6px; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.08; }
body.report .rv-head .rp-lede { margin: 0; font-size: 1.125rem; }
body.report .rv-key { margin: 22px 0 12px; background: var(--card-solid); border-radius: 0 var(--r-sky) var(--r-sky) 0; padding: 14px 20px; }
body.report .rv-key strong { font-family: var(--display); font-size: clamp(1.4rem, 3.6vw, 1.9rem); font-weight: 800; line-height: 1.15; letter-spacing: 0; }
body.report .rv-key .rv-where { font-size: 1.0625rem; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
body.report .rv-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 22px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--hairline); border-radius: var(--r-sky); color: var(--ink-2); max-width: none; }
body.report .rv-note svg { width: 22px; height: 22px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
body.report .review { gap: 16px; margin-bottom: 24px; }
body.report .rv { background: var(--card-solid); border: 1px solid var(--hairline); border-radius: var(--r-ui); padding: 18px 24px 8px; }
body.report .rv header { align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
body.report .rv h2 { margin: 0; font-size: 1.3125rem; line-height: 1.2; }
body.report .rv header a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; }
body.report .rv header a:hover { background: var(--hover); }
body.report .rv h3 { font-family: var(--display); font-size: 1.0625rem; font-weight: 800; margin: 18px 0 0; }
body.report .rv dl > div { grid-template-columns: minmax(150px, 32%) 1fr; gap: 2px 20px; padding: 12px 0; }
body.report .rv dl > div:first-child { border-top: 0; }
body.report .rv dt { font-size: .95rem; line-height: 1.4; padding-top: 3px; }
body.report .rv dd { font-size: 1.125rem; line-height: 1.45; color: var(--ink); }
body.report .review ~ .fld .check { background: var(--card-solid); border: 2px solid var(--ink); border-radius: var(--r-sky); padding: 16px; font-weight: 700; }
body.report .review ~ .fld .check input { width: 26px; height: 26px; }
@media (max-width: 640px) {
  body.report .rv-head { gap: 12px; } body.report .rv-head .done { width: 48px; height: 48px; }
  body.report .rv { padding: 14px 16px 4px; }
  body.report .rv dl > div { grid-template-columns: 1fr; padding: 10px 0; }
  body.report .rv dt { padding-top: 0; }
}

/* ---- privacy notice dialog: bottom sheet on phones, centred panel on larger screens ---- */
html.dialog-open { overflow: hidden; }
.privacy-dialog { border: 0; padding: 0; color: var(--ink); background: var(--card-solid); max-width: 720px; width: calc(100% - 32px); max-height: 85vh; max-height: 85dvh; border-radius: var(--r-sky, 8px); box-shadow: 0 8px 40px rgba(0,0,0,.35); flex-direction: column; }
.privacy-dialog[open] { display: flex; }
.privacy-dialog::backdrop { background: rgba(10,18,34,.6); }
.privacy-dialog .pd-bar, .privacy-dialog .pd-foot { padding: 12px 20px; flex: none; }
.privacy-dialog .pd-bar { display: flex; justify-content: flex-end; border-bottom: 1px solid var(--hairline); }
.privacy-dialog .pd-foot { border-top: 1px solid var(--hairline); }
.privacy-dialog .pd-close { min-height: 44px; min-width: 44px; }
.privacy-dialog .pd-body { overflow-y: auto; padding: 8px 24px 16px; flex: 1 1 auto; }
.privacy-dialog .pd-body h1 { font-size: 1.6rem; margin-top: 12px; }
@media (max-width: 640px) {
  .privacy-dialog { width: 100%; max-width: none; max-height: 90vh; max-height: 90dvh; margin: auto 0 0; border-radius: var(--r-ui) var(--r-ui) 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .privacy-dialog[open] { animation: pd-in .2s ease-out; }
  @keyframes pd-in { from { opacity: 0; transform: translateY(12px); } }
}

/* ---- Back and Continue: side by side on every step. Continue (the primary action) takes the room; Back is the quiet one.
   In "edit from review" the order is Save and return to review (primary, first), then Back to review. ---- */
body.public .rp-nav { display: flex; flex-wrap: nowrap; align-items: stretch; justify-content: stretch; gap: 12px; }
body.public .rp-nav .btn { width: auto; margin: 0; min-width: 0; text-align: center; overflow-wrap: anywhere; }
body.public .rp-nav .btn-ghost { flex: 0 1 auto; padding-inline: 20px; }
body.public .rp-nav .btn-gold { flex: 1 1 0; }
body.public .rp-nav-hint { margin: 10px 0 0; }

/* ---- native controls ----
   Fields are light in both themes, so they say so (color-scheme: light): the date and time icons, scrollbars and
   option lists then draw dark on the light field even when the page is dark. Selects get the design system's chevron. */
body.public :is(input, select, textarea) { color-scheme: light; }
body.public input::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; padding: 6px; margin-inline-end: -4px; border-radius: calc(var(--r-ui) - 2px); }
body.public input::-webkit-calendar-picker-indicator:hover { background: rgba(16,32,58,.1); }
body.public select { -webkit-appearance: none; appearance: none; padding-inline-end: 48px; background-image: var(--chev); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; cursor: pointer; text-overflow: ellipsis; }
body.public select:dir(rtl) { background-position: left 14px center; }
body.public select::-ms-expand { display: none; }
@media (forced-colors: active) { body.public select { background-image: none; appearance: auto; } }

/* ---- town combobox (public/js/combobox.js). Without script the page keeps the browser's own list. ---- */
.combo { position: relative; }
.combo input { padding-inline-end: 52px; }
.combo-toggle { position: absolute; inset-block: 2px; inset-inline-end: 2px; width: 48px; border: 0; border-radius: calc(var(--r-ui) - 2px); background: var(--chev) center / 18px no-repeat; cursor: pointer; }
.combo-toggle:hover { background-color: rgba(16,32,58,.08); }
.combo-list { position: absolute; z-index: 30; inset-inline: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: min(320px, 50vh); max-height: min(320px, 50dvh); overflow-y: auto; overscroll-behavior: contain;
  background: #F5F7FA; color: #10203A; border: 2px solid #10203A; border-radius: var(--r-ui); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.combo-list[hidden] { display: none; }
/* Collision finder: the list sits in the flow, so it pushes Find down instead of covering it (C-03). */
[data-cf] .combo-list { position: static; margin-top: 4px; max-height: min(240px, 40dvh); }
.combo-list [role=option] { padding: 11px 12px; min-height: 44px; border-radius: calc(var(--r-ui) - 3px); cursor: pointer; line-height: 1.4; }
.combo-list [role=option]:hover { background: rgba(16,32,58,.09); }
.combo-list [role=option][aria-selected=true] { background: #10203A; color: #fff; }
.combo-list [role=option] .hit { background: none; color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.combo-list .combo-empty { padding: 12px; color: #2B3B55; }
@media (forced-colors: active) { .combo-list [role=option][aria-selected=true] { background: Highlight; color: HighlightText; forced-color-adjust: none; } }

/* ---- heading focus after a page change ----
   The step heading takes focus on load so screen reader users start in the right place. It is not a control, so it never
   draws an outline or box, in any browser and whatever the last input was. Every link, button and field keeps its ring. */
body.public :is(h1, h2, main)[tabindex="-1"], body.public :is(h1, h2, main)[tabindex="-1"]:focus, body.public :is(h1, h2, main)[tabindex="-1"]:focus-visible { outline: none !important; box-shadow: none !important; }

/* ---- landing page: "What can I report here?" under the start button ---- */
body.home .home-what { margin: 20px 0 0; }
body.home .home-what summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
body.home .home-what summary::-webkit-details-marker { display: none; }
body.home .home-what summary::after { content: ""; width: 18px; height: 18px; background: var(--chev-light) center / contain no-repeat; transition: transform .15s; }
body.home .home-what[open] summary::after { transform: rotate(180deg); }
body.home .home-what .hw-body { display: grid; gap: 16px 32px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding: 8px 0 4px; color: #E6E9EF; }
body.home .home-what h2 { font-size: 1.0625rem; margin: 0 0 6px; color: #fff; }
body.home .home-what ul { margin: 0; padding-inline-start: 1.1em; }
body.home .home-what li { margin: 0 0 4px; }
@media (prefers-reduced-motion: reduce) { body.home .home-what summary::after { transition: none; } }

/* ---- phone header (320 to 640 px): the brand, then one utility row (language, text size, dark mode). Every control in
   the row is 44 px tall with the same 8 px gap; the language button takes the spare width, so the row always ends flush
   with the page margin, in either language and at any text size. ---- */
@media (max-width: 640px) {
  body.public header.top .bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 10px; padding-bottom: 12px; }
  body.public header.top .brand { min-width: 0; }
  body.public header.top .tools { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 8px; width: auto; justify-content: stretch; }
  body.public header.top .tools .pill, body.public header.top .tools .lang-list { flex: 1 1 0; min-width: 0; }
  body.public header.top .tools .lang-list { display: flex; gap: 8px; }
  body.public header.top .tools .pill { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.public header.top .sizes { flex: none; align-items: stretch; padding: 0; gap: 0; }
  body.public header.top .sz { width: 44px; height: auto; min-height: 42px; }
  body.public header.top .iconbtn { flex: none; width: 44px; height: auto; min-height: 44px; }
  body.report .rp-top { margin-top: 0; }
}
@media (min-width: 641px) { body.public header.top .tools { margin-inline-start: auto; } }

/* ---- landing page: "Already reported?" holds two equal actions, each with a one-line hint ---- */
body.home .already-grid { align-items: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px 24px; margin: 12px 0 8px; }
body.home .already-item { display: flex; flex-direction: column; }
body.home .already-item .btn-xl { width: 100%; }
body.home .already-item .hint { margin: 8px 0 0; color: var(--ink-2); }

/* ---- Back is always there: an outlined button with an arrow, as tall as Continue ---- */
body.public .rp-nav .btn { min-height: 56px; }
body.public .rp-nav .btn-ghost { gap: 8px; border: 2px solid var(--ink); color: var(--ink); background: var(--bg); }
body.public .rp-nav .btn-ghost .ico-back { flex: none; }
@media (max-width: 640px) { body.public .rp-nav .btn { min-height: 52px; } body.public .rp-nav .btn-ghost { padding-inline: 14px; gap: 6px; } body.public .sheet { padding-inline: 18px; } }

/* ---- fields: nothing wider than its box, on iPhone Safari too ----
   Date and time inputs have an intrinsic width and inner padding in iOS Safari; flex and grid parents must be allowed to shrink. */
body.public :is(.fld, .field, fieldset, .grid2, .grid3, .grid2 > *, .grid3 > *) { min-width: 0; max-width: 100%; }
body.public :is(input, select, textarea) { display: block; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
body.public :is(input[type=date], input[type=time]) { min-height: 56px; line-height: 1.2; padding-block: 0; background-clip: padding-box; }
body.public input[type=date]::-webkit-date-and-time-value { text-align: start; min-height: 1.2em; }
body.public input[type=date]::-webkit-datetime-edit, body.public input[type=time]::-webkit-datetime-edit { padding: 0; }
body.public input[type=checkbox], body.public input[type=radio] { -webkit-appearance: auto; appearance: auto; width: auto; display: inline-block; }
body.public .grid2, body.public .grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 16px; }

/* ---- spacing inside a group of fields: legend, label, hint and input follow one rhythm ---- */
body.public fieldset.group { padding: 14px 16px 2px; margin-bottom: 20px; }
body.public fieldset.group > legend { padding: 0 6px; margin: 0; font-size: 1.0625rem; }
body.public .fld { margin-bottom: 18px; }
body.public .fld > label, body.public .field > label { margin-bottom: 4px; }
body.public .fld > .hint { margin: 0 0 8px; }
body.public .fld > .err { margin: 0 0 8px; }

/* The page is at least a screen tall without reserving height the Safari toolbar takes back. */
body.public main { min-height: 60vh; min-height: 60svh; }
