/* Hallmark · shape: Night Shelf, a video index whose rows are sounds · genre: atmospheric · theme: custom · job: listen · idea: "a late-night shelf of ASMR videos sorted by sound, the sounds you hate struck out at the top" · vibe: "lamp off, programme guide, soft focus stills"
 * paper: oklch(15.5% 0.012 40) night, oklch(95.6% 0.004 60) day · accent: oklch(73% 0.14 18) rose, used for what you never want to hear · display: Gloock · body: Onest · hero: tonight's player with its queue beside the headline · nav: search-led bar over a sticky sound strip · footer: statement · imagery: generated soft-focus stills as stand-in thumbnails in product slots · signature: the sound strip, where Never play chips are struck through in rose before a single video loads
 * axes: dark/high-contrast-serif/chromatic-rose · posture: restrained · modes: light+dark · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V5 · weakest: S, a grid of thumbnails is every video site; the struck-through Never play chips in the sticky strip and rows named by sound are what only this index has */
/* Hallmark · waive 80 · generated soft-focus stills stand in for YouTube thumbnails · the page host blocks remote images and the real site shows each video's own YouTube thumbnail in these slots */
/* Hallmark · dismissed F4 · the round play glyph is the video player's own control drawn on the still; the one filled action on the page is Play with sleep timer */
/* Hallmark · waive 59 · rows of videos part by hairlines and 96px · a video shelf is a dense macrostructure that separates its rows with rules, a band and a change of size */
@import url("./tokens.css");
@import url("./base.css");

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }
body { font-weight: 400; }
h1, h2, h3 { font-weight: 400; letter-spacing: var(--tracking-display); line-height: 1.04; }
.muted { color: var(--color-muted); }
.small { font-size: var(--text-sm); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky-nav); height: var(--bar-height); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.topbar .container { height: 100%; display: flex; align-items: center; gap: var(--space-lg); }
.wordmark { font: 400 1.75rem/1 var(--font-display); letter-spacing: -0.015em; color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.search { flex: 1 1 auto; max-width: 40rem; margin-inline: auto; display: flex; align-items: center; gap: var(--space-xs); min-height: 46px; padding: 0 var(--space-xs) 0 var(--space-md); border: var(--rule-hair) solid var(--color-muted); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-muted); }
.search:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.search svg { width: 18px; height: 18px; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: var(--color-clear); color: var(--color-ink); outline: none; }
.search input::placeholder { color: var(--color-muted); }
.search kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border: var(--rule-hair) solid var(--color-muted); border-radius: var(--space-xs); font: 400 var(--text-sm)/1 var(--font-body); color: var(--color-muted); }
.bar-actions { display: flex; align-items: center; gap: var(--space-sm); }
.mode { display: flex; padding: var(--space-3xs); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); }
.mode button { min-height: 38px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: var(--color-clear); color: var(--color-muted); font: 600 var(--text-sm)/1 var(--font-body); cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.mode button:hover { color: var(--color-ink); }
.mode button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.modebtn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-clear); color: var(--color-ink); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.modebtn:hover { background: var(--color-paper-2); }
.modebtn:active { transform: translateY(1px); }
.modebtn svg { grid-area: 1 / 1; width: 20px; height: 20px; }
.modebtn .i-sun, .modebtn[data-current="dark"] .i-moon { display: none; }
.modebtn[data-current="dark"] .i-sun { display: block; }
html:not(.js) .modebtn { display: none; }
.iconbtn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-clear); color: var(--color-ink); font: 600 var(--text-sm)/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.iconbtn:hover { background: var(--color-paper-2); }
.iconbtn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* The sound strip */
.strip { position: sticky; top: var(--bar-height); z-index: var(--z-sticky); background: var(--color-paper); border-bottom: var(--rule-hair) solid var(--color-rule); }
.strip__scroll { display: flex; align-items: center; gap: var(--space-xs); min-height: var(--chips-height); overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(90deg, var(--color-scrim) 0, var(--color-scrim) calc(100% - var(--space-2xl)), var(--color-clear)); }
.strip__scroll::-webkit-scrollbar { display: none; }
.strip__label { flex-shrink: 0; padding-inline: var(--space-sm) var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.strip__label:first-child { padding-left: 0; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink); font: 600 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.chip:hover { background: var(--color-paper-3); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
.chip--never { background: var(--color-clear); border-style: dashed; border-color: var(--color-muted); color: var(--color-ink-2); }
.chip--never svg { width: 16px; height: 16px; flex-shrink: 0; }
.chip--never[aria-pressed="true"] { background: var(--color-accent-soft); border: var(--rule-hair) solid var(--color-accent); color: var(--color-ink); }
.chip--never[aria-pressed="true"] span { text-decoration: line-through; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }
.chip--never[aria-pressed="true"] svg { color: var(--color-accent); }
.strip__rule { flex-shrink: 0; width: 1px; height: 28px; margin-inline: var(--space-xs); background: var(--color-rule); }

/* Thumbnails */
.thumb { aspect-ratio: 16 / 9; border-radius: var(--radius-thumb); background: var(--color-band-2); }
.thumb > img { outline: 1px solid color-mix(in oklab, var(--color-ink) 8%, var(--color-clear)); outline-offset: -1px; }
.thumb::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--color-scrim); opacity: 0.12; transition: opacity var(--dur-short) var(--ease-out); pointer-events: none; }
.len { position: absolute; right: var(--space-xs); bottom: var(--space-xs); z-index: 3; padding: var(--space-3xs) var(--space-xs); border-radius: var(--space-2xs); background: var(--color-plate); color: var(--color-plate-ink); font: 600 var(--text-xs)/1.3 var(--font-body); font-variant-numeric: tabular-nums; }
.flag { position: absolute; left: var(--space-xs); bottom: var(--space-xs); z-index: 3; padding: var(--space-3xs) var(--space-xs); border-radius: var(--space-2xs); background: var(--color-plate); color: var(--color-plate-ink); font: 400 var(--text-xs)/1.3 var(--font-body); }

