/* =====================================================================================================================
   SINNER · Style 2 "data terminal" (design/data-terminal/sheet.md, out/SCR-shell/spec.json). The foundation layer:
   fonts, tokens, shared components and the app frame. Loaded after app.css / mk.css / giga.css; the per-screen files
   (s2-settings.css, s2-funding.css, s2-token.css) load after this one.

   The style's one move: every selection (tab, toggle, range, nav item, step) is a 1px accent line exactly as wide as its
   label, on the nearest existing edge; figures stay white or grey and carry their sign in the text; cards are darker
   than the ground. Colour budget < 3 %: the accent is never more than that 1px line.

   Frame variables a screen may override for its own tab (e.g. in s2-funding.css):
     .s2-hl[data-tab="funding"] { --s2-right-w: 48px; }      right rail width (0 hides it)
     .s2-hl[data-tab="token"]   { --s2-work-pad: 32px; }     work column side padding
   CSP: classes only (no inline style attributes); dynamic sizes go through el.style.setProperty in JS.
   ===================================================================================================================== */

/* ---------------------------------------------------------------- 0 · faces */
/* JetBrains Mono (OFL 1.1, fonts/jetbrains-mono-OFL.txt), @fontsource-variable/jetbrains-mono 5.2.8, latin subset:
   every figure (SOL amounts, prices, counts, slot) is set in it; Inter stays the text face (app.css @font-face). */
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

/* ---------------------------------------------------------------- 1 · tokens */
:root {
  /* sheet tokens (values as given, not rounded) */
  --s2-ground: #171719;
  --s2-surface: #131217;          /* cards: DARKER than the ground */
  --s2-raised: #212023;           /* hover / nested / active fill */
  --s2-border: #222224;           /* structural 1px lines (the T-frame) */
  --s2-rule: #1b1a1f;             /* row rules inside cards and tables */
  --s2-control: #3a3a3e;          /* interactive outlines */
  --s2-control-hi: #4c4c51;       /* hover outline: one step brighter */
  --s2-text: #ffffff;
  --s2-secondary: #bdbdc0;        /* AS default (the sheet fixes none) */
  --s2-muted: #8a8c92;            /* meta, >= 4.5:1 on the ground and the cards */
  --s2-accent: #4a8ad6;           /* only ever a 1px selection line */
  --s2-positive: #44a282;
  --s2-negative: #e5566f;
  --s2-warning: #d9a441;
  --s2-pill-pos-bg: #1b2828; --s2-pill-pos-ink: #5fc39c;
  --s2-pill-neg-bg: #2c1a20; --s2-pill-neg-ink: #e5566f;
  --s2-pill-warn-bg: #2a2416; --s2-pill-warn-ink: #d9a441;
  --s2-pill-neu-bg: #212023; --s2-pill-neu-ink: #bdbdc0;
  --s2-float-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);   /* only what floats (toasts); popovers use a border instead */
  --s2-r-card: 6px;
  --s2-r-control: 999px;
  --s2-r-field: 6px;
  --s2-r-frame: 10px;             /* modal frame */
  --s2-row-h: 42px;
  --s2-gap: 24px;
  --s2-pad: 32px;
  --s2-control-h: 34px;
  --s2-field-h: 38px;
  --s2-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --s2-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* frame (out/SCR-shell/spec.json layout: 252 rail + 804 work + 384 right rail = 1440; 48 top + 820 + 32 status = 900) */
  --s2-rail-w: 252px;
  --s2-top-h: 48px;
  --s2-status-h: 32px;
  --s2-right-w: 384px;
  --s2-work-pad: 32px;
  --s2-right-pad: 24px;

  /* legacy tokens (app.css :root) re-pointed so every page inherits the palette */
  --bg: var(--s2-ground); --bg-1: var(--s2-ground); --bg-2: var(--s2-surface);
  --panel: var(--s2-surface); --panel-2: var(--s2-surface); --panel-solid: var(--s2-surface);
  --input: var(--s2-ground); --hover: var(--s2-raised);
  --border: var(--s2-border); --border-2: var(--s2-control); --border-3: var(--s2-control-hi);
  --text: var(--s2-text); --text-2: var(--s2-secondary); --text-3: var(--s2-muted); --text-4: var(--s2-muted);
  /* the accent is only ever the 1px selection line (--s2-accent); legacy "accent" text / borders / glows become ink and the
     brighter neutral outline, so no old component paints the hue */
  --accent: var(--s2-text); --accent-2: var(--s2-text); --accent-soft: var(--s2-raised); --accent-line: var(--s2-control-hi);
  --ok: var(--s2-positive); --ok-soft: var(--s2-pill-pos-bg); --warn: var(--s2-warning); --warn-soft: var(--s2-pill-warn-bg);
  --err: var(--s2-negative); --err-soft: var(--s2-pill-neg-bg); --info: var(--s2-secondary); --info-soft: var(--s2-raised);
  --cyan: var(--s2-secondary); --muted-soft: var(--s2-raised);
  --radius: var(--s2-r-card); --radius-sm: var(--s2-r-card);
  --font: var(--s2-font); --mono: var(--s2-mono);
  --glow-accent: none;
  /* mk.css tokens re-pointed */
  --mk-bg: var(--s2-ground); --mk-bg2: var(--s2-ground); --mk-card: var(--s2-surface); --mk-card2: var(--s2-raised); --mk-card3: var(--s2-raised);
  --mk-line: var(--s2-border); --mk-line2: var(--s2-control); --mk-line3: var(--s2-control-hi);
  --mk-ink: var(--s2-text); --mk-ink2: var(--s2-secondary); --mk-ink3: var(--s2-muted); --mk-ink4: var(--s2-muted);
  --mk-acc: var(--s2-text); --mk-acc2: var(--s2-text); --mk-acc-ink: var(--s2-ground); --mk-acc-soft: var(--s2-raised); --mk-acc-line: var(--s2-control-hi);
  --mk-sel: var(--s2-raised);
  --mk-ok: var(--s2-positive); --mk-ok-soft: var(--s2-pill-pos-bg); --mk-warn: var(--s2-warning); --mk-warn-soft: var(--s2-pill-warn-bg);
  --mk-err: var(--s2-negative); --mk-err-soft: var(--s2-pill-neg-bg);
  --mk-r: var(--s2-r-card); --mk-r-md: var(--s2-r-card); --mk-r-sm: var(--s2-r-card);
  --mk-rail-w: var(--s2-rail-w); --mk-status-h: var(--s2-status-h);
}
/* HyperLaunch tokens (app.css .hl / mk.css .hl.mk-hl / the hosted forms) re-pointed */
.hl, .hl.mk-hl, .hlw-form, .hlw-confirm {
  --hl-bg: var(--s2-ground); --hl-s0: var(--s2-surface); --hl-s1: var(--s2-surface); --hl-s2: var(--s2-surface); --hl-s3: var(--s2-raised); --hl-sel: var(--s2-raised);
  --hl-line: var(--s2-border); --hl-line2: var(--s2-control); --hl-line3: var(--s2-control-hi);
  --hl-ink: var(--s2-text); --hl-ink2: var(--s2-secondary); --hl-ink3: var(--s2-muted); --hl-ink4: var(--s2-muted);
  --hl-acc: var(--s2-text); --hl-acc2: var(--s2-text); --hl-acc-ink: var(--s2-ground); --hl-acc-soft: var(--s2-raised); --hl-acc-line: var(--s2-control-hi);
  --hl-acc-glow: none;
  --hl-ok: var(--s2-positive); --hl-ok-bg: var(--s2-pill-pos-bg); --hl-ok-line: transparent;
  --hl-warn: var(--s2-warning); --hl-warn-bg: var(--s2-pill-warn-bg); --hl-err: var(--s2-negative); --hl-err-bg: var(--s2-pill-neg-bg);
  --hl-info: var(--s2-secondary); --hl-info-bg: var(--s2-raised);
  --hl-r: var(--s2-r-card); --hl-r-md: var(--s2-r-card); --hl-r-sm: var(--s2-r-card);
  --hl-cap: 12px;
  --panel: var(--s2-surface); --panel-2: var(--s2-surface); --panel-solid: var(--s2-surface); --input: var(--s2-ground); --hover: var(--s2-raised);
  --border: var(--s2-border); --border-2: var(--s2-control); --border-3: var(--s2-control-hi);
  --text: var(--s2-text); --text-2: var(--s2-secondary); --text-3: var(--s2-muted); --text-4: var(--s2-muted);
  --accent: var(--s2-text); --accent-2: var(--s2-text); --accent-soft: var(--s2-raised); --accent-line: var(--s2-control-hi);
}
.hll { --buy: var(--s2-positive); --buy-ink: var(--s2-ground); --sell: var(--s2-negative); --sell-ink: var(--s2-ground); }

