/* Public eyewitness form and status page (/report, /report/status).
   Same visual system as the operator console (#247): dark only, one typeface (Science Gothic,
   text at width 85, logo at width 200), hairline 2 px corners on controls, square flat panels,
   no shadows or gradients on the content; the only decoration is the operator's backdrop. Tokens are copied from web/src/minimal.css and
   web/src/messagePanel.css — media must run without the web/ build, so nothing is imported.
   Amber is the operator's colour for the «Сообщения» layer, the layer these reports land on.
   Mobile first. Fonts are self-hosted (CSP font-src 'self', fonts/README.md). */
@font-face {
  font-family: "Science Gothic";
  src: url("/media/static/fonts/ScienceGothic-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 85% 200%;
  font-display: swap;
}
:root {
  --radius: 2px;        /* controls */
  --radius-panel: 0;    /* panels and cards */

  --bg: #08090b;
  --panel: #0d1113f2;   /* operator .search-panel: the backdrop shows through a little */
  --control: #171b1e;
  --control-hover: #1d2226;
  --field: rgba(233, 237, 239, .07);
  --field-focus: rgba(233, 237, 239, .11);
  --field-line: rgba(233, 237, 239, .45);
  --field-line-focus: #d5e0e4;

  --ink: #e9edef;
  --ink-strong: #edf3f5;
  --ink-soft: #c4cdd1;
  --muted: #aab5ba;     /* 8.9:1 on --bg, 8.2:1 on --panel */
  --faint: #929da2;     /* 6.6:1 on --panel: kickers and captions only */
  --line: #ffffff18;
  --line-strong: #ffffff24;
  --line-hover: #ffffff44;

  --accent: #e0ad64;    /* operator «Сообщения» */
  --focus: #c7d4da;
  --bad: #ff9486;
  --ok: #9fd8bd;
  --sos-bg: #2a1511;
  --sos-line: #6a3226;
  --sos-num: #ff9d84;

  font-family: "Science Gothic", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial,
    sans-serif;
  font-stretch: 85%;
  font-variation-settings: "wdth" 85;
  font-synthesis: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body { font-size: 17px; line-height: 1.5; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; font-variation-settings: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.hidden { display: none !important; }
.m0 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- backdrop (operator web/src/backdrop.css; drawn by backdrop.js) ----------
   The gradient is the still fallback when WebGL is unavailable. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1200px 900px at 68% 38%, #15181b 0%, transparent 62%),
    radial-gradient(900px 700px at 12% 92%, #0d1012 0%, transparent 60%),
    linear-gradient(180deg, #07090b 0%, #030405 100%); }
.backdrop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop-grain { position: absolute; inset: 0; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- top line and header (operator .topbar) ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 20;
  pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent);
  transform-origin: 0 50%; transform: scaleX(0); transition: transform .4s ease; }
.top { display: flex; align-items: center; height: 64px; max-width: 1180px; margin: 0 auto;
  padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #eef1f2; text-decoration: none;
  font-size: 19px; font-weight: 600; font-stretch: 200%; font-variation-settings: "wdth" 200;
  letter-spacing: .01em; }
.brand-mark { width: 20px; height: 20px; flex: none; fill: none; stroke: #e6ecee; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- layout ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 8px 16px 72px; }
.hero { padding: 20px 0 4px; }
.hero h1 { margin: 0; color: var(--ink-strong); font-size: clamp(30px, 8.6vw, 44px); font-weight: 700;
  line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin: 14px 0 0; max-width: 36ch; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* Safety block: the emergency line stands out; the other lines are calm facts. */
.notice { margin-top: 22px; background: var(--panel); border-radius: var(--radius-panel); }
.notice .sos { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  margin: 0; padding: 16px 18px; background: var(--sos-bg); border-left: 3px solid var(--sos-num);
  font-size: 16px; line-height: 1.4; color: var(--ink-strong); }
.sos-num { font-size: 38px; font-weight: 700; line-height: 1; font-stretch: 100%;
  font-variation-settings: "wdth" 100; letter-spacing: -.02em; color: var(--sos-num); }
.sos a { color: var(--sos-num); font-weight: 700; }
.notice .fact { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  margin: 0; padding: 12px 18px; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.notice .fact + .fact { border-top: 1px solid var(--line); }
.notice .fact:first-of-type { padding-top: 14px; }
.notice .fact:last-child { padding-bottom: 16px; }
.fact svg { width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--muted);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.flow { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; min-width: 0; }
.card { position: relative; background: var(--panel); border: 0; border-radius: var(--radius-panel);
  padding: 20px 18px; }
.closed { margin: 0; font-weight: 600; }

/* ---------- steps ---------- */
fieldset.step { margin: 0; min-width: 0; }
.step legend { float: left; width: 100%; padding: 0; margin: 0 0 14px; display: flex;
  flex-direction: column; gap: 4px; }
.step > :not(legend) { clear: both; }
.step-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 550;
  letter-spacing: .04em; color: var(--faint); }
.step-kicker .ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok);
  font-weight: 600; opacity: 0; transition: opacity .2s; }
.step-kicker .ok svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.step.is-done .step-kicker .ok { opacity: 1; }
.step-title { font-size: 21px; font-weight: 650; line-height: 1.2; color: var(--ink-strong); }
.step-title .opt { font-size: 15px; font-weight: 450; color: var(--muted); }
.hint { margin: -4px 0 12px; font-size: 15px; color: var(--muted); }

label { display: block; margin: 16px 0 6px; font-size: 15px; font-weight: 550; color: var(--ink-soft); }
#tz { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--faint); }

/* Fields: operator .search-box — filled, bottom line only. */
input[type=text], input[type=number], input[type=datetime-local], select, textarea {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; font-size: 17px;
  background: var(--field); border: 0; border-bottom: 1px solid var(--field-line);
  border-radius: var(--radius); color: #f2f5f6; transition: border-color .15s, background-color .15s;
  -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; background: var(--field-focus);
  border-bottom-color: var(--field-line-focus); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus);
  outline-offset: 2px; }
textarea { min-height: 128px; resize: vertical; line-height: 1.45; }
::placeholder { color: var(--muted); opacity: 1; }
select { padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%23aab5ba' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; }
select option { background: var(--control); color: var(--ink); }
input[type=datetime-local] { min-width: 0; }
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.8); }
input[aria-invalid=true], textarea[aria-invalid=true] { border-bottom-color: var(--bad); }
.error { margin-top: 6px; font-size: 15px; font-weight: 550; color: var(--bad); }
.error:empty { margin-top: 0; }
.error.info { color: var(--muted); font-weight: 450; }

/* Category choices: operator buttons, the chosen one inverted. */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chips label { position: relative; margin: 0; font-weight: 550; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip { display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  height: 100%; min-height: 96px; padding: 14px; border-radius: var(--radius);
  background: var(--control); border: 1px solid var(--line-hover); color: var(--ink); font-size: 16px;
  line-height: 1.25; overflow-wrap: break-word; hyphens: auto; cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s; }
.chip svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.chips label:hover .chip { background: var(--control-hover); border-color: var(--field-line); }
.chips input:checked + .chip { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips input:focus-visible + .chip { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---------- map: dark tiles, operator zoom buttons ---------- */
.minimap { height: 300px; margin-top: 4px; border-radius: var(--radius-panel); background: var(--control);
  overflow: hidden; isolation: isolate; }
.leaflet-container { font-family: inherit; background: var(--control) !important; }
.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.8) contrast(.92) saturate(.25); }
.leaflet-bar { border: 0 !important; box-shadow: none !important; border-radius: var(--radius) !important;
  overflow: hidden; }
.leaflet-bar a { width: 40px !important; height: 40px !important; line-height: 40px !important;
  font-size: 20px !important; background: var(--control) !important; color: var(--ink) !important;
  border-bottom: 1px solid var(--line) !important; }
.leaflet-bar a:hover { background: var(--control-hover) !important; }
.leaflet-control-attribution { font-size: 11px; background: rgba(8, 9, 11, .78) !important;
  color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--ink-soft) !important; }
.leaflet-attribution-flag { display: none !important; }  /* Leaflet 1.9 prefix flag: not ours to show */
.pin { background: none; border: 0; }
.pin span { position: absolute; left: 15px; top: 38px; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--accent); }  /* centred on the divIcon anchor (15, 38) */

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.toolbar .btn { font-size: 15px; padding-inline: 13px; justify-content: flex-start; text-align: left; }

/* Buttons: operator .mp-actions. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--control-hover); color: #e9eef0; font-weight: 600; font-size: 15px; line-height: 1.2;
  text-align: center; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.btn:hover { border-color: var(--line-hover); }
.btn svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding-inline: 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--field); }
.btn.primary { width: 100%; min-height: 56px; border: 0; background: var(--ink); color: var(--bg);
  font-size: 17px; font-weight: 650; }
.btn.primary:hover { background: #ffffff; }
.btn:disabled { opacity: .6; cursor: progress; }

details { margin-top: 14px; }
summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer;
  font-size: 15px; font-weight: 550; color: var(--ink-soft); list-style: none; }
summary:hover { color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
details[open] summary::before { transform: rotate(45deg); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row > * { min-width: 0; }
.when { display: grid; grid-template-columns: 1fr; gap: 0 14px; }

/* photos */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.drop { display: flex; align-items: center; gap: 14px; margin: 0; padding: 16px; min-height: 80px;
  border: 1px dashed var(--line-hover); border-radius: var(--radius); background: transparent;
  color: var(--ink); font-weight: 550; font-size: 16px; cursor: pointer;
  transition: border-color .15s, background-color .15s; }
.drop:hover { border-color: var(--field-line-focus); background: var(--field); }
.file-input:focus-visible + .drop { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--radius); background: var(--control); color: var(--ink); }
.drop-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.drop small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--muted); }
.shots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.shots:empty { display: none; }
.shots img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); }
.shots .btn { min-height: 40px; }

