/* server/seo/page.css -- served at /seo/page.css for all SSR tool pages.
   SEO-S owns this file.
   "Big room" feel: big type, big controls, lots of space, one clear action.
   Ink buttons (near-black on paper, near-white in dark). Vermilion as accent only.
   Light first, honoring prefers-color-scheme. No serif. No em dashes. */

/* ---------- tokens (inline so page works without the app's tokens.css) ---------- */
/* Geist, self-hosted (web/public/fonts): one variable file per script range carries every weight. The latin file is
   preloaded by the page head (server/seo/site.js fontHead). */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/geist-v5-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/geist-v5-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* A metric-matched stand-in while Geist loads (display=swap): Arial sized to Geist's metrics, so the swap does not
   move the layout (Core Web Vitals, CLS). */
@font-face {
  font-family: 'Geist Fallback';
  src: local('Arial'), local('ArialMT'), local('Helvetica');
  ascent-override: 95.94%;
  descent-override: 28.16%;
  line-gap-override: 0%;
  size-adjust: 102.3%;
}

:root {
  --font-ui: 'Geist', 'Geist Fallback', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --canvas: #f1efea;
  --surface-1: #f8f7f4;
  --surface-2: #ffffff;
  --surface-3: #f3f1ec;
  --surface-4: #ece9e3;
  --text-1: #17161a;
  --text-2: #46444f;
  --text-3: #6b6a73; /* 4.6:1 on the canvas, 5.3:1 on white (AA); #7c7a87 was 3.7:1 */
  --border: rgba(23, 22, 26, 0.1);
  --border-strong: rgba(23, 22, 26, 0.18);
  /* Ink button: near-black on light */
  --ink: #17161a;
  --ink-hover: #2a2830;
  --ink-text: #f8f7f4;
  /* Vermilion accent */
  --accent: #f4552b;
  --accent-hover: #ff6a42;
  --accent-soft: rgba(244, 85, 43, 0.12);
  --r-2: 8px;
  --r-3: 12px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(23, 22, 26, 0.08), 0 1px 2px rgba(23, 22, 26, 0.06);
  --shadow-md: 0 4px 12px rgba(23, 22, 26, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #121215;
    --surface-1: #18181c;
    --surface-2: #1f1f24;
    --surface-3: #27272d;
    --surface-4: #2f2f36;
    --text-1: #f0eee8;
    --text-2: #b8b5c0;
    --text-3: #908f98;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    /* Ink button: near-white on dark */
    --ink: #f0eee8;
    --ink-hover: #ffffff;
    --ink-text: #17161a;
    --accent: #f4552b;
    --accent-hover: #ff6a42;
    --accent-soft: rgba(244, 85, 43, 0.16);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --canvas: #121215;
  --surface-1: #18181c;
  --surface-2: #1f1f24;
  --surface-3: #27272d;
  --surface-4: #2f2f36;
  --text-1: #f0eee8;
  --text-2: #b8b5c0;
  --text-3: #908f98;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --ink: #f0eee8;
  --ink-hover: #ffffff;
  --ink-text: #17161a;
  --accent: #f4552b;
  --accent-hover: #ff6a42;
  --accent-soft: rgba(244, 85, 43, 0.16);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--canvas);
  min-height: 100vh;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* ---------- layout ---------- */
.seo-page { display: flex; flex-direction: column; min-height: 100vh; }

.seo-topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 16px;
}
.seo-topbar__logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; color: var(--text-1); }
.seo-topbar__logo:hover { text-decoration: none; }
.seo-topbar__seal { display: block; flex: none; border-radius: 22%; }
.seo-topbar__nav { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.seo-topbar__link {
  font-size: 0.875rem; color: var(--text-2); text-decoration: none;
  padding: 6px 12px; border-radius: var(--r-2);
  transition: background 0.15s;
}
.seo-topbar__link:hover { background: var(--surface-3); color: var(--text-1); text-decoration: none; }

.seo-main { flex: 1; }

/* ---------- hero ---------- */
.seo-hero {
  padding: 64px 16px 48px;
  max-width: 760px;
  margin: 0 auto;
}
@media (min-width: 640px) { .seo-hero { padding: 80px 32px 56px; } }

.seo-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8125rem; color: var(--text-3);
  margin-bottom: 24px;
}
.seo-breadcrumb a { color: var(--text-3); text-decoration: none; }
.seo-breadcrumb a:hover { color: var(--text-2); text-decoration: underline; }
.seo-breadcrumb__sep { color: var(--border-strong); }

