/* Shared styles for /privacy, /privacy/en and /legal/* — built on /ds/v1 tokens + /ds/fonts. */
html, body { overflow-x: hidden; }
body { background: var(--bg); color: var(--text); }
.wrap { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--s-6); }
@media (max-width: 560px) { .wrap { padding-inline: var(--s-4); } }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* skip link — blue-700 keeps white text above 4.5:1 in both themes */
.skip { position: absolute; inset-inline-start: var(--s-3); top: -60px; z-index: 100; padding: 8px 12px;
  background: var(--p-blue-700); color: #fff; border-radius: var(--r-sm); font-weight: var(--fw-semi); }
.skip:focus { top: var(--s-3); }

/* visible focus everywhere (2px outline, not only the soft token ring) */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; }
.topbar a:focus-visible, .topbar button:focus-visible, .skip:focus-visible { outline-color: var(--p-blue-400); }

/* topbar — navy in both themes */
.topbar { position: sticky; top: 0; z-index: var(--z-nav); background: var(--nav-bg); border-bottom: 1px solid var(--nav-line); }
.topbar-in { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--s-6);
  height: 56px; display: flex; align-items: center; gap: var(--s-5); }
.brand-link { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0;
  font-family: var(--font-display); font-weight: var(--fw-bold); letter-spacing: -.01em; }
.brand-link:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; border-radius: var(--r-sm); background: var(--p-blue-600);
  display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 16px; height: 16px; }
.brand-sub { color: var(--p-n-400); font-weight: var(--fw-medium); font-family: var(--font-ui);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s-2); }
.icon-btn { height: var(--ctl-h-sm); min-width: var(--ctl-h-sm); padding-inline: 8px;
  display: inline-flex; align-items: center; justify-content: center; background: transparent;
  color: var(--nav-text); border: 1px solid var(--nav-line); border-radius: var(--ctl-r); cursor: pointer;
  transition: background var(--ease-fast), color var(--ease-fast); }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn svg { width: 15px; height: 15px; }
.lang-link { display: inline-flex; align-items: center; height: var(--ctl-h-sm); padding-inline: 10px;
  color: var(--nav-text); border: 1px solid var(--nav-line); border-radius: var(--ctl-r);
  font-size: var(--t-sm); font-weight: var(--fw-medium); white-space: nowrap; }
.lang-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
@media (max-width: 560px) { .topbar-in { padding-inline: var(--s-4); gap: var(--s-2); } }
@media (max-width: 380px) { .brand-sub { display: none; } }

/* document */
.doc { max-width: var(--w-narrow); margin-inline: auto; padding: var(--s-14) var(--s-6) var(--s-20); }
@media (max-width: 560px) { .doc { padding: var(--s-8) var(--s-4) var(--s-14); } }
.eyebrow { margin: 0 0 var(--s-2); font-size: var(--t-sm); font-weight: var(--fw-semi); color: var(--brand); }
.doc h1 { font-size: clamp(1.9rem, 4.2vw, 2.6rem); font-weight: var(--fw-black); }
.doc h2 { font-size: var(--t-2xl); font-weight: var(--fw-bold); margin-bottom: var(--s-3); }
.doc h3 { font-size: var(--t-lg); font-weight: var(--fw-semi); margin: var(--s-5) 0 var(--s-2); }
.doc p, .doc li { font-size: var(--t-md); line-height: var(--lh-body); color: var(--text-soft); overflow-wrap: anywhere; }
.doc p { margin: 0 0 var(--s-3); }
.doc ul, .doc ol { margin: 0 0 var(--s-3); padding-inline-start: var(--s-6); }
.doc strong { color: var(--text); }
.doc a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
/* text-soft, not text-mut: text-mut on the light page background is ~4.3:1 */
.updated { margin-top: var(--s-2) !important; font-size: var(--t-sm) !important; color: var(--text-soft) !important; }
.lead { margin-top: var(--s-6) !important; font-size: var(--t-lg) !important; }
.note { font-size: var(--t-sm) !important; color: var(--text-soft) !important; }
.doc section { padding-top: var(--s-10); margin-top: var(--s-10); border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.toc { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--bg-card);
  font-size: var(--t-sm); color: var(--text-soft); text-decoration: none; }
