:root {
  color-scheme: light;
  --paper: #f1f3f7;
  --panel: #ffffff;
  --sunk: #e8ebf2;
  --ink: #141938;
  --ink-2: #565d7a;
  --line: #dcdfea;
  --accent: #3550d4;
  --accent-ink: #ffffff;
  --good: #0b8f6b;
  --good-bg: #dcf2ea;
  --warn: #94590a;
  --warn-bg: #fbedd5;
  --bad: #d64550;
  --bad-bg: #fbe2e4;
  --zone-risk: #f7d9dc;
  --zone-ideal: #2fb489;
  --zone-ok: #e8b956;
  --zone-high: #e3e6ef;
  --series: #3550d4;
  --gain: #2f7be6;
  --loss: #d64550;
  --brand: linear-gradient(110deg, #7c5cf0 0%, #47a6e0 52%, #36e2ad 100%);
  --nav: #ffffff;
  --shadow: 0 1px 0 rgba(20, 25, 56, .04);
  --radius-lg: 18px;
  --radius-sm: 9px;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b0f24; --panel: #141a38; --sunk: #1c2347; --ink: #eaedf8; --ink-2: #a0a7c6;
    --line: #283057; --accent: #8aa4ff; --accent-ink: #0b0f24;
    --good: #36e2ad; --good-bg: #0f3a30; --warn: #f2b65c; --warn-bg: #3a2c14; --bad: #ff808b; --bad-bg: #3e1d27;
    --zone-risk: #4a2231; --zone-ideal: #2bb487; --zone-ok: #b8862e; --zone-high: #262e55;
    --series: #8aa4ff; --gain: #5b9dff; --loss: #ff6b77; --nav: #0e1330;
    --shadow: 0 1px 0 rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0f24; --panel: #141a38; --sunk: #1c2347; --ink: #eaedf8; --ink-2: #a0a7c6;
  --line: #283057; --accent: #8aa4ff; --accent-ink: #0b0f24;
  --good: #36e2ad; --good-bg: #0f3a30; --warn: #f2b65c; --warn-bg: #3a2c14; --bad: #ff808b; --bad-bg: #3e1d27;
  --zone-risk: #4a2231; --zone-ideal: #2bb487; --zone-ok: #b8862e; --zone-high: #262e55;
  --series: #8aa4ff; --gain: #5b9dff; --loss: #ff6b77; --nav: #0e1330;
  --shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(/static/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 300 800; font-style: normal; font-display: swap; src: url(/static/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: .9375rem/1.55 var(--font-body);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: 750; margin: 0 0 .35rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 0; }
h3 { font-size: 1rem; font-weight: 650; margin: 1.6rem 0 .6rem; }
p { margin: .4rem 0; max-width: 72ch; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line);
}
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a.on { color: var(--ink); background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.nav .brand { color: var(--ink); font-weight: 750; font-size: 1.05rem; margin-bottom: 18px; padding-left: 6px; }
.nav .brand img { width: 28px; height: 28px; border-radius: 7px; }
.jobbox { margin-top: auto; font-size: .82rem; color: var(--ink-2); padding: 10px; }
.jobbox b { color: var(--ink); font-weight: 600; }
.jobbox .running { color: var(--accent); }
main { padding: 28px 32px 80px; max-width: 1040px; width: 100%; }
main:focus { outline: none; }

/* ---------- header bar */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  color: var(--ink-2); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.marketline { font-size: 1.05rem; max-width: 64ch; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; text-decoration: none;
  color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: none; color: var(--ink-2); padding: 6px 8px; }
.btn.quiet:hover { color: var(--accent); }
/* red only where the button removes or cancels something */
.btn.quiet:is(.js-unfav, .js-revoke, .js-pgreset, .js-pgcancel, .js-hdel, .js-dondel, .neg, [data-ua="delete"]):hover { color: var(--bad); }
@media (hover: none) { .btn.quiet:hover { color: var(--ink-2); } }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- ticket (buy plan) */
.ticket { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; margin: 0 0 18px; }
.ticket-top { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: start; }
.ticket-top .name { font-size: 1.25rem; font-weight: 750; line-height: 1.25; }
.ticket-top .sym { color: var(--ink-2); font-weight: 500; margin-left: 6px; font-size: .95rem; }
.score { display: flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.score b { font-size: 1.9rem; font-weight: 750; line-height: 1; }
.score span { color: var(--ink-2); font-size: .85rem; }
.note { border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; margin: 12px 0 4px; }

/* the rail: the one bold element */
.rail { position: relative; margin: 64px 0 8px; height: 74px; }
.rail .track { position: absolute; top: 20px; left: 0; right: 0; height: 18px; border-radius: 9px;
  background: var(--zone-high); overflow: hidden; }
.rail .z { position: absolute; top: 0; bottom: 0; }
.rail .z.risk { background: var(--zone-risk); }
.rail .z.ideal { background: var(--zone-ideal); }
.rail .z.ok { background: var(--zone-ok); }
.rail .z.sell { background: var(--zone-ideal); }
.rail .tick { position: absolute; top: 44px; transform: translateX(-50%); font-size: .78rem; line-height: 1.25;
  text-align: center; white-space: nowrap; color: var(--ink-2); }
.rail .tick b { display: block; color: var(--ink); font-weight: 600; font-size: .85rem; }
.rail .tick.up { top: auto; bottom: 58px; }
.rail .tick.edge-l { transform: none; text-align: left; }
.rail .tick.edge-r { transform: translateX(-100%); text-align: right; }
.rail .mark { position: absolute; top: 16px; width: 2px; height: 26px; background: var(--ink); transform: translateX(-1px); }
.rail .pin { position: absolute; top: -58px; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; transition: left .7s cubic-bezier(.2,.8,.2,1); }
.rail .pin span { background: var(--ink); color: var(--paper); font-weight: 650; font-size: .8rem; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; }
.rail .pin i { width: 0; height: 0; border: 7px solid transparent; border-top-color: var(--ink); margin-top: -1px; }
.rail .pin::after { content: ""; width: 2px; height: 54px; background: var(--ink); margin-top: -2px; }
.rail .pin.pin-l span { transform: translateX(calc(50% - 12px)); }
.rail .pin.pin-r span { transform: translateX(calc(-50% + 12px)); }
@media (prefers-reduced-motion: reduce) { .rail .pin { transition: none; } }

.verdict { display: flex; gap: 12px; align-items: center; margin: 8px 0 4px; padding: 10px 14px;
  border-radius: var(--radius-sm); background: var(--sunk); min-height: 46px; }
.verdict:empty { display: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-weight: 650; font-size: .85rem; white-space: nowrap; background: var(--sunk); color: var(--ink); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.calm::before { background: var(--ink-2); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; margin: 18px 0 6px; }
.facts div { min-width: 0; }
.facts dt { font-size: .8rem; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; }
.facts dd small { font-weight: 400; color: var(--ink-2); }
.pos { color: var(--good); }
.neg { color: var(--bad); }

details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details.more[open] summary { margin-bottom: 10px; }
.parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 24px; margin: 10px 0; }
.part { display: grid; grid-template-columns: 70px 1fr 30px; gap: 8px; align-items: center; font-size: .85rem; }
.part .bar { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.part .bar i { display: block; height: 100%; background: var(--series); border-radius: 0 3px 3px 0; }
ul.plain { margin: 6px 0; padding-left: 18px; }
ul.plain li { margin: 3px 0; }
ul.warns { list-style: none; padding: 0; margin: 12px 0 0; }
ul.warns li { padding: 6px 10px 6px 30px; position: relative; background: var(--warn-bg); color: var(--ink);
  border-radius: var(--radius-sm); margin-bottom: 6px; font-size: .9rem; }
ul.warns li::before { content: "!"; position: absolute; left: 10px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--warn); color: var(--panel); font-size: .7rem; font-weight: 750; text-align: center; line-height: 14px; }
.headline { display: grid; grid-template-columns: 46px 1fr; gap: 8px; font-size: .9rem; margin: 4px 0; }

/* ---------- chart */
.chart { position: relative; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: 140px; overflow: visible; }
.chart .tip { position: absolute; top: 0; pointer-events: none; background: var(--ink); color: var(--paper);
  font-size: .78rem; padding: 3px 8px; border-radius: 6px; white-space: nowrap; transform: translateX(-50%); display: none; }

/* ---------- lists */
.rows { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 2fr); gap: 4px 18px; padding: 14px 18px;
  border-top: 1px solid var(--line); align-items: center; }
.row:first-child { border-top: 0; }
.row .who b { display: block; }
.row .who span { color: var(--ink-2); font-size: .85rem; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 22px; }
.empty h2 { margin-bottom: 4px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 16px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.card-top .name { font-size: 1.15rem; font-weight: 750; }
.card-top .sym { color: var(--ink-2); margin-left: 6px; font-weight: 500; }
.actions { display: flex; gap: 4px; align-items: center; }

/* ---------- forms */
.addbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: .82rem; color: var(--ink-2); }
.field input, .field select { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm);
  padding: 7px 10px; min-width: 0; width: 100%; }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field .hint { font-size: .78rem; color: var(--ink-2); }
.search { position: relative; flex: 2 1 240px; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 300px; overflow: auto; }
.suggest button { display: grid; grid-template-columns: 1fr auto; width: 100%; text-align: left; border: 0; background: none;
  padding: 8px 12px; cursor: pointer; gap: 8px; }
.suggest button:hover, .suggest button.hl { background: var(--sunk); }
.suggest small { color: var(--ink-2); }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); padding: 16px 18px 18px; margin: 0 0 16px; }
legend { font-weight: 650; padding: 0 6px; }
fieldset p.muted { margin: 0 0 12px; font-size: .9rem; }