.seo-hero__h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-1);
  margin-bottom: 16px;
}
.seo-hero__subhead {
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
  color: var(--text-2);
  line-height: 1.55;
  max-width: 540px;
}

/* ---------- tool widget mount ---------- */
.seo-widget {
  padding: 0 16px 48px;
  max-width: 760px;
  margin: 0 auto;
}
@media (min-width: 640px) { .seo-widget { padding: 0 32px 56px; } }

/* #tool-root is intentionally flat: one calm surface.
   The React widget adds its own layout; the static fallback has its own padding below.
   No nested box: the widget IS the surface. */
#tool-root {
  /* no background, no border, no shadow -- one surface, big room feel */
}

/* static fallback shown when JS is off */
.seo-tool-fallback { display: flex; flex-direction: column; gap: 16px; }
.seo-tool-fallback__textarea {
  width: 100%; min-height: 72px;
  padding: 12px 14px;
  font: inherit; font-size: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  color: var(--text-1);
  resize: vertical;
}
.seo-tool-fallback__textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.seo-tool-fallback__cta { align-self: flex-start; }

/* ---------- buttons ---------- */
.btn-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  font: inherit; font-size: 1rem; font-weight: 600;
  background: var(--ink);
  color: var(--ink-text);
  border: none; border-radius: var(--r-2);
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn-ink:hover { background: var(--ink-hover); text-decoration: none; color: var(--ink-text); }
.btn-ink:active { opacity: 0.85; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  font: inherit; font-size: 0.9375rem; font-weight: 500;
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border-strong); border-radius: var(--r-2);
  cursor: pointer; text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-outline:hover { background: var(--surface-3); text-decoration: none; }

/* ---------- content sections ---------- */
.seo-content {
  padding: 0 16px;
  max-width: 760px;
  margin: 0 auto 64px;
}
@media (min-width: 640px) { .seo-content { padding: 0 32px; } }

.seo-section { margin-bottom: 48px; }
.seo-section__heading {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}
.seo-section p { color: var(--text-2); margin-bottom: 12px; }
.seo-section p:last-child { margin-bottom: 0; }
.seo-section ul, .seo-section ol { padding-left: 1.25em; list-style: disc; color: var(--text-2); }
.seo-section li { margin-bottom: 6px; }
/* a paragraph that follows a list (the alternatives pages list plans under each tool) */
.seo-section ul + p, .seo-section ol + p { margin-top: 18px; }

/* ---------- examples ---------- */
.seo-examples { margin-bottom: 48px; }
.seo-examples__heading {
  font-size: 1.375rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 20px; letter-spacing: -0.005em;
}
.seo-examples__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.seo-example {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
}
.seo-example img, .seo-example video {
  width: 100%; aspect-ratio: 1; object-fit: cover;
}
.seo-example__caption {
  padding: 10px 12px;
  font-size: 0.8125rem; color: var(--text-3); line-height: 1.4;
}
/* audio examples: full-width player */
.seo-example--audio { padding: 16px 12px 4px; }
.seo-example--audio audio { width: 100%; height: 40px; }

/* ---------- how it works ---------- */
.seo-how { margin-bottom: 48px; }
.seo-how__heading {
  font-size: 1.375rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 20px; letter-spacing: -0.005em;
}
.seo-how__steps { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) {
  .seo-how__steps { flex-direction: row; gap: 24px; }
  .seo-how__step { flex: 1; }
}
.seo-how__step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 20px;
}
.seo-how__num {
  display: inline-block;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  background: var(--ink); color: var(--ink-text);
  border-radius: 50%; font-size: 0.8125rem; font-weight: 600;
  margin-bottom: 10px;
}
.seo-how__text { font-size: 0.9375rem; color: var(--text-2); line-height: 1.5; }

