/* RenkoBars - "Pro" look: slate navy, Inter, a blue accent; green / red for direction. */
:root {
  /* "Pro": slate-navy dark with a clear blue accent and full-strength green / red; Inter throughout */
  --ink: #0b1120;          /* page */
  --deck: #111827;         /* panels */
  --deck-2: #1a2335;       /* raised: inputs, hover rows */
  --line: #2a3650;
  --line-soft: #1c2638;
  --text: #f8fafc;
  --muted: #aab5c8;
  --faint: #6b778c;
  --brass: #3b82f6;        /* the accent: primary actions, focus, selection (name kept from the gold era) */
  --brass-ink: #ffffff;
  --bull: #22c55e;
  --bear: #ef4444;
  --wait: #22d3ee;         /* setting up */
  --hold: #94a3b8;
  --warn: #f59e0b;
  --agree2: #a3e635;       /* Breadth: 2 of 3 measures strong */
  --shadow: 0 10px 30px rgba(0, 4, 12, .5);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* display face (headings, big prices) */
  --display-w: 700;        /* weight of the display face */
  --sidebar: 232px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* light: crisp white panels on a cool grey page, near-black text, blue accent */
  --ink: #eef2f7;
  --deck: #ffffff;
  --deck-2: #f3f6fb;
  --line: #cdd6e2;
  --line-soft: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --faint: #64748b;
  --brass: #2563eb;
  --brass-ink: #ffffff;
  --bull: #16a34a;
  --bear: #dc2626;
  --wait: #0891b2;
  --hold: #64748b;
  --warn: #d97706;
  --agree2: #65a30d;
  --shadow: 0 8px 26px rgba(15, 23, 42, .14);
  color-scheme: light;
}
/* Bright: deep indigo with vivid green / red, electric blue and a yellow accent - high contrast, for bright rooms and
   anyone who prefers punchier colours. Same tokens as dark, so every page follows. */
:root[data-theme="bright"] {
  --ink: #0b0c2a;
  --deck: #11133d;
  --deck-2: #191c52;
  --line: #2c3280;
  --line-soft: #1f2363;
  --text: #ffffff;
  --muted: #c3c8f0;
  --faint: #8a91c9;
  --brass: #ffd23f;
  --brass-ink: #14102a;
  --bull: #1fe070;
  --bear: #ff2e57;
  --wait: #2aa8ff;
  --hold: #b4badf;
  --warn: #ffab2e;
  --agree2: #9cf25a;
  --shadow: 0 10px 30px rgba(0, 0, 10, .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Text size (Settings or the account menu): every text size is in rem, so the root size scales them all; layout stays in px. */
:root[data-text="s"] { font-size: 15px; }
:root[data-text="l"] { font-size: 17px; }
:root[data-text="xl"] { font-size: 18px; }
body {
  background: var(--ink);
  color: var(--text);
  font: 0.875rem/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--brass) 35%, transparent); }
.pos { color: var(--bull); }
.neg { color: var(--bear); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.n { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- shell ---------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--deck); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group { color: var(--faint); font-size: 0.75rem; padding: 14px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--deck-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--deck-2); color: var(--text); box-shadow: inset 3px 0 0 var(--brass); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; font-size: 0.75rem; color: var(--faint); }
.side-foot { margin-top: auto; padding: 14px 8px 0; color: var(--faint); font-size: 0.75rem; }
/* price notices for the data providers (fair market value, delayed, test data) */
.data-notice { margin-top: 8px; font-size: 0.75rem; line-height: 1.45; color: var(--muted); }
.side-foot .data-notice { color: var(--faint); }
.panel .data-notice { padding-top: 8px; border-top: 1px solid var(--line); }
td.q.fmv { font-style: italic; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.search-btn {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--deck); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; font: inherit; text-align: left;
}
.search-btn { min-width: 0; }
.search-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-btn:hover { border-color: var(--faint); }
.search-btn kbd { margin-left: auto; }
kbd { font: 0.75rem var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--deck-2); }
.top .spacer { flex: 1; }
.sym-ctx { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--deck); font-size: 0.8125rem; white-space: nowrap; }
.sym-ctx .sc-sym { font-weight: 700; color: var(--brass); margin-right: 4px; }
.sym-ctx .sc-go { color: var(--muted); padding: 2px 7px; border-radius: 999px; }
.sym-ctx .sc-go:hover { color: var(--text); background: var(--deck-2); text-decoration: none; }
.sym-ctx .sc-x { background: none; border: 0; color: var(--faint); padding: 0 7px; font-size: 1rem; line-height: 1; cursor: pointer; }
.sym-ctx .sc-x:hover { color: var(--text); }
@media (max-width: 720px) { .sym-ctx .sc-go { display: none; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--deck); border-color: var(--line); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--deck); cursor: pointer; color: var(--text); font: inherit; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--brass-ink); font-weight: 700; font-size: 0.75rem; }

.page { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font: var(--display-w) 2.125rem/1.1 var(--serif); letter-spacing: .1px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- panels ---------------- */
.panel { background: var(--deck); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.panel + .panel { margin-top: 16px; }
.grid-2 > .panel, .grid-3 > .panel, .split > .panel { margin-top: 0; }
.panel h2 { margin: 0 0 12px; font-size: 0.9375rem; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel h2 .hint { font-weight: 400; color: var(--muted); font-size: 0.8125rem; }
.panel h2 .right { margin-left: auto; font-weight: 400; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.foot { color: var(--faint); font-size: 0.75rem; margin-top: 10px; }

/* ---------------- controls ---------------- */
button, .btn {
  font: 500 0.8125rem/1 var(--font); color: var(--text); background: var(--deck-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--faint); text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }
button.primary, .btn.primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--bear); }
button.ghost { background: none; border-color: transparent; color: var(--muted); }
button.ghost:hover { color: var(--text); background: var(--deck-2); }
button.small { padding: 6px 10px; font-size: 0.75rem; }
button svg { width: 15px; height: 15px; }
input, select, textarea {
  font: 0.875rem var(--font); color: var(--text); background: var(--deck-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 22%, transparent); }
input[type="checkbox"] { accent-color: var(--brass); width: 15px; height: 15px; }
label.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { color: var(--muted); font-size: 0.8125rem; }

.seg { display: inline-flex; background: var(--deck-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 6px 11px; border-radius: 7px; font-size: 0.8125rem; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--deck); color: var(--text); box-shadow: 0 1px 0 var(--line), inset 0 0 0 1px var(--line); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-color: var(--brass); }
.tabs.wrap { flex-wrap: wrap; row-gap: 0; }

/* labels and chips */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; line-height: 1.6; }
.tag.buy { color: var(--bull); background: color-mix(in srgb, var(--bull) 12%, transparent); }
.tag.setup { color: var(--wait); background: color-mix(in srgb, var(--wait) 12%, transparent); }
.tag.hold { color: var(--hold); }
.tag.avoid { color: var(--bear); background: color-mix(in srgb, var(--bear) 10%, transparent); }
.tag.none { color: var(--faint); }
.tag.bull { color: var(--bull); }
.tag.bear { color: var(--bear); }
.tag.small { font-size: 0.6875rem; padding: 0 7px; }
.tag.conf-High { color: var(--bull); }
.tag.conf-Medium { color: var(--warn); }
.tag.conf-Low { color: var(--bear); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--deck-2); color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: 0.8125rem; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.chip b { color: var(--text); font-weight: 600; }
.chip.on { border-color: currentColor; }
.chip.on.buy { color: var(--bull); } .chip.on.setup { color: var(--wait); } .chip.on.hold { color: var(--hold); }
.chip.on.avoid { color: var(--bear); } .chip.on.none { color: var(--text); }
.trend { font-weight: 600; white-space: nowrap; }
.trend.up { color: var(--bull); }
.trend.down { color: var(--bear); }

/* messages */
.msg { padding: 10px 12px; border-radius: 8px; background: var(--deck-2); border: 1px solid var(--line); color: var(--muted); }
.msg.err { color: var(--bear); border-color: color-mix(in srgb, var(--bear) 45%, var(--line)); }
.msg.ok { color: var(--bull); }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 0.9375rem; margin-bottom: 4px; }
.skeleton { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--deck-2), var(--line-soft), var(--deck-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; margin: 8px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* key/value */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.stat .k { color: var(--muted); font-size: 0.75rem; }
.stat .v { font-size: 1.125rem; font-weight: 600; }
.stat .v small { font-size: 0.75rem; font-weight: 500; margin-left: 4px; }

/* ---------------- data grid ---------------- */
.dg { position: relative; }
.dg-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.dg-bar .filter { width: 220px; }
.dg-bar .info { color: var(--muted); font-size: 0.8125rem; }
.dg-bar .right { margin-left: auto; display: flex; gap: 6px; }
.dg-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); max-height: 70vh; }
table { border-collapse: collapse; width: 100%; }
.dg table { min-width: 100%; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; background: var(--deck-2); color: var(--muted); font-weight: 500; font-size: 0.78125rem; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th .arrow { color: var(--brass); margin-left: 3px; }
tbody tr:hover td { background: color-mix(in srgb, var(--deck-2) 70%, transparent); }
tbody tr.click { cursor: pointer; }
td .sub { display: block; color: var(--faint); font-size: 0.75rem; }
td.tick b { font-weight: 600; }
.plain th { position: static; background: none; border-bottom: 1px solid var(--line); }
.plain td, .plain th { padding: 7px 8px; }
.dg-more { text-align: center; padding: 10px; }

/* column menu */
.menu { position: absolute; z-index: 40; min-width: 200px; background: var(--deck); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 6px; max-height: 360px; overflow: auto; }
.menu label { display: flex; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.menu label:hover { background: var(--deck-2); }
.menu button.item { width: 100%; justify-content: flex-start; background: none; border: 0; padding: 8px; }
.menu button.item:hover { background: var(--deck-2); }

/* ---------------- dialogs, toasts, palette ---------------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(4, 10, 20, .55); display: grid; place-items: start center; padding: 10vh 16px 16px; }
.dialog { width: 100%; max-width: 480px; background: var(--deck); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 20px 22px; }
.dialog h3 { margin: 0 0 12px; font: var(--display-w) 1.5rem/1.2 var(--serif); }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.palette { width: 100%; max-width: 620px; background: var(--deck); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 1rem; background: var(--deck); }
.palette input:focus { box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.palette li.sel { background: var(--deck-2); box-shadow: inset 3px 0 0 var(--brass); }
.palette li b { min-width: 64px; }
.palette li .name { color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette li .tag { margin-left: auto; }
.palette .hint { padding: 8px 18px 12px; color: var(--faint); font-size: 0.75rem; display: flex; gap: 14px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--deck); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: 8px; padding: 10px 14px; box-shadow: var(--shadow); max-width: 380px; animation: rise .18s ease-out; }
.toast.err { border-left-color: var(--bear); }
.toast { display: flex; gap: 10px; align-items: flex-start; }
.toast-msg { flex: 1; min-width: 0; }
.toast-x { flex: none; background: none; border: 0; padding: 0 2px; margin: -2px -6px 0 0; font-size: 1.25em; line-height: 1; color: var(--muted); cursor: pointer; }
.toast-x:hover { color: var(--text); }
.toast.err { border-left-width: 4px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------------- index renko staircase (Bitcoin / gold cards beside the train) and the watchlist panel ---------------- */
.ix-renko { display: block; width: 100%; height: auto; max-height: 210px; }
.ix-renko .up { fill: var(--bull); }
.ix-renko .dn { fill: var(--bear); }
.ix-renko rect:hover { stroke: var(--text); stroke-width: 1.5; }
.ix-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted); margin-top: 8px; }

