/* Plain reading pages for Slow Dance. Colors and fonts match the app (app/src/theme.ts). */
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("/slow-dance/fonts/Figtree_400Regular.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("/slow-dance/fonts/Figtree_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 500; font-display: swap; src: url("/slow-dance/fonts/Newsreader_500Medium.woff2") format("woff2"); }

:root {
  --ground: #EEE9E3;
  --ink: #1E1A18;
  --ink-soft: #5B524C;
  --line: rgba(30, 26, 24, 0.14);
  --accent: #C2334D;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171312;
    --ink: #F3EEE8;
    --ink-soft: #B9AEA6;
    --line: rgba(243, 238, 232, 0.16);
    --accent: #F0798E;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.5 "Figtree", "Helvetica Neue", sans-serif;
  overflow-wrap: break-word;
}

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px max(20px, env(safe-area-inset-right)) 64px max(20px, env(safe-area-inset-left));
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

nav .app { font-weight: 600; margin-right: auto; color: var(--ink); text-decoration: none; }
nav a[aria-current] { color: var(--ink); text-decoration: none; font-weight: 600; }

h1, h2 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 8vw, 3.25rem); line-height: 1.02; margin: 40px 0 8px; }
h2 { font-size: 1.6rem; line-height: 1.1; margin: 40px 0 8px; }

h3 { font-size: 16px; font-weight: 600; margin: 28px 0 4px; }
h3 + p { margin-top: 0; }

.date { color: var(--ink-soft); font-size: 15px; margin: 0 0 24px; }

p, li { max-width: 62ch; }
ul { padding-left: 1.2em; }
li + li { margin-top: 6px; }

a { color: var(--accent); text-underline-offset: 2px; }

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
}
