/* =============================================================================
   Document pages — privacy, terms, checkout success.

   Same tokens, fonts and dark ground as app.css, but document typography rather
   than landing-page layout. These are pages people read, and one of them is
   read by a Chrome Web Store reviewer, so legibility beats atmosphere: no
   aurora, no grid, no glow.

   It has to be visibly the same site, though. A light-themed privacy page
   hanging off a dark landing page reads as a template someone forgot to style,
   which is the last impression you want on the page that explains what you do
   with people's prompts.
   ========================================================================== */

:root {
  --background: oklch(0.09 0.004 285);
  --foreground: oklch(0.97 0.002 285);
  --surface: oklch(0.13 0.005 285);
  --muted-foreground: oklch(0.68 0.008 285);
  --accent: oklch(0.74 0.22 340);
  --accent-foreground: oklch(0.13 0.02 288);
  --strike: oklch(0.5 0.008 285);
  --border: oklch(1 0 0 / 0.08);
  --rust: oklch(0.7 0.19 30);

  --font-sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --gradient-mint: linear-gradient(
    100deg,
    oklch(0.82 0.14 200),
    oklch(0.78 0.18 300) 50%,
    oklch(0.74 0.22 340)
  );
}

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

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 2rem) 6rem;
  max-width: 46rem;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.7 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ---- header -------------------------------------------------------------- */
header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
header .wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 1rem var(--font-display);
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-decoration: none;
}
header .wordmark::before {
  content: "";
  width: 1.25rem; height: 1.25rem;
  background: url("icons/icon128.png") center/contain no-repeat;
}
header .updated { font-size: 0.8rem; color: var(--strike); margin-left: auto; }

/* ---- type ---------------------------------------------------------------- */
h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 0.7em;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 2.6em 0 0.8em;
  padding-top: 1.3em;
  border-top: 1px solid var(--border);
}
h2:first-of-type { border-top: none; padding-top: 0; margin-top: 2em; }

p, li { color: var(--muted-foreground); }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.2em; padding-left: 1.1rem; }
li { margin-bottom: 0.5em; }
strong, b { color: var(--foreground); font-weight: 600; }
em { color: var(--foreground); font-style: italic; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: color-mix(in oklab, var(--accent) 70%, white); }

code {
  font: 0.88em var(--font-mono);
  background: color-mix(in oklab, oklch(1 0 0) 6%, transparent);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--foreground);
}

.lede { font-size: 1.05rem; color: var(--muted-foreground); }

/* ---- tables -------------------------------------------------------------- */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--foreground); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
td { color: var(--muted-foreground); }

/* ---- callout ------------------------------------------------------------- */
.note {
  background: color-mix(in oklab, oklch(1 0 0) 4%, transparent);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 1.25rem;
  margin: 1.6em 0;
}
.note p:last-child { margin-bottom: 0; }
.note p:first-child { margin-top: 0; }

/* ---- footer -------------------------------------------------------------- */
footer {
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--strike);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
footer a { color: var(--muted-foreground); text-decoration: none; }
footer a:hover { color: var(--foreground); }

/* ---- success page -------------------------------------------------------- */
.key {
  display: flex; gap: 0.75rem; align-items: center;
  background: color-mix(in oklab, oklch(1 0 0) 4%, transparent);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1rem 1.15rem;
  margin: 1.5em 0;
}
.key code {
  flex: 1; background: none; padding: 0;
  font-size: 1rem; color: var(--foreground); word-break: break-all;
}
.key button {
  flex: none; cursor: pointer;
  border: 1px solid var(--border);
  background: var(--foreground); color: var(--background);
  border-radius: 9999px; padding: 0.5rem 1rem;
  font: 600 0.85rem var(--font-sans);
  transition: opacity .2s;
}
.key button:hover { opacity: 0.85; }
ol { color: var(--muted-foreground); padding-left: 1.2rem; }
ol li { margin-bottom: 0.7em; }
.state { color: var(--strike); font-size: 0.9rem; }
.fail { color: var(--rust); }

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

/* The install call-to-action on the success page.
   Someone who bought from the website has a licence key and no extension —
   the key alone does nothing, so this has to carry the same weight as the key
   box above it rather than sitting quietly in a list. */
.install-cta {
  display: inline-block;
  background: var(--foreground);
  color: var(--background);
  border-radius: 9999px;
  padding: 0.8rem 1.6rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}
.install-cta:hover { opacity: 0.85; color: var(--background); }
