/* Sense UI. Light only (DT, 8 Oct 2026): the canvas is Sensi's own studio backdrop (#f2f8fe, near-white with a hint
   of blue, sampled from his renders), so he sits on every page with no box around him. White cards float on it;
   blue is the action colour and Broker Sensi's tie. */
:root {
  color-scheme: light;
  --canvas: #f2f8fe; --surface: #ffffff; --surface-2: #f4f7fb; --hover: #eef2f8; --pressed: #e1e8f2;
  --text: #17202b; --text-2: #4f5b6b; --text-3: #7a8696; --divider: #e2e8f0; --border: #c4cfdd;
  --blue: #0866ff; --blue-hover: #0759e0; --blue-tint: #e6f0ff; --blue-tint-2: #d3e3fd; --on-blue: #ffffff;
  --mint: #23955a; --mint-tint: #e1f6ea; --mint-glow: #c9f2d8;
  --btn-2: #e3e9f2; --btn-2-hover: #d6deea;
  --green: #2f9e55; --green-tint: #e4f6ea; --amber: #b5770d; --amber-tint: #fff4dc; --red: #e41e3f; --red-tint: #ffebee;
  --shadow: 0 1px 2px rgba(23, 37, 64, 0.08), 0 0 0 1px rgba(23, 37, 64, 0.04);
  --shadow-lg: 0 14px 32px rgba(23, 37, 64, 0.14), 0 2px 4px rgba(23, 37, 64, 0.06);
  --focus: 0 0 0 3px rgba(8, 102, 255, 0.22);
  --r: 8px; --r-lg: 12px; --topbar: 56px;
}

/* Sensi: his renders keep their backdrop (the glow lives in it); the edges feather into the canvas */
.sensi { display: block; height: auto; user-select: none; -webkit-user-drag: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 68%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 68%, transparent 100%); }
/* The logo (25 Oct 2026): the Halves mark and the Funnel Display wordmark, one SVG with the type outlined */
.brand img.logo { display: block; width: auto; height: 26px; }
.empty .sensi { width: 120px; margin: 0 auto 4px; }
.sensi-float { animation: sensi-bob 4s ease-in-out infinite; }
@keyframes sensi-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .sensi-float { animation: none; } }
video.sensi { object-fit: cover; background: var(--canvas); }

/* Motion (static/motion.js). Only under html.motion, which a head script sets and motion.js removes for reduced
   motion, so without JS nothing is ever hidden. */
.motion .reveal { opacity: 0; transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), transform .55s cubic-bezier(.2,.7,.2,1) var(--d, 0ms); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .sensi-pop { animation: sensi-pop .7s cubic-bezier(.34,1.56,.64,1) .1s both; }
@keyframes sensi-pop { from { opacity: 0; transform: translateY(18px) scale(.9); } to { opacity: 1; transform: none; } }
/* Sensi on a card: the loop's bottom edge is the card's top edge (peek) or overlaps it (sit) */
.has-sensi { position: relative; }
.sensi-peek, .sensi-sit { position: absolute; display: block; pointer-events: none; height: auto; background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 64% 105% at 50% 100%, #000 76%, transparent 100%);
  mask-image: radial-gradient(ellipse 64% 105% at 50% 100%, #000 76%, transparent 100%); }
.sensi-peek { width: 256px; left: 50%; bottom: 100%; transform: translateX(-50%);   /* peek-wide: room for his hands as he looks about */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 12%);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent), linear-gradient(transparent, #000 12%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.sensi-sit { width: 120px; right: 18px; top: -124px;
  -webkit-mask-image: radial-gradient(ellipse 48% 100% at 50% 100%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 48% 100% at 50% 100%, #000 70%, transparent 100%); }
.lift { transition: transform .18s ease, box-shadow .18s ease; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: reduce) { .lift:hover { transform: none; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text);
  font: 15px/1.34 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Historic", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand small { font-size: 15px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #0866ff 0%, #0aa0ff 100%); color: #fff; }
.mark svg { width: 22px; height: 22px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--btn-2);
  color: var(--text); border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--btn-2-hover); text-decoration: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: 15px; color: #fff; background: linear-gradient(135deg, #5b7cfa, #0866ff); border: 0; cursor: pointer; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 48px; width: 300px; background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 8px; }
.menu-head { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); }
.menu-head b { display: block; font-size: 15px; }
.menu-head span { color: var(--text-2); font-size: 13px; word-break: break-all; }
.menu-sep { height: 1px; background: var(--divider); margin: 8px; }
.menu-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: var(--r);
  color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--hover); text-decoration: none; }
