/* CV Mojo app (v2 preview): Score tracker (/score-tracker). Classes are prefixed st-;
   shared pieces (ap-*, db-*, cvm-*) come from app.css.
   One series colour for charts, the same as CV analytics: brand indigo one step lighter
   (#3442b5), checked with the dataviz validator (lightness band, chroma, 3:1+ on white).
   Each chart is a single series, so the card title names it and there is no legend. */
.st {
  --st-series: #3442b5;
  --st-series-hot: #27349f;
  --st-grid: #e9eaf3;
  --st-axis: #cfd2e6;
  --st-up: #1d6b45;
  --st-up-soft: #e1f3e8;
  --st-down: #b42318;
  --st-down-soft: #fdecea;
}
.st [hidden] { display: none !important; }
.st-body { display: grid; gap: 24px; min-width: 0; }
.st-count { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.st-muted { color: var(--muted); }
.st-nowrap { white-space: nowrap; }

/* ── CV filter (scopes everything below it) ───────────────────────────── */
.st-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.st-filter-l { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.st-filter .ap-select { width: auto; max-width: 100%; min-height: 44px; padding: 9px 14px; font-weight: 600; }
.st-filter .ap-select:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }

/* ── Hero: the CV being tracked and its two scores ────────────────────── */
.st-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px 28px; padding: 28px 30px; border-top: 6px solid var(--yellow); }
.st-sticker { top: -12px; right: 26px; }
.st-hero-main { grid-column: 1 / -1; min-width: 0; }
.st-hero-main .db-label { margin-bottom: 6px; }
.st-hero h2 { margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); overflow-wrap: anywhere; }
.st-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.st-scores { display: flex; flex-wrap: wrap; gap: 14px; min-width: 0; }
.st-score { display: flex; flex: 1 1 260px; align-items: center; gap: 16px; min-width: 0; padding: 14px 18px 14px 14px; background: var(--st-soft, var(--mist)); border-radius: 18px; }
.st-score--cv { --st-soft: var(--channel-soft); }
.st-score--comm { --st-soft: var(--cyan-soft); }
.st-score .cvm-ring .bg { stroke: #fff; }
.st-score-t { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.st-score-t b { font-size: 1.02rem; font-weight: 800; color: var(--navy); }
.st-score-t > span:not(.cvm-status) { font-size: 13.5px; color: var(--muted); }
.st-hero-actions { display: grid; gap: 10px; align-self: center; }
.st-hero-actions .btn { justify-content: center; }

/* ── What changed ─────────────────────────────────────────────────────── */
.st-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.st-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; font-size: 14.5px; line-height: 1.5; color: var(--navy); background: var(--st-note, var(--mist)); border-radius: 16px; }
.st-note b { font-weight: 800; }
.st-note--ok { --st-note: var(--ok-soft); }
.st-note--warn { --st-note: var(--amber-soft); }
.st-note--info { --st-note: var(--channel-soft); }
.st-note--yellow { --st-note: var(--yellow-soft); }
.st-note-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; color: var(--indigo); background: #fff; border-radius: 10px; transform: rotate(-5deg); }
.st-note--warn .st-note-ic { color: var(--amber); }
.st-note--ok .st-note-ic { color: var(--st-up); }

/* ── Chart cards ──────────────────────────────────────────────────────── */
.st-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.st-card--indigo { --accent: var(--indigo); }
.st-card--cyan { --accent: var(--cyan); }
.st-chart { display: grid; gap: 16px; min-width: 0; }
.st-chart-h { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
.st-chart-h h2 { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; color: var(--navy); }
.st-chart-h p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.st-view button { padding: 6px 12px; font-size: 13px; }
.st-view button:focus-visible, .st-plot:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.st-plot { position: relative; border-radius: 10px; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.st-svgwrap { overflow: hidden; }
.st-svg { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.st-grid { stroke: var(--st-grid); stroke-width: 1; shape-rendering: crispEdges; }
.st-grid.st-axis { stroke: var(--st-axis); }
.st-tick, .st-xlab { font-size: 11.5px; font-weight: 600; fill: var(--muted); font-variant-numeric: tabular-nums; }
.st-endval { font-size: 12.5px; font-weight: 800; fill: var(--navy); }
.st-line { fill: none; stroke: var(--st-series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-area { fill: var(--st-series); fill-opacity: .1; stroke: none; }
.st-dot, .st-hot { fill: var(--st-series); stroke: #fff; stroke-width: 2; }
.st-hot { fill: var(--st-series-hot); }
.st-xhair { stroke: var(--st-axis); stroke-width: 1; shape-rendering: crispEdges; }
.st-tip { position: absolute; z-index: 5; display: grid; gap: 2px; min-width: 130px; max-width: 240px; padding: 9px 12px; font-size: 12.5px; line-height: 1.4; color: var(--muted); pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(25, 29, 59, .12); }
.st-tip b { font-size: 15px; font-weight: 800; color: var(--navy); }
.st-none { display: grid; justify-items: start; gap: 12px; padding: 18px; background: var(--mist); border-radius: 14px; }
.st-none p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.st-none b { color: var(--navy); }

/* Tables (chart twins and the side-by-side view) */
.st-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th, .st-table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.st-table thead th { padding-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; border-bottom-color: var(--st-axis); }
.st-table tbody th { font-weight: 700; color: var(--navy); }
.st-table tbody tr:last-child th, .st-table tbody tr:last-child td { border-bottom: 0; }
.st-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.st-table td { color: var(--text); }
.st-table--cmp { min-width: 620px; }
.st-table--cmp tbody th { min-width: 180px; }
.st-cv-name { display: block; overflow-wrap: anywhere; }
.st-cv-sub { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.st-cell { display: flex; align-items: center; gap: 10px; }
.st-cell b { min-width: 2ch; font-size: 15px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.st-meter { display: block; flex: 1; min-width: 60px; max-width: 120px; height: 8px; overflow: hidden; background: var(--mist); border-radius: 4px; }
.st-meter i { display: block; height: 100%; background: var(--st-series); border-radius: 4px; }
.st-lead { margin: -6px 0 14px; font-size: 13.5px; color: var(--muted); }
.st-compare { --accent: var(--channel); }
.st-compare .ap-linkish { font-size: 14px; font-weight: 700; }
.st-compare .ap-linkish:focus-visible, .st-more .btn:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
.st-note-line { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.st-note-line svg { flex: none; margin-top: 2px; color: var(--indigo); }

/* ── History ──────────────────────────────────────────────────────────── */
.st-events { display: grid; margin: 0; padding: 0; list-style: none; }
.st-ev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 4px; border-top: 1px solid var(--line); }
.st-ev:first-child { border-top: 0; }
.st-ev:focus { outline: none; }
.st-ev:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 10px; }
.st-ev-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; color: var(--navy); background: var(--st-ev, var(--mist)); border-radius: 11px; transform: rotate(-4deg); }
.st-ev--cyan { --st-ev: var(--cyan-soft); }
.st-ev--yellow { --st-ev: var(--yellow); }
.st-ev--channel { --st-ev: var(--channel-soft); }
.st-ev-main { flex: 1 1 200px; min-width: 0; }
.st-ev-main b { display: block; font-size: 14.5px; color: var(--navy); }
.st-ev-main > span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.st-ev-vals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.st-val { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; background: var(--mist); border-radius: 999px; }
.st-val b { font-size: 15px; font-weight: 800; color: var(--navy); }
.st-val--cv { background: var(--channel-soft); }
.st-val--comm { background: var(--cyan-soft); }
.st-val--none { padding-right: 10px; font-weight: 600; }
.st-delta { padding: 1px 7px; font-size: 12px; font-weight: 800; border-radius: 999px; }
.st-delta--up { color: var(--st-up); background: var(--st-up-soft); }
.st-delta--down { color: var(--st-down); background: var(--st-down-soft); }
.st-more { display: grid; justify-items: center; margin-top: 10px; padding-top: 6px; }

/* ── Nothing yet ──────────────────────────────────────────────────────── */
.st-empty { position: relative; display: grid; justify-items: center; gap: 12px; padding: 44px 30px 36px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 1px 2px rgba(25, 29, 59, .05), 0 2px 8px rgba(25, 29, 59, .04); }
.st-empty-sticker { top: -12px; right: 28px; }
.st-empty h2 { margin: 0; font-size: clamp(1.4rem, 2.5vw, 1.85rem); font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.st-empty > p { max-width: 52ch; margin: 0; font-size: 15.5px; color: var(--muted); }
.st-empty .ap-actions { justify-content: center; margin-top: 6px; }

/* ── Free members: recent activity and the Pro card ───────────────────── */
.st-free { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.st-upsell { position: relative; display: grid; justify-items: start; gap: 12px; padding: 30px 28px 26px; background: var(--yellow-soft); border: 1px solid #e9ef8c; border-radius: 22px; }
.st-upsell-sticker { top: -12px; right: 24px; }
.st-upsell-ic { display: grid; place-items: center; width: 54px; height: 54px; color: var(--navy); background: var(--yellow); border-radius: 16px; box-shadow: 0 8px 18px rgba(25, 29, 59, .08); transform: rotate(-6deg); }
.st-upsell h2 { margin: 4px 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.st-upsell > p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.st-upsell > p b { color: var(--navy); }
.st-upsell-list { display: grid; gap: 8px; margin: 2px 0 6px; padding: 0; list-style: none; font-size: 14.5px; font-weight: 600; color: var(--navy); }
.st-upsell-list li { display: flex; align-items: flex-start; gap: 8px; }
.st-upsell-list svg { flex: none; margin-top: 2px; color: var(--st-up); }
.st-upsell .btn:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.st-upsell-price { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.st-loading .skeleton-card { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .st .skeleton { animation: none; }
}
@media (max-width: 1180px) { .st-grid2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .st-free { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .st-hero { grid-template-columns: minmax(0, 1fr); padding: 26px 18px 20px; }
  .st-hero-actions { display: flex; flex-wrap: wrap; }
  .st-hero-actions .btn { flex: 1; }
  .st-score { flex-basis: 100%; }
  .st-filter, .st-filter .ap-select { width: 100%; }
  .st-empty { padding: 34px 18px 28px; }
  .st-upsell { padding: 28px 18px 22px; }
  .st-ev-vals { justify-content: flex-start; margin-left: 48px; }
}
