/* 0AMV Lab — editorial finance, paper + ink + one blue accent. */
:root {
  --paper: #f4f2ec;
  --paper-2: #eeece5;
  --card: #fffefa;
  --ink: #14171c;
  --ink-2: #3d434c;
  --muted: #7a7f87;
  --faint: #a5a8ad;
  --line: #e2ded3;
  --line-soft: #eeeae1;
  --accent: #3157d5;
  --accent-2: #2446b8;
  --accent-soft: #edf0fc;
  --up: #d94b3b;
  --up-soft: #fbeeeb;
  --down: #118a63;
  --down-soft: #eaf6f1;
  --gold: #a97824;
  --gold-soft: #f7f0df;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 23, 28, .035), 0 12px 34px rgba(20, 23, 28, .045);
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --serif: Georgia, "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(49, 87, 213, .16); }

.ambient {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(49, 87, 213, .07), transparent 65%),
    radial-gradient(700px 360px at 92% 2%, rgba(169, 120, 36, .055), transparent 70%);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 242, 236, .82);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid rgba(226, 222, 211, .8);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
  height: 66px; display: flex; align-items: center; gap: 30px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { width: 32px; height: 32px; color: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-type {
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  letter-spacing: .01em; line-height: 1;
}
.brand-type span {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-left: 7px; vertical-align: 2px;
}
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative; padding: 8px 13px; border-radius: 9px;
  color: var(--muted); font-size: 13.5px; font-weight: 500;
  transition: color .18s ease, background .18s ease;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.nav a.on { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(20,23,28,.06); }
.nav a.on::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px;
  height: 2px; border-radius: 2px; background: var(--accent);
}
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.freshness {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.freshness i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--down);
  box-shadow: 0 0 0 3px rgba(17, 138, 99, .12);
}

/* ---------- layout ---------- */
.view { max-width: 1280px; margin: 0 auto; padding: 34px 28px 72px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 24px; flex-wrap: wrap;
}
.kicker {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 8px; margin-bottom: 7px;
}
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.page-title {
  font-family: var(--serif); font-size: 32px; font-weight: 700;
  letter-spacing: -.01em; line-height: 1.25;
}
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 680px; }
.page-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.pad { padding: 22px 24px; }
.section { margin-top: 20px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 11px; flex-wrap: wrap;
}
.section-title { font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: center; gap: 9px; }
.section-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.section-note { color: var(--muted); font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: 1.45fr .85fr; gap: 18px; align-items: stretch; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(620px 320px at 85% 10%, rgba(49, 87, 213, .32), transparent 62%),
    radial-gradient(440px 260px at 12% 110%, rgba(169, 120, 36, .16), transparent 70%),
    #11141a;
  color: #f6f5ef; border-radius: 22px;
  padding: 30px 34px 28px; box-shadow: 0 24px 60px -28px rgba(17, 20, 26, .55);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; position: relative; }
