/* Liber's site: the app's Paper theme by day, Dusk by night. No scripts, no trackers, fonts served from here. */
@font-face { font-family: 'Literata'; font-weight: 400; font-display: swap; src: url('/fonts/literata-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Literata'; font-weight: 700; font-display: swap; src: url('/fonts/literata-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #F7F3EA; --surface: #FFFDF8; --text: #2D2A26; --muted: #635C52; --accent: #4F6E4C; --on-accent: #FFFDF8; --border: #DDD4C3;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1F2430; --surface: #272D3A; --text: #E9E2D0; --muted: #A7A08F; --accent: #9DB89A; --on-accent: #1F2430; --border: #3A4252; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, .brand { font-family: 'Literata', Georgia, serif; line-height: 1.25; }
h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .25rem; }
a { color: var(--accent); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
p, li { max-width: 68ch; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--border); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
nav a { margin-left: 18px; color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.hero { padding: 64px 0 40px; text-align: center; }
.hero img { width: 88px; height: 88px; }
.hero p.lead { font-size: 1.25rem; color: var(--muted); margin: 0 auto 1.5rem; }
.badge { display: inline-block; padding: 12px 22px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.badge.soon { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.card h3 { margin-top: 0; }
.card p { margin: 0; color: var(--muted); }

.note { background: var(--surface); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 0 10px 10px 0; }
.updated { color: var(--muted); font-size: .95rem; }
main { padding-bottom: 48px; }
main.doc { padding-top: 32px; }

footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: .95rem; }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 28px; }
footer.site a { color: var(--muted); }
