/* v2/hud.css — the customer screens (screens/hud-*.html, v2/*.js).
   Dark only, P&L first: big numbers, big lines, little text. Type is Geist (fonts/, OFL),
   served from this origin. Nothing here is smaller than 12px. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --hud-bg: #07090c;
  --hud-s1: #101216;
  --hud-s2: #121419;
  --hud-s3: #181a20;
  --hud-sheet: #0d0f13;
  --hud-aside: #0b0d10;
  --hud-rule: #15181d;
  --hud-line: #252930;
  --hud-line2: #353b45;
  --hud-dash: #505866;
  --hud-ink: #eaecef;
  --hud-ink2: #b0b7c2;
  --hud-dim: #9aa5b5;
  --hud-faint: #7b8696;
  --hud-yellow: #f0b90b;
  --hud-yellow-ink: #181a20;
  --hud-yellow-soft: #342d17;
  --hud-yellow-row: #16140d;
  --hud-green: #2ed6a1;
  --hud-red: #ff7084;
  --hud-orange: #ff9b52;
  --hud-blue: #a7c5ff;
  --hud-purple: #c9a2ff;
  --hud-warn: #ff8fa0;
  --hud-sans: "Geist", -apple-system, "Segoe UI", system-ui, sans-serif;
  --hud-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;
  --hud-pad-x: 48px;
  --hud-tabbar: 64px;
}

/* ---- the page ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html, body { background: var(--hud-bg); }
body {
  margin: 0; color: var(--hud-ink); font-family: var(--hud-sans); font-size: 14px; line-height: 1.45;
  font-weight: 400; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
a { color: var(--hud-yellow); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hud-yellow); outline-offset: 2px; border-radius: 8px; }
svg { display: block; }
.screen { display: none; }
.screen.is-active { display: block; }
html.hud-bare #hud-header, html.hud-bare #hud-tabs { display: none; }

/* ---- an operator viewing a tenant: said over every screen, nothing that writes ---------- */
.hud-watch-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 28px; line-height: 28px;
  padding: 0 16px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--hud-yellow); color: var(--hud-yellow-ink); font-size: 13px; font-weight: 600;
}
.hud-watch-banner[hidden] { display: none; }
html.hud-watching body { padding-top: 28px; }
html.hud-watching .hud-header { top: 28px; }
html.hud-watching [data-hud-write] { display: none !important; }
.hud-reconnect-banner { background: var(--hud-s3); color: var(--hud-dim); font-weight: 500; }
html.hud-reconnecting body { padding-top: 28px; }
html.hud-reconnecting .hud-header { top: 28px; }

.hud-page, .hud-page * { box-sizing: border-box; }
.hud-page button, .hud-header button, .hud-tabs a { font-family: var(--hud-sans); }
.hud-page a, .hud-header a { color: inherit; text-decoration: none; }
.hud-page :focus-visible, .hud-header :focus-visible, .hud-tabs :focus-visible {
  outline: 2px solid var(--hud-yellow); outline-offset: 2px; border-radius: 6px;
}
.hud-mono { font-family: var(--hud-mono); }
.hud-up { color: var(--hud-green); }
.hud-down { color: var(--hud-red); }
.hud-flat { color: var(--hud-ink); }
.hud-muted { color: var(--hud-dim); }
.hud-faint { color: var(--hud-faint); }
.hud-warnc { color: var(--hud-orange); }
.hud-blue { color: var(--hud-blue); }
.hud-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header ---------------------------------------------------------------------------- */
.hud-header {
  position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center;
  gap: 20px; padding: 0 32px; background: var(--hud-bg); color: var(--hud-ink);
  font-family: var(--hud-sans); font-size: 14px;
}
.hud-logo { display: inline-flex; align-items: center; flex: none; }
.hud-logo-mark { width: 22px; height: 22px; fill: var(--hud-yellow); }
.hud-nav { display: flex; gap: 4px; }
.hud-nav a {
  height: 36px; padding: 0 14px; border-radius: 9px; display: inline-flex; align-items: center;
  color: var(--hud-dim); font-size: 14px;
}
.hud-nav a[aria-current="page"] { background: var(--hud-s2); color: var(--hud-ink); font-weight: 500; }
.hud-crumbs {
  display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap;
  font-size: 14px; color: var(--hud-dim);
}
.hud-crumbs a { color: var(--hud-dim); flex: none; }
.hud-crumbs a:hover { color: var(--hud-ink); }
.hud-crumbs [aria-current="page"] {
  color: var(--hud-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis;
}
.hud-crumb-sep { color: var(--hud-faint); flex: none; }
.hud-header-gap { flex: 1; min-width: 0; }
.hud-seg {
  display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hud-s2); flex: none;
}
.hud-seg button {
  height: 30px; min-width: 44px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--hud-dim); font-size: 13px; font-weight: 500; cursor: pointer;
}
.hud-seg button[aria-pressed="true"] { background: var(--hud-line); color: var(--hud-ink); }
.hud-groupby { display: inline-flex; align-items: center; gap: 10px; }
.hud-groupby-label { color: var(--hud-faint); font-size: 13px; }
.hud-btc { color: var(--hud-dim); font-size: 13px; white-space: nowrap; }
.hud-btc-coin { color: var(--hud-ink); font-weight: 600; }
.hud-bell-wrap { position: relative; flex: none; }
.hud-iconbtn {
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent;
  color: var(--hud-dim); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
}
.hud-iconbtn:hover { background: var(--hud-s2); color: var(--hud-ink); }
.hud-iconbtn svg { width: 20px; height: 20px; }
.hud-badge {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--hud-orange); color: var(--hud-yellow-ink);
  font-size: 12px; font-weight: 700; line-height: 19px; text-align: center;
}
.hud-pop {
  position: absolute; right: 0; top: 46px; width: 320px; max-width: calc(100vw - 32px);
  background: var(--hud-s1); border: 1px solid var(--hud-line); border-radius: 12px;
  padding: 8px; box-shadow: 0 16px 40px #000000a0; z-index: 40;
}
.hud-pop ul { list-style: none; margin: 0; padding: 0; }
.hud-pop li a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--hud-ink2); }
.hud-pop li a:hover { background: var(--hud-s2); color: var(--hud-ink); }
.hud-pop li[data-kind="stale"] a::before,
.hud-pop li[data-kind="refused"] a::before,
.hud-pop li[data-kind="silent"] a::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 8px; background: var(--hud-orange); vertical-align: 1px;
}
.hud-pop p { padding: 10px 12px; font-size: 13px; }
.hud-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #2d291c; color: var(--hud-yellow);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 700; flex: none;
}

