/*
 * Legal documents — privacy, terms, cookies, DPA, licence.
 *
 * One stylesheet for all of them, because five near-identical files would be
 * five files to keep in step. Set for reading a long document rather than for
 * scanning a marketing page: a narrower measure, a sticky contents rail, and
 * tables that survive a phone.
 */

:root{
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
  --doc-measure:68ch;
}

.tag{display:inline-flex;align-items:center;gap:7px;font-size:14px;font-weight:600;color:var(--blue);margin-bottom:16px}
.tag i{width:8px;height:8px;border-radius:50%;background:currentColor}

.doc{padding:72px 0 96px}
.doc .wrap{max-width:1080px}

/* head */
.doc-head{max-width:var(--doc-measure);margin-bottom:40px}
.doc-head h1{font-size:clamp(34px,5vw,54px);margin-bottom:18px}
.doc-head .lead{font-size:18px}
.doc-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
.doc-meta span{font-size:12.5px;color:var(--ink-2);background:var(--mist);border:1px solid var(--line);padding:5px 10px;border-radius:99px}

/* the short version */
.doc-summary{background:var(--ink);color:#fff;border-radius:28px;padding:36px 40px;margin-bottom:56px}
.doc-summary h2{color:#fff;font-size:22px;margin-bottom:6px}
.doc-summary-note{color:#8A90A3;font-size:13.5px;margin-bottom:22px;max-width:60ch}
.doc-summary ul{list-style:none;display:grid;gap:12px;padding:0;margin:0}
/* The marker is positioned rather than made a flex or grid item: these items
   contain a <strong>, and an element child splits the surrounding text into
   separate items, which sends the tail of the sentence into the bullet column. */
.doc-summary li{font-size:15px;color:#D6DAE8;line-height:1.6;position:relative;padding-left:19px}
.doc-summary li::before{content:"";position:absolute;left:0;top:9px;width:7px;height:7px;border-radius:50%;background:#7CFFB8}
.doc-summary strong{color:#fff;font-weight:600}
.doc-summary a{color:#9FB4FF;text-decoration:underline;text-underline-offset:2px}

/* body */
.doc-body{display:grid;grid-template-columns:240px minmax(0,1fr);gap:56px;align-items:start}

.doc-rail{position:sticky;top:88px;max-height:calc(100vh - 120px);overflow:auto;padding-right:8px}
.doc-rail h2{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);margin-bottom:14px}
.doc-rail ol{list-style:none;display:grid;gap:1px;padding:0;margin:0}
.doc-rail a{display:grid;grid-template-columns:22px 1fr;gap:8px;align-items:baseline;font-size:13.5px;line-height:1.35;color:var(--ink-2);padding:7px 10px;border-radius:9px;transition:background .15s,color .15s}
.doc-rail a:hover{background:var(--mist);color:var(--ink)}
.doc-rail a .n{font-family:var(--mono);font-size:11px;color:var(--ink-3)}
.doc-rail a.on{background:var(--blue-tint);color:var(--blue-deep);font-weight:500}
.doc-rail a.on .n{color:var(--blue)}

.doc-text{max-width:var(--doc-measure);min-width:0}

.doc-sec{scroll-margin-top:96px;padding-bottom:44px;margin-bottom:44px;border-bottom:1px solid var(--line)}
.doc-sec:last-of-type{border-bottom:0}
.doc-sec>h2{font-size:26px;letter-spacing:-.02em;line-height:1.2;margin-bottom:20px;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:baseline}
.doc-sec>h2 .n{font-family:var(--mono);font-size:14px;font-weight:500;color:var(--blue)}
.doc-anchor{font-family:var(--mono);font-size:15px;color:var(--line);opacity:0;transition:opacity .15s,color .15s}
.doc-sec>h2:hover .doc-anchor,.doc-anchor:focus-visible{opacity:1;color:var(--ink-3)}

.doc-text h3{font-size:17px;margin:28px 0 10px}
.doc-text p{font-size:15.5px;line-height:1.7;color:var(--ink-2);margin-bottom:14px}
.doc-text strong{color:var(--ink);font-weight:600}
.doc-text a{color:var(--blue);text-decoration:underline;text-underline-offset:2px}
.doc-text a:hover{color:var(--blue-deep)}
.doc-text ul,.doc-text ol{margin:0 0 18px;padding:0;list-style:none;display:grid;gap:9px}
/* Same reason as .doc-summary li above — the marker is absolutely positioned so
   that a <strong> in the middle of a clause cannot break the line flow. */
.doc-text li{font-size:15.5px;line-height:1.65;color:var(--ink-2);position:relative;padding-left:26px}
.doc-text ul>li::before{content:"";position:absolute;left:6px;top:10px;width:6px;height:6px;border-radius:50%;background:var(--ink-3)}
.doc-text ol{counter-reset:doc}
.doc-text ol>li{counter-increment:doc}
.doc-text ol>li::before{content:counter(doc) ".";position:absolute;left:0;top:2px;font-family:var(--mono);font-size:12.5px;color:var(--blue)}
.doc-text code{font-family:var(--mono);font-size:.86em;background:var(--mist);border:1px solid var(--line);padding:1px 5px;border-radius:5px;color:var(--ink)}

/* callout */
.doc-note{background:var(--blue-tint);border:1px solid #CBD5FF;border-radius:16px;padding:18px 20px;font-size:15px;line-height:1.65;color:#22306E;margin:0 0 20px}
.doc-note strong{color:#15205A}
.doc-note a{color:var(--blue-deep)}

/* tables */
.doc-table{overflow-x:auto;border:1px solid var(--line);border-radius:16px;margin:0 0 22px;background:#fff}
.doc-table table{border-collapse:collapse;width:100%;min-width:560px}
.doc-table th{text-align:left;font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);padding:13px 16px;background:var(--mist);border-bottom:1px solid var(--line);white-space:nowrap}
.doc-table td{font-size:14px;line-height:1.6;color:var(--ink-2);padding:13px 16px;border-bottom:1px solid var(--line);vertical-align:top}
.doc-table tr:last-child td{border-bottom:0}
.doc-table td:first-child{color:var(--ink);font-weight:500}
.doc-table strong{color:var(--ink)}

/* foot — the document's colophon.
   core.css paints every bare <footer> as the dark site footer (background,
   white text, 32px radius, no side padding), and this is a <footer> inside
   the article, so it was inheriting all of it. Every one of those is set
   here on purpose rather than left to the cascade. */
.doc-foot{margin:8px 0 0;padding:22px 24px;border-radius:16px;background:var(--mist);border:1px solid var(--line);color:var(--ink-2);
  display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px 36px;align-items:start}
.doc-foot p{margin:0;color:inherit}
.doc-foot .doc-foot-label{font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);margin-bottom:10px}
.doc-foot .doc-foot-name{font-size:14.5px;font-weight:600;color:var(--ink);line-height:1.45;margin-bottom:4px}
.doc-foot .doc-foot-line{font-size:13.5px;color:var(--ink-2);line-height:1.6}
.doc-foot .doc-others{display:flex;flex-wrap:wrap;gap:8px}
.doc-foot .doc-others a{display:inline-flex;align-items:center;font-size:13px;font-weight:500;color:var(--ink-2);background:#fff;border:1px solid var(--line);border-radius:99px;padding:6px 13px;text-decoration:none;line-height:1.3;white-space:nowrap;transition:border-color .15s,color .15s}
.doc-foot .doc-others a:hover{color:var(--ink);border-color:var(--ink-3)}
.doc-foot .doc-others a:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media (max-width:720px){
  .doc-foot{grid-template-columns:1fr;gap:22px;padding:20px}
}

/* the licence page renders a plain-text file rather than blocks */
.legal-body{font-family:var(--mono);font-size:12.5px;line-height:1.75;white-space:pre-wrap;word-break:break-word;color:var(--ink-2);background:var(--mist);border:1px solid var(--line);border-radius:18px;padding:26px}

@media(max-width:980px){
  .doc{padding:44px 0 64px}
  .doc-body{grid-template-columns:1fr;gap:0}
  .doc-summary{padding:26px 22px;border-radius:22px;margin-bottom:36px}

  /* On a phone the rail becomes a collapsed index at the top rather than a
     column that would push the document a screen and a half down. */
  .doc-rail{position:static;max-height:none;overflow:visible;border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:36px;background:#fff}
  .doc-rail a.on{background:var(--blue-tint)}
  .doc-sec>h2{font-size:22px}
  .doc-anchor{display:none}

  /* Tables reflow to stacked rows, each cell labelled by its column. */
  .doc-table{border:0;border-radius:0;overflow:visible}
  .doc-table table{min-width:0}
  .doc-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .doc-table tr{display:block;border:1px solid var(--line);border-radius:14px;padding:6px 0;margin-bottom:10px;background:#fff}
  .doc-table td{display:block;border-bottom:0;padding:8px 16px}
  .doc-table td::before{content:attr(data-label);display:block;font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);margin-bottom:3px}
  .doc-table td:empty{display:none}
}

@media print{
  .nav,footer,#bkChat,.doc-rail,.doc-anchor,.doc-others{display:none!important}
  .doc-body{grid-template-columns:1fr}
  .doc-text,.doc-head{max-width:none}
  .doc-summary{background:#fff;color:#000;border:1px solid #000}
  .doc-summary h2,.doc-summary strong{color:#000}
  .doc-summary li{color:#000}
  .doc-sec{page-break-inside:avoid}
}
