/* The guides are static pages, so they carry a small copy of the app's tokens (web/theme.css) and its
   self-hosted fonts: Zilla Slab and Atkinson Hyperlegible, both under the SIL Open Font License 1.1
   (copied from @fontsource). Kraft paper and ink with one cutting-mat green, borders instead of
   shadows, 2px and 4px corners. */

@font-face { font-family: "Zilla Slab"; font-weight: 600; font-display: swap; src: url("fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-display: swap; src: url("fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #ede5d6;
  --surface: #f5f0e6;
  --surface-2: #e2d8c5;
  --line: #d3c7b1;
  --line-strong: #b3a58c;
  --ink: #1c1d1a;
  --ink-2: #4a463d;
  --ink-3: #625c50;
  --accent: #1f5b3a;
  --accent-hover: #174a2f;
  --accent-ink: #f5f0e6;
  --sheet: #f5f0e6;
  --font-display: "Zilla Slab", ui-serif, Georgia, "Times New Roman", serif;
  --font-text: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
  font: 17px/1.6 var(--font-text);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161a16;
    --surface: #1d221d;
    --surface-2: #262c26;
    --line: #313830;
    --line-strong: #4a5247;
    --ink: #ece6d9;
    --ink-2: #bdb6a6;
    --ink-3: #9b9485;
    --accent: #7cc298;
    --accent-hover: #98d3ae;
    --accent-ink: #161a16;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }

.topbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 2px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); }
.brand-mark svg { width: 14px; height: 14px; }
.spacer { flex: 1; }
.button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 2px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button.quiet { background: transparent; border-color: transparent; color: var(--ink); font-weight: 400; }
.button.quiet:hover { background: var(--surface-2); color: var(--ink); }

main { max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
.eyebrow { margin: 0; font-size: 14px; font-weight: 700; color: var(--accent); }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -0.01em; margin: 8px 0 18px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.2; margin: 44px 0 10px; }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 28px 0 6px; }
p, li { color: var(--ink-2); }
li { margin-bottom: 6px; }
.lede { font-size: 19px; color: var(--ink); }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.86em; overflow-wrap: anywhere; }
kbd { padding: 1px 5px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); }
.menu { font-weight: 700; color: var(--ink); }

/* Numbered steps: the number sits in a small green square, like the app's cleanup list. */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 24px; }
ol.steps > li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin-bottom: 12px; }
ol.steps > li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: 15px; }

/* Real files, shown on a sheet of paper in both color schemes, so dark lines stay visible. */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.compare figure { margin: 0; }
.sheet { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; padding: 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--sheet); }
.compare figcaption, figure.diagram figcaption { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
figure.diagram { margin: 20px 0; }
figure.diagram svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 24px; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 13.5px; color: var(--ink-3); border-bottom: 2px solid var(--ink); }
tbody th { color: var(--ink); }

.note { padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.note p { margin: 0; }
.try { margin: 44px 0 0; padding: 20px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.try p { margin: 0 0 14px; }
.sources { margin-top: 40px; font-size: 14.5px; }
.sources li { color: var(--ink-3); }
.updated { font-size: 14px; color: var(--ink-3); }

.guide-list { list-style: none; padding: 0; margin: 20px 0; border-top: 2px solid var(--ink); }
.guide-list li { padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-decoration: none; }
.guide-list a:hover { text-decoration: underline; }
.guide-list p { margin: 4px 0 0; font-size: 15.5px; }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 20px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.footer a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 420px) { .topbar { gap: 4px; } .button.quiet { padding: 0 8px; } }
