/* ───────────────── Settings page (/watchlist/settings) ─────────────────
   Was a modal (.gtb-modal) that covered the app; it is now a full-canvas SPA
   view (#settings-view) reusing the wallet's .pf-scroll / .pf-wrap shell.
   The modal-only shells (.settings-stage, .hp-toggle) are gone with it — the
   page has room, so the health panel renders inline and always-open instead of
   sliding out. (.gtb-modal itself STAYS in 08-chart-chrome.css: the chart
   context menu and other dialogs still use it.)

   ── 2026-07-25 rework (owner: "it is kinda AI sloped, specially the toggle") ──
   The page was a crest + display-font noun + champagne caps sub line, over rows
   of [bold title / grey descriptive sentence / iOS pill switch]. That is the
   same generated-dashboard shape the wallet's .wc-head call replaced earlier the
   same day ("read as a generated dashboard header and spent --champagne on a
   static label"). Settings now speaks the product's own voice instead:

   • header  — one dense strip: caps label left, mono key/value readout right.
               Same recipe as .cc-band-phase / .wc-acct, neutral text ramp only.
   • section — .cc-section-head language: caps title left, mono meta right, over
               the watchlist card surface (opaque --bg-tertiary + INSET ring,
               never a real 1px rounded border — those bowtie in screenshots).
   • control — .stg-2way replaces .sq-switch. A two-segment control that SPELLS
               both of its states (Dark|Light, Off|On, Hidden|Shown) rather than
               a rounded pill with a circle in it. It is deliberately the chip
               language this app already ships — .cc-btab on the watchlist board,
               .pf-modetog on the wallet — and it passes the label test a pill
               fails here: "Light Mode · off" does not say what you get, "Dark |
               Light" does.

   .stg-2way is still a REAL <input type="checkbox">. The input is the source of
   truth every existing binding reads (#stg-theme wired inline in app.html,
   #stg-squeeze in app.js); it keeps its tab stop, its Space toggle and its
   <label for> association. The two words are aria-hidden decoration painted off
   :checked. A tiny delegated listener in the template lets a click on a word
   SELECT that word instead of flipping; without it the label still toggles.

   CASCADE NOTE: the old .stg-row* / .sq-switch* rules used to live in
   04-header.css and were deleted there. Nothing else in the repo referenced
   either family (grep: js, html, py, css), and every replacement lives here, in
   the LATER file, so this move can only have loosened the cascade. */

/* (The page head .st-head and the 54rem .pf-wrap column were removed 2026-11-22
   with the page itself: the panel's frame is 113-settings.css.) */

/* ── Section rhythm ──────────────────────────────────────────────────────── */
.st-section{ margin-bottom:1.5rem; }
.st-section:last-child{ margin-bottom:0; }
.st-sec-head{ display:flex; align-items:baseline; gap:0.75rem; padding-bottom:0.4375rem; }
.st-sec-title{
  margin:0;
  font-family:var(--font-sans); font-size:max(0.6875rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal;
  color:var(--text-secondary);
}
.st-sec-note{
  margin-left:auto;
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:500;
  color:var(--text-muted); white-space:nowrap;
}
/* The watchlist card surface, spelled out (see .cc-layout .cc-section). */
.st-panel{
  padding:1.125rem;
  background:var(--bg-tertiary);
  border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
/* A panel that is a STACK OF ROWS takes its rhythm from the rows, so it drops
   its own top/bottom padding. Opt-in, so the form panels (and #sub-panel, owned
   by the billing work landing in parallel) keep the default air. */
.st-panel.st-rows{ padding:0.25rem 1.125rem; }
/* Explicit alias for the form panels (kept so the class reads as intentional at
   the call site even though it matches the default). */
.st-panel.st-form{ padding:1.125rem; }
/* Fallback: any section still headed by the old .pf-eyebrow keeps its air. */
.st-section .pf-eyebrow{ display:block; margin-bottom:0.5rem; }
.st-note{
  font-family:var(--font-mono); font-size:max(0.6875rem, var(--fs-floor)); font-weight:500;
  color:var(--text-muted); margin:0 0 1rem;
}
.st-note:empty{ display:none; margin:0; }

/* (The Settings arrival cascade lived here until 2026-11-22: Settings is a panel
   now, 113-settings.css, and the spec drops the cascade, AUDIT fault 8.) */

/* Screen-reader-only clarifier. Used once, on the theme row, so the checkbox's
   accessible name says which way "checked" points. */
.st-sr{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%);
  white-space:nowrap; border:0;
}

/* ── Setting row: [ label · qualifier ] ……………………… [ control ] ───────────── */
.stg-row{
  display:grid; grid-template-columns:minmax(0,1fr) auto;
  align-items:center; column-gap:1rem;
  margin:0; padding:0.6875rem 0; cursor:pointer;
}
.st-panel .stg-row + .stg-row{ box-shadow:inset 0 1px 0 var(--border-subtle); }
.stg-lab{ display:flex; align-items:baseline; gap:0.5rem; flex-wrap:wrap; min-width:0; }
.stg-k{
  font-family:var(--font-sans); font-size:0.8125rem; font-weight:600;
  color:var(--text-primary); line-height:1.25;
}
/* Not a sentence — a two-word scope tag, in the readout face. */
.stg-q{
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:500;
  letter-spacing:0.04em; color:var(--text-xmuted); white-space:nowrap;
}

/* ── .stg-2way — the two-state control ───────────────────────────────────── */
.stg-2way{ position:relative; display:inline-flex; flex-shrink:0; }
/* Clipped, NOT display:none / visibility:hidden — the input has to keep its tab
   stop, its Space toggle and its focus event so the ring below can fire. */
.stg-2way > input{
  position:absolute; width:1px; height:1px; margin:0; padding:0; border:0;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}
.stg-2way-face{
  position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:1fr;
  align-items:center; height:1.625rem; min-height:var(--ctl-floor); overflow:hidden;
  border-radius:var(--radius-sm);
  background:var(--bg-primary);
  box-shadow:inset 0 0 0 1px var(--border-default);
  transition:box-shadow .14s var(--ease-out);
}
/* The lit plate. Absolutely positioned, so it is out of grid flow and the two
   words still share the track 50/50. */
.stg-2way-plate{
  position:absolute; top:0; left:0; width:50%; height:100%;
  border-radius:var(--radius-sm);
  background:var(--accent-dim);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
  transition:transform .18s var(--ease-out),
             background .18s var(--ease-out),
             box-shadow .18s var(--ease-out);
}
.stg-2way-opt{
  position:relative; z-index:1;
  min-width:4.5rem; padding:0 0.625rem; text-align:center;
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal;
  color:var(--text-xmuted); user-select:none;
  transition:color .18s var(--ease-out);
}
/* ONE selected style (T9 feel round 2): whichever word is selected, Off as
   much as On, sits on the accent plate in the accent ink, the "selected" look
   .cc-btab.on uses on the watchlist board. The plate only slides. */
.stg-2way-opt.off{ color:var(--accent); }
.stg-2way > input:checked ~ .stg-2way-face .stg-2way-plate{
  transform:translateX(100%);
}
.stg-2way > input:checked ~ .stg-2way-face .stg-2way-opt.off{ color:var(--text-xmuted); }
.stg-2way > input:checked ~ .stg-2way-face .stg-2way-opt.on{ color:var(--accent); }
.stg-row:hover .stg-2way-face{ box-shadow:inset 0 0 0 1px var(--border-strong); }
.stg-row:hover .stg-2way-opt{ color:var(--text-muted); }
.stg-row:hover .stg-2way-opt.off{ color:var(--accent); }
.stg-row:hover .stg-2way > input:checked ~ .stg-2way-face .stg-2way-opt.off{ color:var(--text-muted); }
.stg-row:hover .stg-2way > input:checked ~ .stg-2way-face .stg-2way-opt.on{ color:var(--accent); }
/* Keyboard ring: an inset accent line plus an outer halo, both box-shadow, so
   nothing bowties and nothing shifts layout. Wins over the hover rule above by
   being later + more specific. */
.stg-2way > input:focus-visible ~ .stg-2way-face{
  box-shadow:inset 0 0 0 1px var(--accent);
}

@media (prefers-reduced-motion:reduce){
  .stg-2way-plate, .stg-2way-opt, .stg-2way-face{ transition:none; }
}

/* ── Scoring form ────────────────────────────────────────────────────────── */
.st-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:1rem; }
.st-field{ min-width:0; }
.st-field label{
  display:block; margin-bottom:0.375rem;
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal; color:var(--text-muted);
}
.st-save-row{ display:flex; align-items:center; gap:0.75rem; margin-top:1rem; }
/* Same chip as the control, so the panel has one button language rather than a
   filled green slab sitting under two mono fields. */