.regime { font-weight: 600; }
.flips { margin-top: 10px; font-size: 0.8125rem; }
.flips a { margin-right: 6px; }
.labelbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--deck-2); margin: 10px 0 8px; }
.labelbar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.8125rem; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ---------------- company page ---------------- */
.co-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.co-head h1 { margin: 0; font: var(--display-w) 2.5rem/1 var(--serif); }
.co-head .name { color: var(--muted); margin-top: 6px; }
.co-head .price { font-size: 1.625rem; font-weight: 600; }
.co-head .tools { margin-left: auto; display: flex; gap: 8px; }
.verdict { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--deck); margin-bottom: 16px; }
.verdict .why { color: var(--muted); flex: 1; min-width: 240px; }
.levels { display: flex; gap: 22px; flex-wrap: wrap; }
.chart-box { position: relative; height: 440px; }
.about-text p { margin: 0 0 8px; line-height: 1.55; }
.about-logo { float: right; max-width: 110px; max-height: 80px; margin: 0 0 8px 16px; border-radius: 6px; background: #fff; padding: 4px; }
.interest { width: 100%; height: 120px; display: block; }
.interest .area { fill: color-mix(in srgb, var(--wait) 18%, transparent); }
.interest .ln { fill: none; stroke: var(--wait); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.interest .typ { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.interest .spk { fill: var(--brass); }
ul.news { list-style: none; margin: 0; padding: 0; }
ul.news li { padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
ul.news li:last-child { border-bottom: 0; }
ul.news li a { font-weight: 500; }
ul.news .meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.news-grid { align-items: start; }
.zoom-tools { display: flex; gap: 10px; align-items: center; }
.zoom-tools .seg button { min-width: 34px; font-weight: 600; }
.zoom-hint { font-size: 0.75rem; }
.zoom-box { position: absolute; top: 0; bottom: 28px; z-index: 4; pointer-events: none;
  background: color-mix(in srgb, var(--brass) 14%, transparent); border-left: 1px solid var(--brass); border-right: 1px solid var(--brass); }
@media (max-width: 900px) { .zoom-hint { display: none; } }
.chart-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.chart-tools .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fchecks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.fcheck { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--deck-2); }
.fcheck b { display: block; font-weight: 600; font-size: 0.8125rem; }
.fcheck b::before { content: "–  "; color: var(--faint); }
.fcheck.yes b::before { content: "✓  "; color: var(--bull); }
.fcheck.no b::before { content: "✕  "; color: var(--bear); }
.fcheck span { color: var(--muted); font-size: 0.75rem; }
.fair { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline; }

/* ---------------- login ---------------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--brass) 14%, transparent), transparent 55%), var(--ink); }
.login .box { width: 100%; max-width: 380px; }
.login .brand { justify-content: center; padding-bottom: 26px; }
.login button.primary { width: 100%; justify-content: center; padding: 11px; margin-top: 6px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .split, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 30; flex-direction: row; padding: 4px 6px;
    border-right: 0; border-top: 1px solid var(--line); overflow: visible;
  }
  .side .brand, .side .group, .side .side-foot, .nav a.desk { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav a { flex-direction: column; gap: 2px; font-size: 0.6875rem; padding: 6px 4px; flex: 1; justify-content: center; text-align: center; }
  .nav a.active { box-shadow: inset 0 3px 0 var(--brass); }
  .nav .count { display: none; }
  .top { padding: 10px 14px; }
  .page { padding: 18px 14px 90px; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.75rem; }
  .user-chip .uname, .search-btn kbd { display: none; }
  .search-btn { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .chart-box { height: 340px; }
  .chart-tools .right { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- waiting: top progress bar for any data call, spinners for panels and buttons ---------------- */
html::before { content: ""; position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 100; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0%, var(--brass) 35%, var(--wait) 65%, transparent 100%); background-size: 50% 100%;
  background-repeat: no-repeat; transition: opacity .2s; }
html.busy::before { opacity: 1; animation: busybar 1.1s linear infinite; }
@keyframes busybar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--brass) 25%, transparent);
  border-top-color: var(--brass); animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 8px; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 0.84375rem; padding: 22px 12px; text-align: center; }
.loading.page { padding: 90px 12px; font-size: 0.9375rem; gap: 12px; }
/* the loading picture everywhere (core.js bricks()): renko bricks climbing, two red pull-backs, fading in one by one */
.rb-bricks { --b: 8px; --s: 5px; display: inline-flex; align-items: flex-end; gap: calc(var(--b) / 4); height: calc(var(--s) * 6 + var(--b)); flex: none; }
.rb-bricks.sm { --b: 5px; --s: 3px; }
.rb-bricks.lg { --b: 12px; --s: 8px; }
.rb-bricks i { width: var(--b); height: var(--b); border-radius: 2px; background: var(--bull); opacity: 0; animation: rb-brick 2.1s ease-in-out infinite; }
.rb-bricks i:nth-child(1) { margin-bottom: 0; animation-delay: 0s; }
.rb-bricks i:nth-child(2) { margin-bottom: var(--s); animation-delay: .16s; }
.rb-bricks i:nth-child(3) { margin-bottom: calc(var(--s) * 2); animation-delay: .32s; }
.rb-bricks i:nth-child(4) { margin-bottom: var(--s); animation-delay: .48s; background: var(--bear); }
.rb-bricks i:nth-child(5) { margin-bottom: calc(var(--s) * 4); animation-delay: .64s; }
.rb-bricks i:nth-child(6) { margin-bottom: calc(var(--s) * 3); animation-delay: .8s; background: var(--bear); }
.rb-bricks i:nth-child(7) { margin-bottom: calc(var(--s) * 6); animation-delay: .96s; }
@keyframes rb-brick { 0% { opacity: 0; transform: translateY(calc(var(--b) / 2)); } 18%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rb-bricks i { animation: none; opacity: 1; } }
.loading.inline { flex-direction: row; padding: 8px; }
button.working { cursor: progress; }
button.working .spin { width: 12px; height: 12px; margin-right: 6px; border-color: color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; }
@media (prefers-reduced-motion: reduce) { .spin, html.busy::before { animation-duration: 3s; } }
button.working::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -2px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
button.working:has(.spin)::before { display: none; }

button.ghost.danger { color: var(--bear); }

/* ---------------- AI Coach ---------------- */
.coach { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.coach > .panel { margin-top: 0; }
.coach-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 100px); }
.coach-convs { overflow: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -6px; padding: 0 6px; }
.coach-conv { padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; }
.coach-conv:hover { background: var(--deck-2); }
.coach-conv.on { background: var(--deck-2); border-color: var(--line); box-shadow: inset 3px 0 0 var(--brass); }
.coach-conv .t { font-size: 0.84375rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.coach-conv .m { display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 0.71875rem; margin-top: 2px; }
.coach-conv .m button { padding: 0 6px; visibility: hidden; }
.coach-conv:hover .m button, .coach-conv.on .m button { visibility: visible; }
.coach-main { display: flex; flex-direction: column; min-height: calc(100vh - 210px); padding: 0; overflow: hidden; }
.coach-thread { flex: 1; overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 300px); min-height: 320px; }
.cm-q { align-self: flex-end; max-width: 80%; background: color-mix(in srgb, var(--brass) 16%, var(--deck-2)); border: 1px solid color-mix(in srgb, var(--brass) 30%, var(--line));
  padding: 9px 13px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; }