.totals { display: flex; gap: 28px; flex-wrap: wrap; margin: 4px 0 18px; }
.totals div { font-size: .85rem; color: var(--ink-2); }
.totals b { display: block; font-size: 1.3rem; color: var(--ink); font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .82rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }

.banner { background: var(--warn-bg); padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; }

/* ---------- small screens */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--panel); border-right: 0; border-top: 1px solid var(--line); z-index: 30; }
  .nav .brand, .jobbox { display: none; }
  .nav a { flex-direction: column; gap: 2px; font-size: .7rem; padding: 6px 4px; }
  .nav a.on { box-shadow: inset 0 3px 0 var(--accent); background: none; }
  main { padding: 18px 16px 96px; }
  .ticket { padding: 16px; }
  .row { grid-template-columns: 1fr auto; }
  .row > :last-child { grid-column: 1 / -1; }
  h1 { font-size: 1.35rem; }
}
.savebar { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 12px 0; background: var(--paper);
  border-top: 1px solid var(--line); }
@media (max-width: 820px) { .savebar { bottom: 64px; } }
@media (max-width: 600px) { .verdict { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* ---------- account and admin */
.checks { display: grid; gap: 10px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; }
.checks input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.qr { background: #fff; padding: 12px; border-radius: var(--radius-sm); width: 200px; margin: 10px 0; }
.qr svg { width: 100%; height: auto; display: block; }
code { background: var(--sunk); padding: 2px 6px; border-radius: 4px; }
textarea { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 10px; font: inherit; color: inherit; resize: vertical; }
input.copy { width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; color: inherit; }
.tabs { flex-wrap: wrap; border-radius: var(--radius-sm); }
.tabs button { border-radius: 6px; }
td .pill { margin-left: 6px; font-size: .75rem; padding: 1px 8px; }
details.menu { position: relative; }
details.menu summary { list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: 100%; z-index: 20; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.14); min-width: 240px; padding: 4px; }
.menu-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-list button:hover { background: var(--sunk); }

/* ---------- sign-in pages */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.authcard { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 26px; }
.authcard .brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.1rem; margin-bottom: 18px; }
.authcard .brand img { width: 36px; height: 36px; border-radius: 9px; }
.authcard form { display: grid; gap: 14px; margin-top: 14px; }
.authcard .btn.primary { justify-content: center; padding: 10px; }
.authcard .err { color: var(--bad); min-height: 1.2em; margin: 0; }
.authcard .alt { margin-top: 16px; font-size: .9rem; }
.authcard label.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }

.request blockquote { margin: 12px 0; padding: 10px 14px; background: var(--sunk); border-radius: var(--radius-sm); white-space: pre-wrap; }
.nav b.count { background: var(--bad); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; margin-left: 6px; font-weight: 700; }

.reminder { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sunk); font-size: .85rem; color: var(--ink-2); }
.reminder b { color: var(--ink); }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sunk); font-size: .88rem; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice li { margin: 3px 0; }
.terms { max-width: 680px; margin: 0 auto; padding: 32px 18px 60px; }
.terms .brandline { display: inline-flex; gap: 10px; align-items: center; font-weight: 750; color: var(--ink); text-decoration: none; margin-bottom: 22px; }
.terms .brandline svg { width: 28px; height: 28px; } .terms .brandline rect { fill: var(--accent); }
.terms .brandline path { stroke: var(--accent-ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.terms h2 { font-size: 1.1rem; margin: 26px 0 6px; }
.terms .lede { font-size: 1.1rem; color: var(--ink-2); }
.terms li { margin: 6px 0; }
.appfoot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); max-width: 72ch; }

