/* Observer dashboard — dense dark internal tool. No frameworks, no build. */

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0c1016;
  --bg-raise: #10161f;
  --panel: #121926;
  --panel-2: #0e141d;
  --border: #1e2836;
  --border-strong: #2b3849;
  --text: #d8e0ea;
  --text-dim: #8d9aae;
  --text-faint: #5f6d82;
  --accent: #D61F6C;          /* brand-kit observer --brand-2, the single-accent stop */
  --accent-dim: #4A1029;
  --brand: var(--accent);
  --green: #3fb68b;
  --green-dim: #1c4235;
  --orange: #e0a33a;
  --orange-dim: #4a3714;
  --red: #e05a5a;
  --red-dim: #4a2020;
  --cyan: #38b8c9;
  --purple: #a37ff0;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --shadow-pop: 0 8px 28px rgba(0, 0, 0, .55), 0 0 0 1px var(--border-strong);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#app { display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12px; }
button { font: inherit; color: inherit; }
svg { display: block; }
::selection { background: rgba(214, 31, 108, .35); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: var(--r-sm); }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 12px;
  background: var(--bg-raise);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  flex-wrap: nowrap; white-space: nowrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; letter-spacing: .2px; color: var(--text); }
/* The mark carries its own rounded plate, so no background or radius here. */
.brand .logo { width: 20px; height: 20px; flex: none; display: block; }
.login-card .brand .logo { width: 28px; height: 28px; }
.badge-mock {
  font: 600 10px/1 var(--mono); letter-spacing: .8px;
  color: #ffd479; background: var(--orange-dim); border: 1px solid #6b531f;
  padding: 3px 6px; border-radius: 999px; cursor: default;
}
.topbar-sep { width: 1px; height: 20px; background: var(--border-strong); flex: none; }
.topbar .spacer { flex: 1 1 auto; }

/* controls */
.ctl {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-md); padding: 4px 8px; font-size: 12.5px; height: 26px;
}
.ctl:hover { border-color: var(--border-strong); }
select.ctl { appearance: none; -webkit-appearance: none; padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%238d9aae'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
}
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.seg button {
  background: transparent; border: 0; border-right: 1px solid var(--border);
  color: var(--text-dim); padding: 4px 9px; font-size: 12px; cursor: pointer; height: 26px;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); background: var(--panel-2); }
.seg button.on { background: var(--accent-dim); color: #F4D2E1; }
.seg button.on:hover { background: var(--accent-dim); }

.user-btn {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px 3px 4px; height: 28px;
}
.user-btn:hover { border-color: var(--border-strong); }
.avatar {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--accent-dim); color: #F4D2E1;
  display: grid; place-items: center; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.role-chip { font-size: 10px; color: var(--text-dim); border: 1px solid var(--border); padding: 1px 5px; border-radius: 999px; }

/* dropdown menus */
.menu {
  position: fixed; z-index: 200; min-width: 220px;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); padding: 6px;
}
.menu .menu-head { padding: 6px 28px 6px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
/* every popup keeps its close ✕ — menus and the custom-range popover included */
.menu-x { position: absolute; top: 4px; right: 4px; background: none; border: 0; color: var(--text-faint); font-size: 13px; cursor: pointer; padding: 3px 7px; border-radius: var(--r-md); }
.menu-x:hover { color: var(--text); background: var(--panel-2); }
.menu[role="dialog"] { padding-top: 24px; }
.menu .menu-head .em { font-weight: 600; }
.menu-item {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--text); padding: 6px 8px; border-radius: var(--r-md); font-size: 12.5px;
}
.menu-item:hover { background: var(--accent-dim); }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red-dim); }
.menu-note { padding: 4px 8px; color: var(--text-faint); font-size: 11px; }

/* date custom popover */
.range-pop { display: flex; gap: 8px; align-items: end; padding: 10px; min-width: 240px; }
.range-pop label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.range-pop input[type="date"] { width: 130px; }

