/* Shared by /privacy, /terms, /support, and /imprint. The tokens are the
   ones in index.html, which mirror AppTheme in the app. */
:root {
  --bg: #FFFFFF; --bg-2: #F7F8F9; --raised: #F1F2F4; --card: #FFFFFF;
  --ink: #111318; --ink-2: #6B7078; --ink-3: #A3A7AE;
  --rule: rgba(17,19,24,.12); --rule-soft: rgba(17,19,24,.08);
  --accent: #111318; --on-accent: #FFFFFF; --warn: #B5761C;
  --glass: rgba(255,255,255,.72);
  --shadow-glass: 0 1px 2px rgba(17,19,24,.05), 0 12px 32px -12px rgba(17,19,24,.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0D10; --bg-2: #101114; --raised: #1E1F25; --card: #141519;
    --ink: #F2F3F5; --ink-2: #9A9FA8; --ink-3: #676C75;
    --rule: rgba(255,255,255,.11); --rule-soft: rgba(255,255,255,.08);
    --accent: #F2F3F5; --on-accent: #0C0D10; --warn: #E0A93C;
    --glass: rgba(20,21,25,.72);
    --shadow-glass: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0D10; --bg-2: #101114; --raised: #1E1F25; --card: #141519;
  --ink: #F2F3F5; --ink-2: #9A9FA8; --ink-3: #676C75;
  --rule: rgba(255,255,255,.11); --rule-soft: rgba(255,255,255,.08);
  --accent: #F2F3F5; --on-accent: #0C0D10; --warn: #E0A93C;
  --glass: rgba(20,21,25,.72);
  --shadow-glass: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -12px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* nav: the same floating glass bar as the home page */
.nav { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 40; padding-inline: 12px; pointer-events: none; }
.nav .bar { pointer-events: auto; max-width: 820px; margin: 0 auto; height: 56px; padding: 0 9px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); box-shadow: var(--shadow-glass), inset 0 0 0 1px var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; text-decoration: none; }
.brand img { width: 30px; height: 30px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.nav .right { display: flex; align-items: center; gap: 6px; }
.nav .back { font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.nav .back:hover { color: var(--ink); background: var(--raised); }

/* document */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(120px, 14vw, 150px) 22px 80px; }
.doc .kicker { display: inline-flex; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 18px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
.doc h1 { font-size: clamp(38px, 6vw, 56px); line-height: 1.04; letter-spacing: -.04em; font-weight: 800; margin: 0; text-wrap: balance; }
.doc .lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); margin: 18px 0 0; letter-spacing: -.01em; }
.doc .meta { font-size: 14px; color: var(--ink-3); margin: 14px 0 0; }
.doc h2 { font-size: 24px; letter-spacing: -.025em; line-height: 1.2; margin: 52px 0 12px; font-weight: 700; }
.doc h3 { font-size: 18px; letter-spacing: -.015em; margin: 30px 0 8px; font-weight: 600; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc strong, .doc b { color: var(--ink); font-weight: 600; }
.doc ul { margin: 0 0 16px; padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--ink); }
.doc code { font: 500 .88em ui-monospace, "SF Mono", Menlo, monospace; background: var(--raised); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.doc address { font-style: normal; }

.summary { margin-top: 36px; padding: 22px 24px 8px; border-radius: 18px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--rule-soft); }
.summary h2 { margin-top: 0; font-size: 17px; letter-spacing: -.01em; }
.doc .summary ul { list-style: none; padding: 0; }
.summary li { position: relative; padding-left: 26px; }
.summary li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }

.doc .toc { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.toc a { display: inline-flex; height: 32px; align-items: center; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; text-decoration: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); }
.toc a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-top: 1px solid var(--rule-soft); color: var(--ink-2); }
.table th { color: var(--ink); font-weight: 600; width: 32%; }
@media (max-width: 560px) { .table th, .table td { display: block; width: auto; padding-right: 0; } .table td { border-top: 0; padding-top: 0; } }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 28px 0 20px; }
.cards .c { padding: 20px 20px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); text-decoration: none; display: block; }
.cards .c b { display: block; font-size: 16px; margin-bottom: 4px; }
.cards .c span { font-size: 14.5px; color: var(--ink-2); }
a.c:hover { box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.faq details { border-top: 1px solid var(--rule-soft); }
.faq details:last-child { border-bottom: 1px solid var(--rule-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding-bottom: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent) !important; font-weight: 600; font-size: 15px; text-decoration: none !important; }

footer { border-top: 1px solid var(--rule-soft); padding: 28px 22px 40px; font-size: 14px; color: var(--ink-2); }
footer .in { max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--ink); font-weight: 500; text-decoration: none; }
footer a:hover { color: var(--ink-2); }
footer a[aria-current="page"] { color: var(--ink-2); }


.split { border: 0; border-top: 1px solid var(--rule-soft); margin: 64px 0 48px; }

/* Appearance toggle (theme-switch.js): a round grey button, moon in light mode, sun in dark mode */
.theme-toggle { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1px var(--rule-soft); transition: background .2s, transform .15s; }
.theme-toggle:hover { background: color-mix(in srgb, var(--raised) 80%, var(--ink) 8%); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { position: absolute; width: 20px; height: 20px; transition: opacity .3s, transform .45s cubic-bezier(.2,.7,.2,1); }
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
  :root:not([data-theme="light"]) .theme-toggle { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.13); }
}
:root[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.13); }
@media (prefers-reduced-motion: reduce) { .theme-toggle svg { transition: none; } }
