/* HaiDigital Artist Insights: the "Stage" system, one stylesheet.
   Dark warm charcoal, bone white ink, one red accent. Display: Rubik. Text: Heebo. Hebrew RTL, mobile first.
   CSP allows no inline styles: sizes and colors live here, per-value geometry lives in SVG attributes.
   Contrast (WCAG 2, computed): ink 16.2, ink-2 9.3, ink-3 5.8 on bg; accent 5.6 on bg; white on accent-fill 5.0.
   Never ink-3 on surface-3. --amber only for the "calculated" dot and warnings. No green. */

:root {
  color-scheme: dark;
  --bg: #0E0D0C;
  --surface: #171615;
  --surface-2: #1F1E1C;
  --surface-3: #2A2826;
  --line: #2E2C29;
  --line-strong: #4A4743;
  --ink: #EDEAE3;
  --ink-2: #B8B3A9;
  --ink-3: #918C82;
  --accent: #FF3D4A;
  --accent-text: #FF6B74;
  --accent-fill: #D62633;
  --accent-soft: rgb(255 61 74 / 0.12);
  --amber: #F2B13C;
  --viz-1: #FF4D58;
  --viz-2: #CFCBC2;
  --viz-muted: #5A5651;
  --display: Rubik, Heebo, Arial, sans-serif;
  --text: Heebo, Arial, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --wrap: 1240px;
  --gutter: 20px;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
}
@media (color-gamut: p3) { :root { --accent: color(display-p3 1 0.27 0.31); --viz-1: color(display-p3 1 0.33 0.36); } }
@media (min-width: 800px) { :root { --gutter: 32px; } }
@media (max-width: 359px) { :root { --gutter: 16px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-block-start: 84px; accent-color: var(--ink); }
body { margin: 0; min-block-size: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--text); overflow-wrap: break-word; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
main { flex: 1 0 auto; }
main:focus { outline: 0; }
h1, h2, h3, p, dl, dd, figure, ol, ul, form { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { text-wrap: balance; }
h3 { font: 700 1.0625rem/1.35 var(--display); }
p, li, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); transition: text-decoration-color 150ms var(--ease), color 150ms var(--ease); }
img { display: block; max-inline-size: 100%; }
button, input { font: inherit; }
:where(a, button, summary, label) { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
/* A number stays an inline box: as a box of its own it let the mark after it (". " or ", ") start the next line alone. */
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; direction: ltr; white-space: nowrap; }
.wrap { inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tech { font-size: 0.8125rem; color: var(--ink-3); overflow-wrap: anywhere; }
:where(.split, .stack, .kpis, .ideas, .minis, .facts) > * { min-inline-size: 0; }

/* ---------- top bar ---------- */
.skip { position: absolute; inset-inline-start: 12px; inset-block-start: -64px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; }
.skip:focus { inset-block-start: 12px; }
.top { position: relative; z-index: 3; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.top-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-inline-size: 0; }
.top-mark { flex: none; inline-size: 34px; block-size: 34px; }
.top-mark-bg { fill: var(--surface-2); }
.top-mark-bar { fill: var(--viz-2); }
.top-mark-hi { fill: var(--accent); }
.top-name { display: block; font: 700 1.0625rem/1.1 var(--display); letter-spacing: -0.005em; white-space: nowrap; }
.top-by { display: block; font-size: 0.75rem; color: var(--ink-3); letter-spacing: 0.02em; white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 6px; flex: none; }
.top-nav form { display: inline; }
.top-nav a, .top-nav button { display: inline-block; padding: 8px 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 500; font-size: 0.9375rem; line-height: 1.65; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.top-nav a[aria-current] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 600px) {
  .top-by { display: none; }
  .top-name { font-size: 0.9375rem; }
  .top-mark { inline-size: 30px; block-size: 30px; }
  .top-nav { gap: 2px; }
  .top-nav a, .top-nav button { padding: 6px 10px; font-size: 0.875rem; }
  .top-in { padding-block: 14px; }
}
@media (max-width: 359px) { .top-name { display: none; } }
.demo-banner { padding: 6px 16px; border-block: 1px dashed var(--line-strong); color: var(--ink-2); font-size: 0.8125rem; font-weight: 600; text-align: center; }

/* ---------- stage: the one identity band of a page ---------- */
.stage { position: relative; isolation: isolate; overflow: clip; border-block-end: 1px solid var(--line); }
.stage::before { content: ''; position: absolute; inset: -40% -10% auto auto; inline-size: 70%; aspect-ratio: 1; z-index: -1; background: radial-gradient(closest-side, rgb(255 61 74 / 0.20), rgb(255 61 74 / 0.06) 55%, transparent 72%); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.stage-in { display: grid; gap: 28px; padding-block: 28px 36px; }
.stage-in > * { min-inline-size: 0; }
@media (min-width: 960px) { .stage-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 48px; padding-block: 40px 52px; } .stage-in > :only-child { grid-column: 1 / -1; } /* a band without a side: the title takes the width, no empty column is kept */ }
.stage h1 { font: 800 clamp(2rem, 1.2rem + 3vw, 3.375rem)/1.06 var(--display); letter-spacing: -0.012em; overflow-wrap: anywhere; }
.stage-who { display: flex; align-items: center; gap: 20px; }
.stage-who > div { min-inline-size: 0; }
.stage-sub { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-block-start: 10px; color: var(--ink-2); font-size: 0.9375rem; }
.stage-sub > span { min-inline-size: 0; overflow-wrap: anywhere; } /* a long handle wraps, it is never cut at the edge */
.stage-lead { margin-block-start: 16px; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); line-height: 1.6; max-inline-size: 52ch; }
.stage-back { display: inline-block; margin-block-end: 18px; color: var(--ink-2); font-size: 0.875rem; }
.avatar { position: relative; overflow: clip; display: grid; place-items: center; inline-size: 84px; block-size: 84px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 6px rgb(255 255 255 / 0.03); background: var(--surface-2); color: var(--ink-2); font: 700 2rem/1 var(--display); flex: none; }
/* A picture lies over the letter tile of its box. One that did not load is taken away by app.js; without the script the tile is covered by the same letter (a picture that loaded draws no ::after), so a broken picture mark never shows. */
.avatar > img, .thumb > img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: inherit; }
.avatar > img::after, .thumb > img::after { content: attr(data-letter); position: absolute; inset: -2px; display: grid; place-items: center; background: var(--surface-2); }
@media (min-width: 960px) { .avatar { inline-size: 112px; block-size: 112px; font-size: 2.75rem; } }
.avatar-s { inline-size: 52px; block-size: 52px; font-size: 1.25rem; box-shadow: 0 0 0 1px var(--line-strong); }
.stage-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; margin-block-start: 28px; border-block-start: 1px solid var(--line); }
.stage-stats > div { padding: 16px 0 0; padding-inline-end: 22px; }
.stage-stats > div + div { padding-inline-start: 22px; border-inline-start: 1px solid var(--line); }
.stage-stats dt { color: var(--ink-3); font-size: 0.8125rem; font-weight: 500; }
.stage-stats dd { font: 700 clamp(1.375rem, 1rem + 1.5vw, 2rem)/1.15 var(--display); font-size: calc(clamp(1.375rem, 1rem + 1.5vw, 2rem) * var(--fit, 1)); letter-spacing: -0.01em; } /* --fit: app.js, a row too long for a phone */
@media (max-width: 420px) { .stage-stats { overflow-x: auto; } .stage-stats > div { padding-inline-end: 14px; } .stage-stats > div + div { padding-inline-start: 14px; } .stage-stats dd { font-size: calc(1.25rem * var(--fit, 1)); } } /* without scripts a row that is too long can be swiped, never cut */
.stage-fresh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-block-start: 22px; color: var(--ink-3); font-size: 0.8125rem; }
.stage-lag { margin-block-start: 8px; max-inline-size: 52ch; }
.stage-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-start: 14px; }
.stage-thumb { inline-size: min(100%, 220px); flex: none; }
.stage-who:has(.stage-thumb) h1 { font-size: clamp(1.75rem, 1.2rem + 2.1vw, 2.75rem); } /* a song title is longer than an artist name */
@media (max-width: 600px) { .stage-who:has(.stage-thumb) { flex-direction: column; align-items: flex-start; gap: 16px; } .stage-thumb { inline-size: 176px; } }
@media (max-width: 600px) { .stage-who-long { flex-direction: column; align-items: flex-start; gap: 16px; } } /* a long name gets the whole row, the picture above it */

