/* Ratio's legal-reference frame: Privacyverklaring, Privacy en beveiliging, Voorwaarden (and later the
   Verwerkersovereenkomst). Ported from docs/design/ratio-storefront/privacy/v3-locked.html, whose frame the other two
   mockups copy. A page loads this file before its own css/<page>.css, which holds what only that page has and may
   override a size here.

   Markup (see ratio/nl/privacy.html):
     <div class="doc wrap">                     the sheet: the index on the left, the text on the right
       {% include "ratio/_legal_toc.html" %}    nav.toc, the sticky index "Op deze pagina"
       <article class="text">
         <header class="page-head"> h1.statement, p.version, .drift … </header>
         {% include "ratio/_legal_toc_phone.html" %}   details.toc-m#op-deze-pagina, the phone index
         <section class="kort">…</section>      "In het kort", the one beige object
         … .card …                              the white card, the unit of a legal page
         {% include "ratio/_legal_back.html" %} p.back, phone only: "Naar de inhoud"
   js/toc.js marks the entry of the section in view and opens the phone index from a "Naar de inhoud" link. */

/* ---------- The sheet ----------
   Sticky needs a scrolling ancestor with no overflow set in between: html > body > main > div.doc > nav.toc. None of
   them sets overflow, transform, contain or filter. The index is a grid item, so it is aligned to the start of its row
   (otherwise it stretches to the full row height and has nowhere to stick). */
.doc{display:grid;grid-template-columns:240px minmax(0,1fr);column-gap:64px;align-items:start;font-variant-numeric:lining-nums tabular-nums}
.doc.wrap{padding-top:22px}
.doc article{overflow-wrap:break-word}  /* a long Dutch compound with no soft hyphen breaks instead of pushing the page sideways on a phone */

/* ---------- The index: the binder's divider list (06) ---------- */
.toc{position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow-y:auto;padding:4px 4px 12px 0}
.toc a{text-decoration:none}
.toc a:hover{text-decoration:underline;text-decoration-thickness:1px}
.toc > ul > li{font-size:17px;line-height:1.3;padding:5px 0 5px;box-shadow:inset 0 1px 0 var(--rs-lip),inset 0 2px 0 var(--rs-raised)}
.toc > ul > li:first-child{box-shadow:none;padding-top:0}
/* The entries one step in, on a pressed vertical rule: the divider tabs behind the section tab (06). */
.toc ul ul{margin:6px 0 2px 2px;padding:0 0 0 14px;box-shadow:inset 1px 0 0 var(--rs-lip)}
.toc ul ul li{font-size:16px;line-height:1.3;padding:3px 0}
/* Active section: the entry for the section in view takes a brass rule under its label (aria-current="location",
   set by toc.js; without JS there is no marker and the index still works). */
.toc a[aria-current="location"]{text-decoration:underline;text-decoration-color:var(--rs-brass);text-decoration-thickness:2px;text-underline-offset:5px}

/* Phone index: hidden on desktop, where the aside does the job. */
.toc-m{display:none}

/* ---------- Head of the page: the title, the version byline, the drift rule ---------- */
.page-head .drift{width:100%}  /* full width of the text column, as the drift runs on every other page */
.version{font-size:17px;line-height:1.3;color:var(--rs-ink-2);margin-top:8px}
.version a{color:var(--rs-ink-2)}
.ph{white-space:nowrap}

/* ---------- In het kort: the one beige object, a channel pressed into the sheet. Its lines are cut one under
   another like the statements on the bench (07); the pressed line is the list marker. Two columns of three: the
   grid fills column 1 top to bottom, then column 2, so the reading order of the list is the reading order of the page;
   rows line up across, the pressed lines with them. ---------- */
.kort{margin-top:22px;scroll-margin-top:16px;background:var(--rs-tab-back);box-shadow:inset 0 2px 0 var(--rs-lip),inset 0 3px 0 var(--rs-edge),inset 0 -1px 0 var(--rs-raised);padding:16px 24px 8px 24px}
.kort h2{font-size:26px;line-height:1.1;padding-bottom:10px}
/* A note under the head (Voorwaarden: the summary is not binding; Privacyverklaring: the way to Privacy en security). */
.kort h2:has(+ .disc){padding-bottom:0}
.kort .disc{font-size:17px;line-height:1.35;color:var(--rs-ink-2);margin-top:4px;padding-bottom:10px}
.kort .disc a{color:var(--rs-ink-2)}
.kort li{font-size:18px;line-height:1.4;padding:9px 0 9px;box-shadow:inset 0 1px 0 var(--rs-lip),inset 0 2px 0 var(--rs-raised)}
.kort ul{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:repeat(3,auto);grid-auto-flow:column;column-gap:36px}