.hero-label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: rgba(246,245,239,.62); letter-spacing: .04em; }
.hero-label .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  padding: 3px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  color: rgba(246,245,239,.78); background: rgba(255,255,255,.06);
}
.hero-value {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-top: 9px; position: relative;
}
.hero-value strong {
  font-family: var(--mono); font-size: clamp(38px, 5vw, 54px); font-weight: 500;
  letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.hero-value .delta {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  padding: 4px 9px; border-radius: 8px; letter-spacing: -.01em;
}
.delta.up { color: #ff9e8e; background: rgba(217, 75, 59, .18); }
.delta.down { color: #6fe0b4; background: rgba(17, 138, 99, .18); }
.hero-date { color: rgba(246,245,239,.5); font-family: var(--mono); font-size: 11.5px; margin-top: 7px; position: relative; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: rgba(246,245,239,.9);
}
.hero-pill.buy { background: rgba(217, 75, 59, .18); border-color: rgba(255, 158, 142, .3); color: #ffb4a8; }
.hero-pill.sell { background: rgba(17, 138, 99, .18); border-color: rgba(111, 224, 180, .3); color: #7be4bd; }
.hero-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.spark { width: 300px; height: 62px; margin-top: 6px; }
.hero-foot {
  position: relative; display: flex; gap: 30px; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.11); margin-top: 24px; padding-top: 17px;
}
.hero-foot div { min-width: 92px; }
.hero-foot dt { color: rgba(246,245,239,.45); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; }
.hero-foot dd { font-family: var(--mono); font-size: 14px; margin-top: 2px; color: rgba(246,245,239,.92); }
.hero-foot dd small { font-family: var(--sans); color: rgba(246,245,239,.48); font-size: 11px; margin-left: 4px; }

/* ---------- metrics ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.metric-grid.four { grid-template-columns: repeat(4, 1fr); }
.metric-grid.three { grid-template-columns: repeat(3, 1fr); }
.metric {
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  padding: 15px 16px 14px; box-shadow: 0 1px 2px rgba(20,23,28,.03);
  position: relative; overflow: hidden;
}
.metric::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); opacity: .7;
}
.metric.alt::after { background: var(--gold); }
.metric-label { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.metric-value {
  font-family: var(--mono); font-size: 22px; font-weight: 500;
  letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums;
}
.metric-value.pos { color: var(--up); }
.metric-value.neg { color: var(--down); }
.metric-sub { color: var(--faint); font-size: 11px; margin-top: 4px; }
.metric-sub b { color: var(--muted); font-weight: 500; }

/* ---------- signal panel ---------- */
.signal-card { padding: 22px 24px; }
.signal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.signal-action { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 600;
  font-family: var(--mono); letter-spacing: .04em;
}
.badge.buy { color: var(--up); background: var(--up-soft); }
.badge.sell { color: var(--down); background: var(--down-soft); }
.badge.hold { color: var(--gold); background: var(--gold-soft); }
.badge.flat { color: var(--muted); background: var(--paper-2); }
.signal-close { font-family: var(--mono); font-size: 26px; letter-spacing: -.03em; }
.checks { margin-top: 17px; display: grid; gap: 8px; }
.check {
  display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center;
  padding: 9px 11px; border-radius: 10px; background: #faf9f4; border: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.check .ico {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; background: var(--paper-2); color: var(--faint);
}
.check.ok .ico { background: var(--up-soft); color: var(--up); }
.check.no .ico { background: var(--paper-2); color: var(--faint); }
.check em { font-style: normal; color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.signal-foot { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.signal-foot b { color: var(--ink-2); font-weight: 600; }

/* ---------- toolbar / tabs ---------- */
.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 13px; border-bottom: 1px solid var(--line-soft);
}
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--paper-2); border-radius: 10px; }
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500;
  transition: .16s ease;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,23,28,.08); }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 8px; padding: 4px 9px; font-size: 12px; transition: .16s ease;
}
.chip:hover { color: var(--ink); border-color: #cbc5b7; }
.chip.on { color: var(--ink); background: #fff; border-color: #d5d0c3; box-shadow: 0 1px 2px rgba(20,23,28,.05); }
.glabel { color: var(--faint); font-size: 11px; letter-spacing: .03em; margin-right: 2px; }
.switch { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; user-select: none; cursor: pointer; }
.switch input { display: none; }
.switch b {
  width: 30px; height: 17px; border-radius: 999px; background: #d9d4c7; position: relative;
  transition: background .18s ease; flex: none;
}
.switch b::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18);
  transition: transform .18s ease;
}
.switch input:checked + b { background: var(--accent); }
.switch input:checked + b::after { transform: translateX(13px); }

/* paper account ETF picker */
.etf-picks { display: grid; gap: 6px; }
.etf-pick {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  cursor: pointer; transition: .16s ease;
}
.etf-pick:hover { border-color: #cbc5b7; }
.etf-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.etf-pick input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); flex: none; }
.etf-pick span { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.etf-pick b { font-weight: 550; font-size: 12.5px; color: var(--ink); }
.etf-pick i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.control-label .etf-label { color: var(--ink-2); font-family: var(--sans); font-size: 12px; }
.etf-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; padding: 1px 6px; margin-left: 5px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
}
.control-label .etf-actions { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 11px; }
.etf-actions-sep { width: 1px; height: 9px; background: var(--line); }
.link-btn {
  border: 0; background: none; padding: 0; margin: 0; font: inherit;
  color: var(--muted); font-size: 11px; cursor: pointer; transition: color .15s ease;
}
.link-btn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: 690px; }
.chart.compact { height: 450px; }
.chart.medium { height: 500px; }
.chart-empty {
  height: 430px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 30px; gap: 8px;
}
.chart-empty .glyph {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 6px;
}
.chart-empty h3 { font-size: 16px; font-weight: 600; }
.chart-empty p { color: var(--muted); font-size: 13px; max-width: 470px; }
.chart-empty code { font-family: var(--mono); font-size: 12px; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.legend-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 11.5px;
}
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 9px; height: 9px; border-radius: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; max-height: 520px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  position: sticky; top: 0; z-index: 2; background: var(--card);
  text-align: right; color: var(--faint); font-weight: 500; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase; padding: 11px 14px 9px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data th:first-child, table.data td:first-child { text-align: left; padding-left: 20px; }