#stg-save{
  height:1.625rem; min-height:var(--ctl-floor); padding:0 0.9rem; border:0; border-radius:var(--radius-sm);
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal;
  color:var(--accent); background:var(--accent-dim);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
  cursor:pointer;
  transition:background .14s var(--ease-out), color .14s var(--ease-out);
}
#stg-save:hover{ background:color-mix(in srgb, var(--accent) 18%, transparent); }
#stg-save:focus-visible{
  outline:none;
  box-shadow:inset 0 0 0 1px var(--accent);
}
/* app.js writes textContent + a colour here and fades it in; it starts blank,
   so keep it out of the layout until it says something. */
#stg-status{
  font-family:var(--font-mono); font-size:max(0.6875rem, var(--fs-floor)); color:var(--green);
  transition:opacity .3s;
}

/* Health panel, inlined. On the page there's no slide-out: it's a plain block
   inside the section. showSettingsView() calls HealthPanel.open() to start the
   poll, which still stamps .open — these rules just make the geometry static so
   the width/opacity transition can't hide it. */
.health-panel{ width:auto; opacity:1; overflow:visible; pointer-events:auto; }
.health-panel-inner{
  width:100%; box-sizing:border-box;
  max-height:none; overflow:visible;
  margin-left:0; padding:1.125rem;
  background:var(--bg-tertiary);
  border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.hp-head{ display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.hp-title{
  font-family:var(--font-sans); font-size:0.8125rem; font-weight:600;
  color:var(--text-primary);
}
/* Status chip, in the page's one chip recipe: mono caps, --radius-sm, INSET
   ring. Was a 20px-radius pill with a real 1px border — the same generic shape
   the switch wore. */
.hp-overall{
  margin-left:auto; height:1.375rem; display:inline-flex; align-items:center;
  padding:0 0.5625rem; border-radius:var(--radius-sm); border:0;
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  letter-spacing:normal; text-transform:none;
  background:transparent; color:var(--text-muted);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.hp-overall.ok{ background:var(--accent-dim); color:var(--status-ok); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent); }
.hp-overall.degraded{ background:color-mix(in srgb, var(--status-warn) 12%, transparent); color:var(--status-warn); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--status-warn) 34%, transparent); }
.hp-overall.down{ background:var(--red-dim); color:var(--red); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 34%, transparent); }
.hp-refresh{
  background:none; border:none; color:var(--text-muted); cursor:pointer;
  font-size:1rem; line-height:1; padding:2px 4px; border-radius:var(--radius-sm);
}
.hp-refresh:hover{ color:var(--text-primary); background:var(--bg-hover); }
.hp-refresh.spin{ animation:hp-spin .8s linear infinite; }
@keyframes hp-spin{ to{ transform:rotate(360deg); } }
.hp-updated{
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:500;
  color:var(--text-xmuted); margin-bottom:12px;
}

.hp-cat{ font-size:max(0.62rem, var(--fs-floor)); font-weight:800; letter-spacing:normal; text-transform:none;
  color:var(--text-xmuted); margin:12px 0 6px; }
.hp-cat:first-child{ margin-top:0; }

.hp-row{ display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--border-subtle); }
.hp-row:last-child{ border-bottom:none; }

.dep-logo{
  width:1.6rem; height:1.6rem; flex-shrink:0; border-radius:0.375rem; background:var(--logo-plate);
  box-shadow:0 0 0 0.14rem color-mix(in srgb, var(--text-primary) 88%, transparent), var(--shadow-tile);
  display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative;
}
.dep-logo img{ width:74%; height:74%; object-fit:contain; }
.dep-logo .mono{ display:none; font-weight:800; font-size:max(0.7rem, var(--fs-floor)); color:var(--text-secondary); }
.dep-logo.fallback{ background:var(--bg-tertiary); box-shadow:0 0 0 0.14rem color-mix(in srgb, var(--text-primary) 50%, transparent); }
.dep-logo.fallback .mono{ display:block; }

.hp-name{ font-size:0.78rem; font-weight:600; color:var(--text-primary); flex:1; min-width:0; }
.hp-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; background:var(--text-muted); box-shadow:0 0 0 3px color-mix(in srgb, var(--text-muted) 14%, transparent); }
.hp-dot.ok{ background:var(--status-ok); box-shadow:0 0 0 3px color-mix(in srgb, var(--status-ok) 18%, transparent); }
.hp-dot.down{ background:var(--red); box-shadow:0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.hp-dot.na{ background:var(--text-xmuted); box-shadow:none; }
.hp-stat{ font-size:max(0.68rem, var(--fs-floor)); color:var(--text-muted); max-width:9rem; text-align:right; word-break:break-word; }
.hp-stat.ok{ color:var(--status-ok); }
.hp-stat.down{ color:var(--red); }
.hp-stat.na{ color:var(--text-xmuted); }

/* ── Dependency-list loading state ────────────────────────────────────────
   The controls above are server-rendered, so the ONLY real wait on this page
   is /api/health/dependencies, fetched by health-panel.js once the view opens.
   #hp-list was empty until it landed, i.e. the panel opened as a titled void
   under a "checking" chip. The skeleton (markup in app.html) traces the real
   .hp-row geometry so nothing jumps when the rows arrive, and the first
   render() replaces the whole block.

   Paint-only shimmer: background-position on a gradient, no layout, no
   compositor churn. It borrows `sub-shimmer` — the keyframe the Subscription
   skeleton on this same page already ships (keyframes resolve document-wide,
   so its later @keyframes block is fine) — rather than adding a second
   shimmer rhythm to one screen. */
.hp-skel-fill{
  display:block; border-radius:var(--radius-sm);
  background:linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-primary) 50%, var(--bg-hover) 75%);
  background-size:200% 100%;
  animation:sub-shimmer 1.3s linear infinite;
}
.hp-skel-cat{ width:6.5rem; height:0.5rem; margin-bottom:0.75rem; }
/* Mirrors .hp-row above (same gap, padding and hairline) so the swap to real
   rows is a content change, not a layout change. */
.hp-skel-row{ display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--border-subtle); }
.hp-skel-row:last-child{ border-bottom:none; }
.hp-skel-logo{ width:1.6rem; height:1.6rem; flex-shrink:0; border-radius:0.375rem; }
.hp-skel-name{ flex:1 1 auto; min-width:0; max-width:11rem; height:0.6875rem; }
.hp-skel-stat{ flex:0 0 auto; width:3.25rem; height:0.6875rem; }
/* Probe failed before any data arrived: the skeleton must stop rather than
   shimmer forever (health-panel.js swaps it for this). */
.hp-fail{
  font-family:var(--font-mono); font-size:max(0.6875rem, var(--fs-floor));
  color:var(--text-muted); padding:7px 0;
}
@media (prefers-reduced-motion:reduce){
  .hp-skel-fill{ animation:none; }
}

/* ── Subscription panel ───────────────────────────────────────────────────
   Rendered by static/js/billing/subscription-panel.js into #sub-panel here AND
   into #mng-card on /watchlist/manage — manage.html loads this same 01..14
   cascade, so these rules are the single styling source for both hosts. Do not
   move them to pages/manage.css: the Settings view never loads that file.

   Speaks the reworked Settings language above, not the old .mng-* card: caps
   sans identity, mono readout for state, chip buttons on the #stg-save recipe.
   Every ring is an INSET box-shadow, never a 1px border (those bowtie in
   headless screenshots). */
.sub-card{ display:flex; flex-direction:column; gap:0.875rem; }

/* Identity line: plan + rank pill left, state badge right. */
.sub-top{ display:flex; align-items:center; gap:0.75rem; flex-wrap:wrap; }
.sub-ident{ display:flex; align-items:center; gap:0.5rem; min-width:0; }
.sub-plan{
  font-family:var(--font-sans); font-size:0.9375rem; font-weight:700;
  color:var(--text-primary); line-height:1.15;
}
/* Geometry only — colour comes from the shared .role-* classes in
   10-admin-pages.css, which load earlier in the cascade. */