/* ---------------------------------------------------------------- 2 · base */
html, body { background: var(--s2-ground); }
body { font: 13px/1.45 var(--s2-font); color: var(--s2-text); font-feature-settings: normal; }
body::before { display: none; }
::selection { background: rgba(74, 138, 214, 0.35); }
* { scrollbar-color: #3a3a3e transparent; }
::-webkit-scrollbar-thumb { background: #34343a; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #45454b; }
/* the face: every figure in JetBrains Mono, digits that stack */
.num, .s2-fig { font-family: var(--s2-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mono { font-family: var(--s2-mono); letter-spacing: 0; }
.dim { color: var(--s2-muted); } .faint { color: var(--s2-muted); } .muted { color: var(--s2-secondary); }
.ok { color: var(--s2-positive); } .warn { color: var(--s2-warning); } .err { color: var(--s2-negative); } .info { color: var(--s2-secondary); } .accent { color: var(--s2-text); }
.i { stroke-width: 1.5; }
:focus-visible { outline: 1px solid var(--s2-text); outline-offset: 1px; }
.s2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* small text scale (spec: 12 / 13 / 14 / 16 / 20 / 24) */
.s2-t12 { font-size: 12px; line-height: 16px; } .s2-t13 { font-size: 13px; line-height: 18px; } .s2-t14 { font-size: 14px; line-height: 20px; }
.s2-t16 { font-size: 16px; line-height: 22px; } .s2-t20 { font-size: 20px; line-height: 26px; } .s2-t24 { font-size: 24px; line-height: 30px; }
.s2-ink { color: var(--s2-text); } .s2-sec { color: var(--s2-secondary); } .s2-mut { color: var(--s2-muted); }

/* ---------------------------------------------------------------- 3 · components */
/* the selection line: a selected control's label carries a 1px accent line on the control's bottom edge. Components set
   --s2-sel-gap = the distance from the label's bottom to that edge. */
.s2-selline { position: relative; }
.s2-selline::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-1 * var(--s2-sel-gap, 6px)); height: 1px; background: var(--s2-accent); pointer-events: none; }

/* ---- buttons: flat, one fill; pill radius (control 999); one filled primary (inverted white) */
.btn, .s2-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: var(--s2-r-control); border: 1px solid var(--s2-control); background: transparent; color: var(--s2-text);
  font: 500 13px/18px var(--s2-font); white-space: nowrap; cursor: pointer; box-shadow: none; text-decoration: none;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.btn:hover:not(:disabled), .s2-btn:hover:not(:disabled) { border-color: var(--s2-control-hi); background: transparent; }
.btn:active, .s2-btn:active { transform: none; }
.btn:focus-visible, .s2-btn:focus-visible, .input:focus-visible { outline: 1px solid var(--s2-text); outline-offset: 1px; box-shadow: none; }
.btn[disabled], .btn:disabled, .s2-btn:disabled { opacity: 1; color: var(--s2-muted); border-color: #2c2c30; cursor: default; }
.btn .i, .s2-btn .i { width: 16px; height: 16px; color: var(--s2-muted); }
.btn.primary, .btn.go, .s2-btn.primary { background: var(--s2-text); border-color: var(--s2-text); color: #0b0b0c; font-weight: 600; box-shadow: none; }
.btn.primary .i, .btn.go .i, .s2-btn.primary .i { color: #0b0b0c; }
.btn.primary:hover:not(:disabled), .btn.go:hover:not(:disabled), .s2-btn.primary:hover:not(:disabled) { background: #e8e8ea; border-color: #e8e8ea; }
.btn.primary:disabled, .btn.go:disabled, .s2-btn.primary:disabled { background: #2c2c30; border-color: #2c2c30; color: var(--s2-muted); }
.btn.danger, .s2-btn.danger { background: transparent; border-color: rgba(229, 86, 111, 0.55); color: var(--s2-negative); }
.btn.danger:hover:not(:disabled), .s2-btn.danger:hover:not(:disabled) { border-color: var(--s2-negative); background: transparent; }
.btn.ghost, .s2-btn.ghost, .s2-btn.text { border-color: transparent; background: transparent; color: var(--s2-secondary); }
.btn.ghost:hover:not(:disabled), .s2-btn.ghost:hover:not(:disabled), .s2-btn.text:hover:not(:disabled) { color: var(--s2-text); border-color: transparent; background: var(--s2-raised); }
.btn.sm, .s2-btn.sm { height: 28px; padding: 0 12px; font-size: 13px; border-radius: var(--s2-r-control); }
.btn.lg, .s2-btn.lg { height: 36px; padding: 0 18px; }
.btn.block { width: 100%; }
.s2-ibtn { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: var(--s2-r-control); background: transparent; color: var(--s2-secondary); cursor: pointer; }
.s2-ibtn:hover:not(:disabled) { background: var(--s2-raised); color: var(--s2-text); }
.s2-ibtn .i { width: 16px; height: 16px; }
.s2-ibtn.out { border-color: var(--s2-control); }
.s2-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--s2-secondary); font: 500 13px/18px var(--s2-font); cursor: pointer; text-decoration: none; }
.s2-link:hover { color: var(--s2-text); }
.s2-link .i { width: 12px; height: 12px; }

/* ---- fields: label above (14/500), 38px input, 1px control edge, r6, fill one step from its container */
.field { gap: 10px; }
.field > label, .lbl-row { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--s2-secondary); }
.field .hint { font-size: 12px; color: var(--s2-muted); }
.field .hint.err { color: var(--s2-negative); }
.field .counter { color: var(--s2-muted); font-size: 12px; font-family: var(--s2-mono); }
.input, select.input, textarea.input, .s2-input {
  height: var(--s2-field-h); padding: 0 12px; border-radius: var(--s2-r-field); border: 1px solid var(--s2-control);
  background: var(--s2-ground); color: var(--s2-text); font: 400 14px/20px var(--s2-font); box-shadow: none;
}
textarea.input { min-height: 76px; padding: 9px 12px; }
.input::placeholder, .s2-input::placeholder { color: var(--s2-muted); }
.input:hover, .s2-input:hover { border-color: var(--s2-control-hi); }
.input:focus, .s2-input:focus { outline: none; border-color: var(--s2-text); box-shadow: none; background: var(--s2-ground); }
.input.bad, .s2-input.bad { border-color: var(--s2-negative); box-shadow: none; }
.input.mono { font-family: var(--s2-mono); font-size: 13px; }
select.input, select.s2-input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a8c92' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 13px center; background-size: 10px 6px; background-repeat: no-repeat; }
select.input option, select.s2-input option { background: var(--s2-surface); color: var(--s2-text); }
.input-group .addon { border-color: var(--s2-control); background: transparent; color: var(--s2-muted); }

/* ---- switch (toggle 28x16, ON = positive) / checkbox row */
.switch { width: 28px; height: 16px; border-radius: 999px; background: #2c2c30; border: 0; }
.switch::after { top: 2px; left: 2px; width: 12px; height: 12px; background: var(--s2-secondary); }
.switch.on { background: var(--s2-positive); border: 0; }
.switch.on::after { transform: translateX(12px); background: #fff; }
.check { color: var(--s2-secondary); font-size: 13px; }

/* ---- segmented: as wide as its options; the selected option = ink label + the 1px accent line on the bottom edge */
.hl-seg, .seg, .s2-seg { --s2-seg-h: 34px; display: inline-flex; align-items: stretch; align-self: flex-start; gap: 0; padding: 0; height: var(--s2-seg-h); border: 1px solid var(--s2-control); border-radius: var(--s2-r-control); background: transparent; box-shadow: none; overflow: visible; }
.hl-seg > button:first-child, .seg > button:first-child, .s2-seg > button:first-child { border-radius: var(--s2-r-control) 0 0 var(--s2-r-control); }
.hl-seg > button:last-child, .seg > button:last-child, .s2-seg > button:last-child { border-radius: 0 var(--s2-r-control) var(--s2-r-control) 0; }
.hl-seg > button:only-child, .seg > button:only-child, .s2-seg > button:only-child { border-radius: var(--s2-r-control); }
.hl-seg button, .seg button, .s2-seg button {
  position: relative; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 100%; padding: 0 14px;
  border: 0; border-radius: 0; background: none; color: var(--s2-secondary); font: 500 13px/18px var(--s2-font); cursor: pointer; box-shadow: none; white-space: nowrap;
}
.hl-seg button + button, .seg button + button, .s2-seg button + button { border-left: 1px solid var(--s2-border); }
.hl-seg button:hover:not(:disabled), .seg button:hover:not(:disabled), .s2-seg button:hover:not(:disabled) { color: var(--s2-text); background: var(--s2-raised); }
.hl-seg button.on, .seg button.on, .s2-seg button.on { color: var(--s2-text); background: none; box-shadow: none; }
.hl-seg button.on > .s2-l, .seg button.on > .s2-l, .s2-seg button.on > .s2-l { position: relative; }
.hl-seg button.on > .s2-l::after, .seg button.on > .s2-l::after, .s2-seg button.on > .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc((18px - var(--s2-seg-h)) / 2); height: 1px; background: var(--s2-accent); }
.hl-seg button:disabled, .seg button:disabled, .s2-seg button:disabled { color: var(--s2-muted); cursor: default; opacity: 1; }
.hl-seg button small, .s2-seg button small { font-size: 12px; font-weight: 400; color: var(--s2-muted); }
.hl-seg.sm, .seg.sm, .s2-seg.sm { --s2-seg-h: 28px; flex-wrap: nowrap; }
.hl-seg.sm button, .s2-seg.sm button { height: 100%; padding: 0 10px; font-size: 12px; }
.hl-seg.lg { --s2-seg-h: 52px; }
.hl-seg.lg button { flex-direction: column; gap: 2px; min-width: 150px; }
.hl-seg.lg button.on > .s2-l::after { bottom: -4px; }
.seg button .n { color: var(--s2-muted); font-family: var(--s2-mono); }

/* ---- chips (quick values): 32px pill outline; selected = ink + the line under the label */
.hl-chip, .s2-chip {
  --s2-chip-h: 32px; position: relative; display: inline-flex; align-items: center; gap: 6px; height: var(--s2-chip-h); padding: 0 14px; border: 1px solid var(--s2-control);
  border-radius: var(--s2-r-control); background: transparent; color: var(--s2-secondary); font: 500 13px/18px var(--s2-font); cursor: pointer; box-shadow: none;
}
.hl-chip:hover:not(:disabled), .s2-chip:hover:not(:disabled) { border-color: var(--s2-control-hi); color: var(--s2-text); background: transparent; }
.hl-chip.on, .s2-chip.on { border-color: var(--s2-control-hi); background: transparent; color: var(--s2-text); box-shadow: none; }
.hl-chip.on > .s2-l, .s2-chip.on > .s2-l { position: relative; }
.hl-chip.on > .s2-l::after, .s2-chip.on > .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc((18px - var(--s2-chip-h)) / 2); height: 1px; background: var(--s2-accent); }
.hl-chip-custom.on > button > .s2-l { position: relative; }
.hl-chip-custom.on > button > .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc((18px - var(--s2-chip-h)) / 2); height: 1px; background: var(--s2-accent); }
.hl-chip small, .s2-chip small { font-size: 12px; color: var(--s2-muted); font-weight: 400; }
.hl-chip-custom { padding: 0 8px 0 0; }
.hl-chip-custom > button { height: 30px; padding: 0 10px 0 14px; color: inherit; font: inherit; }
.hl-chip-in { height: 24px; border: 1px solid var(--s2-control); border-radius: var(--s2-r-field); background: var(--s2-ground); color: var(--s2-text); font: 500 13px var(--s2-mono); }
.hl-chip-in:focus { border-color: var(--s2-text); }
.hl-chip-in.bad { border-color: var(--s2-negative); }
.s2-chip .s2-av { width: 20px; height: 20px; font-size: 11px; }

/* ---- stepper (− value +) */
.hl-stepper { height: 36px; border: 1px solid var(--s2-control); border-radius: var(--s2-r-field); background: transparent; }
.hl-stepper button { width: 36px; color: var(--s2-secondary); }
.hl-stepper button:hover:not(:disabled) { background: var(--s2-raised); color: var(--s2-text); }
.hl-stepper button:disabled { color: var(--s2-muted); opacity: 1; }
.hl-stepper input { width: 44px; border-left: 1px solid var(--s2-border); border-right: 1px solid var(--s2-border); color: var(--s2-text); font: 500 14px var(--s2-mono); }
.hl-stepper i { font-style: normal; font-size: 13px; color: var(--s2-secondary); padding: 0 8px; }

/* ---- option cards / choice rows: card tone, 1px edge; selected = ink title with its line (no glow, no tint) */
.hl-opt, .hl-row { border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); background: var(--s2-surface); box-shadow: none; color: var(--s2-text); }
.hl-opt:hover:not(:disabled), .hl-row:hover:not(:disabled) { border-color: var(--s2-control); background: var(--s2-surface); }
.hl-opt.on, .hl-row.on { border-color: var(--s2-control); background: var(--s2-surface); box-shadow: none; }
.hl-opt .hl-opt-ico, .hl-row .hl-row-gl { color: var(--s2-muted); }
.hl-opt.on .hl-opt-ico, .hl-row.on .hl-row-gl { color: var(--s2-text); }
.hl-opt.on .hl-opt-t, .hl-row.on .hl-row-txt b { position: relative; }
.hl-opt.on .hl-opt-t::after, .hl-row.on .hl-row-txt b::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--s2-accent); }
.hl-opt-s, .hl-row-txt span { color: var(--s2-muted); }
.hl-opt:disabled, .hl-row:disabled { opacity: 1; color: var(--s2-muted); cursor: default; }
.hl-row-chk { display: none; }
.hl-rows { border-color: var(--s2-border); background: transparent; }
.hl-badge { background: var(--s2-raised); color: var(--s2-secondary); font-size: 12px; font-weight: 500; }

