/* legal.css — the terms and the privacy policy.
   Deliberately NOT shared.css: those are marketing pages built for scanning,
   these are documents built for reading and for being cited clause by clause.

   Three constraints shaped this file:

   - No JavaScript. Our CSP refuses inline scripts, and a legal page should not
     need a script to be readable anyway. The contents sidebar, the collapsing
     on mobile and the print layout are all CSS.
   - Clause numbers live in the HTML, never in a CSS counter. Someone will cite
     "clause 20" in an email; a number that exists only in a stylesheet vanishes
     on copy-paste, in a screen reader, and in any browser that failed to load
     this file.
   - It prints. People save these as PDFs and attach them to things. */

:root{
  --paper:#F7F7F4; --surface:#FFFFFF; --raise:#FFFFFF;
  --ink:#1C1E1D; --ink-2:#4A4E4C; --ink-3:#6B706D;
  --line:rgba(28,30,29,.13); --line-2:rgba(28,30,29,.07);
  --lime:#C3EF4A; --lime-deep:#8FBF16;
  --warn-bg:#FDF3D2; --warn-line:#E8CF7A; --warn-ink:#5C4B12;
  --flag-bg:#FFE9E4; --flag-line:#D9856F; --flag-ink:#8A3B22;
  --display:'Space Grotesk',system-ui,sans-serif;
  --body:'Inter',ui-sans-serif,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,Menlo,monospace;
  --shadow:0 1px 2px rgba(28,30,29,.04), 0 8px 24px -12px rgba(28,30,29,.14);
}

@media (prefers-color-scheme: dark){
  :root{
    --paper:#131514; --surface:#1B1E1C; --raise:#212421;
    --ink:#F1F3EF; --ink-2:#B6BCB7; --ink-3:#868D88;
    --line:rgba(241,243,239,.15); --line-2:rgba(241,243,239,.08);
    --lime:#C3EF4A; --lime-deep:#C3EF4A;
    --warn-bg:#2C2712; --warn-line:#6B5B1E; --warn-ink:#E8D69A;
    --flag-bg:#331C15; --flag-line:#7D4632; --flag-ink:#F0B6A0;
    --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){ html{scroll-behavior:auto} }

body{
  background:var(--paper); color:var(--ink);
  font-family:var(--body); font-size:16.5px; line-height:1.65;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

/* ---------- masthead ---------- */
.masthead{border-bottom:1px solid var(--line);background:var(--surface)}
/* Must track .doc's max-width, or the logo floats off to the left of the
   document it belongs to. */
.masthead-in{max-width:55rem;margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:inline-flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);
  font-family:var(--display);font-weight:700;font-size:15.5px;letter-spacing:-.02em}
.brand svg{width:23px;height:23px;flex:none}
.brand em{font-style:normal;color:var(--ink-3)}
.masthead .other{font-size:14px;color:var(--ink-3);text-decoration:none}
.masthead .other:hover{color:var(--ink)}

/* ---------- page frame ---------- */
/* 55rem = 15rem of contents + 3.5rem gutter + ~36rem of text. That last number
   is the one that matters: it lands the body around 70 characters a line. The
   first cut of this file let the column run to the full grid width and measured
   99 characters, which is a wall of text no matter how good the type is. */
.doc{max-width:55rem;margin:0 auto;padding:0 24px 96px;
  display:grid;grid-template-columns:15rem minmax(0,1fr);gap:0 3.5rem;align-items:start}
.hero{grid-column:1/-1;padding:44px 0 30px;max-width:42rem}
.rule{height:5px;width:56px;background:var(--lime);border-radius:3px;margin-bottom:18px}
.eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.13em;text-transform:uppercase;
  color:var(--ink-3);display:block;margin-bottom:11px}
h1{font-family:var(--display);font-size:clamp(30px,5.2vw,42px);line-height:1.08;
  letter-spacing:-.032em;font-weight:700;text-wrap:balance;margin-bottom:14px}
.lede{font-size:18px;color:var(--ink-2);text-wrap:pretty}
.meta{font-family:var(--mono);font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);margin-top:18px}

/* ---------- contents ---------- */
.toc{position:sticky;top:20px;font-size:14px;padding-bottom:24px}
.toc-h{font-family:var(--mono);font-size:10.5px;letter-spacing:.13em;text-transform:uppercase;
  color:var(--ink-3);padding-bottom:9px;margin-bottom:9px;border-bottom:1px solid var(--line)}
.toc ol{list-style:none;display:flex;flex-direction:column;gap:1px}
.toc a{display:flex;gap:9px;text-decoration:none;color:var(--ink-2);
  padding:3.5px 9px 3.5px 7px;border-radius:6px;border-left:2px solid transparent;line-height:1.35}
.toc a:hover{color:var(--ink);background:var(--surface);border-left-color:var(--lime)}
.toc a:focus-visible{outline:2px solid var(--lime-deep);outline-offset:1px}
.toc .n{font-family:var(--mono);font-size:11px;color:var(--ink-3);flex:0 0 1.35rem;padding-top:1px}
.toc .grp{font-family:var(--mono);font-size:10.5px;letter-spacing:.11em;text-transform:uppercase;
  color:var(--ink-3);margin:16px 0 5px 7px}
.toc .grp:first-child{margin-top:0}

