
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --r-xs: 6px; --r-sm: 8px; --r-md: 11px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --ease: cubic-bezier(.25, .1, .25, 1); --ease-out: cubic-bezier(.16, 1, .3, 1); --spring: cubic-bezier(.34, 1.36, .64, 1);
  --gutter: 28px;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f7f7f9;
  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, .68);
  --label-3: rgba(60, 60, 67, .44);
  --label-4: rgba(60, 60, 67, .24);
  --sep: rgba(60, 60, 67, .13);
  --sep-strong: rgba(60, 60, 67, .24);
  --fill-1: rgba(120, 120, 128, .20);
  --fill-2: rgba(120, 120, 128, .15);
  --fill-3: rgba(118, 118, 128, .11);
  --fill-4: rgba(116, 116, 128, .07);
  --blue: #007aff; --green: #34c759; --orange: #ff9500; --red: #ff3b30; --purple: #af52de; --teal: #30b0c7; --gray: #8e8e93;
  --blue-ink: #0066d6; --green-ink: #1f8a3c; --orange-ink: #c24e00; --red-ink: #d70015; --purple-ink: #8944ab;
  --tint-blue: rgba(0, 122, 255, .11); --tint-green: rgba(52, 199, 89, .15); --tint-orange: rgba(255, 149, 0, .15);
  --tint-red: rgba(255, 59, 48, .12); --tint-purple: rgba(175, 82, 222, .12);
  --accent: var(--blue); --accent-ink: var(--blue-ink);
  --focus-ring: rgba(0, 122, 255, .42);
  --seg-thumb: #ffffff;
  --seg-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .05);
  --bubble: #e9e9eb;
  --toolbar-bg: rgba(245, 245, 247, .74);
  --glass: rgba(255, 255, 255, .78);
  --glass-thick: rgba(252, 252, 253, .94);
  --glass-border: rgba(0, 0, 0, .07);
  --scrim: rgba(0, 0, 0, .2);
  --shadow-card: 0 0 0 .5px rgba(0, 0, 0, .045), 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .025);
  --shadow-glass: 0 0 0 .5px rgba(0, 0, 0, .06), 0 6px 24px rgba(0, 0, 0, .07), inset 0 .5px 0 rgba(255, 255, 255, .9);
  --shadow-pop: 0 0 0 .5px rgba(0, 0, 0, .08), 0 22px 60px rgba(0, 0, 0, .18), 0 4px 14px rgba(0, 0, 0, .08);
  --icon-invert: #ffffff;
  --chart-text: rgba(60, 60, 67, .6); --chart-grid: rgba(60, 60, 67, .07); --chart-axis: rgba(60, 60, 67, .16);
  --chart-up: #1d1d1f; --chart-down: #6e6e73; --chart-wick: #6e6e73; --chart-unclosed: rgba(60, 60, 67, .34);
  --chart-volume: rgba(60, 60, 67, .2); --chart-band: rgba(60, 60, 67, .06); --chart-band-strong: rgba(60, 60, 67, .32);
  --chart-hatch: rgba(60, 60, 67, .42); --chart-ma-1: #1d1d1f; --chart-ma-2: #6e6e73; --chart-ma-3: #aeaeb2;
  --chart-level: #6e6e73; --chart-select: #000000; --chart-crosshair: rgba(60, 60, 67, .35);

  --app-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%233a3a3e'/%3E%3Cstop offset='1' stop-color='%23121214'/%3E%3C/linearGradient%3E%3ClinearGradient id='a' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.34'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='32' height='32' rx='7.4' fill='url(%23b)'/%3E%3Crect x='.5' y='.5' width='31' height='31' rx='6.9' fill='none' stroke='%23fff' stroke-opacity='.14'/%3E%3Cpath d='M5 22.5 10.5 17l4 3 6.5-8.5 5.5 3.5V27H5z' fill='url(%23a)'/%3E%3Cpath d='M5 22.5 10.5 17l4 3 6.5-8.5 5.5 3.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='26.5' cy='15' r='2.1' fill='%23fff'/%3E%3C/svg%3E");
  --i-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 4.5 13 10l-5.5 5.5'/%3E%3C/svg%3E");
  --i-updown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 8 10 4.5 13.5 8M6.5 12l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5.6 10.4 2.9 2.9 5.9-6.6'/%3E%3C/svg%3E");
  --i-question: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.4 7.7a2.7 2.7 0 1 1 3.9 2.4c-.8.4-1.3 1-1.3 1.9v.3'/%3E%3Ccircle cx='10' cy='15' r='.35' fill='black'/%3E%3C/svg%3E");
  --i-exclaim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 5.2v6'/%3E%3Ccircle cx='10' cy='14.8' r='.4' fill='black'/%3E%3C/svg%3E");
  --i-xmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6.5 6.5 7 7m0-7-7 7'/%3E%3C/svg%3E");
  --i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 10h8'/%3E%3C/svg%3E");
  --i-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 15.5V4.8M5.4 9.3 10 4.7l4.6 4.6'/%3E%3C/svg%3E");
  --i-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8.6 2.9a1.6 1.6 0 0 1 2.8 0l6.9 12.2a1.6 1.6 0 0 1-1.4 2.4H3.1a1.6 1.6 0 0 1-1.4-2.4z' fill='black'/%3E%3Cpath d='M10 7.2v4.6' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.6' r='1.1' fill='white'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='4.6' y='8.8' width='10.8' height='8.2' rx='2.2' fill='black'/%3E%3Cpath d='M7 8.8V6.7a3 3 0 0 1 6 0v2.1'/%3E%3C/svg%3E");
  --i-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5c.5 3.6 1.9 5 5.5 5.5-3.6.5-5 1.9-5.5 5.5-.5-3.6-1.9-5-5.5-5.5 3.6-.5 5-1.9 5.5-5.5zM15.3 12.6c.25 1.7.9 2.35 2.6 2.6-1.7.25-2.35.9-2.6 2.6-.25-1.7-.9-2.35-2.6-2.6 1.7-.25 2.35-.9 2.6-2.6z' fill='black'/%3E%3C/svg%3E");
  --i-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.2' fill='black'/%3E%3Cpath d='M10 5.6v5.2' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14' r='1.2' fill='white'/%3E%3C/svg%3E");
  --ci-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.4 2.2 4.6 11.3h4.6l-1.1 6.5 7.3-9.6h-4.9z' fill='black' stroke='none'/%3E%3C/svg%3E");
  --ci-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2.4 4 4.7v4.7c0 3.8 2.6 6.9 6 8.2 3.4-1.3 6-4.4 6-8.2V4.7z'/%3E%3C/svg%3E");
  --ci-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5.8h8.2M8 10h8.2M8 14.2h8.2'/%3E%3Ccircle cx='4.6' cy='5.8' r='1.15' fill='black' stroke='none'/%3E%3Ccircle cx='4.6' cy='10' r='1.15' fill='black' stroke='none'/%3E%3Ccircle cx='4.6' cy='14.2' r='1.15' fill='black' stroke='none'/%3E%3C/svg%3E");
  --ci-funnel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 4.3h13.6l-5.2 6.2v4.8l-3.2 1.7v-6.5z'/%3E%3C/svg%3E");
  --ci-note: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.2' y='3' width='11.6' height='14' rx='2.4'/%3E%3Cpath d='M7.3 7.2h5.4M7.3 10.2h5.4M7.3 13.2h3.2'/%3E%3C/svg%3E");
  --ci-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.2 2.8h6.2l3.4 3.4v11H5.2z'/%3E%3Cpath d='M11.3 2.8v3.5h3.5M7.6 10h4.8M7.6 13h4.8'/%3E%3C/svg%3E");
  --ci-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.1 2.8h5.8l4.1 4.1v5.8l-4.1 4.1H7.1L3 12.7V6.9z'/%3E%3Cpath d='M7.2 10h5.6'/%3E%3C/svg%3E");
  --ci-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='7.3'/%3E%3Cpath d='M10 5.8V10l2.9 1.8'/%3E%3C/svg%3E");
  --ci-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.7 11.3a3.1 3.1 0 0 0 4.4 0l2.6-2.6a3.1 3.1 0 0 0-4.4-4.4l-1.1 1.1'/%3E%3Cpath d='M11.3 8.7a3.1 3.1 0 0 0-4.4 0l-2.6 2.6a3.1 3.1 0 0 0 4.4 4.4l1.1-1.1'/%3E%3C/svg%3E");
  --ci-news: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='3.8' width='11.4' height='12.4' rx='2'/%3E%3Cpath d='M14.2 7.2h1.6c.6 0 1 .4 1 1v5.9a2 2 0 0 1-2 2'/%3E%3Cpath d='M5.8 7.4h5.4M5.8 10.2h5.4M5.8 13h3.4'/%3E%3C/svg%3E");
  --ci-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.2' y='3.2' width='5.7' height='5.7' rx='1.5'/%3E%3Crect x='11.1' y='3.2' width='5.7' height='5.7' rx='1.5'/%3E%3Crect x='3.2' y='11.1' width='5.7' height='5.7' rx='1.5'/%3E%3Crect x='11.1' y='11.1' width='5.7' height='5.7' rx='1.5'/%3E%3C/svg%3E");
  --ci-chart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.2 3v13.8H17'/%3E%3Cpath d='M6.2 13l3.2-3.6 2.6 2.1 4.2-5.6'/%3E%3C/svg%3E");
  --ci-wallet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.8' y='4.6' width='14.4' height='11.4' rx='2.6'/%3E%3Cpath d='M2.8 8.3h14.4M12.6 12.2h1.8'/%3E%3C/svg%3E");
  --ci-bubble: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 3.3c-4.1 0-7.2 2.7-7.2 6 0 1.9 1 3.5 2.7 4.6l-.7 2.8 3.3-1.7c.6.2 1.2.3 1.9.3 4.1 0 7.2-2.7 7.2-6s-3.1-6-7.2-6z'/%3E%3C/svg%3E");
  --ci-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='2.4'/%3E%3Ccircle cx='10' cy='10' r='5.3'/%3E%3Cpath d='M10 2.4v2.3M10 15.3v2.3M2.4 10h2.3M15.3 10h2.3M4.6 4.6l1.6 1.6M13.8 13.8l1.6 1.6M4.6 15.4l1.6-1.6M13.8 6.2l1.6-1.6'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --surface: #1c1c1e;
    --surface-2: #232326;
    --label: #f5f5f7;
    --label-2: rgba(235, 235, 245, .64);
    --label-3: rgba(235, 235, 245, .38);
    --label-4: rgba(235, 235, 245, .2);
    --sep: rgba(255, 255, 255, .075);
    --sep-strong: rgba(255, 255, 255, .14);
    --fill-1: rgba(120, 120, 128, .36);
    --fill-2: rgba(120, 120, 128, .28);
    --fill-3: rgba(118, 118, 128, .2);
    --fill-4: rgba(118, 118, 128, .12);
    --blue: #0a84ff; --green: #30d158; --orange: #ff9f0a; --red: #ff453a; --purple: #bf5af2; --teal: #40c8e0; --gray: #8e8e93;
    --blue-ink: #409cff; --green-ink: #30d158; --orange-ink: #ffb340; --red-ink: #ff6961; --purple-ink: #da8fff;
    --tint-blue: rgba(10, 132, 255, .2); --tint-green: rgba(48, 209, 88, .16); --tint-orange: rgba(255, 159, 10, .17);
    --tint-red: rgba(255, 69, 58, .19); --tint-purple: rgba(191, 90, 242, .19);
    --focus-ring: rgba(10, 132, 255, .55);
    --seg-thumb: rgba(255, 255, 255, .16);
    --seg-shadow: 0 1px 3px rgba(0, 0, 0, .35), inset 0 .5px 0 rgba(255, 255, 255, .08);
    --bubble: #2c2c2e;
    --toolbar-bg: rgba(17, 17, 19, .72);
    --glass: rgba(34, 34, 37, .78);
    --glass-thick: rgba(38, 38, 41, .95);
    --glass-border: rgba(255, 255, 255, .09);
    --scrim: rgba(0, 0, 0, .5);
    --shadow-card: inset 0 .5px 0 rgba(255, 255, 255, .05), 0 0 0 .5px rgba(0, 0, 0, .5);
    --shadow-glass: 0 0 0 .5px rgba(0, 0, 0, .55), 0 10px 30px rgba(0, 0, 0, .35), inset 0 .5px 0 rgba(255, 255, 255, .09);
    --shadow-pop: 0 0 0 .5px rgba(255, 255, 255, .1), 0 26px 70px rgba(0, 0, 0, .6), 0 4px 16px rgba(0, 0, 0, .4);
    --chart-text: rgba(235, 235, 245, .5); --chart-grid: rgba(255, 255, 255, .045); --chart-axis: rgba(255, 255, 255, .1);
    --chart-up: #f5f5f7; --chart-down: #8e8e93; --chart-wick: #98989d; --chart-unclosed: rgba(235, 235, 245, .3);
    --chart-volume: rgba(235, 235, 245, .15); --chart-band: rgba(235, 235, 245, .05); --chart-band-strong: rgba(235, 235, 245, .3);
    --chart-hatch: rgba(235, 235, 245, .34); --chart-ma-1: #f5f5f7; --chart-ma-2: #aeaeb2; --chart-ma-3: #636366;
    --chart-level: #aeaeb2; --chart-select: #ffffff; --chart-crosshair: rgba(235, 235, 245, .32);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h, 140px) + 12px); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--label);
  font: 400 13px/1.5 var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font-size: 17px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 13px; font-weight: 600; line-height: 1.35; }
