/* =====================================================================
   RLWC Live Audio Test - dark audio-pro telemetry theme
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg-0: #080b11;
  --bg-1: #0d121b;
  --bg-2: #121927;
  --bg-3: #182232;
  --bg-rail: #0a0e16;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.12);
  --line-strong: rgba(255,255,255,0.18);
  --fg-1: #e8edf4;
  --fg-2: #9aa7b8;
  --fg-3: #5e6b7e;
  --fg-4: #3f4a5a;
  --c-loud:   #eef3f9;
  --c-bass:   #3b82f6;
  --c-mid:    #2fb84d;
  --c-treble: #f59e0b;
  --c-clip:   #f4503f;
  --accent:       #4f7cff;
  --accent-deep:  #3a63e0;
  --accent-soft:  rgba(79,124,255,0.14);
  --grade-low:    #58a6ff;
  --grade-good:   #2fb84d;
  --grade-high:   #f4503f;
  --grade-warn:   #d8a017;
  --grade-off:    #4a566a;
  --grade-low-bg:  rgba(88,166,255,0.13);
  --grade-good-bg: rgba(47,184,77,0.14);
  --grade-high-bg: rgba(244,80,63,0.14);
  --grade-warn-bg: rgba(216,160,23,0.15);
  --grade-off-bg:  rgba(74,86,106,0.14);
  --ok:   #2fb84d;
  --warn: #d8a017;
  --bad:  #f4503f;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-3: 0 18px 48px rgba(0,0,0,0.5);
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --rail-w: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--fg-1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#root { height: 100vh; }
::selection { background: rgba(79,124,255,0.3); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); background-clip: padding-box; }

/* ---- shell ---- */
.app {
  display: flex; height: 100vh;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(79,124,255,0.06), transparent 60%), var(--bg-0);
}
.rail {
  width: var(--rail-w); flex: 0 0 var(--rail-w);
  background: var(--bg-rail); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 0; gap: 8px;
}
.rail-logo {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(160deg, #1c2740, #0f1626);
  border: 1px solid var(--line-2); color: var(--accent);
}
.rail-nav { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
.rail-item {
  width: 60px; height: 58px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--fg-3); cursor: pointer; border: 1px solid transparent;
  transition: all .16s var(--ease); background: none;
  font-family: var(--font); font-size: 10px; font-weight: 600; letter-spacing: .02em;
}
.rail-item:hover { color: var(--fg-1); background: var(--bg-2); }
.rail-item.active { color: var(--accent); background: var(--accent-soft); border-color: rgba(79,124,255,0.3); }
.rail-item svg { width: 21px; height: 21px; }
.rail-spacer { flex: 1; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page { padding: 20px 24px 40px; max-width: 1680px; margin: 0 auto; width: 100%; }

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: stretch; gap: 1px;
  border-bottom: 1px solid var(--line); background: var(--bg-1);
  min-height: 78px;
}
.topbar-id { display: flex; align-items: center; gap: 16px; padding: 12px 24px; flex: 0 0 auto; }
.topbar-title { display: flex; flex-direction: column; gap: 3px; }
.topbar-title h1 {
  font-size: 18px; font-weight: 800; letter-spacing: .1em; margin: 0;
  text-transform: uppercase; white-space: nowrap; line-height: 1.1;
}
.topbar-sub { font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 8px; }
.kpi-strip { display: flex; flex: 1; align-items: stretch; }
.kpi {
  flex: 1; padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  border-left: 1px solid var(--line); min-width: 0;
}
.kpi-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; }
.kpi-val { font-family: var(--mono); font-size: 22px; font-weight: 600; line-height: 1; }
.kpi-val .unit { font-size: 11px; color: var(--fg-3); margin-left: 3px; font-weight: 500; }
.kpi-strip .topbar-gear {
  padding: 0 18px; display: grid; place-items: center;
  color: var(--fg-3); cursor: pointer; border-left: 1px solid var(--line);
}
.kpi-strip .topbar-gear:hover { color: var(--fg-1); }

.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--c-clip); background: rgba(244,80,63,0.12); padding: 3px 9px; border-radius: 999px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-clip); animation: pulse 1.6s var(--ease) infinite;
}
@keyframes pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.35; transform:scale(.8);} }

/* ---- panels ---- */
.panel {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.panel-title {
  font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-1); display: flex; align-items: center; gap: 8px;
}
.panel-title .i { color: var(--fg-3); display: inline-grid; place-items: center; }
.muted { color: var(--fg-2); }
.dim   { color: var(--fg-3); }
.mono  { font-family: var(--mono); }
.grid  { display: grid; gap: 16px; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--fg-2); font-weight: 500; }
.legend-swatch { width: 11px; height: 11px; border-radius: 3px; }
.legend-line   { width: 16px; height: 3px; border-radius: 2px; }