.cm-a { align-self: stretch; max-width: 100%; background: var(--deck-2); border: 1px solid var(--line); padding: 12px 15px; border-radius: 14px 14px 14px 4px; }
.cm-a .md { line-height: 1.6; }
.cm-a .md p { margin: 0 0 9px; }
.cm-a .md h4 { margin: 12px 0 6px; font-size: 0.90625rem; }
.cm-a .md ul, .cm-a .md ol { margin: 0 0 9px; padding-left: 22px; }
.cm-a .md li { margin: 2px 0; }
.cm-a .md code { background: var(--deck); padding: 1px 5px; border-radius: 4px; font-size: 0.78125rem; }
.cm-a .md .dg-wrap { margin: 6px 0 10px; }
.md-t { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.md-t th { text-align: left; font-weight: 600; color: var(--muted); white-space: nowrap; }
.md-t th.n, .md-t td.n { text-align: right; white-space: nowrap; }
.md-t th.c, .md-t td.c { text-align: center; }
.md-t td { border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.md-t tbody tr:last-child td { border-bottom: 0; }
.md-t td:first-child { color: var(--text); }
.cm-a .md pre { background: var(--deck); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow: auto; font-size: 0.75rem; }
.cm-src { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 0.75rem; }
.cm-src .k { color: var(--muted); font-weight: 600; margin-right: 2px; }
.cs { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--deck); border: 1px solid var(--line); color: var(--muted); }
.cs.bad { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.cs.link { color: var(--text); }
.cs.link:hover { border-color: var(--brass); text-decoration: none; }
.cm-warn { margin-top: 8px; font-size: 0.78125rem; color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border-radius: 6px; padding: 6px 9px; }
.coach-ask { border-top: 1px solid var(--line); padding: 12px 16px; background: var(--deck); }
.coach-ask textarea { width: 100%; resize: vertical; min-height: 52px; max-height: 220px; }
.coach-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.coach-ctx { font-size: 0.78125rem; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.coach-disc { margin: 8px 0 0; font-size: 0.71875rem; line-height: 1.45; color: var(--faint); }
.coach-t { display: inline-flex; align-items: center; gap: 1px; padding: 0 2px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--deck-2); }
.coach-t button.small { padding: 2px 6px; }
.coach-hello { margin: auto 0; text-align: center; padding: 16px 6px; }
.coach-hello h2 { font: var(--display-w) 1.5rem/1.25 var(--serif); margin: 0 0 6px; }
.coach-hello p { max-width: 620px; margin: 0 auto 14px; }
.coach-sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 760px; margin: 0 auto; }
.coach-sugg .chip { cursor: pointer; text-align: left; font-size: 0.8125rem; padding: 7px 12px; }
.coach-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.coach-level { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--radius); height: 100%; }
.coach-level .i { font-size: 1.5rem; }
.coach-level b { font-size: 0.9375rem; }
.coach-level span:last-child { color: var(--muted); font-size: 0.8125rem; font-weight: 400; white-space: normal; }
.coach-level:hover { border-color: var(--brass); }
/* "Ask the AI Coach": the spark button next to anything the Coach can explain */
.xq { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 22px; height: 22px; margin-left: 6px;
  vertical-align: -5px; border-radius: 50%; color: var(--brass); text-decoration: none !important; font: 600 0.71875rem/1 var(--font);
  background: color-mix(in srgb, var(--brass) 14%, var(--deck)); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent);
  transition: background .15s, color .15s, box-shadow .15s, transform .15s; }
.xq svg { width: 13px; height: 13px; flex: none; }
.xq:hover, .xq:focus-visible { color: var(--brass-ink); background: var(--brass); border-color: var(--brass); outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brass) 22%, transparent); transform: scale(1.06); }
.xq.pill { width: auto; padding: 0 9px 0 7px; border-radius: 999px; }
.xq-lock { display: none; }
/* the Coach is not open to this account yet (email not confirmed, or not in the plan): a small lock on the spark */
/* the AI Coach switched off (Admin > Features): every link to it and every spark disappears */
body[data-coach="off"] a[href^="#/coach"], body[data-coach="off"] .xq, body[data-coach="off"] .bb-coach { display: none !important; }
body[data-coach="verify"] .xq-lock { display: block; position: absolute; right: -4px; bottom: -4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--deck) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0a24a' stroke-width='3' stroke-linecap='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 8px no-repeat;
  border: 1px solid var(--line); }
@media (max-width: 900px) {
  .coach { grid-template-columns: 1fr; }
  .coach-side { position: static; max-height: none; }
  .coach-convs { max-height: 180px; }
  .coach-levels { grid-template-columns: 1fr; }
  .coach-thread { max-height: none; }
}
.coach-sugg .chip { white-space: normal; max-width: 100%; line-height: 1.35; }
.coach-main { min-height: 0; }
.coach-thread { max-height: calc(100vh - 340px); }

/* Chart legends: a short line in the series' own colour (solid or dotted) before its name. */
.legend { display: inline-flex; flex-wrap: wrap; gap: 14px; font-weight: 400; font-size: 0.8125rem; color: var(--muted); margin-left: 10px; vertical-align: middle; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend .lg i { display: inline-block; width: 18px; height: 0; border-top: 2px solid currentColor; }
.legend .lg i.dot { border-top-style: dotted; }

/* Chart drawings (draw.js): an SVG layer over the chart. Only the shapes take clicks unless a tool is picked. */
.draw-tools { margin-top: -2px; }
.draw-tools .swatch { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; vertical-align: middle; margin-right: 4px; }
.draw-tools .swatch.on { border-color: var(--text); }
.draw-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: visible; }
.draw-layer.active { pointer-events: auto; cursor: crosshair; }
.draw-layer .drw .hit { stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.draw-layer.active .drw .hit { pointer-events: none; }
.draw-layer .drw-label { font-size: 0.6875rem; font-family: inherit; }

/* ---------------- plans and account ---------------- */
.plan-badge { font: 600 0.6875rem/1 var(--font); letter-spacing: .4px; text-transform: uppercase; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); margin-left: 8px; vertical-align: middle; }
.plan-badge.paid { border-color: var(--brass); color: var(--brass); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.plan-card.current { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.plan-card .plan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.plan-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.84375rem; line-height: 1.55; }
button.link { background: none; border: 0; padding: 0; color: var(--brass); font: inherit; cursor: pointer; text-decoration: underline; }
.verify-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 14px; margin: 0 0 16px;
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--brass) 10%, transparent); font-size: 0.875rem; }
.login .tabs-auth { display: flex; gap: 16px; justify-content: center; margin: 0 0 14px; font-size: 0.875rem; }
.login .tabs-auth a { color: var(--muted); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.login .tabs-auth a.on { color: var(--text); border-color: var(--brass); }
#banner:empty { display: none; }
#banner { padding: 16px 28px 0; max-width: 1480px; }
#banner .verify-banner { margin: 0; }
/* "Confirm your email": the only page until the link is clicked (the menu and search are hidden) */
body[data-gate] .nav, body[data-gate] .side-foot, body[data-gate] .top > :not(#themeBtn):not(.spacer), body[data-gate] .rail { display: none; }
.gate { max-width: 520px; margin: 6vh auto 0; }
.gate h1 { margin: 0 0 10px; font-size: 1.5em; }
.gate-act { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.gate-fix summary { cursor: pointer; color: var(--muted); }
.gate-form { display: grid; gap: 10px; margin-top: 10px; }
.gate-form button { justify-self: start; }
.gate .foot { margin: 18px 0 0; }
@media (max-width: 760px) { #banner { padding: 12px 14px 0; } }
/* Admin > Email: a problem that needs the admin's attention */
.callout { padding: 10px 14px; border-radius: var(--radius); font-size: 0.875rem; line-height: 1.5;
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); background: color-mix(in srgb, var(--brass) 10%, transparent); }
.callout.risk { margin: 0 0 14px; font-size: 0.84375rem; border-color: color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 9%, transparent); }
.callout.risk b { color: var(--warn); }
.callout.bad { border-color: color-mix(in srgb, var(--bear) 50%, transparent); background: color-mix(in srgb, var(--bear) 9%, transparent); }

/* ---------------- site footer (app, sign-in and the public pages) ---------------- */
.site-foot { border-top: 1px solid var(--line); padding: 22px 28px 26px; max-width: 1480px; width: 100%; color: var(--muted); font-size: 0.8125rem; }
.site-foot:empty { display: none; }
.sf-top { display: flex; align-items: center; gap: 14px 26px; flex-wrap: wrap; margin-bottom: 14px; }
.sf-brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; }
.sf-links { display: flex; gap: 6px 20px; flex-wrap: wrap; }
.sf-links a { color: var(--muted); }
.sf-links a:hover { color: var(--text); }
.sf-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.sf-social { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--deck); font-size: 0.78125rem; text-decoration: none !important; }
.sf-social:hover { color: var(--brass); border-color: var(--brass); }
.sf-risk { margin: 0 0 10px; line-height: 1.6; font-size: 0.78125rem; color: var(--faint); max-width: 1100px; }
.sf-risk b { color: var(--muted); }
.sf-copy { margin: 0; font-size: 0.75rem; color: var(--faint); }
.login .site-foot { margin-top: 28px; padding: 18px 0 0; max-width: 760px; }
.login .sf-top { justify-content: center; }
.login .sf-socials { margin-left: 0; }

