/* Footloot's site: the theme's tokens on a web page (docs/theme.md "Identity" → "The site (D23)").
   Light is the paper page, dark the ink page, following the reader's appearance. The values are art/theme/tokens.json's. */

@font-face { font-family: "Zilla Slab"; src: url("fonts/ZillaSlab-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("fonts/ZillaSlab-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("fonts/ZillaSlab-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --page: #F7F1E1;        /* surface.page */
  --card: #FDF9EF;        /* surface.card */
  --well: #ECE4CF;        /* surface.well */
  --ink-surface: #2A2722; /* surface.ink */
  --ink: #2A2722;         /* text.ink: 13.19 on page */
  --pencil: #625B4F;      /* text.pencil: 5.95 on page */
  --on-ink: #F7F1E1;      /* text.onInk */
  --on-accent: #FDF9EF;   /* text.onAccent */
  --hairline: #2A272247;  /* line.hairline */
  --rule: #2A27228C;      /* line.rule */
  --marker: #A83C27;      /* accent.marker */
  --marker-text: #9A3722; /* accent.markerText: 6.33 on page */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #1B1A17; --card: #26241F; --well: #131210; --ink-surface: #EFE8D8;
    --ink: #EFE8D8; --pencil: #A79E8D; --on-ink: #1B1A17; --on-accent: #1B1A17;
    --hairline: #EFE8D838; --rule: #EFE8D880; --marker: #E0684F; --marker-text: #E8775F;
  }
}
/* The renderer's switch (art/theme/tools/site_render.swift), the same values as the media query above. */
:root[data-theme="dark"] {
  --page: #1B1A17; --card: #26241F; --well: #131210; --ink-surface: #EFE8D8;
  --ink: #EFE8D8; --pencil: #A79E8D; --on-ink: #1B1A17; --on-accent: #1B1A17;
  --hairline: #EFE8D838; --rule: #EFE8D880; --marker: #E0684F; --marker-text: #E8775F;
}

* { box-sizing: border-box; }
html { background: var(--page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 17px/1.55 "Atkinson Hyperlegible", system-ui, sans-serif;
}
/* The mark in the reader's appearance: each rule only hides the other variant, so a mark keeps its own display. */
@media not (prefers-color-scheme: dark) { :root:not([data-theme="dark"]) img.mark-dark { display: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.mark-light { display: none; } }
:root[data-theme="light"] img.mark-dark { display: none; }
:root[data-theme="dark"] img.mark-light { display: none; }

.page { max-width: 680px; margin: 0 auto; padding: 0 20px 48px; }
header.site { display: flex; align-items: center; gap: 12px; padding: 20px 0 16px; border-bottom: 1px solid var(--hairline); }
header.site a { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
header.site img { width: 36px; height: 36px; }
header.site .word { font: 700 24px/1 "Zilla Slab", Georgia, serif; }
nav.site { margin-left: auto; display: flex; gap: 18px; font-size: 15px; }
nav.site a { color: var(--pencil); text-decoration: none; }
nav.site a[aria-current="page"] { color: var(--ink); font-weight: 700; }

h1 { font: 700 34px/1.15 "Zilla Slab", Georgia, serif; margin: 40px 0 12px; }
h2 { font: 600 22px/1.25 "Zilla Slab", Georgia, serif; margin: 36px 0 8px; }
p, li { margin: 0 0 14px; }
ul { padding-left: 22px; }
a { color: var(--marker-text); text-underline-offset: 3px; }
.fiction { font: italic 400 22px/1.5 "Zilla Slab", Georgia, serif; color: var(--ink); margin: 28px 0 24px; }
.lead { font-size: 19px; }
.small, .updated { font-size: 14px; color: var(--pencil); }
.hero-mark { display: block; width: 96px; height: 96px; margin: 48px 0 0; }

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 24px 0 8px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  background: var(--marker); color: var(--on-accent); border-radius: 12px;
  font: 600 20px/1 "Zilla Slab", Georgia, serif; text-decoration: none;
}
.badge-slot { font-size: 14px; color: var(--pencil); }

.card { background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 18px 20px; margin: 18px 0; }
.card h2 { margin-top: 0; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 13px;
  background: var(--ink-surface); color: var(--on-ink); font: 700 14px/26px "Atkinson Hyperlegible", sans-serif; text-align: center;
}
hr { border: 0; border-top: 1px solid var(--hairline); margin: 32px 0; }
footer.site { border-top: 1px solid var(--hairline); margin-top: 48px; padding-top: 16px; font-size: 14px; color: var(--pencil); display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.site a { color: var(--pencil); }

@media (min-width: 900px) {
  .page { max-width: 760px; }
  h1 { font-size: 44px; margin-top: 64px; }
  .fiction { font-size: 26px; }
  .hero-mark { width: 120px; height: 120px; margin-top: 72px; }
}
