/* DSE dashboard.
   Palette and radius follow the house rules: white carries the body, aubergine
   is ink and structure, crimson is the only interactive colour, gold is an
   accent in small doses. ONE radius everywhere - 14px - and no pill shapes.
   DARK IS THE DEFAULT (Tanim, 11 Oct 2026: "make dark mode default"). index.html
   ships data-theme="dark"; the header button switches to light and remembers it.
   --card = surfaces, --white = text/chips that stay white on the crimson band. */
:root {
  --radius: 14px;

  /* LIGHT = black and gold (Tanim, 11 Oct 2026: "Black and Gold in light").
     Black ink and black for anything you click; gold is the accent.
     (--crimson is the historical name of the interactive token.) */
  --white: #FFFFFF;
  --ground: #F5F5F4;          /* neutral off-white, so white cards lift */
  --ink: #18181B;             /* black */
  --ink-70: rgba(24, 24, 27, .70);
  --ink-45: rgba(24, 24, 27, .45);
  --ink-12: rgba(24, 24, 27, .12);
  --ink-06: rgba(24, 24, 27, .06);
  --crimson: #18181B;         /* interactive = black */
  --gold: #FFBE00;

  --up: #0F7A4D;              /* traffic lights stay: green up, red down, amber mixed */
  --down: #B3261E;
  --warn: #9A6B00;            /* darker than accent gold so the two never merge */

  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);

  --card: #FFFFFF;
  --band: transparent;        /* header sits on the page ground, no colour band */
  --tint-up: #E8F4EE; --tint-down: #FBE9E8; --tint-warn: #FFF3D6;
  --lift: rgba(0,0,0,.35);
}
/* Dark: aubergine-black ground, slightly lifted cards, light lavender ink.
   Semantic colours brightened so green/red still read on dark. */
:root[data-theme="dark"] {
  /* Tanim's reference, 11 Oct 2026: near-black zinc surfaces, hairline
     borders, blue for anything you click, traffic lights for status:
     green = up/good, red = down/bad, amber = mixed/warning. */
  color-scheme: dark;
  --ground: #0A0A0B;
  --card: #141417;
  --ink: #FAFAFA;
  --ink-70: #A1A1AA;
  --ink-45: #71717A;
  --ink-12: #27272A;
  --ink-06: #1C1C20;
  --crimson: #3B82F6;           /* interactive colour in dark = blue */
  --up: #34D399;
  --down: #FF453A;
  --warn: #FBBF24;
  --band: transparent;
  --tint-up: rgba(52, 211, 153, .10); --tint-down: rgba(255, 69, 58, .12); --tint-warn: rgba(251, 191, 36, .10);
  --shadow: inset 0 0 0 1px #232327, 0 1px 2px rgba(0,0,0,.5);
  --lift: rgba(0,0,0,.8);
}
/* Reference look: numbers and small caps labels in a mono face, lighter
   weight, wider tracking. Body text stays Inter (and Bangla stays readable). */
:root[data-theme="dark"] .num, :root[data-theme="dark"] .metric .value,
:root[data-theme="dark"] .side-big, :root[data-theme="dark"] .light-card .n,
:root[data-theme="dark"] .metric .label, :root[data-theme="dark"] .side-label,
:root[data-theme="dark"] main h2, :root[data-theme="dark"] .light-card .l,
:root[data-theme="dark"] .asof b, :root[data-theme="dark"] th {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] .metric .value, :root[data-theme="dark"] .side-big,
:root[data-theme="dark"] .light-card .n { font-weight: 500; letter-spacing: -.01em; }
:root[data-theme="dark"] .metric .label, :root[data-theme="dark"] .side-label,
:root[data-theme="dark"] main h2 { letter-spacing: .14em; font-weight: 500; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.55 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- header */
header {
  /* Neutral since 11 Oct 2026 (Tanim: "NO red? follow mock") - the crimson
     band is gone in both themes; the sidebar carries the brand. */
  background: var(--band);
  color: var(--ink);
  padding: 22px 0 22px;
  border-bottom: 1px solid var(--ink-12);
}
.head-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.sub { color: var(--ink-70); font-size: 13px; margin-top: 3px; }
.asof { font-size: 13px; color: var(--ink-70); text-align: right; }
.asof b { color: var(--ink); font-weight: 600; display: block; font-size: 30px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ----------------------------------------------------------------- cards */
/* A more specific display rule elsewhere (e.g. a display:flex item) otherwise
   beats the browser's own [hidden]{display:none} - bit admin.html once
   already, guarding it here for every element on the public site too. */
[hidden] { display: none !important; }

main { padding: 26px 0 70px; }
section { margin-bottom: 26px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.card + .card { margin-top: 16px; }

h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-45); margin: 0 0 14px; font-weight: 650;
}
h3 { font-size: 16px; margin: 0 0 2px; font-weight: 640; letter-spacing: -.01em; }

.formula {
  font-size: 12px; color: var(--ink-45); margin-top: 6px;
}

.rule-h { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
.rule-p { font-size: 13.5px; color: var(--ink-70); line-height: 1.65; margin-top: 6px; }
ul.rule-p { margin: 6px 0 0; padding-left: 20px; }
ul.rule-p li { margin-bottom: 4px; }
ul.rule-p li:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- metrics */
.metrics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.metric { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.metric .label { font-size: 12px; color: var(--ink-45); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.metric .value { font-size: 27px; font-weight: 660; letter-spacing: -.02em; margin-top: 7px; }
.metric .foot { font-size: 12.5px; color: var(--ink-70); margin-top: 5px; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--warn); }

/* ---------------------------------------------------------------- ranges */
.ranges { display: flex; flex-wrap: wrap; gap: 6px; }
.ranges button {
  font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--ink-12); background: var(--card); color: var(--ink-70);
  cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.ranges button:hover { border-color: var(--ink-45); color: var(--ink); }
.ranges button[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); color: var(--white); }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }

.chart { width: 100%; height: 380px; }
.chart.short { height: 220px; }

/* ---------------------------------------------------------------- tables */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-45); font-weight: 650; padding: 0 12px 9px; white-space: nowrap;
  border-bottom: 1px solid var(--ink-12);
}
td { padding: 10px 12px; border-bottom: 1px solid var(--ink-06); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--ground); }
td.r, th.r { text-align: right; }
.code { font-weight: 640; }
.name { color: var(--ink-70); font-size: 12.5px; }