/* ---------------- public pages: About, Contact, Terms, Privacy ---------------- */
.pub { min-height: 100vh; display: flex; flex-direction: column; }
.pub-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--deck); }
.pub-top .brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none !important; }
.pub-top nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.875rem; }
.pub-top nav a { color: var(--muted); }
.pub-top nav a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brass); }
.pub-top .go { margin-left: auto; }
.doc { max-width: 820px; width: 100%; margin: 0 auto; padding: 34px 28px 50px; line-height: 1.65; font-size: 0.9375rem; }
.doc h1 { font: var(--display-w) 2.5rem/1.1 var(--serif); margin: 0 0 6px; }
.doc .updated { color: var(--faint); font-size: 0.8125rem; margin-bottom: 22px; }
.doc h2 { font: 600 1.125rem/1.3 var(--font); margin: 30px 0 8px; }
.doc h3 { font: 600 0.9375rem/1.3 var(--font); margin: 18px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc .lead { font-size: 1.0625rem; color: var(--muted); }
.doc .caps { text-transform: uppercase; font-size: 0.84375rem; letter-spacing: .01em; }
.doc .toc { columns: 2; column-gap: 28px; font-size: 0.875rem; padding-left: 18px; margin: 0 0 8px; }
.doc .callout { margin: 18px 0; }
.doc .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.doc .grid .panel h3 { margin-top: 0; }
.ph { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.counsel { border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 7%, transparent); padding: 8px 12px; margin: 10px 0;
  font-size: 0.8125rem; color: var(--muted); border-radius: 0 6px 6px 0; }
.counsel::before { content: "Note for counsel: "; font-weight: 700; color: var(--warn); }
#legalDraft { margin: 0 0 18px; }
.contact-form { display: grid; gap: 4px; max-width: 560px; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 700px) {
  .doc { padding: 24px 16px 40px; } .doc h1 { font-size: 2rem; } .doc .toc { columns: 1; } .doc .grid { grid-template-columns: 1fr; }
  .pub-top, .site-foot { padding-left: 16px; padding-right: 16px; } .pub-top .go { margin-left: 0; } .sf-socials { margin-left: 0; }
}
.pub-top .brand { padding: 0; }
.terms-ok { align-items: flex-start !important; gap: 8px; margin: 0 0 12px; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.terms-ok input { margin-top: 2px; flex: none; }

/* ---------------- home: top headlines and a tighter breadth / options row ---------------- */
/* Home: the greeting sits higher; the headlines are compact, the market mood beside them */
:root { --bull-soft: color-mix(in srgb, var(--bull) 55%, var(--brass)); }
.home-head { align-items: center; margin-bottom: 12px; flex-wrap: nowrap; }
/* Home header: a compact greeting, the market status beside it, the market mood on the right */
.home-head .hh-l { flex: 1; min-width: 0; }
.home-head .hh-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-head h1 { font-size: 1.375rem; }
.home-head .sub { font-size: 0.75rem; margin-top: 3px; }
.home-head .mkt-badge { align-items: center; gap: 8px; padding: 4px 11px; border-radius: 999px; min-width: 0; }
.home-head .mkt-badge > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.home-head .mkt-badge b { font-size: 0.78125rem; }
.home-head .mkt-next { font-size: 0.75rem; }
.home-head .mkt-time { font-size: 0.6875rem; }
.home-head .mkt-dot { width: 8px; height: 8px; margin-top: 0; }
.hh-mood { flex: none; position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--deck); }
.hh-mood:empty { display: none; }
.hh-mood .mood-main { gap: 8px; }
.hh-mood .mood-dial { width: 72px; }
.hh-mood .mood-read { gap: 0; }
.hh-mood .mood-h { font-size: 0.6875rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.hh-mood .mood-num { font-size: 1.25rem; }
.hh-mood .mood-label { font-size: 0.75rem; }
.hh-mood .mood-was { display: flex; gap: 8px; font-size: 0.65625rem; }
.mood-pop { align-self: stretch; display: flex; align-items: center; font-size: 0.71875rem; border-left: 1px solid var(--line-soft); padding-left: 10px; }
.mood-pop > summary { cursor: pointer; color: var(--brass); list-style: none; }
.mood-pop > summary::-webkit-details-marker { display: none; }
.mood-pop > summary::after { content: " ▾"; }
.mood-pop[open] > summary::after { content: " ▴"; }
.mood-pop-in { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 320px; padding: 10px 12px; background: var(--deck); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.mood-pop-in > p { margin: 0 0 6px; }
@media (max-width: 760px) { .home-head { flex-wrap: wrap; } .hh-mood { width: 100%; } .mood-pop-in { left: 0; right: auto; width: min(320px, 90vw); } }
.mood { padding: 10px 16px 8px; }
.mood h2 { margin: 0 0 2px; font-size: 0.8125rem; display: flex; align-items: center; gap: 6px; }
.mood-main { display: flex; align-items: center; gap: 12px; }
.mood-dial { width: 118px; flex: none; }
.mood-dial .needle { stroke: var(--text); stroke-width: 3.5; stroke-linecap: round; }
.mood-dial .hub { fill: var(--text); }
.mood-read { display: grid; gap: 2px; min-width: 0; }
.mood-num { font: 600 1.875rem/1 var(--font); }
.mood-label { font-weight: 600; font-size: 0.8125rem; }
.mood-was { display: grid; font-size: 0.6875rem; color: var(--muted); }
.mood-parts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
.mood-parts li { display: grid; grid-template-columns: 70px 1fr 22px; column-gap: 8px; align-items: center; font-size: 0.71875rem; cursor: help; }
.mp-n { color: var(--muted); }
.mp-bar { height: 5px; border-radius: 3px; background: var(--deck-2); overflow: hidden; }
.mp-bar i { display: block; height: 100%; border-radius: 3px; }
.mp-s { text-align: right; font-variant-numeric: tabular-nums; }
.mood-more { margin-top: 5px; font-size: 0.71875rem; }
.mood-more summary { cursor: pointer; color: var(--brass); }
.mood-more ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 4px; line-height: 1.4; }
.mood-more p { margin: 6px 0 0; line-height: 1.4; }
.ix-foot { margin-top: 4px; font-size: 0.78125rem; }

/* ---------------- right rail: watchlist and alerts beside every page ---------------- */
.shell.rail-on { grid-template-columns: var(--sidebar) minmax(0, 1fr) 300px; }
@media (max-width: 1399px) {
  .shell.rail-on { grid-template-columns: var(--sidebar) minmax(0, 1fr) 260px; }
  .shell.rail-on .user-chip .uname, .shell.rail-on .search-btn kbd { display: none; }   /* laptop with the rail docked: the top bar keeps to its column */
}
.rail { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--deck); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; }
.rail[hidden] { display: none; }
.shell.rail-over .rail { position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); z-index: 35; box-shadow: var(--shadow); }
.rail-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; background: var(--deck);
  border-bottom: 1px solid var(--line-soft); }
.rail-head .seg { flex: 1; display: flex; }
.rail-head .seg button { flex: 1; }
.rail-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; flex: 0 1 auto; min-height: 150px; }   /* sized to the list: room for the headlines under it */
/* the headlines under the watchlist (the newspaper button shows / hides them) */
.rail-news { flex: 0 1 auto; min-height: 120px; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.rn-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.rn-h b { font-size: 0.8125rem; }
.rn-h .faint { font-size: 0.65625rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rn-x { width: 24px; height: 24px; padding: 4px; align-self: center; }
.rn-list { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.rn-list li { padding: 5px 0; border-top: 1px solid var(--line-soft); display: grid; gap: 1px; }
.rn-list li:first-child { border-top: 0; }
.rn-list a { color: var(--text); font-size: 0.75rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rn-list a:hover { color: var(--brass); }
.rn-list .faint { font-size: 0.65625rem; }
.rail.extra-only .rail-news { border-top: 0; }
/* Only the list scrolls (head, picker and add box stay put), with a thin bar inset from the page's own scroll bar;
   scrolling the list never scrolls the page behind it. */
.rail .rail-list, .rail .rail-alerts { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: -4px; padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.rail-list::-webkit-scrollbar, .rail-alerts::-webkit-scrollbar { width: 6px; }
.rail-list::-webkit-scrollbar-thumb, .rail-alerts::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.rail-list::-webkit-scrollbar-track, .rail-alerts::-webkit-scrollbar-track { background: transparent; }
.rail-pick select { width: 100%; padding: 6px 8px; font-size: 0.8125rem; }
.rail-foot { flex: none; }
.rail-add { display: flex; gap: 6px; }
.rail-add input { flex: 1; min-width: 0; text-transform: uppercase; padding: 7px 10px; font-size: 0.8125rem; }
.rail-add input::placeholder { text-transform: none; }
.rail-add .icon-btn { border-color: var(--line); background: var(--deck-2); }
.rail-list, .rail-alerts { list-style: none; margin: 0; padding: 0; }
.rail-list li { position: relative; border-bottom: 1px solid var(--line-soft); }
.rail-list .rw { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 26px 8px 6px; border-radius: 6px;
  color: var(--text); text-decoration: none !important; }
.rail-list .rw:hover { background: var(--deck-2); }
.rw-t { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rw-t b { font-size: 0.875rem; }
.rw-t .trend, .rw-t .faint { font-size: 0.71875rem; }
.rw-p { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.75rem; line-height: 1.25; }
.rw-p b { font-size: 0.84375rem; font-weight: 600; }
.rw-p .lv { display: flex; flex-direction: column; align-items: flex-end; }
/* Live prices (Admin > Features "Live prices on watchlists"): a small dot marks a price read during the session. */
.lv .lv-p { font-weight: inherit; }
.rw-p .lv .lv-p { font-weight: 600; }
.lv.is-live .lv-p::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--bull); margin-right: 5px; vertical-align: middle; animation: lv-pulse 2.4s ease-in-out infinite; }
@keyframes lv-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .lv.is-live .lv-p::before { animation: none; } }
.rw-x { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center;
  border: 0; background: none; color: var(--faint); border-radius: 6px; cursor: pointer; opacity: 0; }
.rw-x svg { width: 13px; height: 13px; }
.rail-list li:hover .rw-x, .rw-x:focus-visible { opacity: 1; }
.rw-x:hover { color: var(--bear); background: var(--deck-2); }
@media (hover: none) { .rw-x { opacity: .7; } }
.rail-alerts li { padding: 9px 4px; border-bottom: 1px solid var(--line-soft); }
.rail-alerts li div { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; }
.rail-alerts li .faint { font-size: 0.71875rem; white-space: nowrap; }
.rail-alerts p { margin: 3px 0 0; color: var(--muted); font-size: 0.78125rem; line-height: 1.45; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rail-empty { color: var(--muted); font-size: 0.8125rem; padding: 14px 4px; text-align: center; }
.rail-up { font-size: 0.78125rem; line-height: 1.5; padding: 9px 11px; border-radius: 8px; color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); background: color-mix(in srgb, var(--brass) 8%, transparent); }
.rail-up b { color: var(--text); }
.rail-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.78125rem; padding: 2px 4px; }
.rail-btn { position: relative; }
.rail-btn.on { color: var(--brass); background: var(--deck); border-color: var(--line); }
.rail-badge { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center;
  background: var(--bear); color: #fff; font: 700 0.625rem/1 var(--font); border: 2px solid var(--ink); }
.rail-badge[hidden] { display: none; }
@media (max-width: 860px) { .shell.rail-over .rail { bottom: 66px; border-bottom: 1px solid var(--line); } }

/* ---- RenkoBubbles ---- */
.bb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; }
.bb-controls:empty { display: none; }
.field.inline { flex-direction: row; align-items: center; gap: 7px; margin: 0; }
.field.inline > span { white-space: nowrap; }
.field.inline input[type=number] { width: 78px; }
.bb-basket .btn.small, .bb-acts .btn.small { padding: 6px 10px; font-size: 0.75rem; }
.bb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bb-filter { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--deck-2); font-size: 0.78125rem; }
.bb-filter b { font-weight: 600; }
.bb-filter input { width: 62px; padding: 3px 6px; font-size: 0.78125rem; }
.bb-filter button.link { text-decoration: none; color: var(--muted); font-size: 1rem; line-height: 1; }
.bb-filters .check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8125rem; }
.bb-basket { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line));
  border-radius: 10px; background: color-mix(in srgb, var(--brass) 7%, var(--deck)); }
