/* ============================================================
   Шатахуун.мн — TEMPORARY ORDER
   Mongolian / ГОСТ road signage, specifically the yellow
   temporary traffic order.

   Grammar, applied everywhere:
     ground   = the regime.  Yellow while the order is in force,
                neutral once it lapses. Never a status.
     disc     = your answer. Shape carries meaning before colour
                does: circle regulates, triangle warns, dot is
                silence. Colour and glyph ride along.
     corners  = square. The only curves in the system are the
                status discs and the validity pill.
     depth    = none. Signage separates by field and rule, not
                by shadow. There are no shadows in this file.
   ============================================================ */

/* ---------------------------------------------------------- type */
@font-face {
  font-family: 'Sign';
  src: url('../fonts/oswald-mn.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+0400-04FF,
                 U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2039-203A,
                 U+2116, U+20AE, U+2212, U+2248, U+2264, U+2265;
}
@font-face {
  font-family: 'Body';
  src: url('../fonts/golos-mn.woff2') format('woff2-variations');
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+0400-04FF,
                 U+2010-2015, U+2018-201A, U+201C-201E, U+2026, U+2039-203A,
                 U+2116, U+2212, U+2248, U+2264, U+2265;
}

/* -------------------------------------------------------- tokens */
/* The scene is a driver in August daylight, often in glare, often
   in a car. Light is the primary mode; dark exists for night. */
:root {
  color-scheme: light;

  --page:      #F4F2ED;   /* enamel white */
  --panel:     #FFFFFF;
  --ink:       #16181A;
  --ink-2:     #4A4E52;
  --muted:     #74797E;
  --hairline:  #D8D5CC;
  --rule:      #16181A;

  --order:     #F6BE00;   /* temporary-order yellow — the regime ground */
  --order-ink: #16181A;
  --order-rule:#FFFFFF;   /* the inset border rule inside a sign */
  --lapsed:    #C9C6BE;   /* ground when the order is not in force */

  --go:        #007A3D;
  --stop:      #C8102E;
  --warn:      #E8A400;
  --unknown:   #8A8F94;
  --info:      #0B4C8C;   /* informational only: feed, sources, links */

  --go-wash:   #E4F0E8;
  --stop-wash: #F8E4E7;
  --warn-wash: #FCF0D4;
  --info-wash: #E6EDF5;

  --plate-ink: #16181A;
  --plate-face:#FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page:      #101214;
    --panel:     #191C1F;
    --ink:       #F4F2ED;
    --ink-2:     #B9BDC1;
    --muted:     #868B90;
    --hairline:  #2C3034;
    --rule:      #F4F2ED;
    /* retroreflective sheeting reads the same colour at night —
       the yellow does not change, which is literally true */
    --order-rule:#16181A;
    --lapsed:    #3A3E42;
    --go:        #12A055;
    --stop:      #E4344F;
    --warn:      #F0B420;
    --unknown:   #7B8085;
    --info:      #63A6E8;
    --go-wash:   #12301F;
    --stop-wash: #3A1219;
    --warn-wash: #33280A;
    --info-wash: #12243A;
    --plate-face:#EDEBE4;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:      #101214;
  --panel:     #191C1F;
  --ink:       #F4F2ED;
  --ink-2:     #B9BDC1;
  --muted:     #868B90;
  --hairline:  #2C3034;
  --rule:      #F4F2ED;
  --order-rule:#16181A;
  --lapsed:    #3A3E42;
  --go:        #12A055;
  --stop:      #E4344F;
  --warn:      #F0B420;
  --unknown:   #7B8085;
  --info:      #63A6E8;
  --go-wash:   #12301F;
  --stop-wash: #3A1219;
  --warn-wash: #33280A;
  --info-wash: #12243A;
  --plate-face:#EDEBE4;
}

/* --------------------------------------------------------- reset */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Body', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.sign :focus-visible { outline-color: var(--ink); }

/* Sign voice: condensed, uppercase, tight. Used for anything a
   driver reads at a glance — never for paragraphs. */
.t-sign {
  font-family: 'Sign', 'Body', system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.t-stamp {
  font-family: 'Sign', 'Body', system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--muted);
}
.num { font-family: 'Sign', system-ui, sans-serif; font-variant-numeric: tabular-nums; font-weight: 600; }

/* --------------------------------------------------------- shell */
.shell { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--page); }
.content { flex: 1; position: relative; overflow: hidden; }
.scrolly { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; }
/* Above phone width the app is a notice posted on a board rather
   than a column stranded in grey. Journalists and officials read
   it here, and it is what gets screenshotted into articles. */
