/* Spin This site: one stylesheet for every page.
   The look is the app's own "Shop Wall" (DESIGN.md in the spin-this repo): a cream wall with navy ink by day,
   a navy wall with cream ink at night, paper cards with 1px hairlines, two corners (3px paper, 8px controls),
   two shadows (under a ledge and beside a standing sleeve), Besley Bold for names and headings only, and the
   system face for every sentence. Colours are Palette.swift's. Besley is self-hosted (SIL OFL 1.1).

   Contrast (WCAG 2 ratios, measured from these hex values):
     day:   ink on wall 14.3:1, ink on card 16.4:1, soft ink on wall 5.0:1, on card 5.8:1, on inset 4.5:1
     night: ink on wall 15.3:1, ink on card 13.1:1, soft ink on wall 7.8:1, on card 6.7:1
     band ink on Slower purple 4.85:1 and on Upbeat yellow 11.3:1 in both appearances (the bands stay bright).
     cream on the Live Activity navy 14.1:1. Upbeat yellow is 1.4:1 on the day wall, so it always has its name.
*/

:root {
  color-scheme: light dark;

  /* The wall and its paper (day) */
  --wall: #f1ede3;
  --card: #fffdf7;
  --inset: #e8e2d5;
  --line: #d6cec0;
  --field-edge: #8d8579;
  --ledge: #1b1d2a;
  --ink: #1b1d2a;
  --ink-soft: #6b6458;
  --tint: #1b1d2a;
  --on-tint: #fffdf7;
  --shade: rgba(0, 0, 0, 0.3);

  /* The same in both appearances */
  --upbeat: #f7c548;
  --slower: #9279b0;
  --band-ink: #151517;
  --vinyl: #141414;
  --label: #f3e6cf;
  --label-ink: #1b1d2a;
  --activity-navy: #1b1d2a;
  --activity-cream: #f4ebda;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --slab: "Besley", "Rockwell", "Roboto Slab", Georgia, serif;

  /* One body size does the work; footnote and subheadline are the app's. */
  --body: 1.0625rem;
  --sub: 0.9375rem;
  --foot: 0.8125rem;
  --band: 0.75rem;
  --h1: clamp(2.25rem, 1.7rem + 2.3vw, 3.25rem);
  --h2: clamp(1.75rem, 1.45rem + 1.25vw, 2.4rem);

  --maxw: 72rem;
  --gutter: 1rem;
  --measure: 34rem;
  --paper: 3px;
  --control: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #14151f;
    --card: #212335;
    --inset: #1b1d2b;
    --line: #363950;
    --field-edge: #7c7f99;
    --ledge: #cfc6b4;
    --ink: #f4ebda;
    --ink-soft: #b2a99d;
    --tint: #f4ebda;
    --on-tint: #14151f;
    --shade: rgba(0, 0, 0, 0.65);
  }
}

@font-face {
  font-family: "Besley";
  src: url("assets/fonts/besley-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--field-edge) var(--wall);
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--ink);
  color: var(--wall);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* ---- type ---- */

h1,
h2,
h3 {
  font-family: var(--slab);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--h1);
}

h2 {
  font-size: var(--h2);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.soft {
  color: var(--ink-soft);
}

.foot {
  font-size: var(--foot);
}

.num {
  font-variant-numeric: tabular-nums;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--tint);
  color: var(--on-tint);
  border-radius: var(--control);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---- layout ---- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

@media (min-width: 40rem) {
  :root {
    --gutter: 2rem;
  }
}

/* ---- the nav, set straight on the wall ---- */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.6rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: 0.25rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--sub);
  font-weight: 600;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

@media (max-width: 29.99rem) {
  .nav {
    column-gap: 0.5rem;
  }

  .nav .wordmark {
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  .nav-links {
    font-size: 0.875rem;
    gap: 0.25rem 0.75rem;
  }
}

/* ---- the ledge and the paper on it ---- */

.ledge {
  position: relative;
  height: 3px;
  background: var(--ledge);
}

.ledge::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 4px;
  height: 10px;
  border-radius: 50%;
  background: var(--shade);
  filter: blur(5px);
  z-index: -1;
}