.sub-pill{
  display:inline-block; flex-shrink:0;
  font-family:var(--font-mono); font-size:max(0.5625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal;
  padding:0.1875rem 0.4375rem; border-radius:999px; white-space:nowrap;
}

/* State badge. Mono + caps so it reads as a readout, not a marketing tag. */
.sub-badge{
  margin-left:auto; flex-shrink:0;
  font-family:var(--font-mono); font-size:max(0.5625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal;
  padding:0.1875rem 0.5rem; border-radius:999px; white-space:nowrap;
  color:var(--text-muted); background:var(--bg-primary);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.sub-badge-active{
  color:var(--status-ok); background:color-mix(in srgb, var(--status-ok) 12%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--status-ok) 30%, transparent);
}
.sub-badge-ending, .sub-badge-warn{
  color:var(--status-warn); background:color-mix(in srgb, var(--status-warn) 12%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--status-warn) 30%, transparent);
}
.sub-badge-ended{
  color:var(--red); background:color-mix(in srgb, var(--red) 12%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent);
}
.sub-badge-comp{
  color:var(--champagne); background:var(--champagne-dim);
  box-shadow:inset 0 0 0 1px var(--champagne-ring);
}

.sub-price{
  font-family:var(--font-mono); font-size:0.8125rem; font-weight:600;
  font-variant-numeric:tabular-nums; color:var(--text-secondary);
  margin-top:-0.375rem;
}
.sub-detail{ min-width:0; }
.sub-line{
  margin:0; font-family:var(--font-sans); font-size:0.8125rem; line-height:1.5;
  color:var(--text-muted);
}
.sub-line strong{ color:var(--text-primary); font-weight:600; }

/* What the rank grants. A quiet reference list, not a pricing table. */
.sub-grants-wrap{
  padding-top:0.875rem;
  box-shadow:inset 0 1px 0 var(--border-subtle);
}
.sub-grants-title{
  margin:0 0 0.5rem;
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal; color:var(--text-xmuted);
}
.sub-grants{ margin:0; padding:0; list-style:none; display:grid; gap:0.3125rem; }
.sub-grant{
  position:relative; padding-left:0.9375rem;
  font-family:var(--font-sans); font-size:0.75rem; line-height:1.45;
  color:var(--text-muted);
}
.sub-grant::before{
  content:""; position:absolute; left:0; top:0.5rem;
  width:0.3125rem; height:0.3125rem; border-radius:50%;
  background:color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Inline status line for in-flight actions and errors. */
.sub-msg{
  display:none;
  font-family:var(--font-mono); font-size:max(0.6875rem, var(--fs-floor)); color:var(--text-muted);
}
.sub-msg.show{ display:block; }
.sub-msg.err{ color:var(--red); }

/* Confirm step replaces the action row in place, so the card never grows a
   modal or shifts the surrounding sections. */
.sub-confirm[hidden]{ display:none; }
.sub-confirm{
  display:flex; flex-direction:column; gap:0.6875rem;
  padding:0.875rem; border-radius:var(--radius-lg);
  background:var(--bg-primary);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 26%, transparent);
}
.sub-confirm-text{
  margin:0; font-family:var(--font-sans); font-size:0.78125rem; line-height:1.45;
  color:var(--text-secondary);
}

/* ── Buttons ──
   Same chip recipe as #stg-save above, so the section has ONE button language.
   Real <button>s in normal flow: nothing is layered over them, which is what
   keeps them hit-testable at their own centre. */
.sub-actions{ display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
.sub-actions[hidden]{ display:none; }
.sub-btn{
  height:1.75rem; padding:0 0.875rem; border:0; border-radius:var(--radius-sm);
  font-family:var(--font-mono); font-size:max(0.625rem, var(--fs-floor)); font-weight:700;
  text-transform:none; letter-spacing:normal; white-space:nowrap;
  cursor:pointer;
  transition:background .14s var(--ease-out), color .14s var(--ease-out),
             box-shadow .14s var(--ease-out);
}
.sub-btn:disabled{ opacity:0.5; cursor:default; }
.sub-btn:focus-visible{
  outline:none;
  box-shadow:inset 0 0 0 1px var(--accent);
}
.sub-btn-primary{
  color:var(--accent); background:var(--accent-dim);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}
.sub-btn-primary:not(:disabled):hover{ background:color-mix(in srgb, var(--accent) 18%, transparent); }
.sub-btn-ghost{
  color:var(--text-secondary); background:var(--bg-primary);
  box-shadow:inset 0 0 0 1px var(--border-default);
}
.sub-btn-ghost:not(:disabled):hover{ color:var(--text-primary); box-shadow:inset 0 0 0 1px var(--border-strong); }
/* Destructive but not shouty: cancelling is a legitimate thing to want, so it
   is a quiet text chip until hover, then it commits to red. */
.sub-btn-quiet{
  color:var(--text-xmuted); background:transparent;
  box-shadow:inset 0 0 0 1px transparent;
}
.sub-btn-quiet:not(:disabled):hover{
  color:var(--red);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent);
}
.sub-btn-danger{
  color:var(--red); background:color-mix(in srgb, var(--red) 12%, transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--red) 34%, transparent);
}
.sub-btn-danger:not(:disabled):hover{ background:color-mix(in srgb, var(--red) 20%, transparent); }

/* Loading skeleton (server-rendered, then re-rendered by the module). */
.sub-card-loading{ gap:0.625rem; }
.sub-skel{
  height:0.9375rem; border-radius:var(--radius-sm);
  background:linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-primary) 50%, var(--bg-hover) 75%);
  background-size:200% 100%;
  animation:sub-shimmer 1.3s linear infinite;
}
.sub-skel-sm{ height:0.6875rem; }
@keyframes sub-shimmer{ to{ background-position:-200% 0; } }
@media (prefers-reduced-motion:reduce){
  .sub-skel{ animation:none; }
}

/* The standalone /watchlist/manage page hosts the same card inside .mng-card.
   PRE-EXISTING layout bug, fixed here: 01-base.css sets body{display:flex}, so
   .um-page (which declares no width) sized to max-content and the whole page
   collapsed to the card's 30rem — .mng-wrap's justify-content:center then had
   nothing to centre within. Scoped to .mng-page so the other .um-page consoles
   (users / stocks / ibkr) are untouched. */
.mng-page{ width:100%; }

/* That page's wrapper has no panel surface of its own once the old .mng-header
   markup is gone, so give it the same card surface the Settings panel has. */
.mng-card{
  padding:1.125rem;
  background:var(--bg-tertiary);
  border-radius:var(--radius-lg);
  box-shadow:inset 0 0 0 1px var(--border-default);
}

@media (max-width:900px){
  /* The panel is a plain block now, so it needs no narrow-width unwinding —
     only the scoring selects need to stop sharing a row. */
  .st-grid{ flex-direction:column; }
  /* Tighten the gap only. Do NOT stretch the buttons to fill the row: the quiet
     Cancel variant has no background, so a stretched one reads as floating text
     marooned in whitespace. They already wrap (flex-wrap on .sub-actions). */
  .sub-actions{ gap:0.4375rem; }
}

/* ── Drawing tools (drawing.js) ───────────────────────────────────────────
   Overlay canvas + left toolbar rail. Rail/flyout styling mirrors the
   .interval-dd menu + .chart-type-btn ink-theme recipe. */
#draw-cv{ position:absolute; inset:0; width:100%; height:100%; z-index:5; pointer-events:none; }

.draw-rail{
  position:absolute; top:2.25rem; left:0.5rem; z-index:6;
  display:flex; flex-direction:column; align-items:center; gap:0.125rem;
  padding:0.25rem 0.1875rem;
  border:1px solid var(--border-default); border-radius:var(--radius-lg);
  background:color-mix(in srgb, var(--bg-secondary) 92%, transparent); backdrop-filter:blur(6px);
  box-shadow:var(--shadow-rail);
}
.draw-rail[hidden]{ display:none; }
/* Hosted in the structural #chart-rail column: the column carries the
   chrome, the rail is plain static content. The floating-overlay styling
   above remains the fallback when #chart-rail is absent. */
