/* DriftCouncil — one stylesheet, light and dark. */
:root {
  --bg: #f5f4f0; --bg2: #ecebe5; --card: #ffffff; --ink: #18181b; --ink2: #3f3f46; --muted: #71717a; --line: #e7e5df; --soft: #f1f0eb;
  --brand: #0f766e; --brand2: #14b8a6; --brand-ink: #ffffff; --brand-soft: #e6f4f1; --accent: #b45309;
  --buy: #15803d; --buy-bg: #e7f6ec; --ow: #4d7c0f; --ow-bg: #eef6e2; --hold: #a16207; --hold-bg: #fbf3dc;
  --uw: #c2410c; --uw-bg: #fdeee4; --sell: #b91c1c; --sell-bg: #fde8e8; --review: #52525b; --review-bg: #ececee;
  --run: #2563eb; --run-bg: #e8effd; --warn: #b45309; --warn-bg: #fdf3e2;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 4px 16px rgba(24,24,27,.05); --shadow-lg: 0 12px 40px rgba(24,24,27,.14);
  --r: 16px; --r-sm: 10px; --tab-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10; --bg2: #18181b; --card: #17171a; --ink: #ededed; --ink2: #d4d4d8; --muted: #a1a1aa; --line: #2a2a2f; --soft: #202024;
    --brand: #2dd4bf; --brand2: #5eead4; --brand-ink: #042f2b; --brand-soft: #0f2a27; --accent: #f59e0b;
    --buy: #4ade80; --buy-bg: #12301d; --ow: #a3e635; --ow-bg: #23300f; --hold: #facc15; --hold-bg: #302a0c;
    --uw: #fb923c; --uw-bg: #35200f; --sell: #f87171; --sell-bg: #3a1515; --review: #a1a1aa; --review-bg: #27272a;
    --run: #60a5fa; --run-bg: #14233d; --warn: #fbbf24; --warn-bg: #33270b;
    --shadow: none; --shadow-lg: 0 12px 40px rgba(0,0,0,.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10; --bg2: #18181b; --card: #17171a; --ink: #ededed; --ink2: #d4d4d8; --muted: #a1a1aa; --line: #2a2a2f; --soft: #202024;
  --brand: #2dd4bf; --brand2: #5eead4; --brand-ink: #042f2b; --brand-soft: #0f2a27; --accent: #f59e0b;
  --buy: #4ade80; --buy-bg: #12301d; --ow: #a3e635; --ow-bg: #23300f; --hold: #facc15; --hold-bg: #302a0c;
  --uw: #fb923c; --uw-bg: #35200f; --sell: #f87171; --sell-bg: #3a1515; --review: #a1a1aa; --review-bg: #27272a;
  --run: #60a5fa; --run-bg: #14233d; --warn: #fbbf24; --warn-bg: #33270b;
  --shadow: none; --shadow-lg: 0 12px 40px rgba(0,0,0,.5); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .45em; letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; font-weight: 750; } h2 { font-size: 1.12rem; font-weight: 700; } h3 { font-size: 1rem; }
p { margin: .5em 0; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.num { font-variant-numeric: tabular-nums; }
.pad { padding: 16px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 1.12rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--brand); }
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: .92rem; font-weight: 550; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--soft); text-decoration: none; }
.nav a.on { color: var(--ink); background: var(--soft); }
.user { margin-left: auto; position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand); font: 700 .9rem/34px inherit; cursor: pointer; text-transform: uppercase; }
.menu { position: absolute; right: 0; top: 44px; min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who b { display: block; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--soft); text-decoration: none; }
main { max-width: 1120px; margin: 0 auto; padding: 22px 20px 48px; }
.foot { max-width: 1120px; margin: 0 auto; padding: 16px 20px 28px; color: var(--muted); font-size: .8rem; }
.tabbar { display: none; }

