/* =========================================================
   Ai LED — Legal pages
   Matches landing page theme; optimized for long-form reading
   ========================================================= */

:root {
  --bg: #06070d;
  --bg-2: #0a0c16;
  --surface: #11131f;
  --surface-2: #161a28;
  --border: rgba(120, 220, 255, 0.14);
  --border-soft: rgba(255, 255, 255, 0.07);
  --text: #eef2fb;
  --text-2: #a7b0c4;
  --text-3: #6c7691;
  --cyan: #22d3ee;
  --cyan-2: #00e5ff;
  --grad: linear-gradient(120deg, #00e5ff 0%, #22d3ee 45%, #5b8cff 100%);
  --glow: 0 0 24px rgba(34, 211, 238, 0.45);
  --maxw: 820px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--cyan-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: #fff; }

/* ---------- Backdrop ---------- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 400px at 80% -5%, rgba(0,229,255,.08), transparent 60%),
    radial-gradient(600px 400px at 5% 10%, rgba(91,140,255,.08), transparent 60%),
    var(--bg);
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(6,7,13,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .3px;
}
.brand__mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad);
  display: grid; place-items: center;
  box-shadow: var(--glow);
}
.brand__dot { width: 8px; height: 8px; border-radius: 50%; background: #04141a; }
.brand__name { background: linear-gradient(90deg,#fff,#9fe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar__back {
  font-size: 14px; font-weight: 500; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-soft);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.topbar__back:hover { color: var(--cyan-2); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.06); }
.topbar__back::before { content: "←"; font-size: 16px; }

/* ---------- Doc ---------- */
.doc {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 80px;
  flex: 1;
}
.doc__header { margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border-soft); }
.doc__eyebrow {
  display: inline-block;
  font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34,211,238,.08);
  border: 1px solid rgba(34,211,238,.22);
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 18px;
}
.doc__title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(32px, 5vw, 48px); line-height: 1.08; letter-spacing: -.8px;
}
.doc__title .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.doc__meta { margin-top: 16px; color: var(--text-3); font-size: 14px; }

/* ---------- Prose ---------- */
.doc h2 {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  margin: 44px 0 14px;
  scroll-margin-top: 80px;
}
.doc h3 {
  font-family: var(--display); font-weight: 600; font-size: 17px;
  margin: 26px 0 10px; color: var(--text);
}
.doc p { color: var(--text-2); margin: 12px 0; }
.doc ul, .doc ol { margin: 12px 0 12px 4px; color: var(--text-2); }
.doc li { margin: 8px 0; padding-left: 8px; }
.doc ul li { list-style: none; position: relative; padding-left: 22px; }
.doc ul li::before { content: "✦"; position: absolute; left: 0; top: 0; color: var(--cyan); font-size: 12px; }
.doc ol { padding-left: 22px; }
.doc ol li { margin: 8px 0; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--cyan-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(34,211,238,.4); }
.doc a:hover { text-decoration-color: var(--cyan-2); }

/* ---------- Table ---------- */
.doc table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  font-size: 15px; display: block; overflow-x: auto;
}
.doc th, .doc td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.doc th {
  font-family: var(--display); font-weight: 600; font-size: 13px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .06em;
  border-bottom-color: var(--border);
}
.doc td { color: var(--text-2); vertical-align: top; }
.doc td:first-child { color: var(--text); font-weight: 500; }

/* ---------- Callout ---------- */
.callout {
  margin: 22px 0; padding: 18px 22px;
  border-radius: 14px;
  background: rgba(34,211,238,.06);
  border: 1px solid rgba(34,211,238,.25);
  border-left: 3px solid var(--cyan);
}
.callout--warn {
  background: rgba(255,159,67,.07);
  border-color: rgba(255,159,67,.3);
  border-left-color: #ff9f43;
}
.callout strong { color: var(--text); }
.callout p { color: var(--text-2); margin: 6px 0 0; }

/* ---------- TOC ---------- */
.toc {
  margin: 0 0 36px; padding: 20px 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft);
}
.toc__title { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.toc ol { columns: 2; column-gap: 32px; padding-left: 0; }
.toc li { list-style: none; margin: 6px 0; }
.toc a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.toc a:hover { color: var(--cyan-2); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-2);
  padding: 28px 0;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--text-3); font-size: 13px;
}
.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__links a { color: var(--text-3); font-size: 13px; }
.footer__links a:hover { color: var(--cyan-2); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .doc { padding: 36px 18px 60px; }
  .toc ol { columns: 1; }
  .topbar__inner { padding: 14px 18px; }
}
