:root {
  --bg: #0a0d12;
  --surface: #11161e;
  --surface-2: #171e29;
  --surface-3: #1f2835;
  --line: #222b38;
  --text: #e9eef5;
  --muted: #8693a6;
  --faint: #5b6779;
  --accent: #3cc8b4;
  --accent-ink: #062a25;
  --alert: #ff5d5d;
  --warn: #f5b642;
  --ok: #3ad07a;
  --radius: 14px;
  --sidebar: 228px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0d1219, #0a0d12);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.brand svg { width: 28px; height: 28px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--surface-3); color: var(--text); }
.nav .badge { margin-left: auto; }
.sidebar .spacer { flex: 1; }
main { min-width: 0; padding: 24px 28px 48px; }
.topbar { display: none; }
.tabbar { display: none; }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: -.2px; }
.page-head .grow { flex: 1; }
.sub { color: var(--muted); font-size: 12.5px; }
h2 { font-size: 15px; margin: 26px 0 12px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #33404f; background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.icon { padding: 7px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--muted); cursor: pointer; font-weight: 500; }
.seg button.on { background: var(--surface-3); color: var(--text); }
select, input[type=time], input[type=password], input[type=text] {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
input:focus, select:focus, .btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }

.armed {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; text-align: left;
}
.armed .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--faint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--faint) 20%, transparent); }
.armed.on .dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.armed b { display: block; font-size: 13.5px; }
.armed span { color: var(--muted); font-size: 12px; }

.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--alert); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.pill.bad { color: var(--alert); background: color-mix(in srgb, var(--alert) 14%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill.off { color: var(--faint); }
.chip { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; font-weight: 600; text-transform: capitalize; }
.chip.alert { background: color-mix(in srgb, var(--alert) 18%, transparent); color: #ffc2c2; }
.chip-x { margin-left: 6px; padding: 0 2px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; opacity: .7; }
.chip-x:hover { opacity: 1; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 16px; }

/* ---------- live ---------- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius); background: #000;
  aspect-ratio: 16 / 9; cursor: pointer; border: 1px solid var(--line);
  transition: border-color .2s;
}
.tile:hover { border-color: #344152; }
.tile > wk-live, .tile > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile video, .tile > img { object-fit: cover; }
.tile .overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 28%, transparent 70%, rgba(0,0,0,.6));
}
.tile .name { position: absolute; left: 14px; top: 11px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tile .state { position: absolute; right: 12px; top: 10px; }
.tile .last { position: absolute; left: 14px; bottom: 11px; font-size: 12.5px; color: #dfe6ee; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tile .live-dot { position: absolute; right: 14px; bottom: 13px; font-size: 11px; font-weight: 700; letter-spacing: .6px; color: #fff; display: flex; gap: 6px; align-items: center; }
.tile .live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--alert); animation: pulse 2s infinite; }
.tile.dim > wk-live, .tile.dim > img { filter: grayscale(1) brightness(.45); }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 500; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- camera page ---------- */
.player { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-height: 72vh; margin: 0 auto; border: 1px solid var(--line); }
.player > wk-live, .player > video { position: absolute; inset: 0; width: 100%; height: 100%; }
.player video { object-fit: contain; background: #000; }
.player .clock {
  position: absolute; left: 14px; top: 12px; padding: 4px 10px; border-radius: 8px; z-index: 2;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); font-weight: 600; font-size: 13px;
}
.player .clock.live::before { content: "● "; color: var(--alert); }
.player-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.player-bar .grow { flex: 1; }

.timeline { position: relative; user-select: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 0 6px; }
.timeline .scroller { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 20px 20px 0; }
.timeline .track { position: relative; height: 64px; cursor: crosshair; }
.timeline .rail { position: absolute; left: 0; right: 0; top: 22px; height: 18px; background: var(--surface-2); border-radius: 4px; }
.timeline .span { position: absolute; top: 22px; height: 18px; border-radius: 3px; background: var(--accent); min-width: 2px; }
.timeline .tick { position: absolute; top: 46px; font-size: 11px; color: var(--faint); transform: translateX(-50%); white-space: nowrap; }
.timeline .tick::before { content: ""; position: absolute; left: 50%; top: -8px; width: 1px; height: 5px; background: var(--line); }
.timeline .mark { position: absolute; top: 4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--surface); background: var(--warn); cursor: pointer; z-index: 2; }
.timeline .mark.alert { background: var(--alert); }
.timeline .mark:hover { transform: scale(1.35); }
.timeline .mark.sound { top: 22px; width: 10px; height: 10px; margin-left: -5px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.timeline .mark.sound.alert { background: var(--alert); }
.timeline .mark.sound:hover { transform: rotate(45deg) scale(1.35); }
.timeline .head { position: absolute; top: 0; bottom: 18px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); pointer-events: none; z-index: 3; }
.timeline .now { position: absolute; top: 18px; height: 26px; width: 2px; background: var(--alert); opacity: .7; pointer-events: none; }
.timeline .hover { position: absolute; top: 2px; transform: translate(-50%, -100%); padding: 3px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12px; pointer-events: none; z-index: 4; white-space: nowrap; }
.tl-bar { display: flex; align-items: center; gap: 8px; padding: 0 12px 4px; flex-wrap: wrap; }
.tl-bar .grow { flex: 1; }
.tl-bar .day { font-weight: 600; min-width: 130px; text-align: center; }

.cam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.side-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 140px); overflow: auto; padding-right: 4px; }
/* Cards keep their size however many there are; the list scrolls instead. */
.side-list > * { flex-shrink: 0; }

