/* The progress page. Same paper-and-green palette as the site and account page; the two chart
   series colours (green = latest, brass = first / average) were checked with the dataviz palette
   validator in both modes (lightness band, chroma, colour-blind separation, contrast). */
:root {
  --bg: #f6f3ec; --surface: #fffdf8; --surface-2: #faf7f0; --text: #1b1c1a; --muted: #5f5d57; --faint: #8b887f;
  --accent: #2f5d50; --accent-soft: #e3ece7; --line: #dcd8ce; --grid: #ebe7de;
  --s1: #0f7a5a; --s2: #b07a22; --s1-wash: rgba(15, 122, 90, 0.10);
  --good: #1f6b4f; --bad: #a3402f;
  --heat-0: #ece8df; --heat-1: #b9d6c8; --heat-2: #5fa486; --heat-3: #0f7a5a;
  --shadow: 0 1px 2px rgba(30, 28, 20, 0.05), 0 18px 40px -22px rgba(30, 28, 20, 0.28);
  --shadow-hover: 0 1px 2px rgba(30, 28, 20, 0.06), 0 26px 50px -24px rgba(30, 28, 20, 0.36);
  --glow: radial-gradient(1200px 520px at 15% -10%, rgba(47, 93, 80, 0.10), transparent 60%),
          radial-gradient(900px 420px at 100% 0%, rgba(176, 122, 34, 0.08), transparent 55%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121311; --surface: #1b1d1a; --surface-2: #20221f; --text: #ecebe6; --muted: #a8a69e; --faint: #7d7b74;
    --accent: #8cc4b2; --accent-soft: #24302b; --line: #2f312c; --grid: #262824;
    --s1: #2fa27a; --s2: #bb8226; --s1-wash: rgba(47, 162, 122, 0.12);
    --good: #7fcaa8; --bad: #f0a091;
    --heat-0: #262824; --heat-1: #24493b; --heat-2: #2b7a5c; --heat-3: #3fb98b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 22px 48px -24px rgba(0, 0, 0, 0.75);
    --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.4), 0 30px 60px -26px rgba(0, 0, 0, 0.9);
    --glow: radial-gradient(1200px 520px at 15% -10%, rgba(140, 196, 178, 0.08), transparent 60%),
            radial-gradient(900px 420px at 100% 0%, rgba(187, 130, 38, 0.07), transparent 55%);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--glow), var(--bg); background-attachment: fixed;
  color: var(--text); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
a { color: var(--accent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
header.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.wordmark { font-weight: 600; letter-spacing: 0.02em; color: var(--text); text-decoration: none; }
.wordmark span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 1.2rem; font-size: 0.92rem; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--text); }
.btn-quiet { white-space: nowrap; border: 1px solid var(--line); padding: 0.45rem 0.9rem; border-radius: 999px; color: var(--text) !important; background: var(--surface); }
.btn-quiet:hover { border-color: var(--accent); }

.sample-bar { border-block: 1px solid color-mix(in srgb, var(--s2) 35%, transparent); background: color-mix(in srgb, var(--s2) 9%, var(--bg)); font-size: 0.9rem; }
.sample-bar .wrap { display: flex; align-items: baseline; gap: 0.4rem 0.7rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.sample-bar .wrap > span:nth-child(2) { flex: 1 1 18rem; }
.sample-bar a { margin-left: auto; font-weight: 600; }
.sample-dot { flex: none; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--s2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s2) 22%, transparent); }

main { flex: 1; padding-bottom: 5rem; }

/* ---------- type ---------- */
.eyebrow { font: 600 0.74rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 0.8rem; }
h1 { font: normal clamp(2.1rem, 6vw, 3.4rem)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0 0 0.8rem; }
h2 { font: normal 1.25rem/1.25 var(--serif); margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 44rem; }
.num { font-variant-numeric: lining-nums tabular-nums; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
  min-width: 0;
}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.card-head p { margin: 0.3rem 0 0; }
.wrap-head { flex-wrap: wrap; }
.tag { font: 600 0.7rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.6rem; }

/* ---------- gates ---------- */
.gate { max-width: 40rem; margin: 3rem auto 0; }
.gate.card { padding: 2.2rem; }
.gate h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.gate p { color: var(--muted); }
.gate-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem; }
.btn-primary, .btn-ghost {
  font: 600 0.95rem var(--sans); border-radius: 12px; padding: 0.8rem 1.3rem; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; display: inline-flex; align-items: center; transition: transform 0.2s var(--ease), background 0.2s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 2.2rem 0 1.4rem; }