.toc a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
/* long documents: numbered table of contents */
.toc-list { margin-top: var(--s-6); padding: var(--s-4) var(--s-5); border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--bg-card); }
.toc-list .toc-title { margin: 0 0 var(--s-2); font-size: var(--t-sm); font-weight: var(--fw-semi); color: var(--text); }
.toc-list ol { margin: 0; columns: 2; column-gap: var(--s-8); }
.toc-list li { font-size: var(--t-base); line-height: 1.9; break-inside: avoid; }
.toc-list a { text-decoration: none; }
.toc-list a:hover { text-decoration: underline; }
@media (max-width: 560px) { .toc-list ol { columns: 1; } }
.callout { padding: var(--s-4) var(--s-5); border: 1px solid var(--line); border-inline-start: 3px solid var(--warn);
  border-radius: var(--r-lg); background: var(--warn-soft); margin: var(--s-4) 0; }
.callout.info { border-inline-start-color: var(--brand); background: var(--brand-soft); }
.callout p { margin: 0; color: var(--text); }
.contact-list { list-style: none; padding-inline-start: 0 !important; }
.contact-list li { margin-bottom: var(--s-1); }
.en { font-family: var(--font-ui); }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); margin-bottom: var(--s-3); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.tbl th, .tbl td { padding: var(--s-3) var(--s-4); text-align: start; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.tbl thead th { background: var(--bg-soft); font-size: var(--t-sm); font-weight: var(--fw-semi); color: var(--text-soft); white-space: nowrap; }
.tbl tbody th { font-weight: var(--fw-semi); color: var(--text); line-height: var(--lh-ui); }
.tbl.kv tbody th { width: 30%; background: var(--bg-soft); }
.tbl tbody tr:last-child td, .tbl tbody tr:last-child th { border-bottom: 0; }
.tbl td { color: var(--text-soft); line-height: var(--lh-ui); }
.tbl td strong { color: var(--text); }
.tbl .num { font-weight: var(--fw-bold); color: var(--text); white-space: nowrap; }
.pill { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); border: 1px solid var(--line);
  font-size: var(--t-xs); font-weight: var(--fw-medium); color: var(--text-soft); white-space: nowrap; }
/* blue-700 / blue-400 keep the "on" pill above 4.5:1 on its tinted background */
.pill.on { border-color: var(--brand); color: var(--p-blue-700); background: var(--brand-soft); }
[data-theme="dark"] .pill.on { color: var(--p-blue-400); }
.sev { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 8px; vertical-align: middle; }
.sev.s1 { background: var(--bad); } .sev.s2 { background: var(--warn); } .sev.s3 { background: var(--brand); } .sev.s4 { background: var(--text-mut); }

/* phones: tables collapse into stacked cards, each cell labelled from data-h */
@media (max-width: 720px) {
  .tbl-wrap { border: 0; background: transparent; overflow: visible; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl td, .tbl tbody th { display: block; width: 100% !important; }
  .tbl tr { margin-bottom: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-card); padding: var(--s-2) 0; }
  .tbl td, .tbl tbody th { border: 0; padding: 6px var(--s-4); background: transparent !important; }
  .tbl td::before { content: attr(data-h); display: block; font-size: var(--t-xs); font-weight: var(--fw-semi); color: var(--text-soft); margin-bottom: 2px; }
  .tbl td:first-child::before, .tbl td:not([data-h])::before { display: none; }
  .tbl td:first-child, .tbl tbody th { font-size: var(--t-md); }
}

/* footer */
footer { border-top: 1px solid var(--line); padding-block: var(--s-8); padding-bottom: calc(var(--s-8) + env(safe-area-inset-bottom)); }
.foot { display: grid; gap: var(--s-4); font-size: var(--t-sm); color: var(--text-soft); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text) !important;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--t-md); }
.foot-brand:hover { text-decoration: none; }
.foot-brand .brand-mark { width: 24px; height: 24px; }
.foot-brand .brand-mark svg { width: 14px; height: 14px; }
.foot-contact, .foot-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: 0; }
.foot-copy { margin: 0; }
.foot a { color: var(--text-soft); } .foot a:hover { color: var(--text); }
.foot a[aria-current="page"] { color: var(--text); font-weight: var(--fw-semi); }