/* ---------- ideas ---------- */
.seo-ideas { margin-bottom: 48px; }
.seo-ideas__heading {
  font-size: 1.375rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 16px; letter-spacing: -0.005em;
}
.seo-ideas__list { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-ideas__item {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 0.875rem; color: var(--text-2); text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.seo-ideas__item:hover {
  background: var(--surface-3); border-color: var(--border-strong);
  color: var(--text-1); text-decoration: none;
}

/* ---------- table ---------- */
.seo-table-wrap { overflow-x: auto; margin-bottom: 48px; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.seo-table caption {
  text-align: left; font-weight: 600; font-size: 1rem; color: var(--text-1);
  padding-bottom: 12px;
}
.seo-table th {
  text-align: left; padding: 10px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  font-weight: 600; color: var(--text-1); font-size: 0.875rem;
}
.seo-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.seo-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.seo-faq { margin-bottom: 48px; }
.seo-faq__heading {
  font-size: 1.375rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 20px; letter-spacing: -0.005em;
}
.seo-faq__item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.seo-faq__item:first-of-type { border-top: 1px solid var(--border); }
.seo-faq__q {
  font-size: 1rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 8px;
}
.seo-faq__a { font-size: 0.9375rem; color: var(--text-2); line-height: 1.6; }

/* ---------- related ---------- */
.seo-related { margin-bottom: 48px; }
.seo-related__heading {
  font-size: 1.375rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 16px; letter-spacing: -0.005em;
}
.seo-related__links { display: flex; flex-wrap: wrap; gap: 10px; }
.seo-related__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  font-size: 0.9375rem; color: var(--text-1); text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.seo-related__link:hover {
  background: var(--surface-3); box-shadow: var(--shadow-md);
  text-decoration: none;
}

/* ---------- pricing note ---------- */
.seo-pricing {
  margin-bottom: 48px;
  padding: 20px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  font-size: 0.9375rem; color: var(--text-2); line-height: 1.55;
}
.seo-pricing a { color: var(--text-1); text-decoration: underline; }

/* ---------- hub pages ---------- */
.seo-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.seo-hub-card {
  display: flex; flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 24px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, background 0.15s;
}
.seo-hub-card:hover {
  background: var(--surface-3); box-shadow: var(--shadow-md); text-decoration: none;
}
.seo-hub-card__title { font-size: 1.0625rem; font-weight: 600; color: var(--text-1); margin-bottom: 6px; }
.seo-hub-card__desc { font-size: 0.875rem; color: var(--text-3); line-height: 1.5; }

/* ---------- finder (no-JS fallback form) ---------- */
.seo-finder {
  margin-bottom: 48px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  padding: 24px;
}
/* the compact finder in the top bar shares the .seo-finder class: it is a single button, not the card above */
/* the big finder (hubs) keeps the card; seo.css gives --big a 40px bottom pad meant for a bare layout */
.seo-finder.seo-finder--big {
  padding: 16px;
}
.seo-finder.seo-finder--compact {
  margin: 0; padding: 0; background: none; border: 0; border-radius: 0;
}
.seo-finder__label {
  display: block; font-size: 1rem; font-weight: 600; color: var(--text-1);
  margin-bottom: 12px;
}
.seo-finder__row { display: flex; gap: 10px; }
.seo-finder__input {
  flex: 1; height: 48px; padding: 0 16px;
  font: inherit; font-size: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border-strong); border-radius: var(--r-2);
  color: var(--text-1);
}
.seo-finder__input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.seo-finder__input::placeholder { color: var(--text-3); }

/* ---------- footer ---------- */
.seo-footer {
  border-top: 1px solid var(--border);
  padding: 32px 16px;
  font-size: 0.8125rem; color: var(--text-3);
  text-align: center;
}
.seo-footer a { color: var(--text-3); }
.seo-footer a:hover { color: var(--text-2); }

/* ---------- 404 ---------- */
.seo-404 {
  max-width: 560px; margin: 80px auto; padding: 0 16px;
  text-align: center;
}
.seo-404__code {
  font-size: 5rem; font-weight: 600; color: var(--surface-4);
  line-height: 1;
}
.seo-404__heading { font-size: 1.5rem; font-weight: 600; margin: 16px 0 12px; color: var(--text-1); }
.seo-404__sub { color: var(--text-2); margin-bottom: 28px; }

/* ---------- OC archetype list (fandom pages) ---------- */
.seo-archetypes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
  margin: 16px 0 0;
}
.seo-archetypes li {
  padding: 16px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-2);
}
.seo-archetypes li strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 4px;
}

