/* Layout and typography. Components use semantic tokens only. */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3 { font-family: var(--font-body); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 1.2em; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
code, pre { font-family: var(--font-mono); font-size: 0.9rem; }
ul, ol { padding-left: 1.4em; }

.container { max-width: 64rem; margin: 0 auto; padding: 1rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--text); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; top: 1rem; }

.topbar { background: var(--brand-midnight); color: var(--brand-white); border-bottom: 4px solid transparent; border-image: var(--brand-gradient) 1; }
.topbar-inner { max-width: 64rem; margin: 0 auto; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brand-white); text-decoration: none; font-family: var(--font-accent); font-weight: 600; font-size: 1.1rem; }
.brand-mark { width: 1.1rem; height: 1.1rem; border-radius: 999px; background: var(--brand-gradient); display: inline-block; }
.nav { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.nav a { color: var(--brand-white); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--brand-coral); }
.topbar-actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.theme-form, .signout-form { margin: 0; }

.footer { max-width: 64rem; margin: 2rem auto 0; padding: 1rem; color: var(--text-muted); font-size: 0.875rem; }
.muted { color: var(--text-muted); }
.small { font-size: 0.8rem; }