.bb-basket[hidden] { display: none; }
.bb-bl { display: inline-flex; align-items: center; gap: 6px; color: var(--brass); font-weight: 600; font-size: 0.8125rem; margin-right: 4px; }
.bb-bl svg { width: 15px; height: 15px; }
.bb-basket .chip { color: var(--brass); cursor: default; }
.bb-basket .chip button.link { text-decoration: none; color: inherit; font-size: 0.9375rem; line-height: 1; }
.bb-basket .btn.primary { margin-left: auto; }
.bb-peers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--deck-2); font-size: 0.8125rem; }
.bb-peers[hidden] { display: none; }
.bb-pl { font-weight: 600; }
.bb-out { color: var(--muted); }
.bb-peers .btn.small { margin-left: auto; padding: 6px 10px; font-size: 0.75rem; }
.bb-stage { position: relative; padding: 10px; overflow: hidden; }
.bb-svg { display: block; outline: none; width: 100%; height: auto; font-family: var(--font); user-select: none; }
.bb { cursor: pointer; outline: none; }
.bb circle { transition: fill-opacity .12s; }
.bb:hover > circle:first-child, .bb:focus-visible > circle:first-child { fill-opacity: .34; }
.bb.faded { opacity: .45; }
.bb.faded text { fill: var(--faint); }
.bb-sel { stroke: var(--brass); stroke-width: 3; opacity: 0; pointer-events: none; }
.bb.picked .bb-sel { opacity: 1; filter: drop-shadow(0 0 4px var(--brass)); }
.bb.focus .bb-sel { opacity: 1; stroke: var(--text); stroke-width: 2.5; }
.bb.focus.picked .bb-sel { stroke: var(--brass); }
.bb:focus-visible .bb-sel { opacity: .6; stroke-dasharray: 3 3; }
.bb-tip, .bb-pop { position: absolute; z-index: 5; min-width: 230px; max-width: 300px; padding: 10px 12px; border-radius: 10px; background: var(--deck);
  border: 1px solid var(--line); box-shadow: 0 12px 30px rgb(0 0 0 / .32); font-size: 0.78125rem; }
.bb-tip { pointer-events: none; }
.bb-tip[hidden] { display: none; }
.bb-tip .kv, .bb-pop .kv { padding: 3px 0; }
.bb-tip-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.bb-tip-h b { font-size: 0.9375rem; }
.bb-tip-h span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-pop { z-index: 6; }
.bb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bb-coach { display: inline-flex; align-items: center; gap: 5px; color: var(--brass); border-color: color-mix(in srgb, var(--brass) 50%, var(--line)); }
.bb-coach svg { width: 13px; height: 13px; }
.bb-3d { height: min(680px, 72vh); min-height: 420px; border-radius: 10px; overflow: hidden; background: var(--deck); }
.bb-3d canvas { cursor: grab; touch-action: none; }
.bb-3d canvas:active { cursor: grabbing; }
.bb-cap { color: var(--faint); font-size: 0.75rem; text-align: center; padding: 8px 0 2px; }
.bb-legend { color: var(--muted); font-size: 0.78125rem; line-height: 1.55; margin: 10px 2px 0; }
.bb-legend b { color: var(--text); font-weight: 600; }
@media (max-width: 760px) {
  .bb-stage { padding: 6px; }
  .bb-3d { height: 460px; min-height: 0; }
  .bb-basket .btn.primary { margin-left: 0; }
  .bb-tip { display: none; }
}

/* ---- shared page states, first-run guidance ---- */
.empty-act { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.msg.err button.link { margin-left: 6px; }
.onb { margin-bottom: 16px; border-color: color-mix(in srgb, var(--brass) 40%, var(--line)); }
.onb h2 .right { margin-left: auto; }
.onb-bar { height: 6px; border-radius: 99px; background: var(--deck-2); overflow: hidden; margin: -2px 0 12px; }
.onb-bar span { display: block; height: 100%; background: var(--brass); border-radius: 99px; transition: width .3s; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.onb-steps a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--deck-2); color: var(--text); height: 100%; }
.onb-steps a:hover { text-decoration: none; border-color: var(--brass); }
.onb-steps .sub { display: block; color: var(--muted); font-size: 0.78125rem; margin-top: 2px; }
.onb-check { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; margin-top: 1px; }
.onb-steps li.done .onb-check { background: var(--bull); border-color: var(--bull); color: #fff; }
.onb-steps li.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }

/* Admin > Features */
.ff-list { display: grid; gap: 2px; }
.ff-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.ff-row:last-child { border-bottom: 0; }
.ff-row.is-off .ff-main b { color: var(--muted); }
.ff-main { min-width: 0; display: grid; gap: 3px; }
.ff-main code { font-size: 0.71875rem; margin-left: 4px; }
.ff-set { flex: none; }
@media (max-width: 720px) { .ff-row { flex-direction: column; align-items: flex-start; } }
/* Admin > Errors */
.er-pre { max-height: 50vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 0.75rem; background: var(--deck-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 8px 0 0; }
.er-table td { vertical-align: top; }
/* Admin > Settings */
.st-group { margin: 18px 0 2px; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.st-set-box { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 520px; }
.st-row.st-set .ff-main b { color: var(--text); }
.st-chip { font-size: 0.6875rem; padding: 1px 6px; border-radius: 6px; background: var(--deck-2); border: 1px solid var(--line); color: var(--muted); }
.st-row input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; }
@media (max-width: 720px) { .st-set-box { justify-content: flex-start; max-width: 100%; } }

/* the one-time AI consent */
.consent-points { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; }
.consent-ok { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* Admin > AI review */
.air-list { display: grid; gap: 6px; }
.air { border: 1px solid var(--line); border-radius: 8px; background: var(--deck-2); }
.air summary { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 12px; cursor: pointer; font-size: 0.8125rem; }
.air-q { flex: 1 1 260px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.air-body { padding: 0 12px 12px; font-size: 0.8125rem; }
.air-body h3 { font-size: 0.78125rem; margin: 6px 0; color: var(--muted); }
.air-body pre { white-space: pre-wrap; word-break: break-word; margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--deck); font: 0.78125rem/1.5 var(--font); max-height: 320px; overflow: auto; }

/* ---------------- company peers ---------------- */
.peer-strip { display: block; width: 100%; height: auto; margin: 4px 0 0; }
.peer-strip .ax { font-size: 0.6875rem; fill: var(--muted); }
.peer-strip .me { font-size: 0.75rem; font-weight: 700; fill: var(--brass); }
.peer-strip a circle { cursor: pointer; }
.peer-strip a:hover circle { opacity: 1; stroke: var(--text); stroke-width: 1.5; }

/* Home: market status in the header */
.mkt { align-self: flex-start; }
.mkt-badge { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--deck); min-width: 230px; }
.mkt-badge > div { display: grid; gap: 1px; }
.mkt-badge b { font-size: 0.875rem; }
.mkt-next { font-size: 0.78125rem; color: var(--text); }
.mkt-time { font-size: 0.71875rem; color: var(--muted); max-width: 320px; }
.mkt-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--faint); }
.mkt-badge.open .mkt-dot { background: var(--bull); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bull) 22%, transparent); animation: mkt-pulse 2.4s ease-in-out infinite; }
.mkt-badge.pre .mkt-dot, .mkt-badge.after .mkt-dot { background: var(--brass); }
.mkt-badge.closed .mkt-dot { background: var(--bear); opacity: .8; }
@keyframes mkt-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--bull) 8%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mkt-badge.open .mkt-dot { animation: none; } }
@media (max-width: 700px) { .mkt { width: 100%; } .mkt-badge { min-width: 0; } }

