/* Phase 13 — verbatim extract from views/partials/legal-head.ejs */
/* --- block 1 --- */
:root {
      --bg: #fafafa;
      --fg: #09090b;
      --muted: #71717a;
      --muted-2: #a1a1aa;
      --border: rgba(9, 9, 11, 0.08);
      --surface: #ffffff;
      --accent: <%= legalAccent || '#6366f1' %>;
      --accent-soft: <%= legalAccentSoft || 'rgba(99, 102, 241, 0.1)' %>;
      --accent-glow: <%= legalAccentGlow || 'rgba(99, 102, 241, 0.25)' %>;
      --nav-h: 72px;
      --sidebar-w: 280px;
      --content-max: 760px;
      --page-max: 1280px;
      --radius: 16px;
      --radius-lg: 24px;
    }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--bg);
      color: var(--fg);
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--accent); text-decoration: none; font-weight: 500; }
    a:hover { text-decoration: underline; text-underline-offset: 3px; }

    .legal-nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      height: var(--nav-h);
      background: rgba(250, 250, 250, 0.78);
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      border-bottom: 1px solid var(--border);
    }
    .legal-nav-inner {
      max-width: var(--page-max); margin: 0 auto; padding: 0 24px;
      height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
    }
    .legal-brand {
      display: flex; align-items: center; gap: 10px;
      font-weight: 800; font-size: 1.05rem; letter-spacing: -0.03em; color: var(--fg); text-decoration: none;
    }
    .legal-brand:hover { text-decoration: none; }
    .legal-brand-mark {
      width: 34px; height: 34px; border-radius: 10px;
      background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #22d3ee 100%);
      display: flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem;
      box-shadow: 0 8px 24px rgba(99, 102, 241, 0.28);
    }
    .legal-nav-links { display: flex; align-items: center; gap: 8px; }
    .legal-nav-links a {
      font-size: 0.875rem; font-weight: 500; color: var(--muted); padding: 8px 14px; border-radius: 999px;
      text-decoration: none; transition: color 0.2s, background 0.2s;
    }
    .legal-nav-links a:hover { color: var(--fg); background: rgba(9,9,11,0.04); text-decoration: none; }
    .legal-nav-links a.active { color: var(--fg); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
    .legal-nav-links .btn-login {
      background: var(--fg); color: #fff; font-weight: 600; margin-left: 4px;
    }
    .legal-nav-links .btn-login:hover { background: #27272a; color: #fff; }

    .legal-hero {
      position: relative; overflow: hidden;
      padding: calc(var(--nav-h) + 56px) 24px 64px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
    }
    .legal-hero::before,
    .legal-hero::after {
      content: ''; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(80px);
    }
    .legal-hero::before {
      width: 480px; height: 480px; top: -180px; right: -80px;
      background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    }
    .legal-hero::after {
      width: 360px; height: 360px; bottom: -120px; left: -60px;
      background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
    }
    .legal-hero-inner {
      position: relative; z-index: 1; max-width: var(--page-max); margin: 0 auto;
      display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end;
    }
    .legal-hero-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
      letter-spacing: 0.04em; text-transform: uppercase;
      background: var(--accent-soft); color: var(--accent); margin-bottom: 16px;
    }
    .legal-hero h1 {
      font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800;
      letter-spacing: -0.04em; line-height: 1.08; max-width: 720px;
    }
    .legal-hero p {
      margin-top: 16px; font-size: 1.125rem; color: var(--muted); max-width: 560px; line-height: 1.6;
    }
    .legal-hero-meta {
      text-align: right; font-size: 0.8125rem; color: var(--muted);
    }
    .legal-hero-meta strong { display: block; color: var(--fg); font-size: 0.875rem; margin-bottom: 4px; }

    .legal-switch {
      max-width: var(--page-max); margin: -28px auto 0; padding: 0 24px; position: relative; z-index: 2;
    }
    .legal-switch-inner {
      display: inline-flex; padding: 4px; border-radius: 999px;
      background: var(--surface); border: 1px solid var(--border);
      box-shadow: 0 8px 32px rgba(0,0,0,0.06);
      flex-wrap: wrap;
    }
    .legal-switch a {
      padding: 10px 16px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
      color: var(--muted); text-decoration: none; transition: all 0.2s;
    }
    .legal-switch a:hover { color: var(--fg); text-decoration: none; }
    .legal-switch a.active { background: var(--fg); color: #fff; }

    .legal-body {
      max-width: var(--page-max); margin: 0 auto; padding: 48px 24px 80px;
      display: grid; grid-template-columns: var(--sidebar-w) 1fr; gap: 64px; align-items: start;
    }

    .legal-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
    .legal-sidebar-label {
      font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--muted-2); margin-bottom: 12px;
    }
    .legal-toc { list-style: none; border-left: 1px solid var(--border); }
    .legal-toc a {
      display: block; padding: 8px 0 8px 16px; margin-left: -1px;
      font-size: 0.8125rem; font-weight: 500; color: var(--muted); line-height: 1.4;
      border-left: 2px solid transparent; text-decoration: none;
      transition: color 0.15s, border-color 0.15s;
    }
    .legal-toc a:hover { color: var(--fg); text-decoration: none; }
    .legal-toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

    .legal-content { max-width: var(--content-max); min-width: 0; }
    .legal-section {
      padding-bottom: 48px; margin-bottom: 48px;
      border-bottom: 1px solid var(--border);
    }
    .legal-section:last-of-type { border-bottom: none; margin-bottom: 0; }
    .legal-section h2 {
      font-size: 1.375rem; font-weight: 700; letter-spacing: -0.025em;
      margin-bottom: 16px; color: var(--fg);
    }
    .legal-section h3 {
      font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em;
      margin: 20px 0 10px; color: var(--fg);
    }
    .legal-section p { color: #3f3f46; font-size: 0.9375rem; margin-bottom: 12px; }
    .legal-section p:last-child { margin-bottom: 0; }
    .legal-section ul {
      margin: 12px 0; padding-left: 1.25rem; color: #3f3f46; font-size: 0.9375rem;
    }
    .legal-section li { margin-bottom: 8px; }
    .legal-section li::marker { color: var(--muted-2); }

    .legal-callout {
      margin-top: 16px; padding: 16px 18px; border-radius: var(--radius);
      font-size: 0.875rem; line-height: 1.6;
    }
    .legal-callout-warn {
      background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    }
    .legal-callout-info {
      background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e;
    }
    .legal-callout strong { font-weight: 700; }

    .legal-contact {
      margin-top: 56px; padding: 32px; border-radius: var(--radius-lg);
      background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
      color: #fafafa; border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    }
    .legal-contact h3 {
      font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px;
    }
    .legal-contact > p { color: rgba(250,250,250,0.65); font-size: 0.9375rem; margin-bottom: 24px; }
    .legal-contact-grid {
      display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px;
      font-size: 0.875rem; line-height: 1.7;
    }
    .legal-contact-grid dt { color: rgba(250,250,250,0.5); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
    .legal-contact-grid dd { color: #fafafa; margin: 0; }
    .legal-contact-grid a { color: #a5b4fc; }
    .legal-contact-grid a:hover { color: #c7d2fe; }
    .legal-contact-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
    .legal-btn {
      display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px;
      border-radius: 999px; font-size: 0.875rem; font-weight: 600; text-decoration: none;
      transition: transform 0.2s, box-shadow 0.2s;
    }
    .legal-btn:hover { text-decoration: none; transform: translateY(-1px); }
    .legal-btn-primary { background: #fff; color: #18181b; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
    .legal-btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.15); }

    .legal-grievance {
      margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
    }
    .legal-grievance h4 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }

    .legal-site-footer {
      border-top: 1px solid var(--border); background: var(--surface);
      padding: 32px 24px; text-align: center; font-size: 0.8125rem; color: var(--muted);
    }
    .legal-site-footer a { color: var(--muted); font-weight: 500; margin: 0 12px; }
    .legal-site-footer a:hover { color: var(--fg); }
    .legal-site-footer-copy { margin-top: 16px; }

    .legal-mobile-toc {
      display: none; margin-bottom: 32px; padding: 16px;
      background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    }
    .legal-mobile-toc summary {
      font-size: 0.875rem; font-weight: 600; cursor: pointer; list-style: none;
      display: flex; align-items: center; justify-content: space-between;
    }
    .legal-mobile-toc summary::-webkit-details-marker { display: none; }
    .legal-mobile-toc .legal-toc { margin-top: 12px; border-left: none; }
    .legal-mobile-toc .legal-toc a { padding-left: 0; border-left: none; }

    @media (max-width: 960px) {
      .legal-body { grid-template-columns: 1fr; gap: 0; }
      .legal-sidebar { display: none; }
      .legal-mobile-toc { display: block; }
      .legal-hero-inner { grid-template-columns: 1fr; }
      .legal-hero-meta { text-align: left; margin-top: 8px; }
      .legal-contact-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 600px) {
      .legal-nav-links a:not(.btn-login) { display: none; }
      .legal-switch-inner { width: 100%; }
      .legal-switch a { flex: 1; text-align: center; }
    }
