/* The three legal pages (privacy.html, terms.html, delete-account.html). Visual shell only: the wording inside
   <main> is frozen and checked by scripts/site/check_site.py and rendered_check.py.
   Nothing here may change what the legal text says: no text-transform, no generated words, no hidden clauses.
   (The only generated text is the step numbers of the delete-account list, which replace the browser's own list
   numbers.) Tokens, header, footer and the closing band come from style.css. */

:root{--head-h:69px;--toc-h:62px}
@media (max-width:560px){:root{--head-h:63px}}

/* ---------- 1. hero: title, one line, updated date, and the "at a glance" summary card as the main visual ---------- */
/* Only the frozen legal text sits inside <main>. <main> is display:contents so its title, date and body join this
   grid next to the crumbs, summary card and contents, which stay outside it. */
.legal-shell{background:radial-gradient(620px 500px at 80% 300px,var(--glow),transparent 72%) no-repeat}
.legal-page{display:grid;grid-template-columns:248px 64px minmax(0,236fr) 56px minmax(0,516fr);
  grid-template-areas:"crumbs crumbs crumbs crumbs crumbs" "tab tab tab . glance" "h1 h1 h1 . glance" "sub sub sub . glance"
    "upd upd upd . glance" "jump jump jump . glance" "fill fill fill . glance" "toc . body body body";
  grid-template-rows:auto auto auto auto auto auto 1fr auto;padding-top:36px;padding-bottom:92px}
.legal-main{display:contents}
.legal-page>.crumbs{grid-area:crumbs}
.legal-page>.qtab{grid-area:tab;justify-self:start;margin-top:26px}
.legal-main>h1{grid-area:h1;font-size:clamp(36px,4.8vw,58px);letter-spacing:-.038em;line-height:1.02;font-weight:760}
.legal-page>.sub{grid-area:sub;margin-top:20px;font-size:clamp(17px,1.7vw,19.5px);line-height:1.5;color:var(--ink-2)}
.legal-main>.updated{grid-area:upd;margin-top:24px;padding-top:16px;border-top:1px solid var(--line-2);font-size:14.5px;font-weight:600;color:var(--ink-2)}
.legal-page>.jump{grid-area:jump;margin-top:22px}
.legal-page>.jump a{min-height:44px;padding:6px 16px;line-height:1.25}
.legal-page>.glance{grid-area:glance;align-self:start}
.legal-page>.toc{grid-area:toc;align-self:start;margin-top:140px}
.legal-main>.legal-body{grid-area:body;margin-top:140px}
.del-page{padding-bottom:0}
.del-page>.legal-main>.legal-sec{grid-column:1 / -1}
.del-page>.legal-main>.legal-sec:first-of-type{margin-top:76px}
/* full-bleed band colour without clipping or widening the page */
.legal-sec.band-2{border-image:linear-gradient(var(--bg-2) 0 0) fill 0 / 0 / 0 100vmax}