p + p { margin-top: 6px; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
::selection { background: rgba(10, 132, 255, .32); }
* { scrollbar-width: thin; scrollbar-color: var(--fill-1) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--fill-1); border: 3px solid transparent; border-radius: 10px; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }

header.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--toolbar-bg); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-bottom: .5px solid var(--sep);
}
.bar { display: flex; align-items: center; gap: 10px 18px; min-height: 56px; padding: 9px var(--gutter); flex-wrap: wrap; }
.brand-block { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-width: 0; }
.app-icon { display: block; width: 30px; height: 30px; flex: 0 0 30px; background: var(--app-icon) center / contain no-repeat; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .22)); }
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand { font: 700 14px/1.2 var(--font-display); letter-spacing: .01em; white-space: nowrap; }
.brand-sub { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11px; color: var(--label-2); white-space: nowrap; }
.brand-sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--green) 22%, transparent); flex: 0 0 6px; }
.brand-sub[data-state="stale"] { color: var(--orange-ink); }
.brand-sub[data-state="stale"]::before { background: var(--orange); box-shadow: 0 0 0 2.5px var(--tint-orange); }
.brand-sub[data-state="lost"] { color: var(--red-ink); }
.brand-sub[data-state="lost"]::before { background: var(--red); box-shadow: 0 0 0 2.5px var(--tint-red); }
.brand-sub[data-state="wait"]::before { background: var(--gray); box-shadow: none; }

nav.tabs {
  display: flex; align-items: center; gap: 2px; padding: 3px; margin: 0 0 0 6px;
  border-radius: var(--r-pill); background: var(--fill-3); box-shadow: inset 0 0 0 .5px var(--sep);
  overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto;
}
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button {
  position: relative; flex: 0 0 auto; height: 30px; padding: 0 14px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--label); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
nav.tabs button:hover { background: var(--fill-4); }
nav.tabs button.on { background: var(--seg-thumb); box-shadow: var(--seg-shadow); font-weight: 600; }
nav.tabs button:disabled { opacity: .4; cursor: default; }
nav.tabs button[data-badge]::after {
  content: attr(data-badge); position: absolute; top: 1px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
  box-shadow: 0 0 0 1.5px var(--surface);
}

.bar-status { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: var(--fill-3); color: var(--label); font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1;
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.pill.warn { background: var(--tint-orange); color: var(--orange-ink); }
.pill.bad { background: var(--tint-red); color: var(--red-ink); }
.pill.dark { background: var(--label); color: var(--surface); }
.pill.link { cursor: pointer; }
.pill.link:hover { background: var(--fill-2); }
.pill.warn.link:hover { background: color-mix(in srgb, var(--orange) 26%, transparent); }
.pill.bad.link:hover { background: color-mix(in srgb, var(--red) 28%, transparent); }
.pill.link:active { transform: scale(.97); }
.scenario-select { height: 28px; max-width: 220px; border-radius: var(--r-pill) !important; background-color: var(--tint-orange) !important; color: var(--orange-ink) !important; font-size: 12px !important; }
.broker-entry.btn { height: 28px; min-height: 28px; padding: 0 12px 0 10px; font-size: 12px; gap: 7px; }
.broker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: 0 0 8px; box-shadow: 0 0 0 2.5px var(--tint-orange); }
.broker-dot.connected { background: var(--green); box-shadow: 0 0 0 2.5px var(--tint-green); }
.broker-dot.checked { background: var(--gray); box-shadow: none; }
.broker-dot.readonly { background: var(--orange); box-shadow: 0 0 0 2.5px var(--tint-orange); }
.pill-short { display: none; }
.status-fix { flex: none; padding: 2px 8px; border: 0; border-radius: 999px; background: var(--fill-3, var(--fill-4)); color: var(--accent-ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cabin-fix { margin: 6px 0 4px; padding: 8px 12px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.cabin-fix ol { margin: 4px 0; }
.broker-dot.checking { background: var(--blue); box-shadow: 0 0 0 2.5px var(--tint-blue); animation: ts-breathe 1.4s var(--ease) infinite; }
@keyframes ts-breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding: 22px var(--gutter) 2px; }
.page-title { font: 700 28px/1.12 var(--font-display); letter-spacing: .004em; }
.page-sub { flex: 1 1 420px; min-width: 0; color: var(--label-2); font-size: 12px; line-height: 1.5; text-align: right; padding-bottom: 3px; }

.riskdock {
  position: sticky; top: var(--toolbar-h, 57px); z-index: 30; padding: 12px var(--gutter) 14px;
  background: linear-gradient(to bottom, var(--bg) 0, var(--bg) 58%, color-mix(in srgb, var(--bg) 0%, transparent) 100%);
}
.riskdock:has(.risk:not(.collapsed)) { position: static; }
.risk {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.55fr);
  border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--shadow-glass);
  -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); overflow: hidden;
}
.risk > div { position: relative; min-width: 0; padding: 10px 14px 10px 38px; transition: background-color .15s var(--ease); }
.risk > div + div::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: .5px; background: var(--sep-strong); }
.risk > div[role=button] { cursor: pointer; }
.risk > div[role=button]:hover { background: var(--fill-4); }
.risk b { display: block; margin-bottom: 1px; font-size: 11px; font-weight: 600; color: var(--label-2); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-value { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.38; color: var(--label); overflow-wrap: anywhere; }
.risk-mark { position: absolute; left: 13px; top: 11px; width: 17px; height: 17px; border-radius: 50%; background: var(--green); color: transparent; font-size: 0; }
.risk-mark::before { content: ""; position: absolute; inset: 2px; background: #fff; -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.unknown > .risk-mark { background: var(--orange); }
.unknown > .risk-mark::before { -webkit-mask-image: var(--i-question); mask-image: var(--i-question); }
.blocked > .risk-mark, .bad > .risk-mark { background: var(--red); }
.blocked > .risk-mark::before, .bad > .risk-mark::before { -webkit-mask-image: var(--i-minus); mask-image: var(--i-minus); }

#banner:empty { display: none; }
#banner { margin-top: 10px; }
.banner {
  position: relative; padding: 10px 14px 10px 40px; border-radius: var(--r-md); background: var(--tint-red); color: var(--red-ink);
  font-weight: 500; box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--red) 30%, transparent);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.banner::before { content: ""; position: absolute; left: 14px; top: 11px; width: 17px; height: 17px; background: var(--red); -webkit-mask: var(--i-warning) center / contain no-repeat; mask: var(--i-warning) center / contain no-repeat; }
.banner.warn { background: var(--tint-orange); color: var(--orange-ink); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--orange) 30%, transparent); }
.banner.warn::before { background: var(--orange); }

