/* The clean look: a plain finance-app style shared by every page at the
   root of council/ui/. (The original 8-bit look lives in ui/classic/.)
   Light and dark follow the device unless Settings -> Appearance forces
   one, which sets data-theme on <html> before the page paints. */

:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f5;
  --ink: #141820;
  --muted: #5a6475;
  --faint: #8a93a3;
  --line: #e0e4ea;
  --line-strong: #cfd5de;
  --accent: #2c56c9;
  --accent-ink: #ffffff;
  --accent-soft: #e6ecfb;
  --up: #16835a;
  --up-soft: #e3f3ec;
  --up-mid: #7cc4a3;
  --down: #c23b35;
  --down-soft: #fbe8e7;
  --down-mid: #e59a95;
  --even: #8a6d1c;
  --even-soft: #f6efd9;
  --noread: #8a93a3;
  --noread-soft: #eef1f5;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --track: #e9ecf1;
  --knob: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --backdrop: rgba(20, 24, 32, 0.28);
  --shadow-sm: 0 1px 2px rgba(20, 24, 32, 0.06);
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.05), 0 4px 14px rgba(20, 24, 32, 0.05);
  --shadow-lg: 0 10px 40px rgba(20, 24, 32, 0.16);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  /* The three periods' colours (the price chart's forecast fans). */
  --t-short: #0e93ad;
  --t-medium: #7c4fe0;
  --t-long: #d8731f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1015;
    --surface: #151a21;
    --surface-2: #1a2029;
    --surface-3: #202733;
    --ink: #e5e8ed;
    --muted: #9aa3b2;
    --faint: #6d7788;
    --line: #262d38;
    --line-strong: #323b48;
    --accent: #7597f2;
    --accent-ink: #0d1015;
    --accent-soft: #1c2640;
    --up: #45c08a;
    --up-soft: #12291f;
    --up-mid: #2c7d59;
    --down: #ec6b64;
    --down-soft: #321816;
    --down-mid: #8f3e3a;
    --even: #d4b45a;
    --even-soft: #2b2512;
    --noread: #6d7788;
    --noread-soft: #1d232c;
    --warn: #e9a847;
    --warn-soft: #2e2211;
    --track: #232a35;
    --knob: #e5e8ed;
    --nav-bg: rgba(21, 26, 33, 0.78);
    --backdrop: rgba(0, 0, 0, 0.5);
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --t-short: #3cc3dc;
    --t-medium: #a283ff;
    --t-long: #f29a4a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: #151a21;
  --surface-2: #1a2029;
  --surface-3: #202733;
  --ink: #e5e8ed;
  --muted: #9aa3b2;
  --faint: #6d7788;
  --line: #262d38;
  --line-strong: #323b48;
  --accent: #7597f2;
  --accent-ink: #0d1015;
  --accent-soft: #1c2640;
  --up: #45c08a;
  --up-soft: #12291f;
  --up-mid: #2c7d59;
  --down: #ec6b64;
  --down-soft: #321816;
  --down-mid: #8f3e3a;
  --even: #d4b45a;
  --even-soft: #2b2512;
  --noread: #6d7788;
  --noread-soft: #1d232c;
  --warn: #e9a847;
  --warn-soft: #2e2211;
  --track: #232a35;
  --knob: #e5e8ed;
  --nav-bg: rgba(21, 26, 33, 0.78);
  --backdrop: rgba(0, 0, 0, 0.5);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --t-short: #3cc3dc;
  --t-medium: #a283ff;
  --t-long: #f29a4a;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.page { max-width: 1120px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