/* text examples (ad copy): label over value, one row per field */
.seo-example--text { padding: 18px 20px; text-align: left; }
.seo-example--text .seo-example__caption { margin: 0 0 12px; font-weight: 600; color: var(--text-1); }
.seo-example__row { display: grid; gap: 2px; margin: 0 0 10px; }
.seo-example__k { font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.seo-example__v { font-size: 0.95rem; line-height: 1.45; color: var(--text-1); }
.seo-example video { width: 100%; height: auto; object-fit: contain; background: #000; }
/* a wide example (a 16:9 storyboard sheet) spans the grid at its own shape instead of a square crop */
.seo-example--wide { grid-column: 1 / -1; }
.seo-example--wide img { aspect-ratio: auto; height: auto; object-fit: contain; }

/* ---------- blog (WP2): index cards, article body, table of contents, author box, CTA ---------- */
.seo-content--wide { max-width: 1040px; }
.seo-tagrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.seo-tagrow [aria-current="page"] { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.seo-postgrid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
@media (min-width: 760px) { .seo-postgrid { grid-template-columns: 1fr 1fr; gap: 20px; } }
.seo-postcard {
  display: flex; flex-direction: column; gap: 10px;
  padding: 28px; min-height: 220px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3);
  text-decoration: none; box-shadow: var(--shadow-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.seo-postcard:hover { background: var(--surface-3); box-shadow: var(--shadow-md); text-decoration: none; }
.seo-postcard__tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.seo-postcard__title { font-size: 1.3125rem; font-weight: 600; line-height: 1.3; color: var(--text-1); letter-spacing: -0.005em; }
.seo-postcard__desc { font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); flex: 1; }
.seo-postcard__meta { font-size: 0.8125rem; color: var(--text-3); }
/* blog images (scripts/blog/muse-images.mjs): article hero, index header and card thumbnails, all 1200x630 */
.seo-article__hero, .seo-blog-hero { margin: 0 0 32px; }
.seo-article__hero img, .seo-blog-hero img, .seo-postcard__img img {
  display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; background: var(--surface-2);
}
.seo-article__hero img, .seo-blog-hero img { border-radius: var(--r-3); border: 1px solid var(--border); }
.seo-postcard.seo-postcard--img { padding: 0 0 24px; overflow: hidden; }
.seo-postcard--img > .seo-postcard__tag, .seo-postcard--img > .seo-postcard__title,
.seo-postcard--img > .seo-postcard__desc, .seo-postcard--img > .seo-postcard__meta { padding: 0 28px; }
.seo-postcard__img { display: block; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
@media (max-width: 520px) {
  .seo-postcard.seo-postcard--img { padding: 0 0 20px; }
  .seo-postcard--img > .seo-postcard__tag, .seo-postcard--img > .seo-postcard__title,
  .seo-postcard--img > .seo-postcard__desc, .seo-postcard--img > .seo-postcard__meta { padding: 0 22px; }
}
.seo-blog-feed { font-size: 0.875rem; color: var(--text-3); }
.seo-blog-empty { color: var(--text-2); margin-bottom: 40px; }
.seo-article__meta { margin-top: 20px; font-size: 0.875rem; color: var(--text-3); }
.seo-toc {
  margin-bottom: 48px; padding: 24px 28px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3);
}
.seo-toc__title { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.seo-toc ol { list-style: decimal; padding-left: 1.25em; display: grid; gap: 8px; color: var(--text-3); }
.seo-toc a { color: var(--text-1); text-decoration: none; font-size: 0.9375rem; }
.seo-toc a:hover { text-decoration: underline; }
.seo-article__body { margin-bottom: 56px; font-size: 1.0625rem; line-height: 1.7; color: var(--text-2); }
.seo-article__body > * + * { margin-top: 18px; }
.seo-article__body h2 { font-size: 1.625rem; font-weight: 600; line-height: 1.25; color: var(--text-1); letter-spacing: -0.01em; margin-top: 56px; scroll-margin-top: 80px; }
.seo-article__body h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; color: var(--text-1); margin-top: 36px; scroll-margin-top: 80px; }
.seo-article__body h4 { font-size: 1rem; font-weight: 600; color: var(--text-1); margin-top: 28px; }
.seo-article__body h2 + *, .seo-article__body h3 + *, .seo-article__body h4 + * { margin-top: 12px; }
.seo-article__body strong { color: var(--text-1); font-weight: 600; }
.seo-article__body a { color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.seo-article__body a:hover { text-decoration-color: var(--text-1); }
.seo-article__body ul { list-style: disc; padding-left: 1.3em; }
.seo-article__body ol { list-style: decimal; padding-left: 1.3em; }
.seo-article__body li + li { margin-top: 8px; }
.seo-article__body li::marker { color: var(--text-3); }
.seo-article__body blockquote { padding: 16px 20px; border-left: 3px solid var(--border-strong); background: var(--surface-2); border-radius: 0 var(--r-2) var(--r-2) 0; }
.seo-article__body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.875em; padding: 2px 6px; background: var(--surface-3); border-radius: 6px; color: var(--text-1); }
.seo-article__body pre { overflow-x: auto; padding: 16px; background: var(--surface-3); border-radius: var(--r-2); }
.seo-article__body pre code { padding: 0; background: none; }
.seo-article__body hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.seo-article__body .seo-table-wrap { margin: 24px 0; }
.seo-article__body .seo-table { font-size: 0.9375rem; }
.seo-article__figure { margin: 32px 0; }
.seo-article__figure img { width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--border); }
.seo-article__figure figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--text-3); }
.seo-cta {
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
  margin-bottom: 48px; padding: 32px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-3);
}
.seo-cta__text { font-size: 1.0625rem; line-height: 1.55; color: var(--text-1); max-width: 560px; }
.seo-author { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 48px; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.seo-author__mark {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--ink-text); font-weight: 600; font-size: 1.125rem;
}
.seo-author__name { font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.seo-author__bio { font-size: 0.9375rem; color: var(--text-2); line-height: 1.55; }
.seo-sources { margin-bottom: 48px; }
.seo-sources ul { list-style: disc; padding-left: 1.25em; color: var(--text-2); font-size: 0.9375rem; display: grid; gap: 6px; }
.seo-sources a { color: var(--text-2); word-break: break-word; }
.seo-postlist { display: grid; gap: 10px; }
.seo-postlist__item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-2);
  text-decoration: none; transition: background 0.15s;
}
.seo-postlist__item:hover { background: var(--surface-3); text-decoration: none; }
.seo-postlist__title { font-weight: 600; color: var(--text-1); font-size: 0.9375rem; }
.seo-postlist__meta { flex: none; font-size: 0.8125rem; color: var(--text-3); }
@media (max-width: 520px) {
  .seo-topbar__nav { gap: 2px; }
  .seo-topbar__link { padding: 6px 8px; }
  .seo-postcard { padding: 22px; min-height: 0; }
  .seo-cta { padding: 24px; }
  .seo-postlist__item { flex-direction: column; gap: 4px; }
}
/* phones: the top bar keeps Tools, Blog, the finder and Open Studio (Effects and OC Maker stay in the footer) */
.seo-topbar__link { white-space: nowrap; }
@media (max-width: 640px) {
  .seo-topbar { gap: 8px; padding: 0 12px; }
  .seo-topbar__nav { gap: 2px; min-width: 0; }
  .seo-topbar__nav a[href="/effects"], .seo-topbar__nav a[href="/oc-maker"] { display: none; }
  .seo-topbar__link { padding: 6px 8px; }
  .seo-topbar__nav .btn-ink { padding: 0 12px !important; }
}
.seo-hero--wide { max-width: 1040px; }
/* phones: the header finder shows its search icon only (the label stays as aria-label) */
@media (max-width: 640px) {
  .seo-topbar .seo-finder--compact .seo-finder-trigger { font-size: 0; gap: 0; padding: 0 10px; white-space: nowrap; }
}
.seo-hero__updated { margin-top: 16px; font-size: 0.8125rem; color: var(--text-3); }