main { padding: 6px var(--gutter) 72px; max-width: 1880px; animation: ts-page-in .32s var(--ease-out) both; }
@keyframes ts-page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; }
.wide { grid-column: 1 / -1; }
.grid:has(> .card > .steps) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 540px), 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.page-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 16px; align-items: start; }
.page-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.spacer { flex: 1; }
.subnav { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.subnav .meta { margin-left: auto; }

.terminal-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.terminal-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
.terminal-center { min-width: 0; }
.terminal-right { align-self: stretch; display: block; min-width: 0; }
.right-sticky {
  position: sticky; top: calc(var(--header-h, 140px) + 4px); max-height: calc(100vh - var(--header-h, 140px) - 84px);
  display: flex; flex-direction: column; gap: 16px; min-height: 0;
}
.right-sticky > .card { flex: 0 0 auto; }
.right-sticky > .card.ts-dialogue { flex: 1 1 auto; min-height: 260px; overflow: hidden; }
.terminal-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.terminal-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 16px 18px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card);
}
.card > * { margin: 0; min-width: 0; }
.card > h2, .modal h2 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--label-2); letter-spacing: .01em; }
.card h3 { font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--label); }
.news-compact .news-heading h2[data-icon] { display: flex; align-items: center; gap: 7px; }
.card > h2[data-icon]::before, .news-compact .news-heading h2[data-icon]::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; background: currentColor; -webkit-mask: var(--card-icon) center / contain no-repeat; mask: var(--card-icon) center / contain no-repeat; }
h2[data-icon="bolt"] { --card-icon: var(--ci-bolt); }
h2[data-icon="shield"] { --card-icon: var(--ci-shield); }
h2[data-icon="list"] { --card-icon: var(--ci-list); }
h2[data-icon="funnel"] { --card-icon: var(--ci-funnel); }
h2[data-icon="note"] { --card-icon: var(--ci-note); }
h2[data-icon="doc"] { --card-icon: var(--ci-doc); }
h2[data-icon="stop"] { --card-icon: var(--ci-stop); }
h2[data-icon="clock"] { --card-icon: var(--ci-clock); }
h2[data-icon="link"] { --card-icon: var(--ci-link); }
h2[data-icon="news"] { --card-icon: var(--ci-news); }
h2[data-icon="grid"] { --card-icon: var(--ci-grid); }
h2[data-icon="chart"] { --card-icon: var(--ci-chart); }
h2[data-icon="wallet"] { --card-icon: var(--ci-wallet); }
h2[data-icon="bubble"] { --card-icon: var(--ci-bubble); }
h2[data-icon="gear"] { --card-icon: var(--ci-gear); }

.card > h3 { margin-top: 4px; }
.card h4 { font-size: 12px; font-weight: 600; color: var(--label-2); margin: 4px 0; }
.card[data-flash] { animation: ts-flash 1.8s var(--ease-out); }
@keyframes ts-flash { 0%, 55% { box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-card); } 100% { box-shadow: var(--shadow-card); } }
.meta { color: var(--label-2); font-size: 12px; line-height: 1.5; }
.muted { color: var(--label-2); }
.big { font-size: 15px; font-weight: 600; line-height: 1.45; }
.mono { font-family: var(--mono); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; word-break: break-word; }
.empty { color: var(--label-2); padding: 4px 0; }
.readonly-note { color: var(--label-2); font-size: 12px; line-height: 1.5; }
.section-kicker { display: block; color: var(--label-2); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
details > summary { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; color: var(--accent-ink); font-size: 12.5px; font-weight: 500; user-select: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 9px; height: 9px; flex: 0 0 9px; background: currentColor; -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat; transition: transform .22s var(--ease); }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > summary { margin-bottom: 10px; }
pre { margin: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill-4); font: 11.5px/1.55 var(--mono); white-space: pre-wrap; overflow: auto; color: var(--label); }
hr { border: 0; height: .5px; background: var(--sep); margin: 4px 0; }

.kv { display: grid; grid-template-columns: minmax(64px, max-content) minmax(0, 1fr); column-gap: 20px; align-items: baseline; color: var(--label-2); font-size: 13px; overflow: clip; }
.kv > div { position: relative; min-width: 0; padding: 7px 0; color: var(--label); overflow-wrap: anywhere; }
.kv > div::after { content: ""; position: absolute; left: -100vw; right: 0; bottom: 0; height: .5px; background: var(--sep); }
.kv > div:last-child::after { display: none; }
.kv > div.meta { color: var(--label-2); }

.status-list { display: grid; }
.status-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; padding: 7px 0; border-bottom: .5px solid var(--sep); }
.status-line:last-child { border-bottom: 0; padding-bottom: 0; }
.status-line:first-child { padding-top: 0; }
.status-line > :first-child { color: var(--label); }
.status-line > :last-child { text-align: right; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 9px 0; border-bottom: .5px solid var(--sep); }
ul.plain > li:first-child { padding-top: 2px; }
ul.plain > li:last-child { border-bottom: 0; padding-bottom: 0; }
ul.plain > li > div + div { margin-top: 2px; }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.card > table, .card > .table-wrap, .card > section > table { width: calc(100% + 16px); margin-left: -8px; margin-right: -8px; }
th, td { padding: 8px; text-align: left; vertical-align: top; border-bottom: .5px solid var(--sep); }
thead th { padding-top: 2px; padding-bottom: 7px; font-size: 11.5px; font-weight: 600; color: var(--label-2); white-space: nowrap; border-bottom-color: var(--sep-strong); }
tbody th { font-weight: 500; color: var(--label-2); }
tbody tr:last-child > * { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click > *, tr.sel > *, .selected-row > td { transition: background-color .12s var(--ease); }
tr.click:hover > * { background: var(--fill-4); }
tr.sel > *, tr.selected-row > * { background: var(--tint-blue); }
tr.click > :first-child, tr.sel > :first-child { border-top-left-radius: var(--r-sm); border-bottom-left-radius: var(--r-sm); }
tr.click > :last-child, tr.sel > :last-child { border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
table.list td:nth-child(-n+3), table.list th { white-space: nowrap; }
.table-wrap { overflow: auto; }
.risk-table { table-layout: fixed; }
.risk-table th { width: 26%; color: var(--label-2); }
.risk-table .tag { max-width: 100%; }

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 0 15px; border: 0; border-radius: var(--r-pill);
  background: var(--fill-3); color: var(--label); font-size: 13px; font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none;
  transition: background-color .15s var(--ease), transform .15s var(--ease), opacity .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:hover:not(:disabled) { background: var(--fill-2); }
a.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); background: var(--fill-1); }
.btn:disabled { opacity: .38; cursor: default; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn.primary:active:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { background: var(--tint-red); color: var(--red-ink); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 27%, transparent); }
.btn.nav { min-height: 0; padding: 2px 0; background: transparent; color: var(--accent-ink); font-weight: 500; gap: 2px; }
.btn.nav::after { content: ""; width: 8px; height: 8px; margin-left: 2px; background: currentColor; -webkit-mask: var(--i-chevron) center / contain no-repeat; mask: var(--i-chevron) center / contain no-repeat; }
.btn.nav:hover:not(:disabled) { background: transparent; opacity: .78; }
.card > .btn.nav, .account-body > .btn.nav, .page-stack > .btn.nav { align-self: flex-start; justify-self: start; }
.btn.nav:active:not(:disabled) { background: transparent; transform: none; opacity: .6; }
.chips, .filterbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.filterbar .spacer { min-width: 10px; }
.chip {
  appearance: none; display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 11px; border: 0; border-radius: var(--r-pill);
  background: var(--fill-3); color: var(--label); font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
button.chip { cursor: pointer; }
.chip:hover:not(:disabled) { background: var(--fill-2); }
.chip:active:not(:disabled) { transform: scale(.97); }
.chip.on { background: var(--label); color: var(--surface); }
.chip:disabled { opacity: .38; cursor: default; }
label.chip { cursor: pointer; }
label.chip input { margin: 0; accent-color: var(--accent); }
.segmented { display: inline-flex; gap: 0; padding: 2px; border-radius: 9px; background: var(--fill-3); box-shadow: inset 0 0 0 .5px var(--sep); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.card > .segmented, .page-stack > .segmented { align-self: flex-start; justify-self: start; }
.segmented > .chip { min-height: 24px; padding: 0 14px; border-radius: 7px; background: transparent; font-weight: 500; }
.segmented > .chip:hover:not(:disabled) { background: var(--fill-4); }
.segmented > .chip.on { background: var(--seg-thumb); color: var(--label); box-shadow: var(--seg-shadow); font-weight: 600; }
.segmented > .chip:active:not(:disabled) { transform: none; }

.tag {
  display: inline-flex; align-items: center; max-width: 100%; min-height: 20px; padding: 1px 7px; border-radius: 6px;
  background: var(--fill-3); color: var(--label-2); font-size: 11.5px; font-weight: 500; line-height: 1.4; vertical-align: middle; overflow-wrap: anywhere;
}
.tag.ok { background: var(--tint-green); color: var(--green-ink); }
.tag.warn { background: var(--tint-orange); color: var(--orange-ink); }
.tag.bad { background: var(--tint-red); color: var(--red-ink); }

input.text, textarea, select, input[type=text], input[type=search], input:not([type]) {
  appearance: none; min-width: 0; max-width: 100%; border: 0; border-radius: var(--r-sm); padding: 7px 11px;
  background: var(--fill-4); color: var(--label); font-size: 13px; line-height: 1.4; box-shadow: inset 0 0 0 .5px var(--sep-strong);
  transition: box-shadow .15s var(--ease), background-color .15s var(--ease);
}
textarea { display: block; width: 100%; min-height: 76px; resize: vertical; }
input.text:focus, textarea:focus, select:focus, input:not([type]):focus { background: var(--surface); box-shadow: 0 0 0 3.5px var(--focus-ring), inset 0 0 0 .5px var(--accent); outline: none; }
input:disabled, textarea:disabled, select:disabled { opacity: .5; }
::placeholder { color: var(--label-3); opacity: 1; }
select {
  padding-right: 30px; cursor: pointer; background-color: var(--fill-3); box-shadow: inset 0 0 0 .5px var(--sep);
  background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10.5px) 52%; background-size: 4.5px 4.5px, 4.5px 4.5px; background-repeat: no-repeat;
}
input[type=checkbox], input[type=radio], input[type=range] { accent-color: var(--accent); }

.modal-back {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--scrim); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: ts-fade .18s var(--ease) both;
}
.modal {
  width: 100%; max-width: 440px; padding: 22px 22px 18px; border-radius: 22px;
  background: var(--glass-thick); -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-pop); animation: ts-pop .28s var(--spring) both;
}
.modal > p { margin: 0 0 18px; white-space: pre-line; font-size: 13px; line-height: 1.55; }
.modal.alert { max-width: 340px; text-align: center; padding: 22px 18px 16px; }
.modal.alert .alert-icon { display: block; width: 48px; height: 48px; margin: 0 auto 12px; background: var(--app-icon) center / contain no-repeat; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .25)); }
.modal.alert .alert-title { display: block; margin: 0 0 6px; color: var(--label); font-size: 14px; font-weight: 700; line-height: 1.35; }
.modal.alert > p { font-size: 12px; color: var(--label-2); margin-bottom: 18px; }
.modal .row.modal-actions { flex-direction: row-reverse; flex-wrap: nowrap; gap: 8px; }
.modal .row.modal-actions > .btn { flex: 1 1 0; min-height: 32px; }
@keyframes ts-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ts-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
#toast:empty { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 70; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px 12px 44px; border-radius: 16px; cursor: pointer;
  background: var(--glass-thick); -webkit-backdrop-filter: saturate(180%) blur(40px); backdrop-filter: saturate(180%) blur(40px);
  box-shadow: var(--shadow-pop); font-size: 13px; font-weight: 500; line-height: 1.45; animation: ts-toast .36s var(--spring) both;
}
.toast::before { content: ""; position: absolute; left: 15px; top: 13px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); }
.toast::after { content: ""; position: absolute; left: 18px; top: 16px; width: 12px; height: 12px; background: #fff; -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.toast.error::before, .toast.bad::before { background: var(--red); }
.toast.error::after, .toast.bad::after { -webkit-mask-image: var(--i-exclaim); mask-image: var(--i-exclaim); }
.toast ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; font-weight: 400; color: var(--label-2); }
@keyframes ts-toast { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }

.hero-state { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hero-state > div { min-width: 0; }
.hero-state strong { display: block; margin: 2px 0 0; font: 700 40px/1.08 var(--font-display); letter-spacing: -.01em; }
.hero-state .muted { margin-top: 10px; color: var(--label); font-size: 13.5px; line-height: 1.55; }
.hero-state > .tag { flex: 0 0 auto; margin-top: 2px; }
.reasons { margin-top: 12px; }
.reason-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reason-list > li { position: relative; display: inline-flex; align-items: center; min-height: 26px; padding: 0 11px 0 29px; border-radius: var(--r-pill); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); font-size: 12.5px; }
.reason-list > li::before { content: ""; position: absolute; left: 8px; top: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--label-3); }
.reason-list > li::after { content: ""; position: absolute; left: 10px; top: calc(50% - 5px); width: 10px; height: 10px; background: var(--surface); -webkit-mask: var(--i-minus) center / contain no-repeat; mask: var(--i-minus) center / contain no-repeat; }
.next-steps { margin-top: 4px; padding: 4px 14px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.next-steps > .section-kicker { padding: 8px 0 2px; }
.next-steps ul.plain > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; }
.next-steps ul.plain > li:first-child { padding-top: 6px; }
.next-steps ul.plain > li:last-child { padding-bottom: 10px; }
.next-steps .btn.nav { flex: 0 0 auto; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { min-width: 0; padding: 11px 13px 12px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.metric .section-kicker { font-size: 11px; }
.metric b { display: block; margin-top: 4px; font: 600 16px/1.25 var(--font-display); letter-spacing: 0; overflow-wrap: anywhere; }
.metric .meta { margin-top: 3px; font-size: 11.5px; line-height: 1.4; }

.nod-card { background: color-mix(in srgb, var(--orange) 7%, var(--surface)); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--orange) 40%, transparent), var(--shadow-card); }
.nod-card > h2 { color: var(--orange-ink); }
.nod-card > h2::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: var(--orange); -webkit-mask: var(--i-hand) center / contain no-repeat; mask: var(--i-hand) center / contain no-repeat; }
.nod-card .row .btn { flex: 1 1 0; }

.cells { display: grid; grid-template-columns: 56px repeat(2, minmax(0, 1fr)); gap: 8px; }
.cells .h { align-self: center; color: var(--label-2); font-size: 12px; font-weight: 600; }
.cell { min-width: 0; padding: 9px 11px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); font-size: 12.5px; line-height: 1.5; }
.cell.none { background: transparent; box-shadow: inset 0 0 0 1px var(--sep-strong); border: 0; color: var(--label-3); background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--fill-4) 7px 8px); }

.chart-heading { gap: 8px; }
.chart-empty { display: grid; place-items: center; min-height: 210px; padding: 16px; text-align: center; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.chart-empty strong { display: block; margin-bottom: 6px; font-size: 15px; }
.chart-empty.slim { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 4px 12px; min-height: 0; padding: 12px 14px; text-align: left; }
.chart-empty.slim strong { margin: 0; font-size: 13.5px; }

.pool-item {
  display: grid; grid-template-columns: 1fr; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--label); text-align: left; cursor: pointer; transition: background-color .12s var(--ease);
}
.pool-item + .pool-item { margin-top: 1px; }
.card > .pool-item { width: calc(100% + 16px); margin: 0 -8px; }
.card > .pool-item + .pool-item { margin-top: -11px; }
.pool-item b, .pool-item .mono { font-size: 13px; font-weight: 650; font-family: var(--font); letter-spacing: .01em; }
.pool-item:hover { background: var(--fill-4); }
.pool-item.selected-row { background: var(--tint-blue); }
.pool-item.selected-row .meta { color: var(--label-2); }
.card > .status-list:has(> .pool-item) { margin: 0 -8px; }