/* "why it ranks there" - wrapped to 2-3 lines instead of one long unbroken
   line, so the column stays narrow instead of forcing horizontal scroll. */
td.why {
  white-space: normal; max-width: 220px; color: var(--ink-70); font-size: 12.5px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Per-share holding-period list, best net return first. One line per period,
   red when that period loses money after the toll. */
td.holdings { white-space: normal; min-width: 150px; }
.hp { font-size: 12px; line-height: 1.5; color: var(--ink-70); }
.hp b { color: var(--ink); font-weight: 640; }
.hp.up b { color: var(--up); } .hp.down b { color: var(--down); }
.hp-flag {
  font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em;
  color: var(--down); margin-left: 4px;
}
.hp-conf {
  font-size: 11px; color: var(--ink-70); font-weight: 600; margin-left: 5px;
}

.chip {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius);
  font-size: 11.5px; font-weight: 640; background: var(--ink-06); color: var(--ink-70);
}
.chip.gold { background: var(--gold); color: var(--ink); }
.chip.warn { background: var(--tint-warn); color: var(--warn); }
.chip.top { background: var(--tint-up); color: var(--up); }
.chip.bottom { background: var(--tint-down); color: var(--down); }

button.sig-detail {
  font: inherit; font-size: 12px; font-weight: 640;
  padding: 5px 11px; border-radius: var(--radius);
  border: 1px solid var(--ink-12); background: var(--card); color: var(--crimson);
  cursor: pointer; white-space: nowrap;
}
button.sig-detail:hover { border-color: var(--crimson); background: var(--tint-down); }
tr.sig-detail-row td { background: var(--ground); white-space: normal; }
tr.sig-detail-row:hover td { background: var(--ground); }

/* ----------------------------------------------------------------- notes */
.note {
  background: var(--ground); border-radius: var(--radius); padding: 14px 16px;
  font-size: 13px; color: var(--ink-70); line-height: 1.6;
}
.note strong { color: var(--ink); }
.note.flag { background: var(--tint-warn); color: var(--warn); }
.note.flag strong { color: var(--warn); }

details > summary {
  cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-45); font-weight: 650; list-style: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "  ▸"; }
details[open] > summary::after { content: "  ▾"; }
details > summary:hover { color: var(--crimson); }

footer { padding: 26px 0 40px; font-size: 12.5px; color: var(--ink-45); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .metric .value { font-size: 23px; }
  .chart { height: 300px; }
}

/* A sub-block keeps the turnover chart inside the same card as the index,
   sharing one time control, without the two reading as one chart. */
.sub-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ink-12); }
.sub-title { font-size: 15px; font-weight: 640; letter-spacing: -.01em; margin-bottom: 2px; }

/* ------------------------------------------------------------ stock picker */
.picker { position: relative; margin-bottom: 16px; }
.picker input {
  font: inherit; width: 100%; max-width: 460px;
  padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--ink-12); background: var(--card); color: var(--ink);
}
.picker input:focus { outline: none; border-color: var(--crimson); }
.results {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  width: 100%; max-width: 460px; max-height: 320px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--ink-12);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.results button {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 13.5px;
  padding: 8px 10px; border: 0; background: none; color: var(--ink);
  border-radius: var(--radius); cursor: pointer;
}
.results button:hover, .results button:focus { background: var(--ground); outline: none; }
.results .r-code { font-weight: 640; }
.results .r-meta { color: var(--ink-45); font-size: 12px; }
.metrics.tight { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metrics.tight .metric { box-shadow: none; background: var(--ground); padding: 14px 16px; }
.metrics.tight .value { font-size: 21px; }

/* -------------------------------------------------------- traffic lights */
.lights { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.light-card {
  flex: 1 1 150px; border-radius: var(--radius); padding: 14px 16px;
  background: var(--ground);
}
.light-card .n { font-size: 27px; font-weight: 660; letter-spacing: -.02em; }
.light-card .l { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; font-weight: 640; }
.light-card.green { background: var(--tint-up); } .light-card.green .l, .light-card.green .n { color: var(--up); }
.light-card.red { background: var(--tint-down); } .light-card.red .l, .light-card.red .n { color: var(--down); }
.light-card.grey .l, .light-card.grey .n { color: var(--ink-45); }
.light-card.amber { background: var(--tint-warn); } .light-card.amber .l, .light-card.amber .n { color: var(--warn); }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.dot.green { background: var(--up); } .dot.red { background: var(--down); }
.dot.grey { background: var(--ink-45); }

.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
              gap: 12px; margin-top: 6px; }
.test-card { background: var(--ground); border-radius: var(--radius); padding: 13px 15px; }
.test-card-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.test-card-head strong { font-size: 13.5px; letter-spacing: -.005em; }
.test-id { color: var(--ink-45); font-size: 10.5px; font-weight: 600; }
.pdots { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; cursor: default; }
.pdot.green { background: var(--up); } .pdot.red { background: var(--down); }
.pdot.grey { background: var(--ink-12); }

/* Headline metrics on the left, a small sentiment summary on the right. */
.top-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px;
             align-items: start; margin-bottom: 26px; }
