/* Relax Noise Lab. Dark by design: people open this page at night, next to a sleeping room. */
@font-face { font-family: "Nunito"; src: url("/static/nunito.woff") format("woff"); font-weight: 200 1000; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0d0a;
  --surface: #12160f;
  --surface-2: #192014;
  --line: #273021;
  --text: #eef2e8;
  --muted: #a9b79a;
  --accent: #9bc27a;
  --accent-ink: #0b0d0a;
  --chart-grid: #232b1e;
  --chart-ref: #6f7d63;
  --radius: 14px;
  --wrap: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #b8d99c; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); margin: 8px 0 12px; }
h2 { font-size: 28px; margin: 48px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 820px; }
.small { font-size: 14px; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* header and footer */
.top { border-bottom: 1px solid var(--line); background: rgba(11, 13, 10, .92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; }
.top nav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top nav a.yt { color: var(--accent-ink); background: var(--accent); padding: 6px 12px; border-radius: 999px; font-weight: 700; }
.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.foot strong { color: var(--text); }

/* home */
.hero { padding: 56px 0 24px; background: radial-gradient(ellipse at 20% 0%, #1c2716 0%, rgba(11,13,10,0) 60%); }
.heromark { width: 72px; height: 72px; margin-bottom: 8px; }
.hero h1 { max-width: 18ch; }
.lede { font-size: 19px; color: var(--muted); max-width: 62ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 11px 20px; border-radius: 999px; font-weight: 800; text-decoration: none; }
.btn:hover { color: var(--accent-ink); background: #b8d99c; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.three-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 56px; }
.three-up > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 12px; }
.three-up p { color: var(--muted); font-size: 16px; }

/* sound cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border-top: 4px solid color-mix(in srgb, var(--screen) 70%, #ffffff 12%); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--screen); }
.cardbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { margin: 0; font-size: 18px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.soon-tag { font-size: 13px; color: var(--accent); font-weight: 700; }
.cardfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.len { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }

/* sample button */
.play { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 8px; font: inherit; font-size: 14px; cursor: pointer; min-height: 36px; }
.play:hover { border-color: var(--accent); }
.play .icon { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.play .icon::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid var(--accent-ink); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.play.playing .icon::after { left: 7px; top: 7px; width: 8px; height: 8px; border: 0; background: var(--accent-ink); border-radius: 1px; }
.play.big { font-size: 16px; padding: 9px 16px 9px 10px; }
.play.big .icon { width: 28px; height: 28px; }
.play.big .icon::after { left: 11px; top: 8px; border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; }
.play.big.playing .icon::after { left: 9px; top: 9px; width: 10px; height: 10px; }
.sample-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 8px; }

/* sound page */
.crumbs { font-size: 14px; color: var(--muted); margin: 28px 0 0; }
.crumbs a { color: var(--muted); }
.lede .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--screen); border: 1px solid #ffffff33; vertical-align: -1px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000 center / cover no-repeat; border: 1px solid var(--line); }
.video.lite button { position: absolute; inset: 0; width: 100%; background: transparent; border: 0; cursor: pointer; }
.ytplay { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; background: rgba(0,0,0,.72); border-radius: 14px; }
.ytplay::after { content: ""; position: absolute; left: 29px; top: 15px; border-left: 18px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.video.lite button:hover .ytplay { background: #c4302b; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.soon::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.soonbox { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 2px; background: rgba(11,13,10,.86); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; max-width: 340px; }
.soonbox .kicker { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.soonbox strong { font-size: 20px; }
.soonbox a { font-size: 15px; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 20px; }
.prose li { margin: 6px 0; }
.cite { text-decoration: none; font-size: .85em; }
.refs { list-style: none; padding-left: 0; font-size: 15px; color: var(--muted); }
.refs li { margin: 8px 0; }
.ref { font-size: 15px; color: var(--muted); margin: 8px 0; scroll-margin-top: 80px; }
.ref:target { color: var(--text); background: var(--surface-2); border-radius: 8px; padding: 4px 8px; }
.ref .n { color: var(--text); font-weight: 700; }

/* the lab section */
.lab { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 20px; margin-top: 40px; }
.lab h2 { margin-top: 24px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .grid.faint { stroke-dasharray: 2 4; }
.chart .tick, .chart .axis { fill: var(--muted); font-size: 12px; font-family: inherit; }
.chart .ref { stroke: var(--chart-ref); stroke-width: 1.2; stroke-dasharray: 5 5; }
.chart .reflab { fill: var(--muted); font-size: 12px; font-family: inherit; }
.chart .series { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit.on { fill: var(--accent); stroke: var(--surface); stroke-width: 2; r: 5; }
.tip { position: fixed; pointer-events: none; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; z-index: 20; white-space: nowrap; }
.bands { display: grid; gap: 8px; }
.band { display: grid; grid-template-columns: minmax(150px, 210px) 1fr 44px; align-items: center; gap: 12px; font-size: 15px; }
.band span { color: var(--muted); }
.band b { text-align: right; font-variant-numeric: tabular-nums; }
.track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 700; }
.nums th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.nums td:last-child { color: var(--muted); }
.nums strong { white-space: nowrap; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .top nav { gap: 12px; font-size: 14px; }
  .brand span { font-size: 16px; }
  .band { grid-template-columns: 1fr 44px; }
  .band .track { grid-column: 1 / -1; grid-row: 2; }
  .nums td:last-child { display: none; }
  .lab { padding: 4px 14px 16px; }
  .chart .tick, .chart .axis, .chart .reflab { font-size: 22px; }
}
[hidden] { display: none !important; }