.menu-item .icon-bubble { width: 36px; height: 36px; border-radius: 50%; background: var(--btn-2); display: grid; place-items: center; }

/* ---------- shells ---------- */
.shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidenav { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); overflow-y: auto;
  background: var(--surface); padding: 16px 8px; box-shadow: 1px 0 0 var(--divider); }
.sidenav-title { font-size: 24px; font-weight: 700; padding: 4px 12px 2px; letter-spacing: -0.01em; }
.sidenav-sub { color: var(--text-2); font-size: 13px; padding: 0 12px 12px; }
.sidenav-label { color: var(--text-2); font-size: 13px; font-weight: 600; padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); color: var(--text);
  font-weight: 600; font-size: 15px; }
.nav-item:hover { background: var(--hover); text-decoration: none; }
.nav-item .icon-bubble { width: 36px; height: 36px; border-radius: 50%; background: var(--btn-2); display: grid;
  place-items: center; color: var(--text); }
.nav-item.on { background: var(--blue-tint); color: var(--blue); }
.nav-item.on .icon-bubble { background: var(--blue); color: var(--on-blue); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.content { padding: 24px 32px 64px; min-width: 0; }
.content.narrow { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.page-head p { color: var(--text-2); margin: 4px 0 0; }
.single { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.3; }
.card-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13px; }
.card.flush .card-head { padding: 16px 16px 0; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.stack-gap > * + * { margin-top: 12px; }

/* ---------- stats ---------- */
.stat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.stat .label { color: var(--text-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.stat .sub { color: var(--text-3); font-size: 12px; margin-top: 4px; }

/* ---------- buttons ---------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 6px; border: 0; background: var(--btn-2); color: var(--text); font: inherit; font-size: 15px;
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, transform .08s; }
button:hover, .btn:hover { background: var(--btn-2-hover); text-decoration: none; }
button:active, .btn:active { transform: scale(0.98); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--focus); }
.primary { background: var(--blue); color: var(--on-blue); }
.primary:hover { background: var(--blue-hover); }
.tint { background: var(--blue-tint); color: var(--blue); }
.tint:hover { background: var(--blue-tint-2); }
.danger { background: var(--red-tint); color: var(--red); }
.danger:hover { background: var(--red-tint); filter: brightness(0.97); }
.ghost { background: transparent; color: var(--blue); }
.ghost:hover { background: var(--hover); }
.btn-lg { height: 48px; font-size: 17px; padding: 0 20px; }
.btn-sm { height: 32px; font-size: 13px; padding: 0 10px; }
.block { width: 100%; }
button[disabled] { opacity: .5; cursor: default; }

/* ---------- forms ---------- */
input, select, textarea { font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; height: 44px; padding: 0 12px; width: 100%; transition: border-color .12s; }
textarea { height: auto; padding: 10px 12px; }
select { width: auto; padding-right: 28px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
input::placeholder { color: var(--text-3); }
input.lg { height: 52px; font-size: 17px; padding: 0 16px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 12px; top: 12px; color: var(--text-2); width: 20px; height: 20px; }
.search input { padding-left: 40px; border-radius: 22px; background: var(--btn-2); border-color: transparent; }
.search input:focus { background: var(--surface); }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 600; background: var(--btn-2); color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.chip.ok { background: var(--green-tint); color: var(--green); }
.chip.warn { background: var(--amber-tint); color: var(--amber); }
.chip.bad { background: var(--red-tint); color: var(--red); }
.chip.blue { background: var(--blue-tint); color: var(--blue); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- tables and lists ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 10px 16px; white-space: nowrap;
  border-bottom: 1px solid var(--divider); }
td { padding: 12px 16px; border-bottom: 1px solid var(--divider); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
tr.sel td { background: var(--blue-tint); }
.cell-sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--divider); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; }
.list-row .desc { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.icon-bubble { width: 40px; height: 40px; border-radius: 50%; background: var(--btn-2); display: grid; place-items: center; flex: none; }
.icon-bubble.blue { background: var(--blue-tint); color: var(--blue); }

/* ---------- misc ---------- */
section[id] { scroll-margin-top: calc(var(--topbar) + 16px); }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
code { background: var(--btn-2); padding: 2px 6px; border-radius: 4px; }
pre { background: var(--surface-2); border: 1px solid var(--divider); border-radius: var(--r); padding: 12px;
  overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0; max-height: 420px; }
td code { word-break: break-all; }
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--divider);
  border-radius: var(--r); padding: 6px 6px 6px 14px; }
.copy-field code { flex: 1; background: none; padding: 0; font-size: 14px; overflow-x: auto; white-space: nowrap; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r);
  background: var(--blue-tint); color: var(--text); margin-bottom: 16px; }
.banner svg { color: var(--blue); margin-top: 1px; }
.banner.warn { background: var(--amber-tint); }
.banner.warn svg { color: var(--amber); }
.banner.ok { background: var(--green-tint); }
.banner.ok svg { color: var(--green); }
.empty { text-align: center; padding: 32px 16px; color: var(--text-2); }
.empty .icon-bubble { margin: 0 auto 10px; width: 56px; height: 56px; }
.divider-or { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; margin: 16px 0; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
details.fold { border-top: 1px solid var(--divider); padding: 10px 0; }
details.fold:first-of-type { border-top: 0; }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2); transform: rotate(-45deg); margin: 0 4px; transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(45deg); }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv > div { min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(odd) { color: var(--text-2); }
.progress { height: 8px; border-radius: 4px; background: var(--btn-2); overflow: hidden; min-width: 120px; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); margin: -4px 0 16px; overflow-x: auto; }
.tabs button { background: none; height: 44px; border-radius: 6px 6px 0 0; color: var(--text-2); position: relative; }
.tabs button:hover { background: var(--hover); }
.tabs button.on { color: var(--blue); }
.tabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--blue); border-radius: 3px 3px 0 0; }
/* Inline progress (Admin → Manual captures upload) */
.cap-up { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; max-width: 165px; margin-left: auto; }
.up-state { font-size: 12.5px; line-height: 1.35; color: var(--text-2); text-align: right; white-space: normal; }
.up-line { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.up-line .spinner, .up-state .spinner { width: 14px; height: 14px; }
.up-bar { height: 4px; border-radius: 99px; background: var(--btn-2); overflow: hidden; margin-top: 6px; }
.up-bar i { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.up-state.good { color: var(--green); font-weight: 600; } .up-state.good .small { font-weight: 400; margin-top: 2px; }
.up-state.bad { color: var(--red); }
.up-state svg { width: 14px; height: 14px; vertical-align: -2px; }
.toast { position: fixed; left: 16px; bottom: 16px; background: #1c1e21; color: #fff; padding: 12px 16px; border-radius: var(--r);
  box-shadow: var(--shadow-lg); font-weight: 600; z-index: 50; }

/* ---------- auth pages ---------- */
.auth { min-height: calc(100vh - var(--topbar)); display: grid; place-items: center; padding: 32px 16px; }
.auth-grid { display: grid; grid-template-columns: 1fr 396px; gap: 48px; align-items: center; max-width: 980px; width: 100%; }
.auth-pitch h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 700; }
.auth-pitch h1 span { color: var(--blue); }
.auth-pitch p { font-size: 20px; line-height: 1.35; color: var(--text); margin: 0 0 20px; }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.auth-pitch li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.auth-pitch li b { color: var(--text); display: block; }
.auth-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 20px; }
.auth-card h2 { font-size: 20px; margin: 0 0 4px; }
.auth-foot { color: var(--text-2); font-size: 12px; text-align: center; margin-top: 16px; line-height: 1.5; }
.google-btn { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.google-btn:hover { background: var(--hover); }
.center-card { max-width: 440px; width: 100%; }

.senses-mini { display: grid; gap: 8px; margin-top: 20px; max-width: 380px; }
.sense-mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); }
.sense-mini b { flex: 1; font-size: 15px; color: var(--text); }
.sense-mini .icon-bubble { width: 36px; height: 36px; }
.sense-mini.locked { background: var(--surface-2); box-shadow: none; border: 1px dashed var(--border); }
.sense-mini.locked b { filter: blur(4px); user-select: none; }
.sense-mini.locked .icon-bubble { color: var(--text-3); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; align-content: start; }
  .sidenav { scrollbar-width: none; }
  .sidenav { position: static; height: auto; display: flex; gap: 4px; overflow-x: auto; padding: 8px; box-shadow: 0 1px 0 var(--divider); }
  .sidenav-title, .sidenav-sub, .sidenav-label { display: none; }
  .nav-item { flex: none; padding: 6px 10px 6px 6px; }
  .nav-item .icon-bubble { width: 30px; height: 30px; }
  .nav-item .icon-bubble svg { width: 16px; height: 16px; }
  .content { padding: 16px 16px 48px; }
  .split { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; gap: 24px; max-width: 440px; }
  .auth-pitch h1 { font-size: 30px; }
  .auth-pitch p { font-size: 17px; }
  .auth-pitch ul { display: none; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px; }
  .stat .value { font-size: 22px; }
  .brand small { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv > div:nth-child(even) { margin-bottom: 8px; }
  table.stack thead, table.stack tr.head { display: none; }
  table.stack tr, table.stack td { display: block; border: 0; padding: 4px 16px; }
  table.stack tr { padding: 10px 0; border-bottom: 1px solid var(--divider); }
  .menu-pop { width: calc(100vw - 24px); right: -4px; }
}