/* ---------- events ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.day-head { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 22px 0 10px; }
.events { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.event { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.event:hover { border-color: #344152; transform: translateY(-2px); }
.event .thumb { position: relative; aspect-ratio: 16 / 9; background: #000; }
.event .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event .thumb .dur { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.65); font-size: 11.5px; font-weight: 600; }
.event .thumb .unseen { position: absolute; left: 8px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,0,.4); }
.event .info { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.event .info .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.event .info .cam { font-weight: 600; }
.event .info .when { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.event.compact { display: grid; grid-template-columns: 120px 1fr; align-items: center; }
.event.compact .thumb { aspect-ratio: 16 / 9; height: auto; }
.event.compact .info { padding: 8px 10px; }
.event.compact:hover { transform: none; }
.event.playing { border-color: var(--accent); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(3,5,8,.78); backdrop-filter: blur(6px); animation: fade .15s; }
.modal .box { width: min(1100px, 100%); max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.modal .box-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.modal .box-head h3 { margin: 0; font-size: 16px; }
.modal .box-head .grow { flex: 1; }
@keyframes fade { from { opacity: 0; } }

/* ---------- health ---------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 4px; letter-spacing: -.3px; }
.stat .value small { font-size: 13px; color: var(--muted); font-weight: 500; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; }
.meter.hot > div { background: var(--warn); }
.cam-health { display: grid; grid-template-columns: 148px 1fr; gap: 14px; align-items: center; }
.cam-health img { width: 148px; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: #000; display: block; }
.cam-health .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cam-health .top b { font-size: 15px; }
.cam-health .doctor { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.cam-health .doctor .btn { align-self: flex-start; }
.doc-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spark { width: 100%; height: 40px; display: block; margin-top: 6px; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.spark path.area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.spark path.expected { stroke: var(--faint); stroke-dasharray: 3 4; fill: none; }
.incidents { display: flex; flex-direction: column; }
.incident { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.incident:last-child { border-bottom: 0; }
.incident time { color: var(--muted); font-size: 12.5px; }

/* ---------- settings ---------- */
.rule { display: grid; gap: 12px; }
.rule .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule .row > label:first-child { color: var(--muted); font-size: 13px; min-width: 110px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c8d1dd; transition: transform .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }
.toggle-chip { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-transform: capitalize; font-size: 13px; }
.toggle-chip.on { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); color: #bff3ea; }
.list { display: flex; flex-direction: column; }
.list .item { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .item.shadow { opacity: .75; }
.list time { color: var(--muted); font-size: 12.5px; }
pre.code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; font-size: 12px; }