/* ---------- building blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.field { margin-bottom: 14px; position: relative; }
label { display: block; font-size: .8rem; font-weight: 650; color: var(--muted); margin: 0 0 6px; letter-spacing: .01em; }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; min-height: 44px; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.btn { font: inherit; font-weight: 650; border: 0; border-radius: 12px; padding: 11px 18px; background: var(--brand); color: var(--brand-ink); cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.big { width: 100%; padding: 14px; font-size: 1.02rem; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--brand2))); }
.linkbtn { font: inherit; background: none; border: 0; color: var(--brand); cursor: pointer; padding: 6px 4px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg button { font: inherit; font-weight: 650; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.seg button small { display: block; color: var(--muted); font-size: .74rem; font-weight: 450; line-height: 1.35; }
.seg button.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: .86rem; cursor: pointer; user-select: none; margin: 0; color: var(--ink2); font-weight: 550; }
.chip input { width: auto; min-height: 0; margin: 0; accent-color: var(--brand); }
button.chip { font: inherit; font-size: .86rem; color: var(--ink2); }
button.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); font-weight: 650; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin: 6px 0 12px; font-weight: 550; }
details.more[open] summary { color: var(--ink); }
.suggest { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 6px; z-index: 10; box-shadow: var(--shadow-lg); overflow: hidden; }
.suggest button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; padding: 11px 14px; cursor: pointer; }
.suggest button:hover, .suggest button.hi { background: var(--soft); }
.suggest b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 650; font-size: .85rem; }
.err { color: var(--sell); font-size: .9rem; margin-top: 8px; }
.err:empty { display: none; }
.note { background: var(--soft); border-radius: 12px; padding: 11px 13px; font-size: .88rem; color: var(--ink2); }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.pos { color: var(--buy); } .neg { color: var(--sell); }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ratings and status */
.badge { display: inline-flex; align-items: center; font-weight: 700; font-size: .78rem; letter-spacing: .01em; padding: 3px 10px; border-radius: 999px; color: var(--review); background: var(--review-bg); white-space: nowrap; }
.r-Buy { color: var(--buy); background: var(--buy-bg); } .r-Overweight { color: var(--ow); background: var(--ow-bg); }
.r-Hold { color: var(--hold); background: var(--hold-bg); } .r-Underweight { color: var(--uw); background: var(--uw-bg); }
.r-Sell { color: var(--sell); background: var(--sell-bg); }
.badge.big { font-size: 1.5rem; padding: 10px 22px; border-radius: 14px; letter-spacing: -0.01em; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; color: var(--muted); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.running { color: var(--run); } .st.running::before { animation: pulse 1.2s infinite; }
.st.failed, .st.stopped { color: var(--sell); } .st.done { color: var(--buy); } .st.queued, .st.waiting { color: var(--warn); }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- home ---------- */
.hero h1 { font-size: 1.7rem; }
.hero .lead { color: var(--muted); margin: 0 0 18px; }
.search { position: relative; }
.search input { padding-left: 42px; min-height: 52px; font-size: 1.02rem; border-radius: 14px; background: var(--card); }
.search svg { position: absolute; left: 14px; top: 15px; color: var(--muted); pointer-events: none; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stat { background: var(--soft); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stat span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rcard { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 0 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px 0; color: var(--ink); overflow: hidden; }
.rcard:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); text-decoration: none; }
.rcard .bar { align-self: stretch; border-radius: 0 4px 4px 0; background: var(--line); }
.rcard.c-Buy .bar { background: var(--buy); } .rcard.c-Overweight .bar { background: var(--ow); } .rcard.c-Hold .bar { background: var(--hold); }
.rcard.c-Underweight .bar { background: var(--uw); } .rcard.c-Sell .bar { background: var(--sell); } .rcard.c-running .bar, .rcard.c-queued .bar { background: var(--run); }
.rcard .t { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .sub { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .right { text-align: right; display: grid; gap: 3px; justify-items: end; }
.rcard .lv { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.sechead h2 { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* ---------- session page ---------- */
.runhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.runhead h1 { margin: 0 0 6px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-line span { font-size: .76rem; color: var(--ink2); background: var(--soft); padding: 3px 9px; border-radius: 999px; font-weight: 550; }
.progress { margin-top: 16px; }
.progress .track { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress .fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand2)); transition: width .4s; }
.progress .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.stage { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; min-width: 0; }
.stage i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.stage.ok i { background: var(--brand-soft); color: var(--brand); } .stage.ok { color: var(--ink2); }
.stage.on i { background: var(--run-bg); color: var(--run); box-shadow: 0 0 0 3px color-mix(in srgb, var(--run) 25%, transparent); animation: pulse 1.4s infinite; }
.stage.on { color: var(--run); }
.stage em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.decision { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.decision .lead { font-size: 1.02rem; color: var(--ink2); margin-top: 0; }
.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.kv div { background: var(--soft); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.kv span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.kv b { font-variant-numeric: tabular-nums; font-size: .98rem; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 5px; border-radius: 2px; }
.lg-close { background: var(--brand); } .lg-50 { background: var(--muted); } .lg-200 { background: var(--accent); }
.team h2 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 26px 0 10px; }
.team h2 i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); flex: none; }
.team h2 em { font-style: normal; font-size: .78rem; color: var(--muted); font-weight: 500; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.step > summary { list-style: none; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 16px; cursor: pointer; }
.step > summary::-webkit-details-marker { display: none; }
.step[open] > summary { border-bottom: 1px solid var(--line); }
.step .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); margin-left: 4px; }
.step.running .dot { background: var(--run); animation: pulse 1.2s infinite; }
.step.done .dot { background: var(--buy); } .step.failed .dot { background: var(--sell); }
.step .meta { font-size: .76rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.body { padding: 4px 20px 18px; overflow-x: auto; }
.md { line-height: 1.65; }
.md table { border-collapse: collapse; margin: 12px 0; font-size: .86rem; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: var(--soft); font-weight: 650; }
.md p { margin: .7em 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.2em 0 .45em; font-size: 1rem; }
.md code { background: var(--soft); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.md pre { background: var(--soft); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md ul, .md ol { padding-left: 20px; }
.disclaimer { font-size: .8rem; color: var(--muted); text-align: center; padding: 6px 0; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 650; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl.grid td, .tbl.grid th { text-align: center; white-space: nowrap; }
.tbl.grid th:first-child, .tbl.grid td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow); }
.tile span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.tile b { font-size: 1.4rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.prose p, .prose li { max-width: 74ch; }
.prose h2 { margin-top: 1.5em; }
.login { max-width: 420px; margin: 48px auto; }
.login .brandmark { display: grid; justify-items: center; gap: 8px; margin-bottom: 14px; text-align: center; }
.provider { display: flex; align-items: center; gap: 10px; font-size: 1rem; color: var(--ink); margin-bottom: 4px; cursor: pointer; }
.provider input { width: auto; min-height: 0; accent-color: var(--brand); }
.pos.small, .neg.small { font-weight: 650; }
.skeleton { display: grid; gap: 14px; }
.skeleton div { height: 90px; border-radius: var(--r); background: linear-gradient(90deg, var(--soft), var(--bg2), var(--soft)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton div:first-child { height: 160px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  body { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .top-in { padding: 10px 16px; }
  .nav { display: none; }
  main { padding: 14px 12px 28px; }
  .foot { padding: 8px 16px 20px; }
  .card { padding: 16px; border-radius: 14px; }
  h1, .hero h1 { font-size: 1.32rem; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; font-size: .7rem; font-weight: 650; color: var(--muted); padding: 4px 0; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a svg { width: 52px; height: 28px; padding: 2px 14px; border-radius: 999px; }
  .tabbar a.on { color: var(--brand); }
  .tabbar a.on svg { background: var(--brand-soft); }
  .seg { grid-template-columns: minmax(0, 1fr); }
  .seg button { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .seg button small { display: inline; }
  .stats { gap: 6px; }
  .stat { padding: 8px 10px; }
  .decision { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .badge.big { font-size: 1.25rem; padding: 8px 18px; }
  .stepper { gap: 2px; }
  .stage i { width: 30px; height: 30px; }
  .stage em { font-size: .62rem; }
  .body { padding: 4px 14px 14px; }
  .step > summary { padding: 12px; gap: 8px; }
  .step .meta { font-size: .7rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile b { font-size: 1.15rem; }
  /* tables that become cards: each cell shows its column name */
  .rtable thead, .rtable tr.head { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
  .rtable td { border: 0 !important; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right !important; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-size: .76rem; font-weight: 600; text-align: left; flex: none; }
  .rtable td.wide { display: block; text-align: left !important; }
  .rtable td.wide::before { display: block; margin-bottom: 2px; }
  .rtable td.first { font-weight: 650; font-size: .95rem; text-align: left !important; }
  .rtable td.first::before { display: none; }
  .rtable td:empty { display: none; }
}
div.head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
div.head h1 { margin: 0 0 4px; }
.themebtn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink2); cursor: pointer; display: grid; place-items: center; padding: 0; }
.themebtn:hover { background: var(--soft); }
.topbtns { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbtns .user { margin-left: 0; }
/* All decisions on wider screens: headers on one line, the stock and lesson columns get room */
@media (min-width: 721px) {
  .rtable th, .rtable td.num { white-space: nowrap; }
  .rtable td.first { min-width: 190px; }
  .rtable td.first a { font-weight: 700; }
  .rtable td.wide { min-width: 300px; color: var(--ink2); }
}

/* Stocks: every analysed stock against its price now */
.vchip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.vchip.target { color: var(--buy); background: var(--buy-bg); } .vchip.stop { color: var(--sell); background: var(--sell-bg); }
.vchip.both { color: var(--warn); background: var(--warn-bg); } .vchip.open { color: var(--run); background: var(--run-bg); }
.vchip.none { color: var(--muted); background: var(--soft); }
.pbar { margin-top: 6px; height: 6px; width: 120px; border-radius: 99px; background: var(--soft); position: relative; overflow: hidden; }
.pbar i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 99px; background: var(--buy); }
.pbar.neg i { background: var(--sell); }
.vtxt { font-size: .76rem; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.stocks-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.stocks-tools input { max-width: 240px; min-height: 38px; padding: 7px 11px; }
.stocks-tools select { width: auto; min-height: 38px; padding: 7px 11px; }
.stbl td { white-space: nowrap; }
.stbl td.first { white-space: normal; min-width: 170px; }
.stbl td.first a { font-weight: 700; }
.stbl td .sub2 { font-size: .74rem; color: var(--muted); }
@media (max-width: 720px) {
  .stbl td { white-space: normal; }
  .pbar { width: 100px; margin-left: auto; }
  .stocks-tools input { max-width: none; flex: 1 1 100%; }
  .tabbar a { font-size: .64rem; }
  .tabbar a svg { width: 46px; padding: 2px 11px; }
}
body[data-page="stocks"] main { max-width: 1480px; }
.stbl th, .stbl td { padding: 10px 7px; }
.stbl td.first { min-width: 150px; }
@media (max-width: 720px) {
  .stbl td.first { display: block; }
  .stbl td.first .sub2 { margin-top: 2px; }
}
.stbl .vtxt { white-space: normal; max-width: 150px; }
.stbl td.first .sub2 { max-width: 170px; }

/* engines */
.etag { display: inline-block; font-size: .68rem; font-weight: 750; letter-spacing: .03em; padding: 1px 7px; border-radius: 6px; vertical-align: middle; }
.etag.v2 { color: var(--brand); background: var(--brand-soft); } .etag.v1 { color: var(--muted); background: var(--soft); }
.meta-line .etag { font-size: .76rem; padding: 3px 9px; border-radius: 999px; }
.seg.seg2 { grid-template-columns: repeat(2, 1fr); }
.prob { margin-top: 10px; display: grid; }
.prob b { font-size: 1.6rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.prob span { font-size: .76rem; color: var(--muted); max-width: 170px; }
.tbl tr.grp td { background: var(--soft); font-weight: 600; font-size: .82rem; }
@media (max-width: 720px) { .seg.seg2 { grid-template-columns: minmax(0, 1fr); } }