.top-split.no-side { grid-template-columns: minmax(0, 1fr); }
.top-split > section, .top-split > aside { margin-bottom: 0; }
.side-label { font-size: 12px; color: var(--ink-45); text-transform: uppercase;
              letter-spacing: .07em; font-weight: 600; }
.side-big { font-size: 27px; font-weight: 660; letter-spacing: -.02em; margin-top: 6px; }
.progress { height: 8px; background: var(--ink-06); border-radius: var(--radius);
            overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--gold); border-radius: var(--radius); }
.side-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 650;
             color: var(--crimson); text-decoration: none; }
@media (max-width: 900px) { .top-split { grid-template-columns: minmax(0, 1fr); } }

.legend { margin-top: 14px; font-size: 12.5px; color: var(--ink-70); }
.legend div { margin-top: 5px; }
.pass { color: var(--up); font-weight: 650; }
.fail { color: var(--down); font-weight: 650; }

/* ------------------------------------------- every period's return at once */
.perf-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 1px; background: var(--ink-12);
  border: 1px solid var(--ink-12); border-radius: var(--radius);
  overflow: hidden; margin: 4px 0 18px;
}
.perf-cell { background: var(--card); padding: 10px 6px; text-align: center; }
.perf-l { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-45); font-weight: 650; }
.perf-v { font-size: 15px; font-weight: 650; margin-top: 3px; }
@media (max-width: 760px) {
  .perf-strip { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------- my portfolio */
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pf-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ground); border-radius: var(--radius);
  padding: 6px 10px; font-size: 13px; font-weight: 600;
}
.pf-chip button {
  border: 0; background: none; cursor: pointer; color: var(--ink-45);
  font: inherit; font-size: 15px; line-height: 1; padding: 0;
}
.pf-chip button:hover { color: var(--crimson); }
.bar { height: 6px; border-radius: var(--radius); background: var(--ink-06); overflow: hidden; min-width: 70px; }
.bar > i { display: block; height: 100%; background: var(--crimson); }
.bar.good > i { background: var(--up); }
input[type="checkbox"] { accent-color: var(--crimson); width: 15px; height: 15px; }

/* ---------------------------------------------------- widget grids (widgets.js)
   Premium tile feel from the 21st.dev draggable widget grid: hairline ring,
   staggered fade-in on mount, a lifted shadow while dragging, a short
   outline where a widget lands. One radius, same as everything else. */
.widget { position: relative; will-change: transform;
          animation: widget-in .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes widget-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .widget { animation: none; } }
.metric { box-shadow: var(--shadow), inset 0 0 0 1px var(--ink-06); transition: box-shadow .3s; }
.metrics.tight .metric { box-shadow: inset 0 0 0 1px var(--ink-06); }
#metrics .metric:first-child { grid-column: span 2; }
@media (max-width: 440px) { #metrics .metric:first-child { grid-column: auto; } }

.arranging .widget { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y pinch-zoom;
                     outline: none; border-radius: var(--radius); }
.arranging .widget:hover { box-shadow: 0 0 0 2px var(--ink-12); }
.arranging .widget:focus-visible { box-shadow: 0 0 0 2px var(--crimson); }
.arranging .widget > h2 { pointer-events: none; }
.widget.holding { transform: scale(.97); transition: transform .2s; }
.widget.lifted { cursor: grabbing; z-index: 20; animation: none;
                 box-shadow: 0 28px 60px -16px var(--lift), 0 10px 24px -8px var(--lift); }
.widget.landed { box-shadow: 0 0 0 2px var(--ink-45); transition: box-shadow .3s; }
.arranging::after { content: "Drag a card to move it. On a phone, press and hold first. Keyboard: Alt + arrow keys.";
                    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; white-space: nowrap;
                    background: var(--ink); color: var(--card); font-size: 12.5px; font-weight: 600;
                    padding: 9px 14px; border-radius: var(--radius); box-shadow: 0 10px 24px -8px rgba(0,0,0,.35); max-width: calc(100vw - 32px); white-space: normal; text-align: center; }


/* ================================================================ sidebar
   Reference: Tanim's glass sidebar image, 11 Oct 2026. Strictly grayscale,
   flat 2D glass: translucent charcoal, restrained blur, hairline border.
   Layout is driven by <html data-sb>; sidebar.js only flips it. One radius. */
:root { --sb-open: 248px; --sb-rail: 76px; --sb-gap: 16px; --sb-pad: 10px;
        --sb-ease: cubic-bezier(.22,1,.36,1); --sb-dur: .22s; }
.sb {
  --sb-bg: rgba(24,24,27,.62); --sb-line: rgba(255,255,255,.10); --sb-fg: #FAFAFA; --sb-fg-2: #D4D4D8;
  --sb-muted: #A1A1AA; --sb-hover: rgba(255,255,255,.05); --sb-on: rgba(255,255,255,.09);
  --sb-on-line: rgba(255,255,255,.14); --sb-shadow: 0 10px 30px rgba(0,0,0,.28);
  position: fixed; z-index: 50; top: var(--sb-gap); bottom: var(--sb-gap); left: var(--sb-gap);
  width: var(--sb-rail);
}
:root[data-theme="light"] .sb {
  --sb-bg: rgba(255,255,255,.66); --sb-line: rgba(0,0,0,.09); --sb-fg: #18181B; --sb-fg-2: #3F3F46;
  --sb-muted: #71717A; --sb-hover: rgba(0,0,0,.04); --sb-on: rgba(0,0,0,.06);
  --sb-on-line: rgba(0,0,0,.09); --sb-shadow: 0 10px 30px rgba(0,0,0,.07);
}
:root[data-sb="expanded"] .sb { width: var(--sb-open); }
.sb-panel {
  height: 100%; display: flex; flex-direction: column; padding: 14px var(--sb-pad);
  background: var(--sb-bg); border: 1px solid var(--sb-line); border-radius: var(--radius);
  box-shadow: var(--sb-shadow); color: var(--sb-fg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
}
.sb-panel::-webkit-scrollbar { display: none; }

/* page offset: always the rail. Only a PINNED sidebar makes the page move;
   hover/focus opening floats above the content (sb-float), no shift. */
body { padding-left: calc(var(--sb-rail) + var(--sb-gap)); }
@media (min-width: 1100px) { :root.sb-pinned body { padding-left: calc(var(--sb-open) + var(--sb-gap)); } }
:root.sb-ready .sb { transition: width var(--sb-dur) var(--sb-ease); }
:root.sb-ready body { transition: padding-left var(--sb-dur) var(--sb-ease); }
:root.sb-float .sb { --sb-shadow: 0 18px 50px rgba(0,0,0,.45); }
:root[data-theme="light"].sb-float .sb { --sb-shadow: 0 18px 50px rgba(0,0,0,.14); }
html { scrollbar-gutter: stable; }                    /* scroll lock does not nudge the page */
:root.sb-lock, :root.sb-lock body { overflow: hidden; }
.sb-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.5); animation: sb-fade var(--sb-dur) var(--sb-ease); }
:root[data-theme="light"] .sb-scrim { background: rgba(24,24,27,.28); }
@keyframes sb-fade { from { opacity: 0; } }

