/*
 * CV Atlas – legal pages (privacy, terms, disclaimer, credits). Plain, readable, self-contained.
 * Visual owner: Apple-style visuals specialist (content and markup: lawyer).
 * Tokens match landing.css, guides.css and app.css (docs/brand.md). Every text colour keeps ≥ 4.5:1.
 */


/* ── Tokens ── */
@font-face { font-family: 'Atlas Display'; src: url('../fonts/alegreya/AlegreyaSans-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #f7f9fe; --panel: #ffffff; --sunken: #edf2fc; --glass: rgba(251, 252, 254, .8);
  --line: rgba(20, 44, 122, .12); --hairline: rgba(20, 44, 122, .09);
  --ink: #0e1630; --ink-2: #3a4566; --ink-3: #56607d;
  --brand: #1e4fd8; --brand-hover: #173fb0; --brand-soft: #e8effd; --brand-tint: rgba(30, 79, 216, .12);
  --note-bg: #fdf1df; --note-ink: #7a3c06;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 44, 122, .04), 0 10px 28px -16px rgba(20, 44, 122, .16);
  color-scheme: light;
}
/* ── Base ── */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font: 16.5px/1.7 -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: from-font; }
a:hover { color: var(--brand-hover); }
::selection { background: var(--brand-tint); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* ── Header: frosted glass ── */
.legal-top { position: sticky; top: 0; z-index: 10; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.legal-top-inner { max-width: 760px; margin: 0 auto; padding: 12px 20px; min-height: 58px; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.legal-brand { font-weight: 600; font-size: 17px; letter-spacing: -.015em; color: var(--ink); text-decoration: none; }
.legal-brand:hover { color: var(--ink); }
.legal-nav { display: flex; gap: 2px; flex-wrap: wrap; font-size: 14px; }
.legal-nav a { color: var(--ink-2); text-decoration: none; padding: 5px 10px; border-radius: 999px; transition: background-color .15s, color .15s; }
.legal-nav a:hover { background: var(--sunken); color: var(--ink); }
.legal-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* ── Content ── */
main { max-width: 760px; margin: 0 auto; padding: 44px 20px 72px; }
h1 { font-size: clamp(30px, 4.6vw, 40px); font-weight: 600; line-height: 1.12; margin: 0 0 8px; letter-spacing: -.028em; text-wrap: balance; }
h2 { font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; margin: 44px 0 10px; padding-top: 4px; scroll-margin-top: 80px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin: 26px 0 6px; scroll-margin-top: 80px; }
p, ul, ol { margin: 0 0 14px; }
p { text-wrap: pretty; }
li { margin-bottom: 7px; }
li::marker { color: var(--ink-3); }
.updated { color: var(--ink-3); font-size: 14px; margin-bottom: 28px; }
.summary { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 22px 8px; margin: 0 0 12px; box-shadow: var(--shadow); }
.summary h2 { margin-top: 0; padding-top: 0; font-size: 17px; }
.summary ul { margin-bottom: 8px; }
.owner { background: var(--note-bg); color: var(--note-ink); border-radius: 5px; padding: 1px 6px; font-weight: 600; font-size: .9em; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); -webkit-overflow-scrolling: touch; }
.table-wrap table { margin: 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--hairline); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--sunken); }
th { color: var(--ink-2); font-weight: 600; }

pre { white-space: pre-wrap; background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.55; overflow-x: auto; }

/* Hub cards */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cards li { margin: 0; }
.cards a { display: block; height: 100%; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s; }
.cards a:hover { transform: translateY(-2px); border-color: var(--line); }
.cards a strong { color: var(--brand); display: block; font-size: 17px; letter-spacing: -.01em; margin-bottom: 4px; }
.cards a span { color: var(--ink-2); font-size: 15px; }

/* ── Footer ── */
.legal-foot { border-top: 1px solid var(--hairline); }
.legal-foot-inner { max-width: 760px; margin: 0 auto; padding: 20px 20px 32px; font-size: 14px; color: var(--ink-3); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.legal-foot a { color: var(--ink-2); text-decoration: none; }
.legal-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ── Small screens and touch ── */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .legal-top { position: static; }
  .legal-top-inner { padding: 10px 16px; }
  .legal-nav { margin-left: -10px; }
  main { padding: 28px 16px 56px; }
  h2 { margin-top: 36px; }
  .summary { padding: 16px 18px 6px; }
  th, td { padding: 10px 12px; }
  .legal-foot-inner { padding-inline: 16px; }
}
@media (pointer: coarse) {
  .legal-nav a { padding: 10px 12px; }
  .legal-foot a { padding: 8px 0; display: inline-block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
@media print {
  .legal-top, .legal-foot { display: none; }
  body { background: #fff; color: #000; }
  .summary, .table-wrap, .cards a { box-shadow: none; }
}

/* QA 28 Oct: 24 px targets with a mouse, 44 px on touch */
.legal-foot a { display: inline-block; padding: 3px 0; min-height: 24px; }
@media (pointer: coarse), (max-width: 560px) {
  .legal-foot a { padding: 12px 0; }
  .legal-nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (pointer: coarse), (max-width: 560px) {
  .legal-brand { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse), (max-width: 560px) { .legal-foot a, .legal-nav a { min-width: 44px; justify-content: center; text-align: center; } }

/* White and blue identity (P17): display face for the brand and headings, blue browser surfaces. */
::selection { background: #dce6fb; color: #142c7a; }
html { scrollbar-color: #dce6fb transparent; }
body { caret-color: #1e4fd8; }
h1, h2 { font-family: 'Atlas Display', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; font-weight: 700; color: #142c7a; letter-spacing: -.015em; }
.brand, .legal-brand { font-family: 'Atlas Display', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Noto Sans', sans-serif; font-weight: 700; color: #142c7a; }

/* The name is written in capitals: CV ATLAS. The markup keeps "CV Atlas" so screen readers say it as words. */
.brand, .legal-brand { text-transform: uppercase; letter-spacing: .06em; }

/* Privacy laws by country */
.law-filter { margin: 8px 0 8px; }
.law-filter label { display: block; font-weight: 600; margin-bottom: 6px; }
.law-filter input { width: 100%; max-width: 420px; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.law-filter input:focus-visible { outline: 2px solid #1e4fd8; outline-offset: 2px; }
.law-filter .small { display: block; margin-top: 6px; color: var(--ink-3); }
.laws { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.law { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.law h3 { margin: 0 0 6px; font-size: 17px; }
.law p { margin: 0 0 6px; }
.law .small { font-size: 14px; color: var(--ink-3); }
.law-unchecked { color: var(--note-ink); }