/* ---- key-value rows (readback / summaries): label secondary left, figure ink right */
.hl-kv { gap: 8px 12px; font-size: 13px; }
.hl-kv dt { color: var(--s2-secondary); }
.hl-kv dd { font-weight: 500; color: var(--s2-text); }
.s2-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 26px; font-size: 13px; line-height: 18px; }
.s2-kv > span:first-child { color: var(--s2-secondary); }
.s2-kv b { font: 500 13px/18px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-kv small, .s2-unit { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); margin-left: 4px; }

/* ---- tables: rules + alignment, no band, no zebra, sentence-case 12px header, numbers right and mono */
.tbl { font-size: 13px; }
.tbl th { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--s2-muted); background: var(--s2-ground); border-bottom: 1px solid var(--s2-border); padding: 10px 12px; height: 38px; }
.tbl td { border-bottom: 1px solid var(--s2-rule); padding: 0 12px; height: var(--s2-row-h); }
.tbl tbody tr:hover { background: transparent; box-shadow: inset 0 0 0 1px var(--s2-control); }
.tbl tbody tr.sel { background: transparent; box-shadow: inset 0 0 0 1px var(--s2-control-hi); }
.tbl td.r, .tbl th.r { font-variant-numeric: tabular-nums; }
.tbl td.r.num, .tbl td.num { font-family: var(--s2-mono); }
.tbl-wrap { border-color: var(--s2-border); }

/* ---- pills: 20px, the hue on a dark tint of itself; neutral = grey */
.pill, .s2-pill { height: 20px; padding: 0 8px; border-radius: 999px; border: 0; font: 500 12px/16px var(--s2-font); letter-spacing: 0; background: var(--s2-pill-neu-bg); color: var(--s2-pill-neu-ink); }
.pill.ok, .s2-pill.ok { background: var(--s2-pill-pos-bg); color: var(--s2-pill-pos-ink); }
.pill.warn, .s2-pill.warn { background: var(--s2-pill-warn-bg); color: var(--s2-pill-warn-ink); }
.pill.err, .s2-pill.err { background: var(--s2-pill-neg-bg); color: var(--s2-pill-neg-ink); }
.pill.info, .pill.accent, .pill.cyan, .s2-pill.info { background: var(--s2-pill-neu-bg); color: var(--s2-pill-neu-ink); }
.pill.solid-ok { background: var(--s2-pill-pos-bg); color: var(--s2-pill-pos-ink); }
.s2-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--s2-muted); flex: none; }
.s2-dot.ok { background: var(--s2-positive); } .s2-dot.warn { background: var(--s2-warning); } .s2-dot.err { background: var(--s2-negative); }
.kbd, .s2-kbd { font-family: var(--s2-mono); font-size: 12px; line-height: 16px; padding: 0 4px; border-radius: 4px; background: transparent; border: 1px solid var(--s2-control); color: var(--s2-muted); }

/* ---- panels / cards: the card tone (darker than the ground), 1px border, no blur, no resting shadow */
.panel { background: var(--s2-surface); border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); backdrop-filter: none; box-shadow: none; }
.panel-h { min-height: 48px; padding: 0 20px; border-bottom-color: var(--s2-border); }
.panel-h h3 { font-size: 14px; font-weight: 600; }
.panel-h .sub { color: var(--s2-muted); font-size: 12px; }
.panel-b { padding: 20px; }

/* ---- notices (inline, one sentence) */
.notice { border-radius: var(--s2-r-card); background: var(--s2-surface); border: 1px solid var(--s2-border); color: var(--s2-secondary); font-size: 13px; }
.notice .i { color: var(--s2-muted); }
.notice.info { background: var(--s2-surface); border-color: var(--s2-border); } .notice.info .i { color: var(--s2-secondary); }
.notice.warn { background: var(--s2-pill-warn-bg); border-color: transparent; color: var(--s2-warning); } .notice.warn .i { color: var(--s2-warning); }
.notice.err { background: var(--s2-pill-neg-bg); border-color: transparent; color: var(--s2-negative); } .notice.err .i { color: var(--s2-negative); }
.degraded { background: var(--s2-pill-warn-bg); border: 0; border-radius: var(--s2-r-card); color: var(--s2-warning); }

/* ---- modal: r10 frame, card tone, 1px border, no shadow; backdrop 60 % black without blur */
.scrim { background: rgba(0, 0, 0, 0.6); backdrop-filter: none; }
.modal { background: var(--s2-surface); border: 1px solid #2e2e32; border-radius: var(--s2-r-frame); box-shadow: none; animation: none; }
.modal-h { position: relative; padding: 13px 52px 0 24px; min-height: 48px; }
.modal-h h3 { font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: 0; color: var(--s2-text); }
.modal-h p { margin: 6px 0 0; color: var(--s2-muted); font-size: 13px; line-height: 18px; }
.modal-b { padding: 16px 24px 24px; }
.modal-f { padding: 16px 24px; border-top: 1px solid var(--s2-border); background: transparent; gap: 12px; }
.modal-f:empty { display: none; }
.s2-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--s2-r-control); background: none; color: var(--s2-secondary); cursor: pointer; }
.s2-x:hover { background: var(--s2-raised); color: var(--s2-text); }
.s2-x .i { width: 16px; height: 16px; }
.modal.mk-modal { background: var(--s2-surface); border: 1px solid #2e2e32; border-radius: var(--s2-r-frame); }
.modal.mk-modal .modal-f .btn.primary { flex: none; height: 32px; border-radius: var(--s2-r-control); background: var(--s2-text); border-color: var(--s2-text); color: #0b0b0c; }
.mk-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--s2-secondary); cursor: pointer; }
.mk-x:hover { background: var(--s2-raised); color: var(--s2-text); }
.mk-arch-r { border-radius: var(--s2-r-card); border-color: var(--s2-border); background: var(--s2-ground); }
.mk-arch-r:hover { border-color: var(--s2-control); background: var(--s2-ground); }
.mk-arch-e { border-color: var(--s2-control); border-radius: 8px; color: var(--s2-muted); font-size: 12px; }

/* ---- drawer */
.drawer { background: var(--s2-surface); border-left: 1px solid var(--s2-border); backdrop-filter: none; box-shadow: none; animation: none; }
.drawer-h { height: 48px; padding: 0 12px 0 24px; border-bottom: 1px solid var(--s2-border); }
.drawer-h h3 { font-size: 16px; font-weight: 600; }
.drawer-b { padding: 20px 24px 28px; }
.icon-btn { border-radius: 999px; }