.card { display: grid; gap: var(--space-sm); align-content: start; color: var(--color-ink); text-decoration: none; }
.card:hover .thumb::after, .card:focus-visible .thumb::after { opacity: 0; }
.card:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-thumb); }
.card__text { display: grid; gap: var(--space-2xs); min-width: 0; }
.card__title { font: 600 var(--text-md)/1.35 var(--font-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }

/* Hero: tonight */
.tonight { padding-block: var(--space-xl) var(--space-3xl); }
.tonight__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); grid-template-areas: "player side"; gap: var(--space-xl); align-items: start; }
.tonight .player { grid-area: player; }
.tonight .side { grid-area: side; }
.player { display: grid; }
.player__frame { aspect-ratio: 16 / 9; border-radius: var(--radius-card); background: var(--color-band); }
.player__frame::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(var(--color-clear) 55%, color-mix(in oklab, var(--color-scrim) 70%, var(--color-clear))); pointer-events: none; }
.play { position: absolute; left: 50%; top: 50%; z-index: 3; width: 88px; height: 88px; transform: translate(-50%, -50%); border: 0; border-radius: var(--radius-pill); background: var(--color-plate-ink); color: var(--color-scrim); display: grid; place-items: center; cursor: pointer; transition: transform var(--dur-short) var(--ease-out); }
.play:hover { transform: translate(-50%, -50%) scale(1.04); }
.play:active { transform: translate(-50%, -50%) scale(0.98); }
.play:focus-visible { outline: 3px solid var(--color-plate-ink); outline-offset: 4px; }
.play svg { width: 34px; height: 34px; }
.player__frame .len { right: var(--space-md); bottom: var(--space-md); font-size: var(--text-sm); }
.player__frame .flag { left: var(--space-md); bottom: var(--space-md); font-size: var(--text-sm); }
.player__caption { position: absolute; left: var(--space-lg); top: var(--space-lg); right: var(--space-lg); z-index: 3; display: grid; gap: var(--space-3xs); color: var(--color-plate-ink); }
.player__frame::before { content: ""; position: absolute; inset: 0 0 auto; height: 40%; z-index: 2; background: linear-gradient(color-mix(in oklab, var(--color-scrim) 65%, var(--color-clear)), var(--color-clear)); pointer-events: none; }
.player__title { font: 600 var(--text-lg)/1.3 var(--font-body); }
.player__by { font-size: var(--text-sm); opacity: 0.85; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font: 600 var(--text-md)/1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: var(--color-ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .chip:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn--quiet { background: var(--color-clear); color: var(--color-ink); border-color: var(--color-rule); }
.btn--quiet:hover { background: var(--color-paper-2); }

.side { display: grid; gap: var(--space-lg); justify-items: start; }
.side h1 { font-size: clamp(2.5rem, 2.2vw + 1.4rem, 3.75rem); max-width: 10ch; }
.side .lead { font-size: var(--text-lead); line-height: 1.45; color: var(--color-muted); max-width: 30ch; }
.queue { justify-self: stretch; display: grid; gap: var(--space-md); margin-top: var(--space-xs); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.queue__label { font-size: var(--text-sm); color: var(--color-muted); }
.queue .card { grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: var(--space-md); }
.queue .card__title { font-size: var(--text-sm); }

/* Section heads */
.shelf { padding-block: var(--space-3xl) 0; }
.shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-lg); margin-bottom: var(--space-xl); }
.shelf__head h2 { font-size: var(--text-section); max-width: 22ch; }
.shelf__head a { font-weight: 600; font-size: var(--text-md); color: var(--color-ink); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--color-rule); text-underline-offset: 0.25em; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.shelf__head a:hover { text-decoration-color: var(--color-accent); }

.rail { list-style: none; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(17rem, calc((min(100%, var(--container)) - 2 * var(--gutter) - 3 * var(--gap-columns)) / 4.3)); gap: var(--gap-columns); overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))) var(--space-md); scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))); overscroll-behavior-x: contain; scrollbar-width: thin; }
.rail:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.rail > li { scroll-snap-align: start; }

