/* Undercurrent — dark theme. Blue = up, orange = down (never red/green alone).
   Contrast: text #e6e9ee and muted #b3bcc8 on #0d1117 / #161b22 both pass WCAG AA
   (muted: 9.9:1 and 9.0:1), so small grey text stays readable. */
:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c222b;
  --line: #2b323d;
  --text: #e6e9ee;
  --muted: #b3bcc8;
  --up: #6cb6ff;
  --down: #f0a35e;
  --good: #5fd3b0;
  --good-bg: #123a33;
  --warn-bg: #3d2a14;
  --noise-bg: #262c35;
  --chip-insider: #1d3557;
  --chip-holdings: #3a2547;
  --chip-inside: #3d2a14;
  --chip-other: #262c35;
  /* chart lines besides up and down (chart.js reads these) */
  --accent: #9fb4d9;
  --amber: #e5c07b;
  --violet: #c4a7f5;
  --ink: #e6e9ee;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root { color-scheme: dark; }
* { box-sizing: border-box; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--panel-2); color: var(--text); padding: 0.5rem 0.9rem; border-radius: 8px; z-index: 10; }
.skip:focus { left: 0.5rem; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); }
a { color: var(--up); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--up); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--text); }
.warn { color: var(--down); }

.top { display: flex; align-items: center; gap: 2rem; padding: 0.9rem 2.5rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; gap: 0.7rem; align-items: center; color: var(--good); font-weight: 700; letter-spacing: 0.25em; }
.brand span { color: var(--text); }
.top nav { display: flex; gap: 0.3rem; flex: 1; }
.top nav a { color: var(--muted); padding: 0.45rem 0.9rem; border-radius: 8px; }
.top nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); font-weight: 600; }
.pill { font-family: var(--mono); font-size: 0.85rem; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--good-bg); color: var(--good); display: inline-flex; align-items: center; gap: 0.5rem; }
.lang { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.5rem; }
.lang:hover { color: var(--text); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.status-degraded { background: var(--warn-bg); color: var(--down); }
.pill.status-failed, .pill.status-unknown { background: var(--noise-bg); color: var(--muted); }

main { max-width: 1400px; margin: 0 auto; padding: 2rem 2.5rem 3rem; }
body > footer { max-width: 1400px; margin: 0 auto; padding: 0 2.5rem 2rem; color: var(--muted); font-size: 0.85rem; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.9rem); line-height: 1.15; margin: 0.2rem 0 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-size: 0.85rem; font-weight: 600; margin: 0 0 0.6rem; }
.hero { display: flex; justify-content: space-between; gap: 2rem; align-items: flex-end; margin-bottom: 2rem; flex-wrap: wrap; }
.lede { max-width: 40rem; color: var(--muted); font-size: 1.05rem; margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.tiles.five { grid-template-columns: repeat(5, 1fr); }
.split + .tiles.five { margin-top: 1.5rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tile span { color: var(--muted); font-size: 0.95rem; }
.tile b { font-size: 2.1rem; font-weight: 600; font-family: var(--mono); }
.tile small { color: var(--muted); }
.v-holds_up-text { color: var(--good); }

.split { display: grid; grid-template-columns: 2.6fr 1.4fr; gap: 1.6rem; align-items: start; }
.split.even { grid-template-columns: 1fr 2fr; margin-top: 1.2rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem 1.6rem; min-width: 0; }
.panel + .panel, .run { margin-top: 1.6rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.5rem; margin-bottom: 1rem; }
.card header { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.card header time { margin-left: auto; }
.tick-sym { font-family: var(--mono); font-weight: 600; font-size: 1.15rem; background: var(--panel-2); padding: 0.1rem 0.4rem; border-radius: 6px; }
.chip { font-size: 0.82rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--chip-other); color: var(--text); }
.chip-insider { background: var(--chip-insider); color: #a9d1ff; }
.chip-holdings { background: var(--chip-holdings); color: #e3c4f5; }
.chip-inside { background: var(--chip-inside); color: #f7c999; }
.fact { font-size: 1.1rem; margin: 0.8rem 0; }
.fact a { color: var(--text); }
.card footer { display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 0.8rem; color: var(--muted); font-size: 0.95rem; }
.card footer b { color: var(--text); }
.card footer b.up { color: var(--up); }
.card footer b.down { color: var(--down); }
.verdict { font-weight: 600; font-size: 0.85rem; padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.card footer .verdict { margin-left: auto; }
.v-holds_up { background: var(--good-bg); color: var(--good); }
.v-eaten_by_costs { background: var(--warn-bg); color: var(--down); }
.v-noise, .v-too_few { background: var(--noise-bg); color: var(--muted); }
.v-untested, .v-unconfirmed { background: var(--noise-bg); color: var(--text); }
.pill-mini { font-size: 0.75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.4rem; white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.8rem; }
.filters button { font: inherit; font-size: 0.9rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.75rem; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow: auto; }
.feed li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.6rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.feed li a { color: var(--text); }
.feed li time small { display: block; font-size: 0.75rem; }
.feed li[hidden] { display: none; }
.feed.wide { max-height: none; overflow: visible; }
.feed.wide .chip { margin-right: 0.3rem; }
.day { margin-top: 1.4rem; }
.day[hidden] { display: none; }
.search { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.search span { color: var(--muted); }
.search input { flex: 1; min-width: 12rem; max-width: 26rem; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.8rem; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; padding: 0; margin: 0 0 0.6rem; font-size: 0.92rem; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--line); vertical-align: bottom; }
td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--line); }
.r { text-align: right; }
td.r { white-space: nowrap; }
th.wide { min-width: 9.5rem; }
td.sig { min-width: 13rem; }
td.sig small, td.r small { display: block; font-size: 0.8rem; }
.scroll-hint { display: none; margin: 0.6rem 0 0; }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.horizons { color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.horizons a { border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.7rem; color: var(--muted); }
.horizons a[aria-current="page"] { color: var(--text); background: var(--panel-2); }

.crumbs { color: var(--muted); margin: 0 0 0.8rem; }
.tags { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; margin: 0 0 0.5rem; }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: 0.6rem 1rem; margin: 1rem 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.chart { width: 100%; height: auto; display: block; margin-top: 0.6rem; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: #4b5563; stroke-width: 1.2; }
.chart .event { stroke: var(--muted); stroke-dasharray: 4 4; }
.chart .entry { stroke: var(--up); stroke-dasharray: 2 5; stroke-width: 1.5; }
.chart .tick { fill: var(--muted); font: 18px var(--mono); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; margin-top: 0.5rem; }
.lg { display: inline-block; width: 18px; border-top: 2px dashed var(--muted); vertical-align: middle; }
.lg-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.lg { flex: none; }
.lg-entry { border-top: 2px dotted var(--up); }
@media (min-width: 901px) and (max-width: 1250px) {
  .chart .tick { font-size: 24px; }
}
@media (max-width: 640px) {
  .chart .tick { font-size: 30px; }
}
.chart .tick.strong { fill: var(--text); font-weight: 600; }
.chart .band-up { fill: rgba(108, 182, 255, 0.18); }
.chart .band-down { fill: rgba(240, 163, 94, 0.18); }
.chart .line { fill: none; stroke-width: 2.5; }
.chart .line-up { stroke: var(--up); }
.chart .line-down { stroke: var(--down); }
.chart .dot-up { fill: var(--up); }
.chart .dot-down { fill: var(--down); }

@media (max-width: 900px) {
  .top { padding: 0.8rem 1rem; gap: 0.8rem; }
  main, body > footer { padding-left: 1rem; padding-right: 1rem; }
  .tiles, .tiles.five { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .split, .split.even { grid-template-columns: 1fr; }
  .card footer .verdict { margin-left: 0; }
  .tile b { font-size: 1.6rem; }
  .kv { grid-template-columns: 7.5rem 1fr; }
}
@media (max-width: 1250px) {
  table { font-size: 0.88rem; }
  th, td { padding-left: 0.45rem; padding-right: 0.45rem; }
  td.sig { min-width: 9.5rem; }
  th.wide { min-width: 6.5rem; }
}
@media (max-width: 1000px) {
  .scroll-hint { display: block; }
}
@media (max-width: 640px) {
  .top { gap: 0.5rem 0.6rem; }
  .brand { flex: 1; letter-spacing: 0.1em; gap: 0.5rem; }
  .pill { order: 2; font-size: 0.8rem; padding: 0.3rem 0.6rem; }
  .pill-run { display: none; }
  .lang { order: 3; padding: 0.4rem 0.7rem; }
  .top nav { order: 4; flex-basis: 100%; gap: 0; flex-wrap: wrap; }
  .top nav a { padding: 0.45rem 0.5rem; }
}

/* Today: sections by verdict, one card per signal type */
.tier { margin-bottom: 1.6rem; }
.tier > .eyebrow { margin-bottom: 0.2rem; }
.tier-note { color: var(--muted); margin: 0 0 0.8rem; max-width: 46rem; }
.card.group header { justify-content: space-between; }
.summary { font-size: 1.05rem; margin: 0.7rem 0; }
.group-events { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.group-events li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: start; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.group-events li:last-child { border-bottom: 0; padding-bottom: 0; }
.group-events .tick-sym { font-size: 1rem; }
.ge-main a { color: var(--text); }
.ge-main small { display: block; margin-top: 0.15rem; }
.ge-main small.badge { display: inline-block; }
.tile-link { color: var(--text); }
.tile-link:hover { text-decoration: none; border-color: var(--up); }
.tile b small.of { font-size: 1.1rem; color: var(--muted); }
.feed-note { margin: 0.8rem 0 0; }
.badge { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.badge-thin { background: var(--warn-bg); color: var(--down); }
.badge-ok { background: var(--good-bg); color: var(--good); }
.badge-move { background: var(--noise-bg); font-family: var(--mono, ui-monospace, monospace); }

/* Event page */
.verdict-box { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 12px; padding: 1rem 1.4rem; margin: 1.2rem 0 0; }
.verdict-box p { margin: 0.3rem 0; }
.verdict-box .summary { font-size: 1.15rem; margin-top: 0; }
.v-box-holds_up { border-left-color: var(--good); }
.v-box-eaten_by_costs { border-left-color: var(--down); }
.warn-line { color: var(--down); }
.lead { margin: 1rem 0; padding: 0.2rem 0 0.2rem 1rem; border-left: 3px solid var(--line); font-size: 1.02rem; }
details.full summary { cursor: pointer; color: var(--up); }
details.full p { color: var(--muted); white-space: pre-line; }
.amounts { margin: 0.8rem 0; }
.meta { margin-top: 1rem; }
.company h3 { font-size: 1rem; margin: 1.2rem 0 0.4rem; }
.feed.compact li { grid-template-columns: 3rem 1fr; padding: 0.45rem 0; font-size: 0.95rem; }
.spark { width: 100%; height: auto; display: block; }
.spark .line { fill: none; stroke-width: 2; }
.spark .line-up { stroke: var(--up); }
.spark .line-down { stroke: var(--down); }
.spark .entry { stroke: var(--muted); stroke-dasharray: 3 4; }
.spark-fig { margin: 0.8rem 0; }
.spark-fig figcaption { margin-top: 0.3rem; }
.ext { font-weight: 600; }
.q { display: inline-flex; width: 1.15rem; height: 1.15rem; border: 1px solid var(--line); border-radius: 50%; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--muted); vertical-align: middle; }
.q:hover { color: var(--text); text-decoration: none; border-color: var(--muted); }
.chart .lbl { font-size: 15px; }
.chart .lbl-entry { fill: var(--up); }
.chart .horizon { stroke: var(--muted); stroke-dasharray: 1 5; stroke-width: 1.5; }

/* Archive and glossary */
.arch-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.since { white-space: nowrap; }
.glossary dl { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 0.9rem 1.6rem; margin: 0; }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 0; color: var(--muted); max-width: 52rem; }
.glossary dt:target, .glossary dt:target + dd { color: var(--text); }
@media (max-width: 900px) {
  .glossary dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .glossary dd { margin-bottom: 0.9rem; }
  .group-events li { grid-template-columns: auto 1fr; }
  .group-events time { grid-column: 2; }
  .arch-row { flex-direction: column; gap: 0.2rem; }
}

/* Stock of the week */
.h1-sub { font-size: 0.5em; font-weight: 500; }
.pick-card { display: flex; flex-direction: column; gap: 0.4rem; color: var(--text); border-left: 4px solid var(--up); }
.pick-card:hover { text-decoration: none; border-color: var(--up); }
.pick-card .eyebrow { margin: 0; }
.pick-line { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.why { list-style: none; padding: 0; margin: 0.6rem 0; }
.why li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.4rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.why li:last-child { border-bottom: 0; }
.why-mark { font-size: 0.8rem; padding-top: 0.2rem; }
.why .up .why-mark, .why li.up .why-mark { color: var(--up); }
.why li.down .why-mark { color: var(--down); }
.block { display: block; margin-top: 0.2rem; }
tr.hl td { background: var(--panel-2); }
.panel h3 { font-size: 1rem; margin: 1.2rem 0 0.4rem; }
.chart.lines .line { fill: none; stroke-width: 2.2; }
.chart.lines .l-pick { stroke: var(--up); }
.chart.lines .l-top { stroke: var(--good); stroke-dasharray: 6 4; }
.chart.lines .l-all { stroke: var(--muted); }
.sw { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--muted); vertical-align: middle; }
.sw.l-pick { border-color: var(--up); }
.sw.l-top { border-color: var(--good); border-top-style: dashed; }
.sw.l-all { border-color: var(--muted); }

/* ------------------------------------------------------------ stock of the week showcase */
.spot { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem;
  align-items: center; padding: 2.2rem 2.4rem; margin-bottom: 1.6rem; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #10233a 0%, var(--panel) 45%, #1b1730 100%); }
.spot-glow { position: absolute; inset: -40% -10% auto auto; width: 70%; height: 160%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(108, 182, 255, 0.22), transparent 70%); filter: blur(10px); }
.spot > :not(.spot-glow) { position: relative; }
.spot-empty { grid-template-columns: 1fr; }
.spot-ticker { font-family: var(--mono); font-size: clamp(2.8rem, 8vw, 5.2rem); letter-spacing: 0.02em; line-height: 1;
  margin: 0.3rem 0 0.4rem; color: #e6e9ee; background: linear-gradient(90deg, #e6e9ee, #a9d1ff 60%, #5fd3b0);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.spot-name { font-size: 1.2rem; color: var(--muted); margin: 0 0 1rem; }
.spot-id { display: flex; align-items: center; gap: 1.2rem; }
.spot-id .spot-name { margin-bottom: 0.2rem; }
.spot-logo { flex: none; width: 88px; height: 88px; border-radius: 22px; display: grid; place-items: center;
  background: #f4f6f9; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden; animation: pop 0.5s ease-out both; }
.spot-logo img { width: 64px; height: 64px; object-fit: contain; grid-area: 1 / 1; }
.spot-logo .mono-badge { display: none; }
.spot-logo.no-img { background: transparent; box-shadow: none; }
.spot-logo.no-img .mono-badge { display: grid; }
.mono-badge { grid-area: 1 / 1; width: 88px; height: 88px; border-radius: 22px; place-items: center;
  font: 700 2rem var(--mono); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 65% 48%), hsl(calc(var(--h) + 40) 70% 32%));
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35); }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spot-logo { animation: none; } }
@media (max-width: 480px) {
  .spot-logo, .mono-badge { width: 64px; height: 64px; border-radius: 16px; }
  .spot-logo img { width: 46px; height: 46px; }
  .mono-badge { font-size: 1.5rem; }
}
.spot-verdict { margin: 1rem 0 0.4rem; }
.spot-explain { margin: 0 0 1.2rem; max-width: 40rem; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 0.8rem; }
.btn { display: inline-flex; align-items: center; padding: 0.6rem 1.1rem; border-radius: 10px; font-weight: 600;
  background: var(--up); color: #0d1117; }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.spot-side { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.ring { width: 150px; height: 150px; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--good); stroke-width: 10; stroke-linecap: round; }
.ring-big { font: 700 34px var(--mono); fill: var(--text); }
.ring-small { font: 14px var(--sans); fill: var(--muted); }
.ring-cap { margin: 0 0 0.6rem; text-align: center; }
.spot-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0; width: 100%; }
.spot-stats div { background: rgba(13, 17, 23, 0.55); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.9rem; }
.spot-stats dt { color: var(--muted); font-size: 0.82rem; }
.spot-stats dd { margin: 0.2rem 0 0; font-size: 1.35rem; font-weight: 600; }

.chart-card { margin-bottom: 1.6rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.card-head h2 { margin: 0; }
.pills { list-style: none; display: flex; gap: 0.4rem; margin: 0; padding: 0; flex-wrap: wrap; }
.pill-ret { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 0.9rem; }
.pill-ret span { color: var(--muted); }
.pill-ret.up b { color: var(--up); }
.pill-ret.down b { color: var(--down); }
.spot-chart { width: 100%; height: auto; display: block; margin-top: 0.8rem; }
.spot-chart .grid { stroke: var(--line); }
.spot-chart .zero { stroke: #4b5563; stroke-width: 1.2; }
.spot-chart .tick { fill: var(--muted); font: 15px var(--mono); }
.spot-chart .stock { fill: none; stroke-width: 3; stroke-linejoin: round; }
.spot-up .stock { stroke: var(--up); }
.spot-down .stock { stroke: var(--down); }
.spot-up .end { fill: var(--up); color: var(--up); }
.spot-down .end { fill: var(--down); color: var(--down); }
.spot-up .stop-a { stop-color: rgba(108, 182, 255, 0.35); }
.spot-down .stop-a { stop-color: rgba(240, 163, 94, 0.32); }
.spot-chart .stop-b { stop-color: rgba(13, 17, 23, 0); }
.spot-chart .wig { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; }
.spot-chart .mark { fill: #0d1117; stroke: #e3c4f5; stroke-width: 2.5; cursor: help; }
.spot-chart .mark:hover { fill: #e3c4f5; }
.spot-chart .end { filter: drop-shadow(0 0 6px currentColor); }
.spot-chart .end-lbl { font: 600 16px var(--mono); }
.spot-up .stock-lbl { fill: var(--up); }
.spot-down .stock-lbl { fill: var(--down); }
.spot-chart .wig-lbl { fill: var(--muted); font-weight: 400; }
.sw-stock { border-top: 3px solid var(--up); }
.sw-wig { border-top: 2px dashed var(--muted); }
.dot-mark { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #e3c4f5; }

.why-bars { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.why-bars li { display: grid; grid-template-columns: 1fr; gap: 0.3rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.why-bars li:last-child { border-bottom: 0; }
.wb-label { font-weight: 600; }
.wb-track { position: relative; height: 10px; border-radius: 999px; background: var(--panel-2); }
.wb-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }
.wb-bar { position: absolute; top: 0; height: 100%; width: calc(var(--w) * 0.5%); }
.wb-bar.pos { left: 50%; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, rgba(108, 182, 255, 0.5), var(--up)); }
.wb-bar.neg { right: 50%; border-radius: 999px 0 0 999px; background: linear-gradient(270deg, rgba(240, 163, 94, 0.5), var(--down)); }
.wb-value { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; font-size: 0.95rem; }

.timeline { list-style: none; margin: 0.6rem 0 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.6rem; padding: 0.55rem 0; }
.timeline li::before { content: ""; position: absolute; left: -1.5rem; top: 0.9rem; width: 10px; height: 10px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--muted); }
.timeline li.tl-event::before { border-color: #e3c4f5; background: #3a2547; }
.timeline a { color: var(--text); }
.timeline .chip { margin-right: 0.3rem; }

.board { list-style: none; margin: 0.6rem 0; padding: 0; }
.board li { display: grid; grid-template-columns: 2.2rem minmax(0, 1.6fr) 120px minmax(0, 1.4fr); gap: 1rem; align-items: center;
  padding: 0.65rem 0.8rem; border-radius: 12px; border: 1px solid transparent; }
.board li + li { margin-top: 0.2rem; }
.board li:hover { background: var(--panel-2); }
.board li.is-pick { background: linear-gradient(90deg, rgba(108, 182, 255, 0.16), transparent); border-color: rgba(108, 182, 255, 0.35); }
.board-rank { display: inline-flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--panel-2); font-weight: 600; }
.board li:nth-child(1) .board-rank { background: linear-gradient(135deg, #f7d774, #c9962c); color: #0d1117; }
.board li:nth-child(2) .board-rank { background: linear-gradient(135deg, #e3e7ee, #9aa3af); color: #0d1117; }
.board li:nth-child(3) .board-rank { background: linear-gradient(135deg, #f0b98a, #a8693a); color: #0d1117; }
.board-name { display: flex; flex-direction: column; min-width: 0; }
.board-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spark-mini { width: 120px; height: 34px; display: block; }
.spark-mini polyline { fill: none; stroke-width: 2; }
.spark-mini.up polyline { stroke: var(--up); }
.spark-mini.down polyline { stroke: var(--down); }
.board-exp { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; align-items: center; }
.exp-track { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.exp-bar { display: block; height: 100%; width: calc(var(--w) * 1%); border-radius: 999px; background: var(--up); }
.exp-bar.down { background: var(--down); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 1.2rem; }
.kpi { display: flex; flex-direction: column; gap: 0.35rem; padding: 1rem 1.2rem; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); }
.kpi > span { color: var(--muted); font-size: 0.92rem; }
.kpi b { font-size: 1.9rem; font-weight: 600; }
.kpi small { color: var(--muted); }
.meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: calc(var(--w) * 1%); background: linear-gradient(90deg, var(--good), var(--up)); }
.weeks { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0.6rem 0 1rem; }
.weeks li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.8rem; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--line); border-top: 3px solid var(--muted); min-width: 6.5rem; font-size: 0.9rem; }
.weeks li.up { border-top-color: var(--up); }
.weeks li.down { border-top-color: var(--down); }
.weeks li small { color: var(--muted); }
.weeks li.empty { border-top-color: var(--line); }
details.weights { margin: 0.6rem 0; }
details.weights summary { cursor: pointer; color: var(--up); font-weight: 600; margin-bottom: 0.6rem; }

.split.halves { grid-template-columns: 1fr 1fr; }
.chart.lines .tick { font-size: 15px; }
@media (max-width: 900px) { .split.halves { grid-template-columns: 1fr; } }
/* the charts are drawn 900-960 units wide; on a phone that is a third of real size */
@media (max-width: 640px) {
  .spot-chart .tick, .chart.lines .tick { font-size: 34px; }
  .spot-chart .end-lbl { font-size: 34px; }
  .spot-chart .wig-lbl { display: none; }
  .spot-chart .stock { stroke-width: 5; }
  .spot-chart .wig { stroke-width: 3.5; }
  .spot-chart .mark { r: 10px; stroke-width: 4; }
  .spot-chart .end { r: 11px; }
}

/* motion: sections rise in, the price line draws itself; nothing moves if the reader asks */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.reveal { animation: rise 0.6s ease-out both; }
.spot-chart .draw { stroke-dasharray: 1; animation: draw 1.6s ease-out 0.2s both; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .spot-chart .draw { animation: none; }
}
@media (max-width: 900px) {
  .spot { grid-template-columns: 1fr; padding: 1.6rem 1.2rem; }
  .kpis { grid-template-columns: 1fr; }
  .board li { grid-template-columns: 2.2rem minmax(0, 1fr) auto; }
  .board-spark { display: none; }
  .board-exp { grid-column: 2 / 4; }
}
@media (max-width: 480px) {
  .spot-stats { grid-template-columns: 1fr; }
}

/* Event page: the chart beside its five figures, both columns the same height */
.split.even { align-items: stretch; }
.event-stats { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 1.2rem;
  align-items: stretch; margin: 1.2rem 0 1.6rem; }
.event-stats .chart-panel { margin: 0; display: flex; flex-direction: column; }
.event-stats .chart-panel .chart { margin-top: auto; max-height: 340px; }
.tile-stack { display: grid; grid-template-rows: repeat(5, 1fr); gap: 0.7rem; }
.tile-stack .tile { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  align-items: center; gap: 0.1rem 0.8rem; padding: 0.75rem 1rem; }
.tile-stack .tile > span { grid-column: 1; font-size: 0.88rem; }
.tile-stack .tile > b { grid-column: 2; grid-row: 1 / span 2; font-size: 1.5rem; }
.tile-stack .tile > small { grid-column: 1; font-size: 0.8rem; }
@media (max-width: 1000px) {
  .event-stats { grid-template-columns: 1fr; }
  .tile-stack { grid-template-rows: none; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .tile-stack { grid-template-columns: 1fr; }
}
/* side-by-side panels are not stacked: no top gap between them */
.split > .panel + .panel, .tiles > .panel + .panel { margin-top: 0; }
.split + .panel { margin-top: 1.6rem; }
.split.halves { align-items: stretch; }

/* Today: one list, newest first; each report carries its type (and, for price-sensitive
   types, the verdict on what reports of that type did before). */
.pick-card + .stream { margin-top: 1.2rem; }
.stream-list { list-style: none; margin: 0; padding: 0; }
.stream-list li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.8rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.stream-list li[hidden] { display: none; }
.stream-list time small { display: block; font-size: 0.75rem; }
.s-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.35rem; }
.s-head .verdict { margin: 0; }
.s-title { margin: 0 0 0.15rem; line-height: 1.45; }
.s-title a { color: var(--text); }
.s-title .tick-sym { font-size: 0.95rem; margin-right: 0.35rem; }
.s-main { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .stream-list li { grid-template-columns: 1fr; gap: 0.3rem; }
  .stream-list time { display: flex; gap: 0.5rem; align-items: baseline; }
  .stream-list time small { display: inline; }
}

/* ------------------------------------------------------------------ analysis pages */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.more { position: relative; }
.more summary { list-style: none; cursor: pointer; color: var(--muted); padding: 0.45rem 0.9rem; border-radius: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: " \25BE"; font-size: 0.8em; }
.more summary[aria-current="page"], .more[open] summary { color: var(--text); background: var(--panel-2); }
.more-menu { position: absolute; z-index: 20; top: calc(100% + 0.3rem); left: 0; min-width: 11rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.3rem; display: flex; flex-direction: column; }
.more-menu a { padding: 0.45rem 0.8rem; }
.jump input { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0.4rem 0.7rem; font: inherit; font-size: 0.9rem; width: 11rem; }
.jump input:focus { border-color: var(--up); outline: none; }

.idx-tiles { grid-template-columns: repeat(5, 1fr); }
.idx-tiles .tile b { font-size: 1.5rem; }
.idx-day { font-size: 0.95rem; font-weight: 600; margin-left: 0.3rem; }
.idx-more { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; }
.idx-more > span { white-space: nowrap; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.market-split { grid-template-columns: 2fr 1fr; }
.split.halves { grid-template-columns: 1fr 1fr; margin-top: 1.2rem; }
#stock-events li { grid-template-columns: 6.2rem 1fr; }
#stock-events time { white-space: nowrap; }
.side-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.side-stack .card { margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.report-card { display: flex; flex-direction: column; gap: 0.4rem; color: var(--text); }
.report-counts b { font-size: 1.4rem; }
.kv-tight { grid-template-columns: minmax(9rem, auto) 1fr; gap: 0.4rem 1rem; margin: 0.4rem 0 0.6rem; }
.kv-tight dd { margin: 0; }

.lw-host { position: relative; width: 100%; min-height: 360px; }
.market-chart { height: 420px; }
.stock-chart .chart-host { height: 560px; }
.stock-chart .chart-short { height: 380px; min-height: 300px; }
.lw-host[aria-busy="true"]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--panel-2), transparent); opacity: 0.6; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
@media (prefers-reduced-motion: reduce) { .lw-host[aria-busy="true"]::before { animation: none; } }
.chart-key { margin: 0.6rem 0 0; }
.key { display: inline-block; width: 14px; height: 3px; vertical-align: middle; border-radius: 2px; }
.key-wig { background: var(--accent); }
.key-stress { background: var(--down); height: 8px; }
.key-breadth { background: var(--amber); }
.chart-controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: flex-start; margin-bottom: 0.8rem; }
.chart-controls[hidden] { display: none; }
.chart-opts { flex: 1 1 100%; }
.chart-opts summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.chart-opts[open] summary { margin-bottom: 0.5rem; }
.chart-opts .checks + .checks { margin-top: 0.4rem; }
.seg-btns { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btns button { background: transparent; color: var(--muted); border: 0; padding: 0.35rem 0.7rem; font: 600 0.85rem var(--mono); cursor: pointer; }
.seg-btns button + button { border-left: 1px solid var(--line); }
.seg-btns button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: center; }
.checks legend { float: left; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.6rem; }
.check { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.check input { accent-color: var(--up); }
.sw-violet { border-color: var(--violet); }
.sw-amber { border-color: var(--amber); }
.sw-accent { border-color: var(--accent); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; min-height: 1.6rem; color: var(--muted); margin-bottom: 0.4rem; }
.chart-legend b { color: var(--text); font-weight: 600; }
.chart-legend b.up { color: var(--up); }
.chart-legend b.down { color: var(--down); }
.legend-ev { flex-basis: 100%; color: var(--text); }
.chip-mini { font-size: 0.72rem; padding: 0.05rem 0.45rem; }
.chip-insider_tx { background: var(--chip-insider); color: #a9d1ff; }
.chip-holder_threshold { background: var(--chip-holdings); color: #e3c4f5; }
.chip-inside_info { background: var(--chip-inside); color: #f7c999; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 0.3rem 0 0.5rem; vertical-align: middle; }
.dot-insider { background: var(--up); }
.dot-sell { background: var(--down); }
.dot-holder { background: var(--accent); }
.dot-inside { background: var(--violet); }

.stock-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stock-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.8rem; }
.tick-sym.big { font-size: clamp(1.4rem, 3vw, 2.2rem); padding: 0.1rem 0.6rem; }
.stock-name { font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 600; color: var(--muted); }
.head-stats { display: flex; flex-wrap: wrap; gap: 0.8rem 2rem; margin: 0; }
.head-stats div { display: flex; flex-direction: column; }
.head-stats dt { color: var(--muted); font-size: 0.82rem; }
.head-stats dd { margin: 0; font-size: 1.15rem; font-weight: 600; }
.head-stats dd.big { font-size: 1.6rem; }
.stock-chart { margin-bottom: 1.2rem; }

.movers { list-style: none; margin: 0; padding: 0; }
.movers li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.6rem; align-items: baseline; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.movers li:first-child { border-top: 0; }
.mv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.88rem; }
.movers-grid { margin: 1.6rem 0 0.4rem; }
.movers-grid .panel { min-width: 0; }
.preset-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.preset-links .btn { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
.presets { margin-top: 1.6rem; }

.scr-filters { display: flex; flex-wrap: wrap; gap: 0.8rem 1rem; align-items: flex-end; margin-bottom: 0.6rem; }
.scr-filters label:not(.check) { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.scr-filters .grow { flex: 1; min-width: 12rem; }
.scr-filters select, .scr-filters input[type="search"] { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0.45rem 0.6rem; font: inherit; font-size: 0.92rem; text-transform: none; letter-spacing: 0; }
.groups { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; flex-basis: 100%; }
.groups legend { float: left; margin-right: 0.6rem; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.scr-table { font-size: 0.9rem; }
.scr-table th { position: sticky; top: 0; background: var(--panel); white-space: nowrap; }
.scr-table th button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.scr-table th[aria-sort="ascending"] button, .scr-table th[aria-sort="descending"] button { color: var(--text); }
.scr-table td.sym { white-space: nowrap; }
.scr-table td.sym small { display: block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.scr-table tbody tr:hover { background: var(--panel-2); }

@media (max-width: 1100px) {
  .idx-tiles { grid-template-columns: repeat(3, 1fr); }
  .split.halves { grid-template-columns: 1fr; }
  .market-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tiles.three { grid-template-columns: 1fr; }
  .jump { order: 5; flex-basis: 100%; }
  .jump input { width: 100%; }
  .stock-chart .chart-host { height: 460px; }
  .market-chart { height: 340px; }
}
@media (max-width: 640px) {
  .idx-tiles { grid-template-columns: repeat(2, 1fr); }
  .idx-tiles .tile b { font-size: 1.2rem; }
  .chart-controls { gap: 0.5rem; }
  .checks { gap: 0.3rem 0.7rem; }
  .checks legend { float: none; width: 100%; margin: 0; }
  .stock-chart .chart-host { height: 400px; }
  .head-stats { gap: 0.6rem 1.2rem; }
  .more-menu { right: 0; left: auto; }
}

.setups-hero { margin: 2.4rem 0 1.2rem; }
.setups-hero h2 { font-size: 1.5rem; margin: 0; }
.scr-setup { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.9rem; margin: 0 0 0.6rem; }
.side-stack .kv-tight { grid-template-columns: 1fr auto; }
.side-stack .kv-tight dd { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------------ sectors and risk */
.sectors { margin-top: 1.6rem; }
.sectors-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 1.4rem; align-items: start; }
.rrg-fig { margin: 0; }
.rrg { width: 100%; height: auto; display: block; font-family: var(--sans); }
.rrg .q-leading { fill: rgba(108, 182, 255, 0.08); }
.rrg .q-weakening { fill: rgba(229, 192, 123, 0.07); }
.rrg .q-lagging { fill: rgba(240, 163, 94, 0.08); }
.rrg .q-improving { fill: rgba(196, 167, 245, 0.07); }
.rrg .axis { stroke: var(--line); stroke-width: 1; }
.rrg .qt { fill: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.rrg .ax { fill: var(--muted); font-size: 12px; }
.rrg .lbl { fill: var(--text); font-size: 12px; }
.rrg .tail { fill: none; stroke-width: 1.2; opacity: 0.45; }
.rrg .tail-leading, .rrg .dot-leading { stroke: var(--up); fill: var(--up); }
.rrg .tail-weakening, .rrg .dot-weakening { stroke: var(--amber); fill: var(--amber); }
.rrg .tail-lagging, .rrg .dot-lagging { stroke: var(--down); fill: var(--down); }
.rrg .tail-improving, .rrg .dot-improving { stroke: var(--violet); fill: var(--violet); }
.rrg polyline.tail { fill: none; }
.sector-table { font-size: 0.9rem; }
.sector-note { margin: 0 0 0.4rem; }
.sector-table th, .sector-table td { white-space: nowrap; }
.phase { font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.phase-leading { background: rgba(108, 182, 255, 0.15); color: var(--up); }
.phase-weakening { background: rgba(229, 192, 123, 0.15); color: var(--amber); }
.phase-lagging { background: rgba(240, 163, 94, 0.15); color: var(--down); }
.phase-improving { background: rgba(196, 167, 245, 0.15); color: var(--violet); }
.risk-panel { margin-bottom: 1.2rem; }
.risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.risk-grid .kv-tight { grid-template-columns: minmax(10rem, auto) 1fr; }
@media (max-width: 1000px) {
  .sectors-split, .risk-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .risk-grid .kv-tight { grid-template-columns: 1fr; gap: 0.15rem; }
  .risk-grid .kv-tight dd { margin-bottom: 0.6rem; }
}

/* ------------------------------------------------------------------ valuation */
.valuation-panel { margin-bottom: 1.2rem; }
.valuation-panel h3 { font-size: 1rem; margin: 0.2rem 0 0.5rem; }
.val-table { width: 100%; font-size: 0.92rem; }
.val-table td { padding: 0.35rem 0.4rem; }
.val-score td { border-top: 1px solid var(--line); }
.pbar { display: inline-block; width: 6rem; height: 6px; background: var(--panel-2); border-radius: 3px; vertical-align: middle; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--up); }
.big-num { font-size: 1.6rem; font-weight: 700; }
.ftests { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 1rem; font-size: 0.88rem; }
.ftests .ok span { color: var(--up); }
.ftests .no span { color: var(--down); }
.ftests .na { color: var(--muted); }
@media (max-width: 640px) { .ftests { grid-template-columns: 1fr; } .pbar { width: 3.5rem; } }

/* ------------------------------------------------------------------ report list pages */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 1rem 0 0.4rem; }
.pager[hidden] { display: none; }
.pager button { font: inherit; font-size: 0.9rem; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.7rem; cursor: pointer; min-width: 2.4rem; }
.pager button:hover:not(:disabled) { border-color: var(--muted); }
.pager button:disabled { color: var(--muted); opacity: 0.5; cursor: default; }
.pager button[aria-current="page"] { background: var(--panel-2); border-color: var(--up); font-weight: 600; }
.pager .pages { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.pager .gap { color: var(--muted); padding: 0 0.2rem; }
.pager .range { margin-left: auto; }
@media (max-width: 640px) { .pager .range { margin-left: 0; flex-basis: 100%; } .pager .lbl { display: none; } }

/* ------------------------------------------------------------------ stock icons */
/* logos/: XTB's tiles or the company's own icon on the same light tile; a monogram without one */
.tlogo { display: inline-grid; place-items: center; flex: none; width: 1.4rem; height: 1.4rem; border-radius: 6px;
  background: #f6f7f8; object-fit: contain; vertical-align: middle; margin-right: 0.4rem; }
.tlogo-png { padding: 2px; box-sizing: border-box; }
.tmono { font: 700 0.62rem/1 var(--mono); color: #fff; letter-spacing: -0.02em;
  background: linear-gradient(135deg, hsl(var(--h) 55% 46%), hsl(calc(var(--h) + 40) 60% 32%)); }
.tlogo-l { width: 2.6rem; height: 2.6rem; border-radius: 10px; margin-right: 0.2rem; align-self: center; }
.tlogo-l.tlogo-png { padding: 4px; }
.tmono.tlogo-l { font-size: 1.05rem; }
.sym-link { display: inline-flex; align-items: center; text-decoration: none; }
.stock-head h1 { align-items: center; }
.board-name { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.1rem; align-items: center; }
.board-name .tlogo { grid-row: span 2; }
.scr-table td.sym small { padding-left: 1.8rem; }
.s-title .sym-link .tick-sym { margin-right: 0.35rem; }

/* ------------------------------------------------------------------ term definitions */
/* a technical term reads as plain text; hovering underlines it and shows its definition */
.term { cursor: help; text-decoration: none; border-radius: 3px; }
.term:hover, .term:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; outline: none; }
.term-tip { position: absolute; z-index: 60; max-width: min(18rem, calc(100vw - 16px)); padding: 0.55rem 0.75rem;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45); font: 400 0.86rem/1.45 var(--sans); text-transform: none;
  letter-spacing: normal; text-align: left; white-space: normal; pointer-events: none; }

/* ------------------------------------------------------------------ header search */
.jump { position: relative; }
.jump-list { position: absolute; z-index: 55; top: calc(100% + 6px); left: 0; min-width: 20rem; max-width: calc(100vw - 2rem);
  margin: 0; padding: 0.3rem; list-style: none; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
.jump-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 7px; cursor: pointer; font-size: 0.9rem; }
.jump-list li .tlogo { margin-right: 0; }
.jump-list li span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.jump-list li[aria-selected="true"], .jump-list li:hover { background: var(--line); }
.jump-list li.none { cursor: default; }
.jump-list li.none:hover { background: none; }
.jump-list li.all { color: var(--up); border-top: 1px solid var(--line); margin-top: 0.2rem; border-radius: 0 0 7px 7px; }
.jump-list .tmono { --h: 210; }
@media (max-width: 640px) { .jump-list { min-width: 100%; } }

/* ------------------------------------------------------------------ home pitch */
.pitch { margin: 0.4rem 0 2rem; }
.pitch h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.8rem; max-width: 22ch; }
.pitch-sub { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 44rem; margin: 0 0 1.4rem; }
.pitch-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.6rem; }
.pitch-cta .cta-n { margin-left: 0.45rem; padding: 0 0.4rem; border-radius: 6px; background: var(--panel-2); font-size: 0.85rem; }
.pitch-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 2.4rem; }
.pitch-facts li { display: flex; flex-direction: column; }
.pitch-facts b { font-size: 1.6rem; font-weight: 600; }
.pitch-facts span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 640px) {
  .pitch-cta .btn { flex: 1 1 100%; justify-content: center; }
  .pitch-facts { gap: 0.6rem 1.6rem; }
  .pitch-facts b { font-size: 1.3rem; }
}

/* ------------------------------------------------------------------ how it works */
.how-toc { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 1.2rem; }
.how h2 { margin-top: 0; }
.how-item { padding: 0.6rem 0 0.4rem; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.how-item:first-of-type { border-top: 0; }
.how-item h3 { font-size: 1.02rem; margin: 0.3rem 0 0.4rem; }
.how-item p { margin: 0 0 0.6rem; max-width: 46rem; color: var(--muted); }
.how-item:target h3, .glossary dt:target { color: var(--up); }
.how-link { white-space: nowrap; }

/* ------------------------------------------------------------------ at a glance */
.glance { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.glance li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem 0.75rem; display: flex; flex-direction: column; min-width: 8.5rem; }
.glance li span { color: var(--muted); font-size: 0.8rem; }
.glance li b { font-size: 1rem; font-weight: 600; }
@media (max-width: 640px) { .glance li { flex: 1 1 calc(50% - 0.5rem); min-width: 0; } }

/* ------------------------------------------------------------------ alignment fixes */
/* a tile's figure sits at the bottom, so labels of one or two lines keep figures level */
.tile > b { margin-top: auto; }
/* a mover's figure and its second figure share the right-hand cell */
.movers li { align-items: center; }
.mv-val { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.25; }
.mv-val small { font-size: 0.78rem; }
/* sector rotation: phase changes under the chart */
.phase-changes { list-style: none; margin: 0; padding: 0; }
.phase-changes li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.4rem 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.phase-changes li:first-child { border-top: 0; }
.phase-changes .arrow { color: var(--muted); }
.phase-box { margin-top: 1.2rem; }
.phase-box h3 { font-size: 1rem; margin: 0 0 0.3rem; }

/* corporate calendar and shareholders (calendar.html, owners.html, stock panels) */
.cal-day + .cal-day { margin-top: 1.1rem; }
.cal-day h3 { font-size: 0.95rem; color: var(--muted); font-weight: 600; margin: 0 0 0.3rem; text-transform: capitalize; }
.cal-day[hidden], .cal-list li[hidden] { display: none; }
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.cal-list li:first-child { border-top: 0; }
.cal-what { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.cal-chip { min-width: 7.5rem; text-align: center; }
.cal-ex, .cal-pay { background: var(--good-bg); color: var(--good); }
.cal-results { background: var(--chip-insider); color: #a9d1ff; }
.cal-zwz, .cal-nwz, .cal-wz { background: var(--chip-holdings); color: #e3c4f5; }
.big-claim { font-size: 1.15rem; margin: 0 0 0.6rem; }
.big-claim b { font-family: var(--mono); font-size: 1.5rem; }
.owners-table td { vertical-align: middle; }
.owners-table .ext { white-space: nowrap; }
.older-holders summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; }
.owners-table tr.stale td { color: var(--muted); }
.holder-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.9rem; }
.holder-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; min-width: 0; }
.holder-name { margin: 0 0 0.5rem; }
.holder-stakes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; }
.stake-chip { display: inline-flex; gap: 0.3rem; align-items: baseline; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 0.85rem; }
.stake-chip:hover { border-color: var(--up); text-decoration: none; }
@media (max-width: 640px) {
  .cal-chip { min-width: 0; }
  .holder-grid { grid-template-columns: 1fr; }
}