.ts-dialogue .ts-dialogue-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.ts-dialogue > .dialogue-topic { position: absolute; top: 12px; right: 14px; min-height: 26px; padding: 0 12px; font-size: 12px; background: var(--fill-3); color: var(--accent-ink); }
.ts-dialogue > .dialogue-topic:hover:not(:disabled) { background: var(--tint-blue); }
.ts-dialogue .dialogue-health { padding: 7px 11px; border-radius: var(--r-md); background: var(--tint-orange); color: var(--orange-ink); font-size: 12px; }
.dialogue { display: flex; flex-direction: column; gap: 12px; min-height: 140px; overflow: auto; padding: 2px 2px 6px; margin: 0 -4px; overscroll-behavior: contain; }
.ts-dialogue .dialogue { flex: 1 1 auto; }
.ts-dialogue .ts-dialogue-body > :not(.dialogue) { flex-shrink: 0; }
.message { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 100%; }
.message > .speaker { margin: 0 0 3px; font-size: 11px; font-weight: 500; color: var(--label-2); line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.message:has(> .bubble) > .speaker { margin: 0 12px 3px; }
.message > .speaker .tag { min-height: 16px; padding: 0 5px; font-size: 10.5px; }
.bubble, .message:not(:has(> .bubble)) { position: relative; max-width: 94%; padding: 8px 13px 9px; border-radius: 18px; background: var(--bubble); color: var(--label); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.message:not(:has(> .bubble)) { align-self: flex-start; }
.message > .bubble { border-bottom-left-radius: 6px; }
.message.you { align-items: flex-end; }
.message.you > .bubble { max-width: 86%; background: var(--accent); color: #fff; border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.message.you > .speaker { justify-content: flex-end; }
.message.local-echo > .bubble { opacity: .8; }
.message.msg-manager > .bubble, .message.msg-fallback > .bubble { max-width: 100%; }
.message.msg-manager > .bubble { box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--accent) 24%, transparent); }
.message.msg-fallback > .bubble { background: transparent; box-shadow: inset 0 0 0 1px var(--sep-strong); }
.message .fallback-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--orange-ink); }
.message .fallback-head .btn.retry { flex: 0 0 auto; min-height: 24px; padding: 0 10px; font-size: 12px; color: var(--accent-ink); }
.msg-text { white-space: pre-wrap; }
.msg-text.rich { white-space: normal; }
.msg-text.rich > :not(:first-child) { margin-top: 6px; }
.msg-text.rich > .rich-heading:not(:first-child) { margin-top: 10px; }
.msg-text.rich ul, .msg-text.rich ol { margin-bottom: 0; padding-left: 1.35em; }
.msg-text.rich ul:first-child, .msg-text.rich ol:first-child { margin-top: 0; }
.msg-text.rich li + li { margin-top: 2px; }
.msg-text.rich strong { font-weight: 650; }
.msg-text.rich code { padding: 0 4px; border-radius: 4px; background: var(--fill-3); font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; }
.msg-text.rich pre { margin-bottom: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); overflow-x: auto; white-space: pre; font-size: 11.5px; line-height: 1.45; }
.msg-text.rich pre:first-child { margin-top: 0; }
.msg-text.rich pre code { padding: 0; border-radius: 0; background: transparent; font-size: inherit; overflow-wrap: normal; }
.bubble details { margin-top: 6px; padding-top: 6px; border-top: .5px solid var(--sep-strong); }
.bubble details > summary { font-size: 11.5px; color: var(--label-2); }
.bubble details[open] > summary { margin-bottom: 6px; }
.bubble details > summary .process-sum { margin-left: 2px; color: var(--label-3); font-weight: 400; }
.bubble .meta.mono { font-size: 10.5px; }
.bubble .process-steps { max-height: 240px; overflow: auto; margin: 0 0 6px; padding-left: 1.7em; font-size: 11.5px; line-height: 1.45; color: var(--label-2); overflow-wrap: anywhere; }
.bubble .process-steps li + li { margin-top: 1px; }
.speaker-manager, .message.msg-manager > .speaker { color: var(--accent-ink); }
.msg-system { align-self: center; max-width: 92%; padding: 0 8px; font-size: 11.5px; line-height: 1.45; color: var(--label-3); text-align: center; overflow-wrap: anywhere; }
.topic-divider { display: flex; align-items: center; gap: 10px; margin: 4px 2px; font-size: 11px; font-weight: 500; color: var(--label-3); white-space: nowrap; }
.topic-divider::before, .topic-divider::after { content: ""; flex: 1 1 0; height: .5px; background: var(--sep-strong); }
.ts-dialogue .pending { align-self: flex-start; display: flex; flex-direction: column; gap: 3px; max-width: 94%; padding: 9px 13px; border-radius: 18px; border-bottom-left-radius: 6px; background: var(--bubble); color: var(--label-2); font-size: 12.5px; }
.ts-dialogue .pending-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ts-dialogue .pending i { display: inline-block; flex: 0 0 6px; width: 6px; height: 6px; margin-right: 18px; border-radius: 50%; background: var(--label-3); box-shadow: 9px 0 0 var(--label-3), 18px 0 0 var(--label-3); animation: ts-typing 1.1s var(--ease) infinite; }
@keyframes ts-typing { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ts-dialogue .pending-text { min-width: 0; }
.ts-dialogue .pending .btn.pending-stop { margin-left: auto; min-height: 24px; padding: 0 11px; font-size: 12px; }
.ts-dialogue .pending-detail, .ts-dialogue .pending-slow { font-size: 11px; line-height: 1.4; color: var(--label-3); overflow-wrap: anywhere; }
.ts-dialogue .pending-slow { color: var(--orange-ink); }
.ts-dialogue .new-answer { position: sticky; bottom: 4px; align-self: center; margin: 4px auto 0; background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.ts-dialogue .follow-ups, .ts-dialogue .dialogue-starters-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ts-dialogue .follow-ups { margin-top: -4px; padding: 0 4px; }
.ts-dialogue .dialogue-starters { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.ts-dialogue .dialogue-starters-caption { font-size: 11.5px; color: var(--label-3); }
.ts-dialogue .follow-ups .chip, .ts-dialogue .dialogue-starters .chip {
  max-width: 100%; min-height: 26px; padding: 4px 11px; background: transparent; box-shadow: inset 0 0 0 1px var(--sep-strong);
  color: var(--accent-ink); line-height: 1.35; white-space: normal; text-align: left;
}
.ts-dialogue .follow-ups .chip:hover:not(:disabled), .ts-dialogue .dialogue-starters .chip:hover:not(:disabled) { background: var(--tint-blue); box-shadow: inset 0 0 0 1px transparent; }
.composer { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.composer input { min-width: 0; }
.ts-dialogue .composer { display: block; }
.ts-dialogue .composer textarea {
  min-height: 40px; max-height: 160px; padding: 10px 46px 10px 15px; border-radius: 20px; resize: none; font-size: 13px; line-height: 1.45;
  background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep-strong);
}
.ts-dialogue .composer textarea:focus { background: var(--surface); box-shadow: 0 0 0 3.5px var(--focus-ring), inset 0 0 0 .5px var(--accent); }
.ts-dialogue .composer .btn.send {
  position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%;
  background: var(--accent); color: transparent; font-size: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.ts-dialogue .composer .btn.send::before { content: ""; width: 16px; height: 16px; background: #fff; -webkit-mask: var(--i-arrow-up) center / contain no-repeat; mask: var(--i-arrow-up) center / contain no-repeat; }
.ts-dialogue .composer .btn.send:disabled { background: var(--fill-1); opacity: 1; }
.ts-dialogue .composer .btn.send:disabled::before { background: var(--label-3); }
.ts-dialogue .composer-note { margin-top: -4px; font-size: 11.5px; line-height: 1.45; color: var(--label-2); text-align: center; }
.ts-dialogue .composer-note.error { color: var(--red-ink); }
.composer-hint { font-size: 11px; color: var(--label-3); text-align: center; }

.lw-chart-wrap { min-width: 0; }
.lw-chart { position: relative; height: 320px; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 .5px var(--sep); }
.lw-chart.audit { height: 440px; }
.lw-chart-wrap .saved-profile-chart { margin-top: 10px; min-height: 240px; }
.chart-controls { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin: 0 0 10px; }
.chart-controls .chip { min-height: 26px; padding: 0 10px; border-radius: 0; background: var(--fill-3); color: var(--label); font-size: 12px; }
.chart-controls .chip + .chip { box-shadow: inset .5px 0 0 var(--sep-strong); }
.chart-controls .chip:first-child { border-top-left-radius: var(--r-pill); border-bottom-left-radius: var(--r-pill); padding-left: 12px; }
.chart-controls .chip:nth-child(2) { margin-right: 8px; border-top-right-radius: var(--r-pill); border-bottom-right-radius: var(--r-pill); padding-right: 12px; }
.chart-controls .chip:nth-child(3) { border-top-left-radius: var(--r-pill); border-bottom-left-radius: var(--r-pill); box-shadow: none; padding-left: 12px; }
.chart-controls .chip:nth-child(4) { margin-right: 8px; border-top-right-radius: var(--r-pill); border-bottom-right-radius: var(--r-pill); padding-right: 12px; }
.chart-controls .chip:nth-child(5) { border-top-left-radius: var(--r-pill); border-bottom-left-radius: var(--r-pill); box-shadow: none; padding-left: 12px; }
.chart-controls .chip:nth-child(6) { border-top-right-radius: var(--r-pill); border-bottom-right-radius: var(--r-pill); padding-right: 12px; }
.chart-controls .chip:hover:not(:disabled) { background: var(--fill-2); }
.chart-controls .meta { margin-left: auto; font-size: 11.5px; }

.behavior-chart, .audit-chart { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 .5px var(--sep); }
.audit-chart { min-height: 420px; }
.audit-chart.saved-profile-chart { min-height: 0; }
.behavior-chart text, .audit-chart text { font-family: var(--font); font-size: 11px; fill: var(--chart-text); }
.behavior-chart .wick, .audit-chart .wick { stroke: var(--chart-wick); stroke-width: 1; }
.behavior-chart .candle, .audit-chart .candle { stroke: var(--chart-up); stroke-width: 1.2; }
.behavior-chart .candle:not([fill="none"]), .audit-chart .candle:not([fill="none"]) { fill: var(--chart-down); stroke: var(--chart-down); }
.audit-chart .unclosed { stroke: var(--chart-unclosed); stroke-dasharray: 5 4; }
.audit-chart .state-line { stroke: var(--chart-ma-2); stroke-dasharray: 12 7; }
.audit-chart .strategy-line { stroke: var(--chart-ma-1); stroke-dasharray: 5 4; }
.audit-chart .execution-line { stroke: var(--chart-ma-1); stroke-width: 1.4; }
.audit-chart .volume { fill: var(--chart-volume); }
.audit-chart .posture-band { fill: var(--chart-band-strong); opacity: .8; }
.audit-chart .prohibited { stroke: var(--chart-hatch); stroke-width: 1; }
.audit-chart .bar-target, .input-chart .bar-target { cursor: crosshair; }
.audit-chart .bar-target:hover rect:first-child { fill: var(--fill-4); }
.audit-chart .bar-target.selected .candle { stroke: var(--chart-select); stroke-width: 2.2; }
.audit-chart .watermark { fill: var(--orange); font-size: 13px; font-weight: 650; opacity: .9; }
.audit-chart .indicator-level { stroke: var(--chart-level); }
.audit-chart .indicator-node { fill: var(--chart-band-strong); opacity: .35; }
.audit-chart .indicator-node-lvn { stroke: var(--chart-hatch); }
.audit-chart .indicator-vp { fill: var(--chart-volume); opacity: 1; }
.audit-chart.saved-profile-chart .indicator-vp { fill: var(--chart-band-strong); }
.audit-chart.saved-profile-chart line { stroke: var(--chart-ma-1); }
.behavior-chart pattern path, .audit-chart pattern path { stroke: var(--chart-hatch); }
.behavior-chart rect[fill="#b9b7ad"], .behavior-chart rect[fill="#99978e"], .behavior-chart rect[fill="#aaa89e"] { fill: var(--chart-band-strong); }
.behavior-chart rect[fill="#3b3d35"] { fill: var(--chart-band); }
.audit-chart line[stroke="#44463e"], .audit-chart line[stroke="#4a4a41"] { stroke: var(--chart-axis); }
.audit-chart rect[fill="#a5a399"] { fill: var(--chart-band-strong); }
.audit-chart rect[stroke="#808078"] { stroke: var(--chart-hatch); }
.audit-chart line[stroke="#b8b5aa"] { stroke: var(--chart-level); }
.audit-chart path[stroke="#eeece5"], .audit-chart line[stroke="#e6e2d7"] { stroke: var(--chart-ma-1); }
.audit-chart path[stroke="#aaa79c"] { stroke: var(--chart-ma-2); }
.audit-chart path[stroke="#6f7067"] { stroke: var(--chart-ma-3); }
.audit-chart.saved-profile-chart rect { fill: var(--chart-band-strong); }
.behavior-marker { cursor: pointer; fill: var(--chart-ma-2); }
.behavior-marker.selected { fill: var(--chart-select); stroke: var(--chart-select); stroke-width: 1.5; }
.layer-key, .indicator-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--label-2); font-size: 12px; }
.key-line { display: inline-block; width: 30px; height: 2px; vertical-align: middle; margin-right: 6px; }
.key-line.state { background: repeating-linear-gradient(90deg, var(--label-2) 0 12px, transparent 12px 19px); }
.key-line.strategy { background: repeating-linear-gradient(90deg, var(--label-2) 0 5px, transparent 5px 9px); }
.key-line.execution { background: var(--label-2); }
.indicator-key { padding-top: 4px; border-top: 2px solid var(--label-2); font-size: 12px; }
.indicator-controls input { accent-color: var(--accent); }
.input-chart { margin-top: 12px; min-height: 0; }
.news-track { display: flex; gap: 8px; margin: 4px 0 0; padding-top: 10px; border-top: .5px solid var(--sep); }
.news-tick { display: grid; gap: 2px; flex: 1; padding: 6px 10px; border: 0; border-radius: var(--r-sm); background: var(--fill-4); color: var(--label); text-align: left; cursor: pointer; }
.news-tick:hover { background: var(--fill-3); }
.behavior-detail { display: grid; gap: 4px; padding: 11px 14px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }

.steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.steps div { position: relative; min-width: 0; padding-top: 11px; color: var(--label-3); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.steps div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--fill-2); }
.steps div.on { color: var(--label); font-weight: 600; }
.steps div.on::before { background: var(--accent); }
.detail-block { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 3px 0 0 var(--sep-strong); }
.detail-block.observation { box-shadow: inset 3px 0 0 var(--blue); }
.detail-block.rule { box-shadow: inset 3px 0 0 var(--green); }
.detail-block.limit { box-shadow: inset 3px 0 0 var(--orange); }
.detail-block h3 { margin: 0; }
.fixture-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--orange) 9%, var(--surface)); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--orange) 35%, transparent); color: var(--orange-ink); }
.fixture-banner strong { color: var(--label); }
.workflow-diagnostics, .proposal-fault { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r-md); background: var(--tint-orange); overflow-wrap: anywhere; }
.proposal-fault { background: var(--tint-red); }
.proposal-fault b { color: var(--red-ink); }
.workflow-diagnostics b { color: var(--orange-ink); }
.proposal-round { display: grid; gap: 4px; padding: 10px 0; border-bottom: .5px solid var(--sep); }
.proposal-round:last-child { border-bottom: 0; }
.manifest-details { padding-top: 10px; border-top: .5px solid var(--sep); }
.manifest-details .mono { white-space: pre-wrap; }
.review-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.score-card, .profile, .task-card { min-width: 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.score-card strong { display: block; margin: 4px 0; font: 600 20px/1.2 var(--font-display); }
.profile { display: grid; gap: 4px; }
.profile h3 { font-size: 13px; font-weight: 600; }
.question-box { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 18px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.question-box > * { margin: 0; }
.card .question-box { padding: 12px 14px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.question-box > h2 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--purple-ink); }
.question-box > h2::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; background: var(--purple); -webkit-mask: var(--i-sparkle) center / contain no-repeat; mask: var(--i-sparkle) center / contain no-repeat; }
.question-box > p:not(.readonly-note):not(.meta) { font-size: 14px; line-height: 1.55; }
.question-box > .btn { align-self: flex-start; }
.audit-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.audit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.profile-row { display: grid; grid-template-columns: 50px 1fr; gap: 6px; align-items: center; margin: 3px 0; font: 11px/1.1 var(--mono); color: var(--label-2); }
.profile-bar { height: 7px; min-width: 2px; border-radius: 4px; background: var(--chart-band-strong); }
.timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timeline-head h2 { font: 700 20px/1.25 var(--font-display); color: var(--label); }
.timeline-hour { font: 700 28px/1 var(--font-display); }
.timeline-slider { width: 100%; }
.timeline-ruler { display: grid; grid-template-columns: repeat(24, minmax(24px, 1fr)); gap: 3px; overflow: auto; margin-top: 10px; }
.hour-cell { padding: 6px 2px; border-radius: 6px; background: var(--fill-4); color: var(--label-2); font: 10.5px/1 var(--font); text-align: center; }
.hour-cell.on { background: var(--accent); color: #fff; font-weight: 600; }
.hour-cell.covered { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.runtime-tasks { min-width: 0; overflow-wrap: anywhere; }
.runtime-tasks h3 { margin: 0; }
.runtime-tasks h4 { font-size: 12px; color: var(--label-2); margin: 6px 0; }
.runtime-tasks p { margin: 6px 0; }
.runtime-meta, .runtime-node-columns, .runtime-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.runtime-meta { margin: 10px 0; }
.runtime-meta > div, .runtime-node-columns > div, .runtime-times > div { min-width: 0; }
.runtime-meta b, .runtime-times b { font-size: 12px; color: var(--label-2); }
.runtime-node, .runtime-window { padding-top: 12px; margin-top: 12px; border-top: .5px solid var(--sep); }
.runtime-node-columns > div { padding-left: 10px; box-shadow: inset 2px 0 0 var(--sep-strong); }
.runtime-times { margin: 10px 0; }
.runtime-dependency { padding: 7px 10px; border-radius: var(--r-sm); background: var(--fill-4); }
.runtime-record { padding: 12px 0; border-bottom: .5px solid var(--sep); }
.runtime-issue { color: var(--orange-ink); }
.runtime-tasks .tag { white-space: normal; }
.aggregation-diagnostics { display: grid; gap: 6px; }
.constituent-details { min-width: 0; }

.free-news { min-width: 0; overflow-wrap: anywhere; }
.news-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.news-heading h2 { margin: 3px 0 6px; font: 700 20px/1.25 var(--font-display); color: var(--label); }
.news-heading p { margin: 4px 0; }
.news-heading .btn { flex-shrink: 0; }
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 340px); gap: 28px; margin-top: 8px; }
.news-results { min-width: 0; }
.news-results-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 14px 0; border-bottom: .5px solid var(--sep); }
.news-item:first-child { padding-top: 6px; }
.news-item:last-child { border-bottom: 0; }
.news-item h3 { margin: 6px 0 7px; font-size: 15px; font-weight: 600; line-height: 1.45; color: var(--label); }
.news-article-link { color: var(--label); text-decoration: none; }
.news-article-link:hover { color: var(--accent-ink); text-decoration: none; }
.news-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--label-2); font-size: 12px; }
.news-source-name { color: var(--label); font-size: 12px; font-weight: 700; letter-spacing: .01em; }
.news-times { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--label-3); font-size: 11.5px; }
.news-boundary { color: var(--label-2); font-size: 12px; }
.news-source-panel { min-width: 0; padding-left: 22px; border-left: .5px solid var(--sep); }
.news-source-panel h3 { margin: 0 0 4px; color: var(--label); }
.news-source { padding: 12px 0; border-bottom: .5px solid var(--sep); }
.news-source:last-child { border-bottom: 0; }
.news-source-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.news-source-head .tag { text-align: right; }
.news-source p { margin: 4px 0 0; font-size: 12px; color: var(--label-2); }
.news-source .news-source-error { color: var(--orange-ink); }
.news-compact .news-heading h2 { font-size: 13px; font-weight: 600; color: var(--label-2); font-family: var(--font); margin: 0; }
.news-compact .news-item { padding: 9px 0; }
.news-compact .news-item h3 { margin: 3px 0; font-size: 13px; line-height: 1.45; }
.news-compact .news-times { margin-top: 3px; }
.news-more { margin-top: 12px; }
.news-feedback { color: var(--orange-ink); font-size: 12px; margin: 8px 0 0; }