.hud-tabs { display: none; }

/* ---- page frame ---------------------------------------------------------------------- */
.hud-page {
  padding: 28px var(--hud-pad-x) 32px; display: flex; flex-direction: column; gap: 40px;
  color: var(--hud-ink); font-family: var(--hud-sans); min-height: calc(100dvh - 60px);
}
.hud-page--narrow { max-width: 1200px; margin: 0 auto; width: 100%; }
.hud-replay { gap: 16px; }
.hud-replay-frame { display: block; width: 100%; height: 80dvh; min-height: 600px; border: 1px solid var(--hud-line); border-radius: 12px; }
.hud-caption { color: var(--hud-dim); font-size: 13px; }
.hud-eyebrow { color: var(--hud-faint); font-size: 12px; letter-spacing: 0.02em; }
.hud-note { color: var(--hud-faint); font-size: 12px; line-height: 1.5; }
.hud-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; background: #3a2616; color: var(--hud-orange);
}
.hud-chip[hidden] { display: none; }
.hud-btn {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--hud-line);
  background: transparent; color: var(--hud-ink); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  white-space: nowrap;
}
.hud-btn:hover { background: var(--hud-s2); }
.hud-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.hud-btn.hud-btn--primary { background: var(--hud-yellow); color: var(--hud-yellow-ink); border-color: var(--hud-yellow); font-weight: 600; }
.hud-btn.hud-btn--primary:hover { background: #f5c632; }
.hud-btn--ghost-yellow { border-color: var(--hud-yellow); color: var(--hud-yellow); }
.hud-btn--danger { border-color: #5a2731; color: var(--hud-red); }
.hud-btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.hud-link { color: var(--hud-yellow); background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }
.hud-code {
  display: flex; align-items: center; gap: 10px; background: var(--hud-s3); border: 1px solid var(--hud-line);
  border-radius: 10px; padding: 8px 8px 8px 14px; font-family: var(--hud-mono); font-size: 13px;
  color: var(--hud-ink2); min-width: 0;
}
.hud-code code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-status { color: var(--hud-dim); font-size: 13px; min-height: 18px; }
.hud-status[data-state="bad"] { color: var(--hud-warn); }
.hud-status[data-state="good"] { color: var(--hud-green); }

/* ---- the big curve -------------------------------------------------------------------- */
.hud-hero { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.hud-hero-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.hud-hero-label { display: flex; align-items: center; gap: 10px; color: var(--hud-dim); font-size: 13px; margin-bottom: 6px; }
.hud-big { font-size: 52px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
.hud-big--44 { font-size: 44px; }
.hud-big--none { color: var(--hud-faint); }
.hud-pct { font-size: 17px; font-weight: 500; }
.hud-open { color: var(--hud-dim); font-size: 14px; }
.hud-chart { position: relative; height: 300px; margin-top: 18px; }
.hud-chart--flat { height: 200px; }
.hud-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hud-zero { stroke: var(--hud-line2); stroke-width: 1; stroke-dasharray: 4 6; }
.hud-area--up { fill: var(--hud-green); fill-opacity: 0.07; }
.hud-area--down { fill: var(--hud-red); fill-opacity: 0.07; }
.hud-line { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.hud-line--up { stroke: var(--hud-green); }
.hud-line--down { stroke: var(--hud-red); }
.hud-line--flat { stroke: var(--hud-line2); stroke-dasharray: 6 6; }
.hud-spark .hud-line { stroke-width: 1.6; }
.hud-dot {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--hud-green); box-shadow: 0 0 0 5px #2ed6a133;
}
.hud-dot--down { background: var(--hud-red); box-shadow: 0 0 0 5px #ff708433; }
.hud-axis { position: absolute; color: var(--hud-faint); font-size: 12px; pointer-events: none; }
.hud-axis--hi { left: 0; top: 0; }
.hud-axis--zero { left: 0; transform: translateY(-120%); }
.hud-dd { position: relative; height: 64px; margin-top: 10px; }
.hud-dd-area { fill: var(--hud-red); fill-opacity: 0.18; }
.hud-dd-line { fill: none; stroke: var(--hud-red); stroke-width: 1.4; }
.hud-dd-label { position: absolute; left: 0; bottom: 4px; color: var(--hud-faint); font-size: 12px; }
.hud-xaxis { display: flex; justify-content: space-between; margin-top: 8px; color: var(--hud-faint); font-size: 12px; }
.hud-footnote { color: var(--hud-faint); font-size: 12px; line-height: 1.5; margin-top: 14px; }

.hud-stats { display: flex; flex-direction: column; gap: 34px; padding-top: 26px; }
.hud-stat-label { color: var(--hud-dim); font-size: 13px; margin-bottom: 4px; }
.hud-stat-value { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.hud-stat-sub { color: var(--hud-dim); font-size: 13px; margin-top: 2px; }
.hud-bar { height: 6px; border-radius: 3px; background: #3b2028; margin-top: 10px; overflow: hidden; }
.hud-bar > span { display: block; height: 100%; background: var(--hud-green); border-radius: 3px; }
.hud-bar--cap { background: var(--hud-line); }
.hud-bar--cap > span { background: var(--hud-yellow); }

/* ---- strategy tiles (Home) ------------------------------------------------------------ */
.hud-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.hud-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 14px;
  background: var(--hud-s1); min-width: 0;
}
.hud-tile:hover { background: var(--hud-s2); }
.hud-tile-name { display: flex; align-items: center; gap: 8px; color: var(--hud-ink2); font-size: 14px; min-width: 0; }
.hud-tile-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-tile-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hud-green); flex: none; }
.hud-tile-dot[data-state="silent"] { background: var(--hud-orange); }
.hud-tile-dot[data-state="idle"] { background: var(--hud-faint); }
.hud-tile-pnl { font-size: 20px; font-weight: 600; }
.hud-tile-spark { position: relative; height: 44px; }
.hud-tile-sub { color: var(--hud-faint); font-size: 12px; }

.hud-tape {
  display: flex; gap: 28px; align-items: center; height: 48px; border-top: 1px solid var(--hud-rule);
  overflow: hidden; white-space: nowrap; font-family: var(--hud-mono); font-size: 13px; color: var(--hud-dim);
}
.hud-tape span b { font-weight: 500; color: var(--hud-ink2); }

/* ---- first run ------------------------------------------------------------------------- */
.hud-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hud-step {
  padding: 24px; border-radius: 16px; background: var(--hud-s1); border: 1px solid var(--hud-line);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.hud-step--now { border-color: var(--hud-yellow); }
.hud-step--later { opacity: 0.55; }
.hud-step h3 { margin: 0; font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.hud-step-n {
  width: 24px; height: 24px; border-radius: 50%; background: var(--hud-s3); color: var(--hud-dim);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none;
}
.hud-step--now .hud-step-n { background: var(--hud-yellow); color: var(--hud-yellow-ink); }
.hud-step--done .hud-step-n { background: #15382d; color: var(--hud-green); }
.hud-step p { margin: 0; color: var(--hud-dim); font-size: 13px; }
.hud-waiting { display: inline-flex; align-items: center; gap: 8px; color: var(--hud-blue); font-size: 13px; }
.hud-waiting::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hud-blue); }

/* ---- performance --------------------------------------------------------------------- */
.hud-table { display: flex; flex-direction: column; }
.hud-trow {
  display: grid; grid-template-columns: 28px minmax(0, 1.4fr) 120px minmax(0, 1fr) 120px 90px 120px 90px;
  gap: 16px; align-items: center; min-height: 52px; border-top: 1px solid var(--hud-rule); font-size: 14px;
}
.hud-trow--head { min-height: 36px; border-top: 0; color: var(--hud-faint); font-size: 12px; }
.hud-trow--head button { all: unset; cursor: pointer; color: var(--hud-faint); font-size: 12px; }
.hud-trow--head button[aria-pressed="true"] { color: var(--hud-ink); }
.hud-trow--total { border-top: 1px solid var(--hud-line2); font-weight: 600; }
.hud-trow .hud-r { text-align: right; }
.hud-trow-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-trow-spark { position: relative; height: 30px; }
.hud-toggle {
  width: 14px; height: 14px; border-radius: 4px; border: 2px solid currentColor; background: transparent;
  padding: 0; cursor: pointer;
}
.hud-toggle[aria-pressed="true"] { background: currentColor; }
.hud-section-title { font-size: 13px; color: var(--hud-dim); margin: 28px 0 4px; }

/* ---- strategy: positions, orders, log, detail ----------------------------------------- */
.hud-strat-hero { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 56px; }
.hud-strat-name { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--hud-ink2); margin-bottom: 6px; }
.hud-strat-name .hud-tile-dot { width: 8px; height: 8px; }
.hud-kpis { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.hud-kpi-label { color: var(--hud-dim); font-size: 12px; }
.hud-kpi-value { font-size: 20px; font-weight: 600; margin-top: 2px; }
.hud-strat-chart { position: relative; height: 140px; }

.hud-grid { display: flex; flex-direction: column; }
.hud-prow {
  display: grid; grid-template-columns: 76px 56px 88px minmax(0, 1fr) 96px 96px 110px 120px;
  gap: 14px; align-items: center; min-height: 44px; border-top: 1px solid var(--hud-rule); font-size: 14px;
}
.hud-prow--head { min-height: 32px; border-top: 0; color: var(--hud-faint); font-size: 12px; }
.hud-prow:not(.hud-prow--head):hover { background: var(--hud-s1); }
.hud-prow .hud-r { text-align: right; }
.hud-prow a { display: contents; }
.hud-slotid { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
.hud-wallet { font-family: var(--hud-mono); font-size: 13px; color: var(--hud-dim); }
.hud-cap { display: flex; align-items: center; gap: 8px; }
.hud-cap .hud-bar { flex: 1; height: 4px; margin: 0; }
.hud-cap span { font-size: 12px; color: var(--hud-dim); min-width: 34px; text-align: right; }
.hud-empties { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hud-empty {
  height: 40px; padding: 0 14px; border-radius: 10px; border: 1px dashed var(--hud-dash);
  display: inline-flex; align-items: center; gap: 8px; color: var(--hud-dim); font-size: 13px;
  background: transparent; cursor: pointer;
}
.hud-empty b { color: var(--hud-ink2); font-weight: 500; }
.hud-empty i { color: var(--hud-yellow); font-style: normal; font-size: 16px; }

.hud-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.hud-split--detail { grid-template-columns: minmax(0, 1fr) 400px; }
.hud-panes { min-width: 0; }
.hud-tabs-inline { display: flex; gap: 4px; margin-bottom: 14px; }
.hud-tabs-inline button {
  height: 32px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent;
  color: var(--hud-dim); font-size: 14px; cursor: pointer;
}
.hud-tabs-inline button[aria-selected="true"] { background: var(--hud-s2); color: var(--hud-ink); font-weight: 500; }
.hud-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.hud-pill {
  height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hud-line);
  background: transparent; color: var(--hud-dim); font-size: 12.5px; cursor: pointer;
}
.hud-pill[aria-pressed="true"] { border-color: var(--hud-yellow); color: var(--hud-yellow); }
.hud-pager { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--hud-dim); font-size: 13px; }
.hud-pager button {
  width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--hud-s2);
  color: var(--hud-ink); cursor: pointer; font-size: 16px;
}
.hud-pager button[disabled] { opacity: 0.35; cursor: default; }
.hud-orow {
  display: grid; grid-template-columns: 76px 76px 110px minmax(0, 1fr) 96px 96px 120px;
  gap: 14px; align-items: center; min-height: 44px; border-top: 1px solid var(--hud-rule);
  font-size: 14px; cursor: pointer; color: var(--hud-ink);
}
.hud-orow:hover { background: var(--hud-s1); }
.hud-orow[aria-current="true"] { background: var(--hud-yellow-row); box-shadow: inset 2px 0 0 var(--hud-yellow); }
.hud-orow .hud-r { text-align: right; }
.hud-time { color: var(--hud-dim); font-size: 13px; }
.hud-st {
  justify-self: end; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center;
}
.hud-st[data-status="Filled"] { background: #15382d; color: var(--hud-green); }
.hud-st[data-status="Open"] { background: #233149; color: var(--hud-blue); }
.hud-st[data-status="Refused"] { background: #3a2616; color: var(--hud-orange); }
.hud-st[data-status="Cancelled"] { background: #1c2028; color: var(--hud-dim); }
.hud-lrow {
  display: grid; grid-template-columns: 96px 76px minmax(0, 1fr); gap: 14px; align-items: start;
  min-height: 36px; padding: 9px 0; border-top: 1px solid var(--hud-rule); font-family: var(--hud-mono);
  font-size: 13px;
}
.hud-lrow[data-source="note"] .hud-ltext { color: var(--hud-purple); }
.hud-lrow[data-source="refusal"] .hud-ltext { color: var(--hud-orange); }
.hud-ltext { overflow-wrap: anywhere; }
.hud-empty-note { color: var(--hud-dim); font-size: 13px; padding: 18px 0; border-top: 1px solid var(--hud-rule); }

.hud-detail {
  background: var(--hud-aside); border-left: 1px solid var(--hud-rule); padding: 24px 28px 40px;
  display: flex; flex-direction: column; gap: 22px; min-width: 0; margin: -28px calc(-1 * var(--hud-pad-x)) -32px 32px;
}
.hud-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hud-detail-where { color: var(--hud-dim); font-size: 13px; }
.hud-detail-title { font-size: 22px; font-weight: 600; margin-top: 4px; }
.hud-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.hud-detail-grid dt { color: var(--hud-faint); font-size: 12px; }
.hud-detail-grid dd { margin: 2px 0 0; font-size: 15px; }
.hud-reason { color: var(--hud-purple); font-size: 14px; line-height: 20px; }
.hud-reason [data-hud-tag] {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; line-height: 20px; font-family: var(--hud-mono); font-size: 13px;
}
.hud-reason small, .hud-origin { color: var(--hud-dim); font-size: 12px; }
.hud-steps-v { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hud-steps-v li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.hud-steps-v .hud-sdot {
  width: 10px; height: 10px; margin: 5px 0 0 4px; border-radius: 50%; background: var(--hud-line2);
}
.hud-steps-v li[data-state="done"] .hud-sdot { background: var(--hud-green); box-shadow: 0 0 0 4px #2ed6a126; }
.hud-steps-v li[data-state="current"] .hud-sdot { background: var(--hud-blue); box-shadow: 0 0 0 4px #a7c5ff26; }
.hud-steps-v li[data-state="failed"] .hud-sdot { background: var(--hud-orange); box-shadow: 0 0 0 4px #ff9b5226; }
.hud-steps-v li[data-state="pending"] { color: var(--hud-faint); }
.hud-step-label { font-size: 14px; }
.hud-step-note { color: var(--hud-dim); font-size: 12.5px; margin-top: 2px; }
.hud-steps-v li[data-state="failed"] .hud-step-note { color: var(--hud-orange); }
.hud-step-time { color: var(--hud-faint); font-size: 12px; }
.hud-intent { font-family: var(--hud-mono); font-size: 12px; color: var(--hud-faint); }

/* ---- slot ----------------------------------------------------------------------------- */
.hud-slot-hero { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; }
.hud-slot-market { font-size: 15px; color: var(--hud-ink2); margin-bottom: 4px; }
.hud-candles { position: relative; height: 270px; margin-top: 18px; }
.hud-candles svg { width: 100%; height: 100%; display: block; }
.hud-candles.hud-candles--panes, .hud-candles--panes svg { height: auto; }
.hud-candles .qc-candle line { stroke-width: 1; }
.hud-candles .qc-candle--up line { stroke: var(--hud-green); }
.hud-candles .qc-candle--up rect { fill: var(--hud-green); }
.hud-candles .qc-candle--down line { stroke: var(--hud-red); }
.hud-candles .qc-candle--down rect { fill: var(--hud-red); }
.hud-candles .qc-ov { fill: none; stroke-width: 1.5; }
.hud-candles .qc-ov--style-accent { stroke: var(--hud-blue); }
.hud-candles .qc-ov--style-muted, .hud-candles .qc-ov--style-default { stroke: var(--hud-purple); stroke-dasharray: 5 4; }
.hud-candles .qc-ov--style-up { stroke: var(--hud-green); }
.hud-candles .qc-ov--style-down { stroke: var(--hud-red); }
.hud-candles .qc-ov--style-warn { stroke: var(--hud-orange); }
.hud-candles .qc-fillmark--buy { fill: var(--hud-green); }
.hud-candles .qc-fillmark--sell { fill: var(--hud-red); }
.hud-candles .qc-gap { fill: #ffffff08; }
.hud-candles .qc-axis { fill: var(--hud-faint); font-size: 12px; font-family: var(--hud-sans); }
.hud-candles .hud-entry { stroke: var(--hud-yellow); stroke-dasharray: 3 5; stroke-width: 1; }
.hud-candles .qc-offscale { fill: var(--hud-orange); }
.hud-pricetag {
  position: absolute; right: 0; height: 22px; padding: 0 8px; border-radius: 6px; transform: translateY(-50%);
  background: var(--hud-s3); border: 1px solid var(--hud-line2); font-size: 12px; line-height: 20px; color: var(--hud-ink);
}
.hud-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--hud-faint); font-size: 12px; margin-top: 8px; }
.hud-legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.hud-published { margin-top: 10px; font-size: 12px; color: var(--hud-faint); }
.hud-published > summary { cursor: pointer; min-height: 24px; line-height: 24px; }
.hud-published .qc-note { font-size: 12px; color: var(--hud-faint); margin: 8px 0; }
.hud-published .qc-legend-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.hud-published .qc-legend-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.hud-published .qc-legend-item.is-stale { color: var(--hud-dim); }
.hud-published .qc-legend-label { color: var(--hud-ink); min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-published .qc-legend-item small { font-size: 12px; flex-basis: 100%; overflow-wrap: anywhere; }
.hud-published .qc-legend-swatch { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--ov, var(--hud-purple)); }
.hud-published .qc-legend-toggle { all: unset; cursor: pointer; color: var(--hud-blue); font-size: 12px; min-height: 24px; }
.hud-published .qc-legend-toggle:focus-visible { outline: 2px solid var(--hud-blue); outline-offset: 2px; }
.hud-slot-pnl { position: relative; height: 120px; border-top: 1px solid var(--hud-rule); margin-top: 12px; padding-top: 12px; }
.hud-slot-pnl .hud-svg { inset: 12px 0 0 0; height: calc(100% - 12px); }
.hud-slot-pnl-label { position: absolute; left: 0; top: 14px; color: var(--hud-faint); font-size: 12px; }
.hud-slot-stats { display: flex; flex-direction: column; gap: 30px; padding-top: 70px; }
.hud-slot-stats .hud-stat-value { font-size: 26px; }
.hud-slot-tiles { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 8px; }
.hud-slot-tile {
  height: 60px; border-radius: 10px; display: flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 2px; font-size: 12px; color: var(--hud-ink2); background: var(--hud-s1);
  border: 2px solid transparent; min-width: 0; overflow: hidden;
}
.hud-slot-tile[data-tone="up"] { background: #2ed6a11f; }
.hud-slot-tile[data-tone="down"] { background: #ff70841f; }
.hud-slot-tile[aria-pressed="true"] { border-color: var(--hud-yellow); }
.hud-slot-tile[data-state="stale"] { border-color: #ff9b5266; }
.hud-slot-tile[aria-pressed="true"][data-state="stale"] { border-color: var(--hud-yellow); }
.hud-slot-tile[data-state="empty"] { border: 1px dashed var(--hud-dash); background: transparent; color: var(--hud-yellow); font-size: 16px; }
.hud-slot-tile b { font-weight: 600; font-size: 12px; }
.hud-slot-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hud-slot-main { min-width: 0; }
.hud-slot-main .hud-hero-label { margin-bottom: 2px; }
.hud-slot-main .hud-slot-market { margin: 0; }
.hud-slot-strip { display: flex; flex-direction: column; gap: 12px; }
.hud-slot-tile { cursor: pointer; font-family: var(--hud-sans); }
.hud-slot-tile span { color: var(--hud-ink2); }
.hud-slot-tile[data-state="empty"] span { color: var(--hud-faint); font-size: 12px; }
.hud-stat-sub-inline { color: var(--hud-ink2); font-size: 15px; font-weight: 400; }
.hud-pricetag--up { background: var(--hud-green); border-color: var(--hud-green); color: var(--hud-bg); font-weight: 600; }
.hud-pricetag--down { background: var(--hud-red); border-color: var(--hud-red); color: var(--hud-bg); font-weight: 600; }
.hud-key { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--hud-purple); vertical-align: middle; margin-right: 6px; }
.hud-key--accent { border-top-style: solid; border-color: var(--hud-blue); }
.hud-key--up { border-color: var(--hud-green); }
.hud-key--down { border-color: var(--hud-red); }
.hud-key--warn { border-color: var(--hud-orange); }
.hud-inline-form {
  margin-top: 12px; padding: 14px; border-radius: 12px; background: var(--hud-s1);
  display: flex; flex-direction: column; gap: 10px;
}
.hud-input {
  height: 40px; border-radius: 10px; border: 1px solid var(--hud-line2); background: var(--hud-s3);
  color: var(--hud-ink); padding: 0 12px; font-size: 14px; width: 100%; min-width: 0; font-family: var(--hud-sans);
}
.hud-input--mono { font-family: var(--hud-mono); }
.hud-input:focus { outline: none; border-color: var(--hud-yellow); }
.hud-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---- wallets ---------------------------------------------------------------------------- */
.hud-wallet-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px 48px; }
.hud-wallet-top .hud-kpi-value { font-size: 20px; }
.hud-wallet-top .hud-btn--primary { margin-left: auto; }
.hud-wrow {
  display: grid; grid-template-columns: 14px 64px minmax(0, 1fr) 160px 110px 120px auto;
  gap: 18px; align-items: center; min-height: 60px; border-top: 1px solid var(--hud-rule); font-size: 14px;
}
.hud-wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--hud-green); }
.hud-wdot[data-state="stale"] { background: var(--hud-orange); }
.hud-wdot[data-state="free"] { background: var(--hud-yellow); }
.hud-wdot[data-state="unknown"] { background: var(--hud-faint); }
.hud-wid { font-family: var(--hud-mono); font-size: 14px; }
.hud-where { color: var(--hud-ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hud-where--free { color: var(--hud-yellow); }
.hud-wspark { position: relative; height: 30px; color: var(--hud-faint); font-size: 12px; display: flex; align-items: center; }
.hud-weq { text-align: right; font-size: 15px; font-weight: 600; }
.hud-weq[data-env="testnet"] { color: var(--hud-blue); }
.hud-weq[data-state="stale"] { color: var(--hud-dim); }
.hud-wact { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.hud-wtable { display: flex; flex-direction: column; }
.hud-more { align-self: center; margin-top: 16px; background: var(--hud-s1); border-color: transparent; color: var(--hud-ink2); }
.hud-trow--link { color: var(--hud-ink); }
.hud-trow--link:hover { background: var(--hud-s1); }
.hud-assign {
  margin: 0 0 18px 32px; padding: 20px; border-radius: 14px; background: var(--hud-s1);
  display: flex; flex-direction: column; gap: 16px;
}
.hud-assign-strats { display: flex; flex-wrap: wrap; gap: 8px; }
.hud-assign-strats button {
  height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--hud-line); background: transparent;
  color: var(--hud-ink2); font-size: 13px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center;
}
.hud-assign-strats button[aria-pressed="true"] { border-color: var(--hud-yellow); color: var(--hud-ink); }
.hud-assign-strats button span { color: var(--hud-faint); }
.hud-assign-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.hud-assign-slots button {
  height: 64px; border-radius: 10px; border: 1px dashed var(--hud-dash); background: transparent;
  color: var(--hud-ink2); font-size: 13px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.hud-assign-slots button span { color: var(--hud-faint); font-size: 12px; }
.hud-assign-slots button[aria-pressed="true"] { border: 2px solid var(--hud-yellow); background: var(--hud-yellow-soft); color: var(--hud-ink); }
.hud-assign-slots button[aria-pressed="true"] span { color: var(--hud-dim); }
.hud-assign-cap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hud-assign-cap label { color: var(--hud-dim); font-size: 13px; }
.hud-assign-cap .hud-input { width: 140px; }

.hud-modal { position: fixed; inset: 0; z-index: 50; }
.hud-modal[hidden] { display: none; }
.hud-scrim { position: absolute; inset: 0; background: #000000a0; }
.hud-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; overflow-y: auto;
  background: var(--hud-sheet); border-left: 1px solid var(--hud-line); padding: 32px;
  display: flex; flex-direction: column; gap: 22px; color: var(--hud-ink); font-family: var(--hud-sans);
}
.hud-sheet h2 { margin: 0; font-size: 22px; font-weight: 600; }
.hud-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.hud-field { display: flex; flex-direction: column; gap: 8px; }
.hud-field > label, .hud-field > .hud-caption { color: var(--hud-dim); font-size: 13px; }
.hud-field .hud-input { height: 46px; }
.hud-lock { color: var(--hud-dim); font-size: 12px; }
.hud-warnline { color: var(--hud-warn); font-size: 13px; }
.hud-sheet-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.hud-sheet-foot .hud-btn { height: 48px; width: 100%; }
.hud-sheet .hud-seg { align-self: flex-start; }
.hud-sheet[hidden] { display: none; }
.hud-sheet .qc-secret { -webkit-text-security: disc; }
.hud-sheet .qc-field-error { color: var(--hud-red); font-size: 13px; min-height: 0; }
.hud-sheet .qc-field-error:empty { display: none; }
.hud-sheet .qc-note, .hud-sheet .qc-field small, .hud-sheet .qc-pair, .hud-sheet .qc-pool-headbar span,
.hud-sheet .qc-wallet-state, .hud-sheet .qc-orch-status, .hud-sheet .qc-ctl-list, .hud-sheet .qc-field label {
  font-size: 13px;
}
.hud-sheet .qc-pool-headbar h2 { font-size: 22px; font-weight: 600; color: var(--hud-ink); }
.hud-sheet .qc-wallet-state:empty { display: none; }
.hud-env {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin: 0; border: 0; border-radius: 11px;
  background: var(--hud-s2);
}
.hud-envopt { position: relative; display: block; cursor: pointer; }
.hud-envopt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.hud-envopt span {
  display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 8px;
  color: var(--hud-dim); font-size: 14px;
}
.hud-envopt input:checked + span { background: var(--hud-line); color: var(--hud-ink); font-weight: 500; }
.hud-envopt input:focus-visible + span { outline: 2px solid var(--hud-yellow); outline-offset: 1px; }
.hud-envopt input:disabled + span { opacity: 0.55; cursor: not-allowed; }
.hud-lock { display: inline-flex; align-items: center; gap: 8px; color: var(--hud-dim); font-size: 13px; }
.hud-lock svg { width: 14px; height: 14px; color: var(--hud-green); flex: none; }
.hud-flow { display: flex; align-items: center; gap: 10px; color: var(--hud-faint); font-size: 12px; }
.hud-flow i { flex: 1; height: 1px; background: var(--hud-line); }
.hud-sheet-foot label.hud-btn { cursor: pointer; }

/* ---- account, sign in ---------------------------------------------------------------- */
.hud-center { max-width: 600px; margin: 0 auto; width: 100%; gap: 44px; }
.hud-me { display: flex; align-items: center; gap: 16px; }
.hud-me .hud-avatar { width: 56px; height: 56px; font-size: 16px; }
.hud-me-id { font-family: var(--hud-mono); font-size: 18px; }
.hud-me-state { color: var(--hud-green); font-size: 13px; }
.hud-me-state[data-state="off"] { color: var(--hud-dim); }
.hud-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hud-card { padding: 20px; border-radius: 14px; background: var(--hud-s1); }
.hud-card .hud-stat-value { font-size: 30px; }
.hud-arow {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0;
  border-top: 1px solid var(--hud-rule); flex-wrap: wrap;
}
.hud-arow-title { font-size: 15px; }
.hud-arow-sub { color: var(--hud-dim); font-size: 13px; margin-top: 2px; }
.hud-arow .hud-code { flex: 1 1 320px; }
.hud-arow--stack { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; }
.hud-arow--stack .hud-code { flex: none; max-width: 100%; }
.hud-switch {
  width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--hud-line2);
  position: relative; cursor: pointer; flex: none;
}
.hud-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--hud-ink); transition: left 0.15s;
}
.hud-switch[aria-checked="true"] { background: var(--hud-yellow); }
.hud-switch[aria-checked="true"]::after { left: 21px; background: var(--hud-yellow-ink); }

.hud-signin { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; position: relative; overflow: hidden; }
.hud-signin-bg { position: absolute; inset: 40% 0 0 0; opacity: 0.35; pointer-events: none; }
.hud-signin-box { position: relative; max-width: 400px; width: 100%; display: flex; flex-direction: column; gap: 36px; }
.hud-brandline { display: flex; align-items: center; gap: 12px; }
.hud-brandline .hud-logo-mark { width: 34px; height: 34px; }
.hud-brandline span { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.hud-drop {
  height: 150px; border-radius: 18px; border: 1.5px dashed var(--hud-dash); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--hud-ink); background: #0b0d10;
}
.hud-drop:hover, .hud-drop[data-over="true"] { border-color: var(--hud-yellow); }
.hud-drop strong { font-size: 16px; font-weight: 600; }
.hud-drop span { color: var(--hud-dim); font-size: 13px; }
.hud-paste { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; font-size: 12px; line-height: 1.5; }

/* ---- widths ------------------------------------------------------------------------- */
.hud-groupby-page { display: none; }
@media (max-width: 1100px) {
  .hud-header .hud-groupby, .hud-btc { display: none; }
  .hud-groupby-page { display: flex; margin-bottom: -16px; }
  .hud-split--detail { grid-template-columns: minmax(0, 1fr); }
  .hud-detail { margin: 24px 0 0; border-left: 0; border-top: 1px solid var(--hud-rule); border-radius: 14px; }
}
@media (max-width: 1000px) {
  :root { --hud-pad-x: 24px; }
  .hud-header { padding: 0 24px; gap: 14px; }
  .hud-btc { display: none; }
  .hud-hero, .hud-slot-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hud-stats, .hud-slot-stats { flex-direction: row; flex-wrap: wrap; gap: 24px 40px; padding-top: 0; }
  .hud-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hud-slot-tiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .hud-trow { grid-template-columns: 28px minmax(0, 1.4fr) 110px 100px 80px 110px; }
  .hud-trow > :nth-child(4), .hud-trow > :nth-child(8) { display: none; }
  .hud-prow { grid-template-columns: 64px 48px 80px minmax(0, 1fr) 84px 96px; }
  .hud-prow > :nth-child(6), .hud-prow > :nth-child(8) { display: none; }
  .hud-orow { grid-template-columns: 64px 64px 96px minmax(0, 1fr) 96px 104px; }
  .hud-orow > :nth-child(6) { display: none; }
  .hud-wrow { grid-template-columns: 14px 56px minmax(0, 1fr) 110px 120px auto; }
  .hud-wrow > :nth-child(4) { display: none; }
  .hud-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  :root { --hud-pad-x: 16px; }
  html { scroll-padding-bottom: calc(var(--hud-tabbar) + 16px); }
  .hud-header { height: 56px; padding: 0 16px; gap: 10px; }
  .hud-nav, .hud-avatar, .hud-groupby-label { display: none; }
  .hud-seg button { min-width: 36px; padding: 0 6px; font-size: 12px; height: 28px; }
  .hud-iconbtn { width: 36px; height: 36px; }
  .hud-tabs {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 30; height: calc(var(--hud-tabbar) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--hud-bg);
    border-top: 1px solid var(--hud-rule); font-family: var(--hud-sans);
  }
  .hud-tabs a {
    display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--hud-dim);
    text-decoration: none;
  }
  .hud-tabs a[aria-current="page"] { color: var(--hud-yellow); font-weight: 600; }
  .hud-page { padding: 8px 16px calc(var(--hud-tabbar) + 32px); gap: 22px; min-height: 0; }
  .hud-big { font-size: 40px; }
  .hud-big--44 { font-size: 34px; }
  .hud-chart { height: 170px; }
  .hud-dd { height: 40px; }
  .hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .hud-stat-value { font-size: 19px; }
  .hud-tiles { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hud-tile {
    display: grid; grid-template-columns: minmax(0, 1fr) 90px 92px; align-items: center; min-height: 56px;
    padding: 0; border-radius: 0; background: transparent; border-top: 1px solid var(--hud-rule); gap: 10px;
  }
  .hud-tile:hover { background: transparent; }
  .hud-tile-pnl { font-size: 15px; text-align: right; order: 3; }
  .hud-tile-spark { height: 28px; order: 2; }
  .hud-tile-sub { display: none; }
  .hud-tape { display: none; }
  .hud-trow { grid-template-columns: 20px minmax(0, 1fr) 96px 72px; gap: 10px; }
  .hud-trow > :nth-child(5), .hud-trow > :nth-child(7) { display: none; }
  .hud-crumbs > a:first-child, .hud-crumbs > a:first-child + .hud-crumb-sep { display: none; }
  .hud-prow { grid-template-columns: 76px minmax(0, 1fr) 62px 72px; gap: 8px; }
  .hud-prow > :nth-child(2), .hud-prow > :nth-child(5) { display: none; }
  .hud-orow { grid-template-columns: 52px minmax(0, 1fr) 72px 92px; gap: 10px; }
  .hud-orow > :nth-child(2), .hud-orow > :nth-child(5) { display: none; }
  .hud-lrow { grid-template-columns: 56px 60px minmax(0, 1fr); gap: 10px; }
  .hud-wrow { grid-template-columns: 10px 44px minmax(0, 1fr) auto auto; gap: 8px 10px; padding: 10px 0; }
  .hud-wrow > :nth-child(4) { display: none; }
  .hud-wact { grid-column: 2 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .hud-wact:empty { display: none; }
  .hud-assign { margin-left: 0; padding: 16px; }
  .hud-slot-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hud-candles { height: 220px; }
  .hud-cards { grid-template-columns: 1fr 1fr; }
  .hud-wallet-top .hud-btn--primary { margin-left: 0; }
  .hud-pager { margin-left: 0; }
  .hud-sheet { padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 720px) {
  .hud-header { padding: 0 12px; gap: 8px; }
  .hud-seg { padding: 0; }
  .hud-header:has(.hud-crumbs) .hud-range { display: none; }
}

@media (max-width: 1023px), (pointer: coarse) {
  .hud-logo { min-width: 44px; min-height: 44px; justify-content: center; }
  .hud-seg button { height: 44px; min-width: 44px; }
  .hud-iconbtn { width: 44px; height: 44px; }
  .hud-btn, .hud-btn--sm, .hud-tabs-inline button, .hud-pill, .hud-empty { min-height: 44px; }
  .hud-crumbs a, .hud-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
  .hud-avatar { width: 44px; height: 44px; }
  .hud-switch { box-sizing: content-box; border: 9px solid transparent; background-clip: padding-box; margin: -9px; }
}

/* v2/panels.css — what the signed panels look like inside a customer sheet: add a wallet
   (canvas/qc-wallet.js), assign and release (canvas/qc-orchestrate.js), change a cap
   (canvas/qc-controls.js), move cash between your wallets (canvas/qc-transfers.js), and the
   candles of a slot (canvas/qc-chart.js). These modules keep their `qc-` class names; this
   file is all that styles them. */

:root {
  --qc-bg: #07090c;
  --qc-paper: #181a20;
  --qc-soft: #252930;
  --qc-raise: #2d291c;
  --qc-ink: #eaecef;
  --qc-muted: #b0b7c2;
  --qc-subtle: #9aa5b5;
  --qc-line: #505866;
  --qc-line-soft: #353b45;
  --qc-accent: #f0b90b;
  --qc-accent-hover: #ffd044;
  --qc-accent-soft: #342d17;
  --qc-on-accent: #181a20;
  --qc-green: #2ed6a1;
  --qc-green-soft: #15382d;
  --qc-red: #ff7084;
  --qc-red-soft: #3b2028;
  --qc-amber: #f5c76b;
  --qc-amber-soft: #342b18;
  --qc-blue: #a7c5ff;
  --qc-blue-soft: #233149;
  --qc-focus: #f0b90b;
  --qc-mono: var(--hud-mono);
}

.qc-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.qc-mono { font-family: var(--qc-mono); font-variant-numeric: tabular-nums; }
.qc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.qc-iconbtn { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none; border-radius: 5px; color: var(--qc-muted); text-decoration: none; }
.qc-iconbtn:hover, .qc-iconbtn[aria-pressed="true"], .qc-iconbtn[aria-expanded="true"] { background: var(--qc-accent-soft); color: var(--qc-accent); }
.qc-iconbtn[aria-busy="true"] { cursor: progress; }
.qc-iconbtn[data-state="error"] { color: var(--qc-red); }
.qc-eyebrow { color: var(--qc-muted); text-transform: uppercase; font: 10px var(--qc-mono); letter-spacing: 1px; }

.qc-pair { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 12px; border-bottom: 1px solid var(--qc-line-soft); }
.qc-pair > span:first-child { color: var(--qc-muted); }
.qc-pair > span:last-child { text-align: right; overflow-wrap: anywhere; }
.qc-note { font-size: 11px; color: var(--qc-muted); line-height: 1.65; margin: 12px 0; }
.qc-field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.qc-field label { font-size: 12px; font-weight: 500; }
.qc-field input { border: 1px solid var(--qc-line); border-radius: 5px; background: var(--qc-paper); padding: 9px 10px; min-height: 40px; font-size: 13px; width: 100%; }
.qc-field input[aria-invalid="true"] { border-color: var(--qc-red); }
.qc-field small { color: var(--qc-muted); font-size: 11px; }
.qc-field-error { font-size: 11px; color: var(--qc-red); min-height: 16px; }
.qc-form-actions { display: flex; gap: 8px; margin-top: 12px; }
.qc-btn {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--qc-line); background: transparent;
  color: var(--qc-ink); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; white-space: nowrap;
}
.qc-btn:hover { background: var(--qc-soft); }
.qc-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.qc-btn--primary { background: var(--qc-accent); border-color: var(--qc-accent); color: var(--qc-on-accent); font-weight: 600; }
.qc-btn--primary:hover { background: var(--qc-accent-hover); }
.qc-review { border-top: 1px solid var(--qc-line); padding-top: 12px; margin-top: 16px; }
.qc-review h3 { font-size: 13px; font-weight: 600; margin: 0 0 6px; outline: none; }
.qc-wallet-state { margin: 10px 0; color: var(--qc-ink); font-size: 12px; }
.qc-wallet-state[data-state="ready"], .qc-wallet-state[data-state="reconciled"] { color: var(--qc-green); }
.qc-wallet-state[data-state="refused"], .qc-wallet-state[data-state="invalid"] { color: var(--qc-red); }
.qc-pool-headbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.qc-pool-headbar h2 { margin: 0; font-size: 15px; color: var(--qc-ink); }
.qc-pool-headbar span { flex: 1; color: var(--qc-muted); font-size: 11px; }
.qc-pool-meta .qc-pair { padding: 4px 0; font-size: 11px; }
.qc-pool-meta code { font: 10px var(--qc-mono); color: var(--qc-ink); word-break: break-all; }
.qc-orch-status { margin: 10px 0 0; line-height: 1.5; }
.qc-orch-status[data-state="landed"] { color: var(--qc-green); }
.qc-orch-status[data-state="refused"], .qc-orch-status[data-state="blocked"] { color: var(--qc-red); }
.qc-orch-status[data-state="unknown"], .qc-orch-status[data-state="expired"], .qc-orch-status[data-state="conflict"] { color: var(--qc-amber); }
.qc-ctl-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qc-ctl-list > li { padding: 7px 9px; border: 1px solid var(--qc-line-soft); border-radius: 6px; line-height: 1.5; }
#qc-cap-constraints > li { padding: 4px 8px; color: var(--qc-muted); font-size: 11px; }
.qc-ctl-evidence { margin-top: 4px; color: var(--qc-muted); font-size: 11px; }
.qc-ctl-outcome:empty { display: none; }
.qc-ctl-outcome { margin-top: 4px; }
.qc-money .qc-field select, .qc-money .qc-field input { width: 100%; min-height: 40px; background: var(--qc-bg); color: var(--qc-ink); border: 1px solid var(--qc-line); border-radius: 6px; padding: 4px 8px; }
.qc-money .qc-field input[readonly] { color: var(--qc-muted); }

.qc-chart { display: block; width: 100%; height: auto; }
.qc-chart-empty { padding: 18px; color: var(--qc-amber); }
.qc-chart .qc-candle line { stroke: var(--qc-muted); stroke-width: 1; }
.qc-chart .qc-candle--up rect { fill: var(--qc-green); }
.qc-chart .qc-candle--down rect { fill: var(--qc-red); }
.qc-chart .qc-gap { fill: var(--qc-amber-soft); opacity: 0.6; }
.qc-chart .qc-fillmark--buy { fill: var(--qc-green); }
.qc-chart .qc-fillmark--sell { fill: var(--qc-red); }
.qc-chart .qc-axis { fill: var(--qc-muted); font: 10px var(--qc-mono); }
.qc-chart .qc-pane-rule { stroke: var(--qc-line-soft); }
.qc-chart .qc-offscale { fill: var(--qc-amber); }
.qc-ov { --ov: var(--qc-blue); fill: none; stroke: var(--ov); stroke-width: 1.5; stroke-dasharray: 5 3; }
.qc-ov--style-accent { --ov: var(--qc-accent); }
.qc-ov--style-up { --ov: var(--qc-green); }
.qc-ov--style-down { --ov: var(--qc-red); }
.qc-ov--style-muted { --ov: var(--qc-subtle); }
.qc-ov--style-warn { --ov: var(--qc-amber); }
.qc-ov--band { stroke-width: 1; }
.qc-ov--level { stroke-dasharray: 8 5; stroke-width: 1.5; }
.qc-ov--histogram { fill: var(--ov); fill-opacity: 0.35; stroke-dasharray: 2 2; stroke-width: 1; }
.qc-ov--zone { fill: var(--ov); fill-opacity: 0.12; stroke-dasharray: 3 3; stroke-width: 1; }
.qc-ov--marker, .qc-ov--note { fill: var(--qc-bg); stroke-dasharray: 2 2; }
.qc-ov--stale { opacity: 0.4; }

@media (max-width: 1023px), (pointer: coarse) {
  .qc-iconbtn { width: 44px; height: 44px; }
}

