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

:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --border:   #334155;
  --text:     #94a3b8;
  --heading:  #f1f5f9;
  --sub:      #cbd5e1;
  --accent:   #38bdf8;
  --warn-bg:  #450a0a;
  --warn-txt: #fca5a5;
  --meta:     #475569;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

nav .brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
  text-decoration: none;
  flex-shrink: 0;
}

nav .links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

/* ── Layout ── */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* ── Page header ── */
.page-header { margin-bottom: 2.5rem; }

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 0.8125rem;
  color: var(--meta);
}

/* ── Hero (index only) ── */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 2.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 680px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.card:hover { border-color: var(--accent); text-decoration: none; }

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--text);
}

/* ── Document content ── */
.doc h2 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--heading);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.doc h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--sub);
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
}

.doc p {
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
}

.doc ul {
  list-style: none;
  margin-bottom: 0.875rem;
}

.doc ul li {
  font-size: 0.9375rem;
  padding-left: 1rem;
  margin-bottom: 0.375rem;
  position: relative;
}

.doc ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--meta);
}

.doc strong { color: #e2e8f0; font-weight: 600; }

.doc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

.warn {
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  color: var(--warn-txt);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.6;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--meta);
}
