/* Shared styles for the legal pages (/legal, /terms, /privacy and friends).
   The tokens, nav, brand and footer are the landing page's own, so these pages read as part of it. */
:root {
  --yellow: #FFD600; --yellow-400: #ffd91f; --yellow-600: #e6bf00; --yellow-50: #fffbe5; --yellow-100: #fff4b8;
  --ink: #0B0F14; --ink-800: #1c232c; --ink-700: #333c49; --ink-500: #6b7280; --ink-400: #9ca3af; --ink-200: #d7dae0; --ink-100: #e9ebef; --ink-50: #f4f5f7; --white: #fff;
  --like: #ef4444; --blue: #6d8cff; --online: #22c55e;
  --display: "Baloo 2", system-ui, sans-serif; --ui: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --r: 22px; --r-sm: 14px; --gutter: clamp(16px, 5vw, 48px); --max: 1180px;
  --measure: 68ch;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { font: 400 17px/1.65 var(--ui); color: var(--ink); background: var(--white); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 15px/1 var(--display); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---- nav (as on the landing page) ---- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,214,0,.9); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); }
.nav .wrap { display: flex; align-items: center; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 26px/1 var(--display); letter-spacing: -0.045em; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.nav-back { margin-left: auto; display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--white); font: 700 15px/1 var(--display); text-decoration: none; white-space: nowrap; }
.nav-back:hover { background: var(--ink-800); }
.nav-legal { display: none; font: 600 15px/1 var(--ui); color: var(--ink-700); text-decoration: none; padding: 10px 14px; border-radius: 999px; }
.nav-legal:hover { background: rgba(11,15,20,.08); color: var(--ink); }
@media (min-width: 560px) { .nav-legal { display: inline-flex; margin-left: auto; } .nav-legal + .nav-back { margin-left: 0; } }

/* ---- page head ---- */
.doc-head { background: var(--yellow); padding: clamp(28px, 6vw, 64px) 0 clamp(28px, 5vw, 48px); }
.crumbs { font: 600 14px/1.4 var(--ui); color: var(--ink-700); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.doc-head h1 { font-size: clamp(38px, 7vw, 68px); max-width: 18ch; }
.doc-head .lead { margin-top: 14px; font-size: clamp(17px, 1.2vw + 12px, 19px); color: var(--ink-700); max-width: 58ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border-radius: 999px; font: 700 13px/1.2 var(--display); background: rgba(11,15,20,.08); color: var(--ink); }

/* ---- layout: contents beside the text on wide screens, above it on phones ---- */
.doc { display: grid; gap: 28px; padding: clamp(28px, 5vw, 56px) 0 clamp(48px, 8vw, 96px); }
@media (min-width: 1000px) {
  .doc.has-toc { grid-template-columns: 260px minmax(0, var(--measure)); gap: 64px; justify-content: center; }
  .doc.has-toc .toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
}
.doc:not(.has-toc) { justify-content: center; grid-template-columns: minmax(0, var(--measure)); }

.toc { background: var(--ink-50); border: 1px solid var(--ink-100); border-radius: var(--r-sm); padding: 16px 18px; font-size: 15px; }
.toc summary { cursor: pointer; font: 700 16px/1.2 var(--display); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font: 700 20px/1 var(--display); color: var(--ink-500); }
.toc[open] summary::after { content: "\2212"; }
.toc ol { margin: 12px 0 0 1.2em; display: grid; gap: 6px; }
.toc a { color: var(--ink-700); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

/* ---- the text ---- */
.prose { min-width: 0; max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); margin-top: 2.2em; padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; letter-spacing: -0.02em; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose p, .prose li { color: var(--ink-800); }
.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: .45em; }
.prose li::marker { color: var(--ink-500); }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow-600); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--yellow-100); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose code { font: 500 .9em/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--ink-50); padding: 2px 6px; border-radius: 6px; }
.ph { background: var(--yellow-100); border-radius: 4px; padding: 0 4px; font-weight: 600; }

.callout { border-radius: var(--r-sm); padding: 16px 18px; background: var(--yellow-50); border: 1px solid var(--yellow-100); }
.callout.ink { background: var(--ink); border-color: var(--ink); color: var(--white); }
.callout.ink p, .callout.ink li, .callout.ink strong { color: var(--white); }
.callout.ink a { color: var(--yellow); text-decoration-color: var(--yellow); }
.callout.ink a:hover { background: none; }
.callout > * + * { margin-top: .6em; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ink-100); border-radius: var(--r-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 520px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--ink-100); }
.prose th { font: 700 14px/1.3 var(--display); background: var(--ink-50); }
.prose tr:last-child td { border-bottom: 0; }

/* ---- the /legal index ---- */
.cards { display: grid; gap: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: grid; gap: 6px; padding: 20px 22px; border-radius: var(--r); background: var(--ink-50); border: 1px solid var(--ink-100); text-decoration: none; transition: transform 160ms var(--ease), border-color 160ms, background 160ms; }
.card:hover { transform: translateY(-2px); border-color: var(--ink); background: var(--yellow-50); }
.card b { font: 800 22px/1.15 var(--display); letter-spacing: -0.02em; }
.card span { color: var(--ink-700); font-size: 15px; line-height: 1.5; }
.card small { color: var(--ink-500); font: 600 13px/1 var(--ui); }

/* ---- footer (as on the landing page, plus the legal links) ---- */
footer { background: var(--ink); color: var(--ink-400); padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
footer .brand { color: var(--white); font-size: 22px; }
footer .brand img { width: 30px; height: 30px; border-radius: 9px; }
footer a { color: var(--ink-200); text-decoration: none; }
footer a:hover { color: var(--yellow); }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }
@media print {
  .nav, footer, .toc, .skip { display: none; }
  .doc-head { background: none; padding: 0 0 16px; }
  body { font-size: 12pt; }
  .prose a { text-decoration: none; }
}
