/* Terrain Plow Tracker — brand tokens from terrainjh.com (Website Redesign handoff §3) */
@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;0,800;1,400&display=swap');

:root {
  --ink: #121212;
  --forest: #1e3a1e;
  --forest-2: #4a7a4a;
  --sage: #f0f7f0;
  --warm: #f5f3f0;
  --card: #ffffff;
  --line: #e4e0d9;
  --meta: #767676;
  --weather: #3a6b8a;
  --weather-2: #5a9ab5;
  --snow: #e9f2f7;
  --amber: #b7791f;
  --alert: #b54a3a;
  --plow: #1e3a1e;
  --shovel: #b7791f;
  --qa: #6b4e9b;
  --untracked: #8a8a8a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 18, 18, .05), 0 6px 24px rgba(18, 18, 18, .06);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--warm); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--forest); }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
.serif { font-family: var(--serif); }
.meta { color: var(--meta); font-size: 14px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: #cfc9be; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--forest); border-color: var(--forest); color: #fff; }
.btn.primary:hover { background: #17301a; }
.btn.warn { color: var(--alert); border-color: #e6c5bf; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .2px; background: var(--sage); color: var(--forest); white-space: nowrap; }
.chip.snow { background: var(--snow); color: var(--weather); }
.chip.amber { background: #fbf1df; color: var(--amber); }
.chip.alert { background: #f8e7e4; color: var(--alert); }
.chip.grey { background: #efefef; color: #555; }
.chip.qa { background: #efe9f7; color: var(--qa); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.dot.live { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30,58,30,.45); } 70% { box-shadow: 0 0 0 7px rgba(30,58,30,0); } 100% { box-shadow: 0 0 0 0 rgba(30,58,30,0); } }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.03); }

/* map markers (Leaflet divIcon + Google SVG share the look) */
.veh-marker { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); border: 2.5px solid #fff; position: relative; transition: transform .2s; }
.veh-marker svg { width: 20px; height: 20px; }
.veh-marker .arrow { position: absolute; top: -9px; left: 50%; width: 0; height: 0; margin-left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid currentColor; transform-origin: 6px 28px; }
.veh-label { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); background: rgba(18,18,18,.82); color: #fff; font: 700 11px var(--sans); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.home-marker { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--forest); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); display: grid; place-items: center; }
.home-marker svg { transform: rotate(45deg); width: 16px; height: 16px; color: #fff; }
.stop-pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.leaflet-container { font-family: var(--sans); background: #e8e6e1; }
.leaflet-control-attribution { font-size: 10px; }

.replay-banner { background: var(--forest); color: #e8efe8; font-size: 13px; text-align: center; padding: 6px 12px; }
.replay-banner b { color: #fff; }

/* soften OSM tiles so markers stand out (Google Maps replaces this when a key is set) */
.osm-muted .leaflet-tile-pane { filter: saturate(.55) brightness(1.04) contrast(.95); }