/* EQ strip: the signature. The last 28 days with data as a level meter, the peak in red. */
.eq { display: grid; gap: 10px; direction: ltr; }
.eq svg { inline-size: 100%; block-size: auto; display: block; }
.eq-seg { fill: var(--surface-3); }
.eq-on { fill: var(--viz-2); opacity: 0.82; }
.eq-peak { fill: var(--accent); opacity: 1; }
.eq-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; direction: rtl; color: var(--ink-3); font-size: 0.8125rem; }
.eq-cap b { color: var(--ink); font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .eq-col { transform-box: fill-box; transform-origin: 50% 100%; animation: eq-rise 520ms var(--ease) both; animation-delay: calc(var(--i, 0) * 12ms); }
}
@keyframes eq-rise { from { transform: scaleY(0.35); opacity: 0; } }
.eq-col:nth-child(2) { --i: 1; } .eq-col:nth-child(3) { --i: 2; } .eq-col:nth-child(4) { --i: 3; } .eq-col:nth-child(5) { --i: 4; }
.eq-col:nth-child(6) { --i: 5; } .eq-col:nth-child(7) { --i: 6; } .eq-col:nth-child(8) { --i: 7; } .eq-col:nth-child(9) { --i: 8; }
.eq-col:nth-child(10) { --i: 9; } .eq-col:nth-child(11) { --i: 10; } .eq-col:nth-child(12) { --i: 11; } .eq-col:nth-child(13) { --i: 12; }
.eq-col:nth-child(14) { --i: 13; } .eq-col:nth-child(15) { --i: 14; } .eq-col:nth-child(16) { --i: 15; } .eq-col:nth-child(17) { --i: 16; }
.eq-col:nth-child(18) { --i: 17; } .eq-col:nth-child(19) { --i: 18; } .eq-col:nth-child(20) { --i: 19; } .eq-col:nth-child(21) { --i: 20; }
.eq-col:nth-child(22) { --i: 21; } .eq-col:nth-child(23) { --i: 22; } .eq-col:nth-child(24) { --i: 23; } .eq-col:nth-child(25) { --i: 24; }
.eq-col:nth-child(26) { --i: 25; } .eq-col:nth-child(27) { --i: 26; } .eq-col:nth-child(28) { --i: 27; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 600 0.9375rem/1.2 var(--text); text-align: center; text-decoration: none; cursor: pointer; touch-action: manipulation; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 140ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-lg { min-block-size: 54px; padding-inline: 28px; font-size: 1.0625rem; }
.btn-sm { min-block-size: 38px; padding-inline: 14px; font-size: 0.875rem; white-space: nowrap; }
.btn-quiet { border-color: transparent; color: var(--ink-2); padding-inline: 12px; }
.btn-danger { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-form { display: inline; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- sticky section nav: the only glass on the page ---------- */
.secnav { position: sticky; inset-block-start: 0; z-index: 5; background: rgb(14 13 12 / 0.78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-block-end: 1px solid var(--line); }
.secnav ul { display: flex; gap: 4px; overflow-x: auto; overscroll-behavior-inline: contain; padding-block: 10px; scrollbar-width: none; contain: paint; }
.secnav ul::-webkit-scrollbar { display: none; }
.secnav a { display: block; white-space: nowrap; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9375rem; transition: color 150ms var(--ease), background-color 150ms var(--ease), transform 140ms var(--ease); }
.secnav a:active { transform: scale(0.96); }
.secnav a[aria-current] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
/* A mouse cannot swipe the rail. On a wide screen every section stays in sight, on a second row when one is not enough. */
@media (min-width: 1000px) and (hover: hover) and (pointer: fine) {
  html { scroll-padding-block-start: 124px; }
  .secnav ul { flex-wrap: wrap; overflow: visible; contain: none; gap: 2px; padding-block: 8px; }
  .secnav a { padding: 6px 10px; font-size: 0.875rem; } /* a little tighter: fifteen sections share one row */
}
/* Sixteen sections or more do not fit one row of the full page width: two even rows, not a full row and a few left over. */
@media (min-width: 1304px) and (hover: hover) and (pointer: fine) {
  .secnav ul:has(> :nth-child(16)) { display: grid; grid-template-columns: repeat(9, auto); justify-content: start; justify-items: start; }
}

/* ---------- page, sections, panels ---------- */
.page { padding-block: 8px 96px; }
.page-plain { padding-block-start: 0; }
.page-top { padding-block-start: 40px; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 16px; padding-block: 40px 28px; }
.page-head h1, .page-title { font: 800 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/1.05 var(--display); letter-spacing: -0.012em; }
.page-lead { margin-block-start: 14px; color: var(--ink-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; max-inline-size: 56ch; }
.page-end { display: grid; gap: 24px; justify-items: start; margin-block-start: 56px; }
.sec { padding-block: 56px 8px; }
.sec-head { display: grid; gap: 12px; margin-block-end: 28px; }
.sec-head > div { display: grid; gap: 6px; min-inline-size: 0; }
@media (min-width: 800px) { .sec-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.sec h2 { font: 800 clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem)/1.1 var(--display); letter-spacing: -0.012em; }
.sec-note { display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--ink-3); font-size: 0.875rem; }
.sec-intro { color: var(--ink-2); max-inline-size: 60ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
@media (min-width: 800px) { .panel { padding: 32px; } }
.panel > h3 + :not(.panel-cap), .panel-cap + * { margin-block-start: 16px; }
.panel-cap { color: var(--ink-3); font-size: 0.8125rem; margin-block-start: 8px; }
.panel-foot { color: var(--ink-3); font-size: 0.8125rem; margin-block-start: 14px; }
.panel-text { color: var(--ink-2); margin-block-start: 6px; }
.split { display: grid; gap: 20px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .split-rev { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.split-top { align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; }
.gap { margin-block-start: 20px; }
.calc { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font: 400 0.75rem/1.4 var(--text); letter-spacing: 0; }
.calc::before { content: ''; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--amber); }

/* notes and section states */
.note { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--ink-2); font-size: 0.9375rem; }
.note::before { content: ''; flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--ink-3); }
.note > span { min-inline-size: 0; }
.note-warn::before { background: var(--amber); }
.note-error { border-color: rgb(255 61 74 / 0.5); color: var(--ink); }
.note-error::before { background: var(--accent); }
.note strong { color: var(--ink); font-weight: 600; }
.note + .note, .note + .panel, .note + .split, .note + form { margin-block-start: 14px; }
.page > .note:first-child, .page > .fine:first-child { margin-block-start: 24px; }
.flash { animation: fade-in 220ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.state-msg { color: var(--ink-3); font-size: 0.9375rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.tag-hot { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--ink-2); }
.status-warn::before { background: var(--amber); }
.status-err::before { background: var(--accent); }
.status-off::before { background: var(--line-strong); }

/* details */
.more { margin-block-start: 16px; }
.more > summary { display: inline-flex; align-items: center; gap: 10px; min-block-size: 44px; color: var(--ink-2); font-weight: 600; font-size: 0.9375rem; cursor: pointer; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ''; inline-size: 7px; block-size: 7px; border-inline-end: 1.5px solid currentColor; border-block-end: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 150ms var(--ease); }
.more[open] > summary::before { transform: translateY(-2px) rotate(-45deg); }
.more[open] > summary { color: var(--ink); margin-block-end: 8px; }
.more[open] > :not(summary) { animation: fade-in 220ms var(--ease); }

/* period switch */
.period { display: inline-flex; max-inline-size: 100%; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.period a { padding: 7px 16px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.875rem; white-space: nowrap; transition: color 150ms var(--ease); }
.period a[aria-current] { background: var(--ink); color: var(--bg); }
@media (max-width: 400px) { .period a { padding-inline: 11px; } }

/* ---------- KPI bento ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; background: var(--surface); }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* A number is sized to its own tile, never to the window alone: cqi is the width of the tile, so a narrow tile
   (the 7/5 split on a small laptop, a 320px phone) gets a smaller number. --fit is set by app.js on a number that is
   still too long for its tile (the totals of a large channel); without scripts it stays 1. */
.kpi { outline: 1px solid var(--line); padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: space-between; gap: 14px; min-block-size: 118px; container-type: inline-size; }
.kpi dt { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; }
.kpi dd { font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem)/1.05 var(--display); font-size: calc(min(clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem), 24cqi) * var(--fit, 1)); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kpi-main { grid-column: span 2; background: linear-gradient(180deg, rgb(255 61 74 / 0.07), transparent 60%); padding: 24px; }
@media (min-width: 720px) { .kpi-main { grid-row: span 2; } }
.kpis:has(> .kpi-main) > :nth-child(2n):last-child { grid-column: span 2; } /* a last tile that would sit next to an empty one */
.kpi-main dd { font-size: clamp(2.5rem, 1.5rem + 2.6vw, 3.75rem); font-size: calc(min(clamp(2.5rem, 1.5rem + 2.6vw, 3.75rem), 19.5cqi) * var(--fit, 1)); font-weight: 800; }
.kpi-sub { display: block; margin-block-start: 8px; color: var(--ink-3); font: 400 0.8125rem/1.5 var(--text); letter-spacing: 0; }
.kpi-sub b { color: var(--ink); font-weight: 600; }

/* definition facts: label over a raw value */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
@media (min-width: 720px) { .facts-wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
.facts > div { padding-inline-start: 14px; border-inline-start: 1px solid var(--line-strong); }
.facts dt { color: var(--ink-3); font-size: 0.8125rem; }
.facts dd { font: 700 1.375rem/1.2 var(--display); font-size: calc(1.375rem * var(--fit, 1)); overflow-wrap: anywhere; }
.facts .calc { display: flex; margin-block-start: 4px; }
@media (max-width: 420px) { .facts dd { font-size: calc(1.25rem * var(--fit, 1)); } } /* a date fits half a phone row */
/* Without scripts nothing sets --fit, so there a number that is too long wraps inside its tile and never leaves it. */
@media (scripting: none) { .kpi dd > .num, .facts dd > .num { white-space: normal; } }
.moments dt { min-block-size: 2.9em; } /* labels of one and of two lines: the values stay on one line */
.facts-long { font: 600 1rem/1.4 var(--display); } /* a value that is a phrase (a period, a list of terms), not a number */
@media (max-width: 359px) { .facts-long { font-size: 0.9375rem; } } /* each date of a period stays whole in the tile of a 320px phone */
.nw { white-space: nowrap; } /* "In-stream" and "In-feed" never break at their hyphen */

/* compare rows: two raw values on one scale */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cmp-lbl { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; }
.cmp-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.cmp-v { font: 700 1rem/1 var(--display); min-inline-size: 5.5ch; text-align: end; }
.cmp-prev .cmp-v { color: var(--ink-3); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 0.8125rem; }
.legend i { display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 2px; margin-inline-end: 6px; }
.k-cur { background: var(--viz-1); }
.k-up { background: var(--viz-2); }
.k-old, .k-down { background: var(--viz-muted); }
.hbar { display: block; inline-size: 100%; block-size: 6px; border-radius: 999px; }
.cmp-bar .hbar { block-size: 8px; }
.hbar-track { fill: var(--surface-3); }
.hbar-fill { fill: var(--viz-2); }
.hbar-top, .hbar-cur { fill: var(--viz-1); }
.hbar-old { fill: var(--viz-muted); }

/* ---------- ideas: one featured idea, then a numbered editorial list ---------- */
/* One column that never grows past the card: a thumbnail that is not 16:9 (the 4:3 picture YouTube serves for a removed video) would otherwise widen it, and the card clips what sticks out. */
article.idea { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; overflow: clip; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
article.idea::before { content: ''; position: absolute; inset-block-start: 0; inset-inline: 0; block-size: 2px; background: var(--accent); }
@media (min-width: 880px) { article.idea { padding: 32px; gap: 40px; align-items: center; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } article.idea:has(.thumb) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
article.idea h3 { font: 800 clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem)/1.12 var(--display); letter-spacing: -0.01em; margin-block-start: 12px; }
article.idea .idea-body { margin-block-start: 12px; max-inline-size: 56ch; }
@media (min-width: 1100px) { article.idea:has(.thumb) .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
article.idea .facts { margin-block-start: 22px; padding-block-start: 18px; border-block-start: 1px solid var(--line); }
@media (min-width: 880px) { article.idea:not(:has(.thumb)) .facts { margin-block-start: 0; padding-block-start: 0; border-block-start: 0; } }
.idea-more { margin-block-start: 14px; font-size: 0.875rem; color: var(--ink-2); }
.thumb { position: relative; display: grid; place-items: center; border-radius: var(--r-m); overflow: clip; aspect-ratio: 16 / 9; container-type: inline-size; background: var(--surface-2); color: var(--ink-3); font: 800 1.5rem/1 var(--display); }
.thumb > span:not(.thumb-dur), .thumb > img::after { font-size: clamp(1rem, 15cqi, 4rem); } /* the letter grows with its tile */
.thumb-dur { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; background: rgb(14 13 12 / 0.82); color: var(--ink); padding: 2px 8px; border-radius: 6px; font: 600 0.8125rem/1.5 var(--text); }
.ideas { display: grid; gap: 1px; margin-block-start: 20px; border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; background: var(--surface); }
@media (min-width: 880px) { .ideas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ideas > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* a last idea without a neighbour takes the row: no empty cell beside it */ }
li.idea { outline: 1px solid var(--line); padding: 22px 24px; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0 14px; align-content: start; transition: background-color 150ms var(--ease); }
.idea-n { font: 300 2rem/1 var(--display); color: var(--ink-3); letter-spacing: -0.02em; }
.idea-kind { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--ink-3); font-size: 0.75rem; font-weight: 600; }
.idea-hot { color: var(--accent-text); }
.idea-body { color: var(--ink-2); }
li.idea h3 { margin-block: 4px 6px; }
li.idea .idea-body { font-size: 0.9375rem; line-height: 1.6; max-inline-size: 72ch; }
.idea-ev { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-block-start: 8px; color: var(--ink-3); font-size: 0.8125rem; }
.idea-ev > span { min-inline-size: 0; max-inline-size: 100%; overflow-wrap: anywhere; } /* a long word in a title wraps inside its item, it never widens the page */
.idea-ev b { color: var(--ink); font-weight: 600; margin-inline-start: 5px; }
.idea .calc { margin-block-start: 8px; }

/* ---------- charts: LTR islands, time flows left to right ---------- */
.plot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.plot-box { position: relative; direction: ltr; padding-inline-start: 44px; }
.plot-svg { display: block; inline-size: 100%; block-size: 200px; overflow: visible; }
@media (min-width: 700px) { .plot-l .plot-svg { block-size: 260px; } }
.plot-m .plot-svg { block-size: 180px; }
.plot-s .plot-svg { block-size: 150px; }
.plot-y { position: absolute; inset-block: 0 28px; inset-inline-start: 0; inline-size: 36px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; color: var(--ink-3); font: 500 0.6875rem/1 var(--text); }
.plot-y li:first-child { transform: translateY(-40%); }
.plot-y li:last-child { transform: translateY(40%); }
.plot-x { display: flex; justify-content: space-between; block-size: 28px; padding-block-start: 12px; color: var(--ink-3); font: 500 0.75rem/1 var(--text); }
.plot-grid { stroke: var(--line); stroke-width: 1; }
.plot-zero { stroke: var(--line-strong); stroke-width: 1; }
.plot-line { fill: none; stroke: var(--viz-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot-peak { fill: none; stroke: var(--viz-1); stroke-width: 9; stroke-linecap: round; }
.plot-alt .plot-line, .plot-alt .plot-peak, .plot-line.plot-s1 { stroke: var(--viz-2); }
.plot-line.plot-s2 { stroke: var(--viz-muted); }
.plot-wash0 { stop-color: var(--viz-1); stop-opacity: 0.3; }
.plot-alt .plot-wash0 { stop-color: var(--viz-2); stop-opacity: 0.16; }
.plot-wash1 { stop-color: var(--viz-1); stop-opacity: 0; }
.plot-alt .plot-wash1 { stop-color: var(--viz-2); }
.plot-bar, .plot-up { fill: var(--viz-2); }
.plot-bar.plot-top { fill: var(--viz-1); }
.plot-down { fill: var(--viz-muted); }
.plot-hit { fill: transparent; }
.plot-sum { color: var(--ink-3); font-size: 0.8125rem; direction: rtl; }

/* ranked bars */
.bars { display: grid; gap: 14px; }
.bars-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; }
.bars-name { font-weight: 500; overflow-wrap: anywhere; }
.bars-val { font: 600 0.9375rem/1 var(--display); }
.bars-item .hbar { grid-column: 1 / -1; }
.bars-item .tag { margin-inline-start: 8px; }
.bars-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--ink-3); font-size: 0.8125rem; }
.bars-more b { margin-inline-start: 5px; color: var(--ink-2); font-weight: 600; }
/* two values on one scale, large: paid next to organic on the song page */
.duo { gap: 30px; }
.duo .bars-name { font: 600 1.125rem/1.2 var(--display); }
.duo .bars-val { font: 800 clamp(1.875rem, 1.3rem + 2vw, 2.875rem)/1 var(--display); letter-spacing: -0.012em; }
.duo .hbar { block-size: 12px; margin-block: 8px 4px; }

/* age and gender pyramid (a table) */
.pyr { inline-size: 100%; border-collapse: separate; border-spacing: 0 8px; table-layout: fixed; }
.pyr col.pyr-mid { inline-size: 72px; }
.pyr thead th { padding: 0 0 4px; color: var(--ink-3); font: 600 0.8125rem/1.4 var(--text); text-align: start; }
.pyr thead th:last-child { text-align: end; }
.pyr tbody th { padding: 0 4px; color: var(--ink-2); font: 600 0.8125rem/1 var(--text); text-align: center; white-space: nowrap; }
.pyr td { padding: 0; }
.pyr-side { display: flex; align-items: center; gap: 8px; }
.pyr-side svg { flex: 1; block-size: 18px; display: block; min-inline-size: 0; }
.pyr-p { font: 600 0.8125rem/1 var(--display); color: var(--ink-2); min-inline-size: 4.5ch; }
.pyr-f .pyr-p { text-align: end; }
.pyr-b { fill: var(--viz-2); opacity: 0.75; }
.pyr-top { fill: var(--viz-1); opacity: 1; }

/* term chips */
.terms { display: flex; flex-wrap: wrap; gap: 8px; }
.term { display: inline-flex; align-items: center; gap: 10px; max-inline-size: 100%; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.9375rem; }
.term bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term b { font: 600 0.8125rem/1 var(--display); color: var(--ink-2); }
.term-brand { border-color: var(--line-strong); }

/* numbered editorial list */
.nlist { display: grid; }
.nlist-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline; padding-block: 14px; border-block-start: 1px solid var(--line); }
.nlist-item:first-child { border: 0; padding-block-start: 0; }
.nlist-n { color: var(--ink-3); font: 500 0.8125rem/1 var(--display); min-inline-size: 2ch; }
.nlist-t { font-weight: 500; overflow-wrap: anywhere; }
.nlist-s { display: block; color: var(--ink-3); font-size: 0.8125rem; }
.nlist-plain .nlist-item { grid-template-columns: minmax(0, 1fr); }

/* retention small multiples */
.minis { display: grid; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; }
@media (min-width: 720px) { .minis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .minis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* fewer empty tiles: under five share one row, six and seven sit in two rows */
  .minis:not(:has(> :nth-child(5))) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .minis:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .minis:has(> :nth-child(7):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.mini { outline: 1px solid var(--line); padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.mini h3 { font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-big { font: 700 1.5rem/1 var(--display); }
.mini-big small { font: 400 0.75rem/1 var(--text); color: var(--ink-3); margin-inline-start: 6px; }
.mini-svg { inline-size: 100%; block-size: 64px; display: block; direction: ltr; }
.mini-a { fill: rgb(207 203 194 / 0.10); }
.mini-l { fill: none; stroke: var(--viz-2); stroke-width: 1.5; }
.mini:first-child .mini-l { stroke: var(--viz-1); }
.mini:first-child .mini-a { fill: rgb(255 77 88 / 0.14); }

/* columns inside one wide panel, a titled part of a panel, a heading for blocks outside a panel */
.cols { display: grid; gap: 28px 40px; }
.cols > * { min-inline-size: 0; }
@media (min-width: 800px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sub > h4 { margin: 0; color: var(--ink-2); font: 600 0.9375rem/1.35 var(--display); }
.sub > h4 + :not(.panel-cap) { margin-block-start: 14px; }
.sub + .sub { margin-block-start: 28px; }
.cols > .sub + .sub { margin-block-start: 0; }
.panel > .cols:not(:first-child), .panel > .more + .cols { margin-block-start: 28px; padding-block-start: 28px; border-block-start: 1px solid var(--line); }
.more > .cols { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.more > .cols + .panel-foot, .more > .tbl + .panel-foot { margin-block-end: 8px; }
.grp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-block: 36px 16px; }
.grp h3 { font: 700 1.25rem/1.25 var(--display); overflow-wrap: anywhere; }
.grp .panel-cap { margin: 0; max-inline-size: 72ch; }
.sec-head + .gap { margin-block-start: 0; }

/* settings as a definition list: a small label over plain text */
.props { display: grid; gap: 16px; }
.props dt { color: var(--ink-3); font-size: 0.8125rem; }
.props dd { overflow-wrap: anywhere; }
.props .dashes { margin-block-start: 6px; }

/* public comments as quotes, one block per song */
.cmts { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; background: var(--surface); }
@media (min-width: 880px) { .cmts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cmt { outline: 1px solid var(--line); padding: 24px; display: grid; gap: 14px; align-content: start; min-inline-size: 0; }
.cmt h3 { overflow-wrap: anywhere; }
.quotes { display: grid; }
.quote { padding-block: 12px; border-block-start: 1px solid var(--line); }
.quote:first-child { border: 0; padding-block-start: 0; }
.quote-t { overflow-wrap: anywhere; }
.quote-cut { color: var(--ink-3); font-size: 0.8125rem; }
.quote-m { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-block-start: 4px; color: var(--ink-3); font-size: 0.8125rem; }

/* ---------- tables ---------- */
.tbl { overflow-x: auto; contain: paint; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tbl table { border-collapse: collapse; inline-size: 100%; }
.tbl caption { padding: 16px 18px 0; color: var(--ink-3); font-size: 0.8125rem; text-align: start; }
.tbl th { text-align: start; color: var(--ink-3); font-size: 0.8125rem; font-weight: 600; padding: 16px 18px; border-block-end: 1px solid var(--line); white-space: nowrap; }
.tbl th a { color: inherit; text-decoration: none; }
.tbl th[aria-sort] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.tbl td { padding: 14px 18px; border-block-end: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-block-end: 0; }
.tbl tbody tr { transition: background-color 150ms var(--ease); }
.tbl-n { font: 600 0.9375rem/1.2 var(--display); white-space: nowrap; }
.tbl-n .hbar { inline-size: 120px; block-size: 4px; margin-block-start: 8px; }
.tbl-sub { display: block; color: var(--ink-3); font: 400 0.8125rem/1.4 var(--text); }
bdi.tbl-sub { text-align: -webkit-match-parent; text-align: match-parent; } /* a technical line reads left to right and still starts where its cell starts */
.tbl .tag { white-space: normal; }
.panel .tbl { border: 0; border-radius: var(--r-m); background: var(--bg); }
.tbl-sort { display: none; } /* the sort links of a table in its card form, phones only */
@media (max-width: 719px) {
  .tbl-cards { overflow: visible; contain: none; }
  .tbl-cards table, .tbl-cards tbody, .tbl-cards td { display: block; }
  /* cards have no column headings: the sort links stand above them as a row that can be swiped, and the hidden heading row takes no keyboard focus */
  .tbl-sort { display: flex; align-items: center; gap: 6px; margin-block-end: 10px; padding: 3px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none; contain: paint; color: var(--ink-3); font-size: 0.8125rem; }
  .tbl-sort::-webkit-scrollbar { display: none; }
  .tbl-sort > span { flex: none; margin-inline-end: 4px; }
  .tbl-sort a { flex: none; display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
  .tbl-sort a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
  .tbl-cards thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); visibility: hidden; }
  .tbl-cards tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; padding: 18px; border-block-end: 1px solid var(--line); }
  .tbl-cards tbody tr:last-child { border-block-end: 0; }
  .tbl-cards td { padding: 0; border: 0; min-inline-size: 0; }
  .tbl-cards td:first-child, .tbl-cards td.tbl-wide { grid-column: 1 / -1; }
  .tbl-cards td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-block-end: 2px; color: var(--ink-3); font: 500 0.75rem/1.4 var(--text); white-space: normal; }
  .tbl-cards td:empty { display: none; }
  .tbl-cards .status { white-space: normal; align-items: flex-start; }
  .tbl-cards .status::before { flex: none; margin-block-start: 0.5em; }
  .tbl-cards .tbl-n .hbar { inline-size: 100%; }
}
@media (max-width: 359px) { .tbl-cards tr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 720px) {
  .tbl-wide-min table { min-inline-size: 900px; }
  /* a table of many columns: tighter cells and headings on two lines, so that it fits the page column */
  .tbl-wide-min :is(th, td) { padding-inline: 10px; }
  .tbl-wide-min :is(th, td):first-child { padding-inline-start: 18px; }
  .tbl-wide-min :is(th, td):last-child { padding-inline-end: 18px; }
  .tbl-wide-min th { white-space: normal; min-inline-size: 4.5rem; vertical-align: bottom; }
  .tbl .acts { flex-wrap: nowrap; }
  .tbl .copy { min-inline-size: 300px; } /* an invite link shows more than its first letters */
  .panel .tbl :is(th, td) { padding-inline: 12px; } /* a table inside a panel is narrow: a name keeps one line */
}
.song { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
@media (min-width: 720px) { .song { min-inline-size: 240px; } .tbl-wide-min .song { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; } }
.more > .ideas { margin-block-start: 0; }
.song .thumb { border-radius: 8px; font-size: 1rem; }
.song-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 600; text-decoration: none; }
.song-s { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--ink-3); font-size: 0.8125rem; }
.ident { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; }
.ident b { display: block; font: 700 1.0625rem/1.25 var(--display); overflow-wrap: anywhere; }
.ident > div > span { color: var(--ink-3); font-size: 0.8125rem; } /* the small line, not the letter of the avatar */

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field label { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; }
.field input { inline-size: 100%; min-block-size: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: 400 1rem var(--text); caret-color: var(--accent); transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
.field input:focus-visible { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(255 61 74 / 0.22); }
.form-row { display: grid; gap: 12px; }
@media (min-width: 800px) { .form-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; align-items: end; } }
.consent { display: flex; align-items: flex-start; gap: 14px; min-block-size: 44px; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.consent input { flex: none; inline-size: 22px; block-size: 22px; margin: 2px 0 0; }
.consent span { min-inline-size: 0; }
.consent:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.consent:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent:has(input:focus-visible) input { outline: 0; }
.fine { color: var(--ink-3); font-size: 0.8125rem; }
.copy { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.copy label { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-inline-size: 0; min-block-size: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); font: 400 1rem var(--text); }

/* ---------- footer ---------- */
.foot { border-block-start: 1px solid var(--line); padding-block: 56px 40px; }
.foot-mark { font: 800 clamp(2.5rem, 1rem + 9vw, 8.5rem)/0.95 var(--display); letter-spacing: -0.03em; color: var(--surface-3); direction: ltr; text-align: start; overflow-wrap: normal; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-block-start: 28px; color: var(--ink-3); font-size: 0.875rem; }
.foot nav { display: flex; gap: 20px; }

/* ---------- landing ---------- */
.hero { padding-block: 36px 64px; display: grid; gap: 40px; }
.hero > * { min-inline-size: 0; }
@media (min-width: 1000px) { .hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; padding-block: 64px 96px; gap: 56px; } }
.stage .hero h1 { font: 900 clamp(3.25rem, 1.4rem + 9.2vw, 8.75rem)/0.98 var(--display); letter-spacing: -0.02em; overflow-wrap: normal; }
.hero h1 > span { display: block; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-w { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .hero-w { animation: hero-word 620ms var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); } }
@keyframes hero-word { from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); } }
.hero-w2 { --i: 1; } .hero-w3 { --i: 2; } .hero-w4 { --i: 3; }
.hero-lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); color: var(--ink-2); max-inline-size: 46ch; margin-block-start: 24px; line-height: 1.6; }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-block-start: 32px; }
.hero-note { color: var(--ink-3); font-size: 0.875rem; }
.preview { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 22px; display: grid; gap: 18px; box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8); }
.preview > * { min-inline-size: 0; }
.preview-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-top b { font: 700 1rem/1.2 var(--display); }
.preview-demo { font-size: 0.75rem; color: var(--ink-2); border: 1px dashed var(--line-strong); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.preview-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-m); overflow: clip; container-type: inline-size; }
.preview-kpi > div { display: grid; align-content: space-between; gap: 2px; outline: 1px solid var(--line); padding: 12px 14px; padding-inline: clamp(8px, 4cqi, 14px); min-inline-size: 0; } /* the three numbers stand on one line */
.preview-kpi dt { color: var(--ink-3); font-size: 0.75rem; }
.preview-kpi dd { font: 700 1.25rem/1.2 var(--display); font-size: clamp(0.875rem, 5.6cqi, 1.25rem); } /* a third of a phone card: the number shrinks with the card and stays inside its tile */
.preview h3 { font-size: 0.875rem; color: var(--ink-2); margin-block-end: 12px; }
.band { border-block-end: 1px solid var(--line); }
.how { display: grid; }
@media (min-width: 900px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.how-step { padding: 36px 0; border-block-start: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.how-step:first-child { border-block-start: 0; }
@media (min-width: 900px) { .how-step { border-block-start: 0; padding: 48px 32px; border-inline-start: 1px solid var(--line); } .how-step:first-child { border-inline-start: 0; padding-inline-start: 0; } }
.how-n { font: 300 clamp(3rem, 2rem + 3vw, 4.75rem)/1 var(--display); color: var(--accent); letter-spacing: -0.03em; }
.how-step h3 { font-size: 1.375rem; }
.how-step p { color: var(--ink-2); max-inline-size: 34ch; }
.defs { display: grid; }
.def { display: grid; gap: 8px; padding-block: 28px; border-block-start: 1px solid var(--line); }
.def > * { min-inline-size: 0; }
@media (min-width: 900px) { .def { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; padding-block: 36px; } }
.def h3 { font: 700 clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem)/1.2 var(--display); }
.def p { color: var(--ink-2); max-inline-size: 62ch; }
.def p + p, .def ul + p { margin-block-start: 10px; }
.dashes { display: grid; gap: 8px; color: var(--ink-2); }
.dashes li { padding-inline-start: 22px; position: relative; }
.dashes li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block-start: 0.76em; inline-size: 10px; block-size: 2px; border-radius: 1px; background: var(--accent); }
.about-en { direction: ltr; text-align: start; }
.about-en h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); }
.about-en p { color: var(--ink-2); max-inline-size: 74ch; margin-block-start: 12px; }

/* ---------- live: first sync and a sync that runs while reading ---------- */
.live { display: grid; gap: 24px; padding-block: 40px 96px; }
.live > * { min-inline-size: 0; }
@media (min-width: 1000px) { .live { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; } }
.live-meter { appearance: none; -webkit-appearance: none; display: block; inline-size: 100%; block-size: 6px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-3); color: var(--accent); margin-block: 18px 10px; }
.live-meter::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.live-meter::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width 600ms var(--ease); }
.live-meter::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.live-meter:indeterminate { background: linear-gradient(90deg, var(--surface-3) 35%, var(--accent) 50%, var(--surface-3) 65%) 0 0 / 300% 100%; animation: live-slide 1.6s linear infinite; }
.live-meter:indeterminate::-webkit-progress-bar { background: transparent; }
.live-meter:indeterminate::-moz-progress-bar { background: transparent; }
@keyframes live-slide { from { background-position: 100% 0; } to { background-position: 0 0; } }
.live-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--ink-3); font-size: 0.8125rem; }
.live-steps { display: grid; margin-block-start: 14px; }
.live-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding-block: 13px; border-block-start: 1px solid var(--line); color: var(--ink-3); }
.live-steps li:first-child { border: 0; }
.live-dot { inline-size: 18px; block-size: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.live-why { display: none; grid-column: 2 / -1; color: var(--ink-2); font-size: 0.8125rem; font-weight: 400; }
.live-got { font: 600 0.8125rem/1 var(--display); color: var(--ink-3); }
.live-steps .is-done { color: var(--ink-2); }
.live-steps .is-done .live-dot { border-color: var(--ink-2); background: var(--ink-2); box-shadow: inset 0 0 0 4px var(--surface); }
.live-steps .is-now { color: var(--ink); font-weight: 600; }
.live-steps .is-now .live-dot { border-color: var(--accent); animation: live-pulse 1.4s var(--ease) infinite alternate; }
.live-steps .is-now .live-why { display: block; }
.live-steps .is-stop { color: var(--ink); font-weight: 600; } /* the step at which a failed run stopped */
.live-steps .is-stop .live-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); }
@keyframes live-pulse { from { box-shadow: 0 0 0 0 rgb(255 61 74 / 0.5); } to { box-shadow: 0 0 0 7px rgb(255 61 74 / 0); } }
.live h2 { font: 700 1.0625rem/1.35 var(--display); }
.live-title { margin-block-end: 14px; }
.live-found:empty::before { content: attr(data-empty); display: block; padding: 18px 22px; color: var(--ink-3); }
.live-found { display: grid; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; }
.live-found > div { outline: 1px solid var(--line); padding: 18px 22px; display: grid; grid-template-columns: minmax(38%, 1fr) minmax(0, auto); gap: 4px 12px; align-items: baseline; animation: live-in 520ms var(--ease) both; } /* a long value wraps, its label keeps its room */
@keyframes live-in { from { opacity: 0; transform: translateY(0.35em); } }
.live-found dt { color: var(--ink-2); }
.live-found dd { font: 700 1.25rem/1.2 var(--display); max-inline-size: 22ch; overflow-wrap: anywhere; text-align: end; }
.live-tips { display: grid; gap: 14px; margin-block-start: 28px; }
.live-fail p { color: var(--ink-2); }
.live-tip { border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; background: var(--surface); }
.live-tip h3 { margin-block-end: 8px; }
.live-tip p { color: var(--ink-2); }
.live-fail { display: grid; gap: 14px; justify-items: start; }
.live-state { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.live-state::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--accent); animation: live-pulse 1.4s var(--ease) infinite alternate; }
.toast { position: fixed; inset-block-end: 20px; inset-inline-start: 20px; z-index: 40; max-inline-size: calc(100vw - 40px); padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 0.875rem; box-shadow: 0 16px 40px -16px rgb(0 0 0 / 0.9); animation: fade-in 220ms var(--ease) both; }
.toast:empty { padding: 0; box-shadow: none; animation: none; }

