/* RecoverSaves — one stylesheet for every page.
 *
 * Was four near-identical inline copies. saved-posts-csv.html and
 * reddit-data-request.html differed by a single line; index.html and
 * privacy.html had silently lost their `a { color }` rule entirely, so half the
 * site rendered browser-default blue. That is the failure mode duplicated CSS
 * produces, and it had already happened, so the copies are now one file.
 *
 * Values are tokenised. Before this the site used radii of 4/8/10/12/20px,
 * spacing of 6/10/12/14/18/22/24/26/34/36/44/56px and nine unrelated font
 * sizes, none of them derived from anything. The scales below are deliberately
 * close to what was already there: this is meant to read as the same site,
 * tightened, not as a redesign.
 *
 * No webfonts anywhere. Both this site and its sibling currently make zero
 * third-party requests and that is worth more than a display face.
 */

:root {
  /* colour */
  --ink: #1a1a1b;
  --sub: #555;
  --line: #e6e6e6;
  --accent: #d43900;   /* 4.52:1 on --soft, 4.79:1 on white — both clear AA */
  --bg: #ffffff;
  --soft: #faf8f6;

  /* space — 4px base */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 44px;
  --s-8: 60px;

  /* radius */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-pill: 999px;

  /* type */
  --t-xs: 13px;
  --t-sm: 14px;
  --t-md: 15px;
  --t-base: 16px;
  --t-lg: 18px;
  --t-xl: 22px;
  --t-2xl: 32px;

  --measure: 760px;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: var(--t-base)/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
}

main { max-width: var(--measure); margin: 0 auto; padding: var(--s-5) 20px var(--s-8); }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* Headings carry the site's only real typographic opinion: tightened tracking
   at large sizes, which is where default system-ui spacing looks loosest. */
h1 {
  font-size: var(--t-2xl); line-height: 1.15; font-weight: 700;
  letter-spacing: -0.021em; margin: var(--s-6) 0 var(--s-3); text-wrap: balance;
}
h2 {
  font-size: var(--t-xl); line-height: 1.25; font-weight: 700;
  letter-spacing: -0.012em; margin: var(--s-7) 0 var(--s-2); text-wrap: balance;
}
h3 { font-size: var(--t-base); margin: var(--s-5) 0 var(--s-1); }
p  { margin: var(--s-2) 0; }

/* The wordmark. The site previously had none at all — no logo, no mark, and on
   two pages not even a link home. The bookmark is the extension's own icon, so
   the store listing and the site finally share a mark. */
.masthead {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4) 0 0;
}
.masthead a {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--ink); text-decoration: none; font-weight: 700;
  letter-spacing: -0.015em; font-size: var(--t-md);
}
.masthead svg { display: block; }
.masthead b { color: var(--accent); font-weight: 700; }

.sub { color: var(--sub); }
.lede { font-size: var(--t-lg); color: var(--sub); margin: 0 0 var(--s-2); }
.note-sm { font-size: var(--t-sm); color: var(--sub); }
.crumbs { font-size: var(--t-xs); color: var(--sub); margin: var(--s-4) 0 var(--s-5); }

.pill {
  display: inline-block; background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 3px var(--s-3);
  font-size: var(--t-xs); color: var(--sub);
}

.btn {
  display: inline-block; background: var(--accent); color: #fff; border: none;
  border-radius: var(--r-2); padding: 10px var(--s-4);
  font-size: var(--t-md); font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }

table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); margin: var(--s-4) 0; }
td, th { border: 1px solid var(--line); padding: var(--s-2) 10px; text-align: left; vertical-align: top; }
th { background: var(--soft); }

code {
  background: var(--soft); border: 1px solid var(--line);
  border-radius: var(--r-1); padding: 1px 5px; font-size: var(--t-sm);
}
pre {
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4); overflow-x: auto; font-size: var(--t-sm);
}

/* Two different `.note` rules existed across the four old stylesheets: small
   grey text on index.html (5 uses) and a bordered callout on the article pages
   (3 uses). Merging the files silently collapsed them into one, and index's
   inline asides started rendering as callouts. Kept as two named things. */
.note { font-size: var(--t-sm); color: var(--sub); }
.callout {
  border-left: 3px solid var(--accent); background: var(--soft);
  padding: var(--s-3) var(--s-4); margin: var(--s-5) 0; font-size: var(--t-md);
}

.cta { border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-4) var(--s-4); margin: var(--s-6) 0 0; }
.cta a.btn { margin-top: var(--s-2); padding: 11px 20px; }

details { border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-3) var(--s-4); margin: 10px 0; }
summary { font-weight: 600; cursor: pointer; }

footer {
  border-top: 1px solid var(--line); margin-top: var(--s-7); padding-top: var(--s-4);
  font-size: var(--t-xs); color: var(--sub);
}

ol li, .steps li { margin: var(--s-2) 0; }

@media (max-width: 520px) {
  :root { --t-2xl: 27px; --t-xl: 20px; }
}
