/* Privacy. Only what this page adds. The look, the grid and every scale come from ../../e-exact/styles.css, which is linked and not changed.
   The policy's words are not set here or anywhere in this folder: they are site/src/privacy.html, carried whole (tools/same-words.mjs).
   This file decides only how they are set. */

[hidden] { display: none !important; }
.hero__say .lead { text-wrap: nowrap; }

/* ---------- The words ---------- */
/* One column of reading text, 18 on 28, held to a measure of about 70 characters. */
.pol { row-gap: var(--s-32); align-items: start; }
.pol > * { grid-column: 1 / -1; min-width: 0; }
.pol__text { max-width: 640px; }
.pol__text > * + * { margin-top: var(--s-32); }

/* The draft's own notice, in the page's one tint. It is the source's and leaves with the source's draft mark. */
.pol__draft { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s-16); padding: var(--s-16); border-radius: var(--r-1); background: var(--tint); box-shadow: inset 0 0 0 1px rgba(11, 13, 18, 0.04); color: var(--ink); font-size: var(--small); line-height: var(--small-lh); }
.pol__draft svg { width: 24px; height: 24px; }

/* A section: one rule, its number and name, its words. */
.pol__sec { padding-top: var(--s-24); border-top: 1px solid var(--rule); }
.pol__sec > * + * { margin-top: var(--s-16); }
.pol__sec > h2 + * { margin-top: var(--s-8); }
.pol__sec h2 { text-wrap: balance; }
/* The heading is its own link, so a section's address can be copied. The whole line is the target, 44 tall. */
.pol__h { display: block; padding-block: var(--s-8); color: inherit; text-decoration: none; border-radius: var(--r-1); }
.pol__n { color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.14s ease; }
.pol__t svg { display: inline-block; width: 0.6em; height: 0.6em; margin-left: 0.3em; color: var(--muted); opacity: 0; transition: opacity 0.14s ease; }
.pol__h:hover .pol__n, .pol__sec:target .pol__n { color: var(--accent-ink); }
.pol__h:hover svg, .pol__h:focus-visible svg { opacity: 1; }
@media (hover: none) { .pol__t svg { opacity: 1; } }

/* A list: the site's small square, each item its own paragraph. */
.pol__list li { position: relative; padding-left: var(--s-24); }
.pol__list li + li { margin-top: var(--s-16); }
.pol__list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* A table, should the policy ever gain one (it has none today): ruled rows, the first row in ink, scrolling inside itself on a phone. */
.pol__text .pol__table { overflow-x: auto; }
.pol__text table { width: 100%; border-collapse: collapse; font-size: var(--small); line-height: var(--small-lh); text-align: left; }
.pol__text th { color: var(--ink); font-weight: 600; }
.pol__text th, .pol__text td { padding: var(--s-12) var(--s-16) var(--s-12) 0; border-top: 1px solid var(--rule); vertical-align: top; }
.pol__text tr:last-child > * { border-bottom: 1px solid var(--rule); }

/* Back to Top: one quiet link under the last rule. */
.pol__end { padding-top: var(--s-16); border-top: 1px solid var(--rule); }
.link--up:hover svg { transform: translate(0, -3px); }

/* ---------- The contents ---------- */
/* As it stands with scripts off, and under 1200 wide: a glass card above the words, a plain list of links. */
.toc__panel { position: relative; margin-top: var(--s-16); }
html:not(.js) .toc__panel { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
.toc__list a {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); align-content: center; align-items: start; min-height: 44px; padding: var(--s-8) 0 var(--s-8) var(--s-24);
  color: var(--muted); font-size: var(--small); line-height: var(--small-lh); font-weight: 500; text-decoration: none;
  border-radius: var(--r-1); transition: color 0.14s ease;
}
.toc__list a:hover { color: var(--ink); }
.toc__list a:active { color: var(--accent-ink); }
.toc__list a[aria-current] { color: var(--ink); font-weight: 600; }
.toc__list a:focus-visible { outline-offset: -2px; }
.toc__n { font-variant-numeric: tabular-nums; }
/* The marker: the site's small square. It glides to the section being read. */
.toc__mark { position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); opacity: 0; pointer-events: none; }
.toc__btn { display: none; }