#chart-rail .draw-rail{
  position:static;
  border:none;border-radius:0;background:transparent;
  box-shadow:none;backdrop-filter:none;
  padding:0.25rem 0.1875rem;
}
.draw-grp{ position:relative; display:flex; align-items:center; }
.draw-tool{
  display:inline-flex; align-items:center; justify-content:center;
  /* padding-right = the chevron's lane (see .draw-caret). The #chart-rail
     host restates both numbers at its own scale in 05-chart-panels.css;
     these are the legacy floating-overlay rail's. */
  width:2.125rem; height:1.75rem; padding:0 0.4375rem 0 0;
  border:none; border-radius:var(--radius-sm);
  background:transparent; color:var(--text-muted); cursor:pointer;
  transition:background .12s var(--ease-out), color .12s var(--ease-out);
}
.draw-tool:hover{ background:var(--bg-hover); color:var(--text-primary); }
.draw-tool.active{ background:var(--accent-dim); color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
/* The variant chevron gets its OWN LANE at the button's right edge — the
   button reserves it with padding-right (05-chart-panels.css) — instead of
   being tucked into the icon's bottom-right corner. Measured on the corner
   layout: the chevron overlapped the glyph's box by 1.8px (1920) to 3.3px
   (880) and cleared the .active accent ring by only 1.5-2.1px, which is what
   read as "no space", worst while a tool was clicked. Now it clears the glyph
   by ~4px and the ring by ~3px at every width.
   Full-height strip so it is a real hit target (was a 6-8px square that also
   swallowed clicks meant for the glyph's corner). */
.draw-caret{
  position:absolute; right:0; top:0; bottom:0;
  width:0.8125rem; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:var(--text-xmuted); cursor:pointer;
  transition:color .12s var(--ease-out);
}
/* rem, not the svg element's fixed 7px: the root font shrinks below ~1500px,
   so a fixed glyph grew relative to everything around it (the overlap was
   worst at 880px). Rotated to point RIGHT — at the flyout it opens — so
   drawing.js keeps shipping one chevron. */
.draw-caret svg{ width:0.4375rem; height:0.4375rem; transform:rotate(-90deg); }
.draw-grp:hover .draw-caret{ color:var(--text-secondary); }
.draw-caret:hover{ color:var(--text-primary); }
.draw-grp.open .draw-caret{ color:var(--accent); }
/* A clicked-open group reads as open: the chip lights like hover (and the
   chevron goes accent, above) so the flyout has a visible anchor. An active
   tool keeps its accent chip rather than dropping to the neutral one. */
.draw-grp.open .draw-tool{ background:var(--bg-hover); color:var(--text-primary); }
.draw-grp.open .draw-tool.active{ background:var(--accent-dim); color:var(--accent); }
.draw-rail-sep{ width:1.25rem; height:1px; margin:0.1875rem 0; background:color-mix(in srgb, var(--text-primary) 8%, transparent); }
/* Trash while Lock all is on: it removes nothing, so it reads as unavailable
   (drawing.js syncRail sets aria-disabled; D7). */
.draw-act[aria-disabled="true"]{ opacity:0.4; cursor:default; }
.draw-act[aria-disabled="true"]:hover{ background:transparent; color:var(--text-muted); }

.draw-flyout{
  position:absolute; top:-0.25rem; left:calc(100% + 0.375rem); z-index:70;
  display:flex; flex-direction:column; gap:0.0625rem; min-width:9.5rem;
  padding:0.375rem;
  border:1px solid var(--border-default); border-radius:var(--radius);
  background:var(--bg-elevated); box-shadow:var(--shadow-rail);
}
.draw-flyout[hidden]{ display:none; }
.draw-fly-item{
  display:flex; align-items:center; gap:0.5rem;
  height:1.75rem; padding:0 0.5rem;
  border:none; border-radius:var(--radius-sm);
  background:transparent; color:var(--text-secondary); cursor:pointer;
  font-family:var(--font-mono); font-size:max(0.6875rem, var(--fs-floor)); font-weight:600;
  letter-spacing:0.01em; text-align:left; white-space:nowrap;
  transition:background .12s var(--ease-out), color .12s var(--ease-out);
}
.draw-fly-item svg{ flex-shrink:0; color:var(--text-muted); }
.draw-fly-item:hover{ background:var(--bg-hover); color:var(--text-primary); }
.draw-fly-item:hover svg{ color:var(--text-secondary); }
.draw-fly-item.active{ color:var(--accent); }
.draw-fly-item.active svg{ color:var(--accent); }

/* chart-toolbar toggle button reuses .chart-type-btn; just the armed-cursor hint */
.cp.price.draw-armed{ cursor:crosshair; }

/* ── Right-click context menu ─────────────────────────────────
   Mirrors the .iv-menu / .tz-menu language: ink-elevated surface, inset
   box-shadow ring (never a 1px border, which bowties in screenshots). */
.ctx-menu{
  position:fixed; z-index:10000; min-width:208px; padding:5px;
  background:var(--bg-elevated); border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-menu);
  font-family:inherit; user-select:none;
  opacity:0; transform:translateY(-3px); transition:opacity .12s var(--ease-out), transform .12s var(--ease-out);
}
.ctx-menu.open{ opacity:1; transform:translateY(0); }
.ctx-menu[hidden]{ display:none; }
.ctx-item{
  display:flex; align-items:center; gap:8px; padding:7px 10px;
  border-radius:var(--radius-sm); color:var(--text-secondary);
  font-size:.8rem; line-height:1.1; cursor:pointer; white-space:nowrap;
}
.ctx-item:hover, .ctx-item:focus{ background:var(--bg-hover); color:var(--text-primary); outline:none; }
.ctx-item.danger{ color:var(--red); }
.ctx-item.danger:hover, .ctx-item.danger:focus{ background:color-mix(in srgb, var(--red) 12%, transparent); color:var(--red); }
.ctx-item.disabled{ opacity:.38; cursor:default; pointer-events:none; }
/* A disabled row that says why (title) still takes the hover for its tooltip;
   the menu's click handler already ignores disabled rows. */
.ctx-item.disabled[title]{ pointer-events:auto; }
.ctx-sep{ height:1px; margin:5px 6px; background:var(--border-default); }

/* ── Price alerts ─────────────────────────────────────────────
   Create dialog (centered modal) + bell-button panel, ink-themed with inset
   box-shadow rings (never 1px borders). */
.alert-dialog{ position:fixed; inset:0; z-index:10001; display:flex; align-items:center; justify-content:center;
  background:var(--scrim-sheet); }
.alert-dialog[hidden]{ display:none; }
.alert-card{ width:300px; padding:16px; background:var(--bg-elevated); border-radius:var(--radius);
  box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-modal); }
.alert-title{ font-size:.95rem; font-weight:600; color:var(--text-primary); margin-bottom:14px; }
.alert-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:11px; }
.alert-lbl{ font-size:.78rem; color:var(--text-muted); }
.alert-symval{ font-family:var(--font-mono); font-size:.82rem; color:var(--text-primary); }
.alert-select, .alert-input{ flex:0 0 168px; padding:6px 9px; font-size:.8rem; font-family:inherit;
  color:var(--text-primary); background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); }
.alert-input{ font-family:var(--font-mono); }
.alert-select:focus, .alert-input:focus{ outline:none; box-shadow: inset 0 0 0 1px var(--accent); }
.alert-btns{ display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.alert-btn{ padding:7px 14px; font-size:.8rem; color:var(--text-secondary); background:var(--bg-tertiary);
  border:none; border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default); cursor:pointer; }
.alert-btn:hover{ color:var(--text-primary); background:var(--bg-hover); }
.alert-btn.primary{ color:var(--on-accent); background:var(--accent); box-shadow:none; font-weight:600; }
.alert-btn.primary:hover{ filter:brightness(1.08); }
/* panel */
.alert-panel{ position:fixed; z-index:10000; width:248px; padding:6px; background:var(--bg-elevated);
  border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-menu); }
.alert-panel[hidden]{ display:none; }
.alert-panel-head{ display:flex; align-items:center; justify-content:space-between; padding:6px 8px 8px; }
.alert-panel-head span{ font-size:.78rem; font-weight:600; color:var(--text-secondary); }
.alert-add{ font-size:.74rem; color:var(--accent); background:none; border:none; cursor:pointer; padding:2px 4px; }
.alert-add:hover{ filter:brightness(1.12); }
.alert-head-actions{ display:flex; align-items:center; gap:8px; }
.alert-add{ display:inline-flex; align-items:center; }
.alert-add svg{ display:block; }

/* ── Key Stats side dock ──────────────────────────────────────────────────
   TradingView style symbol details panel behind the toolbar's key-stats
   button. A fixed OVERLAY sheet that slides in from the right edge and sits
   ON TOP of the charts — it never takes layout space, so opening it moves
   nothing and the header above it stays full width (top:var(--header-h)
   keeps the header uncovered). It docks flush against the trade column and
   rides that edge: `right` transitions on the trade drawer's exact curve,
   so ticket open/close carries the dock along in lockstep instead of
   teleporting it. Content reuses .ks-* row styles below. */
.ksd-panel{
  position:fixed; top:var(--header-h); bottom:0; right:var(--trade-rail-w);  /* flush left of the trade rail */
  /* UNDER the trade column (z10): opening the dock while the ticket is out
     slides it in from BENEATH the ticket's left edge, never over it. Still
     above chart content (draw-cv z5, rail z6) and floating menus stay higher. */
  width:var(--ksd-w); z-index:9;
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--bg-secondary); border-left:1px solid var(--border-default);
  /* Dock refreshes must not invalidate layout/paint outside the sheet
     (its menu is absolute inside; nothing fixed-position lives here). */
  contain:layout paint style;
  transform:translateX(calc(100% + var(--trade-rail-w) + 4px));   /* closed: fully off the right edge */
  transition:transform .22s var(--ease-glide), right .22s var(--ease-glide);
  pointer-events:none;
}
.ksd-panel.open{ transform:none; pointer-events:auto; }
/* Open trade ticket replaces the rail as the right column — the dock shifts
   to its edge on the ticket's own slide curve (right transition above). */
body.trade-open .ksd-panel{ right:var(--trade-w); }
body.trade-open .ksd-panel:not(.open){ transform:translateX(calc(100% + var(--trade-w) + 4px)); }
/* The price scale is the chart's measurement edge — it must never sit under
   the sheet. The dock stacks its width onto the shared --dock-r reservation
   (12-trade-wallet.css; consumed by .charts margin-right, animated by the
   09-graphs-drawer.css transition), so the axis glides to the dock's left
   edge in lockstep with the slide — the gtb push pattern, mirrored. */