.broker-account { min-width: 0; overflow-wrap: anywhere; }
.account-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.account-body > * { min-width: 0; margin: 0; }
.account-metrics { display: grid; gap: 0; }
.account-metrics.full { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.account-metric { min-width: 0; padding: 8px 0; border-bottom: .5px solid var(--sep); }
.account-money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 3px; }
.account-money strong { font: 600 17px/1.25 var(--font-display); font-variant-numeric: tabular-nums; }
.account-money strong.mono { font-family: var(--font-display); }
.account-unknown { display: block; margin-top: 3px; color: var(--label-3); font-size: 15px; font-weight: 500; }
.account-phases { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.account-phase { font-size: 12px; color: var(--label-2); }
.account-controls { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.account-select { display: grid; gap: 5px; min-width: 0; max-width: 100%; }
.account-select select { min-width: 0; max-width: 100%; }
.account-boundary, .broker-auth-note { color: var(--label-2); font-size: 11.5px; line-height: 1.5; }
.account-positions h3 { margin: 4px 0 8px; }
.account-positions-table { margin-top: 8px; }
.account-positions-table th, .account-positions-table td { white-space: nowrap; }
.account-positions .meta { margin-top: 8px; }
.account-received { overflow-wrap: anywhere; }
.broker-flow { display: grid; gap: 12px; }
.broker-flow p { margin: 0; }
.broker-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.broker-flow-head h2 { margin: 0; font: 700 17px/1.3 var(--font-display); color: var(--label); }
.broker-flow-head .btn { flex-shrink: 0; }
.broker-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.broker-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.broker-steps { counter-reset: broker-step; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.broker-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-bottom: .5px solid var(--sep); }
.broker-steps li:last-child { border-bottom: 0; }
.broker-steps li::before { counter-increment: broker-step; content: counter(broker-step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.broker-step-content { display: grid; gap: 7px; min-width: 0; justify-items: start; }
.broker-dialog { max-width: 540px; max-height: calc(100vh - 32px); overflow: auto; }
.broker-dialog .broker-flow { gap: 16px; }
.broker-last-check { font-size: 12px; color: var(--label-2); }

.mobile-risk { display: none; }

@media (max-width: 1500px) {
  .terminal-shell { grid-template-columns: 252px minmax(0, 1fr) 340px; }
}
@media (max-width: 1360px) {
  .bar { row-gap: 8px; }
  .bar::after { content: ""; order: 2; flex: 0 0 100%; height: 0; }
  nav.tabs { order: 3; margin: 0; max-width: 100%; }
  .bar-status { margin-left: auto; }
}
@media (max-width: 1280px) {
  .terminal-shell { grid-template-columns: minmax(0, 1fr) 330px; }
  .terminal-left { grid-column: 1; grid-row: 2; }
  .terminal-center { grid-column: 1; grid-row: 1; }
  .terminal-right { grid-column: 2; grid-row: 1 / 3; }
  .terminal-left { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .terminal-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk > div:nth-child(3n+1)::before { display: none; }
  .risk > div:nth-child(n+4) { box-shadow: inset 0 .5px 0 var(--sep-strong); }
}
@media (max-width: 1000px) {
  :root { --gutter: 18px; }
  .page-split, .audit-grid, .split { grid-template-columns: 1fr; }
  .profile-grid, .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-layout { grid-template-columns: minmax(0, 1fr) minmax(230px, .6fr); gap: 18px; }
  .news-source-panel { padding-left: 16px; }
}
@media (max-width: 900px) {
  .terminal-shell { grid-template-columns: 1fr; }
  .terminal-left, .terminal-center, .terminal-right { grid-column: auto; grid-row: auto; align-self: start; }
  .terminal-center { order: 0; } .terminal-right { order: 1; } .terminal-left { order: 2; grid-template-columns: 1fr; }
  .right-sticky { position: static; max-height: none; }
  .right-sticky > .card.ts-dialogue { overflow: visible; }
  .ts-dialogue .dialogue { max-height: 60vh; }
  .grid { grid-template-columns: 1fr; }
  .terminal-duo, .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .page-sub { text-align: left; flex-basis: 100%; }
}
@media (max-width: 650px) {
  .terminal-trio, .review-scores, .profile-grid, .task-grid { grid-template-columns: 1fr; }
  .news-layout { grid-template-columns: 1fr; }
  .news-source-panel { border-left: 0; border-top: .5px solid var(--sep); padding: 14px 0 0; }
  .runtime-meta, .runtime-node-columns { grid-template-columns: 1fr; }
  .account-metrics.full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-chart { min-height: 320px; }
}
@media (max-width: 520px) {
  :root { --gutter: 14px; }
  body { padding-top: var(--mobile-risk-height, 220px); }
  header.top { position: relative; }
  .bar { padding-top: 8px; padding-bottom: 8px; }
  .bar-status { justify-content: flex-start; margin-left: 0; }
  .bar-status { flex-wrap: nowrap; gap: 4px; overflow: hidden; }
  .bar-status .pill, .bar-status .broker-entry.btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto;
    height: auto; min-height: 26px; padding: 3px 8px; font-size: 11.5px; line-height: 1.3; }
  .pill, .broker-entry.btn { height: auto; min-height: 26px; padding-top: 3px; padding-bottom: 3px; line-height: 1.3; }
  .bar-status { flex-wrap: wrap; row-gap: 4px; }
  .bar-status .pill, .bar-status .broker-entry.btn { overflow: visible; text-overflow: clip; max-width: 100%; }
  .bar-status .pill-long { display: none; }
  .bar-status .pill-short { display: inline; }
  .mobile-risk-meta .status-strip { flex-wrap: wrap; row-gap: 2px; }
  .mobile-risk-meta .status-strip .status-facts { flex: 1 0 100%; order: 3; text-align: left; white-space: normal; overflow: visible; }
  .mobile-risk-meta .status-strip .status-text { flex: 1 1 0; min-width: 0; }
  html .switch { width: 64px; height: 40px; border-radius: 20px; }
  html .switch .knob { width: 36px; height: 36px; }
  html .switch.on .knob { transform: translateX(24px); }
  .settings-row.cabin-auth { display: flex; align-items: center; gap: 16px; padding: 8px 0; }
  .settings-row.cabin-auth .switch { margin: 0 4px 0 0; }
  .page-head { padding-top: 14px; }
  .page-title { font-size: 24px; }
  .riskdock { position: static; padding: 0 var(--gutter); background: none; }
  #riskbar { display: none; }
  #banner { margin: 6px 0 8px; }
  .hero-state strong { font-size: 32px; }
  .terminal-duo { grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-risk {
    display: block; position: fixed; inset: 0 0 auto 0; z-index: 50;
    background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    border-bottom: .5px solid var(--sep-strong); box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  }
  .mobile-risk-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px 5px; font-size: 11.5px; color: var(--label); }
  .mobile-risk-meta b { font-weight: 600; }
  .mobile-risk-meta .status-strip .status-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .risk-details { padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .mobile-risk-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .mobile-risk-grid > div { position: relative; min-width: 0; padding: 6px 10px 7px 32px; border-top: .5px solid var(--sep); font-size: 11.5px; line-height: 1.35; }
  .mobile-risk-grid > div:nth-child(odd) { border-right: .5px solid var(--sep); }
  .mobile-risk-grid b { display: block; margin-bottom: 1px; font-size: 10.5px; font-weight: 600; color: var(--label-2); }
  .mobile-risk-grid .risk-value { white-space: pre-line; -webkit-line-clamp: 4; }
  .mobile-risk-grid .risk-mark { left: 10px; top: 8px; width: 15px; height: 15px; }
  .modal { border-radius: 18px; }
  .toast { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--surface); --glass-thick: var(--surface); --toolbar-bg: var(--bg); }
  header.top, .risk, .modal, .toast, .mobile-risk, .modal-back, .banner { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --sep: rgba(127, 127, 127, .45); --sep-strong: rgba(127, 127, 127, .7); --label-2: color-mix(in srgb, var(--label) 82%, transparent); }
}

.setting-group { margin-top: 16px; }
.card > h2 + .setting-group { margin-top: 8px; }
.setting-header { margin: 0 14px 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--label-2); }
.setting-list { border-radius: var(--r-md); background: var(--surface-2); box-shadow: 0 0 0 .5px var(--sep); overflow: hidden; }
.setting-list > * { position: relative; }
.setting-list > * + *::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; height: .5px; background: var(--sep); }
.setting-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 9px 14px; }
.setting-text { flex: 1 1 auto; min-width: 0; }
.setting-title { font-size: 13.5px; line-height: 1.3; color: var(--label); }
.setting-sub { margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--label-2); overflow-wrap: anywhere; }
.setting-row.warn .setting-sub { color: var(--orange-ink); }
.setting-control { flex: none; display: flex; align-items: center; gap: 8px; }
.setting-control .btn { min-height: 28px; padding: 4px 12px; font-size: 12px; }
.setting-footer { margin: 6px 14px 0; font-size: 11px; line-height: 1.5; color: var(--label-3); }
.setting-form { display: grid; gap: 8px; padding: 10px 14px 12px; }
.setting-form .meta { margin: 0; }
.switch { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border: 0; border-radius: 13px; background: var(--fill-1);
  cursor: pointer; transition: background-color .25s var(--ease); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 0 0 .5px rgba(0, 0, 0, .04); transition: transform .25s var(--ease-out); }