/* logo: full wordmark open, mark only on the rail; both on a white chip */
.sb-logo { position: relative; display: block; height: 48px; margin: 2px 0 18px; flex: none; }
.sb-logo > span { position: absolute; top: 0; left: 0; display: block; background: #FFFFFF; line-height: 0;
                  border-radius: var(--radius); transition: opacity 90ms ease-out; }
:root[data-sb="expanded"] .sb-logo-full, :root[data-sb="collapsed"] .sb-logo-mark { transition: opacity 160ms ease-out 60ms; }
.sb-logo-full { padding: 9px 12px; }
.sb-logo-full img { height: 30px; width: auto; }
.sb-logo-mark { left: calc((var(--sb-rail) - 2 * var(--sb-pad) - 2px - 48px) / 2) !important; }
.sb-logo-mark img { width: 48px; height: 48px; border-radius: var(--radius); }
:root[data-sb="collapsed"] .sb-logo-full, :root[data-sb="expanded"] .sb-logo-mark { opacity: 0; pointer-events: none; }
.sb-logo:focus-visible { outline: 2px solid var(--sb-muted); outline-offset: 3px; border-radius: var(--radius); }

.sb-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.sb-foot { margin-top: auto; padding-top: 8px; }
.sb-divider { border: 0; height: 1px; background: var(--sb-line); margin: 12px 8px; }

/* items: icon sits at the rail's centre in BOTH states, so nothing jumps */
.sb-item {
  display: flex; align-items: center; gap: 14px; width: 100%; height: 44px;
  padding: 0 0 0 calc((var(--sb-rail) - 2 * var(--sb-pad) - 2px - 22px) / 2);
  font: inherit; font-size: 14.5px; font-weight: 500; letter-spacing: -.005em; text-align: left;
  color: var(--sb-fg-2); background: transparent; border: 1px solid transparent;
  border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap; overflow: hidden;
  transition: background .15s, color .15s, border-color .15s;
}
.sb-item:hover { background: var(--sb-hover); color: var(--sb-fg); }
.sb-item:focus-visible { outline: 2px solid var(--sb-muted); outline-offset: 2px; }
.sb-item[aria-current="page"], .sb-item[aria-pressed="true"] {
  background: var(--sb-on); border-color: var(--sb-on-line); color: var(--sb-fg);
}
.sb-item:disabled, .sb-item[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.sb-ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6;
         stroke-linecap: round; stroke-linejoin: round; }
/* labels fade in just after the width starts growing, and are gone before it
   finishes shrinking (each state carries the transition used to ENTER it) */
.sb-label { opacity: 0; transition: opacity 90ms ease-out; }
:root[data-sb="expanded"] .sb-label { opacity: 1; transition: opacity 160ms ease-out 60ms; }

/* "On this page": the current page's sections, below the page buttons so the
   icons above never move. Height grows open with the width (0fr -> 1fr). */
.sb-sections { display: grid; grid-template-rows: 0fr; visibility: hidden;
               transition: grid-template-rows var(--sb-dur) var(--sb-ease), visibility 0s linear var(--sb-dur); }
:root[data-sb="expanded"] .sb-sections { grid-template-rows: 1fr; visibility: visible;
               transition: grid-template-rows var(--sb-dur) var(--sb-ease), visibility 0s; }
.sb-sections-in { min-height: 0; overflow: hidden; }
.sb-sec-h { padding: 16px 10px 6px calc((var(--sb-rail) - 2 * var(--sb-pad) - 2px - 22px) / 2);
            font-size: 12px; font-weight: 600; color: var(--sb-muted); white-space: nowrap; }