/* ---------- dialogs, long-term, news */
dialog#dlg { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--panel); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog#dlg::backdrop { background: rgba(10, 16, 14, .45); }
.dlg { padding: 22px 22px 20px; }
.dlg h2 { font-size: 1.2rem; margin-bottom: 6px; }
fieldset.plain { border: 0; padding: 0; margin: 14px 0; background: none; }
fieldset.plain legend { padding: 0; margin-bottom: 8px; font-size: .9rem; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 12px; background: var(--paper); font-size: .9rem; min-width: 70px; text-align: center; }
.choice.moods span { font-size: .75rem; color: var(--ink-2); }
.choice.moods b { font-size: 1.5rem; line-height: 1.2; }
.choice input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--panel); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.guide { min-height: 320px; display: flex; flex-direction: column; }
.guide #gbody { flex: 1; }
.guide .gnav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.dots { display: inline-flex; gap: 6px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--accent); }
ol.steps li { margin: 8px 0; }
.matters h2 { font-size: 1rem; }
ul.newslist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
ul.newslist li { font-size: .92rem; line-height: 1.45; }
ul.newslist .pill { font-size: .72rem; padding: 1px 8px; margin-right: 4px; }
.pillars { display: grid; gap: 12px; margin: 10px 0; }
.pillar .part { grid-template-columns: 150px 1fr 30px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.navguide { margin-top: 8px; }
@media (max-width: 820px) { .navguide { display: none !important; } .pillar .part { grid-template-columns: 110px 1fr 30px; } }
.shell { grid-template-columns: 216px minmax(0, 1fr); }
main { min-width: 0; }
@media (max-width: 820px) { .shell { grid-template-columns: minmax(0, 1fr); } }
td, .newslist li, .headline a { overflow-wrap: anywhere; }
.actions { flex-wrap: wrap; }
[data-preset] { white-space: normal; text-align: left; }
@media (max-width: 600px) {
  .ticket-top { grid-template-columns: 1fr; }
  .ticket-top .score { justify-content: flex-start; }
  .ticket-top .actions { justify-content: flex-start !important; }
}

.chip { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
.oneliner { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; }
.dig { margin-top: 12px; } .dig a { white-space: nowrap; }
.mix { margin: 8px 0 16px; } .mixbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0; }
.mixbar i { background: var(--series); opacity: .85; } .mixbar i:nth-child(2) { opacity: .6; } .mixbar i:nth-child(3) { opacity: .4; } .mixbar i:nth-child(n+4) { opacity: .25; }
.ltbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ltbar select { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius-sm); padding: 5px 8px; margin-left: 6px; }

