/* The app's palette, so the pages a subscriber lands on from the paywall look
   like the thing they just paid for. Values come straight from
   Sources/Design/Palette.swift. */

:root {
  --canvas: #F7F2EA;
  --surface: #FFFCF7;
  --ink: #241E19;
  --ink-secondary: #6A5D52;
  --ink-tertiary: #766A5C;
  --hairline: #E3D9C9;
  --accent: #C96A1E;
  --accent-ink: #A5511A;
  --accent-soft: #F6E4CE;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #14120F;
    --surface: #1E1B17;
    --ink: #F6F0E7;
    --ink-secondary: #B5A99C;
    --ink-tertiary: #8D8278;
    --hairline: #322C27;
    --accent: #E9913F;
    --accent-ink: #F0A65E;
    --accent-soft: #3A2A1A;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 16.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

header, main, footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header { padding-top: 2.5rem; padding-bottom: 1rem; }

.wordmark {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-ink);
  text-decoration: none;
}

main { padding-bottom: 3rem; }

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 1.2rem 0 1rem;
  font-weight: 650;
}

body.wide h1 { font-size: 2.3rem; max-width: 18ch; }

h2 {
  font-size: 1.12rem;
  margin: 2.4rem 0 0.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
  font-weight: 640;
}

h3 {
  font-size: 1rem;
  margin: 1.8rem 0 0.4rem;
  font-weight: 640;
}

p, li { color: var(--ink-secondary); }
h1 + p.lede { color: var(--ink); font-size: 1.1rem; }

strong { color: var(--ink); font-weight: 620; }

em { color: var(--ink); font-style: normal; font-weight: 600; }

a { color: var(--accent-ink); text-underline-offset: 0.18em; }

ul, ol { padding-left: 1.2rem; }
li { margin: 0.45rem 0; }

/* Unfilled legal blanks in a draft build. Loud on purpose. */
mark.todo {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 0.05em 0.35em;
  border-radius: 4px;
  border: 1px dashed var(--accent);
}

footer {
  border-top: 1px solid var(--hairline);
  padding-top: 1.2rem;
  padding-bottom: 3rem;
  font-size: 0.85rem;
  color: var(--ink-tertiary);
}

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

em.date, p em:first-child { color: var(--ink-tertiary); font-weight: 400; }