.sb-sub { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.sb-sub[hidden] { display: none; }
.sb-sub-item {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 10px 7px calc((var(--sb-rail) - 2 * var(--sb-pad) - 2px - 22px) / 2 + 3px);
  font-size: 13px; line-height: 1.35; color: var(--sb-muted); text-decoration: none;
  border-radius: var(--radius); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.sb-sub-item > span { overflow: hidden; text-overflow: ellipsis; }
.sb-sub-ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6;
             stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.sb-sub-item:hover { background: var(--sb-hover); color: var(--sb-fg); }
.sb-sub-item:focus-visible { outline: 2px solid var(--sb-muted); outline-offset: 2px; }
.sb-sub-item[aria-current="location"] { color: var(--sb-fg); background: var(--sb-hover); }
[data-admin-id] { scroll-margin-top: 16px; }

/* bottom button: a pin where it pins (1100px+), a panel where it opens the overlay */
.ic-panel { display: none; }
@media (max-width: 1099px) { .ic-pin { display: none; } .ic-panel { display: inline; } }

/* theme icon: show the theme you would switch TO */
:root[data-theme="dark"] .ic-moon, :root[data-theme="light"] .ic-sun { display: none; }

/* tooltip for icon-only items */
.sb-tip {
  position: fixed; z-index: 60; transform: translateY(-50%); pointer-events: none; white-space: nowrap;
  padding: 7px 11px; font-size: 13px; font-weight: 500; border-radius: var(--radius);
  background: rgba(24,24,27,.92); color: #FAFAFA; border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
:root[data-theme="light"] .sb-tip { background: rgba(255,255,255,.95); color: #18181B; border-color: rgba(0,0,0,.09);
                                    box-shadow: 0 8px 24px rgba(0,0,0,.08); }

/* top-bar menu button: phones only (the rail is hidden there) */
.tb-menu { display: none; place-items: center; width: 40px; height: 40px; padding: 0; flex: none; cursor: pointer;
           background: var(--card); color: var(--ink); border: 1px solid var(--ink-12); border-radius: var(--radius); }
.tb-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tb-menu:hover { border-color: var(--ink-45); }

/* phones: no rail; the sidebar is a drawer that slides in over the page */
@media (max-width: 639px) {
  :root { --sb-rail: 62px; --sb-gap: 8px; --sb-pad: 7px; }
  body { padding-left: 0; }
  .wrap { padding: 0 12px; }
  .tb-menu { display: inline-grid; }
  :root .sb { width: min(var(--sb-open), calc(100vw - 2 * var(--sb-gap))); transform: translateX(calc(-100% - 2 * var(--sb-gap))); visibility: hidden; }
  :root.sb-modal .sb { transform: none; visibility: visible; }
  :root.sb-ready .sb { transition: transform var(--sb-dur) var(--sb-ease), visibility 0s linear var(--sb-dur); }
  :root.sb-ready.sb-modal .sb { transition: transform var(--sb-dur) var(--sb-ease), visibility 0s; }
  .sb-logo { height: 44px; }
  .sb-logo-mark img { width: 44px; height: 44px; }
  .sb-logo-mark { left: calc((var(--sb-rail) - 2 * var(--sb-pad) - 2px - 44px) / 2) !important; }
}
@media (prefers-reduced-motion: reduce) {
  :root.sb-ready .sb, :root.sb-ready body, .sb-label, .sb-logo > span, .sb-sections { transition: none !important; }
  .sb-scrim { animation: none; }
}

/* light = black and gold: the selected time range is the gold accent */
:root[data-theme="light"] .ranges button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #18181B; }

/* section icon chip, in front of every section heading (section-icons.js).
   Glyph = 1.25x the heading's text size; flat 2D chip, hairline edge. */
.sec-ic {
  display: inline-grid; place-items: center; vertical-align: middle; flex: none;
  width: 1.95em; height: 1.95em; margin: -.3em .6em -.25em 0;
  background: var(--ink-06); border: 1px solid var(--ink-12); border-radius: var(--radius);
  color: var(--ink); letter-spacing: 0;
}
.sec-ic-svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.6;
              stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="light"] .sec-ic { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
:root[data-theme="light"] .sec-ic-svg { stroke: var(--ink); }
summary .sec-ic { margin-top: -.45em; }
.sec-title { display: flex; align-items: center; }
.sec-title .sec-ic { margin: 0 .6em 0 0; }

/* ================================================== redesign, 12 Oct 2026
   Shared components. Tokens: one radius, Inter/JetBrains Mono, the palette
   above. Every control has default / hover / active / focus / disabled. */
:root { --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px;
        --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px; }
:root[data-theme="light"] { --ink-45: rgba(24, 24, 27, .56); }   /* >= 4.5:1 on white */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--card);
        padding: 8px 12px; border-radius: var(--radius); font-weight: 650; }
.skip:focus { left: calc(var(--sb-rail) + 24px); outline: 2px solid var(--gold); }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; }
button, input, select { font: inherit; }

