/* Privacy policy, terms and accessibility pages, binding and demo alike.
   Kept in its own file because the site CSP is `style-src 'self'` on every
   path -- an inline <style> block would be blocked in production.

   Since 2026-11-04 (owner's choice) they wear the card layout he liked on
   autofill.a2zso.com's Terms and Privacy, in our colours: a centred title under
   an icon tile, every clause in its own white card, the language row as pills.
   The pages are still documents a compliance officer reads and prints, so in
   print they drop back to plain text (see the end of this file). The cards are
   wrappers only -- <section class="clause"> around each clause, the icon an
   aria-hidden SVG -- so tools/check-legal-review.cjs, which hashes the words
   with every tag stripped, reads exactly what it read before. */

:root {
  /* Light only, like every other public page. These used to turn navy in dark
     mode while the landing and the information pages stay light. */
  color-scheme: light;
  --bg: #eef5f8;
  --card: #ffffff;
  --fg: #102938;
  --muted: #526571;      /* 5.4:1 on --bg, 5.9:1 on white */
  --rule: #d9e5e9;
  --accent: #087f79;     /* links: 4.9:1 on white */
  --teal: #20bbb0;
  --tint: #dff3f0;
  --tint-line: #c3ded9;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: 52rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 Rubik, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- the header: icon tile, title, version, which text governs ---- */

.doc-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0.75rem auto 0.9rem;
  border-radius: 14px;
  background: var(--tint);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--tint-line);
}
.doc-icon svg { width: 1.75rem; height: 1.75rem; }

h1 {
  margin: 0 0 0.4rem;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.updated { margin: 0 0 0.5rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* Which version governs, said under the title rather than only in the language
   clause near the end. A reader who stops after three paragraphs still learns
   that the English is the binding text and theirs is a convenience translation.
   Added 2026-09-21 with the English-authoritative change (PRD §2). */
.authority {
  margin: 0 auto 1.75rem;
  max-width: 40rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* "In practice": the summary a reader should not miss, as a tinted card. */
.lede {
  margin: 0 0 1rem;
  padding: 1rem 1.25rem;
  background: var(--tint);
  border: 1px solid var(--tint-line);
  border-radius: 16px;
  font-size: 1.02rem;
}

/* ---- the clauses: one white card each ---- */

.clause {
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(11 24 38 / 0.05), 0 10px 24px -20px rgb(11 24 38 / 0.35);
}
.clause > :first-child { margin-top: 0; }
.clause > :last-child { margin-bottom: 0; }

h2 { font-size: 1.15rem; line-height: 1.35; margin: 2rem 0 0.5rem; }
.clause > h2 { display: flex; align-items: center; gap: 0.65rem; margin: 0 0 0.6rem; }
/* The clause mark: three short teal lines on a teal tile, drawn with
   gradients, so it needs no image and no new use of data: URLs. Empty generated
   content: invisible to screen readers and to the review hash. */
.clause > h2::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(var(--accent), var(--accent)) 50% 32% / 0.8rem 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 50% 50% / 0.8rem 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 50% 68% / 0.5rem 2px no-repeat,
    var(--tint);
  box-shadow: inset 0 0 0 1px var(--tint-line);
}
h3 { font-size: 1rem; margin: 1.1rem 0 0.3rem; }

/* Logical properties throughout, not left/right: the Hebrew and Arabic versions
   of these documents are the same file structure under dir="rtl", and a list
   indent pinned to the left edge lands on the wrong side there. */
p, li { margin: 0.55rem 0; }
ul, ol { padding-inline-start: 1.3rem; }
li::marker { color: var(--accent); }

a { color: var(--accent); text-underline-offset: 3px; }

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

table {
  width: 100%;
  margin: 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.95rem;
}
th, td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
tr:last-child > td { border-bottom: 0; }
th { background: #f3f8fa; font-weight: 600; }

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Language row. These documents are available in four languages, so the way to
   the other three has to be on the page itself -- a legal document reached only
   through the app's own language setting is a legal document some readers
   cannot find. Plain links: the legal pages ship script-src 'none' and that is
   worth keeping. Pills since 2026-11-04. */
.langs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  /* the device's font, not Rubik: the row names all four scripts, and in Rubik
     every reader would fetch all four font files for four words */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* the row itself stays in one order in every language, so a reader switching
     between them finds the links where they were */
  direction: ltr;
}
.langs a, .langs .is-current {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.2rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 99px;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
}
.langs a:hover { border-color: var(--teal); }
.langs .is-current, .langs [aria-current] {
  background: var(--tint);
  border-color: var(--tint-line);
  color: var(--accent);
  font-weight: 600;
}

/* Cookies and storage, injected by the site-information tool: a card too. */
.storage-information {
  margin-block: 1rem;
  padding: 0.35rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.storage-information summary { cursor: pointer; padding: 0.65rem 0.1rem; font-weight: 600; }

/* Long disclosures remain readable at narrow widths and keyboard focus is visible. */
body { overflow-wrap: anywhere; }
th, td { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 600px) {
  body { padding: 1.25rem 0.75rem 3rem; }
  h1 { font-size: 1.6rem; }
  .clause, .lede { padding: 1rem 1.1rem; }
  th, td { padding: 0.35rem; }
}

/* Printed, these are plain documents again: no tiles, no cards, no colour. */
@media print {
  body { max-width: none; padding: 0; background: #fff; color: #000; }
  .doc-icon, .langs, .clause > h2::before { display: none; }
  h1, .updated, .authority { text-align: start; }
  .clause, .lede, .storage-information { margin: 0 0 1rem; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
  a { color: inherit; }
}