@media (min-width: 561px) {
  body {
    background:
      repeating-linear-gradient(135deg,
        rgba(246,190,0,0.06) 0 14px, transparent 14px 28px),
      var(--ink);
  }
  .shell {
    min-height: 100dvh;
    border-left: 2px solid var(--rule);
    border-right: 2px solid var(--rule);
  }
}

/* -------------------------------------------------------- header */
.hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 2px solid var(--rule);
}
.brand {
  font-family: 'Sign', system-ui, sans-serif;
  font-weight: 700; font-size: 20px; letter-spacing: 0.02em;
  text-transform: uppercase; line-height: 1;
}
/* ".мн" as a small sign plate, not yellow text. Yellow on white is
   1.7:1 — the -webkit-text-stroke that used to prop it up does
   nothing in Firefox. Dark ink on the yellow plate is ~11:1. */
.brand em {
  font-style: normal;
  display: inline-block;
  background: var(--order); color: #16181A;
  padding: 1px 5px 2px; margin-left: 2px;
  font-size: 0.78em; vertical-align: 0.12em;
}
.hdr-btns { margin-left: auto; display: flex; gap: 6px; }

.icon-btn {
  min-width: 40px; height: 40px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 2px solid var(--rule); background: var(--panel);
  font-family: 'Sign', system-ui, sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.icon-btn:active { background: var(--ink); color: var(--page); }
.icon-btn:active .ico { fill: var(--page); }

.ico { width: 20px; height: 20px; fill: var(--ink); flex: none; display: block; }
.ico-sm { width: 16px; height: 16px; }

/* ------------------------------------------------- validity strip */
/* The order's window, stated permanently. Answers "when does this
   end" — the question rumour fills in when the product does not. */
.validity {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: var(--order); color: var(--order-ink);
  border-bottom: 2px solid var(--rule);
  font-family: 'Sign', system-ui, sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.validity.lapsed { background: var(--lapsed); color: var(--ink); }
.validity .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--order-ink); flex: none; }
.validity .vsep { margin-left: auto; font-weight: 500; opacity: 0.75; letter-spacing: 0.04em; }

.demo-banner {
  background: repeating-linear-gradient(45deg, var(--order) 0 12px, var(--ink) 12px 24px);
  padding: 0; border-bottom: 2px solid var(--rule);
}
.demo-banner span {
  display: block; margin: 4px 0; padding: 4px 14px;
  background: var(--page); color: var(--ink);
  font-family: 'Sign', system-ui, sans-serif; font-size: 12px;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center;
}

/* ==================================================== TODAY  ==== */

/* --------------------------------------------------- the sign --- */
.sign {
  position: relative;
  background: var(--order);
  color: var(--order-ink);
  padding: 22px 20px 20px;
}
.sign.lapsed { background: var(--lapsed); color: var(--ink); }
.sign::after {
  content: ''; position: absolute; inset: 7px;
  border: 3px solid var(--order-rule);
  pointer-events: none;
}
.sign > * { position: relative; z-index: 1; }
.sign-inner { padding: 10px 8px 4px; }

.sign-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }

/* the plate is the control: tap it to change your digit */
.plate {
  flex: none;
  display: flex; align-items: center; gap: 7px;
  background: var(--plate-face); color: var(--plate-ink);
  border: 2px solid var(--plate-ink);
  padding: 5px 9px 5px 7px;
  cursor: pointer;
}
.plate:active { background: var(--plate-ink); color: var(--plate-face); }
.plate:active .plate-band { background: var(--plate-face); }
.plate-band { width: 4px; align-self: stretch; background: var(--info); }
.plate-lab { font-family: 'Sign', system-ui, sans-serif; font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.72; }
.plate-num { font-family: 'Sign', system-ui, sans-serif; font-size: 26px; font-weight: 700; line-height: 0.95; font-variant-numeric: tabular-nums; }
.plate-num.empty { opacity: 0.42; }
.plate-txt { display: flex; flex-direction: column; align-items: flex-start; }

.sign-parity {
  margin-left: auto; text-align: right;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  line-height: 1.3; opacity: 0.82;
}
.sign-parity b { display: block; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; opacity: 1; }

.sign-body { display: flex; align-items: center; gap: 16px; }

