/* Shared stylesheet for the static legal documents (/privacy, /terms).
 *
 * These pages live in public/ as plain HTML rather than React routes, so that
 * Cloudflare serves real content with no JS. That matters because the app build
 * ships an empty <div id="root"> and OAuth/app-store reviewers fetch these URLs
 * without running scripts. Consequence: this file cannot use Tailwind or the
 * @theme tokens from src/index.css — the values below are copied from the
 * :root / .dark blocks there and must be updated alongside them.
 *
 * Fonts are the same self-hosted woff2 files the app uses (Satoshi display,
 * Outfit body). No third-party font request. */

@font-face {
  font-family: "Satoshi";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/satoshi-500.woff2") format("woff2");
}
@font-face {
  font-family: "Satoshi";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/satoshi-700.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/outfit-500.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/outfit-600.woff2") format("woff2");
}

:root {
  --bg: oklch(0.9826 0.0017 67.8);
  --fg: oklch(0.1209 0.012 55.94);
  --card: oklch(0.995 0 0);
  --muted-fg: oklch(0.556 0 0);
  --border: oklch(0.92 0 0);
  --primary: oklch(0.52 0.054 213);
  --accent-bg: oklch(0.965 0.013 213);
  --shadow: 0 1px 2px oklch(0.1209 0.012 55.94 / 0.04), 0 8px 24px oklch(0.1209 0.012 55.94 / 0.04);
}

/* The marketing entries force light mode, but these pages are also served from
   app.revyn.in, where the reader may be in dark. The app's theme lives in a
   `.dark` class driven by localStorage, which a static page can't read without
   inline script — so follow the OS preference instead. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.205 0.013 220);
    --fg: oklch(0.965 0.004 220);
    --card: oklch(0.248 0.015 220);
    --muted-fg: oklch(0.735 0.013 220);
    --border: oklch(0.32 0.016 220);
    --primary: oklch(0.66 0.062 213);
    --accent-bg: oklch(0.33 0.03 213);
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  height: 1.5rem;
  width: auto;
  display: block;
}

.site-head__nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.875rem;
}
.site-head__nav a {
  color: var(--muted-fg);
  text-decoration: none;
}
.site-head__nav a:hover,
.site-head__nav a[aria-current="page"] {
  color: var(--fg);
}

/* ── Document ───────────────────────────────────────────────────────── */

.doc {
  padding: 3.5rem 0 5rem;
}

.doc__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-fg);
  margin: 0 0 0.75rem;
}

h1 {
  font-family: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.doc__lede {
  font-size: 1.0625rem;
  color: var(--muted-fg);
  margin: 0 0 1.5rem;
}

.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 1rem 1.25rem;
  margin: 0 0 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.doc__meta strong {
  color: var(--fg);
  font-weight: 600;
}

h2 {
  font-family: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 3rem 0 0.875rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  margin: 1.75rem 0 0.5rem;
  scroll-margin-top: 1.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
li {
  margin-bottom: 0.5rem;
}
li::marker {
  color: var(--muted-fg);
}

strong {
  font-weight: 600;
}

/* Inline literals (storage key names). Kept in Outfit rather than a monospace
   family — the product ships Satoshi + Outfit only, so the tinted chip carries
   the distinction instead of a third typeface. */
code {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9375em;
  padding: 0.1em 0.4em;
  border-radius: 0.3rem;
  background: var(--accent-bg);
  color: var(--fg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Table of contents ──────────────────────────────────────────────── */

.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1rem;
}
.toc__title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-fg);
  margin: 0 0 0.75rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9375rem;
}
.toc li {
  margin-bottom: 0.3rem;
}
.toc a {
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* ── Callout ────────────────────────────────────────────────────────── */

.note {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}
.note > :last-child {
  margin-bottom: 0;
}

/* ── Table ──────────────────────────────────────────────────────────── */

/* Wide tables scroll inside their own container so the page body never
   scrolls horizontally on mobile. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  margin: 0 0 1.5rem;
  background: var(--card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.875rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

td {
  color: var(--muted-fg);
}
td:first-child {
  color: var(--fg);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.site-foot a {
  color: var(--muted-fg);
  text-decoration: none;
}
.site-foot a:hover {
  color: var(--fg);
  text-decoration: underline;
}

@media (max-width: 34rem) {
  .doc {
    padding: 2.5rem 0 3.5rem;
  }
  h2 {
    margin-top: 2.25rem;
  }
}