/* ---------- nav ---------- */
.nav {
  display: flex; gap: 2px; padding: 0 10px; align-items: center;
  background: var(--bg-raise); border-bottom: 1px solid var(--border);
  overflow-x: auto; height: 36px;
}
.nav a {
  color: var(--text-dim); padding: 0 11px; line-height: 34px; font-size: 12.5px;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.on { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- main ---------- */
main { padding: 14px; max-width: 1560px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 17px; margin: 0; font-weight: 650; }
.page-head .sub { color: var(--text-faint); font-size: 12px; }
.page-head .grow { flex: 1; }

.grid { display: grid; gap: 10px; margin-bottom: 10px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* ---------- panels / cards ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 12px; min-width: 0;
}
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel-head h2 { font-size: 12px; margin: 0; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.panel-head .grow { flex: 1; }
.panel .sub { color: var(--text-faint); font-size: 11.5px; }

/* KPI */
.kpi .kpi-label { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 11.5px; }
.kpi .kpi-value { font-size: 24px; font-weight: 650; margin: 4px 0 2px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.kpi .kpi-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 18px; }
.kpi .kpi-sub { color: var(--text-faint); font-size: 11px; }
.delta { font-size: 11px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--text-faint); }

/* ---------- badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font: 600 10px/1 var(--mono); letter-spacing: .4px;
  padding: 3px 6px; border-radius: 999px; border: 1px solid; white-space: nowrap;
}
.badge.exact { color: var(--green); background: var(--green-dim); border-color: #2a5b47; }
.badge.est { color: var(--orange); background: var(--orange-dim); border-color: #6b531f; }
.badge.samp { color: var(--cyan); background: #123338; border-color: #1e545e; }
.badge.comp { color: var(--purple); background: #2c2144; border-color: #4d3a78; }
.badge.sup { color: #ffb4b4; background: var(--red-dim); border-color: #6e3333; cursor: help; }
.badge.neutral { color: var(--text-dim); background: var(--panel-2); border-color: var(--border); }
.badge.good { color: var(--green); background: var(--green-dim); border-color: #2a5b47; }
.badge.ni { color: var(--orange); background: var(--orange-dim); border-color: #6b531f; }
.badge.poor { color: var(--red); background: var(--red-dim); border-color: #6e3333; }
.badge.tier { font-size: 11px; }

/* info (definitions) trigger */
.info {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-dim);
  font: 600 10px/1 var(--sans); cursor: help; display: inline-grid; place-items: center;
  padding: 0;
}
.info:hover { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }

/* definitions tooltip */
.def-tip {
  position: fixed; z-index: 300; max-width: 320px;
  background: #0b0f16; border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); padding: 10px 12px; font-size: 12px; color: var(--text);
}
.def-tip .dt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.def-tip .dt-term { font-weight: 650; }
.def-tip .dt-formula { font-family: var(--mono); font-size: 11.5px; color: var(--cyan); margin: 4px 0; word-break: break-word; }
.def-tip .dt-note { color: var(--text-dim); font-size: 11.5px; margin-top: 4px; }
.def-tip .dt-class { margin-left: auto; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--text-faint); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 5px 8px; border-bottom: 1px solid var(--border); position: sticky; top: -1px;
  background: var(--panel); z-index: 1; white-space: nowrap;
}
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td { padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(214, 31, 108, .05); }
.tbl td .path { color: var(--text); word-break: break-all; }
.tbl .dim { color: var(--text-dim); }
.tbl .faint { color: var(--text-faint); }
.tbl-foot { display: flex; gap: 8px; align-items: center; padding-top: 8px; color: var(--text-faint); font-size: 11.5px; }
.tbl-foot .grow { flex: 1; }

/* the Other row: rows under k = 5 (and past the limit) added up, unlabelled — a sum, not a
   place to click, so it is muted, italic, has no hover and keeps a help cursor for its tooltip */
.tbl tbody tr.other-row td { color: var(--text-faint); font-style: italic; cursor: help; }
.tbl tbody tr.other-row:hover td { background: transparent; }
.tbl tbody tr.other-row .share .bar i { background: var(--text-faint) !important; }
.other-label { white-space: nowrap; }

/* "most of this is folded — show 90 days" */
.widen-hint {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  margin: 0 0 10px; padding: 8px 12px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  color: var(--text-dim); font-size: 12px; background: var(--panel-2);
}
.widen-hint .btn { flex: none; }

