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

:root {
  --yellow: #FFD60A;
  --yellow-dim: #E6BC00;
  --purple: #4A148C;
  --purple-light: #7C3AED;
  --bg: #0A0A12;
  --surface: #131320;
  --surface2: #1C1C2A;
  --border: #25253A;
  --gray1: #B4B4C0;
  --gray2: #6B6B7C;
  --white: #FFF;
}
body.light {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface2: #F4F4F8;
  --border: #E5E5EC;
  --gray1: #4A4A55;
  --gray2: #88889A;
  --white: #0A0A12;
}
body.light .nav-logo-text { color: var(--purple); }
body.light .nav-links a { color: #4A4A55; }
body.light .btn-nav { background: var(--purple); color: #FFF; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.7;
}
html { scroll-behavior: smooth; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
body.light nav { background: rgba(250, 250, 250, 0.85); }

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon { width: 28px; height: 28px; border-radius: 7px; display: block; }
.nav-logo-text { font-weight: 800; font-size: 18px; color: var(--white); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--gray1); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }
.btn-nav { background: var(--yellow); color: #0A0A12; padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 13px; }
.btn-nav:hover { background: var(--yellow-dim); }

.theme-toggle {
  background: none; border: 1px solid var(--border);
  color: var(--gray1); cursor: pointer; border-radius: 8px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.theme-toggle:hover { border-color: var(--purple-light); color: var(--white); }

.page { max-width: 780px; margin: 0 auto; padding: 140px 40px 100px; }

.page-badge {
  display: inline-block;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.3);
  color: #C4B5FD;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 24px;
}
body.light .page-badge { color: var(--purple); border-color: rgba(74,20,140,0.25); background: rgba(74,20,140,0.06); }

h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 900; line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 12px; }
h1 span { color: var(--yellow); }
.updated { color: var(--gray2); font-size: 13px; margin-bottom: 40px; }

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--yellow);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 40px;
  font-size: 14px;
  color: var(--gray1);
}
.summary strong { color: var(--white); }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 48px;
}
.toc h3 { font-size: 12px; font-weight: 700; color: var(--gray2); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.toc ol { padding-left: 22px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: var(--gray1); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--yellow); text-decoration: underline; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

.section { margin-bottom: 40px; scroll-margin-top: 90px; }
.section h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.01em; }
.section h3 { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: var(--yellow); }
.section p { color: var(--gray1); font-size: 15px; margin-bottom: 12px; }
.section ul, .section ol { padding-left: 22px; margin-bottom: 12px; }
.section li { color: var(--gray1); font-size: 15px; margin-bottom: 6px; }
.section a { color: var(--yellow); }
.section strong { color: var(--white); }

footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  text-align: center;
}
.footer-copy { color: var(--gray2); font-size: 13px; }
.footer-copy a { color: var(--gray1); text-decoration: none; margin: 0 8px; }
.footer-copy a:hover { color: var(--white); }

@media (max-width: 600px) {
  nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .page { padding: 100px 20px 70px; }
}