/* Summary card: labelled as a summary, outside <main>, and NOT part of the legal text. */
.glance{display:flex;flex-direction:column;gap:16px;padding:26px;border-radius:28px;background:var(--fill);color:var(--on-fill);box-shadow:var(--shadow);min-width:0}
.glance-h{display:flex;align-items:center;justify-content:space-between;gap:8px 14px;flex-wrap:wrap}
.glance-h h2{font-size:23px;letter-spacing:-.02em}
.glance-tag{font-size:12.5px;font-weight:720;line-height:1.2;padding:6px 11px;border-radius:99px;background:var(--fill-inset);box-shadow:inset 0 0 0 1px var(--fill-line);color:#fff}
.glance ul{display:flex;flex-direction:column;gap:8px}
.glance li{display:flex;gap:14px;align-items:flex-start;padding:13px 15px;border-radius:var(--r-in);background:var(--fill-inset)}
.glance li .ico{margin-top:1px}
.glance li div{min-width:0}
.glance b{display:block;font-size:16px;font-weight:720;line-height:1.3;letter-spacing:-.005em}
.glance span{display:block;margin-top:3px;font-size:14px;line-height:1.4;color:var(--on-fill-2);overflow-wrap:anywhere}

/* ---------- 2. long documents (privacy, terms): sticky table of contents + the text ---------- */
.toc{position:sticky;top:calc(var(--head-h) + 24px);max-height:calc(100vh - var(--head-h) - 48px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.toc-h{margin-bottom:12px;font-size:12.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--accent)}
.toc ul{border-left:2px solid var(--line-2)}
.toc a{display:flex;align-items:center;min-height:44px;margin-left:-2px;padding:6px 10px 6px 16px;border-left:2px solid transparent;font-size:14.5px;font-weight:600;line-height:1.3;color:var(--ink-2);text-decoration:none;transition:color .15s,border-color .15s}
.toc a:hover{color:var(--ink)}
.toc a:focus-visible{outline-offset:-2px}
.toc a[aria-current]{color:var(--ink);border-left-color:var(--accent)}

.legal-body{min-width:0;font-size:17px;line-height:1.6;color:var(--ink-2)}
.clause{padding:38px 0;border-top:1px solid var(--line-2);scroll-margin-top:calc(var(--head-h) - 10px)}
.clause:first-child{padding-top:0;border-top:0;scroll-margin-top:calc(var(--head-h) + 44px)}
.clause:last-child{padding-bottom:0}
.clause>*+*{margin-top:14px}
[data-legal] h2{font-size:clamp(23px,2.5vw,28px);letter-spacing:-.022em;line-height:1.15;color:var(--ink)}
[data-legal] h3{font-size:19.5px;letter-spacing:-.015em;line-height:1.2;color:var(--ink)}
.clause>h2+*{margin-top:16px}
.clause>h3{margin-top:30px}
.clause>h3+*{margin-top:10px}
[data-legal] strong{font-weight:680;color:var(--ink)}
[data-legal] a{font-weight:600}
[data-legal] p a,[data-legal] li a{overflow-wrap:anywhere}

/* lists: plain bullets by default; "rows" is a framed list for items that each open with a bold name */
[data-legal] ul:not([class])>li,.ticks>li{position:relative;padding-left:24px}
[data-legal] ul:not([class])>li+li,.ticks>li+li{margin-top:8px}
[data-legal] ul:not([class])>li::before{content:"";position:absolute;left:4px;top:.68em;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.rows{border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);overflow:hidden}
.rows>li{position:relative;padding:16px 22px 16px 46px;font-size:16px;line-height:1.5}
.rows>li+li{border-top:1px solid var(--line-2)}
.rows>li::before{content:"";position:absolute;left:22px;top:calc(16px + .6em);width:8px;height:8px;border-radius:50%;background:var(--accent)}

/* callouts (the snapshot's own emphasis boxes): "key" = the headline promise, "warn" = read-this-first */
.callout{display:flex;gap:16px;align-items:flex-start;padding:22px 24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line-2)}
.callout>.ico{width:24px;height:24px;margin-top:2px;color:var(--accent)}
.callout-b{min-width:0}
.callout-b p+p{margin-top:10px}
.callout.key{border-color:var(--accent-soft);box-shadow:0 0 0 1px var(--accent-soft)}
.callout.warn{background:var(--warn-bg);border-color:var(--warn-line);color:var(--warn-ink)}
.callout.warn>.ico,.callout.warn strong{color:var(--warn-ink)}
.callout.warn strong{font-weight:740}

/* privacy "What we collect": a framed table on wide screens, one card per row on phones */
.tbl{border:1px solid var(--line-2);border-radius:var(--r);background:var(--surface);overflow:hidden}
.tbl table{width:100%;border-collapse:collapse;font-size:15px;line-height:1.45}
.tbl th{padding:14px 18px;text-align:left;font-size:13.5px;font-weight:720;letter-spacing:.01em;color:var(--ink);background:var(--bg-2)}
.tbl td{padding:16px 18px;vertical-align:top;border-top:1px solid var(--line-2)}
.tbl td:first-child{width:30%;font-weight:650;color:var(--ink)}
.tbl td:nth-child(2){width:33%}

/* ---------- 3. delete-account: a task page. Same words, same order, laid out as cards and numbered steps ---------- */
.legal-sec.del{padding:76px 0}
.del [data-legal]>*+*{margin-top:20px}
.del-intro p{font-size:clamp(19px,2vw,23px);font-weight:600;line-height:1.35;letter-spacing:-.012em;color:var(--ink)}
.del [data-legal]>.ways{margin-top:28px}
.ways{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
/* deleted / kept: the left card carries more text, so it gets a little more room and the pair ends level */
.ways.pair{grid-template-columns:minmax(0,1.14fr) minmax(0,.86fr)}
/* the two routes: one full-width card each, icon beside the title; the three steps sit side by side */
.ways.routes{grid-template-columns:minmax(0,1fr)}
.routes .way{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:20px 16px}
.routes .way>*{grid-column:1 / -1}
.routes .way>.ib{grid-column:1;margin:0}
.routes .way>h2{grid-column:2}
.routes .steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.routes .steps li{padding:70px 22px 22px}
.routes .steps li::before{left:20px;top:20px}
.way{display:flex;flex-direction:column;gap:16px;padding:30px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line-2);min-width:0;font-size:16px;line-height:1.55;color:var(--ink-2);scroll-margin-top:calc(var(--head-h) + 20px)}
.way>.ib{margin-bottom:2px}
.routes .way>p{font-size:16.5px;line-height:1.55}
.way h2{font-size:clamp(24px,2.6vw,30px)}
.steps{counter-reset:st;display:flex;flex-direction:column;gap:10px}
.steps li{counter-increment:st;position:relative;min-height:64px;padding:18px 18px 18px 68px;border-radius:var(--r-in);background:var(--bg-2);border:1px solid var(--line-2);font-size:16.5px;line-height:1.45;color:var(--ink)}
.steps li::before{content:counter(st);position:absolute;left:16px;top:13px;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:var(--accent);color:var(--on-accent);font-size:17px;font-weight:760;line-height:1}
.ticks>li::before{content:"";position:absolute;left:3px;top:.42em;width:11px;height:6px;border-left:2.5px solid var(--accent);border-bottom:2.5px solid var(--accent);transform:rotate(-45deg)}
.way .rows{background:var(--bg-2)}
.way .rows>li{padding:14px 18px 14px 40px;font-size:15.5px}
.way .rows>li::before{left:18px;top:calc(14px + .6em)}

.del-data{scroll-margin-top:calc(var(--head-h) + 20px)}
.del-data>*+*{margin-top:18px}
.del-data h2{font-size:clamp(28px,3.6vw,42px);letter-spacing:-.03em;scroll-margin-top:calc(var(--head-h) + 28px)}
.del-data p{font-size:17px;line-height:1.6;color:var(--ink-2)}
.del-data h2+p{font-size:clamp(18px,1.9vw,21px);font-weight:600;line-height:1.4;letter-spacing:-.01em;color:var(--ink)}
.tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-top:26px!important;margin-bottom:26px}
.tiles>li{grid-column:span 2;padding:20px 22px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line-2);font-size:15px;line-height:1.5;color:var(--ink-2)}
.tiles>li:nth-child(n+4){grid-column:span 3}
.tiles>li strong{font-size:17px;letter-spacing:-.01em}

