/* The data handling statement (data-handling.html): a document page in the site's colours
   and type, readable on a phone and printed to A4 for the PDF beside it. */
:root {
  --ink: #282828; --ink2: #4d4741; --ink3: #7a7269; --line: #e6ded5; --soft: #faf7f3;
  --page: #f5f2ef; --accent: #a65600; --brand: #ea7c00; --bar: #15130f;
  --head: 'Ubuntu', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink2); font: 16px/1.65 var(--body); }
a { color: var(--accent); }
a:hover { color: #7d4100; }
.dh-wrap { width: min(920px, calc(100% - 32px)); margin: 0 auto; }

/* The bar: the logo and the download. */
.dh-bar { background: var(--bar); }
.dh-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.dh-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.dh-brand svg { width: 38px; height: 38px; flex: none; }
.dh-brand span { display: flex; flex-direction: column; gap: 5px; font-family: var(--head); line-height: 1; }
.dh-brand b { font-size: 22px; font-weight: 700; letter-spacing: 1.4px; color: #ffffff; }
.dh-brand i { font-style: normal; color: var(--brand); }
.dh-brand small { font-size: 9px; letter-spacing: 2.3px; color: #c8c8c8; }
.dh-nav { display: flex; gap: 26px; margin-left: auto; font: 500 15px var(--head); }
.dh-nav a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.dh-nav a:hover { color: #ffffff; }
.dh-nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.dh-download { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 999px; background: var(--brand);
  color: #111111; font: 600 15px var(--body); text-decoration: none; white-space: nowrap; }
.dh-download::before { content: ""; width: 14px; height: 14px; flex: none;
  background: currentColor; -webkit-mask: var(--dl) center / contain no-repeat; mask: var(--dl) center / contain no-repeat;
  --dl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v8.6l3-3 1.4 1.4L8 13.4 2.6 8 4 6.6l3 3zM2 14h12v2H2z'/%3E%3C/svg%3E"); }
.dh-download:hover { background: #ffa033; color: #111111; }
.dh-download:focus-visible, .dh-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* The paper. */
.dh-paper { margin: 40px 0 56px; padding: 56px 64px 44px; background: #ffffff; border-radius: 14px; box-shadow: 0 10px 40px rgba(40, 30, 20, .08); }
.dh-eyebrow { margin: 0 0 8px; font: 600 13px var(--head); letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0 0 14px; font: 700 40px/1.12 var(--head); color: var(--ink); letter-spacing: -.3px; }
.dh-lead { margin: 0 0 26px; font-size: 18px; color: var(--ink2); }
.dh-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dh-meta div { padding: 12px 14px 12px 0; }
.dh-meta dt { font: 600 11px var(--body); letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink3); }
.dh-meta dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--ink); }

section { margin-top: 40px; }
h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 700 24px/1.25 var(--head); color: var(--ink); }
h2 span { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: #fcefe0; color: var(--accent); font: 700 15px var(--head); }
p { margin: 0 0 14px; }
ul, ol { margin: 0; padding-left: 22px; }
li { margin-bottom: 8px; }
b { color: var(--ink); font-weight: 600; }

.dh-summary { margin-top: 0; padding: 22px 26px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.dh-summary h2 { font-size: 18px; margin-bottom: 10px; }
.dh-toc { margin-top: 28px; }
.dh-toc h2 { font-size: 18px; margin-bottom: 8px; }
.dh-toc ol { columns: 2; column-gap: 32px; }
.dh-toc li { margin-bottom: 4px; }
.dh-toc a { text-decoration: none; }
.dh-toc a:hover { text-decoration: underline; }

/* The retention table: wide, so it scrolls in its own box on a phone. */
.dh-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
thead th { background: var(--bar); color: #ffffff; font: 600 12px var(--body); letter-spacing: 1px; text-transform: uppercase; text-align: left; padding: 12px 14px; }
tbody th, tbody td { padding: 12px 14px; vertical-align: top; text-align: left; border-top: 1px solid var(--line); }
tbody th { width: 30%; font-weight: 600; color: var(--ink); }
tbody tr:nth-child(even) { background: var(--soft); }

.dh-steps { counter-reset: step; list-style: none; padding: 0; }
.dh-steps li { counter-increment: step; position: relative; padding: 0 0 0 46px; margin-bottom: 16px; }
.dh-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #ffffff; font: 700 14px/30px var(--head); text-align: center; }

.dh-facts { margin: 0; }
.dh-facts div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.dh-facts div:last-child { border-bottom: 1px solid var(--line); }
.dh-facts dt { font-weight: 600; color: var(--ink); }
.dh-facts dd { margin: 0; }

.dh-ticks { list-style: none; padding: 0; }
.dh-ticks li { position: relative; padding-left: 28px; }
.dh-ticks li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.dh-caveats { padding: 26px 28px 12px; border-radius: 12px; background: #fdf6ec; border: 1px solid #f0dcc2; }
.dh-caveats .dh-facts div { border-color: #f0dcc2; }

.dh-foot { margin-top: 44px; padding-top: 22px; border-top: 2px solid var(--ink); }
.dh-fine { font-size: 13px; color: var(--ink3); }

@media (max-width: 720px) {
  .dh-paper { margin: 16px 0 32px; padding: 30px 20px 26px; border-radius: 10px; }
  h1 { font-size: 30px; }
  .dh-lead { font-size: 16.5px; }
  .dh-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dh-toc ol { columns: 1; }
  .dh-facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dh-caveats { padding: 20px 18px 6px; }
  .dh-brand b { font-size: 19px; }
  .dh-brand small { display: none; }
  .dh-download { padding: 9px 16px; font-size: 14px; }
  .dh-bar-row { flex-wrap: wrap; row-gap: 8px; }
  .dh-nav { order: 3; width: 100%; gap: 20px; margin-left: 0; }
}

/* Print, and so the PDF: A4, no bar or shadow, the table whole, nothing split mid-row. */
@page { size: A4; margin: 16mm 15mm 18mm; }
@media print {
  body { background: #ffffff; font-size: 10.5pt; }
  .dh-download, .dh-nav { display: none; }
  .dh-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dh-bar-row { padding: 10px 14px; }
  .dh-wrap { width: 100%; }
  .dh-paper { margin: 0; padding: 18px 0 0; box-shadow: none; border-radius: 0; }
  .dh-meta, .dh-summary, .dh-caveats, thead th, tbody tr, h2 span, .dh-steps li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  h1 { font-size: 26pt; }
  table { min-width: 0; font-size: 9pt; }
  .dh-table { overflow: visible; }
  tr, .dh-facts div, .dh-steps li { break-inside: avoid; }
  h2 { break-after: avoid; }
  .dh-toc { display: none; }
  a { color: var(--accent); text-decoration: none; }
}