/* ---------- phones (WP4): compact top bar with a menu, wrapping breadcrumb, 16 px reading text, examples in two
   columns, tables that scroll in their own box, the widget stacked with full-width actions ---------- */
.seo-menu { display: none; }
/* in-page links (the blog table of contents) land below the sticky top bar */
.seo-page [id] { scroll-margin-top: 72px; }
@media (max-width: 640px) {
  .seo-topbar {
    height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    gap: 4px;
  }
  .seo-topbar__logo { min-height: 44px; }
  /* the section links move into the menu; the finder icon and Open Studio stay */
  .seo-topbar__nav a.seo-topbar__link:not(.btn-ink) { display: none; }
  .seo-topbar__nav .btn-ink { height: 44px !important; }
  .seo-topbar .seo-finder--compact .seo-finder-trigger { min-width: 44px; height: 44px; justify-content: center; }
  .seo-menu { display: block; flex: none; }
  .seo-menu__btn {
    list-style: none; width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: var(--r-2); cursor: pointer; color: var(--text-1);
  }
  .seo-menu__btn::-webkit-details-marker { display: none; }
  .seo-menu__btn::marker { content: ''; }
  .seo-menu__close { display: none; }
  .seo-menu[open] .seo-menu__open { display: none; }
  .seo-menu[open] .seo-menu__close { display: inline; }
  .seo-menu[open] .seo-menu__btn { background: var(--surface-3); }
  .seo-menu__sheet {
    position: fixed; left: 0; right: 0; top: calc(56px + env(safe-area-inset-top)); z-index: 41;
    display: grid; gap: 2px;
    max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px - env(safe-area-inset-top)); overflow-y: auto;
    padding: 8px max(12px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: var(--surface-1); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .seo-menu__sheet a {
    display: flex; align-items: center; min-height: 52px; padding: 0 14px;
    font-size: 1.0625rem; font-weight: 500; color: var(--text-1); text-decoration: none; border-radius: var(--r-2);
  }
  .seo-menu__sheet a:hover { background: var(--surface-3); text-decoration: none; }
  .seo-menu__sheet a[aria-current] { background: var(--surface-3); font-weight: 600; }
  .seo-menu__sheet .seo-menu__studio {
    margin-top: 8px; justify-content: center; font-weight: 600;
    background: var(--ink); color: var(--ink-text);
  }
  .seo-menu__sheet .seo-menu__studio:hover { background: var(--ink-hover); }

  /* the hero: calm and a step smaller; the breadcrumb wraps */
  .seo-hero { padding: 28px 16px 32px; }
  .seo-hero__subhead { font-size: 1.0625rem; }
  .seo-breadcrumb { flex-wrap: wrap; row-gap: 0; margin-bottom: 16px; }
  .seo-breadcrumb a { display: inline-block; padding: 10px 0; }

  /* reading text at 16 px at least */
  .seo-section p, .seo-section li, .seo-faq__a, .seo-how__text, .seo-article__body p, .seo-article__body li,
  .seo-hub-card__desc, .seo-postcard__desc, .seo-author__bio, .seo-cta__text { font-size: max(16px, 1em); }
  .seo-faq__q { font-size: 1.0625rem; line-height: 1.4; }
  .seo-faq__item { padding: 18px 0; }

  /* examples: two columns of pictures; text and audio examples take the row */
  .seo-examples__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .seo-example--text, .seo-example--audio { grid-column: 1 / -1; }
  .seo-hub-grid { grid-template-columns: minmax(0, 1fr); }

  /* tables keep readable columns and scroll inside their own box */
  .seo-table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .seo-table { min-width: 520px; }

  /* the tool widget: one column, the main action full width and 48 px tall */
  .seo-page .seo-widget input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
  .seo-page .seo-widget select,
  .seo-page .seo-widget textarea { font-size: 16px; }
  .seo-page .seo-generate-row { flex-direction: column; align-items: stretch; }
  .seo-page .seo-widget .seo-btn-ink,
  .seo-page .seo-widget .seo-btn-accent,
  .seo-page .seo-widget .seo-btn-outline { width: 100%; min-height: 48px; }
  .seo-page .seo-widget .seo-chip, .seo-page .seo-widget .seo-more-btn { min-height: 44px; }
  .seo-page .seo-related__link, .seo-page .seo-ideas__item { min-height: 44px; display: inline-flex; align-items: center; }

  /* the footer: links big enough to tap */
  .seo-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .seo-footer a { display: inline-block; padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .seo-page *, .seo-page *::before, .seo-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* tablets and touch screens: widget fields at 16 px too (iOS zooms into smaller ones on focus) */
@media (max-width: 1023px), (pointer: coarse) {
  .seo-page .seo-widget input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
  .seo-page .seo-widget select,
  .seo-page .seo-widget textarea { font-size: 16px; }
}

/* ---------- anime scene library (/anime-scenes, shared/seo/scenes/render.js): shots, breakdowns, prompts, cards ---------- */
.seo-shot { margin: 0 0 56px; }
.seo-shot__title { font-size: 1.1875rem; font-weight: 600; line-height: 1.35; color: var(--text-1); margin: 0 0 14px; }
.seo-shot__figure { margin: 0; }
.seo-shot__figure img { display: block; width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--border); background: var(--surface-3); }
.seo-shot__figure figcaption { margin-top: 10px; font-size: 0.8125rem; line-height: 1.5; color: var(--text-3); }
.seo-shot__facts { display: grid; gap: 10px; margin: 20px 0; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3); }
.seo-shot__fact { display: grid; gap: 2px; }
.seo-shot__fact dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.seo-shot__fact dd { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
@media (min-width: 640px) { .seo-shot__fact { grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; } }
.seo-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.seo-palette__chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.seo-palette__dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--border-strong); }
.seo-copybox { margin: 14px 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3); overflow: hidden; }
.seo-copybox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.seo-copybox__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.seo-copybox__copy {
  height: 32px; padding: 0 14px; font: inherit; font-size: 0.8125rem; font-weight: 600;
  color: var(--ink-text); background: var(--ink); border: none; border-radius: var(--r-2); cursor: pointer;
}
.seo-copybox__copy:hover { background: var(--ink-hover); }
.seo-copybox__text { margin: 0; padding: 14px 16px; font: inherit; font-size: 0.9375rem; line-height: 1.6; color: var(--text-1); white-space: pre-wrap; overflow-wrap: anywhere; }
.seo-copybox__hint { margin: 0; padding: 0 16px 14px; font-size: 0.8125rem; line-height: 1.5; color: var(--text-3); }
.seo-shot__next { margin: 4px 0 0; }
.seo-scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.seo-scene-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-3); box-shadow: var(--shadow-sm);
  transition: background 0.15s, box-shadow 0.15s;
}
.seo-scene-card:hover { background: var(--surface-3); box-shadow: var(--shadow-md); text-decoration: none; }
.seo-scene-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); background: var(--surface-3); }
.seo-scene-card__title { padding: 14px 16px 4px; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--text-1); }
.seo-scene-card__line { padding: 0 16px 16px; font-size: 0.875rem; line-height: 1.45; color: var(--text-3); }
.seo-cta__row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) {
  .seo-shot__facts { padding: 16px; }
  .seo-shot__fact dd, .seo-copybox__text { font-size: max(16px, 1em); }
  .seo-cta__row { flex-direction: column; align-items: stretch; width: 100%; }
  .seo-cta__row .btn-ink, .seo-cta__row .btn-outline { white-space: normal; text-align: center; min-height: 48px; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .seo-shot__next .btn-outline { min-height: 44px; }
  .seo-scene-grid { grid-template-columns: minmax(0, 1fr); }
}