/* ---------- playground */
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.primary.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.pgsum { margin-bottom: 14px; }
.pgsum h2 { margin-bottom: 4px; }
.pgsum .totals { margin-bottom: 0; }
.pgsum .totals span { display: block; font-size: .8rem; }
.pgstatus { font-weight: 600; margin: 10px 0 0; }
.pgstatus.good { color: var(--good); } .pgstatus.bad { color: var(--bad); } .pgstatus.warn { color: var(--warn); }
.pgprog { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .78rem; color: var(--ink-2); margin: 6px 0 4px; }
.pgprog div { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.pgprog i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pgtools { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
#pgline { margin: -6px 0 14px; }
.pgadd { margin-bottom: 16px; }

/* nine nav items: let the phone tab bar scroll sideways instead of squashing */
@media (max-width: 820px) {
  .nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; min-width: 64px; }
}
.nowrap { white-space: nowrap; }
@media (max-width: 600px) { .hide-sm { display: none; } #pgclosed th, #pgclosed td { padding: 8px 6px; } }

/* ---------- ringgit beside US prices */
small.myr { display: block; font-weight: 400; color: var(--ink-2); font-size: .78rem; }
.ltprice { margin: 6px 0 2px; font-size: 1.05rem; }
.ltprice small.myr { display: inline; margin-left: 6px; }
.fxnote { margin: -4px 0 12px; }

/* ---------- AI & costs */
.switch { display: flex; gap: 10px; align-items: center; font-size: 1rem; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.meter { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 6px; max-width: 420px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter i.hot { background: var(--warn); }

/* ---------- support page */
.supstatus h2 { margin-bottom: 4px; }
.supstatus.ahead, .supstatus.free { border-left: 4px solid var(--good); }
.supstatus.nearly { border-left: 4px solid var(--warn); }
.supstatus.short { border-left: 4px solid var(--bad); }
.donate { margin-top: 12px; }
.schart { position: relative; display: flex; gap: 10px; align-items: flex-end; height: 180px; margin: 30px 0 34px; border-bottom: 1px solid var(--line); }
.sbar { position: relative; flex: 1 1 0; max-width: 64px; height: 100%; }
.sfill { position: absolute; bottom: 0; left: 0; width: 100%; border-radius: 6px 6px 0 0; background: var(--accent); min-height: 2px; }
.sfill.ok { background: var(--good); } .sfill.near { background: var(--warn); } .sfill.low { background: var(--bad); }
.sfill.free { background: var(--line); }
.slab { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: .78rem; color: var(--ink-2); }
.sval { position: absolute; left: 0; right: 0; text-align: center; font-size: .75rem; font-weight: 600; }
.sline { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--ink-2); opacity: .55; z-index: 1; pointer-events: none; }
.sline span { position: absolute; right: 0; top: -18px; font-size: .72rem; color: var(--ink-2); }

/* ---------- how picks are made */
.flow { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 22px; max-width: 640px; }
.fstep { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fstep:not(:last-child)::after { content: ""; position: absolute; left: 28px; bottom: -16px; height: 14px; border-left: 2px solid var(--ink-2); }
.fstep:not(:last-child)::before { content: ""; position: absolute; left: 24px; bottom: -26px; border: 5px solid transparent; border-top-color: var(--ink-2); z-index: 1; }
.fbox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
.fbox span { font-size: .86rem; color: var(--ink-2); }
.fstep.ask .fbox { border-color: var(--accent); border-style: dashed; }
.fstep.ai .fbox { border-color: var(--warn); }
.fstep.you .fbox { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fstep.you .fbox span { color: inherit; opacity: .85; }
.fside { font-size: .8rem; color: var(--ink-2); padding: 4px 10px; border: 1px dashed var(--line); border-radius: 99px; white-space: nowrap; }
.fside::before { content: "→ "; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips i { font-style: normal; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
@media (max-width: 600px) {
  .fstep { grid-template-columns: 1fr; gap: 6px; }
  .fside { justify-self: start; white-space: normal; }
}

.terms .brandline img { width: 28px; height: 28px; border-radius: 7px; }

/* ---------- what's new */
.release .card-top { align-items: center; }
.vtag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); margin-right: 6px; }
.release ul.plain { margin-top: 8px; }
.vlink { font-weight: 400; color: var(--ink-2); }

/* ---------- phones, tablets, desktops and installed-app mode */
/* iPhone Safari zooms into any input under 16px: keep fields at 16px on small screens */
@media (max-width: 820px) {
  .field input, .field select, .field textarea, textarea, input[type="text"], input[type="number"],
  input[type="date"], input[type="month"], input[type="url"], input[type="email"], input[type="password"], select { font-size: 16px; }
  .head { gap: 10px; }
  .head h1 { font-size: 1.3rem; }
}
/* fingers need bigger targets than mouse pointers */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.quiet { min-height: 40px; }
  .seg button { min-height: 40px; }
  .nav a { min-height: 48px; }
  details > summary { padding-block: 6px; }
  .check input, .checks input, .switch input { width: 22px; height: 22px; }
}
/* no hover on touch screens: don't leave things stuck in their hover look */
@media (hover: none) {
  .btn:hover { border-color: var(--line); }
  .btn.primary:hover { filter: none; }
}
/* wide desktop screens: keep lines readable and centre the page */
@media (min-width: 1440px) {
  main { max-width: 1120px; margin-inline: auto; } /* wide screens: centred in the space beside the menu */
}
/* tablets in portrait: two columns of facts instead of one long list */
@media (min-width: 601px) and (max-width: 1024px) {
  .facts { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
/* opened from the home screen: respect the notch and the status bar */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .nav { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }

/* ---------- install card */
.installcard ol { margin: 8px 0 0 18px; padding: 0; }
.installcard li { margin: 4px 0; }

/* ---------- donation QR */
.qrbox { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.qrbox img { width: 220px; height: 220px; object-fit: contain; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid var(--line); }
.qrbox > div { flex: 1 1 220px; }
.qradmin { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qradmin img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }

/* ---- v2.5: data freshness, scan funnel, paper trading desk ---- */
.fresh { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 2px 0 14px; }
.fresh span { display: inline-flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 5px 10px; min-width: 0; }
.fresh small { font-size: .7rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.fresh b { font-size: .88rem; font-weight: 650; }
.fresh span.warn { border-color: var(--warn); background: var(--warn-bg); }
.banner.warn { background: var(--bad-bg); }
.warn-text { color: var(--warn); }
.ratesline { margin: -4px 0 14px; }
.funnel { display: grid; gap: 4px; margin: 10px 0; }
.funnel div { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 44px; gap: 10px; align-items: center; font-size: .85rem; }
.funnel i { display: block; height: 10px; border-radius: 99px; background: var(--series); opacity: .8; }
.funnel b { text-align: right; }
.funnel div:last-child i { background: var(--good); opacity: 1; }
.pgaccts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 6px; }
.pgacct { margin: 0; }
.pgacct .card-top { align-items: center; flex-wrap: wrap; gap: 6px; }
.pgacct .totals { gap: 16px 24px; margin: 12px 0 0; }
.pgacct .totals span { display: block; font-size: .78rem; }
.pgacct .totals b { font-size: 1.12rem; }
.ticketform { border: 2px solid var(--accent); margin: 16px 0; }
.ticketform .card-top { align-items: center; }
.ticketform form { margin-top: 10px; }
.ticketform .seg button { padding: 7px 18px; }
.ticketform [data-side="buy"][aria-pressed="true"] { background: var(--good-bg); color: var(--good); font-weight: 650; }
.ticketform [data-side="sell"][aria-pressed="true"] { background: var(--bad-bg); color: var(--bad); font-weight: 650; }
.ticketform .label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.chips.quick { align-items: center; margin-bottom: 12px; }
.chips.quick .chip { cursor: pointer; background: var(--panel); padding: 4px 10px; font-size: .8rem; }
.chips.quick .chip:hover { border-color: var(--accent); color: var(--ink); }
.tkquote { margin: 10px 0 2px; }
.tkest { margin: 2px 0 12px; font-size: .92rem; }
.pgtable td, .ledger td { vertical-align: top; }
.ledger tr.k-cancel td, .ledger tr.k-order td { color: var(--ink-2); }
.ledger tr.k-deposit td { background: var(--sunk); }
.myr { color: var(--ink-2); font-weight: 400; }
@media (max-width: 600px) {
  .pgaccts { grid-template-columns: minmax(0, 1fr); }
  .funnel div { grid-template-columns: 120px 1fr 36px; }
  .fresh span { flex: 1 1 45%; }
}
.ledger td.num, .pgtable td.num { white-space: nowrap; }
.pgacct .totals .myr { display: inline; }
.pglist { display: grid; gap: 12px; }
.pgpos { margin: 0; }
.ledger { padding: 4px 16px; }
.lrow { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lwhat { display: flex; flex-direction: column; min-width: 0; }
.lamt { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.lamt small { color: var(--ink-2); font-size: .75rem; }
.lrow.k-cancel, .lrow.k-order { opacity: .75; }
.lrow.k-deposit .lwhat b { color: var(--accent); }


/* ---- v2.6 look: brand colours, summary header, score rings ---- */
.nav { background: var(--nav); }
.nav .brand { position: relative; padding-bottom: 14px; }
.nav .brand::after { content: ""; position: absolute; left: 6px; bottom: 4px; width: 42px; height: 3px; border-radius: 3px; background: var(--brand); }
.nav a.on { background: var(--sunk); box-shadow: none; position: relative; }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--brand); }
.navsupport { margin-top: 6px; font-size: .82rem; opacity: .8; }
.navsupport:hover { opacity: 1; }
.navsupport svg { width: 16px !important; height: 16px !important; }
.card, .ticket, .empty { box-shadow: var(--shadow); border-color: var(--line); }
.ticket { position: relative; overflow: hidden; }
.ticket::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); }
.btn.primary { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.head h1 { font-size: 1.75rem; }

.hero { position: relative; background: var(--panel); border-radius: var(--radius-lg); padding: 18px 20px 14px; margin: 0 0 16px;
  box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-count { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.hero-count small { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-top: 4px; }
.mood { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 650; font-size: .9rem; }
.mood i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.mood.risk-on { background: var(--good-bg); color: var(--good); }
.mood.neutral { background: var(--warn-bg); color: var(--warn); }
.mood.risk-off { background: var(--bad-bg); color: var(--bad); }
.hero .fresh { margin: 12px 0 0; }
.hero .fresh span { background: var(--sunk); border-color: transparent; }

.score { --p: 0; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: conic-gradient(var(--ring, var(--accent)) calc(var(--p) * 1%), var(--sunk) 0); position: relative; gap: 0;
  justify-self: end; justify-content: center; justify-items: center; align-items: center; line-height: 1; }
.score::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); }
.score b, .score span { position: relative; }
.score b { font-size: 1.35rem; }
.score span { font-size: .58rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.score.hi { --ring: var(--good); }

.welcome { max-width: 560px; }
.welcome .wlogo { border-radius: 12px; display: block; margin-bottom: 10px; }
.welcome h2 { font-size: 1.35rem; margin-bottom: 6px; }
.wlist { padding-left: 18px; margin: 10px 0; }
.wlist li { margin: 7px 0; line-height: 1.45; }
.wchecks { display: grid; gap: 8px; margin-top: 12px; padding: 12px 14px; background: var(--sunk); border-radius: var(--radius-sm); }
.wchecks .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.wchecks input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
dialog.locked::backdrop { background: rgba(8, 10, 24, .72); backdrop-filter: blur(3px); }

.donate1, .donate2, .donate3 { margin-top: 8px; }
.donamt { font-size: 1.4rem; font-weight: 700; margin: 6px 0 10px; }
.donate2 .qrbox img { width: min(100%, 320px); height: auto; max-width: none; padding: 0; border: 0; border-radius: 16px; }
.supmine .who b { white-space: nowrap; }
.settings-support { margin-top: 24px; }
@media (max-width: 820px) { .navsupport { display: none !important; } }
@media (max-width: 600px) {
  .hero-count { font-size: 1.55rem; }
  .score { width: 56px; height: 56px; }
  .score b { font-size: 1.15rem; }
}
.qrsafe { background: var(--good-bg); color: var(--ink); border-left: 4px solid var(--good); padding: 10px 14px;
  border-radius: var(--radius-sm); margin: 4px 0 12px; font-size: .92rem; }
.donate2 .steps { padding-left: 20px; margin: 6px 0 12px; }
.donate2 .steps li { margin: 6px 0; }
.qracts { margin: 10px 0 4px; }
.qrfile { margin-top: 6px; }
.qrview { text-align: center; max-width: 420px; }
.qrview img { width: 100%; height: auto; border-radius: 16px; display: block; margin: 0 auto 10px; }
.qrview .actions { justify-content: center; margin-top: 10px; }

/* ---- v2.7: text size (Settings → Display) and roomier layouts ---- */
html[data-size="s"] { font-size: 14px; }
html[data-size="m"] { font-size: 16px; }
html[data-size="l"] { font-size: 17.5px; }
html[data-size="xl"] { font-size: 19px; }
.facts { gap: 10px 18px; }
.facts dt { font-size: .78rem; }
.facts dd { margin: 0; }
@media (max-width: 600px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ticket { padding: 16px 14px; }
  .pgacct .totals { gap: 12px 18px; }
  .pgacct .totals > div { flex: 1 1 40%; }
}
.dispopts { display: grid; gap: 14px; }
.dispopts .seg button { padding: 7px 14px; }
.btn.tg { gap: 6px; }
.meter6 { display: grid; gap: 8px; margin-top: 10px; }
.meter6 .mrow { display: grid; grid-template-columns: 44px 1fr minmax(120px, auto); gap: 12px; align-items: center; font-size: .9rem; }
.meter6 .cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.meter6 .cells i { height: 12px; border-radius: 4px; background: var(--sunk); }
.meter6 .cells i.on { background: var(--brand); background-size: 400% 100%; }
.meter6 .cells i.on:nth-child(1) { background-position: 0 0; } .meter6 .cells i.on:nth-child(2) { background-position: 33% 0; }
.meter6 .cells i.on:nth-child(3) { background-position: 66% 0; } .meter6 .cells i.on:nth-child(4) { background-position: 100% 0; }
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.reasons div { background: var(--sunk); border-radius: var(--radius-sm); padding: 12px 14px; }
.reasons b { display: block; margin-bottom: 4px; }


/* ==== v2.8 design: navy ink, Plex for numbers, Bricolage for names; the plan strip is the one bold element ==== */
h1, h2, h3, .t-name, .dh-title, .nav .brand { font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: 2.05rem; font-weight: 700; }
.head h1 { font-size: 2.05rem; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
.nav .brand { font-weight: 750; font-size: 1.15rem; }
.nav .brand::after, .nav a.on::before { display: none; }
.nav a.on { background: var(--sunk); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.card, .ticket, .empty { box-shadow: var(--shadow); }
.ticket::before, .hero::after { display: none; }
.btn { border-radius: 999px; padding: 8px 16px; }
.btn.quiet { border-radius: var(--radius-sm); }
.btn.primary { box-shadow: none; }

/* Today: a sentence headline and the board of the day's picks */
.dayhead { margin: 2px 0 22px; }
.dh-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-2); font-weight: 500; margin: 0 0 4px; }
.dh-title { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 750; line-height: 1.05; letter-spacing: -.025em; margin: 0 0 8px; max-width: 20ch; }
.dh-meta { color: var(--ink-2); font-size: .9rem; margin: 0 0 16px; }
.dh-none { font-size: 1.02rem; max-width: 52ch; }
.mood { padding: 3px 10px; font-size: .82rem; }
.board { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.board li { border-bottom: 1px solid var(--line); }
.board button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name buy score" "sym buy score";
  column-gap: 16px; align-items: center; padding: 11px 4px; }
.board button:hover .b-name { color: var(--accent); }
.board button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.b-name { grid-area: name; font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-sym { grid-area: sym; color: var(--ink-2); font-size: .8rem; }
.b-buy { grid-area: buy; color: var(--good); font-weight: 600; font-size: .9rem; text-align: right; }
.b-score { grid-area: score; font-weight: 700; font-size: 1.15rem; min-width: 2ch; text-align: right; }

/* The pick card */
.ticket { padding: 20px 22px 14px; border-radius: var(--radius-lg); scroll-margin-top: 16px; }
.t-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.t-name { font-size: 1.45rem; font-weight: 700; line-height: 1.15; margin: 0; }
.t-name .sym { font-family: var(--font-body); font-weight: 500; font-size: .9rem; color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.t-sub { margin: 4px 0 0; color: var(--ink-2); font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.t-sub::first-letter { text-transform: uppercase; }
.score { width: 58px; height: 58px; }
.score::before { inset: 5px; }
.score b { font-family: var(--font-body); font-size: 1.2rem; }
.score span { text-transform: none; letter-spacing: 0; font-size: .66rem; color: var(--ink-2); }
.ticket .oneliner { margin: 10px 0 0; font-size: 1rem; color: var(--ink); }
.ticket .rail { margin-top: 50px; }

.plan { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 10px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line); }
.plan > div { padding: 10px 12px 10px 0; }
.plan > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.plan dt { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.plan dd { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.plan dd small { display: block; font-weight: 500; font-size: .78rem; color: var(--ink-2); margin-top: 1px; }
.plan .p-buy dd { color: var(--good); }
.plan .p-stop dd { color: var(--bad); }
.plan .p-stop dd small, .plan .p-buy dd small, .plan .p-target dd small { color: var(--ink-2); }
.t-size { font-size: .9rem; color: var(--ink-2); margin: 0 0 10px; }
.t-size .pos, .t-size .neg { font-weight: 600; }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.t-quiet { margin-left: auto; display: inline-flex; gap: 2px; flex-wrap: wrap; }
.t-quiet .btn { color: var(--ink-2); font-weight: 500; }
.t-quiet .btn:hover { color: var(--accent); }
.ticket details.more { border-top: 1px solid var(--line); }
.ticket .warns { margin: 6px 0; }

@media (max-width: 600px) {
  .ticket { padding: 16px 14px 10px; }
  .t-name { font-size: 1.25rem; }
  .plan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .plan > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .t-actions .btn.primary, .t-actions .js-bought { flex: 1 1 40%; justify-content: center; }
  .t-quiet { margin-left: 0; width: 100%; justify-content: space-between; }
  .board button { column-gap: 12px; }
  .b-buy { font-size: .82rem; }
}

/* v2.8 revisions: header controls in one row, a thin brand stripe on pick cards and the board */
.todaybar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.todaybar .js-run { padding: 7px 14px; }
.ticket { border-top: 0; }
.ticket::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand); opacity: .9; }
.board { border-top: 0; position: relative; padding-top: 2px; }
.board::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: var(--brand); }
.t-size b { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) {
  .head:has(.todaybar) { display: block; }
  .head:has(.todaybar) h1 { margin-bottom: 10px; }
  .todaybar { flex-wrap: nowrap; width: 100%; }
  .todaybar .seg button { padding: 6px 12px; }
  .todaybar .js-run { padding: 6px 11px; font-size: .84rem; flex: 0 1 auto; }
  .todaybar .js-run[data-notify="0"] { margin-left: auto; }
}

/* active tab: brand gradient with white icon and label (a deeper cut of the logo gradient so white text stays readable) */
.nav a.on, .nav a.on:hover {
  background: linear-gradient(110deg, #5b3fd6 0%, #2a78c2 55%, #0e9573 100%);
  color: #fff; box-shadow: none;
}
.nav a.on svg { stroke: #fff; }
.nav a.on span, .nav a.on .count { color: #fff; }
.nav a.on span { text-shadow: 0 1px 1px rgba(10, 14, 40, .25); }
.newtag { display: inline-block; font-family: var(--font-body); font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  color: #fff; background: linear-gradient(110deg, #5b3fd6 0%, #2a78c2 55%, #0e9573 100%); vertical-align: 2px; letter-spacing: .01em; }
.b-sym .newtag { margin-left: 6px; vertical-align: 1px; }
.nav a .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; }
@media (max-width: 820px) { .nav a span { position: relative; } .nav a .count { position: absolute; top: -26px; right: -14px; margin: 0; } }

/* v2.8.1: look up any stock (Favourites) */
.lookhint { margin: -6px 0 14px; }
.card.lookup { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); position: relative; overflow: hidden; }
.card.lookup::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #5b3fd6, #2a78c2 55%, #0e9573); }
.card.lookup h3 { font-size: .95rem; margin: 18px 0 8px; }
.readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 24px; margin: 14px 0 0; }
.readings div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.readings dt { color: var(--ink-2); font-size: .86rem; }
.readings dd { margin: 0; font-size: .92rem; }
.rangebar { display: block; position: relative; height: 4px; margin: 7px 0 4px; border-radius: 4px; background: var(--sunk); max-width: 220px; }
.rangebar i { position: absolute; top: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); }
.events { list-style: none; padding: 0; margin: 0; }
.events li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0 6px 16px; position: relative; font-size: .92rem; }
.events li::before { content: ""; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.events li.good::before { background: var(--good); }
.events li.bad::before { background: var(--bad); }
.events small { color: var(--ink-2); white-space: nowrap; }
.lknews li { padding: 6px 0; border-top: 1px solid var(--line); }
.lknews li small { display: block; margin-top: 2px; }
.lkpick { background: var(--good-bg); border-radius: var(--radius-sm); padding: 8px 12px; }
@media (max-width: 560px) { .readings div { grid-template-columns: 8em 1fr; } }

/* v2.8.1: Telegram reminder */
.tgnudge .tgmark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; font-size: 1.6rem;
  background: linear-gradient(135deg, #5b3fd6, #2a78c2 55%, #0e9573); margin-bottom: 10px; }
.tgnudge ol.steps { margin: 10px 0; }

/* v2.8.2: the sidebar scrolls on its own when the window is short (laptops, large text), so nothing is cut off */
@media (min-width: 821px) {
  .nav { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .nav::-webkit-scrollbar { width: 6px; }
  .nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
}
@media (min-width: 821px) and (max-height: 780px) {
  .nav { padding-top: 14px; padding-bottom: 10px; }
  .nav .brand { margin-bottom: 10px; }
  .nav a { padding-top: 6px; padding-bottom: 6px; }
  .jobbox { padding: 8px 10px; }
}

/* v2.8.2: try a different share count in place */
.sizer { margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sunk); }
.sz-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.sz-label { font-weight: 600; font-size: .9rem; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); overflow: hidden; }
.stepper button { border: 0; background: none; width: 38px; font-size: 1.15rem; line-height: 1; color: var(--ink); cursor: pointer; }
.stepper button:hover { background: var(--sunk); color: var(--accent); }
.stepper button:focus-visible, .stepper input:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.stepper input { width: 6.5ch; min-width: 0; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0;
  text-align: center; font: inherit; font-weight: 650; font-variant-numeric: tabular-nums; padding: 6px 4px; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sz-cost { font-size: .92rem; }
.sz-out { display: grid; gap: 4px; margin: 10px 0 0; font-size: .92rem; font-variant-numeric: tabular-nums; }
.sz-out small { font-size: .8rem; }
.js-szreset { padding: 4px 8px; font-size: .82rem; margin-left: auto; }
@media (pointer: coarse) { .stepper button { width: 44px; } .stepper input { width: 7ch; padding: 9px 4px; } }

/* v2.8.2: loading, one motif throughout: a sweep in the brand gradient, like a scanner pass */
:root { --brand-grad: linear-gradient(90deg, #5b3fd6, #2a78c2 55%, #0e9573); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#loadbar { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1000; pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity .25s ease; }
#loadbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--brand-grad);
  border-radius: 0 3px 3px 0; box-shadow: 0 0 10px rgba(42, 120, 194, .55); animation: sweep 1.1s cubic-bezier(.45, 0, .25, 1) infinite; }
#loadbar.on { opacity: 1; }
@keyframes sweep { from { transform: translateX(0); } to { transform: translateX(350%); } }

/* small spinner: a ring with a gradient tail */
.spin { display: inline-block; width: 1em; height: 1em; flex: none; border-radius: 50%; vertical-align: -.15em;
  background: conic-gradient(from 0deg, transparent 0 25%, #2a78c2 60%, #5b3fd6 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: turn .8s linear infinite; }
.btn .spin { margin-right: 2px; }
.btn.primary .spin { background: conic-gradient(from 0deg, transparent 0 25%, rgba(255,255,255,.6) 60%, #fff 100%); }
.btn.is-busy { cursor: progress; opacity: .92; }
@keyframes turn { to { transform: rotate(1turn); } }
.loadline { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .9rem; }

/* placeholders */
.skel { display: grid; gap: 14px; }
.sk-cap { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); font-size: .92rem; }
.sk-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; display: grid; gap: 12px; }
.sk { position: relative; overflow: hidden; background: var(--sunk); border-radius: 6px; min-height: 12px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, #2a78c2 14%, transparent), transparent);
  animation: shimmer 1.4s ease-in-out infinite; }
.sk-title { height: 20px; width: 45%; }
.sk-line { height: 12px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w20 { width: 20%; }
.sk-bar { height: 10px; border-radius: 99px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sk-grid .sk { height: 38px; }
.sk-row { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (max-width: 600px) { .sk-grid { grid-template-columns: repeat(2, 1fr); } }

/* first open */
.boot { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink-2); }
.boot img { border-radius: 14px; }
.boot .sweep, #scanpill .sweep { display: block; position: relative; width: 120px; height: 3px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.boot .sweep::before, #scanpill .sweep::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--brand-grad);
  animation: sweep 1.1s cubic-bezier(.45, 0, .25, 1) infinite; }
.boot p { margin: 0; font-size: .92rem; }

/* scan running: visible on every page, phones included */
#scanpill { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px;
  box-shadow: 0 10px 30px rgba(20, 25, 56, .16); max-width: 330px;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
#scanpill.on { opacity: 1; transform: none; pointer-events: auto; }
#scanpill span { display: grid; gap: 1px; font-size: .9rem; }
#scanpill small { color: var(--ink-2); font-size: .78rem; }
#scanpill .sweep { grid-column: 1 / -1; width: 100%; margin-top: 6px; }
@media (max-width: 820px) { #scanpill { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; } }

@media (prefers-reduced-motion: reduce) {
  #loadbar::before, .boot .sweep::before, #scanpill .sweep::before { animation: none; left: 0; width: 100%; opacity: .7; }
  .spin { animation-duration: 2.4s; }
  .sk::after { animation: none; }
}

/* v2.8.2: Playground quick fill */
.quickfill { margin-bottom: 14px; }
.qf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.seg.small button { padding: 4px 12px; font-size: .84rem; }
.qf-note { margin: 2px 0 0; }
.tklevels { margin: 4px 0 8px; }
.tklevels .lvl { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; display: block; }
.tklevels .lvl.real { background: var(--good-bg); }
.tklevels .lvl.std { background: var(--warn-bg); }
.tklevels .lvl .btn { margin-left: 4px; padding: 2px 8px; font-size: .82rem; }

/* v2.8.3: facts never run into each other: long values (like the address) wrap inside their own cell */
.facts dd { overflow-wrap: anywhere; word-break: normal; }
.facts dd.url { font-weight: 500; font-size: .92rem; }
.facts.health { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.facts .wide { grid-column: span 2; }
@media (max-width: 600px) { .facts .wide { grid-column: 1 / -1; } }

/* v2.8.3: server health */
.card.server { margin-bottom: 18px; }
.mtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 12px; }
.mtile { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.mt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mt-title { font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.mt-lvl { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--sunk); color: var(--ink-2); }
.mt-lvl.good { background: var(--good-bg); color: var(--good); }
.mt-lvl.warn { background: var(--warn-bg); color: var(--warn); }
.mt-lvl.bad { background: var(--bad-bg); color: var(--bad); }
.mt-big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.meter { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--good); }
.mtile.warn .meter i { background: var(--warn); }
.mtile.bad .meter i { background: var(--bad); }
.mtile.unknown .meter i { background: var(--line); }
.mt-sub { margin: 0; color: var(--ink-2); }
.spark { margin: 4px 0 0; }
.spark svg { display: block; width: 100%; height: 40px; overflow: visible; cursor: crosshair; }
.sp-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sp-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.sp-cross { stroke: var(--ink-2); stroke-width: 1; }
.spark figcaption { margin-top: 2px; font-variant-numeric: tabular-nums; }
.spark-empty { margin: 4px 0 0; }
@media (max-width: 600px) {
  .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mtile { padding: 10px 11px; }
  .mt-big { font-size: 1.3rem; }
  .mt-sub { font-size: .78rem; }
}

/* v2.9.0: company logos, a rounded square (never a circle). White behind the logo so dark logos stay
   readable in dark mode; a solid-colour app-icon logo fills the square edge to edge. */
.logo { --s: 32px; flex: none; display: inline-grid; place-items: center; width: var(--s); height: var(--s);
  border-radius: calc(var(--s) * .24); background: #fff; box-shadow: inset 0 0 0 1px rgba(20, 25, 56, .10);
  overflow: hidden; vertical-align: middle; }
.logo img { width: 84%; height: 84%; object-fit: contain; display: block; }
.logo.fill img, .logo.mark img { width: 100%; height: 100%; object-fit: cover; }
.logo.mark { background: transparent; box-shadow: none; }
.logo.xs { --s: 18px; } .logo.sm { --s: 26px; } .logo.md { --s: 34px; } .logo.lg { --s: 44px; }
:root[data-theme="dark"] .logo:not(.mark) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo:not(.mark) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); } }

.idline { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; }
.idline .sym { margin-left: 0; }
.t-id { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.t-id > div { min-width: 0; }
.t-id .logo { margin-top: 2px; }
.board button { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "logo name buy score" "logo sym buy score"; }
.b-logo { grid-area: logo; align-self: center; margin-right: 2px; }
.chip .logo { margin: -2px 6px -2px -4px; }
@media (max-width: 600px) { .logo.lg { --s: 38px; } .logo.md { --s: 30px; } }
.chips.quick .chip { display: inline-flex; align-items: center; }

/* v2.9.0: Admin → Logos */
.ltiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 14px; }
.ltile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.ltile.missing, .ltile.lowres { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ltile .logo { margin-bottom: 6px; }
.lt-id { display: grid; min-width: 0; }
.lt-id b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-st, .lt-why { margin: 2px 0 0; overflow-wrap: anywhere; }
.ltile > p { margin: 0; }
.lt-acts { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 6px -8px 0; }
.lt-acts .btn { font-size: .8rem; padding: 4px 8px; }
.lt-acts label.btn { cursor: pointer; }
.lt-acts label.btn:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg.wrap { flex-wrap: wrap; border-radius: 16px; max-width: 100%; }
.seg.wrap button { white-space: nowrap; }


/* v2.9.1: share + entry price calculator, with the three outcomes in separate boxes */
.sizer { padding: 14px 16px; }
.sz-inputs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 22px; }
.sz-field { display: grid; gap: 6px; }
.sz-field > label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.szprice { width: 10ch; font: inherit; font-weight: 650; font-variant-numeric: tabular-nums; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); text-align: center; }
.sz-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sz-chips .chip { cursor: pointer; background: var(--panel); font-size: .74rem; padding: 2px 8px; }
.sz-chips .chip b { font-weight: 650; color: var(--ink); margin-left: 2px; font-variant-numeric: tabular-nums; }
.sz-chips .chip.on { border-color: var(--accent); color: var(--accent); }
.sz-chips .chip:hover { border-color: var(--accent); }
.sz-cost { font-size: .92rem; align-self: center; }
.sz-inputs .js-szreset { margin-left: auto; align-self: center; }
.sz-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 14px 0 0; }
.sz-box { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line);
  border-left-width: 4px; font-variant-numeric: tabular-nums; min-width: 0; }
.sz-box .k { font-size: .8rem; color: var(--ink-2); }
.sz-box b { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.sz-box small { color: var(--ink-2); font-size: .8rem; }
.sz-box.be { border-left-color: var(--ink-2); }
.sz-box.win { border-left-color: var(--good); background: color-mix(in srgb, var(--good-bg) 60%, var(--panel)); }
.sz-box.win b { color: var(--good); }
.sz-box.loss { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 60%, var(--panel)); }
.sz-box.loss b { color: var(--bad); }
.sz-notes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: .85rem; color: var(--warn); }
.sz-notes:empty { display: none; }
@media (max-width: 600px) { .sz-out { grid-template-columns: 1fr; } .sz-inputs .js-szreset { margin-left: 0; } }
.lg-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 4px; }
.lg-tools input[type=search] { flex: 1 1 220px; max-width: 320px; }
.lt-used { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px; }
.lg-tools input[type=search] { font: inherit; font-size: .9rem; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); }
.lg-tools input[type=search]::placeholder { color: var(--ink-2); }
.lg-tools input[type=search]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* v2.9.2: logo on a card header opens the company's research page (CNN Business / KLSE Screener) */
.logo-link { position: relative; display: inline-flex; flex: none; border-radius: 10px; text-decoration: none; }
.logo-link .logo { transition: transform .15s ease, box-shadow .15s ease; }
.logo-link .lk { position: absolute; right: -5px; top: -5px; width: 16px; height: 16px; display: grid; place-items: center;
  font-style: normal; font-size: 10px; line-height: 1; border-radius: 5px; background: var(--accent); color: #fff;
  opacity: 0; transform: scale(.8); transition: opacity .15s ease, transform .15s ease; pointer-events: none; }
.logo-link:hover .logo, .logo-link:focus-visible .logo { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--accent); }
.logo-link:hover .lk, .logo-link:focus-visible .lk { opacity: 1; transform: none; }
.logo-link:focus-visible { outline: none; }
@media (hover: none) { .logo-link .lk { opacity: .9; transform: scale(.85); } } /* phones: always hint it's tappable */
@media (prefers-reduced-motion: reduce) { .logo-link .logo, .logo-link .lk { transition: none; } }

/* v2.9.3: Shares, Entry price and Cost on one line: labels on one row, 40px controls on the next,
   price shortcuts under the entry box (top-aligned, so the shortcuts never push anything out of line) */
.sz-inputs { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; gap: 0 28px; }
.sz-field { display: grid; grid-template-rows: auto 40px auto; row-gap: 6px; align-content: start; min-width: 0; }
.sz-field > label, .sz-lab { font-size: .8rem; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.sz-field .stepper { height: 40px; }
.sz-field .stepper input { padding: 0 4px; }
.sz-field .szprice { height: 40px; padding: 0 12px; box-sizing: border-box; }
.sz-chips { margin-top: 2px; }
.sz-costf .sz-cost { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; height: 40px; font-size: .95rem; }
.sz-costf .sz-cost b { font-size: 1.15rem; }
.sz-costf .js-szreset { justify-self: start; margin: 0 0 0 -8px; padding: 2px 8px; }
.sz-inputs .js-szreset { margin-left: -8px; align-self: auto; }
@media (max-width: 600px) {
  .sz-inputs { grid-template-columns: auto minmax(0, 1fr); gap: 14px 18px; }
  .sz-costf { grid-column: 1 / -1; grid-template-rows: auto auto auto; }
  .sz-costf .sz-cost { height: auto; }
}

/* v2.9.3b: calculator inputs on one named grid.
   Desktop: Shares | Entry price | 2x2 price shortcuts | Cost to buy, with "Back to the plan" under the fees.
   Phone:   Shares | Entry price, then the 4 shortcuts as an even 2x2 grid, then Cost to buy. */
.sizer .sz-inputs { display: grid; align-items: center; gap: 6px 22px;
  grid-template-columns: auto auto auto max-content minmax(0, 1fr);
  grid-template-areas: "shl enl . col ." "sh en ch co ." ". . . rs ."; }
.a-shl { grid-area: shl; } .a-sh { grid-area: sh; } .a-enl { grid-area: enl; } .a-en { grid-area: en; }
.a-ch { grid-area: ch; } .a-col { grid-area: col; } .a-co { grid-area: co; } .a-rs { grid-area: rs; }

/* the three key items stand out: accent labels, firmer boxes, bigger numbers */
.sizer .sz-lab { font-size: .82rem; font-weight: 700; color: var(--accent); letter-spacing: .01em; align-self: end; }
.sizer .stepper, .sizer .szprice { height: 42px; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--panel); }
.sizer .stepper input { font-size: 1.05rem; font-weight: 700; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.sizer .stepper button { color: var(--accent); font-weight: 700; }
.sizer .szprice { font-size: 1.05rem; font-weight: 700; width: 11ch; padding: 0 12px; box-sizing: border-box; border-radius: 999px; text-align: center; }
.sizer .szprice:focus-visible, .sizer .stepper:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.sizer .sz-cost { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; height: auto; font-size: .9rem; }
.sizer .sz-cost b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--ink); }
.sizer .sz-cost small { color: var(--ink-2); }

/* the shortcuts: quieter, an even 2x2 block */
.sizer .sz-chips { display: grid; grid-template-columns: repeat(2, minmax(0, auto)); gap: 4px; margin: 0; }
.sizer .sz-chips .chip { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; font-size: .72rem; padding: 2px 9px; }

/* back to the plan: its own colour, under the fees */
.sizer .sz-reset { justify-self: end; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 650;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  border-radius: 999px; padding: 3px 10px; margin: 2px 0 0; }
.sizer .sz-reset:hover { background: color-mix(in srgb, var(--warn) 22%, transparent); }
.sizer .sz-reset[hidden] { display: none; }

@media (max-width: 760px) {
  .sizer .sz-inputs { grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px;
    grid-template-areas: "shl enl" "sh en" "ch ch" "col col" "co co" "rs rs"; }
  .sizer .sz-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 6px; }
  .sizer .sz-chips .chip { font-size: .78rem; padding: 6px 10px; }
  .sizer .a-col { margin-top: 10px; }
  .sizer .szprice { width: 100%; }
  .sizer .sz-reset { justify-self: start; }
}

/* v3.0: Admin → Learning */
.card.lrn { margin-bottom: 16px; }
.card.lrn h3 { font-size: 1rem; margin: 20px 0 6px; }
.lrn-meter { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.lrn-meter .lm-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .9rem; }
.lrn-meter .meter i { background: var(--accent); }
table.mini { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
table.mini th { font-size: .78rem; color: var(--ink-2); font-weight: 600; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.mini .num { text-align: right; white-space: nowrap; }
table.mini tr.cur td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.lrn-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.lrn-group h4 { margin: 8px 0 4px; font-size: .88rem; }
.sugg { border: 1px solid color-mix(in srgb, var(--good) 40%, var(--line)); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 12px; display: grid; gap: 8px; }
.sugg h3 { margin: 0; }
.sugg .btn { justify-self: start; }
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.tscroll table.mini { min-width: 420px; }
.lrn-group .tscroll table.mini { min-width: 0; }
@media (max-width: 600px) {
  .tscroll table.mini.feat { min-width: 0; }
  table.mini.feat thead { display: none; }
  table.mini.feat tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.mini.feat td { border: 0; padding: 0; }
  table.mini.feat td.f-name { grid-column: 1 / 3; }
  table.mini.feat td.f-v { grid-column: 3; justify-self: end; }
  table.mini.feat td.num { text-align: left; margin-top: 4px; }
  table.mini.feat td.num::before { content: attr(data-l); display: block; font-size: .72rem; color: var(--ink-2); }
}
