/* Guides and other marketing pages. Same tokens and type as the app (see BRAND.md). */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f6f2ec; --surface: #fffdf9; --fg: #22201c; --muted: #6f675e; --line: #e6ded3;
  --accent: #b4532a; --accent-fg: #ffffff; --accent-soft: #f6e4d9; --accent-ink: #8f3d1b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171412; --surface: #211d1a; --fg: #f3ede6; --muted: #a99f94; --line: #3a332d;
    --accent: #e08a5f; --accent-fg: #1d120c; --accent-soft: #3a261c; --accent-ink: #f0a984;
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--fg); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
body > main { flex: 1; padding-bottom: 48px; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
:is(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 20px var(--serif); white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px 18px; font-size: 15px; }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top nav a:not(.btn):hover { color: var(--fg); }
.btn { display: inline-block; font-weight: 600; padding: 10px 18px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); text-decoration: none; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 8px; }

.page-head { padding: 24px 0 8px; max-width: 720px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 44px); margin: 0 0 8px; }
.page-head p { color: var(--muted); margin: 0 0 24px; font-size: 18px; }

.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.post-card { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.post-card:hover { border-color: var(--accent); }
.post-card h2, .post-card h3 { font-size: 20px; margin: 0 0 6px; }
.post-card p { color: var(--muted); margin: 0 0 10px; font-size: 15px; line-height: 1.5; }
.post-card .meta { color: var(--muted); font-size: 13px; }

.article { max-width: 720px; margin: 0 auto; padding-top: 16px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.article h1 { font-size: clamp(32px, 4.8vw, 46px); margin: 0 0 12px; }
.standfirst { font-size: 20px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.article .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 24px 0; font-size: 15px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.prose h2 { font-size: 28px; margin: 40px 0 12px; scroll-margin-top: 16px; }
.prose h3 { font-size: 21px; margin: 28px 0 8px; }
.prose p, .prose li { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose a { color: var(--accent-ink); text-underline-offset: 3px; }
.prose blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { font-size: 0.9em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td { text-align: left; border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0; vertical-align: top; }
.callout { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 14px; padding: 18px 20px; margin: 32px 0; }
.callout h2, .callout h3 { margin-top: 0 !important; font-size: 21px; }
.callout p:last-child { margin-bottom: 0; }
.related { max-width: 1080px; margin: 48px auto 0; }
.related h2 { font-size: 24px; margin: 0 0 14px; }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer.site .spacer { flex: 1; }
@media (max-width: 600px) { .top nav a:not(.btn) { display: none; } }