.filters { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button, .metric-tabs button {
  font: 600 0.84rem var(--sans); color: var(--muted); background: transparent; border: 0; border-radius: 999px;
  padding: 0.42rem 0.95rem; cursor: pointer; transition: background 0.25s var(--ease), color 0.25s;
}
.seg button[aria-pressed="true"], .metric-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.seg button:hover:not([aria-pressed="true"]), .metric-tabs button:hover:not([aria-selected="true"]) { color: var(--text); }
.select select {
  font: 600 0.84rem var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.5rem 2rem 0.5rem 1rem; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.filter-count { font-size: 0.84rem; }

.hero-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* offer gauge */
.offer { display: flex; flex-direction: column; background:
  linear-gradient(160deg, color-mix(in srgb, var(--s1) 7%, var(--surface)) 0%, var(--surface) 55%); }
.gauge-wrap { position: relative; max-width: 22rem; width: 100%; margin: 0.2rem auto 0.4rem; }
.gauge { width: 100%; display: block; overflow: visible; }
.gauge-track { fill: none; stroke: color-mix(in srgb, var(--s1) 12%, var(--surface)); stroke-width: 14; stroke-linecap: round; }
.gauge-fill { fill: none; stroke: url(#gauge-grad); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease); }
.g-stop-a { stop-color: color-mix(in srgb, var(--s1) 45%, var(--surface)); }
.g-stop-b { stop-color: var(--s1); }
.gauge-tick { stroke: var(--faint); stroke-width: 1; }
.gauge-tick-label { fill: var(--faint); font: 10px var(--sans); }
.gauge-readout { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.big { font: normal clamp(3rem, 9vw, 4.2rem)/1 var(--serif); letter-spacing: -0.03em; font-variant-numeric: lining-nums tabular-nums; }
.big small { font-size: 0.45em; color: var(--muted); margin-left: 0.05em; }
.delta { font: 600 0.86rem var(--sans); margin-top: 0.35rem; color: var(--muted); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.disclosure { font-size: 0.78rem; color: var(--faint); margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); line-height: 1.5; }

/* stat tiles */
.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.tile { padding: 1.2rem 1.25rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.tile:hover, .report:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile .label { font-size: 0.84rem; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }
.tile .icon { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.tile .icon svg { width: 15px; height: 15px; }
.tile .value { font: normal 2.1rem/1.1 var(--serif); letter-spacing: -0.02em; margin-top: 0.5rem; font-variant-numeric: lining-nums tabular-nums; }
.tile .value small { font-size: 0.5em; color: var(--muted); margin-left: 0.12em; letter-spacing: 0; }
.tile .delta { margin-top: 0; font-size: 0.8rem; }
.tile .spark { margin-top: auto; padding-top: 0.6rem; }
.tile .spark-box { position: relative; height: 40px; }
.tile .spark svg { width: 100%; height: 40px; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--faint); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.7; }
.spark-area { fill: var(--s1-wash); }
.spark-inner { position: relative; height: 40px; }
.spark-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--s1); box-shadow: 0 0 0 2px var(--surface); }
.tile .note { font-size: 0.8rem; color: var(--faint); }

/* ---------- trend chart ---------- */
.chart-card { margin-bottom: 1rem; }
.metric-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.chart { position: relative; width: 100%; height: 300px; outline: none; touch-action: pan-y; }
.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grid line { stroke: var(--grid); stroke-width: 1; }
.axis text { fill: var(--faint); font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.avg-line { fill: none; stroke: var(--s2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.95; }
.area { fill: url(#area-grad); }
.area-stop-a { stop-color: var(--s1); stop-opacity: 0.16; }
.area-stop-b { stop-color: var(--s1); stop-opacity: 0; }
.dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; transition: r 0.2s var(--ease); }
.dot.pb { r: 6.5; }
.dot.dense { stroke-width: 1; }
.dot.dense.pb { r: 5; }
.dot.active { r: 6.5; }
.crosshair { stroke: var(--muted); stroke-width: 1; opacity: 0; transition: opacity 0.15s; }
.chart.hovering .crosshair { opacity: 0.6; }
.end-label { fill: var(--text); font: 600 12px var(--sans); font-variant-numeric: tabular-nums; }
.pb-label { fill: var(--muted); font: 600 10px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-size: 0.95rem; text-align: center; padding: 0 1rem; }
.chart-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.86rem; }
.chart-legend { display: inline-flex; gap: 1rem; color: var(--muted); font-size: 0.82rem; }

.switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; color: var(--muted); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { width: 34px; height: 20px; border-radius: 999px; background: var(--grid); border: 1px solid var(--line); position: relative; transition: background 0.25s; flex: none; }
.switch .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform 0.25s var(--ease); }
.switch input:checked + .knob { background: var(--s2); border-color: var(--s2); }
.switch input:checked + .knob::after { transform: translateX(14px); }
.switch input:focus-visible + .knob { outline: 2px solid var(--accent); outline-offset: 2px; }

.table-view summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
.table-view summary::-webkit-details-marker { display: none; }
.table-view[open] { flex-basis: 100%; }
.table-scroll { overflow-x: auto; margin-top: 0.8rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.45rem 0.8rem 0.45rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--faint); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- legend keys ---------- */
.legend { display: inline-flex; gap: 0.9rem; align-items: center; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.key-first { background: var(--s2); }
.key-latest { background: var(--s1); }
.key-line { width: 14px; height: 2px; border-radius: 1px; }

/* ---------- split rows ---------- */
.split { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split-wide { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

/* skills dumbbell */
.skills { display: grid; gap: 1.05rem; }
.skill { display: grid; grid-template-columns: 7.2rem 1fr 4.6rem; align-items: center; gap: 0.8rem; font-size: 0.9rem; }
.skill .name { color: var(--muted); }
.track { position: relative; height: 24px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--grid); }
.track .span { position: absolute; top: calc(50% - 1px); height: 2px; background: color-mix(in srgb, var(--s1) 40%, var(--grid)); border-radius: 2px; transition: left 1s var(--ease), width 1s var(--ease); }
.track .pt { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--surface); transition: left 1s var(--ease); }
.track .pt.first { background: var(--s2); }
.track .pt.latest { background: var(--s1); width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.skill .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.skill .val small { display: block; font-weight: 600; font-size: 0.74rem; color: var(--good); }
.skill .val small.down { color: var(--bad); }
.skill .val small.flat { color: var(--faint); }
@media (max-width: 480px) { .skill { grid-template-columns: 5.6rem 1fr 3.8rem; gap: 0.5rem; } }

/* subject bars */
.bars { display: grid; gap: 1rem; }
.bar-row { display: grid; grid-template-columns: 7.2rem 1fr; gap: 0.8rem; align-items: center; font-size: 0.9rem; }
.bar-row .name { color: var(--muted); line-height: 1.25; }
.bar-row .name small { display: block; color: var(--faint); font-size: 0.76rem; }
.bar-track { position: relative; height: 22px; display: flex; align-items: center; gap: 0.5rem; }
.bar { height: 16px; border-radius: 0 4px 4px 0; background: var(--s1); width: 0; transition: width 1.1s var(--ease); flex: none; }
.bar-row:hover .bar { filter: brightness(1.08); }
.bar-val { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 0.86rem; white-space: nowrap; }
.empty-note { color: var(--faint); font-size: 0.92rem; margin: 0.4rem 0 0; }

/* calendar heatmap */
.calendar { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-auto-columns: minmax(0, 1fr); gap: 4px; max-width: 46rem; }
.calendar .cell { width: auto; height: auto; aspect-ratio: 1; border-radius: 22%; }
.cell { width: 14px; height: 14px; border-radius: 4px; background: var(--heat-0); display: inline-block; }
.calendar .cell { transition: transform 0.15s var(--ease); }
.calendar .cell:hover, .calendar .cell:focus-visible { transform: scale(1.25); }
.cell.l1 { background: var(--heat-1); } .cell.l2 { background: var(--heat-2); } .cell.l3 { background: var(--heat-3); }
.cell.future { background: transparent; }
.cal-legend .cell { width: 11px; height: 11px; border-radius: 3px; }
.cal-legend { gap: 0.3rem; }

.cal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.cal-stats dt { font-size: 0.76rem; color: var(--faint); }
.cal-stats dd { margin: 0.15rem 0 0; font: normal 1.5rem/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
@media (max-width: 480px) { .cal-stats { grid-template-columns: 1fr 1fr; } }

/* highlights */
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
.highlights li { display: grid; grid-template-columns: 2.4rem 1fr auto; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.highlights li:first-child { border-top: 0; padding-top: 0; }
.medal { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--s2) 14%, var(--surface)); color: var(--s2); border: 1px solid color-mix(in srgb, var(--s2) 30%, transparent); }
.medal svg { width: 18px; height: 18px; }
.highlights .what { font-size: 0.9rem; line-height: 1.3; }
.highlights .what small { display: block; color: var(--faint); font-size: 0.78rem; }
.highlights .score { font: normal 1.35rem var(--serif); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- reports ---------- */
.reports-section { margin-top: 2.2rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.6rem; }
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.report { padding: 0; overflow: hidden; }
.report.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s1) 45%, transparent), var(--shadow); } }
.report-head { width: 100%; display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto auto; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.report-head:disabled { cursor: default; }
.date { text-align: center; line-height: 1.05; border-right: 1px solid var(--line); padding-right: 1rem; }
.date b { display: block; font: normal 1.7rem var(--serif); font-variant-numeric: lining-nums; }
.date span { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.report-title { font: normal 1.12rem/1.25 var(--serif); }
.report-meta { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; align-items: center; }
.chip { font: 600 0.7rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; padding: 0.18rem 0.55rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.chip.pb { background: color-mix(in srgb, var(--s2) 15%, var(--surface)); color: color-mix(in srgb, var(--s2) 80%, var(--text)); }
.ring { width: 52px; height: 52px; position: relative; flex: none; }
.ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring .r-track { fill: none; stroke: var(--grid); stroke-width: 4; }
.ring .r-fill { fill: none; stroke: var(--s1); stroke-width: 4; stroke-linecap: round; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 600 0.95rem var(--sans); font-variant-numeric: tabular-nums; }
.offer-mini { text-align: right; font-size: 0.78rem; color: var(--faint); line-height: 1.2; min-width: 4.5rem; }
.offer-mini b { display: block; font: normal 1.25rem var(--serif); color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.chev { width: 18px; height: 18px; color: var(--faint); transition: transform 0.3s var(--ease); }
.report[data-open="true"] .chev { transform: rotate(180deg); }
.report-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.report[data-open="true"] .report-body { grid-template-rows: 1fr; }
.report-body > div { overflow: hidden; }
.report-inner { padding: 0 1.3rem 1.3rem; display: grid; gap: 1.2rem; grid-template-columns: 1fr; border-top: 1px solid var(--line); padding-top: 1.1rem; }
@media (min-width: 720px) { .report-inner { grid-template-columns: 1fr 1fr 1fr; } }
.report-inner h3 { font: 600 0.74rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.6rem; }
.report-inner ul { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--muted); }
.report-inner li { margin-bottom: 0.35rem; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; font-size: 0.86rem; }
.mini-stats dt { color: var(--faint); font-size: 0.76rem; }
.mini-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-chev-slot { display: grid; place-items: center; }
@media (max-width: 600px) {
  nav a:not(.btn-quiet) { display: none; }
  .report-head { grid-template-columns: 3.2rem minmax(0, 1fr) auto; gap: 0.75rem; padding: 1rem; }
  .date { padding-right: 0.7rem; }
  .date b { font-size: 1.35rem; }
  .offer-mini { display: none; }
  .report-chev-slot { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .tile { padding: 1rem; }
  .tile .value { font-size: 1.7rem; }
  .card { padding: 1.2rem; }
  .chart { height: 240px; }
}

/* ---------- tooltip ---------- */
.tooltip {
  position: fixed; z-index: 20; pointer-events: none; min-width: 9rem; max-width: 16rem;
  background: var(--text); color: var(--bg); border-radius: 12px; padding: 0.65rem 0.8rem; font-size: 0.8rem; line-height: 1.35;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.45); transform: translate(-50%, calc(-100% - 14px));
}
.tooltip .tv { font: 600 1.05rem var(--sans); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 0.45rem; }
.tooltip .tv i { width: 12px; height: 2px; border-radius: 1px; display: inline-block; }
.tooltip .tl { opacity: 0.72; }
.tooltip .tt { margin-top: 0.3rem; font-family: var(--serif); font-size: 0.9rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.2rem; font-size: 0.82rem; color: var(--muted); text-align: center; }
footer p { margin: 0.3rem 0; }

/* ---------- entrance ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .gauge-fill, .bar, .track .pt, .track .span, .report-body { transition: none; }
}