/* submit */
.submit-card { display: flex; flex-direction: column; gap: 14px; }
.submit-card .error { margin: 0; }
.privacy { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 0; font-size: 14px;
  line-height: 1.45; color: var(--muted); }
.privacy svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- done + status ---------- */
.done:focus { outline: none; }
.done-mark { width: 48px; height: 48px; margin-bottom: 12px; }
.done-mark circle { fill: none; stroke: var(--line-hover); stroke-width: 2; }
.done-mark path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round;
  stroke-linejoin: round; }
.done-title { margin: 0; color: var(--ink-strong); font-size: 24px; font-weight: 700; line-height: 1.2; }
.num { margin: 4px 0 14px; font-size: 24px; font-weight: 650; font-stretch: 100%;
  font-variation-settings: "wdth" 100; letter-spacing: .02em; font-variant-numeric: tabular-nums;
  color: var(--accent); overflow-wrap: anywhere; }
.done p { margin: 0 0 12px; }
.done .done-label { margin: 14px 0 0; }
.done .btns { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 18px; }
.done .btns .btn { width: 100%; }
.copied { min-height: 1.4em; margin: -8px 0 12px !important; font-size: 14px; color: var(--ok); }
.copied:empty { margin: 0 !important; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.track { list-style: none; margin: 4px 0 20px; padding: 0; display: grid; gap: 0; }
.track li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  align-items: start; padding-bottom: 18px; color: var(--muted); }
.track li:last-child { padding-bottom: 0; }
.track li::before { content: ""; width: 12px; height: 12px; margin: 5px 8px 0; border-radius: 50%;
  border: 1.5px solid var(--line-hover); background: var(--panel); z-index: 1; }
