:root {
      --bg:        #0a0c10;
      --surface1: #0f1117;
      --surface2: #161b24;
      --surface3: #1d2535;
      --text:     #e8ecf1;
      --muted:    #7d8899;
      --dim:      #4a5568;
      --accent:   #3b82f6;
      --accent-hover: #2563eb;
      --accent-bg: rgba(59,130,246,0.08);
      --accent-border: rgba(59,130,246,0.25);
      --danger:   #ef4444;
      --danger-bg: rgba(239,68,68,0.08);
      --danger-border: rgba(239,68,68,0.2);
      --border:   rgba(255,255,255,0.07);
      --border-strong: rgba(255,255,255,0.12);
      --radius:   8px;
    }

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

    html { scroll-behavior: smooth; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    a { color: inherit; text-decoration: none; }

    /* ── NAV ── */
    .nav {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      height: 52px;
      background: rgba(10,12,16,0.92);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
    }

    .nav-logo-container {
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }

    .nav-logo-icon {
      color: var(--accent);
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-logo-text {
      font-size: 14px;
      font-weight: 600;
      letter-spacing: -0.01em;
      color: var(--text);
      white-space: nowrap;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .nav-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: var(--radius);
      font-size: 13px;
      font-weight: 500;
      color: var(--muted);
      border: 1px solid transparent;
      cursor: pointer;
      transition: color 0.15s, background 0.15s, border-color 0.15s;
    }

    .nav-btn:hover {
      color: var(--text);
      background: var(--surface2);
      border-color: var(--border);
    }

    .nav-btn.primary {
      color: #fff;
      background: var(--accent);
      border-color: transparent;
    }

    .nav-btn.primary:hover { background: var(--accent-hover); }

    /* ── DOC HEADER ── */
    .doc-hero {
      padding: 56px 28px 32px;
      border-bottom: 1px solid var(--border);
      max-width: 780px;
      margin: 0 auto;
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 18px;
    }

    .hero-eyebrow::before {
      content: '';
      display: block;
      width: 16px; height: 1px;
      background: var(--accent);
    }

    .doc-hero h1 {
      font-size: clamp(26px, 4vw, 34px);
      font-weight: 600;
      line-height: 1.18;
      letter-spacing: -0.02em;
      color: var(--text);
      margin-bottom: 10px;
    }

    .doc-effective {
      font-size: 13px;
      color: var(--dim);
    }

    /* ── DOC BODY ── */
    .page-inner {
      max-width: 780px;
      margin: 0 auto;
    }

    .doc-body {
      padding: 40px 28px 20px;
    }

    .doc-intro {
      font-size: 14px;
      line-height: 1.75;
      color: var(--muted);
      margin-bottom: 8px;
    }

    .doc-section {
      padding: 28px 0;
      border-bottom: 1px solid var(--border);
      scroll-margin-top: 68px;
      border-radius: var(--radius);
    }

    .doc-section:last-of-type { border-bottom: none; }

    .doc-section-number {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--dim);
      margin-bottom: 8px;
    }

    .doc-section h2 {
      font-size: 17px;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.01em;
      margin-bottom: 12px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .anchor-link {
      opacity: 0;
      color: var(--dim);
      font-size: 14px;
      transition: opacity 0.15s, color 0.15s;
    }

    .doc-section h2:hover .anchor-link,
    .anchor-link:focus-visible {
      opacity: 1;
    }

    .anchor-link:hover {
      color: var(--accent);
    }

    :target {
      animation: highlight-section 1.6s ease;
    }

    @keyframes highlight-section {
      0% { background: var(--accent-bg); }
      100% { background: transparent; }
    }

    .doc-section p {
      font-size: 14px;
      line-height: 1.75;
      color: var(--muted);
      margin-bottom: 12px;
    }

    .doc-section p:last-child { margin-bottom: 0; }

    .doc-section ul {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin: 4px 0 14px;
    }

    .doc-section ul:last-child { margin-bottom: 0; }

    .doc-section li {
      font-size: 14px;
      line-height: 1.6;
      color: var(--muted);
      padding-left: 18px;
      position: relative;
    }

    .doc-section li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 8px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--accent);
    }

    .doc-section strong {
      color: var(--text);
      font-weight: 600;
    }

    .doc-callout {
      background: var(--surface1);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      font-size: 13px;
      line-height: 1.7;
      color: var(--muted);
      margin-top: 8px;
    }

    .doc-closing {
      padding: 32px 0 8px;
      font-size: 13px;
      line-height: 1.75;
      color: var(--dim);
    }

    /* ── FOOTER ── */
    .footer {
      padding: 20px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid var(--border);
      max-width: 1100px;
      margin: 0 auto;
    }

    .footer-text { font-size: 12px; color: var(--dim); }

    .footer-links {
      display: flex;
      gap: 18px;
    }

    .footer-link {
      font-size: 12px;
      color: var(--dim);
      cursor: pointer;
      transition: color 0.15s;
    }

    .footer-link:hover { color: var(--muted); }

    /* ── SCROLL REVEAL ── */
    .reveal {
      opacity: 0;
      transform: translateY(16px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .reveal.visible {
      opacity: 1;
      transform: translateY(0);
    }

    /* ── RESPONSIVE ── */
    @media (max-width: 768px) {
      .nav { padding: 0 16px; }
      .nav-btn span { display: none; }
      .doc-hero { padding: 40px 16px 28px; }
      .doc-body { padding: 28px 16px 12px; }
      .footer { padding: 16px; flex-direction: column; gap: 10px; align-items: flex-start; }
    }

    @media (prefers-reduced-motion: reduce) {
      .reveal { transition: none; }
    }
