/* Songelo palette (src/app/App.css @theme) */
:root {
  --page: #6683b3; --paper: #ffffff; --sheet: #dfe5f0; --ink: #17202f; --ink-2: #2f3f58; --muted: #4a6084; --rule: #c0cce1; --axis: #a1b3d2;
  --accent: #3c4f6e; --accent-ink: #2f3f58; --hover: #cfd9e9;
  --c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a; --c4: #eda100; --c5: #e87ba4; --c6: #008300;
  --font-display: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  --font-body: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  --font-data: ui-monospace, Menlo, monospace;
  --font-ui: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 36px 72px; display: flex; flex-direction: column; gap: 28px; }
h1, h2 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 52px); color: var(--ink); }
h2 { color: var(--page); }
h2 { font-size: 26px; }
p { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.brand svg { width: 44px; height: 40px; fill: currentColor; }
.panel { background: var(--sheet); border: 0; border-radius: 6px; box-shadow: 0 1px 3px rgba(23,32,47,.25); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-family: var(--font-ui); font-size: 14px; }
.search { position: relative; flex: 1 1 260px; min-width: 0; }
.search input { width: 100%; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--axis); border-radius: 4px; background: var(--paper); color: var(--ink); }
.search input:focus-visible, button:focus-visible, select:focus-visible, input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.results { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; background: var(--sheet); border: 1px solid var(--axis); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.14); max-height: 320px; overflow-y: auto; }
.results button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: 8px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.results button:hover, .results button.on { background: var(--hover); }
.results .sub { color: var(--muted); font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--axis); border-radius: 4px; overflow: hidden; }
.seg button { border: 0; background: var(--sheet); color: var(--ink-2); padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--font-ui); font-size: 13px; background: var(--paper); }
.chip i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; }
.chip button:hover { color: var(--ink); }
.empty { font-family: var(--font-ui); font-size: 14px; color: var(--muted); padding: 40px 0; text-align: center; }
svg text { font-family: var(--font-data); font-size: 11px; fill: var(--muted); }
table { border-collapse: collapse; width: 100%; font-family: var(--font-ui); font-size: 14px; }
th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
td { padding: 9px 10px; border-bottom: 1px solid var(--rule); }
td.n, th.n { text-align: right; font-family: var(--font-data); font-variant-numeric: tabular-nums; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--hover); }
tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.scroll { overflow-x: auto; }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tip { position: fixed; pointer-events: none; z-index: 20; background: var(--ink); color: var(--paper); font-family: var(--font-ui); font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: 4px; max-width: 300px; }
.tip i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
label.slider { display: inline-flex; align-items: center; gap: 8px; }
input[type=range] { width: 160px; accent-color: var(--accent); }
select { font: inherit; padding: 6px 8px; border: 1px solid var(--axis); border-radius: 4px; background: var(--sheet); color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: inherit; }
.stack[hidden], .panel[hidden] { display: none; }
.tabs { display: flex; width: max-content; border-radius: 6px; overflow: hidden; }
.tabs button, .tabs a { border: 0; text-decoration: none; padding: 8px 18px; font: 600 15px var(--font-ui); background: #4a6084; color: #dfe5f0; cursor: pointer; }
.tabs [aria-selected="true"] { background: var(--ink); }
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-ui); }
.weeknav button, .weeknav a, .wpick { border: 1px solid var(--axis); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 6px 14px; font: 600 16px var(--font-ui); cursor: pointer; }
.weeknav button:disabled, .weeknav a.off { opacity: .35; cursor: default; }
.weeknav a { text-decoration: none; }
.weeknav a.off { pointer-events: none; }
.wpick { position: relative; font-weight: 700; }
.wpick::after { content: "▾"; font-size: 12px; color: var(--muted); margin-left: 6px; }
.wpick input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
a.crow { color: inherit; text-decoration: none; }
.crow { display: grid; grid-template-columns: 44px 1fr 74px; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--rule); font-family: var(--font-ui); cursor: pointer; }
.crow:hover { background: var(--hover); }
.crow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cpos { text-align: center; font: 700 22px var(--font-ui); line-height: 1; }
.mv { display: block; font-size: 11px; font-weight: 600; margin-top: 3px; color: var(--muted); }
.mv.up { color: #2e7d4f; } .mv.down { color: #9c3d8f; } .mv.nw { color: var(--accent); }
.ct { font-weight: 600; font-size: 15px; }
.ca { color: var(--muted); font-size: 13px; }
.csc { text-align: right; font: 600 14px var(--font-data); }
.csc svg { display: block; margin-left: auto; }
.exp { grid-column: 1 / -1; background: var(--paper); border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 12px; cursor: default; }
.exp h3 { margin: 0; font: 600 12px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.exp .match { font: 700 19px var(--font-ui); line-height: 1.25; }
.exp .match span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.exp .lg { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.exp .lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.cmp { font-size: 14px; }
.cmp th { text-align: right; border-bottom: 1px solid var(--rule); padding: 6px 4px; font-size: 11px; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp td { padding: 7px 4px; text-align: right; font-family: var(--font-data); font-size: 13.5px; }
.cmp td:first-child { font-family: var(--font-ui); color: var(--ink-2); }
.cmp td.me { color: var(--c1); font-weight: 600; }
.cmp tbody tr { cursor: default; } .cmp tbody tr:hover { background: none; }
.brand img { width: 44px; height: 44px; }
.back { font: 600 14px var(--font-ui); text-decoration: none; color: var(--ink); }
.panel a { color: var(--accent-ink); }
table.facts th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--rule); width: 40%; }
table.facts td { font-weight: 600; }
nav.controls a { color: var(--ink); font: 600 14px var(--font-ui); }
.exp-link { font: 600 14px var(--font-ui); color: var(--accent-ink); align-self: flex-start; }
.exp .match a { color: inherit; }
.ecard { text-decoration: none; color: var(--ink); }
.ecard:hover { box-shadow: 0 2px 8px rgba(23,32,47,.35); }
.ehead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ehead h2 { color: var(--ink); }
.ehead h2.big { font-size: clamp(26px, 5vw, 36px); }
.eyears { font: 600 15px var(--font-ui); color: var(--muted); }
.etraits { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; font: 600 15px var(--font-ui); color: var(--ink); }
.etraits li::before { content: "•"; color: var(--accent); margin-right: 6px; }
.estats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-family: var(--font-ui); }
.estats b { display: block; font-size: 20px; }
.estats span { font-size: 12px; color: var(--muted); line-height: 1.25; display: block; }
.etop { display: flex; flex-direction: column; gap: 3px; font-family: var(--font-ui); font-size: 14px; }
.etop b { display: inline-block; width: 1.3em; color: var(--muted); }
.emore { font: 600 14px var(--font-ui); color: var(--accent-ink); }
.eswitch { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.eswitch::-webkit-scrollbar { display: none; }
.eswitch a { flex: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--axis); background: var(--paper); color: var(--ink); font: 600 14px var(--font-ui); text-decoration: none; white-space: nowrap; }
.eswitch a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--sheet); }
@media (max-width: 480px) { .estats { grid-template-columns: repeat(2, 1fr); } .etraits { flex-direction: column; } }
.panel > .match { font: 700 19px var(--font-ui); line-height: 1.25; }
.panel > .match span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.panel > .lg { display: flex; flex-wrap: wrap; gap: 14px; font: 12px var(--font-ui); color: var(--ink-2); }
.panel > .lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
svg.curve { max-width: 720px; }
svg.curve text { font: 19px var(--font-data); fill: var(--muted); }
.crow.erow { grid-template-columns: 1fr 74px; }
.elabel { font: 600 11px var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
/* projection on a song page: dashed middle path, shaded likely range, chart position strip */
.panel > .lg i.dash { background: repeating-linear-gradient(90deg, var(--c1) 0 5px, transparent 5px 9px); }
.panel > .lg i.band { background: var(--c1); opacity: .3; height: 10px; }
svg.curve .range { fill: var(--c1); opacity: .14; }
svg.curve .proj { fill: none; stroke: var(--c1); stroke-width: 2.2; stroke-dasharray: 6 5; }
svg.curve text.cap { font-size: 16px; }
svg.curve text.pnow { fill: var(--ink); font-weight: 700; }
svg.curve text.pfut { fill: var(--c1); font-weight: 700; }
.peaks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding-top: 4px; font-family: var(--font-ui); }
.peak { display: flex; flex-direction: column; gap: 2px; }
.peak + .peak { border-left: 1px solid var(--rule); padding-left: 16px; }
.peak b { font-size: 44px; line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.peak .when { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.peak.ahead b, .peak.ahead .when { color: var(--c1); }  /* still ahead: projected blue, as on the chart */
/* climbers: projected to keep rising (songs/climbers.json); blue = projected, as on the song page */
.csc svg.climbs { display: inline-block; margin: 0 5px 1px 0; vertical-align: -1px; }
.csc svg.climbs path { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.csc svg .tip { fill: none; stroke: var(--c1); stroke-width: 1.8; stroke-dasharray: 3 2; }
/* Hot 100 watchlist (This week, latest week only) */
.wjump { align-self: flex-end; font: 600 14px var(--font-ui); color: var(--accent-ink); text-decoration: none; }
.wjump[hidden] { display: none; }
.crow.wrow { grid-template-columns: 34px 1fr; cursor: default; }
.crow.wrow:hover { background: none; }
.wrow .cpos { font-size: 18px; color: var(--muted); }
.wplace { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.wplace span { font: 600 12px var(--font-ui); color: var(--ink-2); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.wplace b { font-weight: 700; color: var(--ink); margin-left: 4px; }
/* song page: curator picks, newest first */
.crow.prow { grid-template-columns: 1fr auto; cursor: default; }
.crow.prow:hover { background: none; }
.prow .pdate { font: 600 13px var(--font-ui); color: var(--muted); text-align: right; white-space: nowrap; }
