/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font: 400 var(--fs-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.12; margin: 0; text-wrap: balance; color: #a19467; }
h1 { font-size: var(--fs-4); letter-spacing: -0.02em; line-height: 1.05; }
.page-head h1, .login-card h1 { line-height: 1.12; }
h2 { font-size: var(--fs-3); }
h3 { font-size: var(--fs-1); font-weight: 500; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s4); top: -4rem; z-index: 100; background: var(--primary); color: var(--on-primary); padding: var(--s3) var(--s4); border-radius: var(--r); }
.skip:focus { top: var(--s4); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(var(--s7), 8vw, var(--s9)); }
.section-alt { background: var(--surface); }
.lead { font-size: var(--fs-1); line-height: 1.5; color: var(--muted); max-width: 42rem; }
.stack > * + * { margin-top: var(--s4); }
.section-head { margin-bottom: var(--s7); }
.section-head > * + * { margin-top: var(--s4); }

/* Bands are always-dark blocks; they re-map tokens locally */
.band {
  --bg: var(--band); --raised: var(--band-2);
  --text: var(--band-text); --muted: var(--band-muted);
  --border: rgba(179, 165, 118, 0.2);
  --primary: var(--accent); --on-primary: var(--band); --focus: var(--accent);
  background: var(--band); color: var(--band-text);
}


/* only-in / only-out visibility */
.is-authed .only-out { display: none !important; }
body:not(.is-authed) .only-in { display: none !important; }
