/* WEES Travel board — bold, glanceable traffic cards for on-air / web / wallboard.
   Dark by default (reads well on a studio screen); light follows the device.
   Transparent in embed mode so it drops onto the station site. */
:root {
  color-scheme: dark light;
  --bg: #0a1420; --surface: #0e1c27; --surface2: #13242f; --line: #22333f;
  --ink: #eaf2f5; --muted: #90a6b1; --teal: #3f8ea7; --lime: #82c341;
  --closure: #e5484d; --accident: #ff8c42; --roadworks: #f5b800; --jam: #3f8ea7; --hazard: #9b59b6; --event: #6b7280;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f7f9; --surface: #fff; --surface2: #eef3f5; --line: #dde6ea; --ink: #0a1620; --muted: #5a6b76; }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; }
body.embed { background: transparent; }

.board { padding: 18px; max-width: 1200px; margin: 0 auto; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.board-head h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.01em; }
.board-head .region { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.lg { font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); white-space: nowrap; }
.lg b { font-weight: 800; }
.lg-closure { border-color: var(--closure); } .lg-accident { border-color: var(--accident); }
.lg-roadworks { border-color: var(--roadworks); } .lg-jam { border-color: var(--jam); }
.lg-hazard { border-color: var(--hazard); } .lg-event { border-color: var(--event); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.box { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--event);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.18);
  transition: transform .12s ease; }
.box:hover { transform: translateY(-2px); }
.box-closure { border-left-color: var(--closure); } .box-accident { border-left-color: var(--accident); }
.box-roadworks { border-left-color: var(--roadworks); } .box-jam { border-left-color: var(--jam); }
.box-hazard { border-left-color: var(--hazard); } .box-event { border-left-color: var(--event); }
.box.sev-high { box-shadow: 0 0 0 1px color-mix(in srgb, var(--closure) 35%, transparent), 0 8px 24px rgba(0,0,0,.25); }
.box-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.type { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.box-closure .type { color: var(--closure); } .box-accident .type { color: var(--accident); }
.box-roadworks .type { color: var(--roadworks); } .box-jam .type { color: var(--jam); }
.box-hazard .type { color: var(--hazard); } .box-event .type { color: var(--muted); }
.road { font-weight: 800; font-size: .82rem; background: var(--surface2); border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; white-space: nowrap; }
.box h3 { margin: 2px 0 6px; font-size: 1.02rem; line-height: 1.25; }
.loc { font-size: .86rem; color: var(--muted); margin-bottom: 4px; }
.desc { margin: 4px 0 0; font-size: .9rem; color: var(--ink); opacity: .9; }
.box-foot { margin-top: 10px; }
.src { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }

.empty { text-align: center; color: var(--muted); font-weight: 600; padding: 40px 10px; font-size: 1.05rem; }
.board-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }

/* Live map widget */
.mapwrap { position: relative; width: 100%; height: 100vh; min-height: 320px; }
body.map { background: var(--bg); }
.mapwrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-credit { position: absolute; bottom: 8px; left: 8px; background: rgba(10,20,32,.7); color: #fff; font-size: .72rem; padding: 3px 8px; border-radius: 6px; }

/* Status page */
.statuswrap { max-width: 760px; margin: 0 auto; padding: 28px 18px; }
.statuswrap h1 { font-size: 1.4rem; margin: 0 0 4px; }
.statuswrap .region { color: var(--muted); margin: 0 0 18px; }
.statuswrap table { width: 100%; border-collapse: collapse; }
.statuswrap th { text-align: left; font-size: .76rem; text-transform: uppercase; color: var(--muted); padding: 8px; }
.statuswrap td { padding: 8px; border-top: 1px solid var(--line); }
.statuswrap td.note { color: var(--closure); font-size: .82rem; }
.statuswrap .hint { color: var(--muted); font-size: .86rem; margin-top: 18px; }
code { background: var(--surface2); padding: 1px 5px; border-radius: 5px; font-size: .88em; }
