:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #090b0d;
  color: #f4f1e8;
  --red: #d84b3e;
  --line: #2b2e31;
  --muted: #a7aaad;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 80% 0%, #271514 0, #090b0d 38rem); }
header, main, footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.brand { color: #fff; font-weight: 800; letter-spacing: .03em; text-decoration: none; text-transform: uppercase; }
.hero { padding: 11vh 0 9vh; max-width: 900px; }
.eyebrow { color: var(--red); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(3rem, 8vw, 6.7rem); font-weight: 500; line-height: .96; margin: .3em 0; letter-spacing: -.045em; }
.lede { color: #c7c5be; font-size: clamp(1.1rem, 2vw, 1.45rem); line-height: 1.55; max-width: 760px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.actions a { color: #fff; border: 1px solid #56595c; padding: 13px 18px; text-decoration: none; border-radius: 3px; }
.actions .primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 750; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principles article { background: #101214; padding: 28px; }
.principles h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.principles p { color: var(--muted); line-height: 1.6; }
footer { margin-top: 80px; padding: 28px 0 45px; border-top: 1px solid var(--line); color: var(--muted); }
.page-intro { padding: 70px 0 34px; max-width: 830px; }
.page-intro h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
.notice { border-left: 4px solid var(--red); background: #151213; padding: 18px 20px; color: #d5d1c9; line-height: 1.55; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr); gap: 26px; align-items: start; }
.request-builder { grid-template-columns: minmax(0, 1fr); width: min(900px, 100%); }
.panel { background: #101214; border: 1px solid var(--line); padding: 28px; }
.panel h2 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 500; }
.step { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 24px; }
.step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.step h3 { margin: 0 0 15px; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
label { display: block; color: #d8d5cd; font-size: .92rem; margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 12px; background: #090b0d; color: #fff; border: 1px solid #464a4d; border-radius: 3px; font: inherit; }
textarea { resize: vertical; min-height: 76px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin: 12px 0; line-height: 1.45; }
.check input { width: auto; margin-top: 4px; accent-color: var(--red); }
.check label { margin: 0; }
.check small, .helper { display: block; color: var(--muted); line-height: 1.5; }
.output { position: sticky; top: 20px; }
.request-builder .output { position: static; }
.output textarea { min-height: 640px; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.request-builder .output textarea { min-height: 480px; }
button { appearance: none; border: 1px solid var(--red); background: var(--red); color: white; font: inherit; font-weight: 750; padding: 12px 18px; border-radius: 3px; cursor: pointer; }
button.secondary { background: transparent; border-color: #56595c; }
button.compact { padding: 7px 11px; font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.sources { margin: 55px 0; }
.sources li { margin: 10px 0; color: var(--muted); }
.sources a { color: #d9d6cf; }
.privacy-note { color: var(--muted); font-size: .86rem; line-height: 1.5; }
.agency-details { margin-top: 16px; padding: 16px; background: #0b0d0f; border: 1px solid var(--line); line-height: 1.5; }
.agency-details:empty { display: none; }
.agency-details strong { display: block; color: #fff; margin-bottom: 5px; }
.agency-details p { color: var(--muted); margin: 6px 0; }
.agency-details a { color: #e0dcd3; }
.verified { color: #86b997; font-size: .8rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
#camera-map { height: 390px; margin-top: 14px; background: #0b0d0f; border: 1px solid var(--line); border-radius: 3px; }
.camera-selection-bar { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.selected-cameras { display: grid; gap: 7px; }
.camera-chip { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: #0b0d0f; border: 1px solid var(--line); font: .78rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.camera-chip button { border: 0; padding: 2px 6px; background: transparent; color: #ddd; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #151719; color: #f4f1e8; }
.leaflet-popup-content button { width: 100%; margin-top: 8px; }
.submission-guide { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.submission-guide h3 { margin: 0 0 8px; text-transform: uppercase; font-size: .9rem; letter-spacing: .07em; }
.portal-button { display: block; padding: 12px 16px; margin-top: 12px; text-align: center; background: var(--red); color: white; text-decoration: none; font-weight: 750; border-radius: 3px; }
@media (max-width: 720px) {
  header span { display: none; }
  .principles { grid-template-columns: 1fr; }
  .builder { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .output { position: static; }
}