.track li::after { content: ""; position: absolute; left: 13.5px; top: 19px; bottom: 0; width: 1px;
  background: var(--line-strong); }
.track li:last-child::after { display: none; }
.track li.done { color: var(--ink-soft); }
.track li.done::before { background: var(--ink); border-color: var(--ink); }
.track li.now { color: var(--ink-strong); font-weight: 650; }
.track li.now::before { background: var(--accent); border-color: var(--accent); }
.track small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.back { margin-top: 18px; }

/* ---------- narrow phones ---------- */
@media (max-width: 359px) {
  .chips { grid-template-columns: minmax(0, 1fr); }
  .chip { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 56px; }
  .card { padding: 18px 14px; }
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .card { padding: 24px; }
  .when { grid-template-columns: 1.3fr 1fr; }
  .done .btns { flex-direction: row; flex-wrap: wrap; }
  .done .btns .btn { width: auto; }
}
/* Desktop: operator layout — a 360 px column on the left, the work on the right. */
@media (min-width: 1100px) {
  .top { height: 72px; padding: 0 42px; }
  .brand { font-size: 26px; gap: 12px; }
  .brand-mark { width: 26px; height: 26px; }
  .page { display: grid; grid-template-columns: 360px minmax(0, 640px); gap: 64px; align-items: start;
    padding: 24px 42px 96px; }
  .hero { position: sticky; top: 24px; padding: 0; }
  .hero h1 { font-size: 36px; }
  .flow { margin-top: 0; }
  .minimap { height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important;
    scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .chips input:checked + .chip { border: 3px solid CanvasText; }
}