/* Triggers */
.triggers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.tile { position: relative; display: grid; gap: var(--space-sm); color: var(--color-ink); text-decoration: none; }
.tile .thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-card); }
.tile__name { position: absolute; left: var(--space-lg); top: var(--space-lg); z-index: 3; font: 400 var(--text-2xl)/1 var(--font-display); color: var(--color-plate-ink); }
.tile .thumb::after { background: linear-gradient(color-mix(in oklab, var(--color-scrim) 70%, var(--color-clear)), var(--color-clear) 60%); opacity: 1; }
.tile:hover .thumb::after { opacity: 0.75; }
.tile:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-card); }
.tile p { font-size: var(--text-sm); color: var(--color-muted); }

.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); }

/* Sleep band */
.sleep { margin-top: var(--space-3xl); padding-block: var(--section-gap-s); background: var(--color-band); color: var(--color-band-ink); }
.sleep__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.sleep h2 { font-size: var(--text-section); color: var(--color-band-ink); }
.sleep .lead { margin-top: var(--space-lg); font-size: var(--text-lead); line-height: 1.45; color: var(--color-band-muted); max-width: 34ch; }
.facts { margin: var(--space-xl) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts > div { padding-inline: var(--space-lg); border-left: var(--rule-hair) solid var(--color-band-rule); }
.facts > div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-size: var(--text-sm); color: var(--color-band-muted); }
.facts dd { margin: var(--space-2xs) 0 0; font: 400 var(--text-xl)/1.15 var(--font-display); color: var(--color-band-ink); }
.sleeper { padding: var(--space-lg); border-radius: var(--radius-card); background: var(--color-band-2); outline: 1px solid var(--color-band-rule); outline-offset: -1px; display: grid; gap: var(--space-lg); }
.sleeper__screen { aspect-ratio: 16 / 9; border-radius: var(--radius-thumb); background: var(--color-band); }
.sleeper__screen > img { opacity: 0.4; }
.sleeper__left { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; text-align: center; color: var(--color-plate-ink); }
.sleeper__left b { font: 400 clamp(4rem, 6vw, 6rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.sleeper__left span { font-size: var(--text-sm); }
.sleeper__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }
.timer { display: flex; align-items: center; gap: var(--space-sm); }
.timer__label { font-size: var(--text-sm); color: var(--color-band-muted); }
.pills { display: flex; gap: var(--space-2xs); padding: var(--space-3xs); border: var(--rule-hair) solid var(--color-band-rule); border-radius: var(--radius-pill); }
.pills button { min-width: 48px; min-height: 40px; padding: 0 var(--space-sm); white-space: nowrap; border: 0; border-radius: var(--radius-pill); background: var(--color-clear); color: var(--color-band-muted); font: 600 var(--text-sm)/1 var(--font-body); font-variant-numeric: tabular-nums; cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.pills button:hover { color: var(--color-band-ink); }
.pills button[aria-pressed="true"] { background: var(--color-band-ink); color: var(--color-band); }
.pills button:focus-visible, .sleep :focus-visible { outline-color: var(--color-plate-ink); }
.switch { display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 44px; padding: 0; border: 0; background: var(--color-clear); color: var(--color-band-ink); font: 400 var(--text-md)/1 var(--font-body); cursor: pointer; }
.switch__track { position: relative; width: 46px; height: 26px; border-radius: var(--radius-pill); background: var(--color-band-rule); transition: background-color var(--dur-short) var(--ease-out); }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--color-band-ink); transition: transform var(--dur-short) var(--ease-in-out); }
.switch[aria-checked="true"] .switch__track { background: var(--color-accent); }
.switch[aria-checked="true"] .switch__track::after { transform: translateX(20px); background: var(--color-accent-ink); }