/* ---- buttons ---- */
.btn {
  font-family: var(--font); font-weight: 700; font-size: 13px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-2);
  padding: 9px 18px; cursor: pointer; background: var(--bg-2); color: var(--fg-1);
  transition: all .14s var(--ease); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-strong); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.danger { background: rgba(244,80,63,0.14); border-color: rgba(244,80,63,0.4); color: #ff8276; }
.btn.danger:hover { background: rgba(244,80,63,0.22); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 13px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.select {
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--fg-1);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 8px 12px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 5l4 4 4-4'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}

/* ---- grade chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 11px;
  letter-spacing: .04em; padding: 3px 9px; border-radius: 6px; text-transform: uppercase; white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.low  { color: var(--grade-low);  background: var(--grade-low-bg); }
.chip.good { color: var(--grade-good); background: var(--grade-good-bg); }
.chip.high { color: var(--grade-high); background: var(--grade-high-bg); }
.chip.warn { color: var(--grade-warn); background: var(--grade-warn-bg); }
.chip.off  { color: var(--grade-off);  background: var(--grade-off-bg); }
.chip.low  .dot { background: var(--grade-low); }
.chip.good .dot { background: var(--grade-good); }
.chip.high .dot { background: var(--grade-high); }
.chip.warn .dot { background: var(--grade-warn); }
.chip.off  .dot { background: var(--grade-off); }

.tag {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--fg-2);
}
.tag.high   { color: var(--bad);    border-color: rgba(244,80,63,0.4);   background: rgba(244,80,63,0.1); }
.tag.medium { color: var(--warn);   border-color: rgba(216,160,23,0.4);  background: rgba(216,160,23,0.1); }
.tag.eq     { color: var(--accent); border-color: rgba(79,124,255,0.4);  background: var(--accent-soft); }
.tag.info   { color: var(--c-bass); border-color: rgba(59,130,246,0.4);  background: rgba(59,130,246,0.1); }

/* ---- readout ---- */
.readout { display: flex; flex-direction: column; }
.readout-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.readout-row:last-child { border-bottom: none; }
.readout-row .rdot   { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.readout-row .rlabel { flex: 1; color: var(--fg-2); font-size: 13px; }
.readout-row .rval   { font-family: var(--mono); font-weight: 600; font-size: 15px; }

/* ---- event feed ---- */
.event { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: none; }
.event .edot  { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.event .etime { font-family: var(--mono); font-size: 12px; color: var(--fg-3); flex: 0 0 auto; width: 58px; }
.event .etext { flex: 1; font-size: 13px; color: var(--fg-1); }

/* footer bar */
.footbar {
  display: flex; align-items: stretch; gap: 1px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.footcell { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-left: 1px solid var(--line); }
.footcell:first-child { border-left: none; }
.footcell .fc-ico   { color: var(--fg-3); }
.footcell .fc-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; }
.footcell .fc-val   { font-size: 13px; font-weight: 600; color: var(--fg-1); }
.footcell.right     { margin-left: auto; }

/* page header */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h2 { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.page-head p  { margin: 0; color: var(--fg-2); font-size: 14px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 8px; }

.row     { display: flex; align-items: center; gap: 10px; }
.wrap    { flex-wrap: wrap; }
.gap-sm  { gap: 8px; }
.between { justify-content: space-between; }
.spacer  { flex: 1; }

.progress { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s var(--ease); }

.cap-meter { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; position: relative; }
.cap-meter > i {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--grade-good), var(--c-treble) 70%, var(--c-clip));
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px);} to { opacity:1; transform: none;} }
.fade-up { animation: fadeUp .3s var(--ease) both; }

/* ===================== CHECKLIST ===================== */
.check-summary {
  display: grid; grid-template-columns: 1.4fr 1fr 1.8fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 22px;
}
.sum-cell { background: var(--bg-1); padding: 16px 20px; }
.sum-num  { font-size: 26px; font-weight: 600; line-height: 1; }
.sum-lab  { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; margin-top: 7px; }

.grp { margin-bottom: 30px; }
.grp-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.grp-title { font-size: 16px; font-weight: 800; margin: 0; letter-spacing: .01em; }
.grp-head .dim { font-size: 13px; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.dev-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.dev-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.dev-ico  { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-3); }
.dev-name { font-weight: 700; font-size: 14px; }

.matrix { display: grid; }
.matrix .thead {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--fg-2);
  padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.matrix .thead.corner { color: var(--fg-3); text-transform: uppercase; }
.matrix .thead.song   { border-left: 1px solid var(--line); }
.matrix .crit-label {
  font-size: 12.5px; color: var(--c-bass); font-weight: 600; padding: 12px;
  border-bottom: 1px solid var(--line); display: flex; align-items: center; background: var(--bg-1);
}
.matrix .tcell { border-left: 1px solid var(--line); }

.rowtable-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-1); }
.rowtable { display: grid; }
.rowtable .thead {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3);
  padding: 12px; background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.rowtable .thead.corner { color: var(--fg-1); font-size: 12px; }
