:root {
  color-scheme: dark;
  --bg: #07060f;
  --surface: #11101e;
  --line: rgba(182, 157, 255, 0.18);
  --text: #f7f4ff;
  --muted: #b2acc5;
  --brand: #8b5cf6;
  --brand-2: #31c8ff;
  --warning: #fbbf24;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 15% -10%, rgba(139,92,246,.23), transparent 32rem), radial-gradient(circle at 90% 5%, rgba(49,200,255,.11), transparent 26rem), var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.72;
}
a { color: #bda8ff; text-underline-offset: 3px; }
a:hover { color: #d9ceff; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(7,6,15,.88); backdrop-filter: blur(18px); }
.header-inner { width: min(1100px, calc(100% - 32px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 22px rgba(139,92,246,.34); }
.nav-toggle { display: none; }
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 650; padding: 8px 10px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(139,92,246,.16); }
.hero { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 42px; }
.eyebrow { color: #b69cff; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 850; }
h1 { max-width: 850px; margin: 10px 0 14px; font-size: clamp(2.15rem, 6vw, 4.35rem); line-height: 1.04; letter-spacing: -.055em; }
.hero-copy { max-width: 760px; color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.18rem); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #d8d1e8; border-radius: 999px; padding: 6px 11px; font-size: .82rem; font-weight: 700; }
.layout { width: min(1100px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 72px; }
.toc { position: sticky; top: 96px; border: 1px solid var(--line); background: rgba(17,16,30,.86); border-radius: 18px; padding: 16px; }
.toc strong { display: block; margin-bottom: 8px; font-size: .9rem; }
.toc a { display: block; color: var(--muted); text-decoration: none; font-size: .86rem; padding: 6px 8px; border-radius: 8px; line-height: 1.35; }
.toc a span { display: inline-block; min-width: 2.35em; margin-right: 4px; color: #a98cff; font-variant-numeric: tabular-nums; font-weight: 800; }
.toc a:hover { color: #fff; background: rgba(139,92,246,.14); }
.content { min-width: 0; }
.notice { border: 1px solid rgba(49,200,255,.28); border-left: 4px solid var(--brand-2); background: rgba(49,200,255,.08); border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; color: #dbeeff; }
.notice.warning { border-color: rgba(251,191,36,.25); border-left-color: var(--warning); background: rgba(251,191,36,.07); color: #ffefbe; }
.card { scroll-margin-top: 92px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(24,21,42,.94), rgba(14,13,25,.94)); border-radius: 20px; padding: clamp(20px, 4vw, 30px); margin: 0 0 16px; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.section-number { display: inline-grid; place-items: center; min-width: 38px; height: 28px; padding: 0 8px; border-radius: 9px; color: #fff; background: linear-gradient(135deg, var(--brand), #6d28d9); font-size: .78rem; font-weight: 850; }
h2 { margin: 12px 0 13px; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; letter-spacing: -.025em; }
h3 { margin: 22px 0 8px; font-size: 1.04rem; }
p { margin: 0 0 14px; }
ul, ol { margin: 8px 0 14px; padding-left: 22px; }
li { margin: 7px 0; }
.muted { color: var(--muted); }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.data-item { border: 1px solid rgba(182,157,255,.13); background: rgba(255,255,255,.025); border-radius: 14px; padding: 15px; }
.data-item strong { display: block; margin-bottom: 5px; }
.data-item span { color: var(--muted); font-size: .92rem; }
.site-footer { border-top: 1px solid var(--line); background: rgba(10,9,18,.84); }
.footer-inner { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 40px; display: grid; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.fine-print { color: #89839c; font-size: .82rem; max-width: 820px; }
@media (max-width: 820px) {
  .header-inner { position: relative; width: min(100% - 24px, 1100px); min-height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand span { display: inline; font-size: .96rem; }
  .nav-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 13px;
    background: rgba(255,255,255,.045);
    color: var(--text);
    font: inherit;
    font-size: .88rem;
    font-weight: 750;
    cursor: pointer;
  }
  .nav-toggle:hover, .nav-toggle:focus-visible, .nav-toggle[aria-expanded="true"] { border-color: rgba(139,92,246,.65); background: rgba(139,92,246,.17); outline: none; }
  .nav-toggle-icon { position: relative; width: 18px; height: 2px; border-radius: 999px; background: currentColor; transition: background .16s ease; }
  .nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 999px; background: currentColor; transition: transform .16s ease, top .16s ease; }
  .nav-toggle-icon::before { top: -6px; }
  .nav-toggle-icon::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 30;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    background: rgba(17,16,30,.98);
    box-shadow: 0 20px 48px rgba(0,0,0,.46);
    backdrop-filter: blur(20px);
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 11px 12px; white-space: normal; }
  .hero { width: min(100% - 28px, 1100px); padding: 48px 0 30px; }
  .layout { width: min(100% - 28px, 1100px); display: block; padding-bottom: 48px; }
  .toc { position: static; display: flex; overflow-x: auto; gap: 5px; margin-bottom: 18px; padding: 10px; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc strong { display: none; }
  .toc a { white-space: nowrap; border: 1px solid rgba(182,157,255,.12); }
  .data-grid { grid-template-columns: 1fr; }
}
@media print { body { background: #fff; color: #111; } .site-header, .toc { display: none; } .layout { display: block; width: 100%; } .card { break-inside: avoid; background: #fff; border-color: #ddd; box-shadow: none; } a { color: #111; } }
