/* InvestBot: tiles, charts, light and dark themes. Theme follows the device unless chosen in Settings. */
:root {
  color-scheme: light;
  --bg: #f2f4f7; --card: #ffffff; --card-2: #f7f8fa; --ink: #101828; --muted: #5b6577; --faint: #8a93a3;
  --line: #e4e7ec; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 2px 8px rgba(16,24,40,.06);
  --brand: #0e7a5f; --brand-2: #0b5d73; --brand-ink: #ffffff; --brand-soft: #e3f4ee;
  --good: #0f7a43; --warn: #9a5b00; --bad: #c4312f;
  --good-bg: #e7f6ee; --warn-bg: #fdf3e1; --bad-bg: #fdeceb;
  --gain: #12924f; --loss: #d03b3b;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s-cash: #a3a9b5;
  --grid: #eceff3; --nav: rgba(255,255,255,.92);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0f14; --card: #141a21; --card-2: #1a2129; --ink: #eef2f6; --muted: #a3adbb; --faint: #7c8796;
    --line: #262f3a; --shadow: 0 1px 2px rgba(0,0,0,.4);
    --brand: #34c69a; --brand-2: #2aa3c0; --brand-ink: #04140f; --brand-soft: #12302a;
    --good: #5fd39c; --warn: #f0b35a; --bad: #ff8a7a;
    --good-bg: #13261e; --warn-bg: #2b2213; --bad-bg: #2f1a19;
    --gain: #3ccf87; --loss: #ff6b6b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s-cash: #5d6672;
    --grid: #1f2730; --nav: rgba(20,26,33,.94);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14; --card: #141a21; --card-2: #1a2129; --ink: #eef2f6; --muted: #a3adbb; --faint: #7c8796;
  --line: #262f3a; --shadow: 0 1px 2px rgba(0,0,0,.4);
  --brand: #34c69a; --brand-2: #2aa3c0; --brand-ink: #04140f; --brand-soft: #12302a;
  --good: #5fd39c; --warn: #f0b35a; --bad: #ff8a7a;
  --good-bg: #13261e; --warn-bg: #2b2213; --bad-bg: #2f1a19;
  --gain: #3ccf87; --loss: #ff6b6b;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s-cash: #5d6672;
  --grid: #1f2730; --nav: rgba(20,26,33,.94);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.pill:empty { display: none; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); overflow-x: hidden; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; vertical-align: middle; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--nav);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -.01em; }
.logo { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #10a37f, #0b5d73); }
.logo svg.i { width: 18px; height: 18px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em;
  background: var(--brand-soft); color: var(--brand); text-transform: uppercase; }
.pill.live { background: var(--bad); color: #fff; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; background: none; border: 0; border-radius: 12px;
  color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--card-2); color: var(--ink); }
.install-btn { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.nav-label { display: none; }

main { max-width: 760px; margin: 0 auto; padding: 8px 16px 24px; }
h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 26px 2px 10px; }
h2 svg.i { width: 16px; height: 16px; }

/* Cards and tiles */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 12px 0;
  box-shadow: var(--shadow); }