/* The one authored moment: choosing a digit re-sets the sign as a
   single surface, the way a variable message sign changes state —
   the panel restamps, then the disc lands. Not a per-element
   entrance scattered across the page. */
@keyframes sign-restamp {
  from { opacity: 0.15; transform: translateY(-3px); }
  to   { opacity: 1;    transform: none; }
}
@keyframes disc-land {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: none; }
}
.sign.set .sign-inner { animation: sign-restamp 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
.sign.set .disc-xl    { animation: disc-land 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both; }
@media (prefers-reduced-motion: reduce) {
  .sign.set .sign-inner, .sign.set .disc-xl { animation: none; }
}
.sign-say { min-width: 0; }
.sign-title { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-weight: 700; font-size: 27px; line-height: 1.03; letter-spacing: 0.005em; text-wrap: balance; }
.sign-sub { margin-top: 7px; font-size: 13.5px; line-height: 1.35; opacity: 0.86; }
.sign-next { margin-top: 10px; padding-top: 9px; border-top: 2px solid rgba(22,24,26,0.22); font-size: 13.5px; }
.sign.lapsed .sign-next { border-top-color: var(--hairline); }
.sign-next b { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.02em; font-size: 15px; }

/* ------------------------------------------------------- discs --- */
/* Shape regulates before colour does:
     circle   → regulatory (permitted / prohibited)
     triangle → warning    (single report, disputed)
     dot      → silence    (no data) */
.disc { flex: none; display: grid; place-items: center; position: relative; }
.disc svg { display: block; }
.disc-xl { width: 92px; height: 92px; }
.disc-md { width: 34px; height: 34px; }
.disc-sm { width: 24px; height: 24px; }
.disc-xs { width: 16px; height: 16px; }

/* --------------------------------------------------- day plates --- */
.section { padding: 16px 14px 4px; }
.section-h {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 13px; font-weight: 700; letter-spacing: 0.07em;
}
.section-h .more { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }

.days { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.day {
  position: relative; aspect-ratio: 1 / 1.1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 2px solid var(--rule);
  background: var(--panel); color: var(--ink);
}
.day.mine { background: var(--ink); color: var(--page); border-color: var(--ink); }
.day.past { opacity: 0.34; }
.day-n { font-family: 'Sign', system-ui, sans-serif; font-size: 16px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.day-w { font-family: 'Sign', system-ui, sans-serif; font-size: 8.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
/* today is ringed, the way a control point is ringed on an order */
.day.today::after {
  content: ''; position: absolute; inset: -5px;
  border: 3px solid var(--stop);
  pointer-events: none;
}
.days-key { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.days-key span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.swatch { width: 13px; height: 13px; border: 2px solid var(--rule); flex: none; }
.swatch.fill { background: var(--ink); }
.swatch.ring { border-color: var(--stop); }

/* ------------------------------------------------ digit picker --- */
.picker { padding: 0 14px; }
.picker-in { border: 2px solid var(--rule); background: var(--panel); padding: 12px; }
.picker-h { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: 0.07em; color: var(--ink-2); margin-bottom: 9px; }
.digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.digit {
  aspect-ratio: 1; border: 2px solid var(--rule); background: var(--page);
  font-family: 'Sign', system-ui, sans-serif; font-size: 21px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.digit:active { background: var(--ink); color: var(--page); }
.digit.sel { background: var(--ink); border-color: var(--ink); color: var(--page); }

/* ---------------------------------------------------- fact rows --- */
.facts { border-top: 2px solid var(--rule); }
.fact {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--hairline);
  font-size: 13.5px;
}
.fact:last-child { border-bottom: 0; }
.fact dt { flex: none; width: 40%; font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.fact dd { margin: 0; flex: 1; }
.fact dd b { font-family: 'Sign', system-ui, sans-serif; font-size: 15px; letter-spacing: 0.01em; }

/* ------------------------------------------------------ actions --- */
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 12px;
  border: 2px solid var(--rule); background: var(--panel); color: var(--ink);
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-align: center;
}
.btn:active:not(:disabled) { background: var(--ink); color: var(--page); }
.btn:active:not(:disabled) .ico { fill: var(--page); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.solid { background: var(--ink); color: var(--page); }
.btn.solid .ico { fill: var(--page); }
.btn.solid:active { background: var(--ink-2); }
.btn.wide { grid-column: 1 / -1; width: 100%; }
.btn.go   { border-color: var(--go);   color: var(--go);   background: var(--go-wash); }
.btn.stop { border-color: var(--stop); color: var(--stop); background: var(--stop-wash); }
.btn.go .ico { fill: var(--go); } .btn.stop .ico { fill: var(--stop); }
.btn.on { background: var(--ink); color: var(--page); border-color: var(--ink); }
.btn.on .ico { fill: var(--page); }

/* --------------------------------------------- notice / panels --- */
.notice { margin: 0 14px 14px; border: 2px solid var(--rule); background: var(--panel); }
.notice-h {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px;
  border-bottom: 2px solid var(--rule); background: var(--info-wash);
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em;
}
.notice-h .ico { fill: var(--info); }
.notice-b { padding: 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.notice-b p { margin: 0 0 8px; }
.notice-b p:last-child { margin-bottom: 0; }

.state-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 11px;
  border: 2px solid currentColor;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em;
}
.state-pill.go   { color: var(--go);   background: var(--go-wash); }
.state-pill.stop { color: var(--stop); background: var(--stop-wash); }
.state-pill.warn { color: var(--ink);  background: var(--warn-wash); }

/* ------------------------------------------------------- q & a --- */
.qa { border-top: 1px solid var(--hairline); }
.qa summary {
  list-style: none; cursor: pointer; padding: 11px 0;
  display: flex; align-items: center; gap: 10px;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ico { margin-left: auto; transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1); }
.qa[open] summary .ico { transform: rotate(180deg); }
.qa p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

.sources { padding: 12px 0 4px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.sources a { font-weight: 600; }

/* ===================================================== MAP ====== */
.tab-map { position: absolute; inset: 0; display: flex; flex-direction: column; }
.map-bar { display: flex; gap: 7px; align-items: center; padding: 9px 12px; background: var(--panel); border-bottom: 2px solid var(--rule); }
.seg { display: flex; border: 2px solid var(--rule); background: var(--panel); }
.seg-btn {
  padding: 7px 11px; min-height: 34px;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; color: var(--ink-2);
}
.seg-btn + .seg-btn { border-left: 2px solid var(--rule); }
.seg-btn.on { background: var(--ink); color: var(--page); }
.map-bar .icon-btn { margin-left: auto; }

.map-note {
  display: flex; align-items: center; gap: 8px; padding: 6px 13px;
  background: var(--panel); border-bottom: 1px solid var(--hairline);
  font-family: 'Sign', system-ui, sans-serif; font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted);
}
.map-note .live { width: 7px; height: 7px; border-radius: 50%; background: var(--go); flex: none; }
.map-note .cnt { margin-left: auto; color: var(--ink-2); font-weight: 600; }

.map-body { flex: 1; position: relative; }
#map-canvas { position: absolute; inset: 0; background: var(--hairline); }
#map-list { position: absolute; inset: 0; overflow-y: auto; background: var(--page); padding: 10px 12px 20px; }

/* dark mode: the OSM raster is a daylight map — knock it back
   rather than shipping a glowing white rectangle at night */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.7); }
}
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.7); }

.map-legend {
  display: flex; flex-wrap: wrap; gap: 5px 13px; padding: 8px 12px;
  border-top: 2px solid var(--rule); background: var(--panel);
  font-size: 11px; color: var(--ink-2);
}
.lg { display: inline-flex; align-items: center; gap: 5px; }

/* markers */
.mk-wrap { background: none; border: none; }
.mk-wrap .disc { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }
.mk-truck { position: absolute; top: -7px; right: -9px; }
/* A cluster is a count of stations nobody has reported on. It is
   silence, so it whispers: small, unfilled, muted. It must never
   outweigh a single real report sitting next to it. */
.cluster {
  display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--panel); border: 2px solid var(--unknown); color: var(--muted);
  font-family: 'Sign', system-ui, sans-serif; font-weight: 600;
  font-variant-numeric: tabular-nums; opacity: 0.88;
}
.cluster b { display: block; font-size: 12px; line-height: 1; }

