/* ═══════════════════════════════════════════
   DESIGN TOKENS — mirrors new_index.css
═══════════════════════════════════════════ */
:root {
  --bg:       oklch(0.975 0.007 75);
  --bg2:      oklch(0.955 0.007 75);
  --bg3:      oklch(0.930 0.008 75);
  --line:     oklch(0.875 0.006 75);
  --text:     oklch(0.14  0.012 250);
  --text-dim: oklch(0.46  0.010 250);
  --text-sub: oklch(0.64  0.008 250);
  --accent:   oklch(0.34  0.08  162);
  --accent-l: oklch(0.34  0.08  162 / 0.09);
  --f-serif:  Georgia, Garamond, "Palatino Linotype", "Times New Roman", serif;
  --f-sans:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad:      max(24px, 5vw);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       oklch(0.10  0.010 200);
    --bg2:      oklch(0.135 0.010 200);
    --bg3:      oklch(0.165 0.010 200);
    --line:     oklch(0.24  0.008 200);
    --text:     oklch(0.93  0.005 75);
    --text-dim: oklch(0.66  0.008 200);
    --text-sub: oklch(0.48  0.006 200);
    --accent:   oklch(0.72  0.14  162);
    --accent-l: oklch(0.72  0.14  162 / 0.10);
  }
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
address { font-style: normal; }
::selection { background: var(--accent); color: var(--bg); }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* ═══════════════════════════════════════════
   HEADER — fixed, matches site-nav
═══════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  background: oklch(0.975 0.007 75 / 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
@media (prefers-color-scheme: dark) {
  .site-header { background: oklch(0.10 0.010 200 / 0.92); }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  width: 22px; height: 22px;
  display: block; flex-shrink: 0;
}
.logo-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1.2;
}
.logo-name small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-sub);
}
.back-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); text-decoration: none; }

/* ═══════════════════════════════════════════
   DOCUMENT LAYOUT
═══════════════════════════════════════════ */
body > main {
  padding-top: 60px;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px var(--pad) 96px;
}

/* ═══════════════════════════════════════════
   DOCUMENT HEADER
═══════════════════════════════════════════ */
.doc-header {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.doc-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.doc-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.t-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.doc-header h1 {
  font-family: var(--f-serif);
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 16px;
}

.doc-meta {
  font-size: 13px;
  color: var(--text-sub);
  letter-spacing: 0.02em;
}
.doc-meta strong { color: var(--text-dim); font-weight: 500; }

/* ═══════════════════════════════════════════
   INTRO CALLOUT
═══════════════════════════════════════════ */
.doc-intro {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 22px 26px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
}
.doc-intro p + p { margin-top: 10px; }

/* ═══════════════════════════════════════════
   DOCUMENT BODY TYPOGRAPHY
═══════════════════════════════════════════ */
.doc-body h2 {
  font-family: var(--f-serif);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
  padding-top: 36px;
  margin-top: 36px;
  border-top: 1px solid var(--line);
  margin-bottom: 16px;
  line-height: 1.2;
}
.doc-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.doc-body p {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 14px;
  max-width: 660px;
}
.doc-body p:last-child { margin-bottom: 0; }

.doc-body ul,
.doc-body ol {
  margin-bottom: 14px;
  padding-left: 0;
  list-style: none;
}
.doc-body ul ul { margin-top: 8px; margin-bottom: 0; padding-left: 20px; }

.doc-body li {
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
  padding: 6px 0 6px 20px;
  position: relative;
  border-bottom: 1px solid var(--line);
  max-width: 660px;
}
.doc-body li:last-child { border-bottom: none; }
.doc-body li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
}
.doc-body ul ul > li::before { content: '·'; }

.doc-body strong { font-weight: 600; color: var(--text); }
.doc-body em { font-style: italic; color: var(--text-dim); }

.doc-body address {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════
   DOCUMENT FOOTER NOTE
═══════════════════════════════════════════ */
.doc-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.doc-footer p {
  font-size: 13px;
  color: var(--text-sub);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 8px;
}
.doc-footer p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════
   SITE FOOTER — matches site-footer
═══════════════════════════════════════════ */
.site-footer {
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-sub);
}
.site-footer a {
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--text); text-decoration: none; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .doc { padding: 40px var(--pad) 64px; }
  .doc-header { margin-bottom: 32px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