/* Collections */
.collections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); }
.stack { display: grid; gap: var(--space-md); color: var(--color-ink); text-decoration: none; }
.stack__pile { position: relative; aspect-ratio: 16 / 11; }
.stack__pile .thumb { position: absolute; width: 84%; }
.stack__pile .thumb:nth-child(1) { left: 16%; top: 0; }
.stack__pile .thumb:nth-child(2) { left: 8%; top: 9%; }
.stack__pile .thumb:nth-child(3) { left: 0; top: 18%; }
.stack h3 { font-size: var(--text-xl); }
.stack p { font-size: var(--text-sm); color: var(--color-muted); }
.stack:hover h3 { text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.stack:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; border-radius: var(--radius-thumb); }

/* Footer */
.footer { margin-top: var(--section-gap-s); padding-block: var(--space-3xl) var(--space-2xl); border-top: var(--rule-hair) solid var(--color-rule); }
.footer__line { font: 400 var(--text-display-s)/1.05 var(--font-display); letter-spacing: var(--tracking-display); max-width: 20ch; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md) var(--space-xl); margin-top: var(--space-2xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.footer__links a { color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 0.22em; }

@media (max-width: 75rem) {
  .grid4, .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 60rem) {
  .topbar .container { gap: var(--space-sm); }
  .search kbd, .iconbtn span { display: none; }
  .tonight__grid, .sleep__grid { grid-template-columns: minmax(0, 1fr); }
  .tonight__grid { grid-template-areas: "player" "side"; gap: var(--space-lg); }
  .triggers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { grid-auto-columns: minmax(15rem, 70%); }
}
@media (max-width: 40rem) {
  :root { --bar-height: 112px; }
  .topbar .container { flex-wrap: wrap; align-content: center; row-gap: var(--space-xs); }
  .search { order: 3; flex-basis: 100%; margin-inline: 0; }
  .bar-actions { margin-left: auto; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .triggers, .grid4, .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--space-sm); }
  .tile__name { left: var(--space-sm); top: var(--space-sm); font-size: var(--text-lg); }
  .stack h3 { font-size: var(--text-lg); }
  .play { width: 60px; height: 60px; }
  .play svg { width: 24px; height: 24px; }
  .player__caption { left: var(--space-md); top: var(--space-md); right: var(--space-md); }
  .player__title { font-size: var(--text-md); }
  .player__frame .flag { display: none; }
  .facts > div { padding: var(--space-sm) 0; border-left: 0; border-top: var(--rule-hair) solid var(--color-band-rule); }
  .facts > div:first-child { border-top: 0; }
  .shelf__head { flex-direction: column; gap: var(--space-xs); margin-bottom: var(--space-lg); }
  .wordmark { font-size: 1.375rem; }
  .bar-actions { gap: var(--space-xs); }
  .tonight { padding-block: var(--space-lg) var(--space-xl); }
  .shelf { padding-top: var(--space-2xl); }
  .sleep { margin-top: var(--space-2xl); }
}
@media (prefers-reduced-motion: reduce) {
  .chip, .btn, .play, .iconbtn, .modebtn, .mode button, .pills button, .switch__track, .switch__track::after, .thumb::after, .shelf__head a { transition: none; }
}
