/* The legal pages (privacy, terms, refunds, billing): the landing's tokens and
   fonts (landing.css), laid out like a product doc. A side contents list on a
   wide screen, inline on a phone; legal.js marks the section in view. */
body.lg{margin:0;background:var(--bg);color:var(--text);font:400 16.5px/1.7 Geist,system-ui,sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
.lg a{color:var(--text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent) 70%,transparent);text-decoration-thickness:1.5px;text-underline-offset:3px}
.lg a:hover{text-decoration-color:var(--accent)}
.lg a:focus{outline:none}
.lg a:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.lg .tkb-logo{font-family:Geist,system-ui,sans-serif;text-decoration:none}
.lg-hd{position:sticky;top:0;z-index:5;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);background:color-mix(in srgb,var(--bg) 85%,transparent);border-bottom:1px solid var(--border)}
.lg-hd-in{max-width:1080px;margin:0 auto;padding:0 16px;height:60px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.lg-hd nav,.lg-ft nav{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:14.5px}
.lg-hd nav a,.lg-ft nav a{text-decoration:none;color:var(--text-2)}
.lg-hd nav a:hover,.lg-ft nav a:hover,.lg-hd nav a[aria-current]{color:var(--text)}
.lg-hd nav a[aria-current]{box-shadow:inset 0 -2px 0 var(--accent)}

/* The page: a contents column and one reading column of about 68 characters. */
.lg-main{max-width:1080px;margin:0 auto;padding:64px 16px 88px;display:grid;grid-template-columns:minmax(0,1fr);gap:0 56px}
.lg-head,.lg-doc{max-width:68ch;min-width:0}
.lg-eyebrow{margin:0 0 12px;font:500 12.5px/1.4 'Geist Mono',monospace;letter-spacing:.02em;color:var(--text-3)}
.lg h1{margin:0 0 16px;font-size:clamp(34px,6vw,50px);line-height:1.05;letter-spacing:-.035em;font-weight:700}
.lg-lede{margin:0 0 32px;font-size:clamp(17px,2.2vw,19px);line-height:1.6;color:var(--text-2);text-wrap:pretty}

/* "In short": the page in a few lines. */
.lg-sum{margin:0 0 48px;padding:20px 22px 18px;border-radius:14px;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--accent)}
.lg .lg-sum h2{margin:0 0 10px;font:600 12.5px/1.4 'Geist Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--text-2)}
.lg .lg-sum ul{margin:0;padding-left:20px}
.lg .lg-sum li{margin-bottom:6px;font-size:15.5px;line-height:1.6}
.lg-sum li:last-child{margin-bottom:0}

/* Contents: inline on a phone, a sticky side column on a wide screen. */
.lg .lg-toc{margin:0 0 44px;padding:16px 18px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.lg-toc-t{margin:0 0 8px;font:600 12.5px/1.4 'Geist Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--text-2)}
.lg .lg-toc ol{list-style:none;margin:0;padding:0;counter-reset:toc;columns:2 180px;column-gap:20px}
.lg .lg-toc li{counter-increment:toc;break-inside:avoid}
.lg-toc a{display:flex;gap:10px;padding:5px 0;font-size:14.5px;line-height:1.45;text-decoration:none;color:var(--text-2)}
.lg-toc a::before{content:counter(toc,decimal-leading-zero);flex:none;font:500 12px/1.9 'Geist Mono',monospace;color:var(--text-3)}
.lg-toc a:hover,.lg-toc a[aria-current]{color:var(--text)}
.lg-toc a[aria-current]::before{color:var(--accent)}

/* Sections, headings and their anchors. */
.lg section{margin:0 0 48px;scroll-margin-top:84px}
.lg-doc>section:last-child{margin-bottom:0}
.lg-head+.lg-doc{margin-top:32px}
.lg h2{position:relative;margin:0 0 14px;font-size:clamp(21px,2.6vw,24px);line-height:1.3;letter-spacing:-.02em;font-weight:650;text-wrap:balance}
.lg-doc>section+section{padding-top:40px;border-top:1px solid var(--border)}
.lg-hash{margin-left:10px;font:500 .8em 'Geist Mono',monospace;color:var(--text-3)!important;text-decoration:none!important;opacity:0;transition:opacity .15s}
.lg h2:hover .lg-hash,.lg-hash:focus-visible{opacity:1}
.lg-hash:hover{color:var(--accent)!important}
.lg p{margin:0 0 16px;text-wrap:pretty}
.lg p:last-child,.lg ul:last-child{margin-bottom:0}
.lg ul{margin:0 0 16px;padding-left:22px}
.lg li{margin-bottom:10px;padding-left:2px}
.lg li::marker{color:var(--accent)}
.lg b,.lg strong{font-weight:600}
.lg code{font:500 .86em 'Geist Mono',monospace;padding:1px 6px;border-radius:6px;background:var(--surface-2);border:1px solid var(--border);white-space:nowrap}

/* Tables scroll sideways on a phone instead of squeezing. */
.lg-table{margin:4px 0 20px;overflow-x:auto;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.lg-table:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.lg table{width:100%;min-width:560px;border-collapse:collapse;font-size:14.5px;line-height:1.55}
.lg th{text-align:left;font:600 12px/1.4 'Geist Mono',monospace;letter-spacing:.05em;text-transform:uppercase;color:var(--text-2);padding:12px 16px;background:var(--surface-2);border-bottom:1px solid var(--border)}
.lg td{vertical-align:top;padding:14px 16px;border-bottom:1px solid var(--border);color:var(--text-2)}
.lg td:first-child{color:var(--text);font-weight:550;width:30%}
.lg tr:last-child td{border-bottom:0}
.lg .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.lg-ft{max-width:1080px;margin:0 auto;padding:24px 16px 40px;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;font-size:14px;color:var(--text-3)}

@media (min-width:960px){
  .lg-main{justify-content:center;grid-template-columns:minmax(0,68ch)}
  .lg-main:has(.lg-toc){grid-template-columns:220px minmax(0,68ch)}
  .lg-main:has(.lg-toc) .lg-head{grid-column:2}
  .lg .lg-toc{grid-column:1;grid-row:2;align-self:start;position:sticky;top:92px;margin:0;padding:0;border:0;background:none}
  .lg .lg-toc ol{columns:auto;border-left:1px solid var(--border)}
  .lg-toc a{margin-left:-1px;padding:6px 0 6px 14px;border-left:2px solid transparent;font-size:14px}
  .lg-toc a[aria-current]{border-left-color:var(--accent)}
  .lg-main:has(.lg-toc) .lg-doc{grid-column:2;grid-row:2}
}
@media (max-width:600px){
  body.lg{font-size:16px}
  .lg-main{padding-top:40px}
  .lg-hd nav{flex-wrap:nowrap;gap:12px;font-size:13.5px}
  .lg-sum{padding:16px 16px 14px}
}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

/* The 404: the product's loading ghost (loading.css), set in the page. */
.lg-404{text-align:center;padding-top:clamp(32px,6vw,72px);display:block}
.lg-404 .lg-lede{margin-inline:auto;max-width:520px}
.lg-404 .lg-404-ghost{--accent-soft:var(--glow);position:relative;inset:auto;z-index:auto;background:none;margin:0 auto clamp(24px,4vw,40px)}
.lg-404 .lg-404-ghost .ld-stage{width:clamp(160px,34vw,260px);height:auto}
.lg-404 .lg-404-ghost .ld-name{font-size:clamp(20px,4vw,30px)}
.lg-404-go{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 24px;font-weight:500}
