/* CivicTrack — civic design system (public + admin). Self-hosted fonts, no inline styles (CSP-friendly). */
@font-face { font-family: "Archivo"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/archivo-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --paper: #F6F5F1; --paper-2: #EFEEE7; --surface: #FFFFFF;
  --ink: #121A24; --ink-2: #5A6472; --ink-3: #8A93A0;
  --rule: #E2DED4; --rule-2: #D3CEC2;
  --primary: #0F4C81; --primary-dark: #0A3A63; --primary-soft: #E7EEF6;
  --teal: #0C7C74; --teal-soft: #E2F1EF;
  --amber: #E8A317; --amber-ink: #B26A00; --amber-soft: #FBF0DA;
  --green: #1F7A4D; --green-soft: #E4F2EA;
  --red: #B42318; --red-soft: #FBEAE8;
  --info-ink: #0F4C81; --info-bg: #E7EEF6;
  --forward-ink: #4B3A86; --forward-bg: #F0ECF7;
  --closed-ink: #3F4A5C; --closed-bg: #EEF0F3;
  --radius: 6px;
  --radius-sm: 4px;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-hover: 0 6px 20px rgba(18, 26, 36, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); overflow-x: hidden; overflow-wrap: anywhere; min-height: 100vh; }
::selection { background: var(--amber); color: var(--ink); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-weight: 800; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); }
h2 { font-weight: 700; font-size: clamp(1.25rem, 1.05rem + .9vw, 1.7rem); }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; text-decoration: none; }
.skip-link:focus { left: 8px; top: 8px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.container-narrow { max-width: 740px; }
.stack > * + * { margin-top: 1.1rem; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.ink { color: var(--ink); }
.ink-inverse { color: var(--paper); }
.code { font-family: var(--mono); font-size: .92em; }

/* Eyebrows, labels and stamps use the mono face, as on the reference site */
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }

/* Local Issue Desk header: utility strip, masthead, one-line nav, hamburger below 1100px */
.util-bar { background: var(--paper); border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.util-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; }
.util-inner a { color: var(--ink-2); text-decoration: none; }
.util-inner a:hover { color: var(--primary); text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(246, 245, 241, .97); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border-bottom: 1px solid var(--rule); }
.site-header::before { display: none; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 44px; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 4px; background-color: var(--ink); background-image: repeating-linear-gradient(-45deg, var(--amber) 0 4px, transparent 4px 9px); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin-top: 4px; }
.site-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 10px; border-radius: var(--radius-sm); min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }
.util-links { display: flex; align-items: center; gap: 18px; }
.util-links .header-account { font-size: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; color: inherit; }
.header-account:hover, .header-account:focus-visible { text-decoration: underline; }
.site-header .header-cta { white-space: nowrap; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.lang-switch a { padding: 6px 8px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.nav-toggle { display: none; min-height: 40px; min-width: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--rule-2); border-radius: var(--radius-sm); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; flex: none; }
@media (min-width: 1100px) {
  .site-nav a { padding: 8px 9px; }
}
@media (max-width: 1099px) {
  html.js .nav-toggle { display: inline-flex; align-items: center; }
  html.js .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px -16px rgba(18, 26, 36, .25); }
  html.js .site-nav.is-open { display: flex; }
  .site-nav a { min-height: 48px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--rule); }
  .header-inner { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  .site-header .header-actions .header-cta { display: none; }
}
@media (max-width: 639px) {
  .util-bar span { display: none; }
  .util-inner { justify-content: flex-end; }
  .brand-sub { display: none; }
  .site-header .header-inner { flex-wrap: wrap; row-gap: 8px; gap: 8px; }
  .site-header .header-actions { gap: 6px; }
  .lang-switch { font-size: 12px; }
  .lang-switch a { padding: 4px 5px; }
  .nav-toggle { padding: 0 10px; min-width: 40px; }
  .brand-name { font-size: 17px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; background: var(--primary); color: #fff; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-secondary:hover { background: var(--paper-2); border-color: var(--ink-3); color: var(--ink); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #911b12; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Forms */
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin-bottom: 4px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink); }
.badge-required { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-left: 6px; }
.badge-optional { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; }
.hint { font-size: 13px; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-2); border-radius: var(--radius-sm);
}
textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(15, 76, 129, .14); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: 13px; margin: 2px 0 0; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.check label { font-weight: 400; color: var(--ink-2); }
.fieldset { border: 0; border-top: 2px solid var(--ink); padding: 20px 0 0; margin: 0 0 32px; min-width: 0; }
.fieldset legend { font-family: var(--font-display); font-weight: 700; font-size: 20px; padding: 0; margin-bottom: 16px; color: var(--ink); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inline-form { display: inline; margin: 0; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card + .card { margin-top: 18px; }
.grid > .card + .card, .steps > li + li { margin-top: 0; }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 40px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); }
.page-head p { margin: 0; color: var(--ink-2); max-width: 560px; }
.page-head h1 { margin-bottom: 0; }
.section { padding: 48px 0; }
.section-title { margin-bottom: 8px; }