/* ---------- login & toasts ---------- */
.login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 30% 20%, #102029, var(--bg) 60%); }
.login form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login .brand { justify-content: center; font-size: 20px; padding-bottom: 6px; }
.login .brand svg { width: 38px; height: 38px; }
.login input { padding: 12px 14px; font-size: 15px; }
.login .error { color: var(--alert); min-height: 20px; font-size: 13px; text-align: center; }
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; border-radius: 12px; background: var(--surface-3); border: 1px solid #33404f; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: fade .2s; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .cam-layout { grid-template-columns: 1fr; }
  .side-list { max-height: none; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { display: none; }
  main { padding: calc(70px + env(safe-area-inset-top)) 14px calc(84px + env(safe-area-inset-bottom)); }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: fixed; z-index: 20; top: 0; left: 0; right: 0;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    background: rgba(10,13,18,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; font-size: 15px; }
  .topbar .brand svg { width: 24px; height: 24px; }
  .topbar .grow { flex: 1; }
  .topbar .armed { width: auto; padding: 7px 11px; }
  .topbar .armed span { display: none; }
  .tabbar {
    display: flex; position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(10,13,18,.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 10px; color: var(--faint); font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); transform: scale(.85); }
  .page-head h1 { font-size: 19px; }
  .tiles { gap: 10px; }
  .tile { border-radius: 12px; }
  .cam-health { grid-template-columns: 1fr; }
  .cam-health img { width: 100%; }
  .incident { grid-template-columns: 1fr; gap: 2px; }
  .modal { padding: 0; align-items: end; }
  .modal .box { border-radius: 18px 18px 0 0; max-height: 92vh; }
}

/* evidence */
.ev-grid { display: grid; gap: 10px; }
.ev-tile .player { aspect-ratio: 16 / 9; max-height: none; }
.ev-tile .sub { margin-top: 4px; }
.ev-gap { position: absolute; inset: 0; display: grid; place-content: center; color: var(--muted, #aaa); background: rgba(0, 0, 0, .7); font-weight: 600; }
.ev-clock { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.ev-timeline { position: relative; margin: 4px 0 8px; }
.ev-marks { position: relative; height: 10px; margin: 0 8px 2px; }
.ev-mark { position: absolute; top: 0; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--alert) 70%, transparent); cursor: pointer; }
.ev-scrub { width: 100%; accent-color: var(--accent); }
textarea { font: inherit; color: inherit; background: var(--surface-2, #1a1f27); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: vertical; }

/* close-ups and faces */
.closeups { margin-top: 12px; display: grid; gap: 10px; }
.closeup-row { display: flex; gap: 10px; overflow-x: auto; }
.closeup { position: relative; flex: 0 0 auto; }
.closeup img { height: 220px; border-radius: 8px; display: block; }
.closeup span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 5px; font-size: 12px; color: #fff; }
.faces { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.face { display: grid; justify-items: center; gap: 4px; }
.face img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.chip.crew { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text, #e6edf3); text-transform: none; }
.seen-before a { color: var(--accent); }
.story p { margin: 0 0 8px; line-height: 1.5; }
.occ-tl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: grid; gap: 8px; }
.occ-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr; gap: 10px; align-items: center; }
.occ-cam { font-size: 13px; color: var(--muted, inherit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occ-rail { position: relative; height: 16px; background: var(--surface-2); border-radius: 4px; }
.occ-span { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; cursor: pointer; }
.occ-ticks { display: flex; justify-content: space-between; margin-left: min(150px, 30%); font-size: 12px; }

/* boat */
.power-history { position: relative; }
.ph-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ph-title { font-weight: 600; }
.ph-head .grow, .ph-row .grow { flex: 1; }
.ph-wrap { position: relative; }
.ph-plot { width: 100%; min-height: 120px; }
.ph-svg { display: block; touch-action: pan-y; }
.ph-ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ph-label { fill: var(--faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ph-tip { position: absolute; top: 8px; min-width: 190px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.ph-when { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.ph-row { display: flex; align-items: center; gap: 8px; } .ph-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.ph-row b { font-variant-numeric: tabular-nums; }
.ph-totals { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

.boat-chart { width: 100%; height: 140px; display: block; }
.boat-chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.boat-chart .soc { stroke: var(--accent); }
.boat-chart .solar { stroke: #f2c14e; }
.boat-chart .load { stroke: #e0705f; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.boat-chart .low { stroke: var(--alert); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.legend .low { color: var(--alert); }
table.wx { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.wx th, table.wx td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.wx th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.wx tr.hot td { color: var(--alert); font-weight: 600; }
.legend .soc { color: var(--accent); } .legend .solar { color: #f2c14e; } .legend .load { color: #e0705f; }

.net-frame { width: 100%; height: calc(100vh - 40px); border: 0; border-radius: 12px; background: var(--surface); display: block; }
@media (max-width: 760px) { .net-frame { height: calc(100vh - 150px); } }
