/* legal.css — Scaleo AI legal document pages (Privacy, Terms, DPA)
 * Shared shell: nav, document header, sticky TOC, clause typography, footer, print. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #ffffff; --ink: #08090d; --ink-2: #5e636e; --ink-3: #969aa4;
  --line: #ededee; --line-2: #f5f5f6; --surface: #fafafa;
  --accent: #246bfd; --accent-2: #5b8cff; --accent-soft: #edf2ff;
  --amber: #b9740a; --amber-soft: #fbf1e3;
  --green: #1a9b53; --green-soft: #e8f6ee;
  --shadow-card: 0 0 0 1px rgba(8,9,13,0.04), 0 6px 16px -8px rgba(8,9,13,0.16), 0 2px 5px -2px rgba(8,9,13,0.08);
  --mono: 'Geist Mono', ui-monospace, monospace; --maxw: 1180px;
}
html, body { background: var(--bg); scroll-behavior: smooth; }
body { font-family: 'Geist', system-ui, -apple-system, sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; font-feature-settings: "cv01","ss03"; }
a { text-decoration: none; color: inherit; }
a.inline { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
a.inline:hover { border-bottom-color: var(--accent); }

/* NAV */
nav { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,0.86); backdrop-filter: blur(16px) saturate(1.6); border-bottom: 1px solid var(--line); }
.nav-l { display: flex; align-items: center; gap: 26px; }
.logo { display: flex; align-items: center; }
.logo-word { height: 16px; width: auto; display: block; }
.nav-mid { display: flex; align-items: center; gap: 2px; }
.nav-mid a { font-size: 13.5px; color: var(--ink-2); padding: 7px 11px; border-radius: 8px; }
.nav-mid a:hover { color: var(--ink); background: var(--line-2); }
.nav-right { display: flex; align-items: center; gap: 4px; }
.btn-ghost { font-size: 13.5px; font-weight: 500; padding: 7px 12px; border-radius: 8px; color: var(--ink); }
.btn-ghost:hover { background: var(--line-2); }
.btn-dark { font-size: 13.5px; font-weight: 500; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; }
.btn-dark:hover { background: #22242e; }

/* READING PROGRESS */
.prog { position: fixed; top: 60px; left: 0; height: 2px; width: 0; background: var(--ink); z-index: 70; transition: width 90ms linear; }

/* DOCUMENT HEADER */
.legal-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.legal-head .inner { max-width: var(--maxw); margin: 0 auto; padding: 52px 40px 40px; }
.crumb { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.crumb a:hover { color: var(--ink); }
.legal-head h1 { font-size: 42px; letter-spacing: -1.5px; font-weight: 600; margin-top: 14px; max-width: 20ch; text-wrap: balance; }
.legal-head .stand { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); margin-top: 14px; max-width: 62ch; text-wrap: pretty; }
.metarow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px; white-space: nowrap; }
.mchip .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.mchip svg { width: 13px; height: 13px; stroke: var(--ink-3); stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* AUDIENCE SWITCH */
.switch { display: inline-flex; align-items: center; gap: 3px; margin-top: 24px; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.switch a { font-size: 13.5px; font-weight: 500; color: var(--ink-2); padding: 8px 16px; border-radius: 8px; white-space: nowrap; }
.switch a:hover { color: var(--ink); background: var(--line-2); }
.switch a[aria-current="page"] { background: var(--ink); color: #fff; }
.switch a[aria-current="page"]:hover { background: var(--ink); }

/* BODY LAYOUT */
.legal-wrap { max-width: var(--maxw); margin: 0 auto; padding: 40px 40px 88px; display: grid; grid-template-columns: 236px 1fr; gap: 60px; align-items: start; }
.toc { position: sticky; top: 84px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 6px; }
.toc h4 { font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; }
.toc a { display: flex; gap: 9px; font-size: 13px; color: var(--ink-2); padding: 5px 0; line-height: 1.45; border-left: 2px solid transparent; padding-left: 11px; margin-left: -13px; }
.toc a .tn { font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex-shrink: 0; padding-top: 1px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); font-weight: 500; border-left-color: var(--ink); }
.toc a.active .tn { color: var(--ink); }
.toc .grp { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin: 20px 0 9px; padding-top: 14px; border-top: 1px solid var(--line); }

/* DOCUMENT BODY */
.doc { max-width: 720px; min-width: 0; }
.doc section { scroll-margin-top: 84px; margin-bottom: 40px; }
.doc h2 { display: flex; gap: 12px; font-size: 22px; letter-spacing: -0.6px; font-weight: 600; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); align-items: baseline; }
.doc h2 .n { color: var(--ink-3); font-family: var(--mono); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.doc p { font-size: 15.5px; line-height: 1.72; color: var(--ink-2); margin-bottom: 13px; text-wrap: pretty; }
.doc p:last-child { margin-bottom: 0; }
.doc b, .doc strong { color: var(--ink); font-weight: 600; }

/* CLAUSES */
.cl { display: grid; grid-template-columns: 48px 1fr; gap: 4px; margin-bottom: 20px; }
.cn { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 4px; font-variant-numeric: tabular-nums; }
.ct { min-width: 0; }
.ct > p:first-child { margin-top: 0; }
.doc ul { margin: 4px 0 13px; padding-left: 19px; }
.doc ul li { font-size: 15.5px; line-height: 1.68; color: var(--ink-2); margin-bottom: 7px; text-wrap: pretty; }
.doc ul li::marker { color: var(--ink-3); }
.doc ul.tight li { margin-bottom: 4px; }

/* DEFINITIONS */
.defs { display: flex; flex-direction: column; gap: 14px; }
.def { display: grid; grid-template-columns: 48px 1fr; gap: 4px; }
.def .dt { font-weight: 600; color: var(--ink); }
.def p { margin-bottom: 0; }

/* GDPR TABLE */
.gt-wrap { margin: 6px 0 20px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gt { width: 100%; border-collapse: collapse; }
.gt th { text-align: left; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); background: var(--surface); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.gt td { font-size: 13.25px; line-height: 1.6; color: var(--ink-2); padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.gt tr:last-child td { border-bottom: 0; }
.gt .basis { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.gt .art { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin-top: 4px; letter-spacing: 0.02em; }
.gt ul { margin: 0; padding-left: 16px; }
.gt li { font-size: 13.25px; line-height: 1.55; margin-bottom: 4px; color: var(--ink-2); }

/* CALLOUTS */
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 26px; }
.fact h4 { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.fact dl { display: grid; grid-template-columns: 150px 1fr; gap: 9px 18px; }
.fact dt { font-size: 13px; color: var(--ink-3); }
.fact dd { font-size: 13.5px; color: var(--ink); line-height: 1.55; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border: 1px solid #dbe6ff; border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; }
.note svg { width: 17px; height: 17px; stroke: var(--accent); stroke-width: 1.9; fill: none; flex-shrink: 0; margin-top: 1px; stroke-linecap: round; stroke-linejoin: round; }
.note p { font-size: 13.5px; line-height: 1.6; color: #23406e; margin: 0; }
.note b { color: #16305c; }

/* FOOTER */
footer { border-top: 1px solid var(--line); padding: 56px 40px 40px; }
.foot { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand .logo { margin-bottom: 14px; }
.foot-brand .logo-word { height: 18px; }
.foot-brand p { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; max-width: 260px; }
.foot-col h4 { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { max-width: var(--maxw); margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.foot-bottom .soc { display: flex; gap: 14px; }
.foot-bottom .soc a:hover { color: var(--ink); }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 0; padding: 32px 24px 72px; }
  .toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 34px; background: var(--surface); }
  .toc a { border-left: 0; padding-left: 0; margin-left: 0; }
  .toc a.active { border-left: 0; }
  .legal-head .inner { padding: 40px 24px 32px; }
  .legal-head h1 { font-size: 33px; letter-spacing: -1.1px; }
  .nav-mid { display: none; }
  .doc { max-width: none; }
}
@media (max-width: 680px) {
  .cl, .def { grid-template-columns: 1fr; gap: 2px; }
  .cn { padding-top: 0; }
  .fact dl { grid-template-columns: 1fr; gap: 2px 0; }
  .fact dt { margin-top: 8px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .gt-wrap { border: 0; border-radius: 0; }
  .gt thead { display: none; }
  .gt, .gt tbody, .gt tr, .gt td { display: block; width: 100%; }
  .gt tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 4px 0; }
  .gt td { border-bottom: 1px solid var(--line-2); padding: 11px 14px; }
  .gt tr td:last-child { border-bottom: 0; }
  .gt td::before { content: attr(data-l); display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px; }
}

/* PRINT */
@media print {
  nav, .prog, .toc, .switch, footer, .note { display: none !important; }
  .legal-head { background: none; border-bottom: 1px solid #ccc; }
  .legal-head .inner, .legal-wrap { max-width: none; padding: 0; }
  .legal-wrap { display: block; }
  .legal-head h1 { font-size: 26pt; }
  .doc { max-width: none; }
  .doc section { break-inside: auto; margin-bottom: 22pt; }
  .doc h2 { font-size: 14pt; break-after: avoid; }
  .doc p, .doc li, .gt td { font-size: 9.5pt; line-height: 1.5; color: #222; }
  .gt-wrap { break-inside: avoid; }
  a { color: #000; }
}