/* ---------- The card: the front card pulled from the drawer (01). Raised paper, a hairline edge, square corners,
   no shadow. An index link lands on it with its top edge 16px below the viewport top, edge and heading in view. ---------- */
.card{background:var(--rs-raised);border:1px solid var(--rs-edge);border-radius:0;padding:18px 24px 14px;scroll-margin-top:16px}

/* Phone only: one small way back to the index at the end of each section. */
.back{display:none}

/* ---------- Narrower screens ---------- */
@media (max-width:1300px){
  .doc{column-gap:48px;grid-template-columns:230px minmax(0,1fr)}
}
@media (max-width:1100px){
  .doc{column-gap:36px;grid-template-columns:210px minmax(0,1fr)}
}
/* Below 960px the index leaves the margin and becomes a <details> at the top of the text. */
@media (max-width:960px){
  .doc{display:block}
  .toc{display:none}
  .toc-m{display:block;margin-top:18px;background:var(--rs-raised);border:1px solid var(--rs-edge);scroll-margin-top:12px}
  .toc-m summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px;min-height:48px;padding:10px 16px;font-size:18px;line-height:1.3}
  .toc-m summary::-webkit-details-marker{display:none}
  /* The marker: a small pressed triangle in brass, turning down when open. Not an icon set; one glyph, drawn in CSS. */
  .toc-m summary::before{content:"";flex:none;width:0;height:0;border-left:7px solid var(--rs-brass);border-top:5px solid transparent;border-bottom:5px solid transparent}
  .toc-m[open] summary::before{transform:rotate(90deg)}
  .toc-m summary span{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
  .toc-m > ul{padding:0 16px 12px 16px;box-shadow:inset 0 1px 0 var(--rs-edge)}
  .toc-m > ul > li{font-size:18px;line-height:1.3;box-shadow:inset 0 1px 0 var(--rs-edge)}
  .toc-m > ul > li:first-child{box-shadow:none}
  .toc-m a{display:block;padding:10px 0;text-decoration:none}
  .toc-m ul ul{margin:0 0 8px 2px;padding-left:14px;box-shadow:inset 1px 0 0 var(--rs-lip)}
  .toc-m ul ul li{font-size:17px}
  .toc-m ul ul a{padding:7px 0}
  .back{display:block;margin-top:10px;font-size:17px;line-height:1.3}
  .back a{color:var(--rs-ink-2)}
}
/* Below 760px "In het kort" goes back to one column, still in reading order. */
@media (max-width:760px){
  .kort ul{display:block}
}
@media (max-width:640px){
  .doc.wrap{padding-top:18px}
  .doc{font-size:18px}  /* the shell sets 17px on a phone; a legal text keeps its 18px reading size (the mockups) */
  /* Phone: the channel runs to the screen edges, its text on the page's 16px gutter. */
  .kort{margin-left:-16px;margin-right:-16px;padding:14px 16px 6px}
  .kort h2{font-size:23px}
  .card{padding:14px 16px 12px;scroll-margin-top:12px}
}

/* ---------- Print: a privacy officer prints this or saves it as PDF. One column, no index, no header tabs; cards
   kept whole on a page where they fit; the colophon printed light. ---------- */
@media print{
  .toc,.toc-m,.back{display:none !important}
  .doc,.doc.wrap{display:block;padding-top:8pt}
  .kort{-webkit-print-color-adjust:exact;print-color-adjust:exact;break-inside:avoid}
  .kort li{font-size:11pt}
  .kort .disc{font-size:9.5pt}
  .card{border-color:var(--rs-lip);break-inside:avoid;page-break-inside:avoid}
  /* Where a link goes, for paper: only for addresses outside this page (the frame is shell.css). */
  main .version a::after{content:none}
}
