/* portal.css — customer portal (portal.php, portal_site.php). Dark green /
   black / silver with a lime highlight; status tones set --tone. */
:root {
  color-scheme: dark;
  --bg: #070A08;
  --side: #0A120E;
  --panel: #0E1A14;
  --panel-2: #0A140F;
  --line: #1E3328;
  --line-2: #16261E;
  --line-3: #2A4235;
  --text: #EEF2EF;
  --silver: #C9CFCB;
  --muted: #8C978F;
  --muted-2: #A9B4AE;
  --accent: #B5F23D;
  --sel: #143A27;
  --crit: #FF7A6B;
  --warn: #F2B33D;
  --info: #8FC1E3;
  --ok: #AEB8B2;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --head: 'Space Grotesk', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.45 Inter, system-ui, sans-serif; }
a { color: var(--accent); }
a:hover { color: #D9FB97; }
h1, h2 { font-family: var(--head); font-weight: 600; margin: 0; }
h1 { font-size: 30px; letter-spacing: -0.01em; line-height: 1.15; }
h2 { font-size: 18px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent-text { color: var(--accent); }

.tone-crit { --tone: var(--crit); }
.tone-warn { --tone: var(--warn); }
.tone-info, .tone-hold { --tone: var(--info); }   /* hold = not installed and can't be yet: blue, drawn hollow */
.tone-out  { --tone: var(--silver); }
.tone-ok   { --tone: var(--ok); }
.tone-crit-text { color: var(--crit); }
.tone-warn-text { color: var(--warn); }
.tone-info-text, .tone-hold-text { color: var(--info); }
.tone-out-text, .tone-ok-text { color: var(--muted-2); }

/* ── Shell ── */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--side); border-right: 1px solid #1B2C23; padding: 24px 14px; display: flex; flex-direction: column; gap: 28px; }
.main { flex: 999 1 560px; min-width: 0; padding: 22px clamp(16px, 3vw, 36px) 40px; display: flex; flex-direction: column; gap: 24px; }
.brand { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-row svg { flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; }
.brand-sub { font-size: 12px; font-style: italic; font-weight: 600; color: var(--silver); }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-item { flex: 1 1 180px; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--silver); }
.nav-item:hover { background: #12241A; color: var(--text); }
.nav-item.on { background: var(--sel); color: var(--accent); }
.nav-sub { min-height: 38px; padding-left: 42px; font-size: 13px; }
/* Menu headings: an arrow at the right, pointing down while its pages are shown. */
.nav-head::after { content: ''; flex: none; width: 6px; height: 6px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.nav-head.open { color: var(--text); }
.nav-head.open::after { transform: rotate(45deg); }
.nav-head:not(:first-child) { margin-top: 10px; }
.nav-label { flex: 1 1 100%; padding: 0 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.nav-account { margin-top: auto; }
.nav-account + .who { margin-top: 0; }
.who { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid #1B2C23; display: flex; align-items: center; gap: 12px; }
.who-badge { width: 36px; height: 36px; flex: none; border-radius: 50%; background: #1C3428; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--silver); }
.who-text { display: flex; flex-direction: column; min-width: 0; }
.who-co { font-size: 13px; font-weight: 600; }
.who-name { font-size: 12px; color: var(--muted); }

.topbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.topbar-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; flex: 1 1 auto; min-width: 0; }
.rr { display: flex; align-items: center; gap: 8px; }
.rr .select-wrap { min-width: 150px; }
.rr label:not(.sr) { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.rr .lt-wrap { min-width: 96px; }
.foot { font-size: 12px; color: var(--muted); }

/* ── Comboboxes (site search, subdivision) ── */
.combo { position: relative; }
.find { flex: 0 1 380px; min-width: 240px; }
.find-icon { position: absolute; left: 14px; top: 14px; color: var(--muted-2); pointer-events: none; }
.combo input, .select-wrap select {
  width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--panel);
  color: var(--text); font: 500 14px Inter, system-ui, sans-serif; padding: 0 14px;
}
.find input { padding-left: 40px; font-weight: 400; }
.combo input:focus, .select-wrap select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.combo-list {
  position: absolute; z-index: 1000; top: 100%; left: 0; width: max(100%, 300px); margin-top: 6px; max-height: 360px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line-3); border-radius: 10px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.combo-head { padding: 10px 14px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.combo-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 42px; padding: 6px 14px; cursor: pointer; }
.combo-opt:hover, .combo-opt.on { background: var(--sel); }
.combo-opt.current .combo-main { color: var(--accent); }
.combo-main { min-width: 0; }
.combo-meta { flex: none; font-size: 12px; color: var(--muted); }
.combo-empty { padding: 14px; font-size: 13px; color: var(--muted); }

/* ── Page head ── */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.head-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.head-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--tone); background: #152A20; color: var(--tone); font-size: 13px; font-weight: 600; white-space: nowrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--silver); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; min-height: 28px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.scope { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fld input, .fld select { letter-spacing: 0; text-transform: none; }
.select-wrap { position: relative; display: block; min-width: 220px; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select-wrap::after { content: ''; position: absolute; right: 16px; top: 17px; width: 8px; height: 8px; border-right: 2px solid var(--muted-2); border-bottom: 2px solid var(--muted-2); transform: rotate(45deg); pointer-events: none; }
.sub-combo { min-width: 260px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--panel); color: var(--silver); font: 500 13px Inter, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--text); border-color: #3E5C4D; }

/* ── Tiles ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.tile-label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tile-value { font-family: var(--mono); font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.tile-value.tone-warn, .tank-pct.tone-warn { color: var(--tone); }
.tile-unit { font-size: 16px; color: var(--muted); }
.tile-note { font-size: 12px; color: var(--muted-2); }
a.tile-link { color: inherit; text-decoration: none; }
a.tile-link:hover, a.note-link:hover { border-color: #3E5C4D; }
a.tile-link:hover .tile-note, a.note-link:hover { color: var(--text); }
a.note-link { align-self: flex-start; color: var(--silver); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; min-height: 24px; display: inline-flex; align-items: center; }
.tile.on { border-color: var(--accent); }
a.head-title { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-3); text-underline-offset: 6px; }
a.head-title:hover, a.head-title.on { text-decoration-color: var(--accent); }
a.head-badge { text-decoration: none; }
.badge-sep { color: var(--muted); font-size: 18px; margin: 0 -4px; }
a.head-badge:hover { background: #1C3428; }
a.head-badge.on { background: var(--tone); color: #07110B; }
a.head-badge.on .dot { background: #07110B; border-color: #07110B; }

/* ── Panels ── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; }
.panel-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.panel-foot { margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.grow { flex: 999 1 520px; }
.side-panel { flex: 1 1 280px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--silver); }
.legend > span { display: inline-flex; align-items: center; gap: 8px; }
.pin-key { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); }
.pin-key.tone-out, .pin-key.tone-hold { background: transparent; border: 2px solid var(--tone); }
.sw { width: 10px; height: 10px; border-radius: 3px; }
.sw-1 { background: #DCE2DE; }
.sw-2 { background: #7FB898; }

/* ── Map ── */
.map { height: 480px; border-radius: 10px; background: #08110D; border: 1px solid var(--line-2); }
.tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(0.78) contrast(0.92) saturate(0.35); }
.leaflet-container { font: 13px Inter, system-ui, sans-serif; background: #08110D; }
.leaflet-control-attribution { background: rgba(8, 17, 13, 0.8) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--silver) !important; }
.leaflet-bar a { background: var(--panel) !important; color: var(--silver) !important; border-color: var(--line-3) !important; }
.pin { border-radius: 50%; background: var(--tone); border: 2px solid var(--tone); box-shadow: 0 0 0 3px #08110D; }
.pin.tone-out, .pin.tone-hold { background: #08110D; }
.cl { border-radius: 50%; box-shadow: 0 0 0 2px rgba(8, 17, 13, 0.9); display: flex !important; cursor: pointer; }
.pin-key.ring-rest { background: #3B5246; }
.cl-wrap { flex: 1; display: flex; position: relative; }
.cl-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 5px; white-space: nowrap; pointer-events: none;
  font: 600 11px Inter, system-ui, sans-serif; color: var(--text); text-shadow: 0 0 3px #08110D, 0 0 3px #08110D, 0 0 6px #08110D; }
.cl:hover .cl-n, .cl:focus-visible .cl-n { background: #26402F; }
/* Ring: red 0–a, amber a–b, quiet gray-green b–c (Normal + in hand), blue c–100% (not installed). */
.cl-ring { flex: 1; display: flex; padding: 4px; border-radius: 50%;
  background: conic-gradient(var(--crit) 0 var(--a), var(--warn) var(--a) var(--b), #3B5246 var(--b) var(--c, 100%), var(--info) var(--c, 100%) 100%); }
.cl-n { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #1C2C24; color: var(--text); font: 600 12px var(--mono); }
.cl-n.cl-planned { color: var(--info); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line-3); }
.pop { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.pop a { font-weight: 600; margin-top: 4px; }
.pin { cursor: pointer; }
.leaflet-tooltip.pin-tip { background: var(--panel); color: var(--text); border: 1px solid var(--line-3); border-radius: 8px; padding: 8px 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }
.leaflet-tooltip.pin-tip::before { border-top-color: var(--line-3); }
.pin-tip .pop { min-width: 0; }

/* ── Status chips and filters ── */
/* Status tags use the monitor site's watchdog colors (lmssites.php / qDiv2LWD.php
   doCustomDrawRow, by lubewd2.php fc), filled, with dark text as on those pages. */
.st-notrep   { --st: #E77471; }  /* fc 80 red */
.st-nolube, .st-notrain, .st-lowbat { --st: #FFB48A; }  /* fc 70 orange */
.st-isi      { --st: #FFC8DA; }  /* fc 60 */
.st-maint    { --st: #FFEB99; }  /* fc 50 yellow */
.st-lowlube  { --st: #FFFFCC; }  /* fc 40 pale yellow */
.st-trackout { --st: #98FF98; }  /* fc 20/30 green */
.st-parts, .st-longterm { --st: #E6C2FF; }  /* fc 10 lavender */
.st-planned, .st-nocell { --st: #8FC1E3; }  /* not installed: the portal's blue (--info) */
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; background: var(--st); color: #1A1D1B; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.st-ok { background: transparent; color: var(--muted-2); border: 1px solid var(--line-3); }
.st-badtank, .st-replace { --st: #C9CFCB; }  /* gray tags. Flagged replacement: hollow blue pin; invalid tank counts as handled: hollow gray pin */
.chip.st-nocell { background: transparent; color: var(--st); border: 1px solid var(--st); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.has-tip { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }   /* hover shows the flag's note */
table.notes td { vertical-align: top; }
table.notes td:first-child, table.notes td:nth-child(2) { white-space: nowrap; }
table.notes .note-text { min-width: 260px; overflow-wrap: anywhere; }
.dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--tone); border: 2px solid var(--tone); }
.tone-out .dot { background: transparent; }
.filter.st-nocell .dot { background: transparent; }
.filter .dot { background: var(--st); border-color: var(--st); }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.reasons .chip { padding: 5px 12px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-3); color: var(--silver); text-decoration: none; font-size: 13px; }
.filter:hover { border-color: #5E7A6A; color: var(--text); }
.filter .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.filter.on { background: var(--accent); border-color: var(--accent); color: #07110B; }
.filter.on .n { color: #07110B; }

/* ── Site table ── */
.table-wrap { overflow-x: auto; }
.table { min-width: 860px; }
.tr { display: grid; grid-template-columns: minmax(220px, 1.7fr) minmax(150px, 1.2fr) 80px 100px 80px 180px 20px; align-items: center; gap: 12px; padding: 8px 4px; min-height: 56px; border-top: 1px solid var(--line-2); color: inherit; text-decoration: none; }
a.tr:hover { background: #11201A; color: inherit; }
.table-planned { min-width: 700px; }
.table-planned .tr { grid-template-columns: minmax(220px, 1.7fr) 110px minmax(150px, 1fr) minmax(230px, 1.1fr) 20px; }   /* not installed: no readings to show */
.th { min-height: 0; padding: 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-top: 0; }
.cell-site { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-name { font-weight: 600; }
.cell-bar { display: flex; align-items: center; gap: 10px; }
.cell-bar .mono { width: 40px; text-align: right; font-size: 13px; }
.tr > .mono { font-size: 13px; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.bar-low { background: var(--warn); }
.bar-off { background: #4A5A51; }
.chev { color: var(--muted); }
.empty { padding: 18px 4px; color: var(--muted); border-top: 1px solid var(--line-2); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.pager-btns { display: flex; gap: 8px; }

/* ── Site page ── */
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-size: 13px; font-weight: 600; text-decoration: none; }
.site-head h1 { font-size: 34px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; font-size: 13px; }
.meta-row > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.meta-row a { font-weight: 600; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.neighbours { display: flex; flex-wrap: wrap; gap: 8px; }
.neighbours:empty { display: none; }
.site-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }   /* Details / Analyze above the neighbor buttons */
.head-tile { flex: none; min-width: 220px; padding: 12px 16px; gap: 6px; }
.head-tile .tile-value { font-size: 26px; }
.t24 { display: flex; flex-wrap: wrap; gap: 12px 36px; }
.t24 > div { display: flex; flex-direction: column; gap: 6px; }

.chart { position: relative; display: flex; }
.chart-y { position: relative; flex: none; width: 40px; height: 220px; font-size: 11px; color: var(--muted); }
.chart-y span { position: absolute; right: 6px; }
.chart-plot { position: relative; flex: 1; min-width: 0; height: 220px; }
.chart-plot svg { display: block; overflow: visible; }
.chart svg line, .chart svg path { vector-effect: non-scaling-stroke; }
.grid { stroke: var(--line); }
.axis { stroke: var(--line-3); }
.low-line { stroke: var(--warn); stroke-dasharray: 5 5; opacity: 0.75; }
.fill-line { stroke: var(--silver); stroke-dasharray: 2 3; }
.level-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.fill-tag { position: absolute; top: 2px; margin-left: 6px; font-size: 11px; color: var(--silver); white-space: nowrap; }
.chart-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.chart-x { display: flex; justify-content: space-between; padding-left: 40px; font-size: 11px; color: var(--muted); }

.tank-row { display: flex; gap: 22px; align-items: flex-end; }
.tank { position: relative; flex: none; width: 76px; height: 196px; border: 2px solid #4A6A5A; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.tank-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ok); }
.tank-fill.bar-low { background: var(--warn); }
.tank-fill.bar-off { background: #3A4A41; }
.tank-low { position: absolute; left: 0; right: 0; bottom: 25%; border-top: 2px dashed var(--warn); }
.tank-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tank-pct { font-size: 56px; line-height: 1; letter-spacing: -0.03em; }
.tank-days { font-size: 15px; font-weight: 600; color: var(--silver); }

/* Battery: one bar per day on the chart; the picture is a .tank with a terminal on top. */
.chart svg .bat-bar { stroke: var(--accent); stroke-width: 7; stroke-linecap: round; }
.chart svg .bat-bar-low { stroke: var(--warn); }
.batt { flex: none; display: flex; flex-direction: column; align-items: center; }
.batt-cap { width: 30px; height: 9px; border: 2px solid #4A6A5A; border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--panel-2); }
.batt .tank { height: 187px; }

.bars-box { min-width: 480px; }
.bars { height: 180px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line-3); }
.bar-day { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.b1, .b2 { flex: 1; max-width: 14px; border-radius: 3px 3px 0 0; }
.b1 { background: #DCE2DE; }
.b2 { background: #7FB898; }
.bars-x { display: flex; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.bars-x span { flex: 1; text-align: center; white-space: nowrap; }
.bars-x .today { color: var(--accent); }

.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; font-size: 15px; }

table.plain { width: 100%; min-width: 360px; border-collapse: collapse; }
table.plain th { text-align: left; padding: 8px 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
table.plain td { padding: 11px 0; border-top: 1px solid var(--line-2); }

/* ── Historical (portal_history.php) ── */
/* State colors for charts and day strips. Checked as a set for color-blind
   Low lube is the monitor's pale yellow (.st-lowlube); Needs maintenance is a
   deeper gold here so the two stay apart, and they never touch in the stack. */
.hs-A, .hs-C { fill: #2C4A3B; background: #2C4A3B; }
.hs-B, .hs-G { fill: #8C978F; background: #8C978F; }
.hs-D { fill: #5FC98A; background: #5FC98A; }
.hs-E { fill: #FFFFCC; background: #FFFFCC; }
.hs-F { fill: #E8C547; background: #E8C547; }
.hs-H { fill: #F2994A; background: #F2994A; }
.hs-I { fill: #E0605C; background: #E0605C; }
.hkey { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.hsw { width: 10px; height: 10px; flex: none; border-radius: 3px; }
.hsw-open { background: #C9CFCB; }
.hsw-close { background: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line-3); border-radius: 10px; overflow: hidden; background: var(--panel); }
.seg a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; color: var(--silver); text-decoration: none; font: 500 14px Inter, system-ui, sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.seg a + a { border-left: 1px solid var(--line-3); }
.seg a:hover { color: var(--text); background: #12241A; }
.seg a.on { background: var(--sel); color: var(--accent); }
.bullets { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--silver); }
.bullets strong { color: var(--text); font-weight: 600; }
.bullets li::marker { color: var(--accent); }
.hchart { position: relative; min-height: 240px; }
.hchart svg { display: block; }
.hchart text { font-family: var(--mono); }
.htip { position: absolute; z-index: 5; min-width: 150px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-3); background: var(--panel-2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); font-size: 12px; pointer-events: none; }
.htip[hidden] { display: none; }
.htip-head { margin-bottom: 4px; color: var(--muted-2); }
.htip-row { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.htip-key { width: 12px; height: 3px; flex: none; border-radius: 2px; }
.htip-label { flex: 1; color: var(--muted-2); white-space: nowrap; }
.htip-row strong { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.hdata summary { cursor: pointer; color: var(--silver); font-size: 13px; min-height: 32px; display: inline-flex; align-items: center; }
.hdata summary:hover { color: var(--text); }
table.hist-table { min-width: 760px; }
table.plain th, table.plain td { padding-right: 16px; }
table.num th:not(:first-child), table.num td:not(:first-child) { text-align: right; }
table.hist-table td a { font-weight: 600; text-decoration: none; }
table.hist-table td a:hover { text-decoration: underline; }
table.hist-table tbody tr:hover { background: #11201A; }
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.th-sort:hover, .th-sort:focus-visible { color: var(--text); }
.th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th[aria-sort] .th-sort { color: var(--accent); }
th[aria-sort="ascending"] .th-sort::after { content: '▲'; font-size: 8px; }
th[aria-sort="descending"] .th-sort::after { content: '▼'; font-size: 8px; }
.delta-up { color: var(--accent); }
.delta-down { color: var(--crit); }
.delta-muted { color: var(--muted); }
.spark { display: inline-block; vertical-align: middle; }
.spark path { fill: none; stroke: var(--silver); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.strip { display: block; border-radius: 3px; background: var(--panel-2); }
.strip rect:hover { opacity: 0.75; }
.strip-col { width: 32%; min-width: 220px; }
table.hist-table td:first-child { white-space: nowrap; }
.strip-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.hist-note { margin: 0; max-width: 100ch; }

.msg-page { max-width: 520px; margin: 12vh auto; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.msg-page p { margin: 0; color: var(--silver); }

/* ── Settings › Subdivisions (portal_subs.php) ── */
.subs-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.subs-filter { flex: 1 1 280px; }
.subs-div { margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line-2); min-width: 0; }
.subs-div[hidden] { display: none; }
.subs-div legend { float: left; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0; margin-bottom: 8px; }
.subs-div legend + * { clear: both; }
.subs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer; }
.check[hidden] { display: none; }
.check:hover { background: #12241A; }
.check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.check-main { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check:has(input:checked) .check-main { color: var(--text); font-weight: 500; }
.check-div { padding-left: 0; font-family: var(--head); font-weight: 600; font-size: 16px; }
.check-div:hover { background: transparent; }
.subs-save { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 4px -20px -18px;
  padding: 14px 20px; background: var(--panel); border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.subs-save .btn-primary { min-width: 140px; margin-top: 0; padding: 0 20px; }

/* ── Settings › Users (portal_users.php) ── */
table.users { min-width: 1240px; }
table.users td { white-space: nowrap; }
table.users td.cell-subs { white-space: normal; min-width: 200px; max-width: 340px; }
table.users .more { color: var(--muted-2); border-bottom: 1px dotted var(--muted-2); cursor: help; white-space: nowrap; }
.banner-crit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-radius: 10px;
  background: #B3261E; color: #fff; font-weight: 600; }
.banner-crit .btn { min-height: 38px; border-color: #fff; background: transparent; color: #fff; }
.banner-crit .btn:hover { background: #fff; color: #B3261E; border-color: #fff; }
.pw-form { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }
.pw-form p { margin: 0; }
.pw-actions { display: flex; align-items: center; gap: 10px; }
.pw-actions .btn-primary { min-width: 120px; margin-top: 0; padding: 0 20px; }
.pw-actions .btn { min-height: 48px; }
table.users tr { scroll-margin-top: 80px; }
.cell-edit { margin-left: 8px; font: 500 12px Inter, system-ui, sans-serif; color: var(--muted-2); }
.cell-edit:hover { color: var(--accent); }
.phone-edit { display: flex; align-items: center; gap: 8px; }
.phone-edit input[type="tel"] { width: 150px; min-height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-3); background: var(--panel-2);
  color: var(--text); font: 400 14px var(--mono); }
.phone-edit input[type="tel"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.phone-edit .btn { min-height: 36px; padding: 0 12px; text-decoration: none; }

/* ── Settings › Reports (portal_reports.php) ── */
.reports-list { display: flex; flex-direction: column; gap: 4px; }
.check-report { align-items: flex-start; padding: 10px; }
.check-report input { margin-top: 2px; }
.check-report > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-report .check-main { white-space: normal; }

/* ── Sign in (portal_login.php) ── */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-hero { position: relative; flex: 1 1 420px; min-height: 100vh; overflow: hidden; display: flex; align-items: flex-end;
  background: radial-gradient(120% 90% at 85% 10%, #143A27 0%, #0A140F 55%, var(--bg) 100%); border-right: 1px solid #1B2C23; }
.login-rails { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-pins circle { fill: var(--silver); opacity: 0.55; }
.login-pins circle.hot { fill: var(--accent); opacity: 1; filter: drop-shadow(0 0 6px rgba(181, 242, 61, 0.7)); }
.login-hero-text { position: relative; padding: clamp(28px, 6vw, 64px); display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.login-claim { margin: 0; font-family: var(--head); font-weight: 600; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.login-lede { margin: 0; color: var(--silver); font-size: 16px; max-width: 40ch; }
.login-main { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { margin-top: -6px; }
.login-brand-sm { display: none; }
.login-msg { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  background: color-mix(in srgb, var(--tone) 10%, transparent); color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.field input { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--panel-2);
  color: var(--text); font: 400 15px Inter, system-ui, sans-serif; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 242, 61, 0.18); }
.pw { position: relative; display: block; }
.pw input { padding-right: 68px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted-2); font: 500 12px Inter, system-ui, sans-serif; cursor: pointer; }
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); background: var(--panel); outline: none; }
.btn-primary { min-height: 48px; margin-top: 4px; border: 0; border-radius: 10px; background: var(--accent); color: #0A120E;
  font: 600 15px Inter, system-ui, sans-serif; cursor: pointer; }
.btn-primary:hover { background: #C7F767; }
.btn-primary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.login-help { margin: 0; }
@media (max-width: 860px) {
  .login-hero { display: none; }
  .login-brand-sm { display: flex; }
  .login-main { align-items: flex-start; padding-top: 12vh; }
}

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .site-head h1 { font-size: 26px; }
  .map { height: 380px; }
  .select-wrap, .sub-combo, .find { min-width: 0; flex: 1 1 100%; }
  .scope { width: 100%; }
  .scope > * { flex: 1 1 100%; }
}

/* ── Analysis page (portal_analyze.php) ── */
.an-h { margin-bottom: 12px; }
.an-flag { border-left: 6px solid var(--st); }
.an-flag h2 { color: var(--st); }
.an-flag p { margin: 0; color: var(--silver); }
.an-flag .an-flag-note { color: var(--text); padding-top: 12px; border-top: 1px solid var(--line-2); }
.an-part { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 8px; border: 1px solid var(--line-3); background: var(--panel-2); font-weight: 500; }
.an-cards { display: flex; flex-direction: column; gap: 12px; }
.an-card { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--tone, var(--line-3)); border-radius: 14px; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.an-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.an-card h3 { margin: 0; font: 600 16px/1.3 var(--head); }
.an-card p { margin: 4px 0 0; color: var(--silver); }
.an-card ol { margin: 4px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.an-lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.an-facts { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--silver); }
.an-facts strong { color: var(--text); }
.an-todo { color: var(--text); }
.an-tile { border-left: 4px solid var(--tone, var(--line-3)); }
.an-tile .tile-value { font-size: 18px; letter-spacing: 0; }
.an-tile .tile-note { color: var(--tone, var(--muted-2)); font-weight: 600; }
.an-tile.an-off .tile-value { color: var(--muted); }
table.an-weeks { min-width: 720px; }
table.an-weeks th, table.an-weeks td { padding-top: 8px; padding-bottom: 8px; }
table.an-weeks .n { text-align: right; font-family: var(--mono); font-size: 13px; }
table.an-weeks th.n { font-family: inherit; font-size: 11px; }
table.an-weeks th.an-grp { text-align: center; color: var(--silver); border-bottom: 1px solid var(--line-2); }
.an-bad { color: var(--warn); font-weight: 600; }
.an-out { color: var(--muted); text-align: center; }
.an-outtag { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; }
.an-concern { font-size: 12px; color: var(--silver); }
tr.an-ev td { border-top: 0; padding-top: 0; font-size: 12px; color: var(--info); }
tr.an-ev-now td { color: var(--warn); font-weight: 600; }
.an-evtag { display: inline-block; min-width: 48px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; }
.an-fb form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.an-radios { display: flex; gap: 24px; }
.an-radios label { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.an-radios input { accent-color: var(--accent); width: 18px; height: 18px; }
.an-fb textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--panel-2); color: var(--text); font: inherit; resize: vertical; }
.an-fb textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(181, 242, 61, 0.18); }
.an-fb .btn-primary { align-self: flex-start; padding: 0 28px; }
.btn-accent { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover { color: #D9FB97; border-color: #D9FB97; }
/* Flip Track buttons, in the monitor's own red and green: red takes the track out, green puts it back in. */
.flip-out, .flip-out:hover { background: #E77471; border-color: #E77471; color: #1A1D1B; font-weight: 600; }
.flip-in, .flip-in:hover { background: #98FF98; border-color: #98FF98; color: #1A1D1B; font-weight: 600; }
.flip-btn:hover { filter: brightness(1.1); }
.flip-btn:disabled { opacity: 0.6; cursor: default; }
/* ── Details page (portal_details.php) ── */
.det-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.det-cols .kv dd { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 10px; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.det-cols .kv dd a { font-weight: 600; text-decoration: none; }
/* One row split in two: Track 1 on the left, Track 2 on the right. */
.det-cols .kv > .det-split { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 12px; }
.det-split dt + dd + dt { border-left: 1px solid var(--line-3); padding-left: 12px; }
.det-cols .kv dd.det-track { flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 0; }   /* track name, its frequency under it */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.photo { display: block; aspect-ratio: 4 / 3; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.photo:hover, .photo:focus-visible { border-color: var(--accent); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; color: var(--silver); text-decoration: none; text-align: center; overflow-wrap: anywhere; }
.an-fold > summary { cursor: pointer; padding: 14px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font: 600 18px var(--head); }
.an-fold-body { display: flex; flex-direction: column; gap: 24px; margin-top: 16px; }

/* ── Live reading popup (portal_live.js) ── */
button.btn { cursor: pointer; }
.btn:disabled { opacity: 0.55; cursor: default; }
.live-dlg { width: min(720px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-3); border-radius: 16px; background: var(--panel-2); color: var(--text); }
.live-dlg::backdrop { background: rgba(0, 0, 0, 0.65); }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.live-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 22px; }
.live-body p { margin: 0; }
.live-error { color: var(--warn); }
.live-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.live-bar::after { content: ''; display: block; width: 30%; height: 100%; border-radius: 2px; background: var(--accent); animation: live-slide 1.4s ease-in-out infinite alternate; }
@keyframes live-slide { from { transform: translateX(0); } to { transform: translateX(233%); } }
@media (prefers-reduced-motion: reduce) { .live-bar::after { animation: none; width: 100%; opacity: 0.5; } }

/* ── KPI pages (portal_kpi.php, portal_kpi_isi.php) ── */
.kline { width: 22px; height: 0; flex: none; border-top: 3px solid; border-radius: 2px; }   /* chart key: a piece of the line */
.kline-dash { border-top-style: dashed; }
tr.kpi-total td { font-weight: 600; border-top-color: var(--line-3); }
.kpi-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; font-size: 13px; color: var(--silver); }
.kpi-list li { padding: 7px 0; border-top: 1px solid var(--line-2); overflow-wrap: anywhere; }
.kpi-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Cards that open to show what is behind the number. --tone: amber = look at it, red = failing. */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.kpi-card { min-width: 0; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--tone, var(--line-3)); border-radius: 10px; }
.kpi-card[open] { grid-column: 1 / -1; }
.kpi-card > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; cursor: pointer; list-style: none; }
.kpi-card > summary::-webkit-details-marker { display: none; }
.kpi-card > summary::after { content: ''; flex: none; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.kpi-card[open] > summary::after { transform: rotate(45deg); }
.kpi-card > summary:hover { background: #11201A; }
.kpi-card > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kpi-n { flex: none; min-width: 2ch; font: 500 20px var(--mono); color: var(--tone, var(--text)); }
.kpi-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi-name { font-weight: 500; overflow-wrap: anywhere; }
.kpi-sub { font-size: 12px; color: var(--muted-2); }
.kpi-body { padding: 4px 14px 12px; border-top: 1px solid var(--line-2); }
.kpi-body .kpi-list { font-family: var(--mono); font-size: 12px; }
.kpi-body .kv dd { font-size: 13px; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.kpi-body .kv dd .kpi-list { text-align: left; }
.kpi-h3 { margin: 6px 0 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
/* Boxes side by side inside a panel (the maintainers on the railroad's KPI page). */
.kpi-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.kpi-box { min-width: 0; padding: 14px 16px 4px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; }
.kpi-box-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding-bottom: 10px; }
.kpi-box-head h3 { margin: 0; font: 600 16px/1.3 var(--head); }
.kpi-box .kv dd { white-space: nowrap; }
.kpi-tag { display: block; }
/* A label/value list with the value large: small print goes under the label, not beside the number. */
.kv-big > div { align-items: center; }
.kv-big dt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv-big dd { flex: none; font: 500 24px/1.1 var(--mono); letter-spacing: -0.02em; }
/* Rows of named numbers in line (Sites without LMS): every row names each of its numbers. */
.kpi-split { display: flex; flex-direction: column; }
.kpi-split-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.kpi-split-name { flex: 1 1 160px; font-weight: 500; }
.kpi-num { flex: 0 0 104px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.kpi-num .mono { font-size: 24px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; color: var(--silver); }
.kpi-num:first-of-type .mono { color: var(--text); }
.kpi-num .small { letter-spacing: 0.06em; text-transform: uppercase; }
.kpi-split-all .kpi-split-name { font: 600 18px/1.3 var(--head); }
.kpi-split-all .kpi-num .mono { font-size: 34px; }
/* A maintainer's pie: the ring, then what each slice is with its share and its number of sites. */
.kpi-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 4px 0 14px; }
.kpi-pie-ring { flex: none; }
.kpi-pie-ring circle:hover { opacity: 0.8; }
.kpi-pie-n { fill: var(--text); font: 500 22px var(--mono); letter-spacing: -0.02em; }
.kpi-pie-unit { fill: var(--muted); font: 500 10px Inter, system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi-pie-key { flex: 1 1 250px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.kpi-pie-key li { display: grid; grid-template-columns: 10px minmax(0, 1fr) 54px 40px; align-items: center; gap: 10px; color: var(--silver); }
.kpi-pie-key li .mono { text-align: right; color: var(--text); }
.kpi-pie-key li .mono.muted { color: var(--muted); }
/* The status graph's key: each entry switches its line off and on. */
.kline-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 4px; border-radius: 8px; cursor: pointer; }
.legend:has(.kline-btn) { gap: 2px 8px; }
.kline-btn:hover { background: #12241A; color: var(--text); }
.kline-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.kline-btn[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; }
.kline-btn[aria-pressed="false"] .kline { opacity: 0.3; }