/* station rows */
.strow {
  display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--panel); border: 2px solid var(--rule); padding: 11px 12px; margin-bottom: 7px;
}
.strow:active { background: var(--info-wash); }
.strow.quiet { border-color: var(--hairline); background: transparent; }
.strow-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.strow-name { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 14.5px; font-weight: 600; letter-spacing: 0.015em; line-height: 1.2; }
.strow-sub { font-size: 12.5px; color: var(--ink-2); }
.strow-dist { flex: none; font-family: 'Sign', system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.strow-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
  padding: 3px 6px; border: 1.5px solid var(--hairline); color: var(--ink-2);
}
.chip.truck { border-color: var(--warn); background: var(--warn-wash); color: var(--ink); }
.chip.q3 { border-color: var(--stop); color: var(--stop); }
.st-go { color: var(--go); font-weight: 600; }
.st-warn { color: var(--ink); font-weight: 600; }
.st-stop { color: var(--stop); font-weight: 600; }
.st-none { color: var(--muted); }

/* the cold start is a state worth designing, not an accident */
.empty { border: 2px dashed var(--hairline); padding: 20px 16px; text-align: center; margin: 8px 0 14px; }
.empty .disc { margin: 0 auto 12px; }
.empty h3 { margin: 0 0 6px; font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.empty p { margin: 0 auto; max-width: 34ch; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ------------------------------------------------ bottom sheet --- */
.sheet { position: fixed; inset: 0; pointer-events: none; z-index: 1200; }
.sheet.open { pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 11, 12, 0.5); opacity: 0; transition: opacity 0.22s ease; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--page); border-top: 3px solid var(--rule);
  padding: 0 0 calc(14px + env(safe-area-inset-bottom));
  max-height: 88dvh; overflow-y: auto;
  transform: translateY(14px); opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease;
}
.sheet.open .sheet-panel { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sheet-panel, .sheet-backdrop { transition: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 12px; border-bottom: 2px solid var(--rule); }
.sheet-title { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 17px; font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; }
.sheet-meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.sheet-sec { padding: 13px 14px; border-bottom: 1px solid var(--hairline); }
.sheet-sec:last-child { border-bottom: 0; }
.fuel-line { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; }
.fuel-line .lab { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; width: 62px; flex: none; }

/* the report form — ONE submission, not one per tap */
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rep-grid.q4 { grid-template-columns: repeat(4, 1fr); }
.rep-grid.q4 .btn { font-size: 11px; padding: 8px 3px; letter-spacing: 0.02em; min-height: 42px; }
.rep-lab { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); margin: 12px 0 7px; }
.rep-lab:first-child { margin-top: 0; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--hairline); }
.hist-row:first-child { border-top: 0; }
.hist-row .when { font-family: 'Sign', system-ui, sans-serif; font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; flex: none; }
.cooldown { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 2px solid var(--hairline); font-size: 13px; color: var(--ink-2); }

