:root {
  color-scheme: light;
  --surface: #ffffff;
  --soft: #f4f4f4;
  --ink: #231F20;
  --muted: #5c5858;
  --border: #e2e0df;
  --accent: #FABD09;
  --navy: #161825;
  --focus: #161825;
  --error: #9b2c2c;
  --success: #2f6b4f;
  --pending: #8a6a12;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
h2,h3, .section-legend { font-size: 1rem; font-weight: 600; line-height: 1.3; }
p { line-height: 1.5; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
button,input,select,textarea { font: inherit; font-size: .875rem; }
button,.button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; line-height: 1.4; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center; }
button:hover,.button:hover { background: var(--soft); color: var(--ink); }
button:disabled { cursor: default; opacity: .5; }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.button--primary:hover { background: color-mix(in srgb, var(--accent) 78%, var(--ink)); color: var(--ink); }
.button--danger { color: var(--error); border-color: color-mix(in oklch,var(--error),white 65%); }
.button--danger:hover { color: var(--surface); background: var(--error); border-color: var(--error); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input,select,textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; line-height: 1.5; }
select { padding-right: 28px; }
select:focus-visible { outline-offset: -2px; }
textarea { resize: vertical; }
#description-input { min-height: 7rem; max-height: 18rem; }
input:disabled { background: var(--soft); color: var(--muted); }
input[type=checkbox] { width: 17px; height: 17px; min-height: 17px; margin: 0; padding: 0; accent-color: var(--accent); flex-shrink: 0; }
input[type=file] { padding: 8px; }
input::file-selector-button { padding: 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--soft); margin-right: 12px; }
label { display: flex; flex-direction: column; gap: 8px; font-size: .875rem; font-weight: 600; letter-spacing: .04em; line-height: 1.4; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: .875rem; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted,.metadata,.small-note,.optional { color: var(--muted); font-weight: 400; }
.muted,.small-note { font-size: .875rem; }
.metadata,.optional { font-size: .75rem; }
.optional { margin-left: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 3000; padding: 12px 16px; background: var(--ink); color: white; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.brand { display: flex; align-items: center; text-decoration: none; color: var(--ink); padding: 12px; margin: -4px 0; }
.brand img,.brand .brand-lockup { width: auto; height: 56px; min-width: 120px; object-fit: contain; }
.brand-group { display: flex; align-items: center; gap: 20px; min-width: 0; }
.partner-brand { display: inline-flex; align-items: center; gap: 12px; padding-left: 16px; border-left: 1px solid var(--border); color: var(--muted); font-size: .6875rem; white-space: normal; flex-shrink: 1; min-width: 0; }
.partner-brand a,.partner-brand span { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.partner-brand a:hover { color: var(--ink); }
.partner-brand__marks { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 10px 14px; }
.partner-brand img { width: auto; height: 40px; max-width: 88px; object-fit: contain; }
.partner-brand .partner-nwa { height: 36px; max-width: 84px; }
.partner-brand .partner-jcc,.partner-brand .partner-krc { height: 38px; max-width: 132px; }
.partner-brand .partner-ksamc,.partner-brand .partner-dkri { height: 44px; max-width: 44px; }
.page-heading__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; padding: 2px 0 0 16px; }
.map-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0; text-decoration: none; color: var(--ink); }
.map-link img { width: 44px; height: 44px; object-fit: contain; display: block; flex-shrink: 0; }
.map-link span { font-size: .75rem; font-weight: 600; line-height: 1.2; text-decoration: underline; text-underline-offset: 3px; }
.brand-group--login { align-items: center; flex-direction: column; gap: 16px; text-align: center; }
.brand-group--login .brand { padding: 16px; margin: 0; }
.brand-group--login .brand img { height: 120px; min-width: 0; }
.brand-group--login .partner-brand { border-left: 0; padding-left: 0; }
.brand-subtitle { display: block; font-size: .6875rem; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-top: 4px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.text-button { background: transparent; border: 0; padding: 8px 0; color: var(--ink); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { background: transparent; color: var(--ink); }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; padding: 9px; flex-shrink: 0; }
.form-message { font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.form-message:empty { display: none; }
.is-error { color: var(--error); }
.is-success { color: var(--success); }
.notice { font-size: .75rem; color: var(--muted); }
.stack-form { display: flex; flex-direction: column; gap: 20px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.actions,.capture-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.check-row,.checkbox-card { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; }
.check-row span:first-of-type { flex: 1; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill,.status-badge,.status-pill { display: inline-block; font-size: .75rem; border: 1px solid var(--border); background: var(--soft); border-radius: 4px; padding: 3px 7px; line-height: 1.4; }
.status-badge,.status-pill { text-transform: capitalize; }
.status-badge--down,.status-pill--down { color: var(--error); }
.status-badge--fixed,.status-pill--fixed { color: var(--success); }
.status-badge--pending,.status-pill--pending { color: oklch(43% .08 70); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border: 1px solid currentColor; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pending { color: var(--pending); }
.down { color: var(--error); }
.reported { color: var(--pending); }
.none { color: #9a9596; }
.fixed { color: var(--success); }
.status-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin-top: 16px; }
.status-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; }
.pagination button { font-size: .75rem; padding: 8px; }
.empty-state { padding: 20px 0; color: var(--muted); font-size: .875rem; }

/* Map page: top bar, full-bleed map, tab bar, and one panel for list, about and pin details.
   Phones stack them with the tab bar at the bottom; wider screens turn the tab bar into a left rail. */
.map-page { overflow: hidden; --topbar-h: 60px; --tabbar-h: calc(64px + env(safe-area-inset-bottom)); }
.map-workspace { position: relative; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: var(--topbar-h) minmax(0,1fr) var(--tabbar-h); grid-template-areas: "top" "map" "tabs"; height: 100dvh; }
.map-topbar { grid-area: top; position: relative; z-index: 1100; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px 0 4px; background: var(--surface); border-bottom: 1px solid var(--border); }
.map-topbar .brand { padding: 8px; margin: 0; }
.map-topbar .brand img { height: 42px; min-width: 0; }
.map-topbar__partners { display: none; }
.map-topbar__search { border-radius: 50%; }
.map-topbar__search svg { width: 20px; height: 20px; }
.map-tabbar { grid-area: tabs; position: relative; z-index: 1100; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); align-items: start; padding: 6px 4px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
.map-tabbar > button,.map-tabbar > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .6875rem; font-weight: 600; line-height: 1.2; text-decoration: none; }
.map-tabbar > button:hover,.map-tabbar > a:hover { background: transparent; color: var(--ink); }
.map-tabbar svg { width: 22px; height: 22px; }
.map-tabbar > button[aria-pressed=true] { color: var(--ink); }
.map-tabbar > button[aria-pressed=true]::after { content: ''; width: 18px; height: 3px; margin-top: 1px; border-radius: 2px; background: var(--accent); }
.map-tabbar > a.map-tabbar__report { color: var(--ink); margin-top: -31px; justify-content: flex-start; }
.map-tabbar__fab { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent); border: 4px solid var(--surface); color: var(--ink); transition: transform 160ms var(--ease-out-quart); }
.map-tabbar__fab svg { width: 26px; height: 26px; stroke-width: 2.2; }
.map-tabbar__report:hover .map-tabbar__fab { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }
.map-tabbar__report:active .map-tabbar__fab { transform: scale(.96); }
.map-surface { grid-area: map; position: relative; min-width: 0; min-height: 0; background: var(--soft); }
.map-overlay-top { position: absolute; z-index: 850; top: 12px; left: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.map-overlay-top > * { pointer-events: auto; }
.map-bottom-bar { position: absolute; z-index: 800; left: 12px; right: 12px; bottom: 52px; display: flex; flex-wrap: wrap-reverse; align-items: flex-end; justify-content: space-between; gap: 8px; pointer-events: none; }
.map-bottom-bar .basemap-switch { margin-left: auto; }
.map-bottom-bar > * { pointer-events: auto; }
.map-legend { margin: 0; padding: 7px 12px; gap: 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .6875rem; }
.map-legend .legend-dot { width: 8px; height: 8px; }
.map-panel { position: absolute; z-index: 1050; left: 0; right: 0; top: var(--topbar-h); bottom: var(--tabbar-h); display: none; flex-direction: column; min-height: 0; background: var(--surface); }
.map-page:is([data-view=locations],[data-view=about]) .map-panel,.map-page.has-detail .map-panel { display: flex; }
.panel-view { display: none; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 16px 44px; scrollbar-width: thin; }
.map-page[data-view=locations]:not(.has-detail) #locations-view,.map-page[data-view=about]:not(.has-detail) #about-view { display: block; }
.map-page.has-detail #feature-details:not([hidden]) { display: block; }
.map-page.has-detail .map-panel { top: auto; max-height: min(62dvh, 560px); border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; }
.panel-view--detail { padding-top: 22px; position: relative; }
.panel-view--detail::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border); }
#about-view > h2 { font-size: 1.125rem; margin-bottom: 8px; }
#about-view > p + p { margin-top: 8px; }
.search-section > label { margin-bottom: 8px; }
.status-chips { display: flex; gap: 6px; margin: 12px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 600; }
.status-chip .legend-dot { width: 8px; height: 8px; }
.status-chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.status-chip[aria-pressed=true]:hover { background: var(--ink); color: var(--surface); }
.filter-fold { margin-top: 8px; border-bottom: 1px solid var(--border); }
.filter-fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: .875rem; font-weight: 600; cursor: pointer; list-style: none; }
.filter-fold > summary::-webkit-details-marker { display: none; }
.filter-fold > summary::after { content: '+'; font-weight: 500; color: var(--muted); }
.filter-fold[open] > summary::after { content: '–'; color: var(--ink); }
.filter-fold[open] { padding-bottom: 16px; }
.filter-fold .section-heading { align-items: flex-start; margin: 0 0 12px; }
.filter-fold .section-heading .muted { font-size: .75rem; }
.results-section { padding-top: 16px; }
.results-section .section-heading { margin-bottom: 4px; }
#report-count { margin-top: 12px; }
.panel-partners { display: grid; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.panel-partners__marks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px 16px; align-items: center; justify-items: center; }
.panel-partners__marks img { width: auto; height: 36px; max-width: 100%; object-fit: contain; }
.panel-partners__marks .partner-ksamc,.panel-partners__marks .partner-dkri { height: 46px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-head h2 { font-size: 1.125rem; margin: 0; }
.detail-head .metadata { margin-top: 4px; }
.detail-head .icon-button { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-size: 1.125rem; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.detail-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: .75rem; font-weight: 600; text-transform: capitalize; }
.detail-chip .legend-dot { width: 8px; height: 8px; }
.detail-chip--issue { text-transform: none; }
.search-field { display: flex; align-items: center; gap: 8px; padding-left: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.search-field:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.search-field svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.search-field input { border: 0; padding-left: 0; background: transparent; min-width: 0; outline: none; }
.filter-stack { display: grid; gap: 12px; }
.date-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.date-grid label { font-size: .75rem; }
.date-grid input { padding: 8px 5px; font-size: .75rem; min-width: 0; }
.submission-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid color-mix(in oklch,var(--success),white 60%); border-radius: 999px; background: color-mix(in oklch,var(--success),white 94%); font-size: .75rem; }
.ref-copy { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; background: var(--soft); border: 1px solid var(--border); border-radius: 6px; }
.ref-copy code { flex: 1; min-width: 0; font-size: .8125rem; overflow-wrap: anywhere; user-select: all; }
.ref-copy button { min-height: 36px; padding: 6px 12px; flex-shrink: 0; }
.location-row { display: flex; width: 100%; align-items: center; text-align: left; gap: 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 12px 4px; font-weight: 400; }
.location-row>span:nth-child(2) { flex: 1; min-width: 0; }
.location-row strong { display: block; font-size: .875rem; font-weight: 600; overflow-wrap: anywhere; }
.location-row small { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.location-row[aria-pressed=true] { background: var(--soft); }
.location-row .row-count { font-size: .75rem; color: var(--muted); }
.location-row .row-arrow { color: var(--muted); font-size: 1.125rem; }
#search-results { margin-top: 12px; }
#map { width: 100%; height: 100%; background: oklch(94% .007 70); }
.leaflet-container { font-family: inherit; }
.leaflet-bottom.leaflet-left { bottom: 92px; }
.leaflet-bottom.leaflet-right { bottom: 30px; }
.basemap-switch { display: flex; border-radius: 999px; box-shadow: 0 1px 4px #0002; }
.basemap-switch button { min-height: 34px; padding: 6px 12px; border-radius: 0; font-size: .75rem; font-weight: 600; }
.basemap-switch button:first-child { border-radius: 999px 0 0 999px; border-right: 0; }
.basemap-switch button:last-child { border-radius: 0 999px 999px 0; }
.basemap-switch button[aria-pressed=true] { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.map-actions { position: absolute; z-index: 800; right: 12px; top: 64px; display: grid; gap: 8px; }
.map-actions button { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 10px; box-shadow: 0 1px 4px #0002; }
.map-actions svg { width: 18px; height: 18px; }
.map-notice { max-width: min(340px,100%); padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: .8125rem; text-align: center; box-shadow: 0 1px 4px #0002; }
.detail-list { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 10px 12px; margin: 16px 0; font-size: .875rem; line-height: 1.5; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-actions { display: grid; gap: 8px; margin-top: 16px; }
.detail-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; }
.detail-actions svg { width: 16px; height: 16px; }
.report-history { margin-top: 16px; scroll-margin-top: 8px; }
.report-history h3 { margin: 0 0 12px; font-size: .6875rem; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; color: var(--muted); }
.history-row { position: relative; display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 0 12px; padding-bottom: 16px; font-size: .875rem; }
.history-row:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.history-row > .legend-dot { width: 12px; height: 12px; margin-top: 3px; }
.history-row strong { display: block; font-weight: 600; }
.history-row p { margin: 6px 0 0; overflow-wrap: anywhere; }
.history-meta { display: block; margin-top: 2px; }
.history-row .photo-grid { grid-template-columns: repeat(auto-fill,minmax(64px,1fr)); gap: 8px; margin-top: 8px; }
.history-row .photo-grid img { height: 64px; border-radius: 8px; }
.photo-grid,.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: 12px; }
.photo-grid img,.photo-preview-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); display: block; }
.photo-card,.photo-preview-card { min-width: 0; margin: 0; }
.photo-card a,.photo-preview-card__meta { display: block; font-size: .75rem; overflow-wrap: anywhere; margin-top: 6px; }
.photo-preview-card__meta strong,.photo-preview-card__meta span { display: block; }
.photo-preview-card__meta span { color: var(--muted); }

/* Public form and staff tools share the same control vocabulary. */
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); min-height: 80px; }
.app-header .brand-group { width: 100%; justify-content: space-between; }
.report-page { max-width: 688px; margin: 0 auto; padding: 36px 24px 64px; }
.page-heading { margin-bottom: 24px; }
.page-heading p { margin-top: 8px; }
.form-section { display: grid; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.location-summary { padding: 16px; border: 1px solid var(--border); background: var(--soft); border-radius: 6px; }
.location-summary p { margin: 8px 0; }
.issue-group + .issue-group { margin-top: 20px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 8px; }
.issue-card { position: relative; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 10px; min-height: 52px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-weight: 500; cursor: pointer; }
.issue-route { margin: 0; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 6px; background: var(--accent); color: var(--ink); font-weight: 500; }
.issue-card:has(input:checked) { background: var(--accent); border-color: var(--ink); }
.issue-card input { position: absolute; opacity: 0; pointer-events: none; }
.issue-pictogram { width: 44px; height: 44px; border: 1px dashed color-mix(in srgb, var(--ink) 35%, var(--border)); border-radius: 4px; background: color-mix(in srgb, var(--accent) 28%, var(--soft)); }
.file-picker__input { display: none; }
.form-submit { display: grid; gap: 16px; }
.form-submit button { justify-self: start; min-width: 160px; }
.faq { margin-top: 36px; padding-top: 8px; }
.faq h2 { margin-bottom: 8px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 12px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; flex-shrink: 0; font-weight: 500; color: var(--muted); }
.faq-item[open] summary { color: var(--ink); }
.faq-item[open] summary::after { content: '–'; color: var(--ink); }
.faq-item[open] { background: linear-gradient(90deg, var(--accent) 0, var(--accent) 4px, transparent 4px); padding-left: 12px; margin-left: -12px; }
.faq-item p { margin: 0; padding: 0 0 16px; color: var(--muted); max-width: 52ch; }
.faq--compact { margin-top: 0; padding-top: 20px; }
.faq--compact h2 { margin-bottom: 4px; }
.faq--compact .faq-item summary { font-size: .8125rem; padding: 10px 0; }
.faq--compact .faq-item p { font-size: .8125rem; padding-bottom: 12px; }
.site-footer { margin-top: 32px; padding: 20px 0 8px; }
.site-footer__marks { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 24px; }
.site-footer__marks a,.site-footer__marks span { display: inline-flex; align-items: center; justify-content: center; }
.site-footer__marks img { width: auto; height: 48px; max-width: 160px; object-fit: contain; }
.site-footer__marks .partner-mark--lg { height: 64px; max-width: 220px; }
.site-footer--sidebar { margin: 16px 0 4px; padding: 12px 0 0; }
.site-footer--sidebar .site-footer__marks { gap: 12px 16px; }
.site-footer--sidebar .site-footer__marks img { height: 40px; max-width: 120px; }
.site-footer--sidebar .site-footer__marks .partner-mark--lg { height: 54px; max-width: 170px; }
.site-footer__social { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.site-footer__social a.site-footer__powered { display: inline-flex; align-items: center; gap: 8px; width: auto; height: auto; flex: none; margin-left: 12px; padding: 0; color: var(--muted); font-size: .75rem; white-space: nowrap; text-decoration: none; }
.site-footer__powered img { width: auto; height: 28px; max-width: 84px; object-fit: contain; }
.site-footer__social a.site-footer__powered:hover { background: transparent; border-radius: 0; color: var(--muted); }
.site-footer__follow { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.site-footer__follow-links { display: flex; align-items: center; }
.site-footer__social-label { width: auto; text-align: center; margin: 0; }
.site-footer__social a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--ink); text-decoration: none; }
.site-footer__social a:hover { background: var(--soft); color: var(--ink); border-radius: 6px; }
.site-footer__social svg { width: 22px; height: 22px; }
.site-footer__social .icon-instagram { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-footer__social .icon-linkedin { fill: currentColor; stroke: none; }
.site-footer--sidebar .site-footer__social { margin-top: 16px; padding-top: 12px; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 680ms var(--ease-out-quart), transform 680ms var(--ease-out-quart); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.saved-report-hit { width: 100%; text-decoration: none; margin-bottom: 8px; background: var(--accent); }
.login-page { background: var(--surface); min-height: 100dvh; display: grid; place-items: center; padding: 32px 24px; }
.login-panel { width: 100%; max-width: 360px; display: grid; gap: 24px; justify-items: center; }
.login-panel form,.login-panel > div { width: 100%; }
.login-panel h1 { margin-bottom: 8px; }
.track-card { display: grid; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: 8px; }
.track-card + .track-card { margin-top: 16px; }
.saved-reports { display: grid; gap: 8px; }
.saved-report-link { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; font-weight: 600; }
.saved-report-link span { color: var(--muted); font-size: .75rem; font-weight: 400; }
.saved-report-link { overflow-wrap: anywhere; }
.saved-report-link[aria-current="page"] { border-color: var(--ink); background: var(--soft); }
.track-list { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.report-result { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.saved-report-link .report-result__main { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: .875rem; font-weight: 400; }
.report-result__main .legend-dot { width: 8px; height: 8px; }
.track-resolution { display: grid; gap: 12px; }
.status-badge--closed { color: var(--muted); }
#track-error { margin-bottom: 16px; }
.followup-thread { display: grid; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.followup { padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--soft); font-size: .875rem; }
.followup div { display: flex; justify-content: space-between; gap: 16px; }
.followup time { color: var(--muted); font-size: .75rem; }
.followup p { margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.account-controls,.account-meta { display: flex; align-items: center; gap: 12px; }
.account-controls span,.account-meta span { overflow-wrap: anywhere; text-align: right; }
.eyebrow { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .075em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-search { gap: 8px; }
.picker-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.picker-toolbar .check-row { margin: 0; font-size: .8125rem; }
.picker-results { display: flex; flex-direction: column; gap: 3px; max-height: 320px; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--soft); padding: 6px; }
.location-picker .picker-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 0; min-height: 40px; border: 1px solid transparent; border-radius: 6px; transition: background-color .15s ease-out; }
.location-picker .picker-item:hover { background: var(--surface); }
.location-picker .picker-item.is-selected { background: var(--accent); border-color: var(--ink); }
.location-picker .picker-item.is-selected .picker-row__label { color: var(--ink); font-weight: 600; }
.location-picker .picker-bulk { display: flex; align-items: center; justify-content: center; min-height: 40px; margin: 0; padding: 0; cursor: pointer; }
.location-picker .picker-bulk input { margin: 0; }
.location-picker button.picker-row { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; min-height: 40px; padding: 8px 10px 8px 0; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-weight: 500; line-height: 1.35; text-align: left; box-shadow: none; }
.location-picker button.picker-row:hover,.location-picker button.picker-row:active { background: transparent; color: var(--ink); }
.location-picker .picker-item:hover button.picker-row,.location-picker .picker-item.is-selected button.picker-row { color: var(--ink); }
.location-picker .picker-row__label { font-size: .8125rem; font-weight: inherit; line-height: 1.35; }
.location-picker .picker-meta { font-size: .6875rem; color: var(--muted); font-weight: 400; line-height: 1.3; }
.empty-picker { padding: 12px; margin: 0; }
.location-confirm { display: grid; gap: 16px; }
.report-location-map { width: 100%; height: 220px; border: 1px solid var(--border); border-radius: 6px; background: var(--soft); }
.location-summary--confirmed { margin: 0; }
.location-summary--confirmed h3 { font-size: 1.125rem; margin-bottom: 6px; }
.account-invite-form { display: grid; grid-template-columns: minmax(220px,420px) 180px auto; align-items: end; gap: 12px; margin-bottom: 12px; }
.account-role-help { margin-bottom: 20px; }
#accounts-message { margin-bottom: 16px; }
.autosave-note { display: block; margin-top: 5px; }
.location-editor { display: grid; grid-template-columns: minmax(180px,280px) minmax(0,620px); gap: 32px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--soft); }
.location-editor>div p { margin-top: 8px; }
.location-picker { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.location-picker .picker-results { max-height: 320px; }
.location-editor-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#location-coordinate-map { width: 100%; height: 280px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.coordinate-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.coordinate-grid--pair { grid-template-columns: repeat(2,minmax(0,1fr)); }
.location-picker .picker-item.is-bulk-checked:not(.is-selected) { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.admin-page { background: var(--surface); }
.admin-shell { display: grid; grid-template-columns: 180px minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); min-height: 100dvh; }
.admin-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); min-height: 80px; }
.admin-nav { background: var(--soft); border-right: 1px solid var(--border); padding: 24px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.admin-nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; text-decoration: none; font-size: .8125rem; border-radius: 6px; color: var(--muted); border: 1px solid transparent; }
.admin-nav a[aria-current=page] { background: var(--accent); color: var(--ink); border-color: var(--ink); font-weight: 600; }
.admin-nav a[aria-current=page]:not(.public-map-link) { color: var(--ink); }
.admin-nav a:hover { background: var(--surface); color: var(--ink); }
.admin-nav .public-map-link { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); justify-content: space-between; }
.admin-nav-meta { margin: 8px 10px 0; font-size: .625rem; color: var(--muted); line-height: 1.5; }
.admin-content { width: 100%; max-width: 1472px; padding: 36px; min-width: 0; }
.admin-content .page-heading { margin-bottom: 28px; align-items: flex-start; }
.admin-content .page-heading h1 { margin-top: 0; }
.admin-content .page-heading p { margin-top: 8px; }
.admin-content>#admin-warning { margin-bottom: 24px; }
.toolbar { display: grid; grid-template-columns: minmax(200px,400px) 180px; gap: 16px; margin-bottom: 24px; }
.toolbar--ops { grid-template-columns: minmax(200px,1fr) repeat(3,minmax(140px,180px)); }
.ops-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; margin-bottom: 8px; }
.ops-stat { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--border); border-radius: 6px; background: var(--soft); text-align: left; cursor: pointer; }
.ops-stat strong { font-size: 1.5rem; letter-spacing: -.03em; }
.ops-stat span { font-size: .75rem; color: var(--muted); font-weight: 500; }
.ops-stat.is-warn { border-color: color-mix(in oklch, var(--error) 45%, var(--border)); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.data-table .is-overdue td:nth-child(5) .status-badge { box-shadow: inset 0 0 0 1px var(--error); }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; line-height: 1.5; }
.data-table th { background: var(--soft); font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.data-table th,.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td { min-width: 100px; }
.data-table td:first-child { min-width: 180px; }
.data-table .is-selected { background: var(--soft); }
.data-table td strong { font-weight: 600; }
.data-table code { font-size: .75rem; overflow-wrap: anywhere; }
.data-table button { padding: 8px 12px; }
.review-panel,.import-preview,.admin-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.review-panel>.section-heading { margin-bottom: 16px; }
.review-panel .detail-list { grid-template-columns: 100px 1fr; margin: 0; }
.review-panel .photo-grid { max-width: 640px; }
.narrow-form { max-width: 520px; }
.import-preview>p,.admin-section>p { margin: 8px 0 16px; }
.import-preview .actions { margin-top: 20px; }
.admin-section h2 { margin-bottom: 8px; }
#activity-more { margin-top: 16px; }
dialog { max-width: 480px; width: calc(100% - 32px); padding: 24px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink); background: var(--surface); }
.photo-dialog { max-width: min(920px, calc(100% - 32px)); padding: 12px; }
.photo-dialog img { width: 100%; max-height: 78vh; object-fit: contain; background: var(--soft); display: block; }
.photo-thumb { padding: 0; border: 0; background: transparent; width: 100%; min-height: 0; }
.photo-thumb:hover { background: transparent; }
dialog::backdrop { background: #16191e66; }
dialog p { margin-top: 12px; font-size: .875rem; overflow-wrap: anywhere; }
dialog .actions { margin-top: 24px; justify-content: end; }

@media (min-width: 768px) {
  select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23686c72' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
  .site-footer__marks { gap: 20px 28px; }
  .site-footer__marks img { height: 56px; max-width: 180px; }
  .site-footer__marks .partner-mark--lg { height: 72px; max-width: 240px; }
  .site-footer__powered img { height: 32px; max-width: 96px; }
  .app-header .partner-brand { margin-left: auto; }
  .map-page { --topbar-h: 72px; --tabbar-h: 0px; }
  .map-workspace { grid-template-columns: 88px minmax(0,1fr) auto; grid-template-rows: var(--topbar-h) minmax(0,1fr); grid-template-areas: "top top top" "tabs map panel"; }
  .map-topbar { padding: 0 16px 0 8px; gap: 20px; }
  .map-topbar .brand img { height: 52px; }
  .map-topbar__partners { display: flex; margin-left: auto; }
  .map-topbar__partners .partner-brand__marks { gap: 18px; }
  .map-topbar__partners img { height: 36px; }
  .map-tabbar { grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start; gap: 10px; padding: 16px 8px; border-top: 0; border-right: 1px solid var(--border); }
  .map-tabbar > a.map-tabbar__report { order: -1; margin: 0 0 8px; }
  .map-tabbar__fab { width: 52px; height: 52px; border: 0; border-radius: 16px; }
  .map-tabbar__report span:last-child { font-size: .6875rem; }
  .map-panel { position: relative; grid-area: panel; inset: auto; width: 400px; border-left: 1px solid var(--border); }
  .map-page.has-detail .map-panel { top: auto; max-height: none; border-top: 0; border-radius: 0; }
  .panel-view { padding: 20px; }
  .panel-view--detail { padding-top: 20px; }
  .panel-view--detail::before { display: none; }
  .status-chips { margin: 12px 0 0; padding: 0; flex-wrap: wrap; }
  .map-overlay-top { top: 16px; }
  .map-actions { right: 16px; top: 16px; }
  .map-bottom-bar { left: 16px; right: 16px; bottom: 28px; }
  .leaflet-bottom.leaflet-left { bottom: 68px; }
  .leaflet-bottom.leaflet-right { bottom: 0; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .map-topbar__partners > span { display: none; }
  .map-topbar__partners .partner-brand__marks { gap: 12px; }
  .map-topbar__partners .partner-brand__marks img { height: 28px; max-width: 96px; }
  .map-topbar__partners .partner-brand__marks .partner-ksamc,.map-topbar__partners .partner-brand__marks .partner-dkri { height: 34px; }
  .map-panel { width: 340px; }
}

@media (max-width: 767px) {
  .map-overlay-top { right: 64px; left: 64px; }
  .app-header { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; align-items: center; }
  .app-header .brand img,.admin-header .brand img { width: auto; height: 44px; min-width: 0; }
  .app-header .brand-group { gap: 8px; min-width: 0; flex: 1; }
  .app-header .partner-brand,.admin-header .partner-brand { display: inline-flex; flex-wrap: wrap; align-items: flex-start; padding-left: 8px; font-size: .5rem; gap: 4px 8px; white-space: normal; }
  .app-header .partner-brand > span,.map-brand .partner-brand > span { flex: 1 0 100%; line-height: 1.2; }
  .app-header .partner-brand img,.admin-header .partner-brand img { width: auto; height: 32px; max-width: 72px; }
  .app-header .partner-brand .partner-jcc,.app-header .partner-brand .partner-krc { height: 30px; max-width: 104px; }
  .app-header .partner-brand .partner-ksamc,.app-header .partner-brand .partner-dkri { height: 38px; max-width: 38px; }
  .app-header .partner-brand__marks { flex-wrap: wrap; gap: 6px 10px; }
  .form-submit.is-tucked { transform: translateY(100%); pointer-events: none; }
  .report-page { padding: 16px 16px 120px; }
  .report-page .site-footer { padding-bottom: 24px; }
  .report-location-map { height: 160px; }
  .issue-pictogram { display: none; }
  .issue-card { grid-template-columns: 1fr; min-height: 44px; padding: 10px 12px; font-size: .8125rem; }
  .form-submit { position: sticky; bottom: 0; z-index: 20; margin: 0 -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); transition: transform 180ms var(--ease-out-quart); }
  .form-submit button { justify-self: stretch; min-width: 0; }
  .two-columns { grid-template-columns: 1fr; }
  .account-controls { gap: 8px; }
  .account-controls span { max-width: 140px; font-size: .6875rem; }
  .account-controls button { padding: 8px; white-space: nowrap; }
  .admin-shell { display: block; }
  .admin-header { padding: 12px 16px; flex-wrap: wrap; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .admin-nav a { white-space: nowrap; padding: 10px 12px; }
  .admin-nav .public-map-link { margin: 0; padding-top: 10px; border-top: 0; }
  .admin-nav-meta { display: none; }
  .admin-content { padding: 24px 16px; }
  .toolbar { grid-template-columns: minmax(0,1fr) 130px; gap: 12px; }
  .toolbar--ops { grid-template-columns: 1fr 1fr; }
  .account-invite-form { grid-template-columns: 1fr; }
  .location-editor { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  #location-coordinate-map { height: 240px; }
  .coordinate-grid { grid-template-columns: 1fr; }
  .page-heading.section-heading { align-items: start; }
  .review-panel .detail-list { grid-template-columns: 80px minmax(0,1fr); }
}
/* iOS zooms into any field under 16px when it gets focus. */
@media (pointer: coarse), (max-width: 767px) {
  input,select,textarea,.date-grid input { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce), (scripting: none) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* Vibrant status colours */
.legend-dot.pending { color: #f59e0b; }
.legend-dot.down { color: #ef2b2d; }
.legend-dot.fixed { color: #16a34a; }