/* ARK brand tokens v1 (2026-11-02). One system for every ARK site.
   arksounds.com: concatenated ahead of sounds-site/assets/site.css by sounds-site/tools/stage.py (one cached file).
   ARK Move and arkwellness.ai adopt it after launch. Sites read the --ark-* names; the accent block picks the mood.
   Icon: the gold sound bars, brand/ark-sound-bars.svg. */
:root {
  /* Palette */
  --ark-ink: #0a0b0e;
  --ark-navy: #0d1828;
  --ark-panel: #14171e;
  --ark-line: #262a33;
  --ark-gold: #c8b273;
  --ark-sand: #cbb89a;
  --ark-ivory: #f3ede1;
  --ark-muted: #a3a9b4;
  --ark-gold-soft: #e0cf9a;     /* links and hover on gold */
  --ark-text-soft: #c9ccd3;     /* secondary text on art */
  --ark-line-hover: #3a404b;    /* border on hover */
  --ark-surface-hi: #171a22;    /* tile gradient, top */
  --ark-surface-lo: #101218;    /* tile gradient, bottom */
  --ark-warm-hi: #262014;       /* active tile gradient, top */
  --ark-warm-lo: #12141a;       /* active tile gradient, bottom */
  /* The same colours as space-separated channels, for alpha: rgb(var(--ark-gold-rgb) / .12). Keep in step with the hex. */
  --ark-gold-rgb: 200 178 115;
  --ark-sand-rgb: 203 184 154;
  --ark-ink-rgb: 10 11 14;
  --ark-navy-rgb: 13 24 40;
  --ark-shadow-rgb: 5 6 8;      /* caption scrims and halos */
  /* Type */
  --ark-display: "Cormorant Garamond", "Cormorant Fallback", "Iowan Old Style", Georgia, serif;
  --ark-ui: "Manrope", "Manrope Fallback", "Segoe UI", system-ui, sans-serif;
  --ark-text-hero: clamp(34px, 6.5vw, 58px);
  --ark-text-title: 18px;
  --ark-text-body: 14px;
  --ark-text-small: 12px;
  /* Radii */
  --ark-radius-sm: 12px;
  --ark-radius: 16px;
  --ark-radius-lg: 20px;
  /* Spacing scale (4px base) */
  --ark-s1: 4px; --ark-s2: 8px; --ark-s3: 12px; --ark-s4: 16px; --ark-s5: 24px; --ark-s6: 32px; --ark-s7: 48px; --ark-s8: 64px;
  /* Motion */
  --ark-ease: cubic-bezier(.2, .7, .2, 1);
  --ark-fast: 200ms;
  --ark-slow: 250ms;
  /* Per-site accent (default: arksounds, desert night) */
  --ark-accent: var(--ark-sand);
  --ark-glow: rgba(203, 184, 154, .16);
}
[data-ark-site="move"] { --ark-accent: #e8c45a; --ark-glow: rgba(232, 196, 90, .22); }       /* higher energy, higher contrast */
[data-ark-site="wellness"] { --ark-accent: #d9cbb0; --ark-glow: rgba(217, 203, 176, .12); }   /* calm daylight */
@media (prefers-reduced-motion: reduce) { :root { --ark-fast: 0ms; --ark-slow: 0ms; } }

/* ARK Sounds: a five-star resort after dark. Shared tokens come from brand/ark-tokens.css (tools/stage.py ships both
   as one file). Rules use tokens only: no colour literals below this line except inside the inline SVG data URIs.
   Gold marks what is active or playing; sand carries the details. Consolidated 11/2/2026 from six review rounds;
   checked against the previous build with a computed-style diff on every page. */

:root {
  --navy: var(--ark-ink);
  --deep: var(--ark-navy);
  --panel: var(--ark-panel);
  --line: var(--ark-line);
  --ivory: var(--ark-ivory);
  --muted: var(--ark-muted);
  --gold: var(--ark-gold);
  --gold-soft: var(--ark-gold-soft);
  --display: var(--ark-display);
  --body: var(--ark-ui);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --radius: var(--ark-radius-lg);
  --motion: transform var(--ark-slow) var(--ark-ease), border-color var(--ark-fast) ease-out, background var(--ark-fast) ease-out,
    box-shadow var(--ark-slow) ease-out, color var(--ark-fast) ease-out;
  --ark-hairline: .5px solid rgb(var(--ark-gold-rgb) / .42);
  /* Monogram: the ARK sound-bars glyph and a small lozenge, half-drop repeat, sand at 4.5%. Tone-on-tone only. */
  --ark-monogram: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23cbb89a' fill-opacity='.045'%3E%3Crect x='7' y='12' width='2.6' height='9' rx='1.3'/%3E%3Crect x='11.7' y='8' width='2.6' height='13' rx='1.3'/%3E%3Crect x='16.4' y='14' width='2.6' height='7' rx='1.3'/%3E%3Crect x='39' y='44' width='2.6' height='9' rx='1.3'/%3E%3Crect x='43.7' y='40' width='2.6' height='13' rx='1.3'/%3E%3Crect x='48.4' y='46' width='2.6' height='7' rx='1.3'/%3E%3Cpath d='M45 12l3 4-3 4-3-4zM13 44l3 4-3 4-3-4z'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ivory); font: 400 0.875rem/1.5 var(--body); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
  background: radial-gradient(120% 55% at 50% -14%, rgb(var(--ark-sand-rgb) / .16), rgb(var(--ark-navy-rgb) / .55) 42%, transparent 64%), var(--navy);
  padding-bottom: calc(var(--barH, 96px) + 16px); }
[hidden] { display: none !important; }
img, video, svg, canvas { max-width: 100%; }
a { color: var(--gold-soft); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 16px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1rem + 4vw, 4rem); line-height: 1.12; letter-spacing: -.005em; }
h2, h3 { font-family: var(--body); font-weight: 600; line-height: 1.3; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
#pairHead, #colHead { font-family: var(--display); font-size: clamp(1.5rem, 1rem + 2.4vw, 1.875rem); font-weight: 600; line-height: 1.1; }
.eyebrow { font-size: 0.625rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ark-sand); font-weight: 600; margin: 0; }
.lede { font-size: 1.0625rem; color: var(--muted); max-width: 54ch; margin: 0; }
.small { font-size: 0.8125rem; color: var(--muted); }
sup a { text-decoration: none; font-size: .75em; font-weight: 600; }

/* ---------- Header and wordmark ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 16px; flex-wrap: nowrap; }
.mark { position: relative; flex: 0 1 auto; margin-right: auto; padding-bottom: 6px; font-family: var(--display); font-weight: 600; font-size: clamp(1rem, .8rem + 1vw, 1.1875rem);
  letter-spacing: .22em; color: inherit; text-decoration: none; white-space: nowrap; }
.mark::after { content: ""; position: absolute; left: 0; right: .3em; bottom: 0; border-bottom: var(--ark-hairline); }
.mark span { color: var(--gold); }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.7812rem; letter-spacing: .14em; text-transform: uppercase; min-height: 44px;
  display: inline-flex; align-items: center; padding: 0 6px; white-space: nowrap; }
.topnav a:hover { color: var(--gold-soft); }
body.spot .topnav { display: flex; gap: var(--ark-s2); }
.snd { display: inline-flex; justify-content: flex-end; min-width: 44px; min-height: 44px; } /* reserves the toggle's space: no layout shift */
@media (min-width: 720px) { .snd { min-width: 110px; } }

/* ---------- Hero, morning banner ---------- */
section.hero { padding-block: 16px 20px; display: grid; gap: 8px; }
section.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 1rem + 4vw, 3.625rem); }
.sub { margin: 0; font-family: var(--body); font-size: 1rem; font-weight: 600; color: var(--muted); }
.morning { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(110deg, rgb(var(--ark-gold-rgb) / .10), var(--panel) 65%); }
.morning svg { width: 30px; height: 30px; flex: none; stroke: var(--gold-soft); fill: none; stroke-width: 1.5; stroke-linecap: round; }
.morning div { flex: 1; min-width: 0; }
.morning p { margin: 0; }

/* ---------- Sections ---------- */
.section { display: grid; gap: 18px; padding-block: 50px; }
@media (max-width: 760px) { .section { padding-block: 32px; } .collections { padding-bottom: 16px; } .pairs > .pair:first-child { padding-top: 8px; } }
.collections > .small { margin: 0; }
.rooted, .pair-soon { margin: 12px 0 0; font-size: 0.75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ark-sand); }

/* ---------- Tiles ---------- */
.tiles6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .tiles6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.t-play { position: relative; display: grid; grid-template-rows: 28px auto auto; gap: 8px; align-content: start; text-align: left; min-height: 144px;
  padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(160deg, var(--ark-surface-hi), var(--ark-surface-lo));
  color: var(--ivory); font: inherit; cursor: pointer; transition: var(--motion); }
.t-play:hover { border-color: var(--ark-line-hover); transform: translateY(-2px); }
.t-play:active { transform: scale(.98); }
.t-play svg { width: 28px; height: 28px; stroke: currentColor; color: var(--gold); opacity: .8; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.t-play .t-name { align-self: start; font-family: var(--body); font-weight: 600; font-size: 1.125rem; line-height: 1.2; }
.t-play .t-for { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.t-play[aria-pressed="true"] { border-color: var(--gold); background: linear-gradient(160deg, var(--ark-warm-hi), var(--ark-warm-lo) 70%); box-shadow: 0 0 32px rgb(var(--ark-gold-rgb) / .12); }
.t-play[aria-pressed="true"]::after { content: ""; position: absolute; top: 18px; right: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: arkpulse 2.4s ease-in-out infinite; }
@keyframes arkpulse { 50% { opacity: .35; } }

/* ---------- Collections (posters) ---------- */
.posters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; } /* hero spans 2: 8 cells, two even rows */
@media (max-width: 760px) { .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.poster { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 4 / 5; display: grid; align-content: end; gap: 4px; text-align: left;
  padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--deep); color: var(--ivory); font: inherit; cursor: pointer; transition: var(--motion); }
.poster.hero { grid-column: span 2; aspect-ratio: auto; min-height: 260px; padding-bottom: 20px; gap: 8px; }
@media (max-width: 760px) { .poster.hero { min-height: 220px; } }
.poster.wide { grid-column: span 2; aspect-ratio: auto; min-height: 200px; } /* Generative: opt-in, closes the grid evenly */
.poster.hero .p-line, .poster.wide .p-line { min-height: 0; } /* full-width cards: no shared caption height (Codex r9) */
.soon { opacity: .55; cursor: default; }
.soon-tag { font-size: 0.6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ark-sand); }
.poster::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22; mix-blend-mode: overlay; pointer-events: none;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Caption scrim: clear to 40% so the art reads, deepening under the caption block (WCAG AA, tools/check_contrast.py) */
.poster::after { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, transparent 28%, rgb(var(--ark-shadow-rgb) / .10) 36%, rgb(var(--ark-shadow-rgb) / .34) 44%,
    rgb(var(--ark-shadow-rgb) / .56) 51%, rgb(var(--ark-shadow-rgb) / .64) 58%, rgb(var(--ark-shadow-rgb) / .74) 72%, rgb(var(--ark-shadow-rgb) / .80) 100%); }
.poster.hero::after { background: linear-gradient(180deg, transparent 45%, rgb(var(--ark-shadow-rgb) / .12) 55%, rgb(var(--ark-shadow-rgb) / .36) 68%,
  rgb(var(--ark-shadow-rgb) / .54) 82%, rgb(var(--ark-shadow-rgb) / .65) 100%); } /* round 6 end points (Codex r7), eased (r8) */
.poster:hover { transform: translateY(-2px); border-color: var(--ark-line-hover); }
.poster:active { transform: scale(.98); }
.poster[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 32px rgb(var(--ark-gold-rgb) / .12); }
.p-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; }
.p-no { font-size: 0.6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ark-sand); min-height: 1.5em; line-height: 1.5; }
.p-name { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, .75rem + 2.5vw, 2.125rem); line-height: 1.15; }
.poster.hero .p-name { font-size: clamp(1.75rem, 1rem + 4vw, 3.5rem); }
.p-line { font-size: 0.8125rem; color: var(--ark-text-soft); min-height: 3em; line-height: 1.5; }
@media (max-width: 760px) { .p-line { min-height: 4.5em; } } /* after the base rule, so it wins (Codex r8) */
/* Caption halo: keeps AA where a bright horizon line or glow runs behind small text */
.poster .p-no, .poster .p-name, .poster .p-line { text-shadow: 0 1px 2px rgb(var(--ark-shadow-rgb) / .7), 0 0 16px rgb(var(--ark-shadow-rgb) / .75); }
.poster .p-no { text-shadow: 0 0 2px rgb(var(--ark-shadow-rgb) / .9), 0 0 8px rgb(var(--ark-shadow-rgb) / .9), 0 0 16px rgb(var(--ark-shadow-rgb) / .75); } /* small type over the brightest band */

/* ---------- Pair with ARK (spa menu) ---------- */
.pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; padding: 24px 0; border-bottom: var(--ark-hairline); }
.pair:last-child { border-bottom: 0; }
.pair h3 { font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1.2vw, 1.375rem); line-height: 1.1; font-weight: 600; }
.pair p { margin: 0; color: var(--muted); }
.pair-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pair-opts a.chip { display: inline-flex; align-items: center; text-decoration: none; }
@media (min-width: 760px) {
  .pair { grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 4px 20px; }
  .pair h3 { grid-row: 1; }
  .pair p { grid-row: 1 / span 2; grid-column: 2; }
  .pair-opts { grid-row: 1 / span 2; grid-column: 3; }
}

/* ---------- Controls ---------- */
.chip { background: transparent; color: var(--ivory); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: 500 0.8125rem var(--body);
  cursor: pointer; min-height: 44px; transition: var(--motion); }
.chip:hover { border-color: var(--ark-line-hover); }
.chip[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-soft); background: rgb(var(--ark-gold-rgb) / .08); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold-soft); background: transparent; font: 600 0.875rem var(--body); letter-spacing: .06em; text-decoration: none;
  cursor: pointer; transition: var(--motion); }
.btn:hover { background: var(--gold); color: var(--navy); }
.btn.solid { background: var(--gold); color: var(--navy); }
.btn.solid:hover { background: var(--gold-soft); }
.btn.small { min-height: 44px; padding: 8px 18px; font-size: 0.8125rem; }
.btn.listen { gap: 10px; }
.btn.listen svg { width: 16px; height: 16px; fill: currentColor; }
.btn.listen[aria-pressed="true"] { box-shadow: 0 0 32px rgb(var(--ark-gold-rgb) / .22); }
.icon { min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ivory); display: inline-grid;
  place-items: center; cursor: pointer; font: 600 0.8125rem var(--body); flex: none; transition: var(--motion); }
.icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon:disabled, .play:disabled { opacity: .45; cursor: default; }
.field { display: grid; gap: 6px; font-size: 0.6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 0; }
input[type=range] { width: 100%; min-width: 120px; height: 44px; accent-color: var(--gold); }
.toggle { display: inline-flex; gap: 10px; align-items: center; font-size: 0.875rem; cursor: pointer; min-height: 44px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--gold); }
.small-toggle { font-size: 0.8125rem; color: var(--muted); }

/* ---------- Player bar ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; max-height: 60dvh;
  background: rgb(var(--ark-ink-rgb) / .94); border-top: 1px solid var(--line);
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bar.on { border-top-color: var(--gold); box-shadow: 0 -12px 40px rgb(var(--ark-gold-rgb) / .12); }
/* Audio-reactive glow: --glow comes from the analyser on the gain chain (0 to 0.18); static under reduced motion */
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: -64px; height: 64px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 100%, rgb(var(--ark-gold-rgb)), transparent 70%); opacity: var(--glow, 0); transition: opacity 120ms linear; }
.bar-main, .bar-more { width: 100%; max-width: 1080px; margin: 0 auto; }
.bar-main { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.play { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--gold); color: var(--navy); cursor: pointer; display: grid;
  place-items: center; flex: none; transition: transform .2s ease-out, background .2s ease-out; }
.play:hover { background: var(--gold-soft); transform: scale(1.04); }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play.loading { background: transparent; color: var(--gold); box-shadow: 0 0 0 2px var(--line) inset; }
.play.loading::before { content: ""; position: absolute; width: 56px; height: 56px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold); animation: arkspin .9s linear infinite; }
@keyframes arkspin { to { transform: rotate(360deg); } }
.swatch { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; object-position: 50% 20%; flex: none; }
.bar-now { flex: 1; min-width: 0; }
.bar-now p { margin: 0; }
.bar-now .eyebrow { font-size: 0.6875rem; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.on .bar-now .eyebrow { color: var(--gold); } /* gold only while playing */
.bar-name { font-family: var(--body); font-weight: 600; font-size: clamp(.875rem, .75rem + .6vw, 1rem); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bar-src { font-size: 0.75rem; display: flex; flex-wrap: wrap; column-gap: 6px; min-width: 0; white-space: nowrap; }
#nowSource { max-width: 100%; overflow: hidden; text-overflow: ellipsis; } /* the clock wraps under the credit on a phone, never cut */
.time { flex: none; font-family: var(--body); font-size: 0.75rem; color: var(--ivory); min-width: 5ch; }
#next svg { fill: currentColor; stroke: none; }
#fav[aria-pressed="true"], #fav2[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
#fav[aria-pressed="true"] svg { fill: currentColor; }
#fav2 { justify-self: start; }
#retry { border-radius: 999px; padding: 0 14px; border-color: var(--gold); color: var(--gold-soft); }
@media (max-width: 400px) { #fav { display: none; } .swatch { width: 40px; height: 40px; } }
@media (min-width: 401px) { #fav2 { display: none; } }
.bar-more { display: grid; gap: 10px; padding-top: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background-image: var(--ark-monogram); background-size: 64px 64px; }
.timer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; }
.edition { margin: -6px 0 0; font-size: 0.625rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ark-sand); }
.tracklist { display: grid; }
.tracklist .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--ark-s3); width: 100%; min-height: 44px; padding: 12px;
  text-align: left; background: transparent; color: var(--ivory); border: 0; border-bottom: var(--ark-hairline); font: 600 0.875rem var(--body); cursor: pointer; transition: var(--motion); }
.tracklist .row[aria-pressed="true"] { color: var(--gold); }
.tracklist .row.fav::before { content: "\2665  "; color: var(--gold); }
.tracklist .row .bpm { flex: none; font-size: 0.6875rem; font-weight: 600; letter-spacing: .1em; color: var(--muted); }
/* Tempo: Any / Chill / Groove / Drive, fine nudge behind the dots */
.tempo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 44px; gap: var(--ark-s2); align-items: center; }
.tempo .chip { padding-inline: 8px; }
#tempoNote { margin: -4px 0 0; color: var(--ark-sand); }
#tempoNote:empty { display: none; }
#nudgeBtn svg { stroke-width: 3; }
.nudge { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ark-s3); align-items: end; }
.nudge output { margin-left: 6px; color: var(--ivory); letter-spacing: 0; font-family: var(--body); text-transform: none; font-size: 0.75rem; }
/* Nature beds */
.beds-wrap { display: grid; gap: var(--ark-s2); }
.beds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ark-s2); }

/* ---------- Spotlight cards, badges, footer ---------- */
.cards2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .cards2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards2 { grid-template-columns: 1fr; } }
.card2 { display: grid; gap: 8px; align-content: start; background: var(--panel) var(--ark-monogram); background-size: 64px 64px; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; }
.card2 p { margin: 0; font-size: 0.875rem; color: var(--muted); }
.card2 .more { font-size: 0.875rem; min-height: 44px; display: inline-flex; align-items: center; }
.credit-links { display: flex; gap: var(--ark-s4); margin: 0; }
.legendrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Evidence badges: no gold (gold is for playing). Strong ivory, Some sand, Early muted. No letters shown. */
.badge { display: inline-block; justify-self: start; font-size: 0.6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.badge[data-g="A"] { color: var(--ivory); }
.badge[data-g="B"] { color: var(--ark-sand); }
.foot { display: grid; gap: 6px; margin-top: 24px; padding-block: 24px 40px; font-size: 0.8125rem; color: var(--muted); border-top: var(--ark-hairline);
  background-image: var(--ark-monogram); background-size: 64px 64px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { min-height: 44px; display: inline-flex; align-items: center; }
.signoff { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px 12px; }
.seal { flex: none; width: 66px; height: 66px; border-radius: 50%; border: var(--ark-hairline); outline: .5px solid rgb(var(--ark-gold-rgb) / .26); outline-offset: -5px;
  display: grid; place-content: center; text-align: center; gap: 1px; color: var(--ark-sand); }
.seal span { font-size: 0.4688rem; font-weight: 600; letter-spacing: .2em; }
.seal b { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: .22em; padding-left: .22em; line-height: 1; }

/* ---------- Research Spotlight articles (learn/, history) ---------- */
.article { padding-block: var(--ark-s5) 0; display: grid; gap: var(--ark-s6); }
.article header { display: grid; gap: var(--ark-s4); padding-bottom: 24px; border-bottom: var(--ark-hairline); }
.article h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 1rem + 4vw, 3.25rem); line-height: 1.15; }
.article h2 { font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1.5vw, 1.5rem); line-height: 1.2; margin-bottom: var(--ark-s3); }
.article .lede { color: var(--ivory); }
.article section ul { display: grid; gap: var(--ark-s3); padding-left: 1.1em; margin: 0; }
.article li, .article section p { color: var(--muted); max-width: 68ch; }
.found-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ark-s3); }
.found-head h2 { margin-bottom: 0; }
.found-head + ul { margin-top: var(--ark-s3) !important; }
.refs { list-style: none; padding: 0 !important; display: grid; gap: 14px !important; counter-reset: r; }
.refs li { font-size: 0.875rem; color: var(--muted); padding-left: 34px; position: relative; max-width: none !important; }
.refs li::before { counter-increment: r; content: counter(r); position: absolute; left: 0; top: 0; font: 600 0.8125rem var(--mono); color: var(--ark-sand); }
.refs .who { display: block; color: var(--ivory); }
.legend { font-size: 0.6875rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ark-sand); border: 1px solid currentColor;
  border-radius: 999px; padding: 1px 8px; vertical-align: 2px; margin-right: 6px; white-space: nowrap; }

/* ---------- Brand surfaces ---------- */
.mark-foot { font-size: 1.1875rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .t-play:hover, .t-play:active, .poster:hover, .poster:active, .play:hover { transform: none; }
}

/* ---------- Fonts: self-hosted (SIL OFL 1.1; licences in assets/fonts/), latin subsets ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/cormorant-garamond-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/manrope-latin.woff2") format("woff2"); }
/* Metric-matched fallbacks (size-adjust and overrides computed from the font files against Georgia and Arial), so the swap
   to the web fonts does not shift layout. The fonts are not preloaded: on a phone link they compete with the hero image. */
@font-face { font-family: "Cormorant Fallback"; src: local("Georgia"); size-adjust: 90.98%; ascent-override: 101.56%; descent-override: 31.55%; line-gap-override: 0%; }
@font-face { font-family: "Manrope Fallback"; src: local("Arial"), local("ArialMT"); size-adjust: 96.4%; ascent-override: 110.58%; descent-override: 31.12%; line-gap-override: 0%; }
.build { margin: 0; font-size: 0.6875rem; letter-spacing: .04em; opacity: .7; }
.yourmusic { margin: 0; } .yourmusic a { white-space: nowrap; }
/* /picks (private) */
.pick-cat h2 { font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1.5vw, 1.5rem); margin: var(--ark-s6) 0 var(--ark-s3); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; }
.pick { display: flex; gap: var(--ark-s3); align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: var(--ark-hairline); }
.pick-info { min-width: 0; }
.pick-info p { margin: 2px 0 0; }
.pick-title { font-weight: 600; }
.pick-btns { display: flex; gap: var(--ark-s2); flex: none; }
.pick-btns .icon[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
.pick-btns .icon[aria-pressed="true"] svg { fill: currentColor; }
.pick[data-vote="down"] .pick-info { opacity: .5; }

/* Phone sizing (S25-class 360-412 px, text size up to 1.3x): nothing may overflow sideways */
.top { min-width: 0; }
.mark { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topnav, .snd { flex: none; }
@media (max-width: 380px) { .mark { letter-spacing: .16em; } .topnav a { letter-spacing: .08em; padding: 0 4px; } }
/* chip rows wrap instead of squeezing: durations, tempo, nature beds, Pair lengths */
.timer, .tempo, .beds { display: flex; flex-wrap: wrap; }
.timer .chip, .tempo .chip, .beds .chip { flex: 1 1 auto; min-width: 44px; }
.tempo #nudgeBtn { flex: none; }
.chip { max-width: 100%; min-width: 44px; white-space: normal; overflow-wrap: anywhere; }
/* titles: one tidy line with an ellipsis in the drawer; the mini player keeps two lines, then an ellipsis */
.tracklist .row { flex-wrap: nowrap; }
.tracklist .row .rname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-now, .bar-name, .bar-now .eyebrow { min-width: 0; max-width: 100%; }
.bar-name { overflow-wrap: anywhere; }
.edition, #listHead { overflow-wrap: anywhere; }
.bar-main { min-width: 0; }
.tiles6 > *, .posters > *, .cards2 > * { min-width: 0; }
.t-play .t-name, .t-play .t-for, .p-name, .p-line, .card2 h3, .article h1, .article h2 { overflow-wrap: anywhere; }
.badge { white-space: normal; max-width: 100%; }
.card2 p, .card2 a, .refs a, .refs .who, .article p, .article li, .lede { overflow-wrap: anywhere; }
.article, .article > *, .article header > *, main, .section > * { min-width: 0; }
.btn { max-width: 100%; white-space: normal; text-align: center; }

/* Standalone links are controls too; inline article citations keep text flow. */
.mark[href], .more, .pick-title, .credit-links a { display: inline-flex; align-items: center; min-height: 44px; }
.mark[href] { display: block; align-content: center; }
.topnav a, .foot-links a { min-width: 44px; }
.credit-links { flex-wrap: wrap; }
.pick-info { flex: 1; }
.pick-title { overflow-wrap: anywhere; }
.tracklist .row .rname { flex: 1; }
.top { padding-top: max(16px, env(safe-area-inset-top, 0px)); }
/* Let content establish poster height when enlarged text exceeds the art ratio. */
@media (max-width: 760px) {
  .poster { aspect-ratio: auto; min-height: 220px; }
}
/* A title row and a control row preserve readable titles, even with Retry shown.
   The sheet alone scrolls; transport controls remain in view. */
@media (max-width: 600px) {
  .bar-main { display: grid; grid-template-columns: 56px minmax(0, 1fr) repeat(3, 44px); gap: 8px; }
  .bar-now { grid-column: 2 / -1; grid-row: 1; }
  .swatch { grid-column: 1; grid-row: 1; width: 44px; height: 44px; justify-self: center; }
  .bar-main:not(:has(.swatch:not([hidden]))) .bar-now { grid-column: 1 / -1; }
  #play { grid-column: 1; grid-row: 2; }
  #retry { grid-column: 2; grid-row: 2; padding-inline: 6px; font-size: clamp(.75rem, .5rem + 1vw, .8125rem); }
  #next { grid-column: 3; grid-row: 2; }
  #fav { grid-column: 4; grid-row: 2; display: inline-grid; }
  #more { grid-column: 5; grid-row: 2; }
  #fav2 { display: none; }
  .bar-name { display: block; white-space: nowrap; text-overflow: ellipsis; line-height: 1.5; }
  .bar-more { scroll-padding-block: 12px; }
  .time { font-size: clamp(.75rem, .5rem + 1vw, .875rem); }
}