/* ---- toast: floats (the one shadow) */
.toasts { bottom: calc(var(--s2-status-h) + 12px); right: 24px; }
.toast { background: var(--s2-surface); border: 1px solid #2e2e32; border-radius: var(--s2-r-card); box-shadow: var(--s2-float-shadow); backdrop-filter: none; font-size: 13px; color: var(--s2-text); animation: none; }
.toast .i { color: var(--s2-muted); }
.toast.ok .i { color: var(--s2-positive); } .toast.err .i { color: var(--s2-negative); } .toast.warn .i { color: var(--s2-warning); } .toast.info .i { color: var(--s2-secondary); }
.toast .cid { font-family: var(--s2-mono); font-size: 12px; color: var(--s2-muted); }

/* ---- popover / menu (beside its trigger; border, no shadow; Esc / outside click close) */
.s2-pop { position: fixed; z-index: 70; min-width: 160px; padding: 4px; background: var(--s2-surface); border: 1px solid #2e2e32; border-radius: var(--s2-r-card); box-shadow: none; color: var(--s2-text); }
.s2-pop[hidden] { display: none; }
.s2-mi { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: var(--s2-r-card); background: none; color: var(--s2-secondary); font: 400 14px/20px var(--s2-font); text-align: left; cursor: pointer; text-decoration: none; white-space: nowrap; }
.s2-mi:hover:not(:disabled), .s2-mi:focus-visible { background: var(--s2-raised); color: var(--s2-text); outline: none; }
.s2-mi:disabled { color: var(--s2-muted); cursor: default; }
.s2-mi .i { width: 16px; height: 16px; color: var(--s2-muted); flex: none; }
.s2-mi .s2-l { position: relative; }
.s2-mi.on { color: var(--s2-text); }
.s2-mi.on .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--s2-accent); }
.s2-mi .s2-kbd { margin-left: auto; }
.s2-mi-sep { height: 1px; margin: 4px -4px; background: var(--s2-border); }
.s2-mi-h { padding: 6px 8px; font-size: 12px; font-weight: 500; color: var(--s2-muted); }

/* ---- disclosure row: a 40px row between rules: label + current values + chevron */
.s2-disc { border-top: 1px solid var(--s2-border); border-bottom: 1px solid var(--s2-border); }
.s2-disc > summary { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0; list-style: none; cursor: pointer; color: var(--s2-text); font-size: 13px; font-weight: 500; }
.s2-disc > summary::-webkit-details-marker { display: none; }
.s2-disc > summary > .s2-disc-v { flex: 1; min-width: 0; color: var(--s2-secondary); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s2-disc > summary > .i { color: var(--s2-muted); transition: transform 0.15s; }
.s2-disc[open] > summary > .i { transform: rotate(90deg); }
.hl-custom { border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); background: var(--s2-surface); }
.hl-custom > summary { padding: 0 16px; min-height: 48px; }
.hl-custom-gl { width: 28px; height: 28px; border-radius: var(--s2-r-card); background: transparent; color: var(--s2-muted); }
.hl-custom[open] > summary { border-bottom-color: var(--s2-border); }

/* ---- tabs on a full-width rule: the selected label carries the accent line on the rule */
.s2-tabs { display: flex; align-items: stretch; gap: 0; height: 40px; border-bottom: 1px solid var(--s2-border); }
.s2-tab { position: relative; display: inline-flex; align-items: flex-start; gap: 8px; padding: 10px 14px 0; border: 0; background: none; color: var(--s2-secondary); font: 500 14px/20px var(--s2-font); cursor: pointer; white-space: nowrap; }
.s2-tab:first-child { padding-left: 0; }
.s2-tab:hover:not(:disabled) { color: var(--s2-text); }
.s2-tab .n { font: 400 13px/18px var(--s2-mono); color: var(--s2-muted); }
.s2-tab.on { color: var(--s2-text); }
.s2-tab.on .n { color: var(--s2-text); }
.s2-tab .s2-l { position: relative; display: inline-flex; align-items: baseline; gap: 8px; }
.s2-tab.on .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 1px; background: var(--s2-accent); }
.s2-tab:disabled { color: var(--s2-muted); cursor: default; }

/* ---- empty / loading / error */
.empty { color: var(--s2-muted); }
.empty .ico { border-radius: var(--s2-r-card); background: transparent; border-color: var(--s2-border); }
.empty b { color: var(--s2-secondary); font-weight: 500; }
.s2-empty { display: flex; align-items: center; justify-content: center; height: 38px; border: 1px dashed var(--s2-control); border-radius: 8px; color: var(--s2-muted); font-size: 12px; }
.skel { background: var(--s2-raised); border-radius: 4px; animation: none; }
.s2-bar { display: inline-block; height: 14px; border-radius: 3px; background: var(--s2-raised); vertical-align: middle; }

/* =====================================================================================================================
   4 · the app frame: rail (x0-252, full height) | main (top bar on non-project pages · content · status bar)
   ===================================================================================================================== */
.app.s2-app { --sidebar-w: var(--s2-rail-w); background: var(--s2-ground); transition: none; }
.s2-app .main, .s2-app .content { background: var(--s2-ground); }
.s2-app .topbar { height: var(--s2-top-h); padding: 0 var(--s2-work-pad); background: var(--s2-ground); border-bottom: 1px solid var(--s2-border); backdrop-filter: none; }
.s2-app .topbar h1 { font-size: 13px; font-weight: 500; color: var(--s2-text); }
.s2-app .crumbs { color: var(--s2-muted); font-size: 13px; }
.s2-app .crumbs .i { color: var(--s2-muted); }
.s2-app.on-hyper .topbar { display: none; }

/* ---- rail */
.s2-rail.sidebar { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: var(--s2-ground); border-right: 1px solid var(--s2-border); backdrop-filter: none; }
.s2-brand { flex: none; display: flex; align-items: flex-start; gap: 8px; height: var(--s2-top-h); padding: 12px 16px 0; border-bottom: 1px solid var(--s2-border); }
.s2-brand img { width: 24px; height: 24px; display: block; }
.s2-brand b { margin-top: 1px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--s2-text); letter-spacing: 0; }
.s2-search { flex: none; display: flex; align-items: center; gap: 9px; height: 32px; margin: 12px 7px 0 8px; padding: 0 6px 0 9px; border: 1px solid var(--s2-control); border-radius: var(--s2-r-field); color: var(--s2-muted); cursor: text; }
.s2-search:hover { border-color: var(--s2-control-hi); }
.s2-search:focus-within { border-color: var(--s2-text); }
.s2-search .i { width: 16px; height: 16px; color: var(--s2-muted); }
.s2-search input { flex: 1; min-width: 0; height: 30px; padding: 0; border: 0; outline: 0; background: none; color: var(--s2-text); font: 400 14px/20px var(--s2-font); }
.s2-search input::placeholder { color: var(--s2-muted); }
.s2-search input::-webkit-search-cancel-button { display: none; }
.s2-search .s2-kbd { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border-radius: 4px; }
.s2-search:focus-within .s2-kbd { visibility: hidden; }

