/* Shared styling for the legal documents (privacy.html, terms.html).
   Same token system as index.html, but a document treatment: one narrow
   column, strong hierarchy, no decoration. */

:root {
  --ink: #10141c;
  --slate: #565e70;
  --mute: #838b9a;
  --ground: #fbfbfc;
  --surface: #ffffff;
  --sunk: #f2f4f7;
  --hairline: #e7e9ee;
  --line-strong: #d5d9e2;
  --accent: #1e40af;
  --accent-soft: #e8edfb;
  --accent-on-soft: #1e40af;
  --measure: 68ch;
  --shell: 820px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f6;
    --slate: #a8b0be;
    --mute: #767e8c;
    --ground: #0e1116;
    --surface: #171b22;
    --sunk: #1e242d;
    --hairline: #262b33;
    --line-strong: #363c46;
    --accent: #7d97f2;
    --accent-soft: #1b2233;
    --accent-on-soft: #9db1ff;
  }
}

:root[data-theme='light'] {
  --ink: #10141c;
  --slate: #565e70;
  --mute: #838b9a;
  --ground: #fbfbfc;
  --surface: #ffffff;
  --sunk: #f2f4f7;
  --hairline: #e7e9ee;
  --line-strong: #d5d9e2;
  --accent: #1e40af;
  --accent-soft: #e8edfb;
  --accent-on-soft: #1e40af;
}

:root[data-theme='dark'] {
  --ink: #eef1f6;
  --slate: #a8b0be;
  --mute: #767e8c;
  --ground: #0e1116;
  --surface: #171b22;
  --sunk: #1e242d;
  --hairline: #262b33;
  --line-strong: #363c46;
  --accent: #7d97f2;
  --accent-soft: #1b2233;
  --accent-on-soft: #9db1ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Instrument Sans', ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 26px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--ground);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand svg {
  border-radius: 8px;
  flex: none;
}
.nav-in .back {
  margin-left: auto;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--slate);
}
.nav-in .back:hover {
  color: var(--ink);
}

/* ── Document ────────────────────────────────────────── */
main {
  padding-block: clamp(44px, 6vw, 76px) clamp(60px, 8vw, 100px);
}

h1 {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-size: clamp(32px, 5vw, 46px);
  text-wrap: balance;
  margin: 0 0 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13.5px;
  color: var(--mute);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 30px;
  font-variant-numeric: tabular-nums;
}

.intro {
  font-size: 17.5px;
  color: var(--slate);
  max-width: var(--measure);
}

/* Plain-language summary panel */
.summary {
  background: var(--sunk);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 24px 26px;
  margin: 32px 0 44px;
}
/* Clears the section-divider treatment the generic h2 rule applies — inside
   the panel that border reads as a stray line. */
.summary h2 {
  margin: 0 0 14px;
  padding-top: 0;
  border-top: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.summary ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--slate);
}
.summary li::marker {
  color: var(--line-strong);
}
.summary p {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--mute);
}

/* Table of contents */
.toc {
  margin: 0 0 48px;
}
.toc h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 14px;
  border: 0;
  padding: 0;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  /* Must stay `block`: the generic `main ol` rule sets display:flex, and
     multi-column layout does not apply to flex containers. */
  display: block;
  columns: 2;
  column-gap: 32px;
  font-size: 14.5px;
}
@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}
.toc li {
  counter-increment: toc;
  break-inside: avoid;
  margin-bottom: 7px;
}
.toc li::before {
  content: counter(toc) '.';
  color: var(--mute);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}
.toc a {
  text-decoration: none;
  color: var(--slate);
}
.toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

h2 {
  font-family: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 23px;
  line-height: 1.2;
  text-wrap: balance;
  margin: 52px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: 20px;
}
h2 .n {
  color: var(--mute);
  font-weight: 600;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}

h3 {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.005em;
  margin: 30px 0 8px;
}

p,
li {
  max-width: var(--measure);
}

p {
  margin: 0 0 15px;
  color: var(--slate);
}

main ul,
main ol {
  color: var(--slate);
  padding-left: 22px;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
main li::marker {
  color: var(--line-strong);
}

strong {
  color: var(--ink);
  font-weight: 600;
}

/* Tables (subprocessors, data categories) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  margin: 0 0 20px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 14.5px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-weight: 600;
  color: var(--ink);
  background: var(--sunk);
  white-space: nowrap;
}
td {
  color: var(--slate);
}
tbody tr:last-child td {
  border-bottom: 0;
}

/* Callout for the clauses users most need to notice */
.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 0 0 20px;
}
.note p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}
.note p + p {
  margin-top: 10px;
}

/* Placeholders the operator must fill before publishing */
.fill {
  background: #ffe8a3;
  color: #6b4e00;
  border-radius: 4px;
  padding: 0 5px;
  font-weight: 600;
  font-size: 0.95em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .fill {
    background: #4a3a08;
    color: #ffd978;
  }
}
:root[data-theme='dark'] .fill {
  background: #4a3a08;
  color: #ffd978;
}

footer {
  border-top: 1px solid var(--hairline);
  padding-block: 30px 44px;
}
.foot {
  display: flex;
  align-items: center;
  gap: 14px 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--mute);
}
.foot-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-links a {
  color: var(--mute);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--ink);
}
@media (max-width: 620px) {
  .foot-links {
    margin-left: 0;
  }
}