/* Home hero (Local Issue Desk): headline with highlight, stat row, live ledger card */
.hero { padding: 56px 0 56px; }
.hero-grid { display: grid; gap: 40px; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; } }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow-mark { display: inline-block; width: 26px; height: 12px; background: linear-gradient(90deg, var(--amber) 0 50%, transparent 50%); transform: skewX(-20deg); border-radius: 1px; }
.hero h1 { font-size: clamp(2.4rem, 1.5rem + 3.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; }
.hero h1 .hl { white-space: nowrap; }
.hero .hl { background: linear-gradient(transparent 62%, var(--amber) 62%); }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 36rem; margin-top: 22px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 24px; margin: 36px 0 0; max-width: 620px; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.hero-stats > div { border-top: 2px solid var(--ink); padding-top: 10px; }
.hero-stats dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.hero-stats dd { margin: 6px 0 0; font-family: var(--mono); font-size: 32px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }

/* Ledger card */
.ledger-card { padding: 0; overflow: hidden; }
.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--ink); }
.ledger-title { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.live { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ledger-wrap { border: 0; border-radius: 0; box-shadow: none; overflow-x: auto; }
table.ledger { min-width: 0; table-layout: auto; }
table.ledger th { font-size: 10px; padding: 10px 14px; }
table.ledger td { padding: 12px 12px; font-size: 14px; overflow-wrap: normal; word-break: normal; }
table.ledger td .badge { font-size: 10px; letter-spacing: .04em; }
table.ledger th { white-space: nowrap; }
table.ledger .ref { color: var(--primary); font-size: 13px; letter-spacing: .02em; font-weight: 500; }
.ledger-empty { padding: 44px 18px; text-align: center; }
.ledger-empty p { color: var(--ink-2); margin: 0; }
.ledger-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--rule); font-size: 13px; }
.ledger-note { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.ledger-foot a { font-weight: 600; text-decoration: none; }
.ledger-foot a:hover { text-decoration: underline; }
.cat-card { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.cat-card:hover { box-shadow: 0 6px 20px rgba(18, 26, 36, .08); }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--mono); font-size: 13px; color: var(--amber-ink); margin-bottom: 14px; }

/* Status chips and priority labels (mono, uppercase, as on the reference) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 3px; border: 1px solid transparent; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-pending { color: var(--amber-ink); background: var(--amber-soft); border-color: #ECD4A3; }
.tone-forwarded { color: var(--forward-ink); background: var(--forward-bg); border-color: #CFC4E6; }
.tone-progress { color: #075E58; background: var(--teal-soft); border-color: #A9D6D1; }
.tone-resolved { color: var(--green); background: var(--green-soft); border-color: #B6DCC7; }
.tone-closed { color: var(--closed-ink); background: var(--closed-bg); border-color: #D6DBE3; }
.tone-rejected { color: var(--red); background: var(--red-soft); border-color: #EEC4BF; }
.priority-urgent { color: #fff; background: var(--red); border-color: var(--red); }
.priority-high { color: var(--amber-ink); background: var(--amber-soft); border-color: #ECD4A3; }
.priority-normal { color: var(--ink-2); background: var(--paper); border-color: var(--rule-2); }
.priority-low { color: var(--ink-3); background: var(--surface); border-color: var(--rule); }
.badge-public { color: var(--green); background: var(--green-soft); border-color: #B6DCC7; }
.badge-internal { color: var(--closed-ink); background: var(--closed-bg); border-color: #D6DBE3; }

/* Alerts */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.alert-error { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.alert-info { background: var(--info-bg); border-color: #B8CBE0; color: var(--info-ink); }
.alert-warn { background: var(--amber-soft); border-color: var(--amber); color: var(--amber-ink); }
.receipt-code { font-family: var(--mono); font-size: 1.35rem; font-weight: 500; letter-spacing: .08em; background: var(--surface); border: 1px dashed var(--rule-2); border-radius: var(--radius-sm); padding: 12px 16px; display: inline-block; color: var(--primary); }

/* Ledger tables: ink rules, mono headers, scroll on small screens */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
table.data th { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); background: var(--surface); border-bottom: 1px solid var(--ink); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.nowrap { white-space: nowrap; }
table.data tbody tr:hover { background: var(--paper-2); }
table.data a { font-weight: 600; }
.table-actions { white-space: nowrap; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 9px 0; }
.bar { height: 8px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); border-radius: 2px; }

/* Filters and pagination */
.filters { display: grid; gap: 12px; grid-template-columns: 1fr; background: var(--surface); padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 18px; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr repeat(3, 1fr) auto; align-items: end; } }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pager a, .pager span { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--rule-2); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.pager a:hover { border-color: var(--ink); }
.pager span[aria-disabled="true"] { color: var(--ink-3); background: var(--paper-2); }