.name-cell {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-bottom: 1px solid var(--line); background: var(--bg-1); min-width: 0;
}
.name-cell.active { background: rgba(79,124,255,0.06); }
.name-ico  { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; background: var(--bg-3); }
.row-name  { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-cell .chip { margin-left: auto; }

.tcell {
  padding: 11px 12px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; justify-content: center; min-height: 56px;
}
.cell-meta { display: flex; flex-direction: column; gap: 1px; }
.cell-meta .mono { font-size: 10.5px; color: var(--fg-3); }
.cell-note { font-size: 11px; color: var(--c-treble); font-style: italic; line-height: 1.3; }
.cell-pulse {
  display: block; height: 9px; width: 60%; border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-3), var(--accent-soft), var(--bg-3));
  background-size: 200% 100%; animation: shimmer 1s linear infinite;
}
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }
.run-cell { align-items: center; flex-direction: column; gap: 5px; }
.ranat { font-size: 10px; }

.runbtn {
  position: relative; width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; cursor: pointer; transition: all .14s var(--ease);
  background: var(--accent); border: none; color: #fff;
}
.runbtn:hover { background: var(--accent-deep); transform: scale(1.06); }
.runbtn.done { background: var(--bg-3); color: var(--grade-good); border: 1px solid var(--line-2); }
.runbtn.done:hover { background: var(--bg-3); color: var(--fg-1); }
.runbtn.stop { background: rgba(244,80,63,0.12); }
.runbtn.stop:hover { background: rgba(244,80,63,0.2); transform: none; }

.capbar {
  display: flex; align-items: center; gap: 16px; padding: 13px 18px; margin-bottom: 20px;
  background: linear-gradient(90deg, rgba(79,124,255,0.1), var(--bg-1) 40%);
  border: 1px solid rgba(79,124,255,0.3); border-radius: var(--radius-lg);
  position: relative; overflow: hidden;
}
.capbar-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--accent); flex: 0 0 auto; }
.capbar-live .live-dot { background: var(--accent); }
.capbar-meter { flex: 0 0 130px; height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.capbar-meter > div { height: 100%; background: linear-gradient(90deg, var(--grade-good), var(--c-treble) 75%, var(--c-clip)); border-radius: 999px; transition: width .1s linear; }
.capbar-vals { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; font-size: 12px; color: var(--fg-2); }
.capbar-vals b { font-size: 14px; margin-right: 3px; }
.capbar-prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: transparent; }
.capbar-prog > div { height: 100%; background: var(--accent); transition: width .1s linear; }
.capbar-elapsed { flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--c-clip); }
.capbar-sweep {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 30%;
  background: linear-gradient(90deg, transparent, var(--c-clip), transparent);
  animation: sweep 1.4s linear infinite;
}
@keyframes sweep { 0%{transform:translateX(-100%);} 100%{transform:translateX(430%);} }
.spin-ring { animation: spinr 1s linear infinite; transform-origin: center; }
@keyframes spinr { to { transform: rotate(360deg); } }

/* ===================== DEVICES ===================== */
.device-note {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; margin-bottom: 18px;
  background: rgba(216,160,23,0.08); border: 1px solid rgba(216,160,23,0.3);
  border-radius: var(--radius); font-size: 13px; color: var(--fg-2);
}
.device-list { display: flex; flex-direction: column; gap: 10px; }
.device-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px 18px; cursor: pointer; transition: all .14s var(--ease);
  font-family: var(--font); color: var(--fg-1);
}
.device-row:hover { border-color: var(--line-strong); background: var(--bg-2); }
.device-row.selected { border-color: rgba(79,124,255,0.5); background: var(--accent-soft); box-shadow: 0 0 0 1px rgba(79,124,255,0.3) inset; }
.dev-radio { width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; }
.device-row.selected .dev-radio { border-color: var(--accent); }
.dev-radio-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.device-ico { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--bg-3); }
.device-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.device-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.device-sub  { font-size: 11.5px; color: var(--fg-3); }
.dev-meter   { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; height: 26px; }
.dev-meter span { width: 4px; border-radius: 1px; height: 100%; transition: background .1s linear, opacity .1s linear; }
.device-sig { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; flex: 0 0 auto; width: 72px; }
.sig-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 7px currentColor; }
.scan-radar {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--accent-soft); position: relative;
}
.scan-radar::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--accent); border-right-color: transparent; border-bottom-color: transparent;
  animation: spinr 1s linear infinite;
}

