/* Earmark site. Palette from the "Saved Sound" app icon: charcoal, cream, tangerine.
   Type is Apple's own: SF Pro Rounded for display (it echoes the icon's rounded
   strokes), SF Pro Text for reading. No webfonts; the CSP allows none. */
:root {
  --paper: #fff6e8;
  --paper-deep: #f8e9d2;
  --ink: #211b1f;
  --ink-soft: #5d5257;
  --line: #e6d5bd;
  --orange: #ff7a18;
  --link: #b8470a;

  /* The playlist tile is always charcoal, like the icon. */
  --tile: #211b1f;
  --tile-edge: transparent;
  --cream: #fff0da;
  --cream-soft: #c9b9a8;
  --cream-line: rgba(255, 240, 218, .13);

  --display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  --wide: 64rem;
  --measure: 42rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211b1f;
    --paper-deep: #2b2226;
    --ink: #fff0da;
    --ink-soft: #c2b3a4;
    --line: #3c3236;
    --link: #ff9a4d;
    --tile: #2b2226;
    --tile-edge: #3c3236;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 10; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

a { color: var(--link); text-underline-offset: .15em; }
a:hover { color: var(--orange); }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px;
}

/* Frame */
.site-header, main, .site-footer {
  width: min(var(--wide), 100% - 2rem);
  margin-inline: auto;
}
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
  padding: 1.25rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--ink); text-decoration: none;
  font: 800 1.2rem/1 var(--display); letter-spacing: -.01em;
}
.brand img { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 1.25rem; font-size: .95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

main { padding: 1rem 0 4rem; }

/* Type */
h1, h2, h3, dt { font-family: var(--display); }
h1 { font-size: 2.35rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 1.5rem 0 .5rem; text-wrap: balance; }
h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.012em; line-height: 1.2; margin: 3rem 0 .75rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.6rem 0 .4rem; }
p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .4rem; }
strong { font-weight: 650; }
.meta { color: var(--ink-soft); font-size: .95rem; }
.lede { font-size: 1.15rem; line-height: 1.55; }

/* Home: hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 3rem 4rem; align-items: center;
  padding: 3rem 0 3.5rem;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.25rem); line-height: 1.02; letter-spacing: -.03em;
  margin: 0 0 1.25rem; max-width: 11ch;
}
.tagline { font-size: 1.25rem; line-height: 1.45; color: var(--ink-soft); margin: 0 0 1.5rem; max-width: 30ch; }
.platforms { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.25rem; list-style: none; }
.platforms li {
  margin: 0; padding: .2rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  font: 600 .85rem/1.5 var(--display); color: var(--ink-soft);
}
.status { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.status .led {
  display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--orange);
  margin-right: .5em; box-shadow: 0 0 0 3px rgba(255, 122, 24, .22);
}

/* Home: the example playlist */
.demo { margin: 0; }
.playlist {
  background: var(--tile); color: var(--cream);
  border: 1px solid var(--tile-edge); border-radius: 2rem;
  padding: 1.5rem 1.5rem 1rem;
  font-family: var(--display);
}
.pl-title { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .75rem; }
.pl-rules { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.pl-rules li {
  margin: 0; padding: .1rem .6rem; border: 1px solid var(--cream-line); border-radius: 999px;
  font-size: .78rem; font-weight: 600; color: var(--cream-soft);
}
.pl-rows { padding: 0; margin: 0; list-style: none; }
.pl-rows li { margin: 0; }
.up-next { font-size: .8rem; font-weight: 700; color: var(--cream-soft); padding: 1rem 0 .35rem; }

/* Each row is a one-track grid so its height can animate from 0fr to 1fr. */
.row { display: grid; grid-template-rows: 1fr; }
.row-body {
  display: flex; align-items: center; gap: .75rem;
  min-height: 0; overflow: hidden;
  box-shadow: inset 0 1px 0 var(--cream-line);
}
.ep { flex: 1; min-width: 0; margin: 0; padding: .7rem 0; line-height: 1.3; }
.ep-show { display: block; font-size: .8rem; font-weight: 600; color: var(--cream-soft); }
.ep-title { display: block; font-size: 1rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-len { margin: 0; font-size: .8rem; font-weight: 600; color: var(--cream-soft); white-space: nowrap; }
.pin { flex: none; fill: var(--orange); }
.is-pinned .row-body { box-shadow: none; }
.badge {
  display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: 999px;
  background: var(--orange); color: #211b1f; font-size: .7rem; font-weight: 800; line-height: 1.5;
  vertical-align: .05em;
}
.is-leaving .ep-len { color: var(--orange); }

/* The one moment on the page: a played episode leaves, a new one arrives. */
.is-leaving { animation: row-leave 1.1s ease-in-out 1.2s both; }
.is-arriving { animation: row-arrive .7s cubic-bezier(.2, .8, .2, 1) 2.5s both; }
.is-arriving .badge { animation: badge-pop .45s cubic-bezier(.3, 1.6, .5, 1) 3s both; }

@keyframes row-leave {
  0% { grid-template-rows: 1fr; opacity: 1; }
  35% { grid-template-rows: 1fr; opacity: .3; }
  100% { grid-template-rows: 0fr; opacity: 0; }
}
@keyframes row-arrive {
  from { grid-template-rows: 0fr; opacity: 0; }
  to { grid-template-rows: 1fr; opacity: 1; }
}
@keyframes badge-pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .is-leaving { display: none; }
  .is-arriving, .is-arriving .badge { animation: none; }
}

/* Home: reading sections */
.prose { max-width: var(--measure); }
.features { margin: 1.75rem 0 0; }
.features div {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .25rem 1.5rem;
  padding: .9rem 0; border-top: 1px solid var(--line);
}
.features div:last-child { border-bottom: 1px solid var(--line); }
.features dt { font-weight: 700; line-height: 1.4; padding-top: .1rem; }
.features dd { margin: 0; color: var(--ink-soft); }
.privacy-note p { font-size: 1.1rem; }

/* FAQ */
.faq > * { max-width: var(--measure); }
.faq h2 { font-size: 1.2rem; margin-top: 2.25rem; }
details { border-top: 1px solid var(--line); padding: .6rem 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
summary::marker { color: var(--orange); }
details p, details ul { margin-top: .5rem; }

/* Privacy policy: contents list beside the text on wide screens */
.policy > * { max-width: var(--measure); }
.toc { background: var(--paper-deep); border-radius: 1rem; padding: 1rem 1.2rem; font-size: .95rem; margin-bottom: 1rem; }
.toc strong { font-family: var(--display); font-weight: 700; }
.toc ol { margin: .4rem 0 0; }
.toc li { margin-bottom: .2rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.policy h2 { margin-top: 2.5rem; }
h2[id] { scroll-margin-top: 1.5rem; }
@media (min-width: 62rem) {
  .policy {
    display: grid; grid-template-columns: minmax(0, var(--measure)) 16rem;
    column-gap: 4rem; align-items: start;
  }
  .policy > * { grid-column: 1; }
  .policy > .toc { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 2rem; margin-top: 1.5rem; }
}

.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0 3rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; color: var(--ink-soft);
}
.site-footer a { color: var(--ink-soft); }

@media (max-width: 52rem) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 1.5rem; }
  .demo { max-width: 28rem; }
}
@media (max-width: 34rem) {
  body { font-size: 16px; }
  .features div { grid-template-columns: minmax(0, 1fr); }
  .playlist { border-radius: 1.5rem; padding: 1.25rem 1.1rem .75rem; }
}
