/* Self-hosted fonts — no Google Fonts, no third-party IP transfer */
@font-face {
  font-family: 'Crimson Pro';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/crimson-pro-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Pro';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/crimson-pro-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
}

/* ===== TOKENS (match maximleopold.com) ===== */
:root {
  --bg:        hsl(210 100% 95%);    /* pale blue-white, same as main site */
  --bg-subtle: hsl(210 60% 97%);
  --text:      #0f172a;              /* deep navy */
  --muted:     #475569;
  --faint:     #94a3b8;
  --border:    hsl(210 40% 88%);
  --accent:    #0891b2;              /* cyan, from main site palette */
  --code-bg:   hsl(210 30% 91%);
  --code-text: #0f172a;

  --font-serif: 'Crimson Pro', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 700px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #020617;
    --bg-subtle: #0f172a;
    --text:      #e2e8f0;
    --muted:     #94a3b8;
    --faint:     #475569;
    --border:    hsl(222 47% 15%);
    --accent:    #22d3ee;
    --code-bg:   #1e293b;
    --code-text: #e2e8f0;
  }
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER ===== */
header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--muted);
  letter-spacing: .02em;
}

.site-name::before {
  content: '→ ';
  color: var(--accent);
}

/* ===== MAIN ===== */
main {
  padding: 56px 0 80px;
}

section {
  margin-bottom: 56px;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin-bottom: 16px;
  color: var(--text);
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

p {
  margin-bottom: 14px;
  color: var(--text);
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover { opacity: .75; }

.muted {
  color: var(--muted);
  font-size: 1rem;
}

/* ===== INTRO ===== */
.intro h1 { margin-bottom: 20px; }
.intro p { font-size: 1.15rem; }

/* ===== CODE ===== */
code {
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  font-size: .82em;
  background: var(--code-bg);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  margin: 16px 0;
  overflow-x: auto;
}

pre code {
  background: none;
  color: var(--code-text);
  padding: 0;
  font-size: .875rem;
  line-height: 1.6;
}

/* ===== BUNDLES ===== */
.section-note {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 32px;
  font-style: italic;
}

.bundle {
  margin-bottom: 40px;
  padding-left: 0;
}

.bundle-target {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.bundle ul {
  list-style: none;
  margin: 12px 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.bundle li {
  font-size: 1rem;
  color: var(--text);
  padding-left: 16px;
  position: relative;
}

.bundle li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--faint);
}

.dl-link {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s;
}

.dl-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

/* ===== PLAIN LIST ===== */
.plain-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plain-list li {
  padding-left: 20px;
  position: relative;
  color: var(--text);
}

.plain-list li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--faint);
}

/* ===== FOOTER ===== */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

footer p {
  font-family: var(--font-sans);
  font-size: .875rem;
  color: var(--muted);
  margin: 0;
}

footer a {
  color: var(--muted);
}

/* ===== SKIP LINK (accessibility / BFSG) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: .875rem;
  z-index: 999;
}
.skip-link:focus { top: 0; }

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ===== DISCLAIMER ===== */
.disclaimer { margin-bottom: 24px; }
.disclaimer-text { font-size: .875rem; font-style: italic; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
  body { font-size: 1.05rem; }
  main { padding: 36px 0 60px; }
}