/* ---------- body ---------- */
main{min-width:0;max-width:36rem;padding-top:8px}
section{padding:30px 0;border-top:1px solid var(--line)}
section:first-of-type{border-top:none;padding-top:6px}
h2{font-family:var(--display);font-size:21px;font-weight:700;letter-spacing:-.022em;
  line-height:1.24;margin-bottom:12px;scroll-margin-top:24px;
  display:flex;gap:.7rem;align-items:baseline;text-wrap:balance}
h2 .n{font-family:var(--mono);font-size:12.5px;font-weight:500;color:var(--lime-deep);
  flex:0 0 auto;padding-top:2px}
@media (min-width:1120px){
  h2{margin-left:-3.4rem}
  h2 .n{flex:0 0 2.7rem;text-align:right}
}
h3{font-family:var(--display);font-size:16px;font-weight:700;letter-spacing:-.012em;
  margin:22px 0 7px;color:var(--ink)}
p{color:var(--ink-2);text-wrap:pretty}
p+p{margin-top:12px}
ul,ol.list{margin:12px 0 0 1.2rem;color:var(--ink-2);display:flex;flex-direction:column;gap:9px}
li::marker{color:var(--ink-3)}
li>ul{margin-top:9px}
b,strong{color:var(--ink);font-weight:600}
a{color:var(--ink);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2.5px;
  text-decoration-color:var(--line)}
a:hover{text-decoration-color:var(--lime-deep)}
code{font-family:var(--mono);font-size:.86em;background:var(--line-2);
  padding:1.5px 5px;border-radius:4px;color:var(--ink)}
abbr{text-decoration:none;border-bottom:1px dotted var(--ink-3);cursor:help}

/* part divider */
.part{grid-column:1/-1;display:flex;align-items:center;gap:14px;margin:14px 0 0}
.part span{font-family:var(--mono);font-size:11.5px;letter-spacing:.13em;text-transform:uppercase;
  background:var(--lime);color:#1C1E1D;padding:6px 13px;border-radius:6px;font-weight:500}
.part i{flex:1;height:1px;background:var(--line);font-style:normal}

/* ---------- callouts ---------- */
.callout{border-radius:13px;padding:17px 19px;margin:4px 0 0;border:1px solid var(--line);
  background:var(--surface);box-shadow:var(--shadow)}
.callout h3{margin:0 0 8px;font-size:15.5px}
.callout p{font-size:15px}
.callout.warn{background:var(--warn-bg);border-color:var(--warn-line)}
.callout.warn h3,.callout.warn p,.callout.warn li{color:var(--warn-ink)}
.callout.warn b{color:var(--warn-ink)}
.callout.key{border-left:4px solid var(--lime)}
.hero .callout{margin-top:26px}

/* flagged placeholders */
.todo{background:var(--flag-bg);border:1px dashed var(--flag-line);border-radius:5px;
  padding:1px 6px;font-family:var(--mono);font-size:12.5px;color:var(--flag-ink);
  white-space:nowrap;font-style:normal}

/* ---------- definition rows ---------- */
.rows{background:var(--surface);border:1px solid var(--line);border-radius:13px;
  overflow:hidden;margin-top:15px;box-shadow:var(--shadow)}
.rows>div{display:flex;gap:16px;padding:13px 17px;border-top:1px solid var(--line-2);font-size:14.8px}
.rows>div:first-child{border-top:none}
.rows b{flex:0 0 9.5rem;font-weight:600;line-height:1.45}
.rows span{color:var(--ink-2);min-width:0}

/* ---------- footer ---------- */
.foot{grid-column:1/-1;border-top:1px solid var(--line);margin-top:40px;padding-top:24px;
  font-size:14.5px;color:var(--ink-3);display:flex;flex-direction:column;gap:13px}
.foot .links{display:flex;gap:18px;flex-wrap:wrap}
.foot a{color:var(--ink-3)}
.foot a:hover{color:var(--ink)}

/* ---------- narrow ---------- */
@media (max-width:900px){
  .doc{grid-template-columns:minmax(0,1fr);gap:0;padding:0 18px 64px}
  .hero{padding:30px 0 22px}
  .toc{position:static;margin-bottom:12px;padding:15px 17px;background:var(--surface);
    border:1px solid var(--line);border-radius:13px;max-height:15rem;overflow-y:auto;
    box-shadow:var(--shadow)}
  h2{margin-left:0}
  body{font-size:16px}
  .rows>div{flex-direction:column;gap:4px}
  .rows b{flex:none}
}

/* ---------- print ---------- */
@media print{
  :root{--paper:#fff;--surface:#fff;--ink:#000;--ink-2:#1a1a1a;--ink-3:#555;
        --line:#bbb;--line-2:#ddd;--shadow:none}
  body{font-size:10.5pt;line-height:1.45}
  .masthead,.toc,.foot .links{display:none}
  .doc{display:block;max-width:none;padding:0}
  .hero{padding:0 0 14pt}
  h1{font-size:20pt}
  h2{font-size:12.5pt;margin-left:0;page-break-after:avoid;break-after:avoid}
  h3{page-break-after:avoid;break-after:avoid}
  section{page-break-inside:avoid;break-inside:avoid;padding:12pt 0}
  .callout,.rows{border:1px solid #999;box-shadow:none;page-break-inside:avoid;break-inside:avoid}
  .todo{border:1px solid #000;background:#fff;color:#000}
  a{text-decoration:none;color:#000}
  /* a printed contract is read away from the screen — put the target in the text */
  main a[href^="http"]::after{content:" (" attr(href) ")";font-size:8.5pt;color:#555;word-break:break-all}
}
