/* Mother Console - design tokens, layout, components. Light and dark are both designed, not inverted. */
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/atkinson-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/atkinson-500.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/atkinson-600.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/atkinson-700.woff2) format("woff2"); }

/* Colour plan (60 / 30 / 10): cool neutrals carry the page (60), white cards sit on them (30), one indigo accent is for things you can tap (10).
   Meaning has its own colours that never mix with the accent: green = gain / working, red = loss / stopped, amber = look at this.
   Who took a trade has a triad that stays clear of those three: blue = EA, violet = AI, magenta = you. Every colour also has a text label,
   so nothing depends on colour alone. Dark mode is designed again, not inverted: softer surfaces, lighter tints. */
:root {
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
  --bg: #eef1f4; --surface: #ffffff; --surface-2: #e5eaee;
  --ink: #0f1a22; --muted: #505e69; --faint: #8593a0;
  --line: #d3dbe1; --line-soft: #e5eaee;
  --accent: #4538d4; --accent-ink: #ffffff; --accent-soft: #e6e3fb;
  --up: #0a7f5b; --up-soft: #d6f0e6;
  --down: #c62f2a; --down-soft: #f8dbd9;
  --warn: #8f5b00; --warn-soft: #fbebc4;
  --ea: #1565c0; --ea-soft: #dbe8fa;
  --ai: #7d3ae0; --ai-soft: #ece1fb;
  --man: #b0338a; --man-soft: #f7dcee;
  --chart-bg: #ffffff;
  --shadow: 0 1px 2px rgb(15 26 34 / 0.06), 0 2px 8px rgb(15 26 34 / 0.05);
  --nav-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1216; --surface: #161c21; --surface-2: #212a30;
    --ink: #eceeea; --muted: #9ba6ad; --faint: #6b777f;
    --line: #2a343b; --line-soft: #222b31;
    --accent: #a69cff; --accent-ink: #15112f; --accent-soft: #2a2650;
    --up: #46d9a6; --up-soft: #12332a;
    --down: #ff8077; --down-soft: #3b1d1b;
    --warn: #f3b650; --warn-soft: #3a2d12;
    --ea: #6fb0ff; --ea-soft: #14283f;
    --ai: #c4a6ff; --ai-soft: #2a1f45;
    --man: #f58fd0; --man-soft: #3d1c33;
    --chart-bg: #12171a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1216; --surface: #161c21; --surface-2: #212a30;
  --ink: #eceeea; --muted: #9ba6ad; --faint: #6b777f;
  --line: #2a343b; --line-soft: #222b31;
  --accent: #a69cff; --accent-ink: #15112f; --accent-soft: #2a2650;
  --up: #46d9a6; --up-soft: #12332a;
  --down: #ff8077; --down-soft: #3b1d1b;
  --warn: #f3b650; --warn-soft: #3a2d12;
  --ea: #6fb0ff; --ea-soft: #14283f;
  --ai: #c4a6ff; --ai-soft: #2a1f45;
  --man: #f58fd0; --man-soft: #3d1c33;
  --chart-bg: #12171a;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 16px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ic { display: block; flex: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 14px; }
.up { color: var(--up); }
.down { color: var(--down); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

[hidden] { display: none !important; }
/* ---------- frame ---------- */
#app { display: flex; flex-direction: column; height: 100dvh; max-width: 640px; margin: 0 auto; background: var(--bg); position: relative; }
@media (min-width: 700px) { #app { border-inline: 1px solid var(--line); } }
.top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 8px 4px 16px; background: var(--bg); min-height: 52px; }
.top h1 { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.top .back { text-decoration: none; display: inline-flex; align-items: center; gap: 2px; margin-left: -8px; padding: 8px 10px 8px 4px; color: var(--accent); font-weight: 600; min-height: 44px; }
#view { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 28px; -webkit-overflow-scrolling: touch; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tab { text-decoration: none; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--nav-h); padding: 8px 2px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 24%; right: 24%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 10px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- sections and lists ---------- */
.sec-title { margin: 24px 16px 8px; font-size: 15px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.sec-title small { font-weight: 500; font-size: 13px; color: var(--muted); margin-left: auto; }
.group { background: var(--surface); border-block: 1px solid var(--line); }
.group + .hint { margin: 8px 16px 0; }
.hint { color: var(--muted); font-size: 14px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; border-top: 1px solid var(--line-soft); width: 100%; text-align: left; }
.row:first-child { border-top: 0; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; }
.row .s { color: var(--muted); font-size: 14px; }
.row .v { font-weight: 600; text-align: right; white-space: nowrap; }
.row.big .v { font-size: 24px; letter-spacing: -0.01em; }
.row .ic.chev { color: var(--faint); }
button.row:active, a.row:active { background: var(--surface-2); }
a.row { color: inherit; text-decoration: none; }
.row .lead-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.pad { padding: 0 16px; }
.empty { display: flex; flex-direction: column; gap: 4px; padding: 28px 24px; text-align: center; color: var(--muted); }
.empty b { color: var(--ink); font-size: 17px; }

/* ---------- hero ---------- */
.hero { padding: 6px 16px 4px; }
.hero-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; background: var(--surface-2); color: var(--muted); }
.hero.ok .hero-mark { background: var(--up-soft); color: var(--up); }
.hero.warn .hero-mark { background: var(--warn-soft); color: var(--warn); }
.hero.bad .hero-mark { background: var(--down-soft); color: var(--down); }
.hero-line { font-size: 29px; line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
.hero-sub { margin-top: 8px; font-size: 17px; color: var(--muted); }
.hero-age { margin-top: 6px; font-size: 14px; color: var(--faint); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; background: var(--warn-soft); border-top: 1px solid var(--line-soft); }
.notice:first-child { border-top: 0; }
.notice.bad { background: var(--down-soft); }
.notice .ic { margin-top: 2px; color: var(--warn); }
.notice.bad .ic { color: var(--down); }
.notice b { display: block; }
.notice span { font-size: 14px; color: var(--muted); }

/* ---------- controls ---------- */
.seg { display: flex; gap: 2px; margin: 8px 16px 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { flex: 1; min-height: 40px; padding: 0 4px; white-space: nowrap; font-size: 15px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }
.chips { display: flex; gap: 8px; padding: 6px 16px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--down); border-color: var(--down); color: #fff; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--muted); }
.icon-btn:active { background: var(--surface-2); }
.switch { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; flex: none; }
.switch i { position: relative; width: 48px; height: 28px; border-radius: 14px; background: var(--faint); transition: background 0.15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch.on i { background: var(--accent); }
.switch.on i::after { transform: translateX(20px); }
.sw-txt { min-width: 24px; font-size: 13px; font-weight: 700; color: var(--muted); }
.switch.on .sw-txt { color: var(--accent); }
.switch.busy { opacity: 0.55; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select { min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); width: 100%; }
.field .help { font-size: 13px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.inline-set { display: flex; gap: 8px; align-items: center; }
.inline-set input { width: 92px; min-height: 40px; padding: 0 10px; text-align: right; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.ok { background: var(--up-soft); color: var(--up); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--down-soft); color: var(--down); }
.side { font-weight: 700; }
.side.buy { color: var(--up); }
.side.sell { color: var(--down); }

/* ---------- today ---------- */
.mini-trade { display: block; width: 100%; text-align: left; padding: 13px 16px; border-top: 1px solid var(--line-soft); }
.mini-trade:first-child { border-top: 0; }
.mini-trade .head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.mini-trade .head b { font-size: 17px; }
.mini-trade .pl { font-size: 18px; font-weight: 700; }

/* ---------- trade track ---------- */
.track { margin-top: 10px; }
.tk-bar { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: visible; }
.tk-bar i { position: absolute; top: 0; bottom: 0; }
.tk-loss { background: var(--down-soft); border-radius: 6px 0 0 6px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--down) 35%, transparent); }
.tk-gain { background: var(--up-soft); border-radius: 0 6px 6px 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up) 35%, transparent); }
.tk-loss.open, .tk-gain.open { background-image: repeating-linear-gradient(135deg, transparent 0 4px, var(--line) 4px 5px); }
.tk-entry { position: absolute; top: -4px; width: 2px; height: 20px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.tk-now { position: absolute; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 0 0 1.5px var(--ink); background: var(--faint); }
.tk-now.up { background: var(--up); }
.tk-now.down { background: var(--down); }
.tk-labels { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 10px; font-weight: 600; font-size: 14px; }
.tk-labels span:nth-child(2) { text-align: center; }
.tk-labels span:nth-child(3) { text-align: right; }
.tk-labels small { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tk-line { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- trades ---------- */
.trade { padding: 16px; border-top: 1px solid var(--line-soft); }
.trade:first-child { border-top: 0; }
.trade .head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.trade .head .name { font-size: 18px; }
.trade .pl { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.trade .meta { margin-top: 2px; font-size: 14px; color: var(--muted); }
.trade .actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-block: 1px solid var(--line); }
.summary div { padding: 12px 10px; text-align: center; border-left: 1px solid var(--line-soft); }
.summary div:first-child { border-left: 0; }
.summary small { display: block; font-size: 12.5px; color: var(--muted); }
.summary b { font-size: 18px; }
.day { padding: 14px 16px 6px; font-weight: 700; font-size: 15px; display: flex; justify-content: space-between; }
.day small { font-weight: 500; font-size: 13px; color: var(--muted); }
.deal { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft); width: 100%; text-align: left; }
.deal .main { flex: 1; min-width: 0; }
.deal .t { font-weight: 600; }
.deal .s { font-size: 14px; color: var(--muted); }
.deal .v { font-weight: 700; text-align: right; font-size: 17px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }

/* ---------- pairs ---------- */
.pair-row { display: flex; align-items: center; gap: 10px; padding: 14px 8px 14px 16px; border-top: 1px solid var(--line-soft); }
.pair-row:first-child { border-top: 0; }
.pair-row .open { flex: 1; min-width: 0; text-align: left; display: block; }
.pair-row .sym { font-size: 18px; font-weight: 700; }
.pair-row .px { font-size: 14px; color: var(--muted); }
.pair-row .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pair-row.off .sym { color: var(--muted); }
.wait { padding: 14px 16px; border-top: 1px solid var(--line-soft); }
.wait:first-child { border-top: 0; }
.wait .when { font-weight: 600; }
.wait .then { color: var(--muted); font-size: 15px; margin-top: 2px; }
.wait .note { font-size: 14px; color: var(--muted); margin-top: 6px; padding-left: 10px; border-left: 3px solid var(--line); }

/* ---------- charts ---------- */
.chart-card { display: block; width: 100%; text-align: left; background: var(--surface); border-block: 1px solid var(--line); margin-bottom: 12px; }
.chart-card .cc-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 4px; }
.chart-card .cc-head b { font-size: 17px; }
.chart-card .cc-head .chg { margin-left: auto; font-weight: 700; font-size: 15px; }
.chart-card .cc-sub { padding: 0 16px; font-size: 13.5px; color: var(--muted); }
.mini-chart { position: relative; height: 190px; margin-top: 4px; touch-action: pan-y; }
.mini-chart .cv { position: absolute; inset: 0; pointer-events: none; }
.pair-chart { position: relative; height: 240px; background: var(--chart-bg); }
.pair-chart .cv { position: absolute; inset: 0; }
.viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); max-width: 100%; }
.v-bar { display: flex; align-items: center; gap: 4px; padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 4px; }
.v-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; padding-left: 4px; }
.v-title b { font-size: 20px; }
.v-title span { color: var(--muted); font-size: 15px; }
.v-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 2px 10px 8px; }
.v-tools .brk { flex-basis: 100%; height: 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .v-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .v-tools::-webkit-scrollbar { display: none; }
  .v-tools .brk { display: none; }
  .v-tools .chip { flex: none; min-height: 34px; }
  .v-legend { display: none; }
  .v-bar { padding-top: 2px; padding-bottom: 0; }
}
.v-tools::-webkit-scrollbar { display: none; }
.v-tools .chip { min-height: 36px; padding: 0 13px; }
.v-tools .sep { width: 1px; align-self: stretch; margin: 6px 2px; background: var(--line); flex: none; }
.vc-area { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--chart-bg); border-block: 1px solid var(--line); }
.vc-pane { position: relative; flex: 1; min-height: 0; min-width: 0; }
.vc-pane + .vc-pane { border-top: 1px solid var(--line); }
@media (orientation: landscape) { .vc-area:has(.vc-pane + .vc-pane) { flex-direction: row; } .vc-pane + .vc-pane { border-top: 0; border-left: 1px solid var(--line); } }
.chev { color: var(--faint); display: inline-flex; }
.vc-pane .cv { position: absolute; inset: 0; }
.vc-tag { position: absolute; z-index: 3; top: 8px; left: 10px; display: flex; gap: 8px; align-items: baseline; padding: 3px 9px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 88%, transparent); font-size: 14px; font-weight: 700; pointer-events: none; }
.vc-tag span { color: var(--muted); font-weight: 500; }
.v-legend { padding: 8px 14px calc(env(safe-area-inset-bottom, 0px) + 8px); font-size: 13.5px; color: var(--muted); min-height: 38px; }
.v-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.v-legend i.dash { background-image: linear-gradient(90deg, currentColor 60%, transparent 60%); background-size: 6px 3px; background-color: transparent !important; }
.note-time { padding: 6px 16px 0; font-size: 13px; color: var(--faint); }

