/* ─────────────────────────────────────────────────────────
   DATRUM — Legal / Compliance subpages
   Shared styling for /security, /privacy, /subprocessors (EN + ES).
   Dark editorial gallery palette — Space Grotesk + DM Sans.
   ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0C1B1F; /* Midnight Teal */
  --bg2:     #0E2329; /* subtle elevated */
  --surface: #0F5C6D; /* Deep Teal — cards/panels */
  --border:  #1A3A40; /* dividers */
  --teal:    #1E7F98; /* Ocean Blue — interactive */
  --coral:   #F2D24B; /* Lemon Glow — accent/links */
  --text:    #E8EDED; /* Frost */
  --muted:   #9AABAF; /* Muted Frost */
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 80px 32px 120px; }
@media (max-width: 639px) { .wrap { padding: 56px 20px 80px; } }

a { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.82; }

.back-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: inline-block;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); opacity: 1; }

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 24px;
}

.lede {
  font-size: 17px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 680px;
}

.last-updated,
.meta-line {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

/* ── Table of contents ──────────────────────────────── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 56px;
}
.toc-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  counter-reset: section;
}
@media (max-width: 639px) { .toc ol { grid-template-columns: 1fr; } }
.toc li { counter-increment: section; }
.toc li::before {
  content: counter(section, decimal-leading-zero) ".";
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--coral);
  margin-right: 8px;
}
.toc a { color: var(--text); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--coral); opacity: 1; }

/* ── Sections ───────────────────────────────────────── */
section { margin-top: 56px; scroll-margin-top: 88px; }

h2,
section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}
h2 { font-size: 22px; margin: 56px 0 16px; }
section h2 { font-size: 26px; margin-bottom: 8px; }

section h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  color: var(--text);
  margin: 22px 0 10px;
  font-weight: 500;
}

.section-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--coral);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

p,
section p { color: var(--muted); margin-bottom: 16px; font-size: 15px; line-height: 1.75; }

section ul { list-style: none; padding: 0; margin-bottom: 20px; }
section ul li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  padding-left: 22px;
  position: relative;
  margin-bottom: 8px;
}
section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--coral);
  font-family: 'DM Sans', sans-serif;
}
section ul.no-list li::before { display: none; }
section ul.no-list li { padding-left: 0; }
section strong, strong { color: var(--text); font-weight: 500; }

/* ── Callout ────────────────────────────────────────── */
.callout {
  border-left: 2px solid var(--coral);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
}
.callout p { color: var(--text); font-size: 14.5px; margin-bottom: 0; }

/* ── Attestation card ───────────────────────────────── */
.attest {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 24px 0;
}
.attest-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.attest-check { color: var(--coral); font-size: 18px; font-weight: 700; }
.attest-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.attest p { font-size: 14px; color: var(--text); }
.attest .signature {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Divider (privacy) ──────────────────────────────── */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 96px 0 56px;
  position: relative;
}
.divider-label {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Table (subprocessors) ──────────────────────────── */
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
td { color: var(--muted); }
td:first-child { font-weight: 500; color: var(--text); }

/* ── Footer ─────────────────────────────────────────── */
.footer-note,
.footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ── Case study pages ───────────────────────────────── */
.cs-topbar {
  max-width: 920px;
  margin: 0 auto;
  padding: 22px 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 639px) { .cs-topbar { padding: 18px 20px 0; } }
.cs-wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--coral);
  text-decoration: none;
}
.cs-wordmark:hover { opacity: 0.85; }
.cs-topbar .back-link { margin-bottom: 0; }

.cs-deck {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 300;
  line-height: 1.35;
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 32px;
}
.cs-deck b, .cs-deck strong { color: var(--text); font-weight: 400; }

.cs-figure {
  margin: 8px 0 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
}
.cs-figure img { width: 100%; height: auto; display: block; }
.cs-figure figcaption {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}
.cs-figure--inline { margin: 40px 0; }

.cs-live { margin: -28px 0 44px; }
.cs-live a {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--coral);
  text-decoration: none;
}
.cs-live a:hover { color: var(--text); opacity: 1; }

/* ── Resources: code blocks ─────────────────────────── */
pre {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 18px 0;
}
pre code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
}
:not(pre) > code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--coral);
}

/* ── Resources: interactive checklists ──────────────── */
.rc-runmeta {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.rc-subhead {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
}
.rc-deck {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.4;
  margin: 4px 0 18px;
}
.rc-group {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 32px;
}
.rc-group > h3 { margin-top: 0; font-size: 15px; letter-spacing: 0.08em; }
.rc-group-sub { font-style: italic; color: var(--muted); font-size: 14px; margin: 4px 0 14px; }

.rc-check {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 8px 0;
  cursor: pointer;
}
.rc-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.rc-box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.rc-check:hover .rc-box { border-color: var(--teal); }
.rc-check input:checked + .rc-box { background: var(--coral); border-color: var(--coral); }
.rc-check input:checked + .rc-box::after {
  content: "✓";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-size: 13px; font-weight: 700;
}
.rc-check input:focus-visible + .rc-box { outline: 2px solid var(--teal); outline-offset: 2px; }
.rc-label { font-size: 15px; color: var(--muted); line-height: 1.6; }
.rc-check input:checked ~ .rc-label { color: var(--text); }

.rc-fail {
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid var(--border);
  padding: 4px 0 4px 16px;
  margin: 14px 0 4px;
}
.rc-fail b { color: var(--coral); font-weight: 500; }
.rc-note { font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
.rc-note b { color: var(--coral); font-weight: 500; }

.rc-part-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
  margin-top: 14px;
  letter-spacing: 0.04em;
}
.rc-part-num { color: var(--coral); font-weight: 500; }

/* Live score readout */
.rc-readout {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 36px 0 18px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.rc-readout .rc-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--coral);
  line-height: 1;
}
.rc-readout .rc-of { font-family: 'Space Grotesk', sans-serif; font-size: 22px; color: var(--muted); font-weight: 300; }
.rc-readout .rc-caption { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-left: auto; align-self: center; }

.rc-bands tr { transition: background 0.2s; }
.rc-bands tr.active { background: rgba(242,210,75,0.09); }
.rc-bands tr.active td { color: var(--text); }
.rc-bands tr.active td:first-child { color: var(--coral); box-shadow: inset 3px 0 0 var(--coral); }

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
}
.cs-meta span {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  letter-spacing: 0.06em;
}
.cs-meta span b { color: var(--coral); font-weight: 500; }

.cs-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.cs-btn-primary {
  background: var(--coral);
  color: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.cs-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.cs-btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.cs-btn-ghost:hover { color: var(--text); opacity: 1; }

/* ── Cookie banner (shared) ─────────────────────────── */
#cookieBanner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 1000;
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
#cookieBanner.show { display: block; }
.cookie-text { font-family: 'DM Sans', sans-serif; font-size: 13px; color: var(--text); line-height: 1.55; margin-bottom: 14px; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  min-height: 44px;
}
.cookie-btn:hover { background: var(--bg2); }
.cookie-btn.primary { background: var(--coral); color: var(--bg); border-color: var(--coral); font-weight: 600; }
.cookie-btn.primary:hover { opacity: 0.9; }