.s2-nav { flex: none; display: flex; flex-direction: column; padding: 0 7px 0 8px; }
.s2-projects { margin-top: 12px; flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.s2-projects::-webkit-scrollbar { display: none; }
.s2-nav > * { flex: none; }
.s2-ws { margin-top: 16px; }
.s2-glabel { display: flex; align-items: center; height: 20px; margin: 0 0 1px; padding: 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--s2-muted); }
.s2-glabel + .s2-glabel { margin-top: 7px; }
.s2-row + .s2-glabel, .s2-tree + .s2-glabel, .s2-none + .s2-glabel { margin-top: 7px; }
.s2-row {
  position: relative; display: flex; align-items: center; width: 100%; height: 32px; margin: 0 0 2px; padding: 0 8px; border: 0; border-radius: var(--s2-r-card);
  background: none; color: var(--s2-secondary); font: 400 14px/20px var(--s2-font); text-align: left; text-decoration: none; cursor: pointer;
}
.s2-row:hover { background: var(--s2-raised); }
.s2-row:focus-visible { outline: 1px solid var(--s2-text); outline-offset: -1px; }
.s2-av { display: grid; place-items: center; width: 20px; height: 20px; flex: none; overflow: hidden; border-radius: 50%; background: #2a2a2e; color: var(--s2-secondary); font: 500 12px/16px var(--s2-font); }
.s2-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s2-nm { display: flex; align-items: baseline; gap: 6px; min-width: 0; flex: 1; margin-left: 10px; white-space: nowrap; overflow: hidden; }
.s2-nm b { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 400; color: inherit; }
.s2-nm i { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-style: normal; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-nm em { flex: none; font-style: normal; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-st { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 48px; margin-left: 8px; flex: none; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-st.live { color: var(--s2-secondary); }
.s2-st.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--s2-positive); }
.s2-st.run { color: var(--s2-warning); }
/* the current project / the active page: ink label + the accent line on the row's bottom edge, exactly as wide as the label */
.s2-row.on { color: var(--s2-text); }
.s2-row.on .s2-nm b, .s2-row.on .s2-lbl { position: relative; overflow: visible; color: var(--s2-text); }
.s2-row.on .s2-nm { overflow: visible; }
.s2-row.on .s2-nm b::after, .s2-row.on .s2-lbl::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--s2-accent); }
.s2-row > .i { width: 16px; height: 16px; flex: none; margin-left: 2px; color: var(--s2-muted); }
.s2-row.on > .i { color: var(--s2-text); }
.s2-lbl { margin-left: 12px; white-space: nowrap; }
.s2-row .s2-new { margin-left: 8px; font-style: normal; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-row .s2-chev { margin-left: auto; width: 12px; height: 12px; color: var(--s2-muted); }
.s2-row .badge-count { margin-left: auto; font: 500 12px var(--s2-mono); color: var(--s2-secondary); background: none; padding: 0; }
.s2-row.dup .s2-nm em { color: var(--s2-muted); }
.s2-none { display: flex; align-items: center; height: 32px; margin: 0 0 2px; padding: 0 8px; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-skrow { display: flex; align-items: center; gap: 10px; height: 32px; margin: 0 0 2px; padding: 0 8px; }
.s2-skrow i { display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--s2-raised); }
.s2-skrow b { display: block; width: 110px; height: 12px; border-radius: 3px; background: var(--s2-raised); }
/* GigaTrader lane parents keep their nested cycle projects (expand / collapse) */
.s2-tree .s2-tg { display: inline-flex; align-items: center; gap: 2px; height: 20px; margin-left: 6px; padding: 0 4px; border: 0; border-radius: 4px; background: none; color: var(--s2-muted); font: 500 12px var(--s2-mono); cursor: pointer; }
.s2-tree .s2-tg:hover { background: var(--s2-raised); color: var(--s2-text); }
.s2-tree .s2-tg .i { width: 12px; height: 12px; }
.s2-tree-kids { margin-left: 18px; padding-left: 0; border-left: 1px solid var(--s2-border); }
.s2-tree-kids .s2-row { padding-left: 10px; }

/* rail foot: the pre-funder (balance + Deposit + Withdraw), then New launch + Import; bottom-anchored */
.s2-rail-sp { flex: 1 1 auto; min-height: 12px; }
.s2-rail-foot { flex: none; margin: 0; border-top: 1px solid var(--s2-border); padding: 12px 7px 12px 8px; }
.s2-funder-l { display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 8px; }
.s2-funder-l > span { font-size: 14px; line-height: 20px; color: var(--s2-secondary); }
.s2-funder-v { display: inline-flex; align-items: center; gap: 5px; font: 500 14px/20px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-funder-v .i { width: 12px; height: 12px; color: var(--s2-secondary); }
.s2-funder-v.short { color: var(--s2-negative); }
.s2-funder-v .s2-bar { width: 56px; }
.s2-funder-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.s2-funder-a .s2-btn { height: 28px; padding: 0 8px; }
.s2-funder-e { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--s2-muted); }
.s2-create { display: grid; grid-template-columns: 156px 1fr; gap: 8px; margin-top: 12px; }
.s2-create .s2-btn { height: 32px; }
.s2-create .s2-btn.text { color: var(--s2-secondary); }
.s2-create .s2-btn.text:hover { background: none; color: var(--s2-text); }

/* ---- status bar (x252-1440, 32px, one size: 12px) */
.mk-status.s2-status { display: flex; align-items: center; gap: 0; height: var(--s2-status-h); padding: 0 24px 0 var(--s2-work-pad); border-top: 1px solid var(--s2-border); background: var(--s2-ground); font-size: 12px; line-height: 16px; color: var(--s2-muted); grid-template-columns: none; }
.s2-status .s2-quote { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.s2-status .s2-quote .i { width: 12px; height: 12px; color: var(--s2-secondary); margin-right: 6px; }
.s2-status .s2-q-n { color: var(--s2-secondary); }
.s2-status .s2-q-p { margin-left: 8px; font: 500 12px/16px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-status .s2-q-c { margin-left: 8px; font: 500 12px/16px var(--s2-mono); color: var(--s2-secondary); font-variant-numeric: tabular-nums; }
.s2-status .s2-q-c.up { color: var(--s2-positive); }
.s2-status .s2-q-c.na { font-family: var(--s2-font); font-weight: 400; color: var(--s2-muted); }
.s2-status .s2-q-err { display: inline-flex; align-items: center; gap: 8px; color: var(--s2-muted); }
.s2-vsep { width: 1px; height: 16px; margin: 0 16px; background: var(--s2-border); flex: none; }
.s2-status .s2-fresh { white-space: nowrap; }
.s2-status .s2-fresh.stale { color: var(--s2-warning); }
.s2-status .cmds { margin-left: 16px; gap: 6px; }
.s2-status .cmd-chip { height: 20px; border-radius: 999px; padding: 0 8px; font: 400 12px/16px var(--s2-mono); color: var(--s2-secondary); background: transparent; border: 1px solid var(--s2-border); }
.s2-status .cmd-chip.done { color: var(--s2-positive); } .s2-status .cmd-chip.failed { color: var(--s2-negative); }
.s2-status .s2-st-sp { flex: 1; }
.s2-st-btn { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 6px; margin: 0 -6px; border: 0; border-radius: 4px; background: none; color: var(--s2-muted); font: 400 12px/16px var(--s2-font); cursor: pointer; white-space: nowrap; }
.s2-st-btn:hover, .s2-st-btn[aria-expanded="true"] { color: var(--s2-text); background: var(--s2-raised); }
.s2-st-btn .s2-dot { background: var(--s2-positive); }
.s2-st-btn.warn .s2-dot { background: var(--s2-warning); }
.s2-st-btn.down .s2-dot { background: var(--s2-negative); }
.s2-st-btn.user { color: var(--s2-secondary); }
.s2-st-btn.user .i { width: 12px; height: 12px; }
.s2-st-btn.user.warn { color: var(--s2-warning); }

/* ---- popovers of the shell */
.s2-more { width: 200px; }
.s2-more .s2-mi .i { margin: 0 0 0 4px; }
.s2-svc { width: 240px; padding: 6px 12px 8px; }
.s2-svc-h { display: flex; align-items: center; height: 28px; font-size: 12px; font-weight: 500; color: var(--s2-muted); }
.s2-svc-r { display: flex; align-items: center; gap: 8px; height: 28px; font-size: 13px; color: var(--s2-secondary); }
.s2-svc-r b { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--s2-muted); }
.s2-svc-r.down b { color: var(--s2-negative); } .s2-svc-r.degraded b { color: var(--s2-warning); }
.s2-svc-r .s2-dot { background: var(--s2-positive); }
.s2-svc-r.down .s2-dot { background: var(--s2-negative); } .s2-svc-r.degraded .s2-dot, .s2-svc-r.unknown .s2-dot { background: var(--s2-warning); }
.s2-svc-sep { height: 1px; margin: 4px 0; background: var(--s2-border); }
.s2-svc-r.slot b { font-family: var(--s2-mono); color: var(--s2-secondary); }
.s2-user { width: 220px; }
.s2-user-h { display: flex; flex-direction: column; justify-content: center; height: 44px; padding: 0 8px; }
.s2-user-h b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--s2-text); }
.s2-user-h span { font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-user-h span.warn { color: var(--s2-warning); }

/* ---- collapsed rail (O-user › Collapse sidebar): icons only, 56px */
.app.s2-app.rail { --sidebar-w: 56px; }
.app.s2-app.rail .s2-brand { padding: 12px 0 0; justify-content: center; }
.app.s2-app.rail .s2-brand b, .app.s2-app.rail .s2-glabel, .app.s2-app.rail .s2-nm, .app.s2-app.rail .s2-st, .app.s2-app.rail .s2-lbl,
.app.s2-app.rail .s2-new, .app.s2-app.rail .s2-chev, .app.s2-app.rail .s2-search input, .app.s2-app.rail .s2-search .s2-kbd,
.app.s2-app.rail .s2-funder-l > span, .app.s2-app.rail .s2-funder-v, .app.s2-app.rail .s2-tg, .app.s2-app.rail .s2-tree-kids { display: none; }
.app.s2-app.rail .s2-search { justify-content: center; padding: 0; margin: 12px 8px 0; }
.app.s2-app.rail .s2-row { justify-content: center; padding: 0; }
.app.s2-app.rail .s2-row > .i { margin: 0; }
.app.s2-app.rail .s2-funder-a, .app.s2-app.rail .s2-create { grid-template-columns: 1fr; }
.app.s2-app.rail .s2-funder-a .s2-btn, .app.s2-app.rail .s2-create .s2-btn { padding: 0; font-size: 0; }
.app.s2-app.rail .s2-funder-a .s2-btn .i, .app.s2-app.rail .s2-create .s2-btn .i { display: block; }
.s2-funder-a .s2-btn .i, .s2-create .s2-btn .i { display: none; }

/* =====================================================================================================================
   5 · the project frame (hl-shell.js): top bar (steps centred on the work column · menu) · work column (identity row,
   page head, step tabs, content; sticky plan footer) | right rail (readback · foot with the flow's one forward button)
   ===================================================================================================================== */
.content:has(.s2-hl) { padding: 0; overflow: hidden; background: var(--s2-ground); }
.page:has(.s2-hl) { height: 100%; max-width: none; margin: 0; padding: 0; animation: none; }
.page:has(.s2-hl) > div { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.page:has(.s2-hl) #hp-deg:not(:empty) { padding: 8px var(--s2-work-pad) 0; }
.page:has(.s2-hl) #hl-root { flex: 1 1 auto; min-height: 0; }
.hl.mk-hl.s2-hl { --mk-top-h: var(--s2-top-h); height: 100%; min-height: 0; max-width: none; margin: 0; display: flex; flex-direction: column; color: var(--s2-text); background: var(--s2-ground); }

/* ---- top bar: x252-1440, 48px, rule at y47; steps centred on the work column (x654); menu at x1400-1428 */
.s2-hl .s2-top { position: relative; z-index: 30; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) var(--s2-right-w); align-items: center; height: var(--s2-top-h); border-bottom: 1px solid var(--s2-border); background: var(--s2-ground); backdrop-filter: none; }
.s2-steps { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; height: 100%; }
.s2-step { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border: 0; border-radius: var(--s2-r-card); background: none; color: var(--s2-muted); font: 500 13px/18px var(--s2-font); white-space: nowrap; cursor: default; }
.s2-step .s2-l { position: relative; }
.s2-step.done { color: var(--s2-secondary); cursor: pointer; }
.s2-step.reach { color: var(--s2-secondary); cursor: pointer; }
.s2-step.done:hover, .s2-step.reach:hover { background: var(--s2-raised); color: var(--s2-text); }
.s2-step.on { color: var(--s2-text); cursor: pointer; }
.s2-step.on .s2-l::after { content: ""; position: absolute; left: 0; right: 0; bottom: -15px; height: 1px; background: var(--s2-accent); }
.s2-step[aria-disabled="true"] { pointer-events: none; }
.s2-step .s2-step-live { width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--s2-positive); }
.s2-top-r { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; padding: 0 12px 0 0; min-width: 0; position: relative; }
.s2-top-x { display: inline-flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; padding-left: 16px; }
.s2-top-r .s2-ibtn { width: 28px; height: 28px; border: 1px solid var(--s2-control); border-radius: var(--s2-r-card); }
.s2-top-r .s2-ibtn:hover { border-color: var(--s2-control-hi); background: transparent; }
.s2-steps-sub { display: inline-flex; align-items: center; height: 100%; margin-left: 8px; padding-left: 16px; border-left: 1px solid var(--s2-border); }
.s2-steps-sub .s2-tabs { height: 100%; border: 0; }
.s2-steps-sub .s2-tab { font-size: 13px; line-height: 18px; padding-top: 15px; }
.s2-steps-sub .s2-tab.on .s2-l::after { bottom: -15px; }
.s2-topmenu { width: 288px; }
.s2-route { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 0; }
.s2-route .s2-chip { --s2-chip-h: 28px; padding: 0 10px; font-size: 12px; }
.s2-route .s2-chip:disabled { color: var(--s2-muted); border-color: #2c2c30; cursor: default; }
.s2-rb .hl-route-pick .s2-route { padding: 2px 0 0; }
.s2-topmenu .s2-menu-h { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 8px; }
.s2-topmenu .s2-menu-h b { font-size: 14px; font-weight: 500; color: var(--s2-text); }
.s2-topmenu .s2-menu-h span { font-size: 12px; color: var(--s2-muted); }
.s2-topmenu .s2-menu-h code { font: 400 12px var(--s2-mono); color: var(--s2-muted); }
.s2-topmenu .s2-menu-k { display: flex; justify-content: space-between; padding: 6px 8px; font-size: 12px; color: var(--s2-muted); }
.s2-topmenu .s2-menu-k b { color: var(--s2-text); font-weight: 500; }
.s2-topmenu .hl-seg { margin: 0 8px; flex-wrap: wrap; height: auto; min-height: 28px; }
.s2-topmenu .hl-seg button { height: 28px; }
.s2-topmenu .s2-menu-f { margin: 6px 8px 4px; font-size: 12px; line-height: 16px; color: var(--s2-muted); white-space: normal; }
.s2-hl #hl-rlbar:not(:empty) { flex: none; padding: 8px var(--s2-work-pad) 0; }
.s2-hl .hl-rlbar { border-radius: var(--s2-r-card); border: 1px solid var(--s2-border); background: var(--s2-surface); }

/* ---- grid: work column | right rail; each scrolls inside itself, the shell never does */
.s2-hl .hl-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--s2-right-w); gap: 0; align-items: stretch; }
.s2-hl .hl-grid.norail, .s2-hl .hl-grid.wide { grid-template-columns: minmax(0, 1fr); }
.s2-hl .hl-grid.norail .hl-plan, .s2-hl .hl-grid.wide .hl-plan, .s2-hl .hl-plan[hidden] { display: none !important; }
.s2-hl .hl-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0; }
.s2-hl .s2-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px var(--s2-work-pad) 32px; }
.s2-hl .hl-main > .s2-scroll > .mk-phead, .s2-hl .hl-main > .s2-scroll > .hl-card { width: 100%; max-width: none; margin: 0; }
.s2-hl .hl-grid.wide .s2-scroll { padding: 16px 24px 24px; }
.s2-hl .hl-card { border: 0; background: none; border-radius: 0; overflow: visible; flex: none; }
.s2-hl .hl-content { padding: 0; }
.s2-hl .hl-grid.norail .hl-main > .s2-scroll > .hl-card { max-width: none; border: 0; padding: 0; }
.s2-hl .hl-grid.norail .hl-main { padding: 0; }