/* inline bar (share) */
.share { display: flex; align-items: center; gap: 8px; }
.share .bar { flex: 1; height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; min-width: 40px; }
.share .bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.share .val { font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }

/* all-sites screen: a row opens that site's Overview (the link inside is the keyboard way in) */
.tbl tbody tr.row-link { cursor: pointer; }
.tbl .site-link { color: var(--text); font-weight: 600; }
.tbl .site-link:focus-visible, .tbl .site-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.tbl .site-top { font-size: 11px; margin-top: 1px; }
.tbl .share-col { width: 24%; min-width: 130px; }
.tbl .row-spark { display: inline-block; width: 96px; line-height: 0; vertical-align: middle; }
.site-chip { display: inline-block; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel-2); color: var(--text-dim); font-size: 11.5px; white-space: nowrap; }
.site-chip:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.portfolio-note { margin: -2px 0 10px; }

/* cwv chips */
.cwv { display: flex; gap: 4px; flex-wrap: wrap; }
.cwv .c { font: 600 10.5px/1 var(--mono); padding: 3px 5px; border-radius: var(--r-sm); border: 1px solid; }
.cwv .c.good { color: var(--green); background: var(--green-dim); border-color: #2a5b47; }
.cwv .c.ni { color: var(--orange); background: var(--orange-dim); border-color: #6b531f; }
.cwv .c.poor { color: var(--red); background: var(--red-dim); border-color: #6e3333; }
.cwv .c.na { color: var(--text-faint); background: var(--panel-2); border-color: var(--border); }

/* ---------- buttons ---------- */
.btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-md); padding: 5px 11px; font-size: 12.5px; cursor: pointer; height: 28px;
}
.btn:hover { border-color: var(--border-strong); background: var(--panel-2); }
.btn.primary { background: var(--accent-dim); border-color: #8E1C4D; color: #F4D2E1; }
.btn.primary:hover { background: #6D173B; border-color: #B02A63; color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #6e3333; background: transparent; }
.btn.danger:hover { background: var(--red-dim); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { height: 24px; padding: 2px 8px; font-size: 11.5px; }

/* inputs */
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], select, textarea {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--r-md); padding: 5px 8px; font: 12.5px var(--sans); height: 28px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-size: 11px; color: var(--text-dim); }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; font-size: 12.5px; color: var(--text-dim); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 26px; height: 15px; border-radius: 999px; background: var(--border-strong);
  position: relative; transition: background .15s; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--text-dim); transition: transform .15s, background .15s;
}
.switch input:checked + .track { background: var(--accent-dim); }
.switch input:checked + .track::after { transform: translateX(11px); background: var(--accent); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- skeletons / empty / error ---------- */
.skel { border-radius: var(--r-md); background: linear-gradient(90deg, #141c28 25%, #1b2534 45%, #141c28 65%); background-size: 240% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.skel.row { height: 26px; margin-bottom: 6px; }
.skel.kpi { height: 86px; }
.skel.chart { height: 220px; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.empty {
  text-align: center; padding: 34px 20px; color: var(--text-dim);
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--panel-2);
}
.empty .e-title { font-weight: 600; color: var(--text); margin-bottom: 5px; font-size: 13.5px; }
.empty .e-hint { font-size: 12px; color: var(--text-faint); max-width: 480px; margin: 0 auto; }
.empty .e-hint code { background: var(--panel); padding: 1px 5px; border-radius: 4px; }

.error-card { border: 1px solid #6e3333; background: var(--red-dim); color: #ffd9d9; padding: 12px; border-radius: var(--r-lg); }
.error-card .e-title { font-weight: 650; margin-bottom: 4px; }
.error-card code { color: #ffc9c9; }
/* a slot that holds a failed poll's error above a screen that keeps working (realtime) */
.err-slot:not(:empty) { margin-bottom: 10px; }
/* the "no websites yet" invitation on a fresh install */
.empty.empty-hero { padding: 48px 20px; }
.empty.empty-hero .e-title { font-size: 16px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 340px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 26px; }
.login-card .brand { justify-content: center; margin-bottom: 6px; }
.login-card h1 { font-size: 16px; text-align: center; margin: 0 0 4px; font-weight: 650; }
.login-card .sub { text-align: center; color: var(--text-faint); font-size: 12px; margin-bottom: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-err { color: var(--red); font-size: 12px; min-height: 16px; margin: 2px 0 0; }
.login-foot { margin-top: 14px; font-size: 11px; color: var(--text-faint); text-align: center; line-height: 1.6; }

/* ---------- realtime ---------- */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; animation: pulse 1.6s infinite; }
.live-dot.paused { background: var(--text-faint); animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.bignum { font-size: 44px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* ---------- heatmap ---------- */
.hm-canvas-wrap { position: relative; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: #0a0e14; }
.hm-canvas-wrap canvas { display: block; max-width: 100%; }
.hm-preview-note { padding: 8px 10px; color: var(--text-faint); font-size: 11.5px; border-top: 1px dashed var(--border); }
.hm-iframe-wrap { position: relative; height: 420px; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: #0a0e14; }
.hm-iframe-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.hm-iframe-fallback { display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; color: var(--text-dim); font-size: 12.5px; }
.hm-iframe-fallback .big { font-size: 26px; margin-bottom: 8px; }
.hm-ramp { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #1e5bd8, #22b8cf, #3fb68b, #e0a33a, #e05252); }
.hm-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-faint); margin-top: 4px; }

/* ---------- privacy ---------- */
.kv-list { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv-list dt { color: var(--text-dim); margin: 0; }
.kv-list dd { margin: 0; }
.ret-num { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ret-lab { font-size: 11px; color: var(--text-faint); }

/* ---------- code block ---------- */
.codebox {
  background: #0a0e14; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; font: 12px/1.6 var(--mono); color: #b6c6dd; overflow-x: auto;
  white-space: pre; position: relative;
}
.codebox .copy { position: absolute; top: 6px; right: 6px; }

/* misc */
.notes { color: var(--text-faint); font-size: 11.5px; line-height: 1.6; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mt0 { margin-top: 0; }
.tc { text-align: center; }
.toast-host { position: fixed; bottom: 16px; right: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel); border: 1px solid var(--border-strong); border-left: 3px solid var(--green);
  border-radius: var(--r-md); padding: 8px 12px; font-size: 12.5px; box-shadow: var(--shadow-pop);
  animation: slidein .18s ease-out;
}
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── modal + wizard ─────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(5, 8, 16, 0.66); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; z-index: 200; overflow-y: auto; }
.modal-panel { background: var(--panel, #121722); border: 1px solid var(--border, #232b3b); border-radius: 14px; width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.5); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal-panel { animation: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border, #232b3b); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-x { background: none; border: 0; color: var(--text-faint, #7c8aa5); font-size: 15px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.modal-x:hover { color: var(--text, #e6ebf5); background: var(--hover, #1a2130); }
.modal-body { padding: 18px 20px 20px; }
.field { margin: 12px 0; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint, #7c8aa5); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--input-bg, #0d111a); color: var(--text, #e6ebf5); border: 1px solid var(--border, #232b3b); border-radius: 8px; padding: 9px 11px; font: inherit; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand, #D61F6C); outline-offset: 0; border-color: transparent; }
.field-err { color: var(--red, #ff6b6b); font-size: 13px; margin: 10px 0 0; }
.field .notes { font-size: 12px; color: var(--text-faint, #7c8aa5); margin-top: 5px; }
.wizard-foot { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border, #232b3b); }
.tier-card { display: block; border: 1px solid var(--border, #232b3b); border-radius: 11px; padding: 13px 15px; margin: 9px 0; cursor: pointer; transition: border-color .12s, background .12s; }
.tier-card:hover { border-color: var(--brand, #D61F6C); }
.tier-card.on { border-color: var(--brand, #D61F6C); background: rgba(214, 31, 108, 0.07); }
.tier-card input { margin-right: 9px; accent-color: var(--brand, #D61F6C); }
.tier-head { display: flex; align-items: center; gap: 8px; }
.tier-head .badge.ok { margin-left: auto; }
.badge.ok { background: rgba(52, 199, 123, .14); color: var(--green, #34c77b); border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.tier-card .sub { margin: 6px 0 0 24px; font-size: 13px; }
.verify { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border, #232b3b); border-radius: 11px; padding: 13px 15px; margin-top: 14px; }
.verify.pending { border-color: rgba(255, 193, 7, .4); }
.verify.ok { border-color: rgba(52, 199, 123, .5); background: rgba(52, 199, 123, .06); }
.verify.timeout { border-color: rgba(224, 163, 58, .5); background: rgba(224, 163, 58, .06); }
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,193,7,.3); border-top-color: #ffc107; border-radius: 50%; animation: spin .8s linear infinite; margin-top: 3px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.verify-dot { color: var(--green, #34c77b); font-weight: 800; font-size: 17px; margin-top: 1px; }
.domain-list { display: flex; flex-wrap: wrap; gap: 7px; }
.domain-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--input-bg, #0d111a); border: 1px solid var(--border, #232b3b); border-radius: 999px; padding: 5px 7px 5px 12px; font-size: 13px; font-family: ui-monospace, monospace; }
.chip-x { background: none; border: 0; color: var(--text-faint, #7c8aa5); cursor: pointer; font-size: 12px; padding: 1px 5px; border-radius: 50%; }
.chip-x:hover { color: var(--red, #ff6b6b); background: rgba(255,107,107,.12); }
.btn.danger { background: rgba(255, 107, 107, .12); color: var(--red, #ff6b6b); border: 1px solid rgba(255, 107, 107, .35); }
.btn.danger:hover { background: rgba(255, 107, 107, .2); }
.wizard-foot .grow { flex: 1; }

/* ── sessions screen ────────────────────────────────────────────────────────── */
.grid.cols-5-7 { display: grid; grid-template-columns: 5fr 7fr; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .grid.cols-5-7 { grid-template-columns: 1fr; } }
tr.on { background: rgba(214, 31, 108, 0.08); }
.lanes { display: grid; gap: 10px; margin: 12px 0; }
.lane { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; }
.lane-label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; overflow: hidden; }
.lane-label .split { font-weight: 800; color: var(--brand, #D61F6C); }
.lane-label .split.dim { color: var(--text-faint, #7c8aa5); font-weight: 600; }
.lane-track { position: relative; height: 34px; background: var(--hover, #1a2130); border: 1px solid var(--border, #232b3b); border-radius: 8px; overflow: visible; }
.lane-page { position: absolute; top: 6px; height: 22px; background: rgba(214, 31, 108, 0.22); border: 1px solid rgba(214, 31, 108, 0.55); border-radius: 5px; font-size: 11px; line-height: 20px; padding: 0 6px; color: var(--text, #e6ebf5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 12px; line-height: 1; background: var(--panel, #121722); border: 1.5px solid; border-radius: 50%; padding: 2px 3px; cursor: default; }

/* ── ask bar + signals ──────────────────────────────────────────────────────── */
.ask-bar { width: 320px; max-width: 30vw; background: var(--hover, #1a2130); border: 1px solid var(--border, #232b3b); color: var(--text, #e6ebf5); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13px; }
.ask-bar:focus { outline: 2px solid var(--brand, #D61F6C); outline-offset: 0; border-color: transparent; }
.anomaly-card { display: flex; gap: 12px; border: 1px solid var(--border, #232b3b); border-radius: 11px; padding: 12px 14px; }
.anomaly-card.high { border-color: rgba(255, 107, 107, .45); background: rgba(255, 107, 107, .05); }
.anomaly-card.med { border-color: rgba(255, 193, 7, .35); background: rgba(255, 193, 7, .04); }
.anomaly-card.deploy { border-color: rgba(214, 31, 108, .4); }
.a-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-faint, #7c8aa5); margin-top: 7px; flex: none; }
.anomaly-card.high .a-dot { background: var(--red, #ff6b6b); }
.anomaly-card.deploy .a-dot { background: var(--brand, #D61F6C); }
.deploy-chip { background: var(--hover, #1a2130); border: 1px solid var(--border, #232b3b); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