/* top bar: page title, as-of, market chip, global search */
header.topbar { background: var(--ground); border-bottom: 1px solid var(--ink-12); padding: 0; position: sticky; top: 0; z-index: 30;
                -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
:root[data-theme="dark"] header.topbar { background: rgba(10,10,11,.85); }
:root[data-theme="light"] header.topbar { background: rgba(245,245,244,.9); }
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.tb-title { display: flex; align-items: baseline; gap: 12px; }
.tb-title h1 { font-size: var(--fs-20); font-weight: 650; letter-spacing: -.01em; margin: 0; }
.tb-asof { font-size: var(--fs-13); color: var(--ink-45); }
.tb-asof b { color: var(--ink); font-weight: 600; }
.tb-market { display: flex; gap: 8px; align-items: center; font-size: var(--fs-13); margin-left: auto; }
.tb-market .lvl { font-weight: 650; font-variant-numeric: tabular-nums; }
.tb-market .chg { font-weight: 650; padding: 2px 8px; border-radius: var(--radius); }
.tb-market .chg.up { background: var(--tint-up); } .tb-market .chg.down { background: var(--tint-down); }
.tb-search { margin: 0; width: 280px; }
.tb-search input { max-width: none; padding: 8px 12px; font-size: var(--fs-13); }
@media (max-width: 760px) { .topbar-in { gap: 10px; padding-top: 8px; padding-bottom: 8px; } .tb-market { margin-left: 0; } .tb-search { width: 100%; } }

/* skeleton, error, empty */
.skeleton-page .sk { background: linear-gradient(90deg, var(--ink-06), var(--ink-12), var(--ink-06)); background-size: 200% 100%;
                     animation: sk 1.2s linear infinite; border-radius: var(--radius); margin-bottom: 16px; }
.sk-row { height: 18px; width: 40%; } .sk-tiles { height: 120px; } .sk-chart { height: 380px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
body:not(.ready) .panel { visibility: hidden; position: absolute; }
.error { background: var(--tint-down); color: var(--down); border-radius: var(--radius); padding: 14px 16px; font-size: var(--fs-14); margin-bottom: 20px; }
.error button { margin-left: 10px; font-weight: 650; border: 1px solid currentColor; background: none; color: inherit; border-radius: var(--radius); padding: 4px 10px; cursor: pointer; }
.empty { border: 1px dashed var(--ink-12); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--ink-70); font-size: var(--fs-14); margin-top: 14px; }
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* buttons and segmented controls */
.btn { font-size: var(--fs-13); font-weight: 650; padding: 8px 14px; border-radius: var(--radius); border: 1px solid var(--ink-12);
       background: var(--card); color: var(--ink); cursor: pointer; transition: background .12s, border-color .12s; }
.btn:hover { border-color: var(--ink-45); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--crimson); border-color: var(--crimson); color: var(--white); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; background: var(--ink-06); border: 1px solid var(--ink-12); border-radius: var(--radius); padding: 3px; }
.seg button, .ranges.seg button { border: 0; background: transparent; color: var(--ink-70); font-size: 12.5px; font-weight: 600; padding: 5px 11px;
                                   border-radius: var(--radius); cursor: pointer; transition: background .12s, color .12s; }
.seg button:hover, .ranges.seg button:hover { color: var(--ink); background: var(--ink-06); }
.seg button[aria-pressed="true"], .ranges.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
:root[data-theme="light"] .seg button[aria-pressed="true"], :root[data-theme="light"] .ranges.seg button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.seg .count { font-size: 11px; color: var(--ink-45); margin-left: 4px; font-weight: 600; }

/* sub-tabs inside a page */
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ink-12); margin: 0 0 22px; overflow-x: auto; }
.subtabs button { border: 0; background: none; color: var(--ink-45); font-size: var(--fs-14); font-weight: 650; padding: 10px 14px;
                  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; border-radius: var(--radius) var(--radius) 0 0; }
.subtabs button:hover { color: var(--ink); }
.subtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--crimson); }
.subtabs .count { font-size: 11px; color: var(--ink-45); margin-left: 4px; }

/* verdict banner */
.banner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--ink-12);
          border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; font-size: var(--fs-14); }
.banner strong { color: var(--ink); } .banner .formula { margin: 0; }
.banner a { margin-left: auto; color: var(--crimson); font-weight: 650; text-decoration: none; white-space: nowrap; }

/* "how this is built" collapsibles and in-card panels */
details.how { margin-top: 4px; }
details.how > summary { font-size: var(--fs-12); text-transform: none; letter-spacing: 0; color: var(--crimson); font-weight: 600; }
details.how > summary::after { content: " ▸"; } details.how[open] > summary::after { content: " ▾"; }
details.panel-x { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ink-12); }
details.panel-x > summary { font-size: var(--fs-14); text-transform: none; letter-spacing: -.01em; color: var(--ink); font-weight: 640; display: flex; gap: 10px; align-items: baseline; }
details.panel-x > summary .formula { margin: 0; font-weight: 500; }

/* strips and two-column layouts */
.card.strip { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 14px 18px; font-size: var(--fs-13); }
.card.strip .k { color: var(--ink-45); font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .07em; font-weight: 650; margin-right: 6px; }
.card.strip .v { font-weight: 650; }
.card.strip a { margin-left: auto; color: var(--crimson); font-weight: 650; text-decoration: none; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 26px; }
.two-col > section { margin-bottom: 0; }
.two-col table { font-size: 12.5px; } .two-col td, .two-col th { padding-left: 8px; padding-right: 8px; }
@media (max-width: 1400px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* tables: sortable headers, sticky header, sticky first column on phones */
.scroll { max-height: none; }
.scroll table { position: relative; }
.scroll thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: "↕"; opacity: .35; margin-left: 5px; font-size: 10px; }
th.sortable[aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--crimson); }
th.sortable[aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--crimson); }
@media (max-width: 640px) {
  .scroll td:first-child, .scroll th:first-child { position: sticky; left: 0; background: var(--card); z-index: 2; }
  .scroll thead th:first-child { z-index: 3; }
}

/* evidence: status strip, toolbar, family groups */
.status-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(14px, 1fr)); gap: 3px; margin-top: 14px; }
.status-strip button { height: 14px; border: 0; border-radius: 50%; cursor: pointer; padding: 0; background: var(--ink-12); }
.status-strip button.green { background: var(--up); } .status-strip button.red { background: var(--down); }
.status-strip button.grey { background: var(--ink-45); } .status-strip button.thin { background: var(--warn); }
.status-strip button:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.toolbar input[type="search"] { padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--ink-12); background: var(--card); color: var(--ink); min-width: 200px; }
.toolbar input:focus { outline: none; border-color: var(--crimson); }
.sel select { padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--ink-12); background: var(--card); color: var(--ink); font-size: 12.5px; }
.groups { margin-top: 14px; }
.group { border: 1px solid var(--ink-12); border-radius: var(--radius); margin-bottom: 8px; background: var(--card); }
.group > summary { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 11px 14px;
                   text-transform: none; letter-spacing: 0; font-size: var(--fs-14); color: var(--ink); font-weight: 640; }