table.data th:last-child, table.data td:last-child { padding-right: 20px; }
table.data td {
  text-align: right; padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.data td:first-child { font-family: var(--sans); color: var(--ink-2); }
table.data tbody tr:hover td { background: #fbfaf5; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.pos, table.data .pos { color: var(--up); }
table.data td.neg, table.data .neg { color: var(--down); }
table.data td.dim { color: var(--muted); }
.yearbar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; width: 100%; }
.yearbar .track { display: block; width: 74px; height: 5px; border-radius: 999px; background: var(--paper-2); overflow: hidden; flex: none; }
.yearbar .fill { display: block; height: 100%; border-radius: 999px; background: var(--up); }
.yearbar .fill.neg { background: var(--down); }
.yearbar .val { width: 62px; text-align: right; }
.trade-reason { color: var(--muted); font-family: var(--sans); font-size: 12px; }
.table-foot { padding: 10px 20px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- backtest ---------- */
.bt-layout { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 18px; align-items: start; }
.bt-controls { position: sticky; top: 84px; padding: 20px; }
.control-group { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.control-group:first-child { padding-top: 0; }
.control-group:last-of-type { border-bottom: 0; }
.control-label { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.control-label span { color: var(--faint); font-family: var(--mono); font-size: 10.5px; }
.control-hint { color: var(--faint); font-size: 11px; margin-top: 5px; line-height: 1.5; }
.input, .select {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, .select:focus { border-color: #aeb9e8; box-shadow: 0 0 0 3px rgba(49, 87, 213, .09); }
.input-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.input-row.dates { grid-template-columns: 1fr; gap: 6px; }
.input-row.dates .input { min-width: 0; padding: 8px 9px; font-family: var(--mono); font-size: 12px; }
.inline-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 500;
  transition: .16s ease;
}
.btn:hover { border-color: #cbc5b7; background: #fbfaf5; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #282d36; }
.btn.block { width: 100%; padding: 9px 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.bt-status { min-height: 17px; margin-top: 7px; color: var(--muted); font-size: 11.5px; font-family: var(--mono); }
.bt-info-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 6px 28px; padding: 6px 22px 18px;
}
.bt-info-title { color: var(--muted); font-size: 11px; font-weight: 600; margin: 4px 0 2px; }
.bt-info-grid .kv td { padding: 6px 0; }
.bt-results { min-width: 0; }
.bt-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.bt-headline {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 18px 22px 16px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap;
}
.bt-headline .big { font-family: var(--mono); font-size: 30px; letter-spacing: -.04em; line-height: 1.1; }
.bt-headline .big.pos { color: var(--up); }
.bt-headline .big.neg { color: var(--down); }
.bt-headline .small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.bt-headline .range { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; }
.bt-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px;
  border-radius: 6px; background: var(--paper-2); color: var(--muted); font-size: 11px;
}
.tag.blue { background: var(--accent-soft); color: var(--accent-2); }

/* ---------- data page ---------- */
.data-block { padding: 20px 24px; }
.data-block h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 10px; }
.data-block p { color: var(--muted); font-size: 12.5px; }
.kv { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.kv td { padding: 8px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.kv tr:last-child td { border-bottom: 0; }
.kv td:first-child { color: var(--muted); width: 34%; padding-right: 14px; }
.kv td:last-child { font-family: var(--mono); color: var(--ink-2); font-size: 12px; }
.kv td:last-child.sans { font-family: var(--sans); }
.kv td.ok { color: var(--down); }
.kv td.warn { color: var(--gold); }
pre.code {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75;
  background: #14171c; color: #d8d9d4; border-radius: 12px;
  padding: 15px 17px; overflow: auto; margin-top: 10px;
}
pre.code .c { color: #7f8894; }
pre.code .k { color: #9db4ff; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.status-line .ok { color: var(--down); }
.status-line .warn { color: var(--gold); }

/* ---------- misc ---------- */
.empty-note { color: var(--muted); padding: 22px; text-align: center; font-size: 12.5px; }
.mini-list { display: grid; gap: 0; }
.mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.mini-row:last-child { border-bottom: 0; }
.mini-row .date { font-family: var(--mono); font-size: 11.5px; color: var(--muted); width: 84px; flex: none; }
.mini-row .what { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mini-row .what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.mini-row .px { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.footer { border-top: 1px solid var(--line); background: rgba(238, 236, 229, .55); }
.footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 22px 28px 28px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  color: var(--faint); font-size: 11.5px;
}
.footer b { color: var(--muted); font-weight: 600; }
.noscript { margin: 40px auto; max-width: 600px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: center; }

.fade-up { animation: fadeUp .42s cubic-bezier(.2,.7,.3,1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .bt-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .topbar-inner { padding: 0 16px; height: 60px; gap: 14px; }
  .brand-type span { display: none; }
  .nav { gap: 0; overflow-x: auto; }
  .nav a { padding: 7px 10px; white-space: nowrap; }
  .freshness span { display: none; }
  .view { padding: 22px 16px 52px; }
  .page-title { font-size: 26px; }
  .hero { padding: 24px 20px; }
  .hero-value strong { font-size: 38px; }
  .spark { width: 100%; }
  .hero-side { align-items: flex-start; }
  .hero-top { flex-direction: column; }
  .metric-grid, .metric-grid.four, .metric-grid.three { grid-template-columns: repeat(2, 1fr); }
  .bt-layout { grid-template-columns: 1fr; }
  .bt-controls { position: static; }
  .bt-kpis { grid-template-columns: 1fr 1fr; }
  .chart { height: 560px; }
  .grid-3 { grid-template-columns: 1fr; }
  .bt-info-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 20px 16px; }
  .toolbar { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