/* ---- identity row: the screen's h1 (x284, y72-116) */
.s2-id { display: flex; align-items: center; gap: 0; min-height: 44px; margin: 0 0 16px; white-space: nowrap; min-width: 0; flex-wrap: wrap; row-gap: 6px; }
.s2-id-av { display: grid; place-items: center; width: 28px; height: 28px; flex: none; overflow: hidden; border-radius: 50%; background: #2a2a2e; color: var(--s2-secondary); font: 500 13px/18px var(--s2-font); }
.s2-id-av img { width: 100%; height: 100%; object-fit: cover; }
.s2-id h1 { margin: 0 0 0 12px; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: 0; color: var(--s2-text); }
.s2-id-n { margin-left: 10px; font-size: 14px; line-height: 20px; color: var(--s2-secondary); }
.s2-id-v { display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; padding: 2px 4px; margin-right: -4px; border: 0; border-radius: 4px; background: none; color: var(--s2-secondary); font: 400 14px/20px var(--s2-font); cursor: pointer; }
.s2-id-v:hover:not(:disabled) { color: var(--s2-text); background: var(--s2-raised); }
.s2-id-v:disabled { cursor: default; }
.s2-id-v img, .s2-id-v .s2-vm { width: 14px; height: 14px; border-radius: 50%; flex: none; object-fit: cover; }
.s2-id-v .s2-vm { display: grid; place-items: center; background: var(--s2-raised); font-size: 9px; color: var(--s2-secondary); }
.s2-id-v.none { color: var(--s2-muted); }
.s2-id-st { margin-left: 20px; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-id-st.live { display: inline-flex; align-items: center; gap: 6px; color: var(--s2-secondary); }
.s2-id-st.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--s2-positive); }
.s2-id-mint { display: inline-flex; align-items: center; gap: 6px; margin-left: 20px; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-id-mint code { font: 400 12px/16px var(--s2-mono); color: var(--s2-secondary); }
.s2-id-mint .s2-ca { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; margin: -2px -4px; border-radius: 4px; cursor: pointer; }
.s2-id-mint .s2-ca:hover { background: var(--s2-raised); }
.s2-id-mint .s2-ca .i { width: 12px; height: 12px; color: var(--s2-muted); }
.s2-id-mint a { color: var(--s2-secondary); }
.s2-id-mint a:hover { color: var(--s2-text); }
.s2-id-x { display: inline-flex; align-items: center; gap: 12px; margin-left: 20px; font-size: 12px; color: var(--s2-muted); }
.s2-id-x a { color: var(--s2-secondary); }
.s2-id-x .hl-done-pill { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--s2-pill-pos-bg); color: var(--s2-pill-pos-ink); font-size: 12px; font-weight: 500; }
.s2-id-x .hl-done-pill .i { width: 12px; height: 12px; }
.s2-id-sp { flex: 1 1 auto; }