.switch.on { background: var(--green); }
.switch.on.red { background: var(--red); }
.switch.on .knob { transform: translateX(18px); }
.switch:disabled { opacity: .4; cursor: not-allowed; }
.switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.modal .alert-input { margin: 0 0 14px; }
.modal .alert-input input { width: 100%; box-sizing: border-box; text-align: center; font-family: var(--mono); }
@media (prefers-reduced-motion: reduce) { .switch, .switch .knob { transition: none; } }

.lab-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn.primary.lab-start { min-height: 40px; padding: 0 26px; font-size: 15px; font-weight: 600; }
.lab-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lab-progress strong { font-size: 14px; font-weight: 600; }
.lab-chart-wrap { display: grid; gap: 6px; min-width: 0; }
.lab-caption { min-height: 1.5em; overflow-wrap: anywhere; }
.lab-placeholder { display: grid; place-items: center; padding: 16px; color: var(--label-2); text-align: center; }
.lab-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.lab-legend i { display: inline-block; width: 18px; height: 0; margin-right: 6px; vertical-align: middle; border-top: 2px solid var(--chart-ma-1); }
.lab-legend i.dashed { border-top: 2px dashed var(--chart-ma-2); }
.lab-legend i.dot { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--chart-level); }
table.lab-trades td { white-space: nowrap; }
table.lab-trades td:last-child { min-width: 9em; white-space: normal; }
.lw-chart.lab-chart.lab-stack { height: 560px; }
.lab-verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.lab-reading { display: grid; gap: 3px; padding: 10px 12px; border-radius: var(--r-md); box-shadow: inset 0 0 0 .5px var(--sep-strong); }
.lab-reading strong { font: 600 22px/1.25 var(--font-display); }
.lab-viz { display: block; width: 100%; height: auto; margin: 4px 0; }
.lab-viz text { fill: var(--chart-text); font-family: var(--font); font-size: 11px; }
.lab-viz text.strong { fill: var(--label); font-weight: 600; }
.lab-viz text.faint { fill: var(--label-3); }
.lab-viz .grid { stroke: var(--chart-grid); stroke-width: 1; }
.lab-viz .zero { stroke: var(--chart-axis); stroke-width: 1; }
.lab-viz .mean { stroke: var(--chart-ma-1); stroke-width: 1.5; }
.lab-viz .mean.dashed { stroke-dasharray: 4 3; }
.lab-viz .bar-strong { fill: var(--chart-ma-1); }
.lab-viz .bar-mid { fill: var(--chart-ma-2); }
.lab-viz .bar-soft { fill: var(--chart-ma-3); }
.lab-viz rect:hover { opacity: .72; }
.lab-viz .band-soft { fill: var(--chart-band); }
.lab-viz .band-strong { fill: var(--chart-volume); }
.lab-viz .path-strong { fill: none; stroke: var(--chart-ma-1); stroke-width: 2; stroke-linejoin: round; }
.lab-viz .path-faint { fill: none; stroke: var(--chart-ma-3); stroke-width: 1; }
.lab-legend i.box { width: 11px; height: 11px; border-top: 0; border-radius: 3px; background: var(--chart-ma-1); }
.lab-legend i.box.mid { background: var(--chart-ma-2); }
.lab-legend i.box.soft { background: var(--chart-ma-3); }
.lab-legend i.box.faint { background: var(--chart-band); box-shadow: inset 0 0 0 .5px var(--sep-strong); }
table.lab-years th, table.lab-years td { text-align: right; white-space: nowrap; }
table.lab-years th:first-child, table.lab-years td:first-child { text-align: left; }
table.lab-years td.strong { font-weight: 600; }
table.lab-months td { padding: 6px 5px; font-size: 12px; }
table.lab-months td.neg { font-style: italic; }
.lab-pick { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--accent-ink); text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: normal; }
table.lab-compare td:first-child { min-width: 11em; white-space: normal; }
table.lab-compare td.neg { font-style: italic; }
table.lab-compare .faint { color: var(--label-3); font-size: 11px; }
.lab-viz .path-mid { fill: none; stroke: var(--chart-ma-2); stroke-width: 1.6; stroke-linejoin: round; }
.lab-viz .dashed { stroke-dasharray: 6 4; }
.lab-viz .dotted { stroke-dasharray: 2 4; }
.lab-viz .band-in { fill: var(--chart-band); }
.lab-legend i.dotted { border-top: 2px dotted var(--chart-level); }
.lab-legend i.mid { border-top: 2px solid var(--chart-ma-2); }
.lab-families { display: grid; gap: 12px; }
.lab-family-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.lab-family-head strong { font-size: 14px; }
.lab-profile { margin: 12px 0 4px; padding: 10px 12px; border-radius: var(--r-md); box-shadow: inset 0 0 0 .5px var(--sep-strong); }
.lab-profile-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.lab-profile .kv b { color: var(--label); font-weight: 600; }
.lab-layers { margin: 10px 0 0; line-height: 1.9; }
table.lab-pools tr.lab-fee td { background: var(--fill-2, rgba(127, 127, 127, .08)); }
table.lab-pools tr.lab-sub td:first-child, table.lab-pools tr.lab-sub td:nth-child(2) { color: var(--label-2); }
table.lab-pools td:nth-child(2), table.lab-pools th:nth-child(2) { min-width: 9em; white-space: normal; text-align: left; }
table.lab-pools td:last-child, table.lab-pools th:last-child { min-width: 9em; white-space: normal; text-align: left; }
table.lab-pools tr.lab-sub td:first-child { padding-left: 1.6em; }
table.lab-matrix td { min-width: 7.5em; text-align: left; vertical-align: top; }
table.lab-matrix td .strong { font-weight: 600; }
@media (max-width: 520px) {
  .btn.primary.lab-start { width: 100%; }
  .lw-chart.lab-chart { height: 280px; }
  .lw-chart.lab-chart.lab-stack { height: 460px; }
}
.group-nav { margin: 0 0 4px; }
.today-wait { padding: 10px 12px; border-radius: var(--r-md); background: var(--fill-4); color: var(--label-2); }
.today-line { margin: 10px 0 4px; }
.today-red { color: var(--red-ink, var(--red)); margin: 8px 0 0; }
.today-warn { color: var(--orange-ink, var(--orange)); margin: 8px 0 0; }
.today-nods { margin: 4px 0 0; padding-left: 1.2em; }
.today-nods li { margin: 0 0 8px; }
.today-gm > summary { cursor: pointer; color: var(--label-2); }
table.today-list td:nth-child(3), table.today-list td:nth-child(4) { white-space: normal; min-width: 8em; }
table.today-list td:nth-child(2) { white-space: nowrap; }
table.today-v1 td:first-child { white-space: nowrap; }
table.today-v1 td:nth-child(2), table.today-v1 td:nth-child(3) { white-space: normal; min-width: 9em; }
.today-focus { margin: 10px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--fill-4); }
.today-focus p { margin: 4px 0; }
table.today-v1 td:nth-child(3) .tag { margin: 0 4px 2px 0; }