.card.good { background: var(--good-bg); border-color: transparent; box-shadow: none; }
.card.warn { background: var(--warn-bg); border-color: transparent; box-shadow: none; }
.card.bad { background: var(--bad-bg); border-color: transparent; box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-head b { font-size: 15px; }
.big { font-size: 20px; font-weight: 750; margin: 0 0 4px; letter-spacing: -.01em; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 12.5px; }
.row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.row + .row { margin-top: 8px; }
.num { font-variant-numeric: tabular-nums; font-weight: 650; }
.up { color: var(--gain); } .down { color: var(--loss); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tiles.mini { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0 0 4px; }
.tile .t-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
.tile .t-value { font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .t-sub { font-size: 12.5px; color: var(--muted); }
.chip { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.chip svg.i { width: 17px; height: 17px; }
.chip.c1 { background: color-mix(in srgb, var(--s1) 14%, transparent); color: var(--s1); }
.chip.c2 { background: color-mix(in srgb, var(--s2) 14%, transparent); color: var(--s2); }
.chip.c3 { background: color-mix(in srgb, var(--s3) 16%, transparent); color: var(--s3); }
.chip.c4 { background: color-mix(in srgb, var(--s4) 16%, transparent); color: var(--s4); }
.chip.c5 { background: color-mix(in srgb, var(--s5) 16%, transparent); color: var(--s5); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.plain { background: var(--card-2); color: var(--muted); }

/* Hero: account value */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; margin: 12px 0; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #18b38a 0%, #0e7a5f 45%, #0b4f63 100%); box-shadow: 0 6px 20px rgba(14,122,95,.25); }
.hero .h-label { font-size: 13px; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: 8px; }
.hero .h-value { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.hero .h-delta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 650; padding: 4px 10px;
  border-radius: 999px; background: rgba(255,255,255,.16); }
.hero .h-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; }
.hero .h-row span { opacity: .8; } .hero .h-row b { font-variant-numeric: tabular-nums; }
.hero .h-badges { position: absolute; top: 16px; right: 16px; display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff; }
.badge svg.i { width: 13px; height: 13px; }
.hero .spark { display: none; position: absolute; right: 0; bottom: 0; width: 40%; height: 64px; opacity: .35; pointer-events: none; }

/* Lists */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 12px 0; border-top: 1px solid var(--line); } ul.plain li:first-child { border-top: 0; padding-top: 4px; }
.item { display: flex; gap: 12px; align-items: flex-start; }
.item > .body { flex: 1; min-width: 0; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: var(--card-2); color: var(--muted); margin-right: 6px; text-transform: capitalize; }
.tag.ENTRY, .tag.TRADE, .tag.HOLD { background: var(--good-bg); color: var(--good); }
.tag.EXIT, .tag.TIGHTEN, .tag.WATCH, .tag.REVIEW { background: var(--warn-bg); color: var(--warn); }
.tag.KILL_SWITCH, .tag.ERROR, .tag.NO_TRADE, .tag.CONSIDER_SELL, .review .tag.EXIT { background: var(--bad-bg); color: var(--bad); }
.tag.free { background: var(--brand-soft); color: var(--brand); }

/* Buttons and inputs */
button.primary, a.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand);
  color: var(--brand-ink); border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 650;
  text-decoration: none; cursor: pointer; }
button.primary:hover { filter: brightness(1.06); }
button.primary:disabled { opacity: .6; }
button.danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--bad); color: #fff;
  border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 650; cursor: pointer; width: 100%; }
button.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--ink); border-radius: 12px; padding: 11px 14px; font: inherit; font-weight: 550;
  cursor: pointer; width: 100%; }
button svg.i { width: 18px; height: 18px; }
select, input { font: inherit; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--ink); width: 100%; outline: none; }
select:focus, input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
input[type=file] { padding: 9px; }
.actions { display: grid; gap: 8px; margin-top: 12px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none;
  color: var(--muted); font: inherit; font-weight: 600; padding: 8px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* Bottom tabs (phone) */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--nav);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; background: none; border: 0; color: var(--faint); font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 4px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 12px; }
.tabs button .ti { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 999px; transition: background .15s; }
.tabs button.active { color: var(--brand); }
.tabs button.active .ti { background: var(--brand-soft); }

/* Login */
.login { max-width: 380px; margin: 14vh auto; padding: 0 16px; text-align: center; }
.login .logo { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; }
.login .logo svg.i { width: 30px; height: 30px; }
.login h1 { margin: 0 0 4px; letter-spacing: -.02em; }
.login p { color: var(--muted); }
.login input { margin: 12px 0; text-align: center; }
.login button { width: 100%; }
.error { color: var(--bad); }
.empty { color: var(--muted); text-align: center; padding: 22px 8px; font-size: 14px; }
.empty svg.i { display: block; margin: 0 auto 8px; width: 28px; height: 28px; color: var(--faint); }
details summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 600; margin-top: 10px; }
pre { white-space: pre-wrap; font: inherit; margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.card a { color: inherit; text-decoration-color: var(--line); }
.review { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
label.field { display: block; margin-top: 14px; font-size: 14px; font-weight: 550; }
label.field .muted { font-weight: 400; }
label.field input, label.field select { margin-top: 6px; }
#live-box p { font-size: 14px; }
#live-box input { margin-top: 8px; }
#live-box .danger { margin-top: 8px; }

/* Positions */
.pos-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: color-mix(in srgb, var(--s1) 14%, transparent); color: var(--s1); flex: none; letter-spacing: -.02em; }
.pos-head .body { flex: 1; min-width: 0; }
.pos-head .sym { font-size: 16px; font-weight: 750; }
.range { margin: 16px 2px 4px; }
.range .track { position: relative; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--loss) 0%, color-mix(in srgb, var(--loss) 25%, var(--card-2)) var(--at),
    color-mix(in srgb, var(--gain) 25%, var(--card-2)) var(--at), var(--gain) 100%); }