body.ksd-open{ --dock-r:calc(var(--trade-rail-w) + var(--ksd-w)); }
body.ksd-open.trade-open{ --dock-r:calc(var(--trade-w) + var(--ksd-w)); }
.ksd-drawer{
  flex-shrink:0; width:var(--ksd-w); height:100%;
  display:flex; flex-direction:column; overflow:hidden;
}
/* Scrolling lives on the section stack, not the whole panel, so the
   identity header + price stay pinned while the sections scroll. */
.ksd-top{ flex:0 0 auto; padding:14px 14px 2px; position:relative; }
.ksd-scroll{ flex:1 1 auto; overflow-y:auto; overflow-x:hidden; padding:4px 10px 18px 14px; }
/* Slim custom scrollbar: transparent gutter, soft thumb that wakes on hover
   (the default OS bar reads cheap against the ink system). */
.ksd-scroll{ scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
.ksd-scroll::-webkit-scrollbar{ width:8px; }
.ksd-scroll::-webkit-scrollbar-track{ background:transparent; }
.ksd-scroll::-webkit-scrollbar-thumb{
  background:var(--border-default); border-radius:99px;
  border:2px solid var(--bg-secondary); background-clip:padding-box; }
.ksd-scroll:hover::-webkit-scrollbar-thumb{ background:var(--border-strong);
  border:2px solid var(--bg-secondary); background-clip:padding-box; }
.ksd-scroll::-webkit-scrollbar-thumb:hover{ background:var(--text-xmuted);
  border:2px solid var(--bg-secondary); background-clip:padding-box; }
/* Off the chart view the dock hides outright (keeps the open preference but
   never floats over the command center, wallet, sources). */
body.no-charts .ksd-panel{ display:none; }
/* Free the header row whenever a side panel is open so the ticker symbol +
   price can never render over the panel or collide with the left-stepped
   toolbar — shared by every panel that pushes .main (Graphs padding-left,
   sidebar margin) or overlays it (sidebar at narrow widths).
   The Key Stats dock and the Trade ticket are NOT in this list: both start
   BELOW the header (top:var(--header-h)), so the header keeps its symbol +
   price and none of its buttons move. */
body.gtb-open:not(.no-charts) #hdr-sym,
body.gtb-open:not(.no-charts) #hdr-price,
:root.sb-open body:not(.no-charts) #hdr-sym,
:root.sb-open body:not(.no-charts) #hdr-price{ display:none; }
/* Phone-width viewports: the trade column is a fixed sheet (not in flow), so
   the dock runs to the right edge instead, stacked UNDER the trade sheet
   (z 60). Still below the header — same rule as desktop. */
@media (max-width:720px){
  .ksd-panel{ right:0; z-index:55; }   /* full sheet, still under the trade sheet (z60) */
  body.trade-open .ksd-panel{ right:0; }
  body.trade-open .ksd-panel:not(.open){ transform:translateX(calc(100% + 4px)); }
  .ksd-panel.open{ box-shadow:var(--shadow-sheet); }
  /* Sheet overlays, no push — only the rail strip (or nothing, once the
     trade sheet hides the rail) stays reserved. */
  body.ksd-open{ --dock-r:var(--trade-rail-w); }
  body.ksd-open.trade-open{ --dock-r:0; }
}
/* Dock content (2026-10-05 rebuild, board Option A). One family (the app
   sans, tabular figures), two sizes (--ksd-fs rows, --ksd-fs-l the last
   price; 12 and 16px at a 1440 screen), weights 400 and 600. Labels grey and
   left, values primary and right. Section titles are plain text over a
   hairline. Colour only on change values (.ksd-chg). */
.ksd-panel{
  --ksd-fs:   max(.857rem, var(--fs-floor));
  --ksd-fs-l: 1.143rem;
  --ksd-row:  1.43rem;
  --ksd-pad:  .93rem;
  font-family:var(--font-sans); font-variant-numeric:tabular-nums;
  font-size:var(--ksd-fs); line-height:var(--ksd-row); color:var(--text-primary);
}
.ksd-top{ padding:.75rem var(--ksd-pad) .7rem; box-shadow:inset 0 -1px 0 var(--border-subtle); }
.ksd-scroll{ padding:0 0 1rem; }
.ksd-hd{ display:flex; align-items:center; gap:.5rem; min-height:1.7rem; }
.ksd-id{ display:flex; align-items:baseline; gap:.45rem; min-width:0; flex:1 1 auto; }
/* The name is the one part that gives way (T9 fix B, 2026-10-24): the
   ticker and the price never shrink; the name ends in an ellipsis with
   its full text as the hover (app.js sets the title). */
.ksd-sym{ font-weight:600; white-space:nowrap; flex:0 0 auto; }
.ksd-name{ color:var(--text-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:0 1 auto; }
.ksd-px{ display:flex; align-items:baseline; gap:.6rem; margin-top:.2rem; white-space:nowrap; }
.ksd-px > *{ flex:0 0 auto; }
.ksd-last{ font-size:var(--ksd-fs-l); font-weight:600; line-height:1.3; }
.ksd-line{ color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ksd-line[hidden]{ display:none; }
.ksd-ext{ display:flex; align-items:baseline; gap:.35rem; }
.ksd-ext-p{ color:var(--text-primary); }
.ksd-chg.up{ color:var(--green); } .ksd-chg.down{ color:var(--red); }
.ksd-chg.flat{ color:var(--text-primary); }
.ksd-line .ksd-chg.flat{ color:var(--text-muted); }
/* Sections: title over a full width hairline, rows under it. */
.ksd-sec{ padding:.55rem var(--ksd-pad) .65rem; }
.ksd-sec:not([hidden]) ~ .ksd-sec{ box-shadow:inset 0 1px 0 var(--border-subtle); }
.ksd-sec[hidden]{ display:none; }
.ksd-sec-title{ margin:0 0 .15rem; font:inherit; font-weight:600; letter-spacing:0;
  color:var(--text-primary); display:flex; align-items:baseline; gap:.5rem; }
/* Provenance (2026-10-15): the currency a section's figures are in, the
   currency beside the last price, the price state after the time line, and
   an unavailable value. Grey text only; amber for an old or missing price. */
.ksd-unit{ margin-left:auto; color:var(--text-muted); font-weight:400; }
.ksd-unit[hidden], .ksd-ccy[hidden], .ksd-state[hidden]{ display:none; }
.ksd-ccy{ color:var(--text-muted); margin-right:-.6rem; font-size:var(--ksd-fs-l); font-weight:600; line-height:1.3; }
.ksd-state{ margin-left:.5rem; color:var(--text-muted); }
.ksd-state.is-live{ color:var(--text-primary); }
.ksd-state.is-old, .ksd-state.is-unavailable{ color:var(--amber); }
.ksd-v.ksd-na{ color:var(--text-muted); }
.ksd-row.ksd-f{ flex-wrap:nowrap; }
/* The label keeps its words (round 3: "Net inco..." at 1366); the value
   gives way instead, from its end (the grey currency and date first). */
.ksd-row.ksd-f .ksd-l{ flex:0 0 auto; }
.ksd-row.ksd-f .ksd-v{ min-width:0; overflow:hidden; text-overflow:ellipsis; }
/* T9 fix a (2026-10-24): the number itself never gives way. The value is a
   flex row: its figure (the anonymous text item) keeps its width, only the
   grey date shrinks and cuts; beside the open ticket the date is gone, so
   "52 wk high  243.37" always stays on its own one line. */
.ksd-row.ksd-f .ksd-v{ display:flex; justify-content:flex-end; align-items:baseline; }
.ksd-row.ksd-f .ksd-d{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
body.ksd-open.trade-open .ksd-row.ksd-f .ksd-d{ display:none; }
.ksd-v[title]{ cursor:default; }
.ksd-row{ display:flex; align-items:baseline; justify-content:space-between;
  flex-wrap:wrap; column-gap:.75rem; }
.ksd-l{ color:var(--text-muted); white-space:nowrap; }
.ksd-v{ margin-left:auto; text-align:right; white-space:nowrap; }
.ksd-d{ color:var(--text-muted); margin-left:.45rem; }
/* Round 5: a narrow dock (beside the open ticket) drops the grey date or
   period suffix so every row stays on one line, label left, value right;
   the value's hover still names it. */
.ksd-scroll{ container-type:inline-size; container-name:ksd; }
/* T9 fix a (2026-10-24): the list rests on a row edge, so no row sits half
   hidden under the pinned header (.ksd-top) when the sections scroll
   ("Prev close" was cut in half at 1280 beside the ticket). Rows are short
   and dense, so proximity snapping always finds one; graphs snap by their
   top. */
.ksd-scroll{ scroll-snap-type:y proximity; scroll-padding-top:0; }
.ksd-sec-title, .ksd-row, .ksd-tr, .ksd-graph, .ksd-eps-leg{ scroll-snap-align:start; }
@container ksd (max-width:300px){ .ksd-d{ display:none; } }
/* Earnings history: four columns, numbers right aligned. */
.ksd-tbl{ margin-top:.45rem; }
/* The date column is never cut ("Aug 26 ’26" whole, no ellipsis); the
   three figure columns are wide enough for their own headings ("Actual",
   "Surprise" sat flush against each other at 3.6em / 4.4em). */
.ksd-tr{ display:grid; grid-template-columns:minmax(max-content,1fr) 3.1em 3.9em 4.9em; column-gap:.4rem; }
.ksd-tr span{ text-align:right; white-space:nowrap; }
.ksd-tr span:first-child{ text-align:left; }
.ksd-th{ color:var(--text-muted); }
/* Graphs (EPS by report, dividend per payment): bare marks in the section
   width over grey row size labels. No axis, grid, legend or value text;
   colour only for beat (up) and miss (down). */
.ksd-graph{ margin:.5rem 0 .2rem; }
.ksd-graph svg{ display:block; overflow:visible; }
.ksd-graph-x{ display:grid; grid-template-columns:repeat(var(--ksd-n),minmax(0,1fr));
  color:var(--text-muted); white-space:nowrap; }
.ksd-graph-x span{ text-align:center; overflow:visible; }
.ksd-div .ksd-graph-x span{ text-align:left; }
.ksd-eps{ cursor:default; position:relative; padding-right:2.9em; }
/* EPS scale (round 5): value ticks right of the plot, faint gridlines,
   and an Est / Actual key under the month labels. */
.ksd-eps-grid{ stroke:var(--border-subtle); stroke-width:1; }
.ksd-eps-yt{ position:absolute; right:0; transform:translateY(-50%); line-height:1;
  color:var(--text-muted); white-space:nowrap; }
.ksd-eps-leg{ display:flex; align-items:center; gap:.35rem; margin:.15rem 0 .1rem;
  color:var(--text-muted); line-height:1.2; }
.ksd-eps-leg .ksd-eps-key + span{ margin-right:.5rem; }
.ksd-eps-key{ width:.6rem; height:.6rem; border-radius:50%; flex:none; }
.ksd-eps-key.est{ box-shadow:inset 0 0 0 1.5px var(--text-muted); }
.ksd-eps-key.act{ background:var(--text-primary); }
.ksd-eps-band{ fill:transparent; }
.ksd-eps-band.on{ fill:var(--ksd-hl); }
.ksd-eps-est{ fill:none; stroke:var(--text-muted); stroke-width:1.5; }
.ksd-eps-act.up{ fill:var(--green); }
.ksd-eps-act.down{ fill:var(--red); }
.ksd-eps-act.flat{ fill:var(--text-primary); }
.ksd-div-bar{ fill:var(--text-muted); }
.ksd-sec-body{ --ksd-hl:color-mix(in srgb, var(--text-primary) 7%, transparent); }
.ksd-row.ksd-hl, .ksd-tr.ksd-hl{ background:var(--ksd-hl);
  box-shadow:0 0 0 .2rem var(--ksd-hl); border-radius:2px; }
/* Header icon buttons (sections + close) */
.ksd-tools{ display:flex; align-items:center; gap:2px; margin-left:auto; flex:0 0 auto; }
.ksd-icon-btn{
  display:flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:var(--radius-sm);
  background:none; border:none; cursor:pointer; color:var(--text-muted);
}
.ksd-icon-btn:hover{ background:var(--bg-hover); color:var(--text-primary); }
.ksd-icon-btn:focus-visible{ outline:none; box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.ksd-icon-btn.active{ color:var(--text-primary); background:var(--bg-hover); }
/* Sections menu: a checklist of the sections that apply to the symbol. */
.ksd-menu{
  position:absolute; top:2.4rem; right:.6rem; z-index:5; width:11rem;
  padding:4px; background:var(--bg-elevated); border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-default), var(--shadow-menu);
}
.ksd-menu[hidden]{ display:none; }
.ksd-menu-title{ font-weight:600; color:var(--text-muted); padding:3px 8px 4px; }
.ksd-menu-item{
  display:flex; align-items:center; gap:8px; width:100%;
  padding:3px 8px; border-radius:var(--radius-sm);
  background:none; border:none; cursor:pointer; font:inherit;
  color:var(--text-primary); text-align:left;
}
.ksd-menu-item[hidden]{ display:none; }
.ksd-menu-item:hover{ background:var(--bg-hover); }
.ksd-menu-item:focus-visible{ outline:none; box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.ksd-check{ flex:0 0 auto; width:14px; height:14px; border-radius:3px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:inset 0 0 0 1px var(--border-strong); color:transparent; }
.ksd-menu-item[aria-checked="true"] .ksd-check{ background:var(--bg-hover); color:var(--text-primary); }
.ksd-empty{ padding:.7rem var(--ksd-pad); color:var(--text-muted); }
.ksd-empty[hidden]{ display:none; }
/* ── Standing legal note ──────────────────────────────────────────────────
   Shared block under the advice-like readouts that live in app.html (the X
   posture meter, Top Picks). Quiet and secondary on purpose: it has to
   register as a condition on the numbers above it, not as a warning banner.
   Links resolve against home_url, the same convention welcome.html uses. */
.legal-note{
  margin:12px 0 0; padding-top:9px;
  box-shadow:inset 0 1px 0 var(--border-subtle);
  font-size:max(.66rem, var(--fs-floor)); line-height:1.45; color:var(--text-muted);
}
.legal-note a{
  color:var(--text-secondary); text-decoration:underline;
  text-underline-offset:2px; text-decoration-color:var(--border-strong);
}
.legal-note a:hover{ color:var(--accent); text-decoration-color:var(--accent); }
.legal-note a:focus-visible{
  outline:none; border-radius:var(--radius-sm); color:var(--accent);
  box-shadow:inset 0 0 0 1px var(--accent);
}
.alert-empty{ padding:10px 8px; font-size:.76rem; color:var(--text-muted); }
.alert-item{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:7px 8px;
  border-radius:var(--radius-sm); }
.alert-item:hover{ background:var(--bg-hover); }
.alert-item.fired{ opacity:.6; }
/* T9 feel: an alert being created shows at once, quieted until saved. */
.alert-item.is-pending{ opacity:.55; }
.alert-item.is-pending .alert-del{ visibility:hidden; }
.alert-desc{ font-family:var(--font-mono); font-size:.76rem; color:var(--text-primary); }
.alert-del{ color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.85rem; line-height:1; padding:2px 4px; }
.alert-del:hover{ color:var(--red); }

/* ── Notification settings ─────────────────────────────────────
   Reuses .alert-dialog / .alert-card / .alert-row / .alert-btn language; adds a
   pill toggle switch + a hint line. Rings are inset box-shadows (never 1px
   borders) so they render cleanly in headless screenshots. */
.ntf-hint{ font-size:max(.68rem, var(--fs-floor)); color:var(--text-muted); max-width:210px; }
.ntf-toggle{ position:relative; flex:0 0 auto; width:38px; height:22px; padding:0; cursor:pointer;
  background:var(--bg-tertiary); border:none; border-radius:999px; box-shadow: inset 0 0 0 1px var(--border-subtle);
  transition:background .15s ease; }
.ntf-toggle::after{ content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%;
  background:var(--text-muted); transition:transform .15s ease, background .15s ease; }
.ntf-toggle.on{ background:var(--accent); box-shadow:none; }
.ntf-toggle.on::after{ transform:translateX(16px); background:var(--on-accent); }
/* Disabled (T9 fix B, 2026-10-24): a stone track that reads in both themes
   (the light theme's travertine track at 40% opacity vanished into the
   cream card, leaving a floating knob), the knob muted; never the accent. */
.ntf-toggle.disabled, .ntf-toggle.disabled.on{ cursor:not-allowed; opacity:.6;
  background:var(--border-strong); box-shadow:inset 0 0 0 1px var(--border-strong); }
.ntf-toggle.disabled::after{ background:var(--bg-elevated); }
.ntf-lbl-i{ display:inline-flex; align-items:center; gap:4px; }
/* T9 feel: the small "Saved" check beside a switch the server just agreed to
   (alerts.js flashSaved). Green text, no glow, fades in over 120 ms. */
.ntf-sw-wrap{ display:inline-flex; align-items:center; gap:8px; flex:0 0 auto; }
.ntf-saved{ display:inline-flex; align-items:center; gap:4px; color:var(--green);
  font-size:max(.7rem, var(--fs-floor)); font-weight:600; animation:ntfSavedIn .12s ease-out; }
@keyframes ntfSavedIn{ from{ opacity:0; transform:translateX(4px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){ .ntf-saved{ animation:none; } }
.ntf-verify{ margin:6px 0 2px; padding:10px; border-radius:var(--radius-sm); background:var(--bg-tertiary); }
.ntf-verify .alert-row{ margin-bottom:9px; }
/* Discord row (2026-10-09): status dot + name, Connect / Reconnect, a quiet
   sub row (Last sent, Test, Change, Disconnect) and the paste form. Text
   buttons are plain text (no underline); active state is colour only. */
.ntf-dc-left{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.ntf-dc-hint{ display:flex; align-items:center; gap:6px; min-width:0; }
.ntf-dc-hint > span:last-child{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ntf-dot{ flex:0 0 auto; width:6px; height:6px; border-radius:50%; background:var(--text-muted); }
.ntf-dot.ok{ background:var(--green); }
.ntf-dot.warn{ background:var(--amber); }
.ntf-dot.bad{ background:var(--red); }
.alert-btn.ntf-dc-btn{ padding:5px 12px; }
.ntf-dc-alt{ margin:-6px 0 11px; }
.ntf-dc-sub{ display:flex; align-items:center; gap:14px; margin:-3px 0 11px;
  font-size:max(.68rem, var(--fs-floor)); color:var(--text-muted); }
.ntf-dc-grow{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ntf-link{ padding:0; border:none; background:none; font:inherit; font-size:max(.68rem, var(--fs-floor));
  color:var(--text-secondary); cursor:pointer; }
.ntf-link:hover{ color:var(--text-primary); }
.ntf-link.danger{ color:var(--red); }
.ntf-link.danger:hover{ color:var(--red); filter:brightness(1.15); }
.ntf-link:focus-visible{ outline:none; color:var(--text-primary); }
.alert-input.ntf-dc-input{ display:block; width:100%; box-sizing:border-box; flex:none; }
.alert-input.ntf-bad, .alert-input.ntf-bad:focus{ box-shadow: inset 0 0 0 1px var(--red); }
.ntf-dc-help{ display:block; max-width:none; margin-top:8px; }
.ntf-dc-help.ntf-err{ color:var(--red); }
/* Destination picker (2026-10-10): Private messages | Channel. One inset
   ring around the group, the active segment is a FILLED background (no
   underline, no stripe, no glow). */
.ntf-dc-fix .ntf-dc-grow{ white-space:normal; }
.ntf-dc-sub .ntf-link{ flex:0 0 auto; white-space:nowrap; }
.ntf-dc-seg{ display:flex; gap:2px; margin:-4px 0 11px; padding:2px; border-radius:var(--radius-sm);
  background:var(--bg-tertiary); box-shadow:inset 0 0 0 1px var(--border-subtle); }
.ntf-dc-seg-btn{ flex:1 1 0; min-width:0; height:24px; padding:0 8px; border:none;
  border-radius:calc(var(--radius-sm) - 1px); background:transparent; cursor:pointer;
  font-family:inherit; font-size:max(.68rem, var(--fs-floor)); font-weight:500; line-height:1;
  color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  transition:color .12s, background-color .12s; }
.ntf-dc-seg-btn:hover{ color:var(--text-primary); }
.ntf-dc-seg-btn[aria-pressed="true"]{ color:var(--text-primary); background:var(--bg-elevated); }
.ntf-dc-seg-btn:focus-visible{ outline:none; color:var(--text-primary); }

/* ─── Notifications inline on Settings (2026-10-10) ───────────────────────
   The SAME rows as the dialog above (chart/alerts.js renders both mounts),
   re-skinned to the Settings row rhythm (.stg-row): label left, control
   right, one inset hairline between channels. Scoped to .ntf-inline so the
   dialog keeps its compact look. No stripes, no underlines; the active
   segment stays a filled background. */
.ntf-inline > .alert-row{ margin:0; padding:0.6875rem 0; gap:1rem; }
.ntf-inline > .alert-row:not(:first-child){ box-shadow:inset 0 1px 0 var(--border-subtle); }
.ntf-inline > .alert-row > div:first-child{ min-width:0; }
.ntf-inline .alert-lbl{ font-family:var(--font-sans); font-size:0.8125rem; font-weight:600;
  color:var(--text-primary); line-height:1.25; overflow-wrap:anywhere; }
.ntf-inline .ntf-hint{ max-width:none; }
.ntf-inline > .alert-title{ margin:0.6875rem 0 0.5rem; font-size:0.8125rem; }
.ntf-inline > .alert-empty{ padding:0.6875rem 0; font-size:max(.68rem, var(--fs-floor)); color:var(--text-muted); }
.ntf-inline > .ntf-dc-seg{ max-width:20rem; margin:-0.25rem 0 0.6875rem; }
.ntf-inline > .ntf-dc-sub{ margin:-0.25rem 0 0.6875rem; flex-wrap:wrap; row-gap:0.375rem; }
.ntf-inline > .ntf-dc-alt{ margin:-0.25rem 0 0.6875rem; }
.ntf-inline > .ntf-verify{ margin:0 0 0.6875rem; max-width:26rem; }
.ntf-inline .ntf-verify .alert-input{ flex:1 1 9rem; min-width:0; }
.ntf-inline > .alert-input.ntf-dc-input{ max-width:32rem; }
.ntf-inline > .alert-btns{ margin:0; padding:0.6875rem 0; box-shadow:inset 0 1px 0 var(--border-subtle); }

/* ─────────────── Compare / overlay symbols ───────────────
   Toolbar popover (matches .alert-panel / .iv-menu language) to overlay extra
   symbols as percentage-aligned lines, plus on-chart legend chips. Inset rings
   only (no 1px borders, which bowtie in headless screenshots). */
#btn-compare.active{ color:var(--accent); }
/* (The padlock "locked" variant of this button was deleted 2026-07-28: compare
   is free now — roles.MIN_COMPARE == SQUIRE — so every member gets the real
   control and there is no gated slot left to style.) */
.cmp-panel{ position:fixed; z-index:10000; width:264px; padding:8px; background:var(--bg-elevated);
  border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-menu); }
.cmp-panel[hidden]{ display:none; }
.cmp-head{ display:flex; align-items:center; justify-content:space-between; padding:2px 4px 8px; }
.cmp-head span{ font-size:.78rem; font-weight:600; color:var(--text-secondary); }
.cmp-close{ color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.95rem; line-height:1; padding:2px 4px; border-radius:var(--radius-sm); }
.cmp-close:hover{ color:var(--text-primary); background:var(--bg-hover); }
.cmp-add{ display:flex; gap:6px; }
.cmp-input{ flex:1 1 auto; min-width:0; padding:6px 9px; font-size:.8rem; font-family:var(--font-mono);
  color:var(--text-primary); background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); text-transform:uppercase; }
.cmp-input::placeholder{ color:var(--text-muted); text-transform:none; }
.cmp-input:focus{ outline:none; box-shadow: inset 0 0 0 1px var(--accent); }
.cmp-addbtn{ flex:0 0 auto; padding:6px 12px; font-size:.78rem; font-weight:600; color:var(--on-accent);
  background:var(--accent); border:none; border-radius:var(--radius-sm); cursor:pointer; }
.cmp-addbtn:hover{ filter:brightness(1.08); }
.cmp-quick{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.cmp-qchip{ padding:4px 9px; font-size:.72rem; font-family:var(--font-mono); color:var(--text-secondary);
  background:var(--bg-tertiary); border:none; border-radius:999px; box-shadow: inset 0 0 0 1px var(--border-default); cursor:pointer; }
.cmp-qchip:hover{ color:var(--text-primary); background:var(--bg-hover); }
.cmp-align{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; padding:0 2px; }
.cmp-align-lbl{ font-size:.74rem; color:var(--text-muted); }
.cmp-seg{ display:inline-flex; background:var(--bg-tertiary); border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); overflow:hidden; }
.cmp-seg-btn{ padding:5px 11px; font-size:.72rem; font-weight:600; color:var(--text-secondary);
  background:none; border:none; cursor:pointer; }
.cmp-seg-btn:hover{ color:var(--text-primary); }
.cmp-seg-btn.active{ color:var(--on-accent); background:var(--accent); }
.cmp-list{ margin-top:10px; display:flex; flex-direction:column; gap:1px; }
.cmp-empty{ padding:8px 6px; font-size:.76rem; color:var(--text-muted); }
.cmp-row{ display:flex; align-items:center; gap:8px; padding:6px 6px; border-radius:var(--radius-sm); }
.cmp-row:hover{ background:var(--bg-row-hover); }
.cmp-row-sym{ flex:1 1 auto; font-family:var(--font-mono); font-size:.78rem; font-weight:600; color:var(--text-primary); }
.cmp-row-ratio{ flex:0 0 auto; padding:3px 8px; font-size:max(.66rem, var(--fs-floor)); font-weight:700; text-transform:none;
  letter-spacing:normal; color:var(--text-muted); background:var(--bg-tertiary); border:none;
  border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default); cursor:pointer; }
.cmp-row-ratio:hover{ color:var(--text-primary); }
.cmp-row-ratio.active{ color:var(--on-accent); background:var(--accent); box-shadow:none; }
/* Currency of a compared line (2026-10-15) and a ratio refused across two
   currencies (still focusable: its click says why). */
.cmp-ccy{ flex:0 0 auto; color:var(--text-muted); font-weight:400; }
.cmp-row-ratio.is-off{ opacity:.45; cursor:default; }
.cmp-row-ratio.is-off:hover{ color:var(--text-muted); }
.cmp-row-del{ flex:0 0 auto; color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.82rem; line-height:1; padding:2px 4px; }
.cmp-row-del:hover{ color:var(--red); }
.cmp-dot{ flex:0 0 auto; width:9px; height:9px; border-radius:2px; display:inline-block; }

/* Export / share popover (matches .cmp-panel / .iv-menu language). */
.exp-panel{ position:fixed; z-index:10000; width:236px; padding:8px; background:var(--bg-elevated);
  border-radius:var(--radius-sm); box-shadow: inset 0 0 0 1px var(--border-default), var(--shadow-menu); }
.exp-panel[hidden]{ display:none; }
.exp-head{ display:flex; align-items:center; justify-content:space-between; padding:2px 4px 8px; }
.exp-head span{ font-size:.78rem; font-weight:600; color:var(--text-secondary); }
.exp-close{ color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.95rem; line-height:1; padding:2px 4px; border-radius:var(--radius-sm); }
.exp-close:hover{ color:var(--text-primary); background:var(--bg-hover); }
.exp-item{ display:flex; align-items:center; gap:9px; width:100%; padding:7px 8px; text-align:left;
  font-size:.8rem; font-weight:500; color:var(--text-secondary); background:none; border:none;
  border-radius:var(--radius-sm); cursor:pointer; }
.exp-item:hover{ color:var(--text-primary); background:var(--bg-hover); }
.exp-ic{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; color:var(--text-muted); }
.exp-item:hover .exp-ic{ color:var(--accent); }
.exp-lbl{ flex:1 1 auto; }
.exp-link-row{ display:flex; gap:6px; margin-top:7px; padding-top:8px; box-shadow: inset 0 1px 0 var(--border-default); }
.exp-link-row[hidden]{ display:none; }
.exp-link-input{ flex:1 1 auto; min-width:0; padding:6px 8px; font-size:.72rem; font-family:var(--font-mono);
  color:var(--text-primary); background:var(--bg-tertiary); border:none; border-radius:var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-default); }
.exp-link-input:focus{ outline:none; box-shadow: inset 0 0 0 1px var(--accent); }
.exp-copy{ flex:0 0 auto; padding:6px 11px; font-size:.74rem; font-weight:600; color:var(--chart-bg);
  background:var(--accent); border:none; border-radius:var(--radius-sm); cursor:pointer; }
.exp-copy:hover{ filter:brightness(1.08); }

/* On-chart legend chips — top-right of the price pane, clear of the left
   OHLC legend and the right price-axis gutter. */
.cmp-legend{ position:absolute; top:1.875rem; right:4.25rem; z-index:6;
  display:flex; flex-direction:column; align-items:flex-end; gap:4px; pointer-events:none; }
.cmp-chip{ display:inline-flex; align-items:center; gap:5px; padding:2px 7px;
  font-family:var(--font-mono); font-size:max(.625rem, var(--fs-floor)); font-weight:600; color:var(--text-secondary);
  background:color-mix(in srgb, var(--bg-primary) 72%, transparent); border-radius:999px; box-shadow: inset 0 0 0 1px var(--border-default);
  pointer-events:auto; font-variant-numeric:tabular-nums; }
.cmp-chip b{ font-weight:700; color:var(--text-primary); }
.cmp-chip-main b{ color:var(--text-secondary); }
.cmp-chip .cmp-pct{ color:var(--text-muted); }
.cmp-chip .cmp-pct.up{ color:var(--green); }
.cmp-chip .cmp-pct.down{ color:var(--red); }
.cmp-chip-x{ color:var(--text-muted); background:none; border:none; cursor:pointer; font-size:.72rem; line-height:1; padding:0 1px; }
.cmp-chip-x:hover{ color:var(--red); }


/* ── Third party licences dialog (#lic-modal) ──────────────────────────────
   Reached from Account menu -> Legal -> Third party licences. The shell is the
   shared centered-blur .gtb-modal / .gtb-modal-card / .gtb-modal-head /
   .gtb-close / .gtb-modal-body in 08-chart-chrome.css; everything here is just
   the reading layout for the notices, so the dialog picks up the app's motion,
   backdrop, close button and scrollbar for free.

   It is a READING surface, not a control surface: prose measure over density,
   the notice quoted in the mono face so it is visibly a reproduction rather
   than our own words, and hairlines drawn as inset box-shadows (1px borders
   bowtie in screenshots). Colours are tokens only, so both themes follow. */
.lic-card{ max-width:34rem; width:min(34rem, calc(100vw - 2.5rem)); }
.lic-body{ gap:0; padding-right:2px; }
.lic-intro{
  margin:0 0 2px; padding-bottom:11px;
  font-size:.72rem; line-height:1.5; color:var(--text-secondary);
}
.lic-entry{
  padding:11px 0 12px;
  box-shadow:inset 0 1px 0 var(--border-subtle);
}
.lic-entry:last-child{ padding-bottom:2px; }
.lic-name{
  margin:0; font-family:var(--font-display); font-size:.8rem; font-weight:600;
  line-height:1.35; color:var(--text-primary); letter-spacing:0;
}
.lic-meta{
  margin:3px 0 0; font-family:var(--font-mono); font-size:max(.62rem, var(--fs-floor));
  line-height:1.5; color:var(--text-muted);
}
.lic-note{
  margin:7px 0 0; font-size:max(.7rem, var(--fs-floor)); line-height:1.5; color:var(--text-secondary);
}
/* The quoted NOTICE. Kept visually distinct from our own copy: mono face,
   sunken surface, no wrapping tricks — it must read as reproduced text. */
.lic-notice{
  display:flex; flex-direction:column; gap:2px;
  margin-top:8px; padding:9px 10px;
  background:var(--bg-tertiary); border-radius:var(--radius-sm);
  box-shadow:inset 0 0 0 1px var(--border-subtle);
  font-family:var(--font-mono); font-size:max(.66rem, var(--fs-floor)); line-height:1.55;
  color:var(--text-secondary);
}
.lic-notice-line{ overflow-wrap:anywhere; }
.lic-links{ margin:8px 0 0; font-size:max(.68rem, var(--fs-floor)); line-height:1.5; color:var(--text-muted); }
.lic-dot{ padding:0 5px; color:var(--text-xmuted); }
.lic-link{
  color:var(--text-secondary); text-decoration:underline;
  text-underline-offset:2px; text-decoration-color:var(--border-strong);
  overflow-wrap:anywhere;
}
.lic-link:hover{ color:var(--accent); text-decoration-color:var(--accent); }
.lic-link:focus-visible{
  outline:none; border-radius:var(--radius-sm); color:var(--accent);
  box-shadow:inset 0 0 0 1px var(--accent);
}

/* Off scale alerts (T9 feel round 2, chart/alerts.js updateOffScale): one
   badge per edge counts the alert levels outside the visible price range. */
.alert-off{ position:absolute; z-index:6; padding:2px 7px; border-radius:4px;
  background:var(--bg-elevated); color:var(--text-secondary); box-shadow:var(--shadow-hairline);
  font-size:11px; line-height:15px; white-space:nowrap; pointer-events:none; }
.alert-off.is-up{ top:6px; }
.alert-off[hidden]{ display:none; }

/* Settings (i) hover (T9 feel round 2): the explanation lives in a hover /
   focus bubble, not as filler copy beside the label. */
.stg-i{ position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; align-self:center; border-radius:50%; color:var(--text-xmuted); cursor:help; outline:none; }
.stg-i svg{ width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.2; stroke-linecap:round; }
.stg-i:hover, .stg-i:focus-visible{ color:var(--text-primary); background:var(--bg-tertiary); }
.stg-i::after{ content:attr(data-tip); position:absolute; left:50%; bottom:calc(100% + 6px); z-index:20;
  width:max-content; max-width:16rem; padding:6px 9px; border-radius:var(--radius);
  background:var(--bg-elevated); color:var(--text-primary); box-shadow:var(--shadow-hairline);
  font-family:var(--font-sans); font-size:12px; font-weight:400; line-height:1.4; white-space:normal;
  opacity:0; transform:translate(-50%, 4px); pointer-events:none; transition:opacity .12s ease-out, transform .12s ease-out; }
.stg-i:hover::after, .stg-i:focus-visible::after{ opacity:1; transform:translate(-50%, 0); }
@media (prefers-reduced-motion:reduce){ .stg-i::after{ transition:none; } }