/* ---------------- glossary: dotted terms, their popover and the Glossary page ---------------- */
.term { text-decoration: underline dotted color-mix(in srgb, currentColor 55%, transparent); text-underline-offset: 3px; cursor: help; }
.term:hover, .term:focus-visible { text-decoration-color: var(--brass); outline: none; }
.term:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass) 45%, transparent); border-radius: 3px; }
.menu.gl { width: min(360px, calc(100vw - 16px)); max-height: 70vh; padding: 12px 14px; }
.gl-pop .gl-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.gl-pop .gl-h b { font-size: 0.9375rem; }
.gl-pop .gl-h .faint { font-size: 0.75rem; }
.gl-lv button { padding: 4px 9px; font-size: 0.75rem; }
.gl-text { margin: 10px 0 8px; line-height: 1.5; }
.gl-ex, .gl-warn { margin: 8px 0; padding: 8px 10px; border-radius: 7px; font-size: 0.8125rem; line-height: 1.45; background: var(--deck-2); }
.gl-ex { border-left: 3px solid var(--wait); }
.gl-warn { border-left: 3px solid var(--brass); }
.gl-k { display: block; font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
.gl-rel { font-size: 0.8125rem; margin: 8px 0 4px; color: var(--muted); }
.gl-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.8125rem; }
.gl-note { margin: 8px 0 0; font-size: 0.71875rem; color: var(--faint); }
.gl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }
.gl-tools input { flex: 1 1 260px; max-width: 420px; }
.gl-cat h2 { margin: 0 0 6px; font-size: 0.9375rem; }
.gl-item { border-top: 1px solid var(--line); padding: 8px 0; }
.gl-item:first-of-type { border-top: 0; }
.gl-item summary { cursor: pointer; padding: 2px 0; }
.gl-item .gl-body { max-width: 760px; padding: 2px 0 6px; }
.gl-item .gl-foot { justify-content: flex-start; }

/* ---------------- Show me tours: the spotlight and the narration card (js/tour.js) ---------------- */
.show-me { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); color: var(--text); }
.show-me svg { color: var(--brass); }
.tour-shield { position: fixed; inset: 0; z-index: 90; }
.tour-spot { position: fixed; z-index: 91; border-radius: 10px; pointer-events: none; outline: 2px solid var(--brass);
  box-shadow: 0 0 0 9999px color-mix(in srgb, #000 58%, transparent); transition: left .3s, top .3s, width .3s, height .3s; }
.tour-card { position: fixed; z-index: 92; width: min(380px, calc(100vw - 16px)); background: var(--deck); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; }
.tour-card.sheet { left: 8px; right: 8px; bottom: 8px; top: auto; width: auto; max-height: 55vh; overflow: auto; }
.tour-top { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--muted); }
.tour-top .tour-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-n { font-weight: 600; color: var(--brass); }
.tour-x { padding: 2px 7px; }
.tour-card h3 { margin: 6px 0 4px; font-size: 0.9375rem; }
.tour-text { margin: 0 0 8px; line-height: 1.5; }
.tour-term { font-size: 0.8125rem; margin-bottom: 8px; }
.tour-def { margin-top: 6px; padding: 8px 10px; background: var(--deck-2); border-radius: 7px; border-left: 3px solid var(--wait); }
.tour-def p { margin: 0 0 4px; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--brass); }
.tour-note { margin: 10px 0 0; font-size: 0.71875rem; color: var(--faint); display: flex; gap: 5px; align-items: center; }
.tour-note svg { flex: none; color: var(--brass); }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }
.tools .show-me { margin-top: 0; }

/* The brand (sidebar, sign-in, public pages, footer): the RenkoBars wordmark (img/wordmark.svg: the R with its
   renko-brick stem, ENKO, and BARS in the spectrum; wordmark-light.svg on light backgrounds) and the slogan under it */
.brand-txt { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.wordmark { display: block; line-height: 0; }
.wordmark .wm-text { height: 34px; width: auto; display: block; max-width: 100%; }
:root[data-theme="light"] .wordmark .wm-text { content: url("../img/wordmark-light.svg"); }   /* the white price line would vanish on white */
.tagline { font: italic 500 0.8125rem/1.1 Georgia, "DejaVu Serif", "Times New Roman", serif; color: var(--warn); white-space: nowrap; text-align: center; letter-spacing: .01em; padding-left: 14px; }
.login .brand-txt { gap: 4px; }
.login .wordmark .wm-text { height: 44px; }
.login .tagline { font-size: 1rem; padding-left: 18px; }
.sf-brand .wordmark .wm-text { height: 28px; }
.sf-brand .tagline { font-size: 0.6875rem; padding-left: 12px; }
@media (max-width: 520px) { .pub-top .tagline { display: none; } }

/* Filter bar (Screen): only added filters apply */
.fbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.fbar-none { font-size: 0.8125rem; }
.fbar-tools { display: inline-flex; gap: 6px; margin-left: auto; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--deck-2); font-size: 0.8125rem; max-width: 100%; }
.fchip .fl { color: var(--text); font-weight: 500; white-space: nowrap; }
.fchip select, .fchip input { padding: 3px 6px; font-size: 0.8125rem; height: auto; }
.fchip input[type=number] { width: 72px; }
.fchip .fx { background: none; border: 0; color: var(--muted); font-size: 1rem; line-height: 1; padding: 2px 8px; border-radius: 999px; cursor: pointer; }
.fchip .fx:hover { color: var(--text); background: var(--deck); }
.menu.fbar-menu { max-height: 420px; }
@media (max-width: 640px) { .fbar-tools { margin-left: 0; } .fchip { flex-wrap: wrap; border-radius: 12px; } }
.fchip.set { border-color: color-mix(in srgb, var(--brass) 60%, var(--line)); }
.fchip.set .fl::before { content: "⚙ "; color: var(--brass); }
.menu .fbar-group { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 8px 4px; }

/* AI screening: the Screen page's Ask box and the screen_stocks result table (Coach page and Screen page) */
.ai-ask { margin-bottom: 16px; }
.ai-ask-l { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }
.ai-ask-l b { color: var(--text); }
.ai-ask-row { display: flex; gap: 8px; }
.ai-ask-row input { flex: 1; min-width: 0; }
.ai-ask-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-ask-ex .chip { font-size: 0.75rem; padding: 4px 10px; }
.ai-ask #aiOut:not(:empty) { margin-top: 12px; }
.ai-ask-a .md { margin-top: 10px; line-height: 1.6; }
.ai-ask-meta { font-size: 0.75rem; margin-top: 8px; }
.ai-screen { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--deck); }
.ai-screen-head { padding: 8px 12px; font-size: 0.8125rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ai-screen-save { white-space: nowrap; }
.ai-screen-formulas { padding: 4px 12px 8px; font-size: 0.75rem; display: grid; gap: 2px; }
.ai-screen-formulas code { font-size: 0.71875rem; background: var(--deck-2); padding: 1px 5px; border-radius: 4px; }
.ai-screen-crit { padding: 8px 12px 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip.static { cursor: default; font-size: 0.75rem; padding: 3px 9px; }
.ai-screen-wrap { overflow-x: auto; }
.ai-screen-t { width: 100%; border-collapse: collapse; font-size: 0.78125rem; }
.ai-screen-t th, .ai-screen-t td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ai-screen-t th { color: var(--muted); font-weight: 600; font-size: 0.71875rem; }
.ai-screen-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.ai-screen-t td .sub { display: block; color: var(--faint); font-size: 0.6875rem; }
.ai-screen-t tbody tr:hover { background: var(--deck-2); }
.ai-screen-foot { padding: 6px 12px 8px; font-size: 0.71875rem; color: var(--faint); }
@media (max-width: 640px) { .ai-ask-row { flex-wrap: wrap; } .ai-ask-row input { flex-basis: 100%; } }

/* Several watchlists: the Watchlist page's list tabs and list tools */
.wl-tabs { margin-bottom: 12px; }
.wl-tabs .tabs { flex-wrap: wrap; }
.wl-tabs [data-new] { color: var(--brass); }
.wl-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; font-size: 0.8125rem; }
.wl-tools .faint { margin-left: auto; font-size: 0.75rem; }
.wl-pick { display: flex; flex-direction: column; gap: 2px; padding: 6px; min-width: 220px; }
.wl-pick label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 0.8125rem; }
.wl-pick label:hover { background: var(--deck-2); }
.wl-pick .faint { margin-left: auto; font-size: 0.71875rem; }
.wl-perf:not(:empty) { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 0 0 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--deck); font-size: 0.8125rem; }
.wl-perf .k { color: var(--muted); font-weight: 600; }
.wl-perf .faint { font-size: 0.71875rem; margin-left: auto; }