/* Timeline: ink rule with dots */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink-3); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 22px; bottom: 0; width: 1px; background: var(--rule-2); }
.timeline li:last-child::after { display: none; }
.timeline li.is-current::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline time { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 6px; }
.progress span { height: 6px; border-radius: 1px; background: var(--rule); }
.progress span.on { background: var(--primary); }

/* Misc */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty strong { display: block; font-family: var(--font-display); color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
@media (min-width: 640px) { .kv { grid-template-columns: 170px 1fr; } }
.kv dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.kv dd { margin: 0 0 10px; }
.thumb-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.thumb-grid a { display: block; border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); }
.thumb-grid img { display: block; width: 100%; height: 130px; object-fit: cover; }
.notice-list { margin: 0; padding-left: 20px; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 17px; min-height: 44px; display: flex; align-items: center; color: var(--ink); }
.faq summary:hover { color: var(--primary); }
.faq details p { margin: 6px 0 0; color: var(--ink-2); }
.update-item { border-left: 2px solid var(--rule-2); padding: 4px 0 4px 16px; margin-bottom: 14px; }
.update-item.is-internal { border-left-color: var(--amber); }
.update-item.is-public { border-left-color: var(--primary); }
.status-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.status-row:last-child { border-bottom: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack-sm > * + * { margin-top: .5rem; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 42ch; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.history-meta { font-size: 13px; color: var(--ink-2); }
.kpi-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.kpi-grid > * { background: var(--surface); }
@media (min-width: 960px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.detail-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .detail-grid { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; } }
.chart-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.chart-box { position: relative; min-height: 240px; }
.chart-fallback { font-size: 15px; }
.map-svg { display: block; width: 100%; max-width: 800px; height: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.plain-list li { padding: 4px 0; }

/* Footer */
.site-footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--ink); padding: 40px 0 28px; font-size: 14px; color: var(--ink-2); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-heading { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.footer-links a { color: var(--ink-2); text-decoration: none; display: inline-flex; min-height: 34px; align-items: center; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }

/* Admin shell: ink sidebar with amber marker */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: #C9CFD8; padding: 18px 16px; border-bottom: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--amber) 0 10px, transparent 10px 20px) 6; }
.admin-sidebar .brand { color: var(--paper); }
.admin-sidebar .brand-mark { background: var(--amber); color: var(--ink); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.admin-nav a { color: #C9CFD8; text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); min-height: 44px; display: flex; align-items: center; font-size: 15px; }
.admin-nav a:hover { background: rgba(246, 245, 241, .08); color: #fff; }
.admin-nav a[aria-current="page"] { background: rgba(232, 163, 23, .14); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--amber); }
.admin-user { font-size: 13px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(246, 245, 241, .14); color: #9AA4B2; }
.admin-user .btn { margin-top: 6px; }
.admin-user form.mt-1 .btn-secondary { color: var(--paper); border-color: rgba(246, 245, 241, .3); }
.admin-main { padding: 22px 16px 48px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-toggle { display: none; background: var(--ink); border: 1px solid var(--ink); color: var(--paper); border-radius: var(--radius-sm); min-height: 44px; min-width: 44px; padding: 0 16px; font: inherit; font-weight: 600; cursor: pointer; }
@media (min-width: 960px) {
  .admin-shell { grid-template-columns: 250px 1fr; }
  html.js .admin-toggle { display: none; }
  .admin-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
  .admin-main { padding: 32px 40px 56px; }
}
@media (max-width: 959px) {
  html.js .admin-toggle { display: inline-flex; align-items: center; }
  html.js .admin-sidebar { display: none; }
  html.js .admin-sidebar.is-open { display: block; }
}

/* Utilities (classes instead of inline styles, so the CSP stays strict) */
.ink-inverse { color: var(--paper); }
.footer-heading { font-size: 11px; }
.admin-user .btn { margin-top: 4px; }
.update-item p { margin: 6px 0 0; }
.actions-row .btn { margin: 0; }
.table-scroll .table-wrap { overflow-x: auto; }

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .hero { padding: 40px 0 36px; }
  .cta-row .btn { width: 100%; }
  .card { padding: 18px; }
  .fieldset { padding-top: 16px; }
  table.data th, table.data td { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Report form map (Leaflet, OpenStreetMap tiles). */
.report-map { height: 340px; width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #eef2f5; }
.report-map[hidden] { display: none; }
details.coords-manual { margin-top: 10px; }
details.coords-manual > summary { cursor: pointer; font-weight: 600; }

/* Admin: report area picker. */
.area-search { display: flex; gap: 8px; flex-wrap: wrap; }
.area-search input[type="search"] { flex: 1 1 260px; }
.area-results { display: grid; gap: 6px; margin: 8px 0 14px; }
.area-result { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #ffffff; }

/* Public map (Leaflet, OpenStreetMap tiles). */
.public-map { height: 480px; width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #eef2f5; }
.map-popup { font-size: 13px; line-height: 1.4; min-width: 200px; }
.map-popup-row { display: grid; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.map-popup-ref { font-family: "IBM Plex Mono", ui-monospace, monospace; color: #0b6e8a; font-size: 12px; }
.map-popup em { color: #475569; font-style: normal; }
@media (max-width: 639px) { .public-map { height: 380px; } }

/* Admin profile page. */
.profile-hero { display: flex; gap: 20px; align-items: center; padding: 8px 0 24px; border-bottom: 1px solid #cbd5e1; margin-bottom: 24px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: #0b6e8a; color: #ffffff; display: grid; place-items: center; font: 700 26px/1 "Archivo", system-ui, sans-serif; flex: none; }
.profile-hero h1 { margin: 2px 0 6px; }
.profile-hero .eyebrow { margin: 0; font: 500 12px/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #0b6e8a; }
.profile-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; color: #475569; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 300px minmax(0, 1fr); } }
.profile-main { display: grid; gap: 20px; min-width: 0; }
.profile-card { display: grid; gap: 14px; }
.profile-card .section-title { margin: 0; }
.profile-facts { margin: 0; display: grid; gap: 12px; }
.profile-facts > div { display: grid; gap: 2px; }
.profile-facts dt { font: 500 11px/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: #64748b; }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; margin-right: 4px; vertical-align: middle; }
.status-dot.status-on { background: #2e7d32; }
.profile-rules { margin: 0; padding-left: 18px; color: #475569; display: grid; gap: 4px; font-size: 14px; }
.profile-actions { display: flex; justify-content: flex-end; }

/* Staff issue location map (admin-issue-map.js). */
.admin-issue-map { height: 320px; width: 100%; border-radius: 10px; border: 1px solid var(--line, #d9d4c9); margin-bottom: 8px; }

/* V2.0: one "Report an issue" entry point. Desktop uses the header button; the mobile menu keeps the link. */
@media (min-width: 1100px) { .site-nav .nav-report { display: none; } }
.lang-form { display: inline-flex; align-items: center; gap: 6px; }
.lang-select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-height: 40px; max-width: 150px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.js .lang-go { display: none; }

/* V2.0 accessibility: larger text option, and phone touch targets of at least 44px. */
html.large-text { zoom: 1.15; }
.text-size-toggle { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); min-height: 40px; cursor: pointer; white-space: nowrap; }
.text-size-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.text-size-toggle:focus-visible, .lang-select:focus-visible, .btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 639px) {
  .btn, .btn-sm, .lang-select, .text-size-toggle, .nav-toggle { min-height: 44px; }
  .site-nav a { min-height: 48px; }
}

/* V2.0: before and after photos on the tracking page. */
.ba-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 260px); }
@media (min-width: 640px) { .ba-grid { grid-template-columns: repeat(2, minmax(0, 260px)); } }
.ba-fig { margin: 0; }
.ba-fig img { width: 100%; max-width: 260px; height: 200px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--rule); display: block; }
.ba-fig figcaption { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

/* Header fit: the Map nav item and the phone language/size controls were pushing the header past the screen edge. */
@media (max-width: 1320px) {
  .header-inner { gap: 12px; }
  .site-nav a { padding: 8px 7px; font-size: 14px; }
}
@media (max-width: 640px) {
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
}