/* ==================================================== FEED ====== */
.feed-item { margin: 0 0 10px; border: 2px solid var(--rule); background: var(--panel); }
.feed-item.pinned { border-color: var(--order); border-width: 3px; }
.feed-top { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-bottom: 1px solid var(--hairline); }
.feed-when { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 11px; font-weight: 500; letter-spacing: 0.07em; color: var(--muted); }
.feed-flag { margin-left: auto; font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; padding: 2px 6px; background: var(--order); color: var(--order-ink); }
.feed-b { padding: 11px 12px 13px; }
.feed-title { font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 15.5px; font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; }
.feed-body { margin-top: 7px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.feed-act { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; }
.feed-act .ico { fill: var(--info); }
.tel {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 9px 12px; border: 2px solid var(--go); background: var(--go-wash); color: var(--go);
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em; text-decoration: none;
}
.tel .ico { fill: var(--go); }

/* ------------------------------------------------- bottom nav --- */
.bottom-nav { display: flex; border-top: 2px solid var(--rule); background: var(--panel); padding-bottom: env(safe-area-inset-bottom); }
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px 9px; color: var(--muted); min-height: 54px;
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em;
}
.nav-btn .ico { fill: var(--muted); }
.nav-btn.on { color: var(--ink); }
.nav-btn.on .ico { fill: var(--ink); }
.nav-btn.on::before { content: ''; position: absolute; }
.nav-btn { position: relative; }
.nav-btn.on { box-shadow: inset 0 3px 0 var(--order); }

/* ------------------------------------------------------ toast --- */
.toast {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%) translateY(10px);
  background: var(--ink); color: var(--page);
  font-family: 'Sign', system-ui, sans-serif; text-transform: uppercase;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em;
  padding: 10px 15px; opacity: 0; z-index: 1500; max-width: 86vw; text-align: center;
  transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* leaflet chrome */
.leaflet-container { font: inherit; background: var(--hairline); }
.leaflet-control-attribution { font-size: 9px; }
.leaflet-bar a { border-radius: 0 !important; }