/* ---- page head: one 32px action row (12px labels, 16px icons) */
.s2-hl .mk-phead { flex: none; }
.s2-ph { display: flex; align-items: center; gap: 4px; height: 32px; margin: 0 0 20px; }
.s2-ph .s2-sp { flex: 1; }
.s2-act { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--s2-r-control); background: none; color: var(--s2-secondary); font: 400 12px/16px var(--s2-font); cursor: pointer; white-space: nowrap; }
.s2-act .i, .s2-act .hl-gl { width: 16px; height: 16px; color: var(--s2-muted); }
.s2-act:hover:not(:disabled) { color: var(--s2-text); background: var(--s2-raised); }
.s2-act.box { border-color: var(--s2-control); color: var(--s2-text); }
.s2-act.box:hover:not(:disabled) { border-color: var(--s2-control-hi); background: none; }
.s2-act:disabled { color: var(--s2-muted); cursor: default; }
.s2-act:disabled .i { color: #5d5f65; }
.s2-act.box:disabled { border-color: #2c2c30; }
.s2-act.ico { width: 32px; padding: 0; justify-content: center; border-color: var(--s2-control); color: var(--s2-text); }
.s2-act.ico .i { color: var(--s2-text); }
.s2-ph-st { margin-left: 8px; font-size: 12px; color: var(--s2-muted); white-space: nowrap; }
.s2-ph-st.ok { color: var(--s2-secondary); }

/* ---- step tabs (Strategy / Wallets / Advanced …): numbered labels on a full-width rule */
.s2-hl #hl-steps { margin: 0 0 24px; }
.s2-hl #hl-steps.hidden { display: none; }
.s2-subs { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; height: 40px; border-bottom: 1px solid var(--s2-border); }
.s2-subs .s2-tabs { border: 0; height: 100%; }
.s2-subs .s2-tab { gap: 8px; }
.s2-subs .s2-tab .n { font: 400 14px/20px var(--s2-mono); }
.s2-subs-r { align-self: center; font-size: 12px; color: var(--s2-muted); white-space: nowrap; }

/* ---- sticky plan footer of the work column (71px, rule at its top) */
.s2-hl .mk-foot { flex: none; position: static; margin: 0; border-top: 1px solid var(--s2-border); background: var(--s2-ground); backdrop-filter: none; z-index: auto; }
.s2-hl .mk-foot[hidden] { display: none; }
.s2-foot { display: flex; align-items: center; height: 70px; padding: 0 var(--s2-work-pad); gap: 0; }
.s2-foot-e { display: flex; flex-direction: column; }
.s2-foot-e > span { font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-foot-e > b { display: inline-flex; align-items: baseline; gap: 4px; font: 600 20px/26px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-foot-e > b small { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); }
.s2-foot .s2-ibtn { margin-left: 8px; color: var(--s2-muted); }
.s2-foot-sep { width: 1px; height: 36px; margin: 0 20px; background: var(--s2-border); }
.s2-foot-f { display: flex; flex-direction: column; }
.s2-foot-f > b { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--s2-text); }
.s2-foot-f > b.warn { color: var(--s2-warning); }
.s2-foot-f > b .num { font-weight: 500; }
.s2-foot-f > span { font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-foot-d { margin-left: auto; font-size: 12px; color: var(--s2-secondary); white-space: nowrap; }

/* ---- right rail: x1056-1440, rule at x1056, content x1080-1416 from y72; the foot holds the flow's one forward button */
.s2-hl .hl-plan { position: relative; top: auto; align-self: stretch; height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; border: 0; border-left: 1px solid var(--s2-border); border-radius: 0; background: var(--s2-ground); overflow: hidden; }
.s2-hl .hl-plan.mk-tokrail { background: var(--s2-ground); }
.s2-hl .s2-rb.hl-plan-in { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px var(--s2-right-pad) 16px 23px; display: flex; flex-direction: column; gap: 0; }
.s2-hl .s2-rb-f.hl-plan-f { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px var(--s2-right-pad) 16px; border: 0; background: transparent; }
.s2-hl .s2-rb-f.hl-plan-f:empty { display: none; }
.s2-rb-why { margin-right: auto; font-size: 12px; line-height: 16px; color: var(--s2-muted); white-space: normal; }
.s2-cta { min-width: 200px; height: 36px; padding: 0 20px; }
.s2-cta.ghost { background: transparent; border-color: var(--s2-control); color: var(--s2-text); font-weight: 500; }
.s2-cta .arr { display: none; }
/* readback blocks */
.s2-rb-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.s2-rb-h h3 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--s2-text); }
.s2-q { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--s2-control); border-radius: 50%; background: none; color: var(--s2-muted); font: 500 12px var(--s2-font); cursor: pointer; flex: none; }
.s2-q:hover { color: var(--s2-text); border-color: var(--s2-control-hi); }
.s2-rb-d { margin: 8px 0 0; font-size: 13px; line-height: 20px; color: var(--s2-secondary); white-space: normal; }
.s2-gc { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.s2-gc > div > span { display: block; margin-bottom: 6px; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-gc p { display: flex; gap: 6px; margin: 0 0 4px; font-size: 12px; line-height: 16px; color: var(--s2-secondary); white-space: normal; }
.s2-gc p:last-child { margin-bottom: 0; }
.s2-gc p > .s2-gc-i { flex: none; width: 12px; height: 12px; margin-top: 2px; color: var(--s2-muted); stroke-width: 2; }
.s2-rb-sep { flex: none; height: 1px; margin: 10px 0 13px; background: var(--s2-border); }
.s2-meter + .s2-rb-sep { margin-top: 16px; }
.s2-build { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.s2-build span { display: block; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-build b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--s2-text); }
.s2-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.s2-flow-c { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 5px; border: 1px solid var(--s2-control); border-radius: 999px; font-size: 12px; line-height: 16px; color: var(--s2-secondary); white-space: nowrap; }
.s2-flow-c b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 999px; background: var(--s2-raised); font: 500 12px var(--s2-mono); color: var(--s2-text); }
.s2-flow-c.off { color: var(--s2-muted); border-color: var(--s2-border); }
.s2-flow-c.off b { color: var(--s2-muted); }
.s2-flow > i { font-style: normal; font-size: 12px; color: var(--s2-muted); }
.s2-meter { display: grid; grid-template-columns: 175px minmax(0, 1fr); margin-top: 16px; border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); background: var(--s2-surface); }
.s2-meter > div { min-width: 0; min-height: 82px; padding: 10px 10px 9px 10px; }
.s2-meter > div:nth-child(odd) { border-right: 1px solid var(--s2-border); }
.s2-meter > div:nth-child(-n+2) { border-bottom: 1px solid var(--s2-border); }
.s2-meter span { display: block; font-size: 12px; line-height: 16px; color: var(--s2-secondary); }
.s2-meter b { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--s2-text); }
.s2-meter b.num { font-family: var(--s2-mono); }
.s2-meter b.dash { color: var(--s2-muted); font-weight: 400; }
.s2-meter b small { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); }
.s2-meter em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; line-height: 16px; color: var(--s2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-est { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 12px; margin-bottom: 12px; }
.s2-est > div { display: contents; }
.s2-est b { grid-column: 1; grid-row: 1; align-self: center; display: block; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--s2-text); }
.s2-est span { grid-column: 1 / -1; grid-row: 2; display: block; margin-top: 0; font-size: 12px; line-height: 16px; color: var(--s2-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2-est strong { grid-column: 2; grid-row: 1; display: inline-flex; align-items: baseline; gap: 4px; flex: none; font: 600 24px/30px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-est strong small { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); }
.s2-rb .s2-kv { min-height: 26px; }
.s2-tgt { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-top: 6px; }
.s2-tgt > span { font-size: 13px; color: var(--s2-secondary); }
.s2-tgt strong { display: inline-flex; align-items: baseline; gap: 3px; font: 600 20px/26px var(--s2-mono); color: var(--s2-text); }
.s2-tgt strong small { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); }
.s2-tgt-l { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; margin-top: 0; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-rb .s2-tgt-l .s2-link { margin: 0; }
.s2-rb .hl-more, .s2-rb .mk-cost { margin: 10px 0 0; border: 0; }
.s2-rb .hl-more > summary, .s2-rb .mk-cost > summary { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0; font-size: 13px; font-weight: 500; color: var(--s2-secondary); }
.s2-rb .hl-more > summary .i, .s2-rb .mk-cost > summary .i { width: 12px; height: 12px; color: var(--s2-muted); }
.s2-rb .hl-more[open] > summary .i, .s2-rb .mk-cost[open] > summary .i { transform: rotate(90deg); }
.s2-rb .hl-more .hl-kv, .s2-rb .mk-cost .hl-kv { padding: 4px 0 8px; font-size: 13px; margin: 0; }
.s2-rb .hl-more .hl-kv dd { color: var(--s2-text); font-family: var(--s2-mono); font-weight: 400; }
.s2-rb .hl-link, .s2-rb .s2-link { margin: 4px 0 8px; color: var(--s2-secondary); font-size: 13px; }
.s2-rb .hl-route { display: flex; justify-content: space-between; width: 100%; height: 32px; padding: 0; border: 0; background: none; color: var(--s2-secondary); font: 400 13px var(--s2-font); cursor: pointer; }
.s2-rb .hl-route .v { display: inline-flex; align-items: center; gap: 6px; color: var(--s2-text); }
.s2-rb .hl-route-pick p { margin: 6px 0 4px; font-size: 12px; color: var(--s2-muted); white-space: normal; }
.s2-fund { margin-top: 4px; }
.s2-fund-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--s2-secondary); }
.s2-fund-h b { font: 500 13px var(--s2-mono); color: var(--s2-text); }
.s2-fund-bar { height: 4px; margin: 8px 0; border-radius: 2px; background: var(--s2-raised); overflow: hidden; }
.s2-fund-bar i { display: block; height: 100%; width: var(--w, 0%); background: var(--s2-secondary); }
.s2-fund .s2-kv b.warn { color: var(--s2-warning); }
.s2-rb .hl-total-sub { margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--s2-muted); white-space: normal; }
.s2-rb .hl-total-sub.ok { color: var(--s2-secondary); }
.s2-rb .hl-fshort { margin-top: 8px; padding: 10px 12px; border-radius: var(--s2-r-card); background: var(--s2-pill-warn-bg); color: var(--s2-warning); font-size: 12px; white-space: normal; }
.s2-rb .hl-fshort b { display: block; font-weight: 600; }
.s2-rb .hl-fshort span { display: block; color: var(--s2-secondary); }
.s2-rb .hl-fshort-a { display: flex; gap: 12px; margin-top: 6px; }
.s2-rb .hl-fshort-a .hl-link { margin: 0; color: var(--s2-text); }
.s2-rb .hl-banner { margin-top: 12px; padding: 8px 10px; border-radius: var(--s2-r-card); font-size: 12px; font-weight: 400; white-space: normal; box-shadow: none; }
.s2-rb .hl-banner.ok { background: var(--s2-pill-pos-bg); color: var(--s2-pill-pos-ink); }
.s2-rb .hl-banner.info, .s2-rb .hl-banner:not(.ok):not(.warn):not(.err) { background: var(--s2-surface); color: var(--s2-secondary); }
.s2-rb .hl-profit-link { margin-top: 8px; }

/* =====================================================================================================================
   6 · overlays of the shell (spec overlays O-engine, O-prefunder, O-more, O-services, O-user, O-topmenu; O-newproject
   lives in pages/hyper.js with these classes)
   ===================================================================================================================== */