/* ---------- narrow pages: sign in, messages, confirm ---------- */
.narrow { display: grid; gap: 20px; max-inline-size: 680px; padding-block: 40px 24px; }
.narrow > * { min-inline-size: 0; }
.narrow h2 { font: 700 1.25rem/1.25 var(--display); margin-block-start: 8px; }
.narrow p { color: var(--ink-2); }
.narrow .note, .narrow .acts { margin-block-start: 0; }
.narrow .msg-code { color: var(--surface-3); }
.msg-code { font: 800 clamp(5rem, 2rem + 18vw, 13rem)/0.85 var(--display); letter-spacing: -0.04em; color: var(--surface-3); direction: ltr; text-align: end; }
.cards { display: grid; gap: 14px; max-inline-size: 860px; }
.card-link { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); text-decoration: none; transition: background-color 150ms var(--ease), border-color 150ms var(--ease); }
.card-link .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 560px) { .card-link { grid-template-columns: auto minmax(0, 1fr) auto; padding: 28px; } .card-link .btn { grid-column: auto; } }
.card-link h2 { font: 700 clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem)/1.2 var(--display); overflow-wrap: anywhere; }
.card-link p { margin-block-start: 6px; color: var(--ink-3); font-size: 0.8125rem; }

/* ---------- legal ---------- */
.legal { max-inline-size: 76ch; padding-block: 40px 24px; }
.legal h1 { font: 800 clamp(2rem, 1.4rem + 2.4vw, 3.25rem)/1.05 var(--display); letter-spacing: -0.012em; margin-block-end: 10px; }
.legal h2 { font: 700 1.375rem/1.25 var(--display); margin-block: 36px 10px; }
.legal h3 { font-size: 1.125rem; margin-block: 28px 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p, .legal ul + p, .legal p + ul { margin-block-start: 12px; }
.legal a { color: var(--ink); }
.legal-en { direction: ltr; text-align: start; margin-block-start: 56px; padding-block-start: 8px; border-block-start: 1px solid var(--line); }
.legal-en h2:first-child { font: 800 clamp(1.625rem, 1.2rem + 1.6vw, 2.5rem)/1.1 var(--display); letter-spacing: -0.012em; }

/* ---------- preferences ---------- */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: var(--accent); }
  a.song-t:hover { text-decoration: underline; text-decoration-color: var(--accent); }
  .top-nav a:hover, .top-nav button:hover { color: var(--ink); background: var(--surface-2); }
  .btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
  .btn-solid:hover { background: #fff; border-color: #fff; }
  .btn-danger:hover { background: var(--accent); border-color: var(--accent); }
  .btn[disabled]:hover { background: transparent; border-color: var(--line-strong); }
  .secnav a:hover { color: var(--ink); background: var(--surface-2); }
  .period a:not([aria-current]):hover { color: var(--ink); }
  li.idea:hover, .tbl tbody tr:hover, .card-link:hover { background: var(--surface-2); }
  .card-link:hover { border-color: var(--line-strong); }
  .consent:hover { border-color: var(--ink-3); }
}
@media (pointer: coarse) {
  .btn-sm { min-block-size: 44px; }
  /* the top bar keeps its compact look; the tap area grows to 44px */
  .top-nav a, .top-nav button { position: relative; }
  .top-nav a::after, .top-nav button::after { content: ''; position: absolute; inset: -6px 0; }
  .secnav a, .period a { display: flex; align-items: center; min-block-size: 44px; }
  /* text links that stand alone (the brand, the legal links, a back link, a row of links): the tap area grows to 44px, the look stays */
  .top-brand, .foot nav a, .links a, .stage-back, .stage-sub a, .idea-more a, .sec-note a, .bars-name a, .nlist-t a, .ident b a, .tbl td > a, .cmt h3 a, .panel > h3 a, .props a { position: relative; }
  .top-brand::after, .foot nav a::after, .links a::after, .stage-back::after, .stage-sub a::after, .idea-more a::after, .sec-note a::after, .bars-name a::after, .nlist-t a::after, .ident b a::after, .tbl td > a::after, .cmt h3 a::after, .panel > h3 a::after, .props a::after { content: ''; position: absolute; inset-inline: 0; inset-block: calc((100% - 44px) / 2); }
  /* two titles that clip their text cannot grow a tap area outside their box: the link itself gets the height, in the same place on screen */
  a.song-t { padding-block: 9px; margin-block: -9px; }
  .mini h3 { overflow: visible; }
  .mini h3 a { display: block; overflow: hidden; text-overflow: ellipsis; padding-block: 14px; margin-block: -14px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: 240ms; animation-timing-function: var(--ease); }
  .period a[aria-current] { view-transition-name: period-pill; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .btn:active, .secnav a:active { transform: none; }
}
@media (prefers-contrast: more) { :root { --line: #4A4743; --line-strong: #77726B; --ink-2: #D6D2C8; --ink-3: #B8B3A9; --viz-muted: #8A857C; } }
@media (prefers-reduced-transparency: reduce) { .secnav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); } }
@media (forced-colors: active) {
  .plot-line, .plot-peak, .mini-l { stroke: CanvasText; }
  .plot-bar, .plot-up, .hbar-fill, .eq-on, .eq-peak, .pyr-b { fill: CanvasText; opacity: 1; }
  .plot-down, .hbar-old, .hbar-track, .eq-seg { fill: GrayText; }
  .eq-on, .eq-peak, .hbar-fill.hbar-old { fill: CanvasText; }
  .kpi, li.idea, .mini, .cmt, .tag, .term, .consent, .live-found > div { border: 1px solid CanvasText; }
  .live-meter { appearance: auto; -webkit-appearance: auto; block-size: 12px; }
  .status::before, .note::before, .calc::before, .live-dot { forced-color-adjust: none; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f3f2ef; --surface-3: #dedbd4; --line: #cfccc5; --line-strong: #8f8b83; --ink: #111; --ink-2: #333; --ink-3: #555; --viz-2: #444; --viz-muted: #aaa; color-scheme: light; }
  .top-nav, .secnav, .skip, .toast, .foot-mark, .stage-acts, .demo-banner { display: none; }
  .stage::before, .stage::after { display: none; }
  .sec, .panel, .kpis, article.idea, li.idea, .mini, .cmt { break-inside: avoid; }
  .tbl { overflow: visible; contain: none; }
  .tbl-wide-min table { min-inline-size: 0; }
  .tbl th { white-space: normal; }
  .song { min-inline-size: 0; grid-template-columns: minmax(0, 1fr); }
  .song .thumb, .tbl-n .hbar { display: none; }
  .page { padding-block-end: 24px; }
}