.sleeve {
  position: relative;
  flex: none;
  aspect-ratio: 1;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--paper);
  box-shadow: 3px 2px 6px color-mix(in srgb, var(--shade) 70%, transparent);
}

.sleeve svg {
  position: absolute;
  inset: 22%;
  width: 56%;
  height: 56%;
}

.sleeve .mk-disc {
  fill: var(--line);
}

.sleeve .mk-label {
  fill: var(--inset);
}

.sleeve .mk-groove {
  stroke: var(--inset);
  stroke-width: 1.5;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--paper);
  overflow: hidden;
}

.card.stands {
  border-bottom: 0;
  border-radius: var(--paper) var(--paper) 0 0;
}

.band {
  display: block;
  padding: 4px 10px;
  font-size: var(--band);
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--band-ink);
  background: var(--slower);
}

.band.upbeat {
  background: var(--upbeat);
}

.card-body {
  padding: 10px 12px 12px;
}

.name {
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
  margin: 0;
}

.card .title {
  color: var(--ink-soft);
  font-size: var(--sub);
  line-height: 1.3;
  margin: 0;
}

.card .reason {
  font-size: var(--foot);
  line-height: 1.35;
  margin: 0.35rem 0 0;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: var(--sub);
  font-weight: 600;
}

/* A pace's dot and chips, as on the Picks tab */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--control);
  font-size: var(--sub);
  font-weight: 500;
  white-space: nowrap;
}

.chip.chosen {
  background: var(--tint);
  border-color: var(--tint);
  color: var(--on-tint);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent);
}

.chip.chosen .dot {
  box-shadow: 0 0 0 1px var(--on-tint);
}

.dot.upbeat {
  background: var(--upbeat);
}

.dot.slower {
  background: var(--slower);
}

.chev {
  width: 10px;
  height: 6px;
  margin-left: 2px;
}

/* ---- the hero: now playing, at the size it has in the app ---- */

