:root {
  color-scheme: light dark;
  --bg: #faf8f4;
  --surface: #ffffff;
  --text: #1d2321;
  --muted: #5b6662;
  --line: #e4e0d8;
  --accent: #2f6f5e;
  --accent-soft: #e5f0ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121514;
    --surface: #1b201e;
    --text: #ecefed;
    --muted: #a3ada9;
    --line: #2c3330;
    --accent: #7cc4ad;
    --accent-soft: #1f2d28;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; }
nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
main { padding: 40px 0 56px; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 8px; }
h3 { font-size: 18px; margin: 24px 0 4px; }
p, li { color: var(--text); }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 20px; }
.muted { color: var(--muted); }
a { color: var(--accent); }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0; padding: 0; list-style: none; }
.cards li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.cards strong { display: block; margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: 15px; line-height: 1.5; }
.callout { background: var(--accent-soft); border-radius: 14px; padding: 18px 20px; margin: 28px 0; }
.callout p { margin: 0; }
ol, ul { padding-left: 22px; }
li { margin: 4px 0; }
footer.site { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 14px; color: var(--muted); }
footer.site a { color: var(--muted); }
@media (max-width: 480px) {
  h1 { font-size: 28px; }
  .lead { font-size: 18px; }
}

/* Password screen (see gate.js) */
html.locked body > :not(#gate) { display: none !important; }
#gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
#gate form { width: 100%; max-width: 320px; text-align: center; }
#gate h1 { font-size: 28px; margin: 14px 0 24px; }
#gate label { display: block; text-align: left; font-size: 15px; color: var(--muted); margin-bottom: 6px; }
#gate input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); }
#gate input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
#gate button { width: 100%; margin-top: 12px; font: inherit; font-weight: 600; padding: 12px; border: 0; border-radius: 12px; background: var(--accent); color: var(--bg); cursor: pointer; }
#gate .gate-msg { min-height: 1.5em; color: #c0392b; font-size: 15px; margin: 12px 0 0; }
@media (prefers-color-scheme: dark) { #gate .gate-msg { color: #ff8a80; } }
