/* The server-rendered public pages (backend/seo_pages.py): features, guides, comparisons, /creators, /overlays, gift values.
   Same world as the landing (frontend/src/landing/landing.css): warm paper, ink, one red for the brand's primary button only, Figtree.
   No framework and no script: these pages are read, so the type does the work. Type floor 13px, reading text 16-17px. */
:root {
  --bg: #fbfaf7; --surface: #ffffff; --tint: #f3f0ea; --ink: #17171c; --muted: #565662; --line: #e4e0d8;
  --red: #d1152d; --red-deep: #aa0f24; --r: 14px; --max: 1120px; --read: 68ch;
  --font: Figtree, "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.sp { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font); overflow-wrap: break-word; }
.sp ::selection { background: var(--ink); color: var(--bg); }
.sp :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sp a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sp a:hover { text-decoration-thickness: 2px; }
.sp .skip { position: absolute; left: -9999px; top: 8px; z-index: 10; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 10px; font-weight: 700; }
.sp .skip:focus { left: 12px; }
.sp h1, .sp h2, .sp h3 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }

/* header */
.sp-top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px;
  max-width: var(--max); margin: 0 auto; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); }
.sp .sp-brand { font-weight: 800; font-size: 1.125rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sp-top nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; order: 3; width: 100%; }
.sp-top nav::-webkit-scrollbar { display: none; }
.sp .sp-top nav a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px;
  color: var(--muted); font-weight: 600; font-size: 0.9375rem; text-decoration: none; }
.sp .sp-top nav a:hover, .sp .sp-top nav a[aria-current="page"] { color: var(--ink); }
.sp .sp-top nav a[aria-current="page"] { background: var(--tint); }
.sp-act { display: flex; align-items: center; gap: 6px; }
.sp .sp-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 12px; font-weight: 600; text-decoration: none; }
@media (min-width: 860px) { .sp-top nav { order: 0; width: auto; } }

/* buttons: red is the one primary action */
.sp .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; transition: background-color .18s ease, border-color .18s ease; }
.sp .btn-primary { background: var(--red); color: #fff; }
.sp .btn-primary:hover { background: var(--red-deep); }
.sp .btn-quiet { background: var(--surface); border-color: var(--line); color: var(--ink); }
.sp .btn-quiet:hover { border-color: var(--ink); }
.sp .btn-lg { min-height: 52px; padding: 0 26px; }

/* reading column */
main#main { max-width: var(--max); margin: 0 auto; padding: 8px 20px 64px; }
.sp-crumbs { font-size: 0.875rem; color: var(--muted); margin: 16px 0 0; }
.sp-article { max-width: var(--read); margin: 24px 0 0; }
.sp-article.sp-wide { max-width: none; }
.sp-article h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); font-weight: 800; margin: 0 0 8px; }
.sp-updated { color: var(--muted); font-size: 0.875rem; margin: 0 0 28px; }
.sp-lede { font-size: 1.1875rem; color: var(--muted); max-width: var(--read); margin: 8px 0 20px; }
.sp-article h2 { font-size: 1.5rem; font-weight: 750; margin: 44px 0 10px; }
.sp-article h3 { font-size: 1.125rem; font-weight: 700; margin: 28px 0 6px; }
.sp-article p, .sp-article li { font-size: 1.0625rem; }
.sp-article p { margin: 0 0 14px; }
.sp-article ul, .sp-article ol { padding-left: 22px; margin: 0 0 16px; }
.sp-article li { margin: 6px 0; }
.sp-article ol > li::marker { font-weight: 700; }
.sp-note { background: var(--tint); border-radius: var(--r); padding: 14px 18px; margin: 20px 0; font-size: 1rem; }
.sp-article .sp-note p:last-child { margin: 0; }

/* tables (comparisons, gift values): tabular numbers, quiet rules */
.sp-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 1rem; font-variant-numeric: tabular-nums; }
.sp-table th, .sp-table td { text-align: left; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.sp-table thead th { border-top: 0; font-size: 0.875rem; color: var(--muted); font-weight: 700; }
.sp-table tbody th { font-weight: 600; min-width: 8.5em; }
.sp-table td:last-child { white-space: nowrap; }
.sp-scroll { overflow-x: auto; }

/* lists of pages and creators */
.sp-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 0; max-width: var(--read); }
.sp-list li { padding: 18px 0; border-top: 1px solid var(--line); }
.sp-list h2 { font-size: 1.25rem; margin: 0 0 4px; }
.sp-list p { margin: 0; color: var(--muted); }
.sp-creators { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sp .sp-creator { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; min-height: 84px; }
.sp .sp-creator:hover { border-color: var(--ink); }
.sp-creator img, .sp-letter { width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.sp-letter { display: grid; place-content: center; background: var(--tint); font-weight: 800; font-size: 1.25rem; }
.sp-creator > span { display: grid; gap: 2px; min-width: 0; }
.sp-creator strong { font-size: 1.0625rem; }
.sp-muted { color: var(--muted); font-size: 0.875rem; }
.sp-empty { color: var(--muted); }
.sp-pager { display: flex; align-items: center; gap: 16px; margin: 28px 0 0; }
.sp-pager a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* overlay gallery */
.sp-grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.sp-ov { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.sp-ov img { display: block; width: 100%; height: 180px; object-fit: contain; background: #1b1b22; border-radius: 10px; margin-bottom: 10px; }
.sp .sp-ov h3 { font-size: 1rem; margin: 0 0 4px; }
.sp .sp-ov p { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* questions, read next, closing call */
.sp-faq h3 { font-size: 1.0625rem; }
.sp-related { margin: 44px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.sp-related h2 { font-size: 1.125rem; margin: 20px 0 8px; }
.sp-cta { margin: 64px 0 0; padding: 32px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(23, 23, 28, .06), 0 10px 28px rgba(23, 23, 28, .08); }
.sp-cta h2 { font-size: 1.625rem; font-weight: 800; margin: 0 0 6px; }
.sp-cta p { margin: 0 0 16px; color: var(--muted); }
.sp-cta p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }

/* footer */
.sf { max-width: var(--max); margin: 0 auto; padding: 32px 20px 48px; border-top: 1px solid var(--line); color: var(--muted); }
.sf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.sf h2 { font-size: 0.875rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; letter-spacing: 0; }
.sf ul { list-style: none; padding: 0; margin: 0; }
.sf li { margin: 0; }
.sf a { display: inline-flex; min-height: 36px; align-items: center; font-size: 0.9375rem; }
.sf-note { font-size: 0.8125rem; margin: 24px 0 0; }

@media (max-width: 640px) {
  .sp-act .sp-link { padding: 0 8px; }
  .sp-cta { padding: 24px 18px; }
  .sp-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sp .btn { transition: none; } }