.range .mark { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--card); border: 3px solid var(--ink); }
.range .mark.half { width: 4px; height: 14px; border-radius: 2px; border: 0; background: var(--ink); opacity: .45; }
.range .labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.range .labels b { display: block; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.range .labels > div:nth-child(2) { text-align: center; } .range .labels > div:last-child { text-align: right; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.kv > div { background: var(--card-2); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.kv b { display: block; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Charts */
.chart { position: relative; width: 100%; min-height: 60px; }
.chart svg { display: block; overflow: visible; }
.chart text { font-size: 11px; fill: var(--faint); font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 2px; width: 14px; border-radius: 1px; }
.legend i.dash { height: 0; width: 14px; border-top: 2px dashed var(--s-cash); background: none !important; }
.tip { position: absolute; z-index: 3; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 10px;
  padding: 7px 10px; font-size: 12.5px; line-height: 1.35; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transform: translate(-50%, calc(-100% - 10px)); }
.tip b { font-variant-numeric: tabular-nums; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
.donut-legend { display: grid; gap: 8px; }
.donut-legend .row { margin: 0; align-items: center; font-size: 14px; }
.donut-legend .row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.stats-row > div { background: var(--card-2); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.stats-row b { display: block; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--loss), var(--card-2) 50%, var(--gain)); position: relative; margin: 12px 0 6px; }
.meter .mark { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--card); border: 3px solid var(--ink); }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; margin: 12px 0 4px; background: var(--card-2); }
.split-bar > i { display: block; height: 100%; }

/* Laptop: menu on the left, wider pages, more tiles per row */
@media (min-width: 900px) {
  body { padding-bottom: 0; padding-left: 240px; }
  .top { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 14px; padding: 22px 16px; border-bottom: 0; border-right: 1px solid var(--line);
    background: var(--card); backdrop-filter: none; }
  .top-actions { position: fixed; left: 0; bottom: 16px; width: 240px; padding: 0 16px; flex-direction: column; align-items: stretch; gap: 4px; }
  .top .icon-btn { width: auto; display: flex; justify-content: flex-start; gap: 12px; padding: 10px 12px; font: inherit; font-size: 14px; font-weight: 600; }
  .nav-label { display: inline; }
  .tabs { position: fixed; top: 86px; left: 0; bottom: auto; right: auto; width: 240px; flex-direction: column; gap: 2px;
    background: transparent; border: 0; padding: 0 12px; backdrop-filter: none; z-index: 6; }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); padding: 4px; }
  .tabs button .ti { width: 34px; height: 34px; border-radius: 10px; }
  .tabs button:hover { background: var(--card-2); }
  .tabs button.active { background: var(--brand-soft); color: var(--brand); }
  .tabs button.active .ti { background: transparent; }
  main { max-width: 1120px; padding: 20px 36px 56px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .duo { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; align-items: stretch; }
  .duo > .card { margin: 0; }
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pair > * { margin: 0; }
  .positions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .positions-grid > .card { margin: 0; }
  .actions { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .card:has(> label.field) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .card:has(> label.field) > :not(label.field) { grid-column: 1 / -1; }
  .hero { padding: 24px 26px 20px; } .hero .h-value { font-size: 40px; } .hero .spark { display: block; }
  .ks-bar, .update-bar { position: sticky; top: 0; z-index: 4; }
  .login { margin-top: 20vh; }
  .choices { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (max-width: 380px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .donut-legend { width: 100%; } }

/* Settings groups, two-line help text, compact number rows */
details.sect { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin: 10px 0; overflow: hidden; }
details.sect > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0; cursor: pointer;
  color: var(--ink); font-size: 15px; font-weight: 400; }
details.sect > summary::-webkit-details-marker { display: none; }
.sect summary .body { flex: 1; min-width: 0; }
.sect summary b { display: block; font-size: 15.5px; font-weight: 650; }
.sect summary .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sect .chev { color: var(--faint); transition: transform .2s; display: grid; }
.sect .chev svg.i { width: 18px; height: 18px; }
details.sect[open] > summary .chev { transform: rotate(90deg); }
.sect-body { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.sect-body > .card { border: 0; box-shadow: none; padding: 0; margin: 0; background: none; }
details.done-steps > summary { margin: 12px 0 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; margin-top: 2px; }
.clamp.open { display: block; }
.item .row b { font-weight: 650; }
label.field.inline { display: grid; grid-template-columns: 1fr 120px; column-gap: 14px; align-items: center; margin: 0;
  padding: 10px 0; border-top: 1px solid var(--line); }
label.field.inline:first-of-type { border-top: 0; }
label.field.inline .lbl { grid-column: 1; display: inline-flex; align-items: center; gap: 8px; }
label.field.inline .hint { grid-column: 1; font-size: 12.5px; color: var(--muted); font-weight: 400; }
label.field.inline input { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
label.field.inline .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
@media (min-width: 900px) {
  .sect-body:has(> label.field) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
  .sect-body:has(> label.field) > :not(label.field) { grid-column: 1 / -1; }
  label.field.inline:nth-of-type(2) { border-top: 0; }
}

/* Steps you can tap, and the questionnaire */
.step { cursor: pointer; transition: transform .1s; }
.step:active { transform: scale(.99); }
.go { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 14px; font-weight: 650; color: var(--brand); }
.todo { display: flex; gap: 12px; align-items: flex-start; }
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2);
  padding: 11px 12px; cursor: pointer; }
.choice input { width: auto; margin: 0; accent-color: var(--brand); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
#rq .card input[type=text] { margin-top: 12px; }
.qnum { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft);
  color: var(--brand); font-size: 13px; font-weight: 800; margin-right: 8px; }

.update-bar { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--warn-bg); color: var(--ink);
  padding: 10px 16px; font-size: 14px; font-weight: 600; }
.update-bar button { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 9px;
  padding: 6px 12px; font: inherit; font-weight: 650; cursor: pointer; }
.card.missing { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.q-err { margin-top: 8px; font-size: 14px; }

/* The trading switch */
.switch-card { display: flex; align-items: center; gap: 14px; }
.switch-card .body { flex: 1; min-width: 0; }
.switch-card .big { margin: 0; font-size: 18px; }
.switch-card .muted { font-size: 13px; }
.switch-card .actions { display: none; }
.switch-card.full { display: block; }
.switch-card.full .actions { display: grid; }
.switch-card.full .top-row { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.toggle { position: relative; width: 60px; height: 34px; border-radius: 999px; border: 0; background: var(--bad);
  cursor: pointer; flex: none; transition: background .15s; }
.toggle span { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on { background: var(--gain); }
.toggle.on span { left: 30px; }
.ks-bar { display: flex; align-items: center; justify-content: center; gap: 10px; background: #c4312f; color: #fff;
  padding: 10px 16px; font-size: 14px; font-weight: 650; }
.ks-bar button { background: #fff; color: #c4312f; border: 0; border-radius: 9px; padding: 6px 12px;
  font: inherit; font-weight: 750; cursor: pointer; }
.ai-row { border-top: 1px solid var(--line, #e5e5e5); padding: 8px 0; }
.ai-row summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; color: inherit; }
.ai-row summary label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ai-row .ai-move { margin-left: auto; display: inline-flex; gap: 4px; }
.ai-row .ai-move button { padding: 2px 10px; min-width: 0; }
.ai-row input.ai-key, .ai-row input.ai-model { width: 100%; margin-top: 6px; }
.ai-row summary input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; }
.ai-row summary label { white-space: nowrap; }
.ai-row .ai-status { font-size: 13px; }
/* IPOs */
li.ipo { padding: 10px 0; border-top: 1px solid var(--line); }
li.ipo:first-child { border-top: 0; }
.tag.ipo-good { background: var(--good-bg); color: var(--good); }
.tag.ipo-warn { background: var(--warn-bg); color: var(--warn); }
.tag.ipo-bad { background: var(--bad-bg, #fde8e8); color: var(--bad, #b42318); }
.ipo-actions input { flex: 1 1 140px; }
/* Notifications */
.nf-events label, .nf-toggle { display: flex; align-items: center; gap: 8px; }
.nf-events input[type=checkbox], .nf-toggle input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; }
#notifications + .card input:not([type=checkbox]) { width: 100%; margin-top: 6px; }
#notifications + .card h3 { margin: 14px 0 4px; font-size: 15px; }