/* ===================== REPORT ===================== */
.report-hero { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.report-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 18px 28px; }
.rm-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; }
.rm-val   { font-size: 16px; font-weight: 700; margin-top: 3px; }

.timeline { position: relative; padding-left: 4px; }
.tl-track {
  position: relative; height: 56px; border-radius: 10px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); display: flex;
}
.tl-seg { flex: 1; border-right: 1px solid var(--line); position: relative; }
.tl-seg:last-child { border-right: none; }
.tl-marker { position: absolute; top: 0; bottom: 0; width: 2px; }
.tl-axis   { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; }

.issue-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.issue-row:last-child { border-bottom: none; }
.issue-name { font-weight: 600; font-size: 14px; }
.issue-sub  { font-size: 12px; color: var(--fg-3); }

.report-table { display: grid; }
.report-table .thead { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-3); padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.report-table .rt-cell { padding: 10px 12px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.report-table .rt-name { padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }

/* ===================== TRENDS ===================== */
.trend-table { width: 100%; border-collapse: collapse; }
.trend-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.trend-table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.trend-table tr:last-child td { border-bottom: none; }
.delta { font-family: var(--mono); font-weight: 600; font-size: 12.5px; padding: 2px 7px; border-radius: 5px; }
.delta.up   { color: var(--grade-good); background: var(--grade-good-bg); }
.delta.down { color: var(--grade-high); background: var(--grade-high-bg); }
.delta.flat { color: var(--fg-3);       background: var(--bg-3); }

.weekbars { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 0 4px; }
.weekbar  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.weekbar .wb-fill { width: 100%; max-width: 54px; border-radius: 8px 8px 0 0; transition: height .6s var(--ease); position: relative; }
.weekbar .wb-val  { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.weekbar .wb-lab  { font-size: 11px; color: var(--fg-3); }
.weekbar.cur .wb-lab { color: var(--accent); font-weight: 700; }

/* session switcher */
.sess-switch {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer;
}
.sess-switch:hover { border-color: var(--line-strong); }

/* operator picker */
.op-picker { position: relative; }
.op-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; z-index: 50;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow-3); padding: 6px;
}
.op-menu-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); font-weight: 700; padding: 8px 10px 6px; }
.op-empty { color: var(--fg-3); font-size: 13px; padding: 10px; }
.op-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; color: var(--fg-1); font-family: var(--font);
  font-size: 13.5px; font-weight: 600; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
}
.op-item:hover { background: var(--bg-3); }
.op-item.active { color: var(--accent); }
.op-item.add    { color: var(--fg-2); font-weight: 600; }
.op-plus { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.op-divider { height: 1px; background: var(--line); margin: 5px 4px; }
.op-add { display: flex; gap: 6px; padding: 6px; }
.op-add.stacked { flex-direction: column; }
.sunday-menu { min-width: 260px; }
.op-input {
  flex: 1; min-width: 0; background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); color: var(--fg-1); font-family: var(--font);
  font-size: 13px; padding: 8px 10px; outline: none;
}
.op-input:focus { border-color: var(--accent); }

.source-url-row {
  display: flex; gap: 10px; align-items: center;
}
.source-action-row {
  display: flex; gap: 12px; align-items: center; margin-bottom: 12px;
}
.source-url-input {
  min-height: 38px;
}
.source-url-note {
  margin-top: 10px; color: var(--fg-3); font-size: 12.5px;
  display: flex; align-items: center; gap: 8px; min-height: 18px;
}
.source-url-note span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
@media (max-width: 760px) {
  .source-url-row { flex-direction: column; align-items: stretch; }
  .source-action-row { flex-direction: column; align-items: stretch; }
}

.access-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 20px;
  background: rgba(2,4,8,.68);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.access-modal {
  width: min(440px, 100%);
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: var(--shadow-3); padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
}
.access-modal h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.access-modal p { margin: 6px 0 0; color: var(--fg-2); line-height: 1.6; }

/* tweaks panel overrides */
.twk-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 2147483646; width: 280px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: rgba(250,249,247,.78); color: #29261b;
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: .5px solid rgba(255,255,255,.6); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 40px rgba(0,0,0,.18);
  font: 11.5px/1.4 ui-sans-serif,system-ui,-apple-system,sans-serif; overflow: hidden;
}