/* Nothing inside a page may push it wider than the screen. */
.page > *, .card { min-width: 0; }
/* For screen readers only: labels the design shows another way. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-head { display: grid; gap: 6px; }
.page-head p { color: var(--muted); max-width: 70ch; }

/* ---------- nav ---------- */
.topnav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 54px; display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.beta-tag { align-self: center; margin-left: 8px; padding: 2px 7px; border-radius: 99px; font-style: normal; font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); line-height: 1.4; }
.feedback-dialog { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); }
.feedback-dialog::backdrop { background: var(--backdrop); }
.feedback-form { display: grid; gap: 14px; padding: 20px; }
.feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feedback-head h2 { margin: 0; font-size: 19px; }
.feedback-form .muted { margin: 0; font-size: 14px; line-height: 1.5; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
/* "How do you like it so far?" (Run page, after a 3rd real run). */
.survey-dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.survey-q { display: grid; gap: 8px; font-size: 14px; }
.survey-q .input { margin-top: 2px; }
.survey-price { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.survey-price .input { width: 8em; margin-top: 0; }
.survey-founder { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; padding: 12px;
  border-radius: 12px; background: var(--accent-soft); cursor: pointer; }
.survey-founder input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.survey-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-preview { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.survey-error { margin: 0; font-size: 13px; }
.survey-faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.survey-faces button { font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 4px 8px; cursor: pointer;
  display: grid; justify-items: center; gap: 4px; line-height: 1.2; text-align: center; }
.survey-face { font-size: 28px; line-height: 1; }
.survey-faces button[aria-checked="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.survey-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.survey-scale button { font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 0; cursor: pointer; min-width: 0; }
.survey-scale button[aria-checked="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.survey-scale-ends { display: flex; justify-content: space-between; font-size: 12px; margin-top: -4px; }
.survey-more { gap: 16px; }
.survey-more textarea { min-height: 80px; }
@media (max-width: 420px) { .survey-faces button { font-size: 11px; } .survey-face { font-size: 24px; } .survey-scale button { font-size: 12px; padding: 7px 0; } }
.key-survey-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.key-survey-reason { justify-content: flex-start; text-align: left; white-space: normal; min-height: 44px; }
.key-survey-reply { margin: 0; font-size: 15px; line-height: 1.55; }
.key-survey-more { margin: 0; font-size: 13px; }
@media (max-width: 480px) { .key-survey-reasons { grid-template-columns: minmax(0, 1fr); } }
.feedback-kinds button { font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.feedback-kinds button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.feedback-form textarea { width: 100%; resize: vertical; min-height: 110px; font-size: 16px; }
.feedback-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feedback-msg { font-size: 14px; }
.brand { display: inline-flex; align-items: center; gap: 7px; }
.brand .logo { width: 24px; height: 24px; color: var(--accent); flex: none; margin-top: -3px; }
/* The nav (Oct 15): main pages in the top bar (tabs along the bottom on
   phones), the person's own pages in the account menu on the right. */
.navlinks { display: flex; gap: 2px; align-items: center; min-width: 0; }
.navlinks a { color: var(--muted); font-size: 14px; font-weight: 500; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.navlinks a:hover { color: var(--ink); background: var(--surface-3); text-decoration: none; }
.navlinks a.active { color: var(--ink); background: var(--surface-3); }
.navlinks a[hidden], .tabbar a[hidden], .nav-me-menu [hidden] { display: none; }
.topnav .spacer { flex: 1; }
.nav-upgrade { font-size: 14px; font-weight: 600; color: var(--accent); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav-upgrade:hover { background: var(--accent-soft); text-decoration: none; }
/* On a paid plan, its badge where Upgrade was (Oct 25). */
.topnav .nav-plan { font-size: 12px; padding: 4px 10px; margin: 0 4px; text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.topnav .nav-plan:hover { text-decoration: none; filter: brightness(1.04); }
/* Runs left and the gift (Oct 26, js/app.js loadRunsLeft / openRunsPanel). */
.topnav .nav-runs { font: inherit; display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: 99px; padding: 3px 11px 3px 4px; min-height: 36px; cursor: pointer; color: var(--ink); flex-shrink: 0; white-space: nowrap; }
.topnav .nav-runs b { font-size: 14px; }
.topnav .nav-runs-word { font-size: 14px; font-weight: 600; margin-left: -4px; }
.topnav .nav-runs-bonus { font-size: 12px; color: var(--muted); }
.topnav .nav-runs.empty { background: #fbecc8; border-color: #e8c77a; color: #6b4a06; }
.topnav .nav-gift { position: relative; width: 38px; height: 38px; flex-shrink: 0; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.topnav .nav-gift svg { width: 19px; height: 19px; }
.topnav .nav-gift[data-dot]::after { content: ""; position: absolute; top: 3px; right: 4px; width: 9px; height: 9px; border-radius: 99px;
  background: var(--down); border: 2px solid var(--surface); }
.runs-panel { width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - 80px); padding: 0; border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--ink); overflow: auto; margin: 64px 16px auto auto; }
.runs-panel::backdrop { background: rgba(20, 26, 36, .25); }
.rp-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: transparent; color: inherit; font-size: 24px; cursor: pointer; z-index: 1; }
.rp-hero { background: #173c99; color: #fff; padding: 18px 20px; display: grid; gap: 6px; }
.runs-panel > .rp-close + * { padding-right: 52px; }
.runs-panel > .rp-close:has(+ .rp-hero) { color: #fff; }
.rp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.rp-hero b { font-size: 20px; line-height: 1.25; }
.rp-hero p { margin: 0; font-size: 14px; line-height: 1.5; opacity: .92; }
.rp-sign { font-size: 14px; font-style: italic; opacity: .9; }
.rp-sec { padding: 14px 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.rp-sec:first-of-type { border-top: 0; }
.rp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rp-small { font-size: 13px; line-height: 1.45; }
.rp-bar { height: 10px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.rp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.rp-bar.muted i { background: var(--muted); }
.rp-pips { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.rp-pips i { height: 10px; border-radius: 3px; background: var(--line); }
.rp-pips i.on { background: var(--accent); }
.rp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rp-days i { height: 24px; border-radius: 8px; background: #f3e4cc; }
.rp-days i.on { background: #c77a12; }
.rp-days i.next { border: 2px dashed #c77a12; box-sizing: border-box; }
.rp-copy { display: flex; gap: 8px; }
.rp-copy .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; }
.rp-badge { display: flex; gap: 10px; align-items: center; }
.badge-beta { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #141a24; color: #fff; border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
:not(.who) > .badge-beta, h2 > .badge-beta { margin-left: 5px; }
@media (min-width: 1024px) and (max-width: 1180px) {
  .topnav-inner:has(.nav-runs:not([hidden])) .beta-tag { display: none; }
}
@media (max-width: 480px) {
  .topnav .nav-runs-word, .topnav .nav-runs-bonus { display: none; }
  .topnav-inner:has(.nav-runs:not([hidden])) .beta-tag { display: none; }
  /* The plan's badge moves to the account menu (it's there too): the bar
     was 450px wide and pushed the page sideways (Oct 26). */
  .topnav-inner:has(.nav-runs:not([hidden])) .nav-plan { display: none; }
  .topnav-inner:has(.nav-runs:not([hidden])) { gap: 8px; }
  .runs-panel { margin: 60px auto auto; }
}
@media (max-width: 370px) {
  .topnav-inner:has(.nav-runs:not([hidden])) .brand { font-size: 15px; }
  .topnav .nav-runs { padding-right: 9px; }
}

/* "New with Pro": a page's one-time note on what the plan opened (js/app.js showUnlocks). */
.unlock-note { display: flex; gap: 10px 12px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.unlock-note p { margin: 0; flex: 1 1 260px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.unlock-note p b { color: var(--ink); }
.unlock-note .badge-plan { margin-left: 0; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: var(--down); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.nav-me-wrap { position: relative; flex: none; }
.nav-me { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface-3); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; }
.nav-me svg { width: 18px; height: 18px; }
.nav-me:hover, .nav-me[aria-expanded="true"] { border-color: var(--accent); }
.nav-me-initial { font-size: 14px; font-weight: 700; color: var(--accent); }
/* The Community avatar in the account button (Nov 12): fills the circle. */
.nav-me.has-av { background: transparent; }  /* no overflow clip: the red dot sits on the rim */
.nav-me.has-av .av { width: 100%; height: 100%; }
.nav-me.has-av .av svg { width: 21px; height: 21px; }
.nav-me-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 35; width: 240px; padding: 6px; display: grid; gap: 1px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.nav-me-menu a { display: flex; align-items: center; color: var(--ink); font-size: 14px; padding: 9px 12px; border-radius: 9px; }
.nav-me-menu a:hover { background: var(--surface-3); text-decoration: none; }
.nav-me-menu a.active { background: var(--surface-3); font-weight: 600; }
.nav-me-menu a.nav-me-upgrade { color: var(--accent); font-weight: 600; }
.nav-me-menu a.nav-me-out { color: var(--muted); }
.nav-me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
.nav-me-head { display: grid; gap: 2px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.nav-me-head strong { font-size: 14px; }
.nav-me-head span:last-child { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-me-head .status-badge { justify-self: start; }
.tabbar { display: none; }
@media (min-width: 1440px) { .topnav-inner { max-width: 1320px; } }
@media (min-width: 1024px) and (max-width: 1180px) {
  .topnav-inner { gap: 16px; }
  .navlinks a { padding: 6px 8px; }
}

@media (max-width: 1023px) {
  .topnav-inner { gap: 10px; padding: 0 14px; }
  .topnav .brand { font-size: 16px; }
  .beta-tag { margin-left: 6px; font-size: 9.5px; padding: 2px 6px; }
  .topnav .navlinks, .topnav .nav-upgrade { display: none; }
  .nav-me-menu { position: fixed; top: 60px; right: 12px; width: min(280px, calc(100vw - 24px)); }
  .nav-me-menu a { padding: 11px 12px; font-size: 15px; }
  /* Tabs along the bottom, within thumb reach. */
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .tabbar a { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 6px 2px 4px; border-radius: 10px;
    color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a.active svg { stroke-width: 2.4; }
  body.has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  /* The chat page fills the screen: the tabs sit at the end of it instead of over it. */
  body.chat-page.has-tabbar { padding-bottom: 0; }
  body.chat-page .tabbar { position: static; flex: none; }
  .daily-welcome { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
/* A paid plan's badge on a phone (Oct 25): Feedback goes to its icon to make room. */

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 16px; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-quiet:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { color: var(--down); }

.field { display: grid; gap: 6px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; width: 100%; min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 48px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; padding: 0; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-ticker { font-family: var(--mono); font-size: 20px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
select.input { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

.seg { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.card-head small { color: var(--faint); font-size: 13px; }
/* Phones: the same 16px side gutter as the rows and charts inside cards,
   so a card's title lines up with what's under it. */
@media (max-width: 640px) {
  .card-pad { padding-left: 16px; padding-right: 16px; }
  .card-head { padding-left: 16px; padding-right: 16px; }
}

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill-free { background: var(--up-soft); color: var(--up); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

.up { color: var(--up); }
.down { color: var(--down); }
.even { color: var(--even); }
.noread { color: var(--noread); }

.alert { border-radius: 10px; padding: 10px 14px; font-size: 14px; background: var(--surface-3); color: var(--ink); }
.alert b { font-weight: 600; }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-stop { background: var(--down-soft); color: var(--down); }
.alert a { color: inherit; text-decoration: underline; }

/* ---------- the lean bar ----------
   A track from "down" (left) to "up" (right) with 50/50 in the middle.
   The fill grows from the middle to the Council's position, capped with a
   knob; each seat is a dot in the lane under it, stacked when they
   crowd. */
.lean { display: grid; gap: 8px; }
.lean-track { position: relative; height: 8px; border-radius: 999px; background: var(--track); }
.lean-mid { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--line-strong); z-index: 1; }
/* The lean: a fill running out from the middle line, faint there and solid at
   its rounded end, with a soft glow. No knob. */
.lean-fill {
  position: absolute; top: 0; bottom: 0; z-index: 2;
  transition: left 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lean-fill.up {
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--up) 15%, transparent), var(--up));
  box-shadow: 6px 0 12px -4px color-mix(in srgb, var(--up) 45%, transparent);
}
.lean-fill.down {
  border-radius: 999px 0 0 999px;
  background: linear-gradient(270deg, color-mix(in srgb, var(--down) 15%, transparent), var(--down));
  box-shadow: -6px 0 12px -4px color-mix(in srgb, var(--down) 45%, transparent);
}
/* Only a dead-even call keeps a marker: a small dot on the middle line. */
.lean-knob { display: none; }
.lean-knob.even {
  display: block; position: absolute; top: 50%; z-index: 3; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--even); box-shadow: 0 0 0 3px var(--surface);
}
.lean-dots { position: relative; height: 10px; }
.lean-dot {
  position: absolute; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
  background: var(--noread); transition: left 0.5s ease;
}
.lean-dot.up { background: var(--up); }
.lean-dot.down { background: var(--down); }
.lean-dot.even { background: var(--even); }
.lean-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.lean-scale span:nth-child(2) { transform: translateX(0); }
.lean.small .lean-track { height: 5px; }
.lean.small .lean-knob.even { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
.lean.small .lean-mid { top: -4px; bottom: -4px; }
@media (prefers-reduced-motion: reduce) {
  .lean-fill, .lean-knob, .lean-dot { transition: none; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 11px 16px; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.data thead th { border-top: 0; font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; padding-top: 14px; padding-bottom: 10px; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .sort-arrow { display: inline-block; width: 10px; margin-left: 4px; color: var(--accent); }
/* The arrow hangs into the cell's padding, so a header's text lines up with
   the values under it whether or not the column is the sorted one. */
table.data th.num .sort-arrow { margin-left: 4px; margin-right: -14px; }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.data thead th.num { font-family: var(--sans); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--surface-2); }
table.data td.wrap { white-space: normal; }

/* Phones: a table's rows become stacked cards -- the row's first cell as a
   heading, every other cell as a labelled line (labels come from the
   column headings; see labelTables() in app.js). Sortable headings stay as
   a row of "sort by" chips. Tables marked .compact are small enough to stay
   as they are. */
@media (max-width: 640px) {
  table.data:not(.compact), table.data:not(.compact) tbody { display: block; width: 100%; }
  table.data:not(.compact) thead { display: block; }
  table.data:not(.compact) thead:not(:has(th.sortable)) { display: none; }
  table.data:not(.compact) thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 16px 10px; }
  table.data:not(.compact) thead tr::before { content: "Sort by"; font-size: 12px; font-weight: 600; color: var(--faint); margin-right: 2px; }
  table.data:not(.compact) thead th { display: none; }
  table.data:not(.compact) thead th.sortable {
    display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 99px;
    background: var(--surface-3); color: var(--muted); font-size: 12px; text-transform: none; letter-spacing: 0; font-family: var(--sans);
  }
  table.data:not(.compact) thead th.sortable:has(.sort-arrow:not(:empty)) { background: var(--accent-soft); color: var(--accent); }
  table.data:not(.compact) tbody tr { display: block; padding: 12px 16px; border-top: 1px solid var(--line); }
  table.data:not(.compact) td {
    display: flex; justify-content: flex-end; align-items: flex-start; flex-wrap: wrap; gap: 6px 8px;
    padding: 4px 0; border: 0; white-space: normal; text-align: right; min-width: 0;
  }
  table.data:not(.compact) td > * { min-width: 0; }
  table.data:not(.compact) td::before {
    content: attr(data-label); flex: none; max-width: 45%; margin-right: auto; text-align: left; padding-top: 2px;
    font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em;
  }
  table.data:not(.compact) td[data-label=""]::before { content: none; }
  table.data:not(.compact) td:first-child { display: block; text-align: left; font-size: 16px; padding-bottom: 6px; }
  table.data:not(.compact) td:first-child::before, table.data:not(.compact) td[colspan]::before { content: none; }
  table.data:not(.compact) td[colspan] { display: block; text-align: left; }
}

/* ---------- lean chips (one per term) ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  background: var(--noread-soft); color: var(--noread);
}
.chip .t { font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--faint); }
.chip.up { background: var(--up-soft); color: var(--up); }
.chip.down { background: var(--down-soft); color: var(--down); }
.chip.even { background: var(--even-soft); color: var(--even); }

/* ---------- drawer (seat details) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: var(--backdrop); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.drawer-head { flex: none; }
/* flex: 1 + min-height: 0 so the body, not the page, scrolls; contain stops
   a scroll that reaches the end from carrying on into the page behind. */
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 16px 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 18px; align-content: start; }
/* While a drawer is open the page behind stays put: html:has(.drawer-backdrop.open)
   below, the backdrop takes no touch scrolling, and a drag on the drawer's head
   doesn't carry on to the page. (Pinning the body in place instead made the
   page under it jump on phones, Nov 3.) */
.drawer-head, .drawer-grip { touch-action: none; }
.drawer-grip { display: none; }
@media (max-width: 760px) {
  .drawer {
    /* dvh: the screen actually visible (vh on phones includes the part
       behind the browser's toolbar, which cut the drawer's bottom off). */
    top: auto; left: 0; width: 100%; max-height: 88vh; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0; transform: translateY(100%); padding-top: 0;
  }
  .drawer-grip { display: block; flex: none; width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer-backdrop { transition: none; }
}

/* ---------- expandable sections ---------- */
details.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.section > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 15px 20px; font-weight: 600;
}
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary .sub { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--faint); text-align: right; }
details.section > summary::after {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s; flex: none;
}
details.section[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
details.section > .section-body { padding: 0 20px 18px; display: grid; gap: 14px; }
details.section > .section-body > :first-child { padding-top: 2px; }

/* ---------- small things ---------- */
.empty { color: var(--faint); font-size: 14px; padding: 18px 20px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }

/* Price targets (app.js priceTargetHtml): most likely price, likely range, where it ended */
.target { border-radius: 12px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); }
.target summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 14px; padding: 10px 14px; font-size: 14px; color: var(--muted); cursor: pointer; list-style: none; border-radius: 12px; }
.target summary::-webkit-details-marker { display: none; }
.target summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(45deg) translateY(-2px); transition: transform .15s ease; }
.target[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.target summary b { color: var(--ink); }
.target summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.target-body { display: grid; gap: 8px; padding: 2px 14px 12px; }
.target-rows { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.target-rows dt { color: var(--muted); }
.target-rows dd { margin: 0; text-align: right; }
.target-track { position: relative; height: 18px; margin: 2px 4px 0; }
.target-track::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.target-band { position: absolute; top: 5px; height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 28%, transparent); }
.target-now { position: absolute; top: 1px; width: 2px; height: 16px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.target-mid { position: absolute; top: 4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface-2); }
.target-street { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--muted); background: var(--surface-2); }
.target-end { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg); border-radius: 2px; background: currentColor; box-shadow: 0 0 0 2px var(--surface-2); }
.target-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.target-key span { display: inline-flex; align-items: center; gap: 5px; }
.target-key i { display: inline-block; }
.target-key .k-now { width: 2px; height: 11px; background: var(--ink); }
.target-key .k-mid { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.target-key .k-band { width: 16px; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 28%, transparent); }
.target-key .k-street { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--muted); box-sizing: border-box; }
.target-key .k-end { width: 8px; height: 8px; transform: rotate(45deg); background: var(--muted); }
.target-note { font-size: 12px; line-height: 1.5; }
.target-compact { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 13px; }
.pos-scored { font-weight: 600; font-size: 14px; }
.read-all { display: inline; }
.read-all summary { display: inline; cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
.read-all summary::-webkit-details-marker { display: none; }
.read-all[open] summary { display: none; }
.read-all[open] > span { display: inline; }
.clip:has(.read-all[open]) .clip-short { display: none; }

/* ---------- Pink mode (#166) ----------
   The Girlfriend status's look (admins can switch it on to preview it):
   data-pink on <html>, set before first paint from the last known choice.
   Up/down keep green and red, a little softer, so calls stay readable. */
:root[data-pink] {
  --bg: #fff1f6;
  --surface: #ffffff;
  --surface-2: #fff6fa;
  --surface-3: #fde6f0;
  --ink: #2b1421;
  --muted: #7b4a64;
  --faint: #a97c93;
  --line: #f8d6e5;
  --line-strong: #f0bcd4;
  --accent: #d6337a;
  --accent-ink: #ffffff;
  --accent-soft: #ffe1ee;
  --up: #1f8a5f;
  --up-soft: #e6f4ec;
  --down: #c9364a;
  --down-soft: #fde7ea;
  --track: #fbdde9;
  --noread-soft: #fbeaf1;
  --nav-bg: rgba(255, 241, 246, 0.84);
  --shadow: 0 1px 2px rgba(214, 51, 122, 0.06), 0 4px 14px rgba(214, 51, 122, 0.07);
  --heart-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='%23e0337a' fill-opacity='.07' d='M18 26c-3-5-11-4-11 3 0 5 7 9 11 13 4-4 11-8 11-13 0-7-8-8-11-3zM54 60c-2-3.5-8-3-8 2 0 3.5 5 6.5 8 9.5 3-3 8-6 8-9.5 0-5-6-5.5-8-2z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root[data-pink]:not([data-theme="light"]) {
    --bg: #1b0e16;
    --surface: #251420;
    --surface-2: #2c1826;
    --surface-3: #361d2f;
    --ink: #fbe7f1;
    --muted: #d8a9c1;
    --faint: #a07489;
    --line: #3e2235;
    --line-strong: #502c45;
    --accent: #ff7eb6;
    --accent-ink: #1b0e16;
    --accent-soft: #4a1f39;
    --up: #4cc38f;
    --up-soft: #13291f;
    --down: #f06b7c;
    --down-soft: #34161d;
    --track: #3b2034;
    --noread-soft: #2c1826;
    --nav-bg: rgba(37, 20, 32, 0.84);
    --heart-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='%23ff7eb6' fill-opacity='.06' d='M18 26c-3-5-11-4-11 3 0 5 7 9 11 13 4-4 11-8 11-13 0-7-8-8-11-3zM54 60c-2-3.5-8-3-8 2 0 3.5 5 6.5 8 9.5 3-3 8-6 8-9.5 0-5-6-5.5-8-2z'/%3E%3C/svg%3E");
  }
}
:root[data-pink][data-theme="dark"] {
  --bg: #1b0e16;
  --surface: #251420;
  --surface-2: #2c1826;
  --surface-3: #361d2f;
  --ink: #fbe7f1;
  --muted: #d8a9c1;
  --faint: #a07489;
  --line: #3e2235;
  --line-strong: #502c45;
  --accent: #ff7eb6;
  --accent-ink: #1b0e16;
  --accent-soft: #4a1f39;
  --up: #4cc38f;
  --up-soft: #13291f;
  --down: #f06b7c;
  --down-soft: #34161d;
  --track: #3b2034;
  --noread-soft: #2c1826;
  --nav-bg: rgba(37, 20, 32, 0.84);
  --heart-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cpath fill='%23ff7eb6' fill-opacity='.06' d='M18 26c-3-5-11-4-11 3 0 5 7 9 11 13 4-4 11-8 11-13 0-7-8-8-11-3zM54 60c-2-3.5-8-3-8 2 0 3.5 5 6.5 8 9.5 3-3 8-6 8-9.5 0-5-6-5.5-8-2z'/%3E%3C/svg%3E");
}
[data-pink] body { background-image: var(--heart-bg); background-size: 72px 72px; }
[data-pink] ::selection { background: var(--accent-soft); color: var(--ink); }
[data-pink] .brand::after,
[data-pink] .page-head h1::after,
[data-pink] .chamber-title h1::after { content: "\2665"; color: var(--accent); font-size: .7em; margin-left: .3em; display: inline-block; animation: heart-beat 1.6s ease-in-out infinite; }
[data-pink] .brand::after { margin-left: 0; font-size: 14px; }
[data-pink] .card-head h2::after,
[data-pink] .card-pad > h2:first-child::after { content: " \2665"; color: var(--accent); font-size: .8em; }
[data-pink] .navlinks a.active::after,
[data-pink] .section-menu a.active::after { content: " \2665"; color: var(--accent); }
[data-pink] .btn-primary::after { content: "\2665"; margin-left: 6px; font-size: .9em; }
[data-pink] .empty::before { content: "\2665  "; color: var(--accent); }
[data-pink] .spin { border: 0; width: auto; height: auto; animation: heart-beat .9s ease-in-out infinite; }
[data-pink] .spin::before { content: "\2665"; color: var(--accent); font-size: 15px; line-height: 1; }
[data-pink] .progress-fill { background: linear-gradient(90deg, #ff9cc6, var(--accent)); }
[data-pink] .seat::after { content: "\2665"; position: absolute; right: 10px; bottom: 6px; font-size: 13px; color: var(--accent); opacity: .28; pointer-events: none; }
[data-pink] .seat-dot { border-radius: 0; background: none !important; width: 10px; height: 10px; }
[data-pink] .seat-dot::before { content: "\2665"; display: block; font-size: 11px; line-height: 10px; color: var(--line-strong); }
[data-pink] .seat-dot.up::before { color: var(--up); }
[data-pink] .seat-dot.down::before { color: var(--down); }
[data-pink] .seat-dot.even::before { color: var(--even); }
[data-pink] .chamber-seat:hover, [data-pink] .chamber-seat[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--accent-soft); }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { [data-pink] * { animation: none !important; } }

.quip-line { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 8px; min-height: 1.4em; transition: opacity .4s ease; }
.quip-line.fading { opacity: 0; }
[data-pink] .quip-line, [data-galaxy] .quip-line { color: var(--accent); font-style: normal; }

/* Heart explosion (Run, in Pink mode) and the status welcome card. */
.heart-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 9999; }
.heart-bit { position: absolute; display: block; will-change: transform, opacity; }
.heart-bit svg { width: 100%; height: 100%; display: block; }
.status-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status-welcome { border: 0; padding: 0; border-radius: 18px; width: min(420px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.status-welcome::backdrop { background: var(--backdrop); }
/* Pop-ups never taller than what's visible (Oct 15: on a short phone or
   with the keyboard up, the buttons ended up off-screen behind a backdrop
   that blocked every tap): they scroll instead. */
.status-welcome, .feedback-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
.status-welcome .sw-body { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 24px 22px; }
.status-welcome .sw-art { font-size: 44px; line-height: 1; }
.status-welcome .sw-art.gf { color: #e0337a; animation: heart-beat 1.4s ease-in-out infinite; }
.status-welcome h2 { font-size: 20px; }
.status-welcome p { color: var(--muted); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.status-welcome .sw-preview { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.status-welcome.is-gf { background: linear-gradient(180deg, #ffe3ef, #fff 55%); color: #2b1421; }
.status-welcome.is-gf p { color: #7b4a64; }
.status-welcome.is-gf .btn-primary { background: #d6337a; border-color: #d6337a; color: #fff; }

/* ---------- Star Wars look ("galaxy", #166) ----------
   Dad status's look (admins can switch it on to preview it): data-galaxy on
   <html>. Always deep space, whatever Light/Dark says. Only the look
   changes: every word and number on the page stays the same. Up/down are
   lightsaber green and red. */
:root[data-galaxy] {
  color-scheme: dark;
  --bg: #03040a;
  --surface: #0b0f1e;
  --surface-2: #0f1427;
  --surface-3: #151c35;
  --ink: #e9ecf6;
  --muted: #a3acc8;
  --faint: #6f7a9c;
  --line: #1b2442;
  --line-strong: #2a3560;
  --accent: #ffe81f;
  --accent-ink: #03040a;
  --accent-soft: #2a2706;
  --up: #4ade80;
  --up-soft: #0e2a1b;
  --up-mid: #2c7d59;
  --down: #ff4d5a;
  --down-soft: #33141a;
  --down-mid: #8f3e3a;
  --even: #d4b45a;
  --even-soft: #2b2512;
  --noread: #6f7a9c;
  --noread-soft: #131a31;
  --warn: #e9a847;
  --warn-soft: #2e2211;
  --track: #18203d;
  --knob: #e9ecf6;
  --nav-bg: rgba(3, 4, 10, 0.82);
  --backdrop: rgba(0, 0, 0, 0.6);
  --shadow-sm: none;
  --shadow: 0 0 0 1px rgba(255, 232, 31, 0.03), 0 8px 26px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.7);
  --saber: #4fc3ff;
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='.7' opacity='.8'/%3E%3Ccircle cx='64' cy='42' r='.5' opacity='.5'/%3E%3Ccircle cx='101' cy='9' r='.9' opacity='.9'/%3E%3Ccircle cx='150' cy='60' r='.6' opacity='.6'/%3E%3Ccircle cx='205' cy='25' r='.8' opacity='.7'/%3E%3Ccircle cx='230' cy='98' r='.5' opacity='.5'/%3E%3Ccircle cx='180' cy='130' r='1.1' opacity='.9'/%3E%3Ccircle cx='120' cy='112' r='.6' opacity='.6'/%3E%3Ccircle cx='40' cy='130' r='.8' opacity='.7'/%3E%3Ccircle cx='8' cy='200' r='.6' opacity='.5'/%3E%3Ccircle cx='76' cy='176' r='1' opacity='.8'/%3E%3Ccircle cx='140' cy='210' r='.5' opacity='.6'/%3E%3Ccircle cx='214' cy='190' r='.7' opacity='.7'/%3E%3Ccircle cx='96' cy='230' r='.6' opacity='.5'/%3E%3Ccircle cx='168' cy='88' r='.4' opacity='.5'/%3E%3Ccircle cx='30' cy='80' r='.4' opacity='.4'/%3E%3C/g%3E%3C/svg%3E");
  --stars-big: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='60' cy='90' r='1.4'/%3E%3Ccircle cx='300' cy='40' r='1.2'/%3E%3Ccircle cx='210' cy='260' r='1.5'/%3E%3Ccircle cx='380' cy='330' r='1.1'/%3E%3Ccircle cx='110' cy='360' r='1.3'/%3E%3C/g%3E%3Cg fill='%23ffe81f'%3E%3Ccircle cx='350' cy='180' r='1'/%3E%3C/g%3E%3Cg fill='%239fd8ff'%3E%3Ccircle cx='20' cy='250' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
}
[data-galaxy] body {
  background-color: var(--bg);
  background-image: var(--stars), radial-gradient(ellipse 70% 50% at 85% 0%, rgba(79, 195, 255, 0.10), transparent 70%), radial-gradient(ellipse 60% 45% at 0% 100%, rgba(160, 90, 255, 0.10), transparent 70%);
  background-size: 240px 240px, 100% 100%, 100% 100%;
  background-attachment: fixed;
}
[data-galaxy] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--stars-big); background-size: 420px 420px;
  animation: stars-twinkle 4s ease-in-out infinite alternate;
}
@keyframes stars-twinkle { from { opacity: .35; } to { opacity: 1; } }
[data-galaxy] ::selection { background: var(--accent); color: var(--accent-ink); }
[data-galaxy] .page-head h1,
[data-galaxy] .chamber-title h1 { color: var(--accent); text-transform: uppercase; letter-spacing: .06em; text-shadow: 0 0 18px rgba(255, 232, 31, 0.35); }
[data-galaxy] .card { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 92%, transparent); }
[data-galaxy] .card-head h2::after,
[data-galaxy] .card-pad > h2:first-child::after,
[data-galaxy] .navlinks a.active::after,
[data-galaxy] .section-menu a.active::after { content: " \2726"; color: var(--accent); }
[data-galaxy] .empty::before { content: "\2726  "; color: var(--accent); }
/* The brand gets a lightsaber that ignites once. */
[data-galaxy] .brand::after {
  --saber-w: 24px;
  content: ""; display: inline-block; height: 3px; width: var(--saber-w); margin-left: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #8a8f99 0 7px, #eaf8ff 7px);
  box-shadow: 0 0 4px var(--saber), 0 0 10px var(--saber);
  animation: saber-on .6s ease-out both;
}
@keyframes saber-on { from { width: 7px; } to { width: var(--saber-w); } }
@media (max-width: 420px) { [data-galaxy] .brand::after { --saber-w: 15px; margin-left: 0; } }
/* The smallest phones have no room beside the logo: skip its decoration. */
@media (max-width: 389px) { [data-pink] .brand::after, [data-galaxy] .brand::after { display: none; } }
[data-galaxy] .btn-primary { box-shadow: 0 0 14px rgba(255, 232, 31, 0.25); letter-spacing: .02em; }
[data-galaxy] .btn-primary:hover { box-shadow: 0 0 20px rgba(255, 232, 31, 0.45); }
[data-galaxy] .hero-box { box-shadow: 0 0 0 1px var(--line-strong), 0 0 30px rgba(79, 195, 255, 0.08); }
/* A blue lightsaber for the progress bar, a spinning red one for "working". */
[data-galaxy] .progress-track { overflow: visible; background: #0e1430; }
[data-galaxy] .progress-fill { background: #eaf8ff; box-shadow: 0 0 4px var(--saber), 0 0 10px var(--saber), 0 0 18px var(--saber); }
[data-galaxy] .spin { border: 0; border-radius: 2px; width: 16px; height: 3px; background: #ffe3e5; box-shadow: 0 0 4px var(--down), 0 0 9px var(--down); animation: spin 1.1s linear infinite; }
[data-galaxy] .lean-fill.up { background: linear-gradient(90deg, color-mix(in srgb, var(--up) 20%, transparent), #c9ffe0); box-shadow: 0 0 6px var(--up), 0 0 12px var(--up); }
[data-galaxy] .lean-fill.down { background: linear-gradient(270deg, color-mix(in srgb, var(--down) 20%, transparent), #ffd9dc); box-shadow: 0 0 6px var(--down), 0 0 12px var(--down); }
[data-galaxy] .seat:hover { border-color: rgba(255, 232, 31, 0.45); box-shadow: 0 0 18px rgba(255, 232, 31, 0.12); }
[data-galaxy] .seat::after { content: "\2726"; position: absolute; right: 10px; bottom: 6px; font-size: 12px; color: var(--accent); opacity: .3; pointer-events: none; }
[data-galaxy] .seat-dot { border-radius: 0; background: none !important; width: 10px; height: 10px; }
[data-galaxy] .seat-dot::before { content: "\2726"; display: block; font-size: 11px; line-height: 10px; color: var(--line-strong); }
[data-galaxy] .seat-dot.up::before { color: var(--up); text-shadow: 0 0 6px var(--up); }
[data-galaxy] .seat-dot.down::before { color: var(--down); text-shadow: 0 0 6px var(--down); }
[data-galaxy] .seat-dot.even::before { color: var(--even); }
[data-galaxy] .chamber-seat { background: #0b0f1e; border-color: #2a3560; color: var(--accent); }
[data-galaxy] .chamber-seat:hover, [data-galaxy] .chamber-seat[aria-pressed="true"] { box-shadow: 0 0 14px rgba(255, 232, 31, 0.3); }
[data-galaxy] .chamber-seat.lit { background: var(--saber); border-color: #eaf8ff; color: #03040a; box-shadow: 0 0 10px var(--saber), 0 0 22px var(--saber); }
@media (prefers-reduced-motion: reduce) { [data-galaxy] *, [data-galaxy] body::before { animation: none !important; } }

/* Hyperspace (Run, in the Star Wars look). */
.hs-layer { background: transparent; }
.hs-streak { position: absolute; display: block; transform-origin: 0 50%; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(160, 210, 255, 0), #cfe8ff 60%, #fff); will-change: transform, opacity; }
.hs-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff, rgba(160, 210, 255, 0.6) 35%, transparent 75%); }

/* Dad's welcome card: deep space and a lightsaber that ignites. */
.status-welcome.is-dad { background: #05070f var(--stars, none); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='.8' opacity='.8'/%3E%3Ccircle cx='70' cy='40' r='.6' opacity='.6'/%3E%3Ccircle cx='130' cy='20' r='1' opacity='.9'/%3E%3Ccircle cx='40' cy='110' r='.7' opacity='.7'/%3E%3Ccircle cx='110' cy='90' r='.5' opacity='.5'/%3E%3Ccircle cx='150' cy='140' r='.8' opacity='.8'/%3E%3Ccircle cx='80' cy='150' r='.6' opacity='.6'/%3E%3C/g%3E%3C/svg%3E"); color: #e9ecf6; box-shadow: 0 0 0 1px #2a3560, 0 10px 50px rgba(0, 0, 0, 0.7); }
.status-welcome.is-dad h2 { color: #ffe81f; text-transform: uppercase; letter-spacing: .05em; text-shadow: 0 0 16px rgba(255, 232, 31, 0.4); }
.status-welcome.is-dad p { color: #b9c1db; }
.status-welcome.is-dad .btn-primary { background: #ffe81f; border-color: #ffe81f; color: #03040a; }
.sw-saber { display: flex; align-items: center; height: 20px; margin: 4px 0 2px; }
.sw-hilt { width: 34px; height: 9px; border-radius: 2px; background: linear-gradient(180deg, #d5d9e0, #7c828d 55%, #4a4f58); box-shadow: inset 6px 0 0 #2d3037, inset -4px 0 0 #2d3037; }
.sw-blade { height: 5px; width: 150px; border-radius: 0 4px 4px 0; background: #eaf8ff; box-shadow: 0 0 5px #4fc3ff, 0 0 12px #4fc3ff, 0 0 24px #4fc3ff; transform-origin: 0 50%; animation: blade-on .5s .15s ease-out both; }
@keyframes blade-on { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .sw-blade { animation: none; } }

/* The daily welcome-back card (app.js showDailyWelcome). */
.daily-welcome { position: fixed; left: 50%; bottom: 20px; z-index: 60; width: min(440px, calc(100vw - 32px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 14px 14px 16px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 24px); opacity: 0; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.daily-welcome.in { transform: translate(-50%, 0); opacity: 1; }
.dw-flame { width: 52px; height: 52px; border-radius: 14px; background: var(--up-soft); color: var(--up); display: grid; place-items: center;
  align-content: center; font-size: 24px; line-height: 1; }
.dw-flame b { font-size: 22px; font-family: var(--mono); }
.dw-flame span { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.dw-text { display: grid; gap: 2px; font-size: 14px; line-height: 1.4; min-width: 0; }
.dw-text b { font-size: 15px; }
.dw-streak { color: var(--up); font-weight: 600; }
.dw-line { color: var(--muted); overflow-wrap: anywhere; }
.dw-close { align-self: start; border: 0; background: none; color: var(--faint); font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 4px; }
.dw-close:hover { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .daily-welcome { transition: none; } }
.daily-welcome .sw-preview { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }

/* "← Back to ..." at the top left of a page opened from a list (Oct 3) */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; padding: 6px 10px 6px 6px; border-radius: 8px; }
.back-link:hover { background: var(--accent-soft); }
.person-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--faint); }
.person-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- loading: breathing candles (Oct 3) ----------
   Green and red candlesticks growing and shrinking in a wave, in place of
   plain "Loading…" text. loaderHtml() in app.js builds it; anything marked
   data-loader in a page's HTML is swapped for it on load. */
.loader { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; vertical-align: middle; }
.loader-candles { display: inline-flex; align-items: center; gap: 4px; height: 26px; }
.loader-candles i { position: relative; width: 5px; border-radius: 1.5px; transform-origin: center; animation: candle-breathe 1.4s ease-in-out infinite; }
.loader-candles i::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; transform: translateX(-50%); background: inherit; opacity: .55; }
.loader-candles i.u { background: var(--up); }
.loader-candles i.d { background: var(--down); }
.loader.big { flex-direction: column; gap: 12px; }
.loader.big .loader-candles { gap: 7px; height: 76px; }
.loader.big .loader-candles i { width: 10px; border-radius: 2px; }
.loader.big .loader-candles i::before { top: -9px; bottom: -9px; width: 1.5px; }
.loader-block { display: flex; justify-content: center; padding: 48px 20px; }
.loader-block[hidden] { display: none; }
@keyframes candle-breathe { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .loader-candles i { animation: none; }
}

/* ---- Track record news (council/record_news.py) ---- */
/* The red dot by Track record (and on the phone's menu button) for newly scored calls. */
.navlinks a[data-dot], .tabbar a[data-dot], .nav-me[data-dot], .nav-me-menu a[data-dot] { position: relative; }
.navlinks a[data-dot]::after, .tabbar a[data-dot]::after, .nav-me[data-dot]::after {
  content: ""; position: absolute; top: 4px; right: 2px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--down); box-shadow: 0 0 0 2px var(--nav-bg-solid, var(--surface));
}
.nav-me[data-dot]::after { top: -1px; right: -1px; }
.tabbar a[data-dot]::after { right: calc(50% - 16px); top: 4px; }
.nav-me-menu a[data-dot]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--down); margin-left: 8px; }
/* "Your track record is ready": the ten-segment ring filling in. */
.record-unlocked .ru-ring { width: 76px; height: 76px; }
.record-unlocked .ru-ring path { fill: none; stroke: var(--up); stroke-width: 7; stroke-linecap: round; animation: ru-seg .35s ease-out both; }
.record-unlocked .ru-ring text { font: 700 20px var(--sans); fill: var(--ink); }
.record-unlocked .ru-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
@keyframes ru-seg { from { opacity: 0; stroke-width: 2; } to { opacity: 1; stroke-width: 7; } }
@media (prefers-reduced-motion: reduce) { .record-unlocked .ru-ring path { animation: none; } }

/* ---- "What's new" notes (council/announcements.py) ---- */
.announcement { width: min(480px, calc(100vw - 32px)); }
.announcement .sw-body { justify-items: stretch; text-align: left; gap: 14px; }
.announcement h2 { text-align: left; }
.announcement .btn-primary { justify-self: end; }
.an-new { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.an-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* The overnight-runs note's picture: a night-time History. */
.an-overnight { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: #141a2b; color: #e7ecf7; font-size: 14px; }
.an-overnight .faint { color: #9aa6c4; }
.an-on-row { display: flex; align-items: center; gap: 10px; }
.an-on-row b { font-family: var(--mono); min-width: 3.2em; }
.an-on-moon { color: #f5d77a; font-size: 18px; line-height: 1; }
.an-on-tag { font-size: 11.5px; font-weight: 600; letter-spacing: .03em; padding: 2px 8px; border-radius: 99px; background: rgba(117,151,242,.22); color: #b9c9ff; }
.an-overnight .up { color: #4fd59a; margin-left: auto; font-weight: 600; }
.an-overnight .down { color: #ff8a8a; margin-left: auto; font-weight: 600; }
.an-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px 5px 8px; font-size: 13.5px; color: var(--muted); background: var(--surface-2); }
.an-chip b { color: var(--ink); }
.an-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.an-chip i.up { background: var(--up); } .an-chip i.warn { background: var(--warn); }
.an-points { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.an-points b { color: var(--ink); }

/* ---------- the Community chat's shared bits (community.css has the rest) ---------- */
:root {
  --mention-bg: #fff6dc;
  --mention-line: #e8c56a;
  --av1: #2c56c9; --av2: #16835a; --av3: #b0457d; --av4: #9a5b00; --av5: #6b4fd0; --av6: #0e7f99;
  --av-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mention-bg: #2b2512; --mention-line: #8a6d1c;
    --av1: #5a7fe6; --av2: #2f9a6c; --av3: #c25a92; --av4: #b97a1f; --av5: #8a73e6; --av6: #2aa4c0;
    --av-ink: #0d1015;
  }
}
:root[data-theme="dark"] {
  --mention-bg: #2b2512; --mention-line: #8a6d1c;
  --av1: #5a7fe6; --av2: #2f9a6c; --av3: #c25a92; --av4: #b97a1f; --av5: #8a73e6; --av6: #2aa4c0;
  --av-ink: #0d1015;
}

.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; color: var(--av-ink); flex: none; text-transform: uppercase; }
.av svg { width: 21px; height: 21px; }
.av.sm { width: 24px; height: 24px; font-size: 11px; } .av.sm svg { width: 15px; height: 15px; }
.av.c1 { background: var(--av1); } .av.c2 { background: var(--av2); } .av.c3 { background: var(--av3); }
.av.c4 { background: var(--av4); } .av.c5 { background: var(--av5); } .av.c6 { background: var(--av6); }
.badge-owner { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 1px 7px 1px 5px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); vertical-align: 1px; }
.badge-owner svg { width: 12px; height: 12px; }
.badge-mod { display: inline-flex; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
.badge-plan { position: relative; overflow: hidden; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 1px 7px; border-radius: 6px; vertical-align: 1px; border: 1px solid transparent; }
:not(.who) > .badge-plan { margin-left: 5px; }
.badge-plan::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: 0; width: 10px; background: rgba(255, 255, 255, .65);
  transform: translateX(-200%) skewX(-20deg); animation: badge-shine 5s ease-in-out 1s infinite; }
@keyframes badge-shine { 0%, 80% { transform: translateX(-200%) skewX(-20deg); } 100% { transform: translateX(600%) skewX(-20deg); } }
.badge-pro { background: linear-gradient(135deg, #f1f3f6 0%, #b9c0c9 50%, #eef1f4 100%); color: #2c333d; border-color: #a3abb5; }
.badge-elite { background: linear-gradient(135deg, #fbe39a 0%, #d6a63c 50%, #ffe9a8 100%); color: #4a3408; border-color: #c9962b; }
@media (prefers-reduced-motion: reduce) { .badge-plan::after { animation: none; display: none; } }
.mention { background: var(--accent-soft); color: var(--accent); font-weight: 600; padding: 0 3px; border-radius: 4px; cursor: pointer; }
.cash { font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--accent); border-bottom: 1px dotted var(--accent); text-decoration: none; }
.cash:hover { text-decoration: none; background: var(--accent-soft); }
/* The Screener's note (Nov 22): two ready-made screens and a result row. */
.an-scr { width: 100%; display: grid; gap: 8px; text-align: left; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.an-scr-card { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.an-scr-card b { font-size: 14px; }
.an-scr-card span { font-size: 12px; color: var(--muted); }
.an-scr-row { display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.an-scr-row span { margin-right: auto; color: var(--muted); }
.an-scr-row span b { font-family: var(--mono); color: var(--ink); margin-right: 4px; }
.an-scr-row i { font: 600 12px var(--sans); font-style: normal; padding: 2px 6px; border-radius: 6px; }
.an-scr-row i.u { background: var(--up-soft); color: var(--up); }
.an-scr-row i.d { background: var(--down-soft); color: var(--down); }
.an-chat { width: 100%; display: grid; gap: 8px; text-align: left; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.an-msg { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.an-msg b { margin-right: 4px; }
.announcement .ru-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

/* Avatars (Oct 5, app.js chatAvatarHtml): candles by default, or a picked animal, seat or ticker. */
:root { --av-candle-bg: #141a24; --av-candle-up: #3ec28a; --av-candle-down: #ef6a62; --av-candle-wick: #7d879a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --av-candle-bg: #0a0d12; --av-candle-wick: #5d6678; } }
:root[data-theme="dark"] { --av-candle-bg: #0a0d12; --av-candle-wick: #5d6678; }
.av-candles { background: var(--av-candle-bg); overflow: hidden; }
.av-candles svg { width: 100%; height: 100%; }
.av-candles .cw { stroke: var(--av-candle-wick); stroke-width: 2.4; }
.av-candles .cu { fill: var(--av-candle-up); }
.av-candles .cd { fill: var(--av-candle-down); }
.av-animal { font-size: 19px; line-height: 1; }
.av-animal.sm { font-size: 14px; }
.av-animal-1 { background: var(--up-soft); } .av-animal-2 { background: var(--down-soft); } .av-animal-3 { background: var(--accent-soft); }
.av-animal-4 { background: var(--warn-soft); } .av-animal-5 { background: var(--surface-3); }
.av-seat svg { width: 76%; height: 76%; }
.av-seat.sm svg { width: 80%; height: 80%; }
.av-ticker { font-family: var(--mono); font-weight: 600; letter-spacing: -0.03em; border-radius: 26%; text-transform: none; font-size: 10px; }
.av-ticker.len1, .av-ticker.len2 { font-size: 13px; } .av-ticker.len3 { font-size: 11px; } .av-ticker.len4 { font-size: 9.5px; } .av-ticker.len5, .av-ticker.len6 { font-size: 7.5px; }
.av-ticker.sm { font-size: 7px; } .av-ticker.sm.len1, .av-ticker.sm.len2, .av-ticker.sm.len3 { font-size: 8.5px; } .av-ticker.sm.len5, .av-ticker.sm.len6 { font-size: 5.5px; }

/* iPhone zooms the whole page in when you tap a box whose text is under
   16px, and it stays zoomed after the keyboard closes (edges cut off). On
   touch screens every box is at least 16px. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not(.hero-input), textarea, select { font-size: 16px !important; }
}

/* Avatar picker tiles (Community -> Avatar, the Join dialog, the welcome tour). */
.av-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.av-pick { border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.av-pick[aria-pressed="true"] { outline-color: var(--accent); }
.av-pick:focus-visible { outline-color: var(--accent); }
.av-quick { display: grid; gap: 6px; justify-items: start; }
.av-quick[data-open="false"] .av-more { display: none; }
.av-more-btn { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; }
.av-more-btn:hover { text-decoration: underline; }

/* "View as" bar: the owner only (council/plans.py) */
.view-as-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 16px; font-size: 13px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-bottom: 1px solid var(--line); }
.view-as-opts { display: inline-flex; gap: 4px; }
.view-as-opts button { font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong, var(--line)); background: transparent; color: var(--ink); cursor: pointer; min-height: 28px; }
.view-as-opts button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* "Don't want to add an API key?" -> Pro (app.js proNudgeHtml). */
.pro-nudge { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-top: 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.pro-nudge span { flex: 1 1 240px; min-width: 0; }
.pro-nudge .btn { flex: none; }
[data-pro-nudge]:empty { display: none; }

/* The mini leaderboard in "Leaderboards are here!" and the welcome tour. */
.an-lb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 10px; text-align: left; }
.an-lb > div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface); min-width: 0; }
.an-lb .an-lb-head { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.an-lb-head.up, .an-lb-pct.up { color: var(--up); }
.an-lb-head.down, .an-lb-pct.down { color: var(--down); }
.an-lb-row { display: grid; grid-template-columns: 14px 40px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 12px; padding: 3px 0; }
.an-lb-row b { font-family: var(--mono); }
.an-lb-rank { color: var(--muted); font-size: 11px; }
.an-lb-bar { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.an-lb-bar i { display: block; height: 100%; border-radius: inherit; }
.an-lb-bar i.up { background: var(--up); }
.an-lb-bar i.down { background: var(--down); }
.an-lb-pct { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .an-lb { grid-template-columns: minmax(0, 1fr); } }

/* ---- the phone keyboard (watchKeyboard in app.js) ----
   While someone types on a touch screen: the bottom tabs and toasts step
   aside instead of riding on top of the keyboard, and pop-ups move up into
   the part of the screen the keyboard leaves free. */
html.kb-open .tabbar, html.kb-open .daily-welcome { display: none; }
html.kb-up dialog[open] {
  margin-top: calc(var(--vv-top, 0px) + 12px); margin-bottom: auto;
  max-height: calc(var(--vvh, 100dvh) - 24px); overflow-y: auto; overscroll-behavior: contain;
}

/* Pop-ups (Oct 26, Ethan: "the background should not be able to scroll,
   only the pop-up"): while any modal dialog, the welcome tour, the menu
   drawer or Community's side panel is open, the page behind stays still,
   and scrolling inside the pop-up stops at its edge instead of carrying
   on to the page. */
html:has(dialog[open]:modal), html:has(.tour-backdrop.open), html:has(.drawer-backdrop.open),
html:has(.rail-backdrop:not([hidden])) { overflow: hidden; }
html:has(dialog[open]:modal) body, html:has(.tour-backdrop.open) body, html:has(.drawer-backdrop.open) body,
html:has(.rail-backdrop:not([hidden])) body { overflow: hidden; }
dialog, .tour, .drawer { overscroll-behavior: contain; }
.tour-backdrop, .drawer-backdrop, .rail-backdrop { touch-action: none; }

/* View as (Oct 26): the switcher in Admin -> Switches, and elsewhere a small
   pill only while viewing as a plan. */
.view-as-bar.view-as-inline { background: transparent; border: 0; padding: 0; font-size: 14px; }
.view-as-pill { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; display: flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); border-radius: 99px; padding: 6px 6px 6px 14px; font-size: 13px; box-shadow: var(--shadow-lg); }
.view-as-pill button { font: inherit; font-weight: 600; border: 0; border-radius: 99px; padding: 6px 12px; min-height: 32px; cursor: pointer;
  background: var(--bg); color: var(--ink); }
body.has-tabbar .view-as-pill { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.beta-tag[hidden] { display: none; }

/* ---- Colour themes mockup (?tone=paper|mist|crisp on the run page; Admin; Nov 7,
   Ethan: "make the background white instead of grey ... for the whole page").
   Light only: in dark mode the page keeps its dark palette. ---- */
/* Paper: pure white page; cards, bubbles and boxes stay white and are set off by a border and a faint shadow. */
@media (prefers-color-scheme: light) { :root[data-tone="paper"]:not([data-theme="dark"]) { --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #f0f2f5; --line: #e4e7ec; --line-strong: #cdd3dc; --track: #e6e9ee; --noread-soft: #f0f2f5; --nav-bg: rgba(255, 255, 255, 0.86); --shadow: 0 1px 2px rgba(20, 24, 32, 0.05), 0 3px 10px rgba(20, 24, 32, 0.05); } }
:root[data-tone="paper"][data-theme="light"] { --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f7f9; --surface-3: #f0f2f5; --line: #e4e7ec; --line-strong: #cdd3dc; --track: #e6e9ee; --noread-soft: #f0f2f5; --nav-bg: rgba(255, 255, 255, 0.86); --shadow: 0 1px 2px rgba(20, 24, 32, 0.05), 0 3px 10px rgba(20, 24, 32, 0.05); }
/* Mist: white page; cards and boxes are a soft blue-grey tile instead of white, so they stand off without shadows. */
@media (prefers-color-scheme: light) { :root[data-tone="mist"]:not([data-theme="dark"]) { --bg: #ffffff; --surface: #f4f6fa; --surface-2: #edf0f5; --surface-3: #e7ebf1; --line: #e2e6ed; --line-strong: #c9d0db; --track: #e1e6ee; --noread-soft: #e7ebf1; --knob: #ffffff; --nav-bg: rgba(255, 255, 255, 0.86); --shadow-sm: none; --shadow: none; } }
:root[data-tone="mist"][data-theme="light"] { --bg: #ffffff; --surface: #f4f6fa; --surface-2: #edf0f5; --surface-3: #e7ebf1; --line: #e2e6ed; --line-strong: #c9d0db; --track: #e1e6ee; --noread-soft: #e7ebf1; --knob: #ffffff; --nav-bg: rgba(255, 255, 255, 0.86); --shadow-sm: none; --shadow: none; }
/* Crisp: white page with darker navy ink, a deeper blue and firmer lines, for more contrast. */
@media (prefers-color-scheme: light) { :root[data-tone="crisp"]:not([data-theme="dark"]) { --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f7fb; --surface-3: #eef2f8; --ink: #0c1426; --muted: #4a5670; --faint: #7a859c; --line: #dde3ed; --line-strong: #bfc8d8; --track: #e2e7f0; --noread-soft: #eef2f8; --accent: #1f3fb0; --accent-soft: #e4eafa; --nav-bg: rgba(255, 255, 255, 0.88); --shadow: 0 1px 2px rgba(12, 20, 38, 0.06), 0 4px 12px rgba(12, 20, 38, 0.06); } }
:root[data-tone="crisp"][data-theme="light"] { --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f7fb; --surface-3: #eef2f8; --ink: #0c1426; --muted: #4a5670; --faint: #7a859c; --line: #dde3ed; --line-strong: #bfc8d8; --track: #e2e7f0; --noread-soft: #eef2f8; --accent: #1f3fb0; --accent-soft: #e4eafa; --nav-bg: rgba(255, 255, 255, 0.88); --shadow: 0 1px 2px rgba(12, 20, 38, 0.06), 0 4px 12px rgba(12, 20, 38, 0.06); }

/* Signed-out visitors on the Run page (Nov 12, switch "open_front_door"; js/app.js visitorGate). */
.nav-visitor { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-visitor .nav-signin { font-size: 14px; font-weight: 600; color: var(--ink); padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.nav-visitor .nav-signin:hover { background: var(--accent-soft); text-decoration: none; }
.nav-visitor .nav-join { white-space: nowrap; }
.visitor-dialog h2 { line-height: 1.25; }
.visitor-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.visitor-checks li::before { content: "✓ "; color: var(--up, var(--accent)); font-weight: 700; }
.visitor-go { justify-content: center; text-align: center; padding: 12px 16px; font-size: 16px; }
.visitor-signin { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }

/* The membership card: the welcome dialog (run.js showUpgraded) and Settings -> Your plan. */
.up-card { aspect-ratio: 1.6; border-radius: 20px; position: relative; overflow: hidden; box-sizing: border-box; padding: 20px 22px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left; }
.up-pro { background: linear-gradient(135deg, #f4f6f8 0%, #b4bcc6 40%, #f8f9fb 65%, #8c95a1 100%); color: #1f252e; box-shadow: 0 24px 50px rgba(100, 110, 125, .3); }
.up-elite { background: linear-gradient(135deg, #f8dc85 0%, #d9a73a 40%, #ffe9a8 65%, #b07d1c 100%); color: #3d2a05; box-shadow: 0 24px 50px rgba(201, 150, 43, .35); }
.up-top { display: flex; justify-content: space-between; align-items: center; position: relative; }
.up-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; }
.up-brand svg { width: 26px; height: 26px; }
.up-plan { font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 1.5px solid currentColor; }
.up-bottom { position: relative; display: flex; flex-direction: column; gap: 3px; }
.up-kind { font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.up-name { font-size: 20px; font-weight: 700; min-height: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-since { font-size: 12px; }
.up-shine { position: absolute; top: 0; bottom: 0; left: 0; width: 70px; background: rgba(255, 255, 255, .55); transform: translateX(-200%) skewX(-20deg); animation: up-shine 1.1s ease-in-out 1.2s both; }
@keyframes up-shine { to { transform: translateX(700%) skewX(-20deg); } }

/* Settings -> Your plan: the card is dealt face down, flips over with a bounce,
   a shine runs across it, then it leans toward the pointer with a glare. */
.mc-scene { width: min(340px, 100%); perspective: 1100px; margin: 2px 0 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mc-tilt { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.mc-scene.is-tilting .mc-tilt { transition: transform .08s linear; }
.mc-deal { position: relative; transform-style: preserve-3d; animation: mc-deal 1.25s cubic-bezier(.2, .85, .25, 1.12) .15s both; }
.mc-deal > .up-card { backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: translateZ(1px); }
.mc-deal > .up-card:not(.mc-back) .up-shine { animation-delay: 1.3s; }
.mc-deal > .mc-back { position: absolute; inset: 0; transform: rotateY(180deg) translateZ(1px); display: grid; place-items: center; }
.mc-back svg { width: 64px; height: 64px; opacity: .55; }
.mc-glare { position: absolute; inset: 0; border-radius: 20px; pointer-events: none; opacity: 0; transition: opacity .3s ease; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 55%); }
.mc-scene.is-tilting .mc-glare { opacity: 1; }
.mc-deal::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -14px; height: 18px; border-radius: 50%;
  background: rgba(0, 0, 0, .18); filter: blur(10px); transform: translateZ(-40px); animation: mc-shadow 1.25s ease .15s both; z-index: -1; }
.mc-spin { animation: mc-spin .9s cubic-bezier(.3, .7, .3, 1.1) both; }
@keyframes mc-deal {
  0% { transform: translateY(-36px) rotateY(180deg) rotateZ(-10deg) scale(.82); opacity: 0; }
  25% { opacity: 1; }
  70% { transform: translateY(4px) rotateY(-12deg) rotateZ(1deg) scale(1.02); }
  100% { transform: none; opacity: 1; }
}
@keyframes mc-shadow { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: none; } }
@keyframes mc-spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .mc-deal, .mc-deal::after, .mc-spin { animation: none; } .mc-tilt { transition: none; } }


/* ---- The Pro card (app.js proCardHtml, Nov 22): one look everywhere Pro or
   Elite is offered. Calm, not an error: the accent tint, the plan's badge,
   a few ticked lines, the price and one button. ---- */
.pro-pitch { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--accent); border-radius: 16px;
  padding: 18px 20px 16px; box-shadow: 0 8px 30px rgb(37 99 235 / .12); background-image: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); }
.pro-pitch.compact { padding: 14px 16px 12px; border-radius: 14px; box-shadow: 0 4px 16px rgb(37 99 235 / .10); }
.pro-pitch-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 18px; cursor: pointer; }
.pro-pitch-x:hover { background: var(--surface-3); color: var(--ink); }
.pro-pitch-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pro-pitch-badge { font: 700 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink, #fff); background: var(--accent);
  border-radius: 99px; padding: 3px 9px; }
.pro-pitch.elite .pro-pitch-badge { background: linear-gradient(135deg, #b8860b, #e0b84a); color: #1b1404; }
.pro-pitch-kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.pro-pitch h3 { margin: 10px 0 8px; font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; padding-right: 28px; color: var(--ink); }
.pro-pitch.compact h3 { font-size: 16px; margin: 8px 0 6px; padding-right: 0; }
.pro-pitch-points { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pro-pitch.compact .pro-pitch-points { font-size: 13.5px; gap: 5px; margin-bottom: 12px; }
.pro-pitch-points li { display: flex; gap: 9px; }
.pro-pitch-points li::before { content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--up-soft); color: var(--up);
  font: 700 11px/18px var(--sans); text-align: center; margin-top: 1px; }
.pro-pitch-points b { color: var(--ink); font-weight: 600; }
.pro-pitch-act { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.pro-pitch-go { min-height: 44px; padding: 0 22px; font-size: 15px; }
.pro-pitch.compact .pro-pitch-go { min-height: 38px; padding: 0 16px; font-size: 14px; }
.pro-pitch-price { font-size: 13.5px; color: var(--muted); }
.pro-pitch-price b { color: var(--ink); font-size: 15px; }
.pro-pitch-spots { color: var(--accent); font-weight: 600; }
.pro-pitch-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pro-pitch-alt > span:first-child { flex-basis: 100%; }
.pro-pitch-alt .pill { cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); min-height: 32px; gap: 6px; font-family: var(--mono); }
.pro-pitch-alt .pill .faint { font-family: var(--sans); font-weight: 500; }
.pro-pitch-alt .pill:hover { border-color: var(--accent); }
@media (max-width: 640px) { .pro-pitch { padding: 16px; } .pro-pitch:not(.compact) .pro-pitch-go { flex: 1 0 100%; justify-content: center; } }
/* Where the card sits over a blurred preview, or in a list. */
.dg-locked-over .pro-pitch, .dg-pol-lock-over .pro-pitch { width: min(440px, 100%); }
.lb-locked .pro-pitch { width: 100%; }
#ew-upsell .pro-pitch { margin-bottom: 14px; }
.pro-nudge-wrap .pro-pitch, .alert .pro-pitch { margin-top: 10px; }

/* Easter egg, Nov 24-25 2026 (Ethan): "Welcome back, Jensen Huang" with green
   candles, once per browser in its two days (app.js jensenBanner). Safe to
   delete after Nov 26. */

  .jb { position: fixed; top: var(--jb-top, 64px); left: 50%; z-index: 9999; width: min(560px, calc(100% - 24px));
    transform: translate(-50%, -140%); opacity: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
    background: linear-gradient(100deg, #0b1410 0%, #0f2a1e 70%, #134a31 100%); color: #fff;
    box-shadow: 0 10px 30px rgba(10, 30, 20, .28), 0 0 0 1px rgba(92, 240, 168, .18);
    animation: jb-in .55s cubic-bezier(.2, .9, .25, 1.15) .15s forwards; }
  .jb.out { animation: jb-out .4s ease-in forwards; }
  @keyframes jb-in { to { transform: translate(-50%, 0); opacity: 1; } }
  @keyframes jb-out { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -140%); opacity: 0; } }

  .jb-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 44px 12px 14px; }
  .jb-chart { flex: none; width: 92px; height: 40px; display: flex; align-items: flex-end; gap: 3px; }
  .jb-slot { position: relative; flex: 1; height: 100%; }
  .jb-c { position: absolute; left: 0; right: 0; bottom: var(--y); height: var(--h); border-radius: 2px; transform-origin: bottom;
    background: linear-gradient(180deg, #5cf0a8, #16835a); box-shadow: 0 0 8px rgba(92, 240, 168, .5);
    opacity: 0; animation: jb-rise .35s cubic-bezier(.2, .9, .25, 1.3) forwards; animation-delay: var(--d); }
  .jb-c::before { content: ""; position: absolute; left: 50%; width: 1px; margin-left: -.5px; top: -3px; bottom: -3px; background: #5cf0a8; opacity: .7; }
  @keyframes jb-rise { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }

  .jb-text { min-width: 0; display: grid; gap: 2px; }
  .jb-text b { font-size: 16px; line-height: 1.25; opacity: 0; animation: jb-up .4s ease-out .9s forwards; }
  .jb-text b span { color: #5cf0a8; text-shadow: 0 0 14px rgba(92, 240, 168, .5); }
  .jb-text small { font-size: 13px; color: #b7cfc2; opacity: 0; animation: jb-up .4s ease-out 1.1s forwards; }
  @keyframes jb-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  .jb-tick { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px;
    background: rgba(92, 240, 168, .14); border: 1px solid rgba(92, 240, 168, .35); font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #8ff0bf; opacity: 0; animation: jb-up .4s ease-out 1.25s forwards; }
  .jb-tick i { font-style: normal; color: #5cf0a8; }

  .jb-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: transparent; color: #8aa597; font-size: 18px; line-height: 1; cursor: pointer; }
  .jb-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .jb-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: #5cf0a8; opacity: .6; transform-origin: left;
    animation: jb-time 7s linear .7s forwards; }
  @keyframes jb-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }

  .jb-tick-sm, .jb-short { display: none; }
  @media (max-width: 480px) {
    .jb-long { display: none; }
    .jb-short { display: inline; }
    .jb-tick-sm { display: inline; margin-right: 6px; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #5cf0a8; }
    .jb-chart { width: 64px; height: 34px; }
    .jb-text b { font-size: 15px; }
    .jb-tick { padding: 4px 7px; font-size: 12px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .jb, .jb-c, .jb-text b, .jb-text small, .jb-tick { animation-duration: .01s !important; animation-delay: 0s !important; }
  }
