:root {
  --onyx: #0a0a0a;
  --slate: #536878;
  --alabaster: #e5e4e2;
  --muted: rgba(229, 228, 226, 0.55);
  --rule: rgba(229, 228, 226, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--onyx); }

body {
  min-height: 100vh;
  color: var(--alabaster);
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  font-weight: 300;
  font-size: 1.1875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Obsidian chrome: a slate glow rising from the lower left, as in the palette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 70% at 0% 110%, rgba(229, 228, 226, 0.16) 0%, rgba(229, 228, 226, 0) 45%),
    radial-gradient(130% 100% at 10% 120%, rgba(83, 104, 120, 0.55) 0%, rgba(83, 104, 120, 0.18) 45%, rgba(10, 10, 10, 0) 75%);
}

::selection { background: rgba(229, 228, 226, 0.18); color: #fff; }

main, footer {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin-left: clamp(0rem, 12vw, 10rem);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

main {
  padding-top: 18vh;
  padding-bottom: 14vh;
  animation: fade 1.2s ease-out both;
}

p { text-wrap: pretty; }
p + p, p + ul, ul + p { margin-top: 1.4em; }

h2 {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 0.75rem;
}

ul { padding-left: 1.1em; }
li + li { margin-top: 0.4em; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-color: rgba(229, 228, 226, 0.35); }
a:hover, a:focus-visible { text-decoration-color: var(--alabaster); outline: none; }

.demos, .apply {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.demos ol { list-style: none; padding: 0; }

.track a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1.1rem 0 0.8rem;
  text-decoration: none;
}

.demos .track + .track { margin-top: 0.25rem; }

.track .title { flex: 1; }

.track .time {
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Play triangle, drawn in CSS so it doesn't depend on a font */
.track .icon {
  flex: none;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0.3em 0 0.3em 0.52em;
  border-color: transparent transparent transparent currentColor;
  opacity: 0.6;
  transform: translateY(-0.08em);
}

.track a:hover .icon, .track.playing .icon { opacity: 1; }

/* Pause: two thin bars */
.track.playing .icon {
  width: 0.5em;
  height: 0.6em;
  border: 0;
  border-left: 0.15em solid currentColor;
  border-right: 0.15em solid currentColor;
}

/* Without JavaScript: a plain rule under each title */
.track .bar {
  height: 1px;
  background: var(--rule);
}

.track .fill { display: none; }

/* With JavaScript: a canvas wave, tall enough to grab with a thumb */
.track .bar.wave {
  height: 18px;
  margin: -0.35rem 0 0.35rem;
  background: none;
  cursor: pointer;
  touch-action: none;
}

.track .bar.wave canvas {
  display: block;
  width: 100%;
  height: 18px;
}

.apply span, .demos .label {
  display: block;
  font-size: 0.8125rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.apply a {
  font-style: italic;
  font-size: 1.5rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(229, 228, 226, 0.3);
  padding-bottom: 0.1em;
  transition: border-color 0.3s;
}

.apply a:hover, .apply a:focus-visible { border-color: var(--alabaster); }

footer {
  padding-bottom: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

footer a { text-decoration: none; }
footer .arrow { font-family: -apple-system, system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 300; }
footer a:hover, footer a:focus-visible { color: var(--alabaster); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) { main { animation: none; } }

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  main { padding-top: 12vh; }
  main, footer { margin-left: 0; }
}