tr.scard-row > td { background: var(--fill-4); padding: 10px 12px; white-space: normal; }
table.today-v1 tr.scard-row > td:first-child, table.today-v1 tr.scard-row td { white-space: normal; }
table.today-v1 tr.scard-row table.scard-table td:first-child { white-space: nowrap; }
.scard h4 { margin: 14px 0 4px; font-size: 13.5px; }
.scard-head { margin: 0 0 6px; }
.earn-focus { position: sticky; top: calc(var(--header-h, 140px) + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--sep-strong);
  border-radius: var(--r-md); padding: 10px 12px; margin: 0 0 12px; box-shadow: var(--shadow-pop);
  max-height: calc(100vh - var(--header-h, 140px) - 24px); overflow: auto; }
.earn-up { color: var(--blue-ink); font-weight: 600; }
.earn-down { color: var(--red-ink); font-weight: 600; }
table.earn-table td { white-space: nowrap; }
table.scard-table td { white-space: normal; vertical-align: top; }
table.scard-table td:first-child { white-space: nowrap; }
.scard-news { margin: 4px 0; padding-left: 1.1em; }
.scard-news li { margin: 0 0 4px; }
.scard-chips { flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
table.scard-pool td:nth-child(5) { white-space: normal; min-width: 11em; }
table.scard-pool td:nth-child(4), table.scard-pool td:nth-child(10) { white-space: nowrap; }

.news-stock { padding: 12px 0; border-top: 1px solid var(--sep); }
.news-stock:first-of-type { border-top: 0; }
.news-stock p { margin: 0 0 6px; }
.news-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.news-links .btn { font-size: 12.5px; padding: 3px 9px; }
.news-stock .plain-list li { margin: 3px 0; line-height: 1.45; }
.cabin-curve { width: 100%; max-width: 560px; height: 90px; color: var(--blue); }
.cabin-group { margin: 10px 0 4px; }
.cabin-group > p { margin: 4px 0; }
.cabin-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cabin-chips .pill { margin: 0; white-space: nowrap; }
.cabin-books td, .cabin-books th { white-space: nowrap; }
.cabin-explain { margin: 4px 0 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.cabin-explain .plain-list { margin: 4px 0 0; }
td.cabin-why { white-space: normal; min-width: 160px; max-width: 340px; line-height: 1.45; }
table:has(td.cabin-why) td.mono, table:has(td.cabin-why) th { white-space: nowrap; }

.lab-pickers { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 10px 0 6px; }
.lab-pick-field { display: flex; flex-direction: column; gap: 4px; min-width: 240px; flex: 1 1 260px; }
.lab-pick-label { font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.lab-pick-field select { font: inherit; font-size: 14px; padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--sep-strong); background: var(--surface); color: var(--label); }
.lab-pick-x { font-size: 18px; color: var(--label-3); padding-bottom: 7px; }

@media (max-width: 560px) {
  nav.tabs { flex-wrap: wrap; overflow: visible; border-radius: 18px; justify-content: flex-start; }
  nav.tabs button { padding: 0 12px; }
}

.howto-steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.howto-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--fill-4); box-shadow: inset 0 0 0 .5px var(--sep); }
.howto-no { width: 26px; height: 26px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; display: grid; place-items: center; }
.howto-when { font-size: 12px; color: var(--label-2); }
.howto-title { font-weight: 700; margin: 1px 0 2px; }
.howto-step .meta { margin: 2px 0 6px; }
.howto-ask li { margin: 4px 0; line-height: 1.5; }
.howto-hint { margin: 0 0 -4px; }

.ops-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.ops-table td .meta { margin-top: 2px; font-size: 11.5px; line-height: 1.45; }
table.ops-table td.nowrap { white-space: nowrap; }
table.ops-table td:first-child { min-width: 9em; }
table.ops-table td .tag { margin-right: 2px; }
.stop-guide { margin: 0 0 16px; }
.stop-guide .setting-header { margin-left: 0; }
table.stop-table td:nth-child(2) { white-space: nowrap; }
.todo-due { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; font-size: 11.5px; line-height: 1.45; color: var(--label-2); }
.todo-due b { font-weight: 600; color: var(--label); }
details.todo-later > summary, details.old-system > summary { cursor: pointer; font-weight: 600; color: var(--label-2); }
details.old-system > .grid, details.todo-later > .setting-list { margin-top: 10px; }
.grouped-sections { gap: 6px 16px; }
.nav-section { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nav-section-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--label-2); }
.ai-paperclip-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
@media (max-width: 700px) {
  table.ops-table { font-size: 12px; }
  table.ops-table th, table.ops-table td { padding: 6px 5px; }
  table.ops-table td:first-child { min-width: 7em; }
  table.stop-table td:nth-child(2) { white-space: normal; }
  .nav-section { width: 100%; }
  .ops-table-wrap table.ops-table thead { display: none; }
  .ops-table-wrap table.ops-table tr { display: block; padding: 8px 0; border-bottom: .5px solid var(--sep); }
  .ops-table-wrap table.ops-table td { display: block; padding: 2px 0; border: 0; min-width: 0; }
  .ops-table-wrap table.ops-table td.nowrap { color: var(--label-2); font-size: 11.5px; }
  .ops-table-wrap table.ops-table td.no-when { display: none; }
}
table.stop-table tr.stop-bad td { background: color-mix(in srgb, var(--red) 9%, transparent); }
table.stop-table tr.stop-bad td b, table.stop-table .stop-warn { color: var(--red-ink); }
table.stop-table .stop-warn { font-weight: 600; }
.cabin-run .run-summary { margin: 0 0 6px; font-weight: 600; }
.only-mini { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.only-mini .meta { font-size: 11px; }
