/* ══════════════════════════════════════════════════════════════
   WPilot AI — Legal Pages · Shared Design System (light theme)
   Type: Space Grotesk (display) + Inter (body) — matches main site
   ══════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --violet:  #7A5CFF;
  --indigo:  #5C7BFF;
  --cyan:    #22C9E0;
  --brand:   linear-gradient(100deg, #7A5CFF 0%, #4E8DF5 52%, #22C9E0 100%);
  --brand-soft: linear-gradient(135deg, rgba(122,92,255,0.10), rgba(34,201,224,0.10));

  --link:    #6A44F2;
  --link-hover: #5533e0;

  --bg:       #FFFFFF;
  --bg-soft:  #F6F7FB;
  --bg-tint:  #F3F1FE;
  --surface:  #FFFFFF;

  --text:     #17141F;
  --text-2:   #3D3A4E;
  --muted:    #5E5A70;
  --dim:      #8E8AA0;

  --border:   #E9E8F1;
  --border-2: #DFDEEC;

  --success:  #12A150;
  --warn:     #E0982B;
  --warn-bg:  #FFF8EC;
  --warn-br:  #F4E3C0;

  --font-h: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-b: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20,16,40,0.05);
  --shadow-md: 0 8px 24px rgba(30,22,70,0.07), 0 1px 3px rgba(30,22,70,0.05);
  --shadow-lg: 0 18px 48px rgba(30,22,70,0.10);

  --header-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 0.25s var(--ease);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text-2);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-h); color: var(--text); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
*:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

.lg-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ── HEADER ─────────────────────────────────────────────────── */
.lg-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.lg-header-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 28px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: flex-start;
}
.lg-logo { display: inline-flex; }
.lg-logo img { height: 40px; width: auto; }

/* ── HERO ───────────────────────────────────────────────────── */
.lg-hero {
  position: relative; overflow: hidden;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 46px;
}
.lg-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46% 120% at 88% -10%, rgba(34,201,224,0.10), transparent 60%),
    radial-gradient(40% 120% at 6% 0%, rgba(122,92,255,0.10), transparent 60%);
}
.lg-hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.lg-hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.lg-updated {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; font-size: 0.85rem; font-weight: 600; color: var(--muted);
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border-2);
}
.lg-updated svg { width: 15px; height: 15px; color: var(--violet); }
.lg-lede { margin-top: 18px; max-width: 720px; color: var(--muted); font-size: 1.02rem; }

/* ── LAYOUT (shares the hero/header container; content left-aligned) ── */
.lg-layout {
  max-width: 1180px; margin: 0 auto; padding: 56px 28px 84px;
}

/* ── CONTENT ────────────────────────────────────────────────── */
.lg-content { min-width: 0; max-width: 820px; }
.lg-content > section { scroll-margin-top: calc(var(--header-h) + 20px); }
.lg-content > section + section { margin-top: 40px; }
.lg-content h2 {
  font-size: 1.5rem; margin-bottom: 14px;
  display: flex; align-items: baseline; gap: 12px;
}
.lg-content h2 .num {
  font-size: 0.95rem; font-weight: 700; color: var(--violet);
  background: var(--brand-soft); padding: 3px 10px; border-radius: var(--r-pill);
  font-family: var(--font-h); flex-shrink: 0;
}
.lg-content h3 { font-size: 1.1rem; margin: 24px 0 10px; color: var(--text); }
.lg-content p { margin-bottom: 14px; color: var(--text-2); }
.lg-content ul, .lg-content ol { margin: 0 0 14px 4px; padding-left: 22px; color: var(--text-2); }
.lg-content li { margin-bottom: 8px; }
.lg-content li::marker { color: var(--violet); }
.lg-content a:not(.callout-link) { color: var(--link); font-weight: 500; border-bottom: 1px solid rgba(106,68,242,0.28); transition: color var(--t), border-color var(--t); }
.lg-content a:not(.callout-link):hover { color: var(--link-hover); border-bottom-color: var(--link-hover); }
.lg-content strong { color: var(--text); font-weight: 600; }
.lg-content .intro { font-size: 1.05rem; color: var(--muted); margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid var(--border); }

/* Callout boxes */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--r-md); margin: 4px 0 20px;
  background: var(--bg-tint); border: 1px solid var(--border-2);
}
.callout .c-icon { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); color: var(--violet); border: 1px solid var(--border); }
.callout .c-icon svg { width: 18px; height: 18px; }
.callout p { margin: 0; font-size: 0.95rem; color: var(--text-2); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-br); }
.callout.warn .c-icon { color: var(--warn); }
.callout.brand { background: var(--brand-soft); border-color: rgba(122,92,255,0.22); }

/* Key-value / definition cards */
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 6px 0 20px; }
.kv-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; }
.kv-card .k { font-family: var(--font-h); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.kv-card .v { font-weight: 600; color: var(--text); }
.kv-card .v a { color: var(--link); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.lg-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 44px 0 40px; }
.lg-footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 28px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.lg-foot-logo img { height: 34px; }
.lg-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.lg-foot-links a { font-size: 0.86rem; color: var(--muted); transition: color var(--t); }
.lg-foot-links a:hover { color: var(--link); }
.lg-foot-copy { font-size: 0.85rem; color: var(--dim); }
.lg-foot-copy a { color: var(--link); }

/* ── BACK TO TOP ────────────────────────────────────────────── */
#toTop {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--brand);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--t), transform var(--t), visibility var(--t);
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { transform: translateY(-3px); }
#toTop svg { width: 20px; height: 20px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .lg-layout { padding-top: 40px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .lg-container, .lg-header-inner, .lg-hero-inner, .lg-layout, .lg-footer-inner { padding-left: 18px; padding-right: 18px; }
  .lg-hero { padding: 38px 0 34px; }
  .lg-layout { padding-bottom: 60px; }
  .lg-content h2 { font-size: 1.32rem; flex-wrap: wrap; gap: 8px; }
  .kv-grid { grid-template-columns: 1fr; }
  #toTop { right: 16px; bottom: 16px; }
}

@media (max-width: 400px) {
  .lg-hero h1 { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