/* ---------- messages, ai, news ---------- */
.msg { padding: 13px 16px; border-top: 1px solid var(--line-soft); }
.msg:first-child { border-top: 0; }
.msg time { font-size: 13px; color: var(--muted); }
.msg p { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.err p { color: var(--down); }
.kb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kb button { min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 600; font-size: 14px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 54px; padding: 0 16px; margin: 6px 0 4px; }
.bars i { flex: 1; min-width: 3px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: 0.85; }
.bars i.e { background: var(--down); }
.rq { width: 100%; text-align: left; padding: 12px 16px; border-top: 1px solid var(--line-soft); display: block; }
.rq:first-child { border-top: 0; }
.rq .head { display: flex; justify-content: space-between; gap: 10px; }
.rq .head b { font-weight: 600; }
.rq .detail { margin-top: 8px; font-size: 14px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.rq .detail b { color: var(--ink); }
.nr { display: flex; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.nr:first-child { border-top: 0; }
.nr .when { width: 64px; flex: none; font-weight: 700; }
.nr .when small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.nr .what { flex: 1; min-width: 0; }
.nr .vals { font-size: 14px; color: var(--muted); margin-top: 2px; }
.nr.past { opacity: 0.55; }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.dots u { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots.i1 u:nth-child(-n+1), .dots.i2 u:nth-child(-n+2), .dots.i3 u:nth-child(-n+3) { background: var(--warn); }
.dots.i3 u { background: var(--down); }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--surface); border-block: 1px solid var(--line); }
.stat-grid div { padding: 13px 16px; border-top: 1px solid var(--line-soft); }
.stat-grid div:nth-child(-n+2) { border-top: 0; }
.stat-grid div:nth-child(even) { border-left: 1px solid var(--line-soft); }
.stat-grid small { display: block; font-size: 13px; color: var(--muted); }
.stat-grid b { font-size: 19px; }

/* ---------- sheet, toast, activity ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgb(8 12 14 / 0.5); opacity: 0; transition: opacity 0.2s; }
.scrim.open { opacity: 1; }
.sheet { position: fixed; z-index: 90; left: 50%; bottom: 0; width: min(100%, 640px); max-height: 88dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px 22px 0 0; transform: translate(-50%, 100%); transition: transform 0.22s ease-out; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -8px 30px rgb(0 0 0 / 0.25); }
.sheet.open { transform: translate(-50%, 0); }
.sheet.tall { height: 80dvh; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
.sheet header { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0 20px; }
.sheet h2 { font-size: 19px; }
.sheet-body { padding: 8px 20px 16px; overflow-y: auto; }
.sheet footer { display: flex; gap: 10px; padding: 10px 20px 16px; border-top: 1px solid var(--line-soft); }
.sheet footer .btn { flex: 1; }
.lead { font-size: 17px; }
.result { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 15px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.result-state { font-weight: 700; }
.result-state.error { color: var(--down); }
.result-state.warn { color: var(--warn); }
.result-state.done { color: var(--up); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 74px); transform: translate(-50%, 12px); max-width: min(92vw, 520px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--down); color: #fff; }
.activity { position: absolute; z-index: 20; left: 12px; right: 12px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 10px); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.act { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--bg) 35%, transparent); border-top-color: var(--bg); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- connect screen ---------- */
.connect { padding: 36px 20px; max-width: 460px; margin: 0 auto; }
.connect h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; }
.connect p { margin-top: 10px; color: var(--muted); }

/* ---------- landscape phones ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --nav-h: 46px; }
  .top { padding-top: calc(env(safe-area-inset-top, 0px) + 6px); padding-bottom: 6px; min-height: 46px; }
  .top h1 { font-size: 19px; }
  .tab { flex-direction: row; gap: 7px; padding: 4px; }
  .hero-line { font-size: 24px; }
  .toast { bottom: calc(var(--nav-h) + 14px); }
  .v-bar { padding-top: 4px; }
  .v-title b { font-size: 18px; }
  .mini-chart { height: 170px; }
  #view .chart-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; padding: 0 12px; }
}
@media (min-width: 700px) { #view .chart-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; padding: 0 12px; } .chart-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.inline-field { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.inline-field input { min-height: 40px; width: 84px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.inline-field input[type=time] { width: auto; }
.inline-field.wide { margin-top: 0; font-size: 16px; color: var(--ink); }

/* ---- Learning, Market memory ---- */
.sub-title { margin: 18px 16px 6px; font-size: 13.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.sub-title small { text-transform: none; font-weight: 500; margin-left: 6px; }
.ffun { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.fstep { background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.fstep span { font-size: 14px; color: var(--muted); }
.fstep b { font-size: 28px; letter-spacing: -.01em; }
.fstep small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.fbar { height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.fbar i { display: block; height: 100%; border-radius: 5px; background: var(--c, var(--accent)); }
.fbar.sm { height: 6px; min-width: 60px; }
.pcount { display: flex; gap: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pcount span { min-width: 22px; text-align: right; }
.up { color: var(--up); } .down { color: var(--down); }
.smp { border-top: 1px solid var(--line-soft); }
.smp:first-child { border-top: 0; }
.smp-h { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 16px; text-align: left; }
.smp-h .s { color: var(--muted); font-size: 14px; }
.smp-b { padding: 0 16px 14px; }
.smp-b .s { font-size: 14px; }
.wrap-x { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; background: var(--surface); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; background: var(--surface); }
.raw { max-height: 320px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; }
details > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
.learn, .mem { padding-bottom: 28px; }
.sel { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 0 10px; }
.verdict { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.verdict b { font-size: 20px; }
.verdict.BULL b { color: var(--up); } .verdict.BEAR b { color: var(--down); }
.upbar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.upbar i.u { background: var(--up); } .upbar i.d { background: var(--down); }
.mut { color: var(--muted); }
.mem .tbl td.mut, .learn .tbl td.mut { color: var(--muted); }
.dbx { padding-left: 12px; padding-right: 12px; }
.dbx-saw { padding-left: 8px; padding-right: 8px; }

/* =====================================================================================================
   Status: one dot at the top right, one small box under the title
   ===================================================================================================== */
.dotwrap { display: inline-flex; flex: none; }
.dotbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.dotbtn:active { background: var(--surface-2); }
.sdot { --pc: var(--faint); position: relative; display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }
.sdot.big { width: 14px; height: 14px; }
.ok > .sdot, .ok .sdot { --pc: var(--up); animation: pulse 2.6s ease-out infinite; }
.warn > .sdot, .warn .sdot { --pc: var(--warn); animation: pulse 1.8s ease-out infinite; }
.bad > .sdot, .bad .sdot { --pc: var(--down); animation: pulse 0.9s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pc) 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.stripwrap { padding: 0 16px 8px; }
.stripwrap:empty { display: none; }
.strip { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 0 8px 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 13.5px; }
.strip b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.strip .st-t { white-space: nowrap; font-weight: 700; font-size: 13px; color: var(--muted); }
.strip .st-t small { font-weight: 500; opacity: 0.85; font-size: 12px; }
.strip .st-c { color: var(--faint); display: inline-flex; }
.strip.ok { background: var(--up-soft); border-color: color-mix(in srgb, var(--up) 28%, transparent); }
.strip.ok .st-t { color: var(--up); }
.strip.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.strip.warn .st-t { color: var(--warn); }
.strip.bad { background: var(--down-soft); border-color: color-mix(in srgb, var(--down) 45%, transparent); min-height: 40px; }
.strip.bad b { white-space: normal; }
.strip.bad .st-t { color: var(--down); }
.stb { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.stb b { display: block; }
.stb span { display: block; font-size: 14px; color: var(--muted); }
.stb.ok { background: var(--up-soft); } .stb.warn { background: var(--warn-soft); } .stb.bad { background: var(--down-soft); }
body.gated .top .dotwrap { display: none; }

/* =====================================================================================================
   Number tiles
   ===================================================================================================== */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.kpi small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi b { display: block; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi .kd { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k3 .kpi b { font-size: 18px; }
.k4 .kpi { padding: 8px 9px; } .k4 .kpi b { font-size: 16px; } .k4 .kpi small { font-size: 11.5px; }
.kpi.big b { font-size: 27px; }
.kpi.good { background: color-mix(in srgb, var(--up-soft) 60%, var(--surface)); } .kpi.good b { color: var(--up); }
.kpi.bad { background: color-mix(in srgb, var(--down-soft) 60%, var(--surface)); } .kpi.bad b { color: var(--down); }
.kpi.warn { background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); } .kpi.warn b { color: var(--warn); }

/* =====================================================================================================
   Trade boxes (open and closed), source badges
   ===================================================================================================== */
.cardlist { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.src-ai { --c: var(--ai); --cs: var(--ai-soft); } .src-ea { --c: var(--ea); --cs: var(--ea-soft); } .src-man { --c: var(--man); --cs: var(--man-soft); }
.tcard, .ccard { display: block; width: 100%; text-align: left; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: 14px; box-shadow: var(--shadow); }
.ccard:active { background: var(--surface-2); }
.tcard header, .ccard .ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; }
.tsym { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.tsym b { font-size: 18px; }
.tpl { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.tmeta { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; margin-top: 10px; font-size: 14px; font-weight: 600; }
.tgrid small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.tcard .actions { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tcard .track { margin-top: 10px; }
.src { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; background: var(--cs, var(--surface-2)); color: var(--c, var(--muted)); }
.src.ai { --c: var(--ai); --cs: var(--ai-soft); } .src.ea { --c: var(--ea); --cs: var(--ea-soft); } .src.man { --c: var(--man); --cs: var(--man-soft); }
.chip.c-ai[aria-pressed="true"] { background: var(--ai); border-color: var(--ai); color: var(--bg); }
.chip.c-ea[aria-pressed="true"] { background: var(--ea); border-color: var(--ea); color: var(--bg); }
.chip.c-man[aria-pressed="true"] { background: var(--man); border-color: var(--man); color: var(--bg); }

/* who took the trades: three small boxes */
.who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 16px; }
.wbox { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 9px 9px 8px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 12px; }
.wt { font-size: 12px; font-weight: 800; color: var(--c); line-height: 1.2; }
.wn { font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; }
.wsub { font-size: 11.5px; color: var(--muted); line-height: 1.25; min-height: 29px; }
.wrate { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; font-size: 12.5px; font-weight: 600; }
.wfoot { margin-top: 4px; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.who-note { margin: 8px 16px 0; font-size: 14px; color: var(--muted); }

/* =====================================================================================================
   Tables
   ===================================================================================================== */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-block: 1px solid var(--line); }
.tbl.big th, .tbl.big td { padding: 8px 10px; }
.tbl.full { min-width: 100%; }
.tbl .stick0, .tbl .stick1 { position: sticky; z-index: 1; background: var(--surface); }
.tbl .stick0 { left: 0; min-width: 104px; max-width: 104px; overflow: hidden; text-overflow: ellipsis; }
.tbl .stick1 { left: 104px; box-shadow: 1px 0 0 var(--line); }
.tbl tr[class*="src-"] td:first-child { box-shadow: inset 3px 0 0 var(--c); }
.tbl td.up { color: var(--up); } .tbl td.down { color: var(--down); }
.vtoggle { display: flex; gap: 2px; margin: 8px 16px 4px; padding: 3px; border-radius: 12px; background: var(--surface-2); width: fit-content; margin-left: auto; }
.vtoggle button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.vtoggle button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }
.link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95em; }

/* =====================================================================================================
   Performance
   ===================================================================================================== */
.perf-hero { display: flex; flex-direction: column; padding: 8px 16px 0; }
.perf-hero small { color: var(--muted); font-size: 13.5px; }
.perf-hero b { font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; }
.perf-hero b span { font-size: 16px; font-weight: 600; color: var(--muted); }
.chart-box { position: relative; margin: 10px 16px; padding: 8px 4px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.chart-box .empty { padding: 20px; }
svg.curve { display: block; touch-action: pan-y; }
.curve text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.curve line { stroke: var(--line); stroke-width: 1; }
.curve line.zero { stroke: var(--faint); stroke-dasharray: 3 3; }
.curve line.cur-l { stroke: var(--ink); opacity: 0.45; }
.curve .cur-d { fill: var(--ink); stroke: var(--surface); stroke-width: 2; }
.curve-tip { position: absolute; top: 8px; width: 180px; padding: 6px 9px; border-radius: 9px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; line-height: 1.35; pointer-events: none; }

/* =====================================================================================================
   Pairs
   ===================================================================================================== */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.pcard .open { display: block; width: 100%; padding: 12px 14px 8px; text-align: left; }
.pcard .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pcard .sym { font-size: 18px; }
.pcard .px { font-weight: 700; }
.pcard .px small { margin-left: 6px; font-weight: 500; color: var(--muted); }
.pcard .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pcard.off .sym { color: var(--muted); }
.ailine { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.ailine em { flex-basis: 100%; font-style: normal; color: var(--muted); }
.ailine.work { background: var(--ai-soft); color: var(--ai); font-weight: 600; }
.ailine.work.big { margin: 10px 16px 0; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--ai) 35%, transparent); border-radius: 12px; }
.psw { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-soft); }
.psw > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 14px; }
.psw > div + div { border-left: 1px solid var(--line-soft); }
.psw small { font-size: 12.5px; color: var(--muted); line-height: 1.25; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; border-color: color-mix(in srgb, var(--ai) 28%, transparent); border-top-color: var(--ai); }

/* =====================================================================================================
   Activity, explanations, charts viewer
   ===================================================================================================== */
.askbar { display: flex; gap: 8px; padding: 10px 16px 4px; }
.askbar input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.why { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); font-size: 14px; }
.why .ic { color: var(--warn); margin-top: 2px; }
.rq.bad { box-shadow: inset 3px 0 0 var(--down); }
.rq-res { margin-top: 3px; font-size: 14px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.v-info { display: flex; gap: 16px; padding: 2px 14px 6px; overflow-x: auto; scrollbar-width: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.v-info::-webkit-scrollbar { display: none; }
.v-info small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.v-legend i.lg.up { background: var(--up); } .v-legend i.lg.down { background: var(--down); } .v-legend i.lg.dash { color: var(--accent); }
.zone-cv { position: absolute; inset: 0; }

/* =====================================================================================================
   First-run setup
   ===================================================================================================== */
.setup { max-width: 460px; margin: 0 auto; padding: 28px 20px 40px; }
.setup-mark { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); }
.setup h2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; }
.setup > p { margin-top: 8px; }
.setup .field small { font-size: 13px; line-height: 1.35; }
.keybox { display: flex; gap: 8px; }
.keybox input { flex: 1; min-width: 0; }
.keybox .btn { min-height: 46px; }
.setup .notice { margin-top: 14px; border-radius: 12px; border: 1px solid var(--line); }
.setup-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: var(--faint); font-size: 14px; }
.setup-or::before, .setup-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* =====================================================================================================
   App lock
   ===================================================================================================== */
body.is-locked #app, body.is-locked #viewer-root { visibility: hidden; }
.lockscreen { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: center; overflow-y: auto; background: var(--bg); padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.lk-in { width: min(100%, 360px); display: flex; flex-direction: column; align-items: center; padding: 8px 24px 24px; text-align: center; }
.lk-top { align-self: stretch; display: flex; min-height: 48px; }
.lk-mark { width: 56px; height: 56px; margin: 4px 0 12px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lk-in h1 { font-size: 22px; }
.lk-sub { min-height: 22px; margin-top: 4px; color: var(--muted); }
.lk-dots { display: flex; gap: 14px; margin: 20px 0 6px; }
.lk-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); }
.lk-dots i.on { background: var(--accent); border-color: var(--accent); }
.lk-dots.bad i { border-color: var(--down); animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.lk-msg { min-height: 22px; font-size: 14px; color: var(--muted); }
.lk-msg.bad { color: var(--down); font-weight: 600; }
.lk-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; margin-top: 10px; }
.lk-pad button { height: 64px; border-radius: 20px; font-size: 26px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.lk-pad button:active { background: var(--accent-soft); }
.lk-pad button.alt { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); display: grid; place-items: center; }
.lk-pad button.alt.small { font-size: 14px; }
.lk-link { margin-top: 14px; color: var(--accent); font-weight: 600; min-height: 44px; }

/* the dot and strip stay compact in landscape */
@media (orientation: landscape) and (max-height: 520px) {
  .stripwrap { padding-bottom: 4px; }
  .strip { min-height: 30px; }
  .kpis.k4 .kpi b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .sdot { animation: none !important; } }
.tgrid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg button { flex: 1 1 auto; font-size: 14px; padding: 0 6px; }
.ailine.work.big { flex-wrap: nowrap; }
.strip.bad .st-t { font-size: 12.5px; }

/* swap guard */
.swapnote { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--ea-soft); color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.swapnote .ic, .swapnote svg { flex: none; margin-top: 1px; color: var(--ea); }
.swapnote.hot { background: var(--warn-soft); }
.swapnote.hot .ic, .swapnote.hot svg { color: var(--warn); }