.modal.s2-modal { width: 520px; max-width: calc(100vw - 40px); }
.modal.s2-eng { width: 560px; }
.s2-eng .modal-b { padding: 16px 24px 24px; }
.s2-eng-pick { display: grid; grid-template-columns: 248px 248px; gap: 16px; }
.s2-eng-o { display: flex; flex-direction: column; align-items: stretch; gap: 10px; height: 124px; padding: 16px; border: 1px solid var(--s2-control); border-radius: 8px; background: transparent; color: var(--s2-secondary); font: 400 13px/18px var(--s2-font); text-align: left; cursor: pointer; }
.s2-eng-o:hover { border-color: var(--s2-control-hi); }
.s2-eng-o:focus-visible { outline: none; border-color: var(--s2-text); }
.s2-eng-o img { display: block; width: 216px; height: 73px; object-fit: contain; }
.s2-eng-o.hyper img { height: 72px; margin-bottom: 1px; }
.s2-eng-o span { white-space: nowrap; }
/* new HyperTrader project (pages/hyper.js) */
.s2-np .modal-b { padding: 16px 24px 24px; }
.s2-np-purpose { margin: -4px 0 16px; font-size: 13px; line-height: 18px; color: var(--s2-muted); }
.s2-np .field + .field { margin-top: 26px; }
.s2-np-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.s2-np-quick .s2-chip { --s2-chip-h: 28px; padding: 0 12px 0 4px; gap: 8px; font-size: 13px; }
.s2-np-note { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-np-note .s2-q { width: 14px; height: 14px; font-size: 10px; border-color: var(--s2-control); }
.s2-np-wl { margin-top: 16px; }
.s2-np-wl .hl-seg, .s2-np-wl .s2-seg { --s2-seg-h: 32px; align-self: flex-start; }
.s2-np-wl p { margin: 6px 0 0; font-size: 12px; line-height: 16px; color: var(--s2-muted); }
.s2-np-pop { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); background: var(--s2-ground); font-size: 12px; line-height: 18px; color: var(--s2-secondary); }
/* pre-funder deposit (O-prefunder) */
.s2-pf .modal-b { padding: 16px 24px 24px; }
.s2-pf-purpose { margin: 0 0 16px; font-size: 13px; line-height: 20px; color: var(--s2-muted); }
.s2-pf-top { display: grid; grid-template-columns: 180px 272px; gap: 20px; }
.s2-pf-qr { display: grid; place-items: center; width: 180px; height: 180px; border-radius: 8px; background: #fff; }
.s2-pf-qr svg { display: block; width: 148px; height: 148px; }
.s2-pf-bal { display: flex; align-items: center; gap: 8px; height: 36px; font: 600 24px/30px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-pf-bal .i { width: 12px; height: 12px; color: var(--s2-secondary); }
.s2-pf-bal small { font: 400 12px/16px var(--s2-font); color: var(--s2-muted); }
.s2-pf-addr { height: 52px; margin-top: 8px; padding: 7px 10px; border: 1px solid var(--s2-border); border-radius: var(--s2-r-card); background: var(--s2-ground); font: 400 13px/18px var(--s2-mono); color: var(--s2-text); word-break: break-all; white-space: normal; }
.s2-pf-a { display: grid; grid-template-columns: 126px 126px; gap: 20px; margin-top: 12px; }
.s2-pf-risk { min-height: 48px; margin-top: 12px; padding: 8px 10px; border-radius: var(--s2-r-card); background: var(--s2-pill-warn-bg); color: var(--s2-warning); font-size: 12px; line-height: 16px; white-space: normal; }
.s2-pf-rh { margin: 24px 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--s2-muted); }
.s2-pf-tx { display: flex; align-items: center; gap: 12px; height: 32px; border-bottom: 1px solid var(--s2-rule); font-size: 12px; color: var(--s2-muted); }
.s2-pf-tx:last-child { border-bottom: 0; }
.s2-pf-tx b { margin-left: auto; font: 500 13px/18px var(--s2-mono); color: var(--s2-text); font-variant-numeric: tabular-nums; }
.s2-pf-tx b.pos { color: var(--s2-positive); }
.s2-pf-tx .s2-pf-tm { width: 64px; text-align: right; }
.s2-pf-tx a { display: grid; place-items: center; width: 20px; height: 20px; color: var(--s2-muted); }
.s2-pf-tx a:hover { color: var(--s2-text); }
.s2-pf-tx a .i { width: 12px; height: 12px; }
.s2-pf-tx .s2-pf-k { color: var(--s2-secondary); }
.s2-pf-tx.fail .s2-pf-k { color: var(--s2-negative); }

/* ---- frame helpers */
.s2-lw { display: inline-flex; align-items: center; min-width: 0; }
.s2-menu-w { position: relative; display: inline-flex; align-items: center; }
.s2-pop.s2-topmenu { position: absolute; right: 0; top: calc(100% + 6px); left: auto; z-index: 60; white-space: normal; }
.s2-ph .s2-pop.s2-topmenu { top: calc(100% + 4px); }
.s2-id-na { color: var(--s2-muted); }
.s2-id-x .s2-btn.sm { height: 24px; padding: 0 10px; font-size: 12px; }
.s2-id-x .s2-btn.sm .i { width: 12px; height: 12px; }
.s2-id-x .hl-rof { color: var(--s2-secondary); }
.s2-id-x .hl-rof b { font-weight: 500; color: var(--s2-text); }

/* =====================================================================================================================
   7 · legacy components still on the page (app.css): no glows, no indigo tints, no gradients. Same selectors as app.css
   (this file loads later); the screen files (s2-*.css) load after this one and restyle their own content.
   ===================================================================================================================== */
.hl-cta, .hl-cta:hover:not(:disabled), .hlt-btn.pri, .hlw-btn.primary, .hlp-btn.primary, .hl-head-rl, .btn.primary, .btn.primary:hover, .btn.go { box-shadow: none; }
.hl-cta { border-radius: var(--s2-r-control); background: var(--s2-text); color: #0b0b0c; font-size: 13px; font-weight: 600; }
.hl-cta:hover:not(:disabled) { background: #e8e8ea; }
.hl-cta.ghost { background: transparent; border: 1px solid var(--s2-control); color: var(--s2-text); }
.hl-tab.on, .hl-stepb.on, .hll-mini button.on, .hlp-seg button.on { background: var(--s2-raised); box-shadow: none; }
.hll-chip2.on { background: transparent; border-color: var(--s2-control-hi); box-shadow: none; }
.hll-chart .cndl { background: transparent; }
.hlw-dist, .hl-suggest, .hl-need-big { background: var(--s2-surface); border-color: var(--s2-border); }
.hlw-prog.run { background: var(--s2-surface); border-color: var(--s2-control); }
.hl-calc-pct .main { background: transparent; }
.hlw-cr-av { background: var(--s2-raised); box-shadow: none; color: var(--s2-secondary); }
.hlt-drop, .hlt-drop:hover, .hlt-drop.over { background: var(--s2-surface); }
.hlt-ca:focus-within, .hlt-in:focus, .hlw-money:focus-within, .inp-sm:focus, .input:focus { box-shadow: none; border-color: var(--s2-text); }
.hlt-status.saved > i, .hll-ls[data-phase="launching"] .hll-ls-d { box-shadow: none; }
.hll-ls-bar i, .hll-bond i { background: var(--s2-secondary); box-shadow: none; }
.wd-sum { background: var(--s2-surface); }
.wd-a { border-radius: var(--s2-r-card); box-shadow: none; }
.wd-a.on { border-color: var(--s2-control-hi); background: var(--s2-surface); box-shadow: none; }
.vcard.on, .mode-card.on { background: var(--s2-surface); box-shadow: none; }
.mode-card::before { display: none; }
.sel-bar.bulk { background: var(--s2-surface); border-top-color: var(--s2-border); }
.nav a.active { background: var(--s2-raised); }
.nav a.active::before { display: none; }
.phase.current, .wf-step.active { box-shadow: none; }
.step.cur .dot, .ph-n.cur, .hstep.cur .dot, .wf-step.active .wf-num { box-shadow: none; }
.pattern .hl { text-shadow: none; }
.lh-logo { filter: none; }
.hl-tab-live, .hlt-live { animation: none; box-shadow: none; }

/* ---------------------------------------------------------------- 0b · the dealt text face (appended for the token
   screen's I-ct-03; additive: the Inter value above stays as written and is overridden here)
   design/data-terminal/sheet.md §3 and every Style 2 spec (SCR-shell tokens.data-terminal "Public Sans 400-700 +
   JetBrains Mono", SCR-create-token, SCR-launch-settings, SCR-funding) set the text in Public Sans; the approved mocks
   are drawn in it, and DIGEST §1 asks for the dealt face really loaded. Public Sans (OFL 1.1, fonts/public-sans-OFL.txt),
   variable 100-900, latin subset, the file the data-terminal skeletons use (design/data-terminal/system/fonts). Inter
   stays next in the stack for glyphs outside the subset; figures stay in JetBrains Mono (--s2-mono). */
@font-face { font-family: "Public Sans"; src: url("fonts/public-sans-var-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root { --s2-font: "Public Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ---------------------------------------------------------------- 3b · switch on the sheet's move (appended for the launch
   settings screen's LS-T4; additive: the switch rules in §3 stay as written and are overridden here)
   design/data-terminal/sheet.md §1: every selection, toggles included, is the 1px accent line; a filled colour is off-style.
   The switch is neutral (outlined track; the knob moves right and turns white) and ON carries the 1px accent line on its
   bottom edge, as wide as the switch (a bare switch has no label of its own; s2-settings.css puts the line under the
   label when the switch has one). */
.switch { border: 1px solid var(--s2-control); background: transparent; }
.switch::after { top: 2px; left: 2px; width: 10px; height: 10px; background: var(--s2-muted); }
.switch:hover:not(:disabled) { border-color: var(--s2-control-hi); }
.switch.on { border: 1px solid var(--s2-control-hi); background: transparent; }
.switch.on::after { transform: translateX(12px); background: var(--s2-text); }
.switch.on::before { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: var(--s2-accent); pointer-events: none; }

/* ---------------------------------------------------------------- 7b · legacy components, continued (appended for the
   token screen's I-ct3-06; additive: app.css stays as written). The My Wallets page's pre-funder card (app.css .wp-pre:
   a 160deg violet gradient fill + a violet edge, the inspector's FAIL on S2-shell-80) is a flat card like every legacy
   card in this frame (section 7): the card surface and the structural 1px border, no gradient, no indigo tint. */
.wp-pre { background: var(--s2-surface); border-color: var(--s2-border); }

/* ---------------------------------------------------------------- 7c · mk.css focus rings (appended for LS-C4-01; additive).
   --mk-acc-line is the neutral control edge now (section 1: the accent is never a box). The two mk.css keyboard rings that
   drew it as a 2px outline take the frame's 1px ink ring instead (:focus-visible above), so focus stays visible (> 3:1). */
.mk-pnl-col:focus-visible { outline: 1px solid var(--s2-text); outline-offset: -1px; }
.mk-btn.mk-claim:focus-visible { outline: 1px solid var(--s2-text); outline-offset: 1px; }

/* ---------------------------------------------------------------- 7d · My Wallets on the sheet's tokens (appended for the
   token screen's I-ct4-03; additive: app.css stays as written). The legacy .wp page reads the HyperLaunch tokens with
   their navy fallbacks: it sits outside .hl, so the re-pointing in section 1 never reaches it. Its row meta ("42m ago":
   app.css .wp-tbl .dim = --hl-ink4 #4d5369 on the .wp ground #0b0e16, 2.5:1, the inspector's FAIL on S2-shell-80) and
   its grey labels (--hl-ink3 #707790, 4.2:1) take the sheet's muted grey, and the page panel takes the card surface
   (cards darker than the ground): #8a8c92 on #131217 = 5.55:1. */
.wp { --hl-bg: var(--s2-surface); --hl-ink3: var(--s2-muted); --hl-ink4: var(--s2-muted); }