/* Under 1200 wide, with scripts on: one bar held under the header, which opens the list as a panel of the same glass as the menu. */
@media (max-width: 1199px) {
  html.js { scroll-padding-top: calc(var(--header) + var(--s-48) + var(--s-16)); }
  .js .toc {
    position: sticky; top: calc(var(--header) - 1px); z-index: 30;
    margin-inline: calc(var(--margin) * -1); padding: 0 var(--margin); border-radius: 0;
    background: rgba(255, 255, 255, 0.84); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: inset 0 1px 0 var(--rule), inset 0 -1px 0 var(--rule);
  }
  .js .toc__h { display: none; }
  .js .toc__btn {
    display: flex; align-items: center; gap: var(--s-8); width: 100%; height: 48px; padding: 0;
    background: none; border: 0; border-radius: var(--r-1); cursor: pointer; text-align: left;
    font: 600 16px/24px var(--sans); color: var(--ink);
  }
  .js .toc__btn > span:first-child { margin-right: auto; }
  .js .toc__btn:focus-visible { outline-offset: -2px; }
  .toc__now { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
  .toc__btn svg { flex: none; width: 16px; height: 16px; transition: transform 0.2s ease; }
  .toc.is-open .toc__btn svg { transform: rotate(180deg); }
  .js .toc__panel {
    display: none; position: absolute; left: var(--margin); right: var(--margin); top: calc(100% + var(--s-8)); margin: 0; padding: var(--s-8);
    background: #fff; max-height: calc(100vh - var(--header) - var(--s-48) - var(--s-24)); max-height: calc(100dvh - var(--header) - var(--s-48) - var(--s-24));
    overflow-y: auto; overscroll-behavior: contain;
  }
  .js .toc.is-open .toc__panel { display: block; }
  .js .toc__list a { padding-left: var(--s-32); padding-right: var(--s-8); }
  .js .toc__list a:hover { background: var(--tint); }
  .js .toc__mark { left: var(--s-16); }
  .js .pol { row-gap: var(--s-32); }
}
@media (min-width: 600px) {
  /* from a tablet up the headings are 36 tall, so 4 above and below makes the 44 */
  .pol__h { padding-block: var(--s-4); }
  .pol__sec > h2 + * { margin-top: var(--s-12); }
}
@media (min-width: 600px) and (max-width: 1199px) {
  /* a tablet: the opened list does not need the whole width */
  .js .toc__panel { right: auto; width: 384px; }
}
@media (min-width: 720px) and (max-width: 1199px) {
  /* a tablet: the words keep to eleven columns, and never run past 640, so a line stays near 70 characters */
  .pol > .pol__text { grid-column: 1 / span 11; }
}

/* A computer: the contents beside the words, held as the reader scrolls. One column of air, then the words on seven columns: the numbers stand in the first, the reading text in the other six. */
@media (min-width: 1200px) {
  .toc { grid-column: 1 / span 4; position: sticky; top: calc(var(--header) + var(--s-24)); display: flex; flex-direction: column; max-height: calc(100vh - var(--header) - var(--s-48)); }
  .toc__panel { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .pol__text { grid-column: 6 / span 7; max-width: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: var(--gutter); }
  .pol__text > * { grid-column: 2 / -1; }
  .pol__text > * + * { margin-top: var(--s-40); }
  .pol__sec, .pol__end { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
  .pol__sec { padding-top: var(--s-32); }
  .pol__sec > * { grid-column: 2 / -1; }
  .pol__sec > h2 { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
  .pol__h { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
  .pol__t { grid-column: 2 / -1; }
  .pol__end .link { grid-column: 2 / -1; justify-self: start; }
}

/* Movement: the marker glides, and the opened list rises a little as it fades in. Position and opacity only.
   Under reduced motion the home page's own rule turns every transition and animation off. */
@media (prefers-reduced-motion: no-preference) {
  .toc__mark { transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.2s ease; }
  @media (max-width: 1199px) {
    .js .toc.is-open .toc__panel { animation: toc-open 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    @keyframes toc-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- On paper ---------- */
/* The whole policy, black on white, with nothing that belongs to a screen. A link to a web page prints its address after it;
   an email link already reads as its address. */
@media print {
  @page { size: A4; margin: 20mm 22mm 22mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body { font: 400 11pt/16pt var(--sans); overflow: visible; }
  .skip, .top__right, .menu, .toc, .pol__end, .foot, .grid-overlay, .pol__t svg, .pol__draft svg, .pt { display: none !important; }
  .top { position: static; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .top__in { height: auto; padding-bottom: 6mm; border-bottom: 0.5pt solid #000; }
  .wrap { width: auto; margin: 0; }
  .brand, .brand__name { min-height: 0; color: #000 !important; font-size: 11pt; }
  .hero { padding-top: 10mm; display: block; }
  h1, h2, h3, strong, a, p, li, .lead, .lead .ink, .pol__n, .pol__draft { color: #000 !important; }
  h1 { font-size: 30pt; line-height: 1; letter-spacing: -0.03em; }
  .hero__say { margin-top: 4mm; max-width: none; }
  .lead { font-size: 11pt; line-height: 16pt; letter-spacing: 0; }
  main > .sec, main > .sec--tight { margin-top: 8mm; }
  .pol, .pol__text, .pol__sec, .pol__sec > h2, .pol__h { display: block; max-width: none; }
  .pol__text > * + * { margin-top: 6mm; }
  .pol__draft { display: block; padding: 3mm 4mm; background: none; box-shadow: none; border: 0.5pt solid #000; border-radius: 0; font-size: 10pt; line-height: 14pt; }
  .pol__sec { padding-top: 4mm; border-top: 0.5pt solid #000; break-inside: avoid-page; }
  .pol__sec:has(.pol__list) { break-inside: auto; }
  .pol__sec h2 { font-size: 14pt; line-height: 18pt; letter-spacing: -0.02em; break-after: avoid; }
  .pol__h { padding: 0; }
  .pol__sec > * + *, .pol__sec > h2 + * { margin-top: 2.5mm; }
  .pol__list li { padding-left: 5mm; break-inside: avoid; }
  .pol__list li + li { margin-top: 2.5mm; }
  .pol__list li::before { top: 5pt; width: 0; height: 0; background: none; border: 2.5pt solid #000; border-radius: 0; }
  p, li { orphans: 3; widows: 3; }
  .inline-link { display: inline; min-height: 0; font-weight: 400; text-decoration: underline; }
  .pol__text a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; overflow-wrap: anywhere; }
}