.group > summary::after { content: none; }
.group > summary .meta { color: var(--ink-45); font-size: var(--fs-12); font-weight: 600; white-space: nowrap; }
.group > summary .meta b { color: var(--up); }
.group .rows { border-top: 1px solid var(--ink-12); }
.trow { display: grid; grid-template-columns: 10px minmax(0, 1.6fr) minmax(0, 1fr) 76px 86px 64px; gap: 12px; align-items: center;
        padding: 9px 14px; border-bottom: 1px solid var(--ink-06); font-size: 12.5px; }
.trow:last-child { border-bottom: 0; }
.trow .t-name { font-weight: 640; color: var(--ink); } .trow .t-id { color: var(--ink-45); font-size: 11px; margin-left: 6px; }
.trow .t-gloss { color: var(--ink-70); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .gap { height: 6px; background: var(--ink-06); border-radius: var(--radius); overflow: hidden; }
.trow .gap i { display: block; height: 100%; background: var(--ink-45); }
.trow .gap i.ok { background: var(--up); }
.trow .r { text-align: right; font-variant-numeric: tabular-nums; }
.trow .best { color: var(--ink-45); font-size: 11px; }
@media (max-width: 760px) { .trow { grid-template-columns: 10px minmax(0, 1fr) 70px; } .trow .t-gloss, .trow .gap, .trow .best { display: none; } }

/* sample portfolio */
.bars .bar-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 10px; align-items: center; font-size: 12.5px; margin-bottom: 6px; }
.bars .bar-row .b { height: 8px; background: var(--ink-06); border-radius: var(--radius); overflow: hidden; }
.bars .bar-row .b i { display: block; height: 100%; background: var(--gold); }
.bars .bar-row .n { text-align: right; color: var(--ink-70); font-variant-numeric: tabular-nums; }

/* old top-split no longer used */
.top-split, .side-card { display: none; }

.trow.flash { background: var(--tint-warn); transition: background .3s; }
.metric .delta { font-size: 15px; font-weight: 650; margin-left: 6px; vertical-align: 3px; }
@media (max-width: 640px) { .subtabs button { padding: 10px 10px; font-size: 13px; } .lights { gap: 8px; } }

/* ======================================================= headline mood index
   One hero (score + meters), a 30-day SVG trend, movers and topics side by
   side, filters, methodology. Same tokens; traffic-light status colours. */
.mood-hero { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 14px; align-items: stretch; margin-top: 14px; }
.mood-score { background: var(--ground); border-radius: var(--radius); padding: 18px 20px; }
.mood-num { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.mood-num > span:first-child { font-size: 44px; font-weight: 660; letter-spacing: -.03em; line-height: 1; }
.mood-band { font-size: 14px; color: var(--ink-45); }
.mood-label { margin-top: 10px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: var(--radius); font-size: 12.5px; font-weight: 650; background: var(--ink-06); color: var(--ink-70); }
.pill.up { background: var(--tint-up); color: var(--up); } .pill.down { background: var(--tint-down); color: var(--down); } .pill.flat { background: var(--tint-warn); color: var(--warn); }
.pill.small { padding: 1px 7px; font-size: 11px; margin-right: 4px; }
.mood-deltas { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--ink-70); }
.mood-deltas span { white-space: nowrap; }
/* 2 x 2: mood and the headline split stacked left, the tall confidence card right */
.mood-meters { display: contents; }
.mood-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "score trust" "split trust"; }
.mood-score { grid-area: score; } .meter.trust { grid-area: trust; } .meter.split { grid-area: split; }
.mood-scale { position: relative; margin-top: 18px; padding-top: 6px; }
.mood-scale .track { display: flex; gap: 2px; height: 10px; border-radius: var(--radius); overflow: hidden; }
.mood-scale .track i { flex: 1; }   /* five equal bands of 40 points */
.mood-scale .vneg { background: var(--down); } .mood-scale .neg { background: var(--down); opacity: .5; }
.mood-scale .mix { background: var(--warn); opacity: .55; }
.mood-scale .pos { background: var(--up); opacity: .5; } .mood-scale .vpos { background: var(--up); }
.mood-scale .band { position: absolute; top: 6px; height: 10px; background: var(--ink); opacity: .22; border-radius: var(--radius); }
.mood-scale .mark { position: absolute; top: 0; width: 4px; height: 22px; margin-left: -2px; background: var(--ink); border-radius: var(--radius); }
.mood-scale .ends { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--ink-45); }
.meter { background: var(--ground); border-radius: var(--radius); padding: 18px 20px; }
/* plain sentence-case tile heading (the hero avoids the spaced caps labels) */
.meter-h { font-size: 13.5px; font-weight: 600; color: var(--ink-70); }
.meter-big { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.meter-big > span:first-child { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.meter-big .ok { color: var(--up); } .meter-big .mid { color: var(--warn); } .meter-big .low { color: var(--down); }
.meter-of { font-size: 13px; color: var(--ink-45); }
.meter-big.center { justify-content: center; margin-top: 2px; }
.gauge svg { display: block; width: 100%; max-width: 230px; margin: 8px auto 0; }
.gauge path { fill: none; stroke-width: 13; stroke-linecap: round; }
.gauge .g-low { stroke: var(--down); } .gauge .g-mid { stroke: var(--warn); } .gauge .g-ok { stroke: var(--up); }
.gauge .g-needle { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; } .gauge .g-hub { fill: var(--ink); }
.gauge text { fill: var(--ink-45); font-size: 10px; text-anchor: middle; font-family: Inter, sans-serif; }
.reasons { margin-top: 12px; }
.reason { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-70); }
.reason b { font-weight: 700; } .reason.ok b { color: var(--up); } .reason.mid b { color: var(--warn); } .reason.low b { color: var(--down); }
.reason .num { font-size: 12px; color: var(--ink-45); }
.reason i { grid-column: 1 / -1; height: 6px; border-radius: var(--radius); background: linear-gradient(90deg, var(--c) var(--w), var(--ink-06) var(--w)); }
.reason.ok i { --c: var(--up); } .reason.mid i { --c: var(--warn); } .reason.low i { --c: var(--down); }
.meter .progress { margin-top: 12px; }
.meter .progress > div.ok { background: var(--up); } .meter .progress > div.mid { background: var(--warn); } .meter .progress > div.low { background: var(--down); }
.meter-sub { font-size: 13px; line-height: 1.5; margin-top: 12px; color: var(--ink-70); } .meter-sub b { color: var(--ink); font-weight: 650; }
.dist { display: flex; gap: 2px; height: 10px; border-radius: var(--radius); overflow: hidden; margin-top: 14px; background: var(--ink-06); }
.dist i { display: block; height: 100%; } .dist .pos, .dist-key .pos i { background: var(--up); } .dist .neu, .dist-key .neu i { background: var(--ink-45); } .dist .neg, .dist-key .neg i { background: var(--down); }
.dist-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.dist-key > div { display: flex; flex-direction: column; gap: 2px; }
.dist-key .k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-70); }
.dist-key .k i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dist-key b { font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.dist-key .pos b { color: var(--up); } .dist-key .neg b { color: var(--down); }
.dist-key .cnt { font-size: 11.5px; color: var(--ink-45); }
.dist-legend { margin-top: 10px; }
.info { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ink-45); background: none; color: var(--ink-45); font-size: 10px; font-weight: 700;
        line-height: 1; cursor: help; vertical-align: 1px; margin-left: 4px; position: relative; padding: 0; }