/* Lists > Breadth: sector money flow (pages/lists.js) */
.table-wrap { overflow-x: auto; }
.flow-bench { margin-bottom: 12px; }
.flow-table td, .flow-table th { white-space: nowrap; }
.flow-row { cursor: pointer; }
.flow-row:hover td { background: var(--deck-2); }
.flow-row.on td { background: color-mix(in srgb, var(--brass) 12%, var(--deck)); }
/* Breadth tab: readings x layouts (js/pages/breadth.js) */
.bx-bar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 14px; }
.bx-lab { font-size: 0.6875rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.bx-bar .seg + .bx-lab { margin-left: 10px; }
.bx-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.bx-main .panel { min-width: 0; margin: 0; }
.bx-desc { display: block; margin: 2px 0 10px; color: var(--muted); font-size: 0.8125rem; }
.bx-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.bx-dots i { width: 10px; height: 10px; border-radius: 3px; background: var(--bear); opacity: .85; }
.bx-dots i.on { background: var(--bull); opacity: 1; }
.bx-dots i.na { background: var(--line); opacity: 1; }
.bx-key { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.75rem; color: var(--muted); margin-top: 10px; }
.bx-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.bx-key .a3 { background: var(--bull); } .bx-key .a2 { background: var(--agree2); } .bx-key .a1 { background: var(--warn); } .bx-key .a0 { background: var(--bear); } .bx-key .an { background: var(--faint); }
.bx-table th.c, .bx-table td.c { text-align: center; }
.bx-table td, .bx-table th { white-space: nowrap; }
.bx-cell { display: inline-block; min-width: 54px; text-align: center; padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.bx-cell.g { background: color-mix(in srgb, var(--bull) 22%, transparent); }
.bx-cell.r { background: color-mix(in srgb, var(--bear) 20%, transparent); }
.bx-cell.n { color: var(--faint); }
.bx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bx-card { all: unset; box-sizing: border-box; cursor: pointer; background: var(--deck-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.bx-card[aria-pressed="true"] { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass); }
.bx-card:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.bx-card .t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.bx-card .ctx { font-size: 0.75rem; color: var(--faint); border-top: 1px solid var(--line-soft); padding-top: 6px; }
.bx-meter { display: grid; grid-template-columns: 96px 1fr 62px; gap: 8px; align-items: center; font-size: 0.75rem; color: var(--muted); }
.bx-meter .v { text-align: right; color: var(--text); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bx-track { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.bx-track span { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 4px; }
.bx-track span.g { background: var(--bull); } .bx-track span.r { background: var(--bear); } .bx-track span.n { background: var(--faint); }
.bx-track em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .7; }
.bx-svg text { font-family: var(--font); font-size: 0.71875rem; fill: var(--text); }
.bx-svg .gl { stroke: var(--line-soft); } .bx-svg .ln { stroke: var(--muted); stroke-dasharray: 5 4; }
.bx-svg text.tk { fill: var(--faint); font-size: 0.6875rem; } .bx-svg text.an { fill: var(--muted); font-size: 0.75rem; }
.bx-svg text.q3 { fill: var(--bull); font-size: 0.75rem; } .bx-svg text.q1 { fill: var(--warn); font-size: 0.75rem; } .bx-svg text.qb { fill: var(--wait); font-size: 0.75rem; } .bx-svg text.q0 { fill: var(--bear); font-size: 0.75rem; }
.bx-bub { cursor: pointer; } .bx-bub circle { fill-opacity: .4; stroke: var(--faint); stroke-width: 1.5; }
.bx-bub.a3 circle { fill: var(--bull); } .bx-bub.a2 circle { fill: var(--agree2); } .bx-bub.a1 circle { fill: var(--warn); } .bx-bub.a0 circle { fill: var(--bear); } .bx-bub.an circle { fill: var(--faint); }
.bx-bub.ring circle { stroke: var(--bull); stroke-width: 3; } .bx-bub.sel circle { stroke: var(--brass); stroke-width: 3.5; }
.bx-bub:focus-visible { outline: none; } .bx-bub:focus-visible circle { stroke: var(--brass); stroke-width: 3.5; }
.bx-small { font-size: 0.75rem; margin-top: 4px; }
.bx-stage { position: relative; height: 540px; border-radius: var(--radius); overflow: hidden; touch-action: none; background: radial-gradient(ellipse at 50% 35%, var(--deck-2), var(--ink) 80%); }
.bx-stage canvas { display: block; width: 100%; height: 100%; }
.bx-views { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.bx-views button { font: 500 0.75rem var(--font); color: var(--text); background: color-mix(in srgb, var(--deck) 90%, transparent); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.bx-views button.on { border-color: var(--brass); color: var(--brass); }
.bx-hint { position: absolute; right: 10px; bottom: 8px; font-size: 0.6875rem; color: var(--faint); pointer-events: none; }
.bx-reads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bx-read { background: var(--deck-2); border-radius: var(--radius-sm); padding: 8px 10px; }
.bx-read .k { font-size: 0.6875rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.bx-read .v { font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bx-read.g { box-shadow: inset 3px 0 0 var(--bull); } .bx-read.r { box-shadow: inset 3px 0 0 var(--bear); } .bx-read.n { box-shadow: inset 3px 0 0 var(--line); }
.bx-ctx { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.8125rem; }
.bx-members td, .bx-members th { white-space: nowrap; }
.bx-members td.na { color: var(--faint); }
.bx-members td.wrap { white-space: normal; min-width: 150px; font-size: 0.75rem; }
.bx-wrap { container-type: inline-size; }
@container (max-width: 1150px) { .bx-main { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .bx-stage { height: 400px; } .bx-meter { grid-template-columns: 80px 1fr 58px; } }
.flow-row.on td:nth-child(2) { box-shadow: inset 3px 0 0 var(--brass); }
.flow-bar { position: relative; display: inline-block; width: 96px; height: 10px; vertical-align: middle; }
.flow-bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line); }
.flow-bar span { position: absolute; top: 1px; height: 8px; border-radius: 2px; }
.flow-bar .up { background: var(--bull); }
.flow-bar .down { background: var(--bear); }
.flow-h3 { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 600; display: flex; gap: 8px; align-items: center; }
@media (max-width: 760px) { #flowMembers .grid-2 { grid-template-columns: 1fr; } }

/* Strategy Lab (pages/lab.js): a test on past prices, never advice */
.lab-disc { display: flex; gap: 12px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--deck)); border-radius: var(--radius); padding: 11px 14px; font-size: 0.8125rem; margin-bottom: 16px; }
.lab-disc b { color: var(--warn); white-space: nowrap; }
.lab-h { margin: 22px 0 10px; font-size: 1rem; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lab-card { display: flex; flex-direction: column; gap: 8px; color: inherit; margin: 0 !important; }
.lab-card:hover { border-color: var(--brass); text-decoration: none; }
.lab-card-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.lab-card-h b { font-size: 1rem; }
.lab-card-what { font-size: 0.75rem; }
.lab-card p { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.lab-card-f { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: 0.75rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag.lab-v { font-weight: 600; }
.tag.lab-v.pos { color: var(--bull); border-color: var(--bull); background: color-mix(in srgb, var(--bull) 12%, transparent); }
.tag.lab-v.neg { color: var(--bear); border-color: var(--bear); background: color-mix(in srgb, var(--bear) 12%, transparent); }
.tag.lab-v.warn { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.tag.lab-v.muted { color: var(--muted); }
.lab-top { margin-bottom: 16px; }
.lab-rules { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; font-size: 0.875rem; }
.lab-json, .lab-code { font: 0.78125rem/1.5 var(--mono, ui-monospace, monospace); white-space: pre; overflow: auto; max-height: 420px; }
.lab-json { background: var(--deck-2); border-radius: 6px; padding: 10px 12px; margin: 8px 0 0; }
.lab-code { width: 100%; resize: vertical; tab-size: 2; }
.lab-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; }
.lab-runs li { display: flex; gap: 10px; align-items: center; padding: 4px 8px; border-radius: 6px; }
.lab-runs li.on { background: var(--deck-2); }
.lab-wait { min-height: 120px; }
.lab-report h3 { margin: 22px 0 8px; font-size: 0.875rem; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lab-report .stats { margin: 14px 0 4px; }
.lab-report .stat .s { color: var(--faint); font-size: 0.6875rem; max-width: 190px; }
.lab-verdict { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.lab-verdict .tag { font-size: 0.9375rem; padding: 5px 12px; }
.lab-verdict ul { margin: 0; padding-left: 18px; flex: 1 1 320px; font-size: 0.8125rem; line-height: 1.6; color: var(--muted); }
.lab-report .msg.warn { margin-top: 12px; font-size: 0.8125rem; }
.lab-eq { width: 100%; height: 320px; }
.lab-parts { width: 100%; font-size: 0.8125rem; }
.lab-parts th { text-align: left; font-weight: 600; }
.lab-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.lab-year { display: flex; flex-direction: column; border: 1px solid var(--line-soft); border-radius: 6px; padding: 5px 8px; font-size: 0.75rem; }
.lab-year b { font-size: 0.9375rem; }
.lab-audit { margin: 18px 0 12px; font-size: 0.71875rem; color: var(--faint); word-break: break-all; }
.lab-help { margin: 4px 0 12px; font-size: 0.78125rem; color: var(--muted); }
.lab-help p { margin: 6px 0; line-height: 1.6; }
.lab-help code { font-size: 0.75rem; }
.lab-ed-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.lab-editor { margin-bottom: 16px; }
@media (max-width: 760px) { .lab-report .stat .s { max-width: none; } }
/* EMA stack controls on the company chart */
.stack-tools { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.stack-name { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.stack-name i { width: 4px; height: 12px; border-radius: 2px; display: inline-block; }
.stack-name i:last-of-type { margin-right: 4px; }
.stack-mixed { color: var(--warn); }
/* Inter headings read best a little tighter */
.page-head h1, .co-head h1, .doc h1 { letter-spacing: -.02em; }

/* Text size picker (account menu, Settings) */
.ts-seg button { min-width: 34px; line-height: 1; padding: 6px 8px; }
.ts-seg button[data-ts="s"] { font-size: 0.6875rem; }
.ts-seg button[data-ts="m"] { font-size: 0.8125rem; }
.ts-seg button[data-ts="l"] { font-size: 0.9375rem; }
.ts-seg button[data-ts="xl"] { font-size: 1.0625rem; }
.um-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 8px; border-top: 1px solid var(--line-soft); }

/* Chart key: the price levels drawn on the chart (names here, values on the price axis) */
.chart-key { display: flex; flex-wrap: wrap; gap: 4px 16px; min-height: 1.5em; margin: 2px 0 6px; font-size: 0.75rem; color: var(--muted); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-key b { color: var(--text); font-weight: 600; }
.chart-key i { width: 16px; border-top: 2px dashed; display: inline-block; }
.chart-key i.dot { border-top-style: dotted; }

/* ---------------- stock page: the Renkoalytics and Optionalytics stripes under the chart (js/analytics.js) ---------------- */
.stripes { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
/* one tabbed card under the chart: the tabs and each tab's head share the top line, the body is a single row */
.an-tabs { position: relative; padding: 2px 18px 12px; container-type: inline-size; }
.an-tablist { display: flex; gap: 18px; border-bottom: 1px solid var(--line-soft); }
.an-tablist button { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 12px 2px 10px; color: var(--muted); font: 700 0.875rem/1 var(--font); letter-spacing: .02em; cursor: pointer; }
.an-tablist button:hover { color: var(--text); }
.an-tablist button.on { color: var(--text); border-bottom-color: var(--brass); }
.an-tabs .stripe { display: block; position: static; background: none; border: 0; border-radius: 0; padding: 10px 0 0; }
.an-tabs .stripe-head h2 { display: none; }
.an-tabs .stripe-head { position: absolute; top: 3px; right: 18px; left: 260px; height: 34px; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 0; border: 0; white-space: nowrap; overflow: hidden; }
.an-tabs .oa-h { flex-wrap: nowrap; }
.an-tabs .oa-h button { padding: 4px 9px; }
.an-tabs .oa-row { grid-template-columns: minmax(0, 1fr) auto; }
.an-tabs .oa-stats { grid-template-columns: repeat(4, auto); gap: 0 22px; }
.an-tabs .oa-read { -webkit-line-clamp: 1; }
/* both tabs the same height, so switching never moves anything */
.an-panels { display: grid; }
.an-panels > [role="tabpanel"] { grid-area: 1 / 1; min-width: 0; }
.an-panels > [role="tabpanel"][hidden] { display: block; visibility: hidden; pointer-events: none; }   /* kept in place so the card is as tall as the taller tab */
.an-panels > [role="tabpanel"] > .stripe { height: 100%; box-sizing: border-box; }
.oa-stats > div { white-space: nowrap; }
.stripe { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 0 22px; align-items: center; padding: 14px 18px; }
.stripe-head { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; align-self: stretch; justify-content: center; padding-right: 18px; border-right: 1px solid var(--line-soft); }
.stripe-head h2 { margin: 0; font-size: 0.9375rem; font-weight: 800; letter-spacing: .02em; }
.stripe-head .muted { font-size: 0.75rem; }
.stripe .k { display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stripe .muted { color: var(--muted); }
.ra-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.ra-pill.up { background: color-mix(in srgb, var(--bull) 15%, transparent); color: var(--bull); }
.ra-pill.down { background: color-mix(in srgb, var(--bear) 15%, transparent); color: var(--bear); }
.ra-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px 22px; align-items: start; }
.ra-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 0.75rem; }
.ra-v { font-size: 1.125rem; font-weight: 700; }
.ra-track { position: relative; height: 22px; margin: 2px 0 4px; }
.ra-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--line); }
.ra-track.up::before { background: linear-gradient(90deg, var(--bear) 0, var(--line) 22%, var(--line) 78%, var(--bull) 100%); }
.ra-track.down::before { background: linear-gradient(90deg, var(--bear) 0, var(--line) 22%, var(--line) 78%, var(--bull) 100%); }
.ra-form { position: absolute; top: 5px; height: 12px; border-radius: 3px; border: 1px solid; min-width: 2px; }
.ra-form.up { background: color-mix(in srgb, var(--bull) 30%, transparent); border-color: var(--bull); }
.ra-form.down { background: color-mix(in srgb, var(--bear) 30%, transparent); border-color: var(--bear); }
.ra-now { position: absolute; top: 0; width: 2px; height: 22px; margin-left: -1px; background: var(--text); border-radius: 1px; }
.ra-ends { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ra-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 0.875rem; min-width: 0; }
.ra-dots i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.ra-dots b { margin-left: 5px; white-space: nowrap; }
.oa-open { font-size: 0.75rem; }
.oa-h { max-width: 100%; flex-wrap: wrap; }
.oa-h button { padding: 5px 9px; font-size: 0.75rem; white-space: nowrap; }
.oa .stripe-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.oa-exp { font-size: 0.8125rem; white-space: nowrap; }
.oa-ruler { position: relative; height: 64px; margin: 0 6px; }
.oa-ruler.three { height: 80px; }
.oa-line { position: absolute; left: 0; right: 0; top: 31px; height: 2px; background: var(--line); }
.oa-range { position: absolute; top: 20px; height: 24px; border-radius: 4px; background: color-mix(in srgb, var(--wait) 14%, transparent); border: 1px solid color-mix(in srgb, var(--wait) 50%, transparent); }
.oa-tick { position: absolute; width: 2px; margin-left: -1px; }
.oa-tick.r0 { top: 16px; height: 32px; } .oa-tick.r1 { top: 22px; height: 20px; }
.oa-lab { position: absolute; transform: translateX(-50%); font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.oa-lab.r0 { top: 0; } .oa-lab.r1 { top: 49px; } .oa-lab.r2 { top: 64px; }
.oa-tick.r2 { top: 22px; height: 42px; opacity: .8; }
.oa-now { position: absolute; top: 12px; height: 40px; width: 2px; margin-left: -1px; background: var(--text); }
.oa-lab.now { top: 49px; color: var(--text); font-weight: 800; background: var(--deck); padding: 0 4px; border-radius: 4px; z-index: 1; }
.oa-row { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 0 26px; align-items: center; }
.oa-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; align-items: start; }
.oa-stats b { font-size: 1rem; }
.oa-stats .k { margin-bottom: 1px; }
.oa-read { margin: 0; font-size: 0.8125rem; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oa-when { font-size: 0.6875rem; line-height: 1.35; }
/* sized by the card, not the window (the watchlist rail and sidebar take some of it) */
@container (max-width: 880px) {
  .an-tabs .oa-stats { grid-template-columns: repeat(2, auto); gap: 4px 18px; }
}
@container (max-width: 790px) {
  .an-tabs .stripe-head { position: static; height: auto; flex-wrap: wrap; justify-content: flex-start; margin-bottom: 8px; white-space: normal; }
}
@container (max-width: 560px) {
  .an-tabs .oa-row { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .ra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oa-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .stripe { grid-template-columns: 1fr; gap: 12px; }
  .stripe-head { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; padding-right: 0; }
  .ra-grid { grid-template-columns: 1fr; }
}

/* AI Coach: what an answer cost (credits for members, tokens and dollars for admins) */
.cm-cost { font-size: 0.75rem; color: var(--muted); margin: -4px 0 12px; text-align: right; }
/* the brick volume readout on a renko chart (switch "chart.brick-volume") */
.vol-tip { position: absolute; left: 10px; bottom: 34px; z-index: 3; pointer-events: none; font-size: 0.75rem; color: var(--muted);
  background: color-mix(in srgb, var(--deck) 85%, transparent); border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 8px; }
/* Admin > Features: who gets what */
.ff-sum #ffTiers { align-items: center; }
.ff-sum #ffFind { margin-left: auto; width: 200px; }
.ff-tier { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 10px; }
.ff-tier h3 { font-size: 0.875rem; margin: 0 0 6px; }
.ff-tier ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 0.8125rem; }
.ff-tier p { font-size: 0.75rem; margin: 8px 0 0; }
@media (max-width: 720px) { .ff-tier { grid-template-columns: 1fr; } .ff-sum #ffFind { margin-left: 0; width: 100%; } }
/* Members-only pages for a Free account: tagged in the menu, explained on the page */
.nav-members { font-style: normal; font-size: 0.625rem; font-weight: 700; margin-left: auto; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.locked-page { max-width: 640px; display: grid; gap: 8px; justify-items: start; }
.locked-page p { margin: 0; }
/* Founding-member offer and the Members price notice (signup page, Settings > Plan) */
.msg.founding { font-size: 0.8125rem; line-height: 1.45; }
.price-notice { font-size: 0.75rem; line-height: 1.45; margin: 10px 0 0; }
/* Settings > Plan: online billing (Stripe) */
.billing-box { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.billing-box p { flex-basis: 100%; }
.credit-packs { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.sd-all { margin-top: 14px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--bear) 45%, transparent); border-radius: var(--radius-sm); }
.lab-period { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 12px; }
.lab-period-row { display: flex; gap: 12px; flex-wrap: wrap; }
.lab-period-row .field { flex: 1 1 140px; margin: 0; }
.lab-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.lab-tested { font-size: 0.75rem; margin-top: 6px; }
.lab-ready { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; font-size: 0.8125rem; }
.db-sizes { width: 100%; font-size: 0.8125rem; }
.lab-keep { margin-bottom: 8px; font-size: 0.8125rem; }
.lab-expiry { font-size: 0.75rem; color: var(--muted); }
.lab-expiry.soon { color: var(--warn); font-weight: 600; }
.lab-basis { font-size: 0.75rem; margin: -4px 0 6px; }
.lab-modes { margin: 0 0 12px; }
.lab-credits { font-size: 0.75rem; margin: 6px 0; }
.lab-tr { margin-top: 10px; }
.lab-confirm { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; font-weight: 600; }
.lab-described { margin: 0 0 10px; font-size: 0.8125rem; } .lab-described p { white-space: pre-wrap; }
.lab-target { display: flex; gap: 12px; flex-wrap: wrap; }
.lab-target .field { flex: 1 1 180px; margin: 0; }
.lab-sectors { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; font-size: 0.8125rem; }
.lab-sectors > span { flex: 1 1 100%; }
.lab-on { margin: 0 0 10px; }
.lab-on-row { display: flex; gap: 8px; }
.lab-on-row input { width: 120px; text-transform: uppercase; }
.renew-terms { margin: 0 0 12px; padding-left: 18px; } .renew-terms li { margin: 4px 0; }