.hero {
  --R: min(56vw, 21rem);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-record {
  position: relative;
  height: calc(2 * var(--R) + 1rem);
  overflow: hidden;
}

.hero-record .record {
  position: absolute;
  width: calc(2 * var(--R));
  height: calc(2 * var(--R));
  max-width: none;
  left: 50%;
  top: 0.25rem;
  transform: translateX(-50%);
}

.record .needle-wide {
  display: none;
}

/* At phone and tablet sizes the fine groove lines fall under a pixel and shimmer over the lit band, so they
   are drawn fainter there. */
@media (max-width: 67.99rem) {
  .hero .record g[stroke="#262626"] {
    opacity: 0.45;
  }
}

.lbl-slab {
  font-family: var(--slab);
  font-weight: 700;
}

.lbl-sans {
  font-family: var(--font);
}

.lbl-figure {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.turn {
  transform-origin: 0 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero .turn,
  .ipad .turn {
    animation: turn 6s linear infinite;
  }
}

@keyframes turn {
  to {
    transform: rotate(1turn);
  }
}

.hero-copy {
  padding-block: 1.5rem 4rem;
}

.hero h1 span {
  display: block;
  text-wrap: balance;
}

.lead {
  font-size: 1.125rem;
  line-height: 1.5;
  margin-top: 1rem;
  max-width: 30rem;
}

.lead b {
  font-weight: 600;
}

.soon {
  display: inline-block;
  margin: 0.25rem 0 1.75rem;
  padding: 10px 14px 11px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--paper);
  line-height: 1.35;
}

.soon strong {
  display: block;
  font-weight: 600;
}

.soon span {
  display: block;
  color: var(--ink-soft);
  font-size: var(--sub);
}

/* The playing side, as now playing's bay: the sleeve and the track's card on one ledge */

.playing {
  margin: 0;
  max-width: 26rem;
}

.bay {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.bay .sleeve {
  width: 116px;
}

.bay .card {
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.bay .card-body {
  padding: 8px 12px 10px;
}

.track {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0;
}

.track svg {
  width: 14px;
  height: 9px;
  flex: none;
}

.track-of {
  color: var(--ink-soft);
  font-size: var(--sub);
  margin: 0;
}

.credit {
  font-size: var(--foot);
  margin: 0;
}

.time-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin-top: 18px;
}

.countdown {
  font-size: 2.125rem;
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.time-still {
  font-size: 2.125rem;
  font-weight: 300;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.next {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: var(--sub);
}

.text-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--sub);
  font-weight: 600;
  color: var(--tint);
}

/* The countdown runs in real seconds where the browser can count, and stands still otherwise. */

@property --m {
  syntax: "<integer>";
  inherits: false;
  initial-value: 15;
}

@property --s {
  syntax: "<integer>";
  inherits: false;
  initial-value: 25;
}

.countdown {
  --m: 15;
  --s: 25;
  counter-reset: m var(--m) s var(--s);
}

.countdown::before {
  content: counter(m) ":" counter(s, decimal-leading-zero);
}

@media (prefers-reduced-motion: no-preference) {
  .countdown {
    animation:
      minutes 900s steps(15, end) -34s 1 forwards,
      seconds 60s steps(60, end) -34s 15.99 forwards;
  }
}

@keyframes minutes {
  from {
    --m: 15;
  }
  to {
    --m: 0;
  }
}

@keyframes seconds {
  from {
    --s: 59;
  }
  to {
    --s: -1;
  }
}

@media (min-width: 68rem) {
  .hero {
    --col: 29rem;
    --edge: max(0px, (100vw - var(--maxw)) / 2);
    --R: min(68svh, (100vw - var(--edge) - var(--gutter) - var(--col) - 4rem) / 1.42);
    min-height: max(44rem, 100svh);
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    min-height: max(44rem, 100svh);
  }

  .hero-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: var(--col);
    padding-block: 1rem 3rem;
  }

  .hero .nav {
    width: var(--col);
    justify-content: flex-start;
    column-gap: 2rem;
  }

  .hero-record {
    position: absolute;
    inset: 0;
    height: auto;
    z-index: -1;
  }

  .hero-record .record {
    width: calc(2 * var(--R));
    height: calc(2 * var(--R));
    left: calc(100% - 1.42 * var(--R) - 3rem);
    top: auto;
    bottom: 2rem;
    transform: none;
  }

  .record .needle-wide {
    display: inline;
  }

  .record .needle-tall {
    display: none;
  }

  .bay .sleeve {
    width: 132px;
  }
}

@media (max-width: 67.99rem) {
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-inner {
    display: contents;
  }

  .hero .nav {
    order: 0;
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  .hero-record {
    order: 1;
  }

  .hero-copy {
    order: 2;
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
}

/* ---- the reader's questions, each answered beside the app's own part ---- */

.questions {
  padding-block: 1rem;
}

.row {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 5.5rem;
}

.row h2 {
  font-size: clamp(1.6rem, 1.35rem + 1vw, 2.1rem);
  margin-bottom: 1rem;
}

.row-words b {
  font-weight: 600;
}

.row-art {
  margin: 0;
  min-width: 0;
}

@media (min-width: 52rem) {
  .row {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3.5rem;
    margin-bottom: 7rem;
  }
}

/* Picks: three bays on a narrow art column, as on an iPhone; three covers on one long ledge with their cards
   hanging under it on a wide one, as on an iPad. */

.row-art {
  container: art / inline-size;
}

.picks {
  display: grid;
  gap: 18px;
}

.pick {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  position: relative;
  padding-bottom: 3px;
}

.pick .sleeve {
  width: clamp(7rem, 38%, 9.5rem);
}

.pick .card {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
  border-radius: var(--paper) var(--paper) 0 0;
}

.pick > .ledge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.picks-ledge {
  display: none;
}

@container art (min-width: 30rem) {
  .picks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 0;
  }

  .pick {
    display: contents;
  }

  .pick > .ledge {
    display: none;
  }

  .pick .sleeve {
    grid-row: 1;
    width: 100%;
  }

  .picks-ledge {
    display: block;
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .pick .card {
    grid-row: 3;
    margin-top: 16px;
    border-bottom: 1px solid var(--line);
    border-radius: var(--paper);
  }
}

/* The flip: an iPhone's Lock Screen and an Apple Watch standing on one ledge. Their words are sized from each
   device's own width, so the drawings keep their proportions at any size. */

.devices {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1rem, 5vw, 2.5rem);
  padding-inline: 0.5rem;
}

.phone {
  container: phone / inline-size;
  position: relative;
  width: min(56vw, 15.5rem);
  aspect-ratio: 9 / 19.5;
}

.shell {
  height: 100%;
  padding: 3cqi;
  background: #0b0b0d;
  border-radius: 14cqi;
  box-shadow: 3px 2px 6px color-mix(in srgb, var(--shade) 70%, transparent);
}

.lock {
  position: relative;
  height: 100%;
  border-radius: 11.5cqi;
  overflow: hidden;
  background: #14151f;
  color: var(--activity-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4cqi 3.5cqi;
}

.island {
  width: 34%;
  height: 9cqi;
  border-radius: 5cqi;
  background: #000;
}

.lock-date {
  margin-top: 9cqi;
  font-size: 5cqi;
  font-weight: 600;
  opacity: 0.85;
}

.lock-time {
  font-size: 23cqi;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.activity {
  margin-top: auto;
  width: 100%;
  background: var(--activity-navy);
  border-radius: 7cqi;
  padding: 4cqi;
  font-size: 4.3cqi;
  line-height: 1.3;
  box-shadow: inset 0 0 0 1px rgba(244, 235, 218, 0.12);
}

.activity-top {
  display: flex;
  gap: 3.5cqi;
  align-items: center;
}

.mark {
  flex: none;
  width: 15cqi;
  height: 15cqi;
}

.activity b {
  display: block;
  font-size: 5.2cqi;
}

.activity .faint {
  color: rgba(244, 235, 218, 0.7);
  white-space: nowrap;
}

.activity-flip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqi;
  margin-top: 3.5cqi;
  font-weight: 600;
  white-space: nowrap;
}

.pill {
  flex: none;
  padding: 0.45em 0.85em;
  border-radius: 999px;
  background: var(--activity-cream);
  color: var(--activity-navy);
  font-weight: 600;
}

.side-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.watch {
  container: watch / inline-size;
  position: relative;
  width: min(30vw, 8.5rem);
  aspect-ratio: 41 / 49;
  margin-bottom: 18%;
}

.watch::before,
.watch::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  height: 22%;
  background: #2a2b33;
  z-index: -1;
}

.watch::before {
  top: -18%;
  border-radius: 10px 10px 0 0;
}

.watch::after {
  bottom: -18%;
  border-radius: 0 0 10px 10px;
}

.watch-face {
  height: 100%;
  padding: 12cqi 10cqi 9cqi;
  background: #000;
  border: 4cqi solid #1d1e22;
  border-radius: 28%;
  color: #fff;
  font-size: 8.4cqi;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 2cqi;
}

.watch-face b {
  font-size: 9.6cqi;
}

.watch-face .faint {
  color: rgba(255, 255, 255, 0.62);
}

.watch-face .pill {
  margin-top: auto;
  text-align: center;
  padding: 0.4em 0.5em;
}

/* Listens, as the tab draws it: the week's count, the Most played card on the wall under its heading, and one
   day's row standing on its ledge. One column on a narrow art column; the card beside the rest on a wide one. */

.listens {
  display: grid;
  gap: 2rem;
  max-width: 24rem;
}

.week {
  display: flex;
  gap: 2rem;
}

.week p {
  margin: 0;
  line-height: 1.3;
}

.week-count {
  display: block;
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
}

.wall-heading {
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.most .card-body {
  padding: 12px;
}

.list-name {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: var(--sub);
  font-weight: 600;
}

.plays {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plays li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.plays li:first-child {
  border-top: 0;
}

.plays .name,
.plays .title {
  display: block;
}

.plays .count {
  flex: none;
  font-size: var(--foot);
  font-variant-numeric: tabular-nums;
}

.day-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-bottom: 6px;
}

.day-row .sleeve {
  width: 64px;
}

.day-words p {
  margin: 0;
  line-height: 1.3;
}

.day-words .title {
  color: var(--ink-soft);
  font-size: var(--sub);
}

.pace-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.pace-tag .dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

@container art (min-width: 34rem) {
  .listens {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 2rem;
    align-items: start;
  }

  .week {
    grid-column: 1;
    grid-row: 1;
  }

  .day {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }

  .most {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* What's playing?: the sheet at its found line, over the side it started at that point */

.found {
  max-width: 26rem;
}

.sheet {
  margin-bottom: 2rem;
  padding: 8px 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.grabber {
  display: block;
  width: 36px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 3px;
  background: var(--line);
}

.sheet-title {
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.sheet-line {
  margin: 0;
}

.found .bay .sleeve {
  width: 116px;
}

/* The iPad by the turntable, in evening mode */

.ipad {
  position: relative;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  padding: 9px;
  background: #0b0b0d;
  border-radius: 22px;
  box-shadow: 3px 2px 6px color-mix(in srgb, var(--shade) 70%, transparent);
}

.ipad-screen {
  position: relative;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #14151f;
}

.ipad-screen svg {
  position: absolute;
  height: 146%;
  width: auto;
  max-width: none;
  left: -36%;
  top: -23%;
}

.ipad-time {
  position: absolute;
  right: 9%;
  top: 50%;
  transform: translateY(-50%);
  color: #f4ebda;
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

/* Stylus hours, as the Turntable tab's card */

.stylus {
  max-width: 22rem;
}

.stylus .card-body {
  padding: 14px 14px 10px;
}

.hours {
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.wear {
  height: 8px;
  margin: 12px 0 10px;
  background: var(--inset);
  border: 1px solid var(--line);
}

.wear span {
  display: block;
  height: 100%;
  width: 55%;
  background: var(--ink);
}

.stylus .when-note {
  margin: 0;
}

/* The speed bay: the check's still record and its card on one ledge */

.speed .card {
  flex: 0 1 15rem;
}

.speed .bay {
  align-items: flex-end;
}

.speed-record {
  flex: none;
  width: clamp(8rem, 34vw, 10.5rem);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(3px 2px 4px color-mix(in srgb, var(--shade) 70%, transparent));
}

.speed .card {
  margin-bottom: 0;
}

.speed .card-body {
  padding: 12px;
}

.speed-figure {
  font-size: 1.375rem;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* ---- the close ---- */

.close {
  padding-block: 3.5rem 4.5rem;
  border-top: 1px solid var(--line);
}

.close-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.close h2 {
  margin-bottom: 1rem;
}

@media (min-width: 52rem) {
  .close-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 4rem;
  }
}

.close .soon {
  margin: 0;
}

.mark-stand {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.icon-on-ledge {
  width: 7.5rem;
}

.icon-on-ledge img {
  width: 100%;
  border-radius: 22%;
  box-shadow: 3px 2px 6px color-mix(in srgb, var(--shade) 70%, transparent);
}

/* ---- inner pages: privacy, support, 404 ---- */

.pagehead {
  padding-bottom: 2rem;
}

.pagehead h1 {
  margin-top: 2rem;
}

.updated {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: var(--sub);
}

.pagehead .ledge {
  margin-top: 1.5rem;
}

.reading {
  max-width: 42rem;
  padding-block: 1rem 4rem;
}

.reading .intro p {
  max-width: none;
}

.reading section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--paper);
  padding: 1.1rem 1.1rem 1.15rem;
  margin: 0 0 1rem;
}

.reading section > :last-child,
.reading li:last-child {
  margin-bottom: 0;
}

.reading h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  margin: 0 0 0.6rem;
}

.reading h3 {
  font-size: 1.0625rem;
  margin: 1.4rem 0 0.35rem;
}

.reading p {
  max-width: none;
}

.reading ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.reading li {
  margin-bottom: 0.5rem;
}

.notfound {
  padding-block: 3rem 6rem;
}

.notfound h1 {
  max-width: 16ch;
  margin-bottom: 1rem;
}

.notfound .sleeve {
  width: 7.5rem;
  margin-bottom: 0;
}

.notfound .stand {
  display: flex;
  margin-bottom: 2rem;
  max-width: 20rem;
  flex-direction: column;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-weight: 600;
}

.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---- footer ---- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  font-size: var(--foot);
  color: var(--ink-soft);
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer p {
  max-width: 46rem;
  margin: 0;
}

.footer a {
  color: var(--ink-soft);
}

.footer .wordmark {
  font-size: 1.05rem;
  min-height: 0;
}

.footer .wordmark img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