.final{padding:30px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);font-size:16.5px;line-height:1.55;color:var(--ink-2);scroll-margin-top:calc(var(--head-h) + 20px)}
.final h2{margin-bottom:10px}

/* ---------- 4. narrow screens ---------- */
@media (max-width:980px){
  /* the table of contents becomes a sticky strip of thumb-sized chips that scrolls sideways inside itself */
  .toc{top:var(--head-h);z-index:40;max-height:none;margin:0 calc(-1 * var(--pad));padding:8px var(--pad);background:var(--bg);border-bottom:1px solid var(--line-2);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .toc::-webkit-scrollbar{display:none}
  .toc-h{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .toc ul{display:flex;gap:8px;width:max-content;border:0;padding-right:var(--pad)}
  .toc a{min-height:44px;margin:0;padding:0 15px;border:1px solid var(--line);border-radius:99px;background:var(--surface);color:var(--ink);white-space:nowrap}
  .toc a[aria-current]{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
  .legal-page{grid-template-columns:minmax(0,1fr);grid-template-areas:"crumbs" "tab" "h1" "sub" "upd" "jump" "glance" "body";grid-template-rows:none;padding-top:24px}
  .legal-page>.qtab{margin-top:0}
  .legal-page>.glance{margin-top:36px}
  /* the contents strip shares the body's grid area so it can stay stuck to the top while the body scrolls */
  .legal-page>.toc{grid-area:body;margin-top:60px}
  .legal-main>.legal-body{margin-top:60px;padding-top:calc(var(--toc-h) + 36px)}
  .del-page>.legal-main>.legal-sec:first-of-type{margin-top:60px}
  .clause{scroll-margin-top:calc(var(--head-h) + var(--toc-h) - 8px)}
  .clause:first-child{scroll-margin-top:calc(var(--head-h) + var(--toc-h) + 30px)}
}
@media (max-width:880px){
  .ways,.ways.pair{grid-template-columns:minmax(0,1fr)}
  /* steps go back to a vertical list, number at the left */
  .routes .steps{grid-template-columns:minmax(0,1fr);gap:10px}
  .routes .steps li{padding:18px 18px 18px 68px}
  .routes .steps li::before{left:16px;top:13px}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tiles>li,.tiles>li:nth-child(n+4){grid-column:auto}
  .tiles>li:last-child:nth-child(odd){grid-column:1 / -1}
  .legal-sec.del{padding:60px 0}
}
@media (max-width:760px){
  .tbl{border:0;border-radius:0;background:none;overflow:visible}
  .tbl table,.tbl tbody,.tbl tr,.tbl td{display:block;width:auto}
  /* the column names stay visible as a legend over the cards: frozen text may not be visually hidden */
  .tbl thead{display:block}
  .tbl thead tr{display:flex;flex-wrap:wrap;gap:4px 16px;padding:0 4px 12px;border:0;border-radius:0;background:none}
  .tbl thead th{display:block;padding:0;background:none;font-size:12.5px;color:var(--accent)}
  .tbl tr{padding:18px 20px;border:1px solid var(--line-2);border-radius:20px;background:var(--surface)}
  .tbl tr+tr{margin-top:10px}
  .tbl td,.tbl td:first-child,.tbl td:nth-child(2){width:auto;padding:0;border:0}
  .tbl td:first-child{font-size:16.5px;line-height:1.35}
  .tbl td+td{margin-top:12px}
  .tbl td:last-child{font-size:15px;color:var(--ink-2)}
}
@media (max-width:560px){
  .legal-page{padding-bottom:64px}
  .del-page{padding-bottom:0}
  .legal-sec.del{padding:48px 0}
  .legal-page>.glance{margin-top:30px}
  .legal-page>.jump{flex-wrap:nowrap;margin:20px calc(-1 * var(--pad)) 0;padding:0 var(--pad) 2px;overflow-x:auto;scrollbar-width:none}
  .legal-page>.jump::-webkit-scrollbar{display:none}
  .legal-page>.jump a{flex:none;white-space:nowrap}
  .glance{padding:20px 16px;border-radius:24px}
  .glance li{gap:12px;padding:12px 13px}
  .legal-body{font-size:16.5px}
  .legal-main>.legal-body{padding-top:calc(var(--toc-h) + 28px)}
  .clause{padding:30px 0}
  .callout{flex-direction:column;gap:10px;padding:18px 18px 20px;border-radius:20px}
  .callout>.ico{margin-top:0}
  .rows>li{padding:14px 16px 14px 36px;font-size:15.5px}
  .rows>li::before{left:16px;top:calc(14px + .6em)}
  .way{padding:22px 18px}
  .routes .steps li{padding:16px 14px 16px 60px}
  .routes .steps li::before{left:12px;top:11px}
  .routes .way{gap:16px 14px}
  .tiles{grid-template-columns:minmax(0,1fr)}
  .tiles>li{padding:18px}
  .final{padding:22px 18px}
}

/* Icons inside <main> on the legal pages are CSS masks: the frozen-page gate allows no <svg> (and nothing aria-hidden) there. */
.legal-main .ico{display:inline-block;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
.legal-main .i-lock{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V8a4 4 0 0 1 8 0v2.5'/%3E%3C/svg%3E")}
.legal-main .i-warn{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4 2.500 20h19z'/%3E%3Cpath d='M12 10v4.500M12 17.500h.01'/%3E%3C/svg%3E")}
.legal-main .i-mail{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2.5'/%3E%3Cpath d='M4 7.500l8 6 8-6'/%3E%3C/svg%3E")}
.legal-main .i-phone{--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2.5'/%3E%3Cpath d='M10.5 18.5h3'/%3E%3C/svg%3E")}
