:root {
      --bg0: #060614;
      --text: #f5f3ff;
      --muted: #9b8fc4;
      --cyan: #22d3ee;
      --violet: #8b5cf6;
      --line: rgba(167, 139, 250, 0.22);
      --font-display: "Outfit", system-ui, sans-serif;
      --font-body: "Manrope", system-ui, sans-serif;
      color-scheme: dark;
    }
    *, *::before, *::after { box-sizing: border-box; }
    html {
      background: #060614;
    }
    html, body {
      margin: 0;
      min-height: 100%;
      color: var(--text);
      font-family: var(--font-body);
      background: #060614;
      -webkit-font-smoothing: antialiased;
    }
    body {
      min-height: 100dvh;
      overflow-x: hidden;
      position: relative;
      isolation: isolate;
    }

    .bg {
      position: fixed; inset: 0; z-index: 0;
      pointer-events: none;
      background:
        radial-gradient(1200px 700px at 10% -10%, rgba(124, 58, 237, 0.38), transparent 55%),
        radial-gradient(900px 600px at 95% 5%, rgba(34, 211, 238, 0.18), transparent 50%),
        radial-gradient(800px 500px at 50% 110%, rgba(232, 121, 249, 0.16), transparent 55%),
        linear-gradient(165deg, #050510, #0a071c 45%, #07101c);
    }

    .legal-fx {
      position: fixed; inset: 0; z-index: 0;
      overflow: hidden; pointer-events: none;
    }
    .legal-mesh {
      position: absolute; inset: -20%;
      background:
        radial-gradient(38% 36% at 18% 28%, rgba(139, 92, 246, 0.45), transparent 70%),
        radial-gradient(42% 40% at 82% 18%, rgba(34, 211, 238, 0.32), transparent 68%),
        radial-gradient(44% 42% at 72% 82%, rgba(232, 121, 249, 0.22), transparent 70%),
        radial-gradient(36% 34% at 22% 88%, rgba(99, 102, 241, 0.28), transparent 68%);
      filter: saturate(130%) blur(2px);
      opacity: 0.95;
    }
    .legal-aurora {
      position: absolute; inset: -10%;
      background: conic-gradient(from 120deg at 50% 40%,
        transparent 0deg, rgba(34, 211, 238, 0.12) 60deg, transparent 120deg,
        rgba(167, 139, 250, 0.16) 200deg, transparent 280deg,
        rgba(244, 114, 182, 0.1) 320deg, transparent 360deg);
      opacity: 0.55;
    }
    .legal-grid {
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(167, 139, 250, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.04) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(ellipse 75% 55% at 50% 30%, #000 15%, transparent 72%);
      -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 30%, #000 15%, transparent 72%);
      opacity: 0.5;
    }
    .legal-beam {
      position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%;
      filter: blur(64px); opacity: 0.4;
    }
    .legal-beam-a {
      top: -16%; left: -12%;
      background: radial-gradient(circle, rgba(124, 58, 237, 0.5), transparent 62%);
    }
    .legal-beam-b {
      right: -14%; bottom: -18%;
      background: radial-gradient(circle, rgba(6, 182, 212, 0.42), transparent 62%);
    }
    .legal-node {
      position: absolute;
      padding: 0.32rem 0.65rem;
      border-radius: 999px;
      font: 700 0.66rem/1 var(--font-display);
      letter-spacing: 0.04em;
      color: rgba(226, 232, 255, 0.7);
      background: rgba(20, 16, 42, 0.4);
      border: 1px solid rgba(167, 139, 250, 0.26);
      backdrop-filter: blur(10px);
    }
    .legal-node.n1 { top: 9%; left: 6%; }
    .legal-node.n2 { top: 14%; right: 8%; color: #a5f3fc; border-color: rgba(34, 211, 238, 0.28); }
    .legal-node.n3 { bottom: 18%; right: 10%; }
    .legal-node.n4 { top: 38%; left: 4%; font-size: 0.85rem; padding: 0.35rem 0.5rem; }
    @media (max-width: 640px) {
      .legal-node.n3, .legal-node.n4 { display: none; }
    }

    .shell {
      position: relative; z-index: 2;
      width: min(860px, 100%);
      margin: 0 auto;
      padding: 1.15rem 1rem 3.5rem;
    }

    .topnav {
      display: flex; align-items: center; justify-content: space-between;
      gap: 1rem; flex-wrap: wrap;
      padding: 0.7rem 0.9rem;
      margin-bottom: 1.25rem;
      border-radius: 22px;
      background: rgba(14, 12, 32, 0.92);
      border: 1px solid rgba(167, 139, 250, 0.28);
      backdrop-filter: blur(18px) saturate(140%);
      -webkit-backdrop-filter: blur(18px) saturate(140%);
      box-shadow:
        0 24px 50px -20px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    .brand {
      display: inline-flex; align-items: center; gap: 0.7rem;
      color: inherit; text-decoration: none;
    }
    .brand-sheep {
      width: 42px; height: auto;
      filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 12px rgba(94, 234, 212, 0.2));
    }
    .brand-text { display: flex; flex-direction: column; gap: 0.05rem; line-height: 1.1; }
    .brand-name {
      font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
      letter-spacing: -0.03em;
      background: linear-gradient(110deg, #fff 8%, #c4b5fd 48%, #67e8f9 95%);
      -webkit-background-clip: text; background-clip: text; color: transparent;
    }
    .brand-tag { font-size: 0.7rem; font-weight: 650; color: var(--muted); }

    .nav-links {
      display: flex; gap: 0.35rem; flex-wrap: wrap;
    }
    .nav-links a {
      display: inline-flex; align-items: center;
      padding: 0.48rem 0.9rem;
      border-radius: 999px;
      border: 1px solid transparent;
      color: var(--muted);
      text-decoration: none;
      font-weight: 700; font-size: 0.84rem;
      transition: color 0.15s, background 0.15s, border-color 0.15s;
    }
    .nav-links a:hover {
      color: var(--text);
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(167, 139, 250, 0.22);
    }
    .nav-links a.is-current {
      color: #041016;
      background: linear-gradient(135deg, #22d3ee, #67e8f9);
      box-shadow: 0 6px 18px rgba(34, 211, 238, 0.28);
    }

    .hero, .doc {
      position: relative;
      border-radius: 28px;
      background: rgba(14, 12, 32, 0.92);
      border: 1px solid rgba(167, 139, 250, 0.28);
      backdrop-filter: blur(18px) saturate(140%);
      -webkit-backdrop-filter: blur(18px) saturate(140%);
      box-shadow:
        0 36px 70px -28px rgba(0, 0, 0, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
      overflow: hidden;
    }
    .hero::before, .doc::before {
      content: "";
      position: absolute; inset: 0; pointer-events: none;
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%),
        radial-gradient(380px 200px at 92% -8%, rgba(34, 211, 238, 0.16), transparent 60%);
    }
    .hero {
      margin-bottom: 1rem;
      padding: 1.45rem 1.35rem 1.3rem;
    }
    .eyebrow {
      position: relative;
      margin: 0 0 0.45rem;
      font-size: 0.7rem; font-weight: 750;
      letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--cyan);
    }
    .hero h1 {
      position: relative;
      margin: 0 0 0.55rem;
      font-family: var(--font-display);
      font-weight: 800;
      font-size: clamp(1.75rem, 4.8vw, 2.4rem);
      letter-spacing: -0.035em; line-height: 1.12;
    }
    .lead {
      position: relative;
      margin: 0;
      color: var(--muted);
      font-size: 0.96rem; line-height: 1.65;
      max-width: 58ch;
    }
    .lead a { color: var(--cyan); font-weight: 650; text-decoration: none; }
    .lead a:hover { text-decoration: underline; }
    .meta-row {
      position: relative;
      display: flex; flex-wrap: wrap; gap: 0.4rem;
      margin-top: 1rem;
    }
    .meta-pill {
      display: inline-flex; align-items: center;
      padding: 0.28rem 0.7rem;
      border-radius: 999px;
      font-size: 0.7rem; font-weight: 700;
      border: 1px solid rgba(167, 139, 250, 0.26);
      background: rgba(139, 92, 246, 0.12);
      color: #ddd6fe;
    }
    .meta-pill.cyan {
      border-color: rgba(34, 211, 238, 0.32);
      background: rgba(34, 211, 238, 0.1);
      color: #a5f3fc;
    }

    .toc {
      display: flex; flex-wrap: wrap; gap: 0.4rem;
      margin: 0 0 1.1rem;
    }
    .toc a {
      display: inline-flex;
      padding: 0.38rem 0.72rem;
      border-radius: 12px;
      border: 1px solid rgba(167, 139, 250, 0.16);
      background: rgba(18, 14, 40, 0.4);
      backdrop-filter: blur(12px);
      color: var(--muted);
      text-decoration: none;
      font-size: 0.74rem; font-weight: 650;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    .toc a:hover {
      color: var(--cyan);
      border-color: rgba(34, 211, 238, 0.35);
      background: rgba(34, 211, 238, 0.06);
    }

    .doc { padding: 0.4rem 0.4rem 0.95rem; }
    .section {
      position: relative;
      padding: 1.05rem 1.15rem 1rem;
      border-radius: 18px;
      scroll-margin-top: 1.2rem;
    }
    .section + .section {
      margin-top: 0.2rem;
      border-top: 1px solid rgba(167, 139, 250, 0.12);
    }
    .section:hover { background: rgba(255, 255, 255, 0.02); }
    .section-head {
      display: flex; align-items: flex-start; gap: 0.75rem;
      margin-bottom: 0.45rem;
    }
    .num {
      flex: 0 0 auto;
      width: 2rem; height: 2rem;
      display: grid; place-items: center;
      border-radius: 10px;
      font-family: var(--font-display);
      font-weight: 800; font-size: 0.8rem;
      color: #041016;
      background: linear-gradient(135deg, #a78bfa, #22d3ee);
      box-shadow: 0 6px 16px rgba(139, 92, 246, 0.28);
    }
    h2 {
      margin: 0; padding-top: 0.2rem;
      font-family: var(--font-display);
      font-weight: 700; font-size: 1.05rem;
      letter-spacing: -0.02em; line-height: 1.3;
      color: #f0ebff;
    }
    p {
      margin: 0.4rem 0 0;
      color: var(--muted);
      font-size: 0.94rem; line-height: 1.68;
    }
    ul {
      margin: 0.5rem 0 0; padding: 0;
      list-style: none;
      display: grid; gap: 0.45rem;
    }
    li {
      position: relative;
      padding: 0.55rem 0.75rem 0.55rem 2rem;
      border-radius: 12px;
      border: 1px solid rgba(167, 139, 250, 0.12);
      background: rgba(7, 6, 22, 0.35);
      color: var(--muted);
      font-size: 0.9rem; line-height: 1.55;
    }
    li::before {
      content: "";
      position: absolute; left: 0.75rem; top: 0.95rem;
      width: 0.45rem; height: 0.45rem; border-radius: 50%;
      background: linear-gradient(135deg, #22d3ee, #a78bfa);
      box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
    }
    a.inline { color: var(--cyan); font-weight: 650; text-decoration: none; }
    a.inline:hover { text-decoration: underline; }

    .closing {
      position: relative;
      margin: 1.1rem 0.75rem 0.35rem;
      padding: 1rem 1.15rem;
      border-radius: 16px;
      border: 1px solid rgba(34, 211, 238, 0.28);
      background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(139, 92, 246, 0.12));
      color: #e0f7fa;
      font-size: 0.9rem; font-weight: 600; line-height: 1.55;
    }

    .page-foot {
      margin-top: 1.45rem;
      display: flex; flex-wrap: wrap;
      align-items: center; justify-content: space-between;
      gap: 0.75rem;
      color: var(--muted); font-size: 0.82rem;
    }
    .page-foot a { color: var(--cyan); text-decoration: none; font-weight: 650; }
    .page-foot a:hover { text-decoration: underline; }
    .back-app {
      display: inline-flex; align-items: center; gap: 0.4rem;
      padding: 0.55rem 1rem;
      border-radius: 999px;
      border: 1px solid rgba(167, 139, 250, 0.3);
      background: rgba(139, 92, 246, 0.14);
      color: #e9e4ff !important;
      font-weight: 700;
      text-decoration: none !important;
      transition: background 0.15s, border-color 0.15s;
    }
    .back-app:hover {
      background: rgba(139, 92, 246, 0.24);
      border-color: rgba(167, 139, 250, 0.5);
    }