/* inline busy state and row removal */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button.busy[disabled] { opacity: 1; min-width: 72px; }
.leaving { overflow: hidden; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important;
  transition: max-height .25s ease, opacity .18s ease, padding .25s ease, margin .25s ease; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.5s; } .leaving { transition: none; } }

/* ---------- Admin → Sensorium ---------- */
.sx { user-select: none; -webkit-user-select: none; position: relative; height: calc(100vh - 112px); min-height: 560px; margin: -8px -16px 0; border-radius: 18px;
  overflow: hidden; background: #000; color: #cfefff; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  box-shadow: inset 0 0 0 1px rgba(55, 240, 255, .14), 0 0 60px rgba(34, 225, 255, .06); }
.sx-stage { position: absolute; inset: 0; }
.sx-stage canvas { display: block; cursor: grab; }
.sx::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(55, 240, 255, .012) 0 1px, transparent 1px 3px); }
.sx-hud { position: absolute; z-index: 2; background: rgba(10, 12, 15, .7); backdrop-filter: blur(10px);
  border: 1px solid rgba(55, 240, 255, .22); border-radius: 12px; padding: 12px 14px; font-size: 11.5px; }
.sx-hud::before { content: ""; position: absolute; top: -1px; left: 14px; width: 36px; height: 2px; background: #37f0ff;
  box-shadow: 0 0 10px #37f0ff; }
.sx-kicker { letter-spacing: .18em; font-size: 10px; color: #6fd8ee; display: flex; gap: 6px; align-items: center; }
.sx-stats { top: 16px; left: 16px; width: 270px; }
.sx-big { font-size: 44px; font-weight: 600; color: #e9fbff; text-shadow: 0 0 18px rgba(55, 240, 255, .55); line-height: 1.1; margin-top: 6px; }
.sx-big span { font-size: 20px; color: #6fd8ee; margin-left: 2px; }
.sx-sub { color: #8fb6c6; margin: 2px 0 8px; font-size: 11.5px; }
.sx-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #15181c; margin: 6px 0 10px; }
.sx-bar i { display: block; height: 100%; }
.sx-rows div { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.sx-rows em { margin-left: auto; font-style: normal; color: #6fd8ee; }
.sx-meta { margin-top: 10px; color: #4f8ca2; letter-spacing: .12em; font-size: 9.5px; }
.sx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.sx-answered { background: #22e1ff; box-shadow: 0 0 8px #22e1ff; }
.sx-stale { background: #ff4fd8; box-shadow: 0 0 8px #ff4fd8; }
.sx-portal { background: #8a7dff; box-shadow: 0 0 8px rgba(138, 125, 255, .7); }
.sx-missing { background: #4a515c; }
.sx-filters { bottom: 66px; left: 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; max-width: calc(100% - 32px); }
.sx-filters button { font: inherit; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #8fd9ec;
  background: transparent; border: 1px solid rgba(55, 240, 255, .25); border-radius: 999px; padding: 5px 10px; cursor: pointer; min-height: 0; }
.sx-filters button.on { background: rgba(55, 240, 255, .16); color: #e9fbff; border-color: #37f0ff; box-shadow: 0 0 12px rgba(55, 240, 255, .35); }
.sx-sep { width: 1px; height: 18px; background: rgba(55, 240, 255, .25); }
.sx-legend { bottom: 16px; left: 16px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.sx-legend span { display: flex; gap: 6px; align-items: center; }
.sx-hint { color: #4f8ca2; }
.sx-panel { top: 16px; right: 16px; bottom: 16px; width: 360px; overflow: auto; }
.sx-panel h2 { font-size: 18px; color: #e9fbff; margin: 4px 0 2px; font-family: inherit; }
.sx-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: #8fd9ec; font-size: 20px; cursor: pointer; min-height: 0; }
.sx-slots { display: grid; grid-template-columns: repeat(18, 1fr); gap: 3px; margin: 8px 0 12px; }
.sx-slots i { height: 9px; border-radius: 2px; }
.sx-group { margin-top: 12px; }
.sx-rule { border-top: 1px solid rgba(55, 240, 255, .1); padding: 6px 0; }
.sx-rule summary { display: flex; gap: 8px; cursor: pointer; list-style: none; }
.sx-rule summary em { margin-left: auto; font-style: normal; color: #9ff0ff; text-align: right; max-width: 55%; }
.sx-rule blockquote { margin: 6px 0; padding-left: 8px; border-left: 2px solid #22e1ff; color: #bfe9f5; }
.sx-rule p { margin: 4px 0; color: #8fb6c6; }
.sx-src a { color: #6fd8ee; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sx-chips span { border: 1px solid rgba(143, 182, 198, .25); border-radius: 999px; padding: 2px 8px; color: #8fb6c6; font-size: 10.5px; }
.sx-tag { font-size: 9px; letter-spacing: .14em; color: #03070d; background: #37f0ff; border-radius: 4px; padding: 1px 5px; }
.sx-tip { position: absolute; z-index: 3; pointer-events: none; background: rgba(10, 12, 15, .92); border: 1px solid rgba(55, 240, 255, .35);
  border-radius: 8px; padding: 8px 10px; font-size: 11.5px; max-width: 280px; color: #cfefff; }
.sx-tip b { color: #e9fbff; }
@media (max-width: 1180px) {
  .sx-hint { display: none; }
}
@media (max-width: 760px) {
  .sx { height: calc(100vh - 140px); margin: 0; }
  .sx-stats { width: auto; right: 16px; }
  .sx-filters { top: auto; bottom: 64px; left: 16px; right: 16px; }
  .sx-panel { left: 16px; right: 16px; width: auto; top: 40%; margin-top: 0; }
  .sx-hint { display: none; }
}
.sx-partial { background: #3d64d8; box-shadow: 0 0 8px rgba(61, 100, 216, .7); }
.sx-domains { display: grid; gap: 3px; margin-top: 10px; max-height: 38vh; overflow: auto; }
.sx-domains button { position: relative; display: flex; gap: 8px; align-items: center; font: inherit; font-size: 11px; color: #bfe9f5;
  background: rgba(255, 255, 255, .02); border: 1px solid transparent; border-radius: 6px; padding: 4px 8px; cursor: pointer;
  text-align: left; overflow: hidden; min-height: 0; }
.sx-domains button i { position: absolute; left: 0; bottom: 0; height: 2px; background: #22e1ff; box-shadow: 0 0 6px #22e1ff; }
.sx-domains button em { margin-left: auto; font-style: normal; color: #6fd8ee; }
.sx-domains button.on, .sx-domains button:hover { border-color: rgba(55, 240, 255, .35); background: rgba(55, 240, 255, .08); }
.sx-item { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(55, 240, 255, .07); }
.sx-item em { margin-left: auto; font-style: normal; color: #8fb6c6; white-space: nowrap; }
.sx-domains button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-diamond { display: inline-block; width: 8px; height: 8px; transform: rotate(45deg); background: #bfe6ff; box-shadow: 0 0 8px #7cc4ff; }
.sx-diamond.hollow { background: transparent; border: 1px solid #6f7c8c; box-shadow: none; }
.sx-label { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: auto; cursor: pointer; white-space: nowrap;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #a9d3ec; text-shadow: 0 0 8px rgba(124, 196, 255, .6); }
.sx-label em { font-style: normal; color: #e9fbff; margin-left: 4px; }
.sx-label.on { color: #e9fbff; }
/* HUD scrollbars: thin and translucent, not the native ones */
.sx-domains, .sx-panel { scrollbar-width: thin; scrollbar-color: rgba(55, 240, 255, .35) transparent; }
.sx-domains::-webkit-scrollbar, .sx-panel::-webkit-scrollbar { width: 4px; }
.sx-domains::-webkit-scrollbar-track, .sx-panel::-webkit-scrollbar-track { background: transparent; }
.sx-domains::-webkit-scrollbar-thumb, .sx-panel::-webkit-scrollbar-thumb { background: rgba(55, 240, 255, .3); border-radius: 4px; }
.sx-domains::-webkit-scrollbar-thumb:hover, .sx-panel::-webkit-scrollbar-thumb:hover { background: rgba(55, 240, 255, .6); }
.sx-domains { padding-right: 4px; }
.sx-search { position: relative; }
.sx-search input { font: inherit; font-size: 11px; color: #e9fbff; background: rgba(55, 240, 255, .06); width: 230px;
  border: 1px solid rgba(55, 240, 255, .3); border-radius: 999px; padding: 6px 12px; min-height: 0; outline: none; }
.sx-search input::placeholder { color: #5f8ea0; }
.sx-search input:focus { border-color: #37f0ff; box-shadow: 0 0 12px rgba(55, 240, 255, .3); }
.sx-results { position: absolute; left: 0; bottom: calc(100% + 8px); width: 300px; display: grid; gap: 2px; padding: 6px;
  background: rgba(10, 12, 15, .92); backdrop-filter: blur(10px); border: 1px solid rgba(55, 240, 255, .3); border-radius: 10px; }
.sx-results button { display: flex; gap: 8px; align-items: center; font: inherit; font-size: 11px; color: #cfefff; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; cursor: pointer; min-height: 0; }
.sx-results button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-results button em { margin-left: auto; font-style: normal; color: #6fd8ee; white-space: nowrap; }
.sx-results button.on, .sx-results button:hover { background: rgba(55, 240, 255, .1); border-color: rgba(55, 240, 255, .3); }
.sx-filters .sx-results button { text-transform: none; letter-spacing: normal; border-radius: 6px; color: #cfefff; }
.sx-results { width: 340px; }
.sx-filters .sx-results button { font-size: 10px; padding: 5px 8px; }
.sx-filters .sx-results button em { font-size: 9.5px; }