.info:hover, .info:focus-visible { color: var(--ink); border-color: var(--ink); }
.info[data-tip]:hover::after, .info[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: 22px; z-index: 20; width: 240px;
        background: var(--ink); color: var(--card); font-size: 12px; font-weight: 500; line-height: 1.45; text-transform: none; letter-spacing: 0; padding: 8px 10px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; }
.mood-trend { margin-top: 18px; }
.svgchart svg { width: 100%; height: 200px; display: block; }
.svgchart .band { fill: var(--crimson); opacity: .14; } .svgchart .line { fill: none; stroke: var(--crimson); stroke-width: 2; }
.svgchart .grid { stroke: var(--ink-12); stroke-width: 1; } .svgchart .grid.zero { stroke: var(--ink-45); }
.svgchart .lab { fill: var(--ink-45); font-size: 11px; font-family: "JetBrains Mono", ui-monospace, monospace; }
.svgchart .dot { fill: var(--ink-45); stroke: var(--card); stroke-width: 1.5; } .svgchart .dot.up { fill: var(--up); } .svgchart .dot.down { fill: var(--down); } .svgchart .dot.flat { fill: var(--warn); }
.svgchart .dot.thin { fill: var(--card); stroke: var(--ink-45); } .svgchart .dot:hover { r: 5; }
.mood-filters { margin-top: 18px; } .mood-filters .formula { margin: 0; }
.mood-cols { margin-top: 16px; margin-bottom: 0; }
.movers ul { list-style: none; margin: 8px 0 0; padding: 0; }
.movers-cols { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.mover { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ink-06); font-size: 13px; }
.mover:last-child { border-bottom: 0; }
.mover .mv { font-weight: 650; text-align: right; } .mover.up .mv { color: var(--up); } .mover.down .mv { color: var(--down); }
.mover a { color: var(--ink); text-decoration: none; } .mover a:hover { text-decoration: underline; }
.mm { display: block; color: var(--ink-45); font-size: 11.5px; margin-top: 2px; }
.mood-topics tr.topic-row { cursor: pointer; } .mood-topics tr.topic-row:focus-visible { outline: 2px solid var(--crimson); outline-offset: -2px; }
.mood-topics .chev { color: var(--ink-45); } .mood-topics tr.topic-detail td { background: var(--ground); white-space: normal; }
.spark { width: 80px; height: 22px; display: block; } .spark path { fill: none; stroke: var(--ink); stroke-width: 1.4; } .spark .zero { stroke: var(--ink-12); }
.hl { list-style: none; margin: 4px 0 0; padding: 0; } .hl li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--ink-06); font-size: 13px; }
.hl li:last-child { border-bottom: 0; } .hl li .mm { grid-column: 2; } .hl a { color: var(--ink); text-decoration: none; } .hl a:hover { text-decoration: underline; }
.mood-pip { display: inline-block; text-align: center; font-weight: 650; font-size: 11.5px; padding: 2px 0; border-radius: var(--radius); background: var(--ink-06); color: var(--ink-70); align-self: start; }
.mood-pip.up { background: var(--tint-up); color: var(--up); } .mood-pip.down { background: var(--tint-down); color: var(--down); }
.sk-rows .sk { height: 14px; margin: 8px 0; width: 90%; }
@media (max-width: 900px) { .mood-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "score" "trust" "split"; } .mood-num > span:first-child { font-size: 38px; } }
@media (max-width: 640px) { .svgchart svg { height: 160px; } }
