*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #100a1c;
  --surface: #1a1230;
  --surface-2: #221840;
  --surface-3: #2a1d4c;
  --border: rgba(196, 181, 253, 0.14);
  --border-strong: rgba(196, 181, 253, 0.28);
  --accent: #a78bfa;
  --accent-deep: #7c3aed;
  --accent-light: #ddd6fe;
  --text: #f5f0ff;
  --text-muted: #b7a8d4;
  --warn-bg: rgba(251, 191, 36, 0.08);
  --warn-text: #fbbf24;
  --note-bg: rgba(167, 139, 250, 0.08);
  --shadow: 0 18px 48px rgba(8, 4, 18, 0.45);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

body::before {
  top: -220px;
  left: -160px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22) 0%, transparent 68%);
}

body::after {
  right: -180px;
  bottom: -240px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 70%);
}

a {
  color: var(--accent-light);
}

img {
  display: block;
  max-width: 100%;
}

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 36px;
}

.home-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 40px 28px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(34, 24, 64, 0.94), rgba(22, 16, 42, 0.96));
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45);
}

.home-card h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-card .tagline {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.home-links {
  display: grid;
  gap: 12px;
  margin: 28px 0 18px;
}

.home-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(16, 10, 28, 0.55);
  border: 1px solid var(--border);
  border-radius: 18px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.home-links a:hover {
  border-color: var(--border-strong);
  background: rgba(167, 139, 250, 0.08);
  transform: translateY(-1px);
}

.link-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(167, 139, 250, 0.14);
  font-size: 16px;
}

.link-copy {
  flex: 1;
  text-align: left;
}

.link-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.link-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.link-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

.operator {
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(16, 10, 28, 0.4);
}

.operator small {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.operator p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.operator a {
  color: var(--accent-light);
  text-decoration: none;
}

.home-foot {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.75;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 10, 28, 0.82);
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 980px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.45);
}

.brand span {
  font-weight: 700;
  font-size: 15px;
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.header-nav a {
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent-light);
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.22);
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 88px;
  position: relative;
  z-index: 1;
}

.toc {
  position: sticky;
  top: 84px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.toc h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc ul {
  list-style: none;
}

.toc a {
  display: block;
  padding: 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 12.5px;
  text-decoration: none;
}

.toc a:hover {
  padding-left: 14px;
  color: var(--accent-light);
  background: rgba(167, 139, 250, 0.08);
  border-left-color: var(--accent);
}

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
}

.hero img {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff, #ddd6fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 600;
}

.alert {
  margin-bottom: 16px;
  padding: 16px 20px;
  border-left: 3px solid;
  border-radius: 14px;
}

.alert-warn {
  background: var(--warn-bg);
  border-color: var(--warn-text);
}

.alert-note {
  background: var(--note-bg);
  border-color: var(--accent);
}

.alert-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.alert-warn .alert-title {
  color: var(--warn-text);
}

.alert-note .alert-title {
  color: var(--accent-light);
}

.alert p,
.alert li {
  color: var(--text-muted);
  font-size: 13.5px;
}

.alert ul {
  margin-top: 6px;
  padding-left: 18px;
}

.section {
  margin-bottom: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  scroll-margin-top: 84px;
}

.section:target {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6d28d9, #a78bfa);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.section h2 {
  font-size: 17px;
  font-weight: 700;
}

.section h3 {
  margin: 18px 0 8px;
  color: var(--accent-light);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section p,
.section li {
  color: var(--text-muted);
  font-size: 14px;
}

.section p + p,
.section ul {
  margin-top: 10px;
}

.section ul,
.section ol {
  padding-left: 20px;
}

.section li + li {
  margin-top: 4px;
}

.callout {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(167, 139, 250, 0.08);
  color: var(--text-muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: var(--accent-light);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

td {
  color: var(--text-muted);
  border-bottom: 1px solid rgba(167, 139, 250, 0.08);
}

tr:last-child td {
  border-bottom: none;
}

footer {
  position: relative;
  z-index: 1;
  padding: 28px 24px 36px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-light);
}

footer p {
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.75;
}

@media (max-width: 740px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 24px;
  }

  .toc {
    position: static;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero .meta {
    justify-content: center;
  }

  .header-nav a {
    padding-inline: 10px;
  }
}
