/* The terms and the privacy policy: the site's colours and type, set for
   long reading. A ship's papers: serif headings, numbered like a log, the
   orange as the waterline. */
:root {
  --bg: #e6eff6;
  --paper: #f3f7fa;
  --ink: #10263d;
  --muted: #4a6680;  /* darker than the site's, for long small text */
  --faint: #a8bfd3;
  --line: rgba(16, 38, 61, 0.14);
  --accent: #ff5a1f;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 14px/1.75 var(--mono);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  /* a faint chart grid above the waterline */
  background:
    linear-gradient(to bottom, transparent 0, var(--bg) 560px),
    repeating-linear-gradient(0deg, rgba(16, 38, 61, 0.045) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(16, 38, 61, 0.045) 0 1px, transparent 1px 48px),
    var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

a { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--ink); color: #fff; padding: 6px 10px; z-index: 2; }

/* ---------- top bar ---------- */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gutter); max-width: 1200px; margin: 0 auto;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
}
.top a { text-decoration: none; }
.top__brand { font-weight: 500; }
.top__brand span { color: var(--accent); }
.top__nav { display: flex; gap: 20px; }
.top__nav a { color: var(--muted); padding: 4px 0; }
.top__nav a:hover { color: var(--ink); }
.top__nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }

/* ---------- title ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: clamp(32px, 7vw, 88px) var(--gutter) 0; }
.eyebrow { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; margin: 0; }
.hero h1 {
  font: 400 clamp(48px, 9vw, 104px)/0.92 var(--serif);
  letter-spacing: -0.01em; margin: 14px 0 0;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__meta { color: var(--muted); font-size: 12px; margin: 22px 0 0; }
.hero__lede { max-width: var(--measure); font-size: 15px; margin: 18px 0 0; }
/* the waterline */
.waterline {
  height: 2px; margin: clamp(28px, 5vw, 48px) 0 0;
  background: linear-gradient(90deg, var(--accent) 0 18%, var(--line) 18% 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero > *:nth-child(2) { animation-delay: 0.06s; }
  .hero > *:nth-child(3) { animation-delay: 0.12s; }
  .hero > *:nth-child(4) { animation-delay: 0.18s; }
  .hero > *:nth-child(5) { animation-delay: 0.24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

/* ---------- contents and text ---------- */
.layout {
  max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 64px;
  display: grid; gap: 40px;
}
@media (min-width: 980px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); gap: 64px; }
  .toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; }
}

.toc { font-size: 12px; }
.toc__title { color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; font-size: 11px; margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-top: 1px solid var(--line); }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.toc a { display: flex; gap: 10px; padding: 7px 0; text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: var(--accent); flex: none; }
.toc a:hover { color: var(--accent); }
/* above the text on a tablet, in two columns */
@media (min-width: 600px) and (max-width: 979px) {
  .toc ol { columns: 2; column-gap: 32px; }
  .toc li { break-inside: avoid; }
}

.doc { max-width: 880px; min-width: 0; }
/* text keeps a reading measure; tables may use the whole column */
.doc :is(p, ul, ol, address, h2, h3, dl), .brief { max-width: var(--measure); }
.doc section { scroll-margin-top: 24px; padding-top: 8px; }
.doc section + section { margin-top: 44px; }
.doc h2 { font: 400 clamp(30px, 4vw, 40px)/1.05 var(--serif); margin: 0 0 16px; }
.doc h2 .no { display: block; font: 500 11px/1 var(--mono); letter-spacing: 0.18em; color: var(--accent); margin-bottom: 10px; }
.doc h3 { font: 500 14px/1.5 var(--mono); margin: 26px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 0; }
.doc ul { list-style: none; }
.doc ul > li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.doc ul > li::before { content: ''; position: absolute; left: 0; top: 0.85em; width: 12px; height: 1px; background: var(--accent); }
.doc ol { counter-reset: step; list-style: none; }
.doc ol > li { counter-increment: step; position: relative; padding-left: 34px; margin-bottom: 10px; }
.doc ol > li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; color: var(--accent); font-weight: 500; }
.doc b, .doc strong { font-weight: 500; }
.doc address { font-style: normal; margin: 0 0 14px; padding-left: 14px; border-left: 1px solid var(--accent); }

/* the short version, at the top */
.brief { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 18px 22px; margin: 0 0 44px; }
.doc .brief h2 { font-size: 26px; margin-bottom: 10px; }
.brief ul { margin-bottom: 0; }

/* what, why, legal basis, how long: one block per kind of data */
.facts {
  display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 6px 18px;
  margin: 0 0 26px; padding-top: 12px; border-top: 1px solid var(--ink);
}
.facts dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 3px; }
.facts dd { margin: 0; }
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 10px; }
}

/* tables: a hairline grid on a wide screen, a card per row on a phone */
.table { margin: 0 0 18px; border-top: 1px solid var(--ink); }
.table table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.55; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); }
.table thead th { color: var(--muted); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.table tbody th { font-weight: 500; }
.table .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .table { border-top: 0; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { display: block; border-top: 1px solid var(--ink); padding: 4px 0 10px; }
  .table tbody th, .table td { display: block; border: 0; padding: 5px 0; }
  .table tbody th { font-size: 13px; padding-top: 10px; }
  .table td[data-label] { display: grid; grid-template-columns: minmax(7.5em, 34%) 1fr; gap: 12px; }
  .table td[data-label]::before {
    content: attr(data-label); color: var(--muted);
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 1px;
  }
  .table .num { white-space: normal; }
}

/* ---------- foot ---------- */
.foot { border-top: 1px solid var(--line); }
.foot__inner {
  max-width: 1200px; margin: 0 auto; padding: 28px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  color: var(--muted); font-size: 12px;
}
.foot__inner p { margin: 0; }
.foot__inner nav { display: flex; gap: 18px; }

@media print {
  body { background: #fff; font-size: 10.5pt; }
  .top, .toc, .skip, .foot nav { display: none; }
  .layout { display: block; padding: 0; }
  .hero { padding-top: 0; }
  .hero > * { animation: none; }
  .hero h1 { font-size: 36pt; }
  .hero h1 em { color: inherit; }
  a { text-decoration: none; }
  .table tr, .brief { break-inside: avoid; }
}
