/* Styles for the static SEO pages (prompt pages, hubs, guide) and the homepage explore/FAQ blocks.
   Uses the design tokens from style.css, so light and dark themes follow automatically. */

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 1000;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.seo-main { padding: 28px 0 72px; }
.seo-container { max-width: 1080px; }
.seo-page .seo-head, .seo-page .seo-section > p, .seo-page .seo-section > ul, .seo-page .seo-section > ol,
.seo-page .seo-section > .faq, .seo-page .prompt-box, .seo-page .pro-tip, .seo-page .facts, .seo-page .compare { max-width: 780px; }
.seo-page .seo-fig, .seo-page .pgrid, .seo-page .linklist-wide { max-width: none; }

/* Breadcrumbs */
.crumbs { margin: 4px 0 20px; font-size: 14px; color: var(--ink-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--outline-strong); }
.crumbs a { color: var(--ink-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-primary); }

/* Heading block */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; }
.seo-h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 16px; color: var(--ink-primary); }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-secondary); margin: 0 0 14px; }
.lede a { color: var(--accent-ink); }
.updated { font-size: 14px; color: var(--ink-muted); margin: 6px 0 0; }
.muted { color: var(--ink-muted); font-size: .9em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.chip { display: inline-block; padding: 5px 12px; border-radius: var(--radius-full); background: var(--accent-light); color: var(--accent-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.chip:hover { background: var(--accent); color: var(--on-accent); }
.chip-topic { background: var(--bg-band); color: var(--ink-secondary); border: 1px solid var(--border-line); }

/* Sections */
.seo-section { margin: 40px 0 0; }
.seo-section h2, .seo-explore h3 { font-family: var(--font-display); letter-spacing: -.01em; }
.seo-section h2 { font-size: 26px; line-height: 1.2; margin: 0 0 14px; color: var(--ink-primary); }
.seo-section h2 a { color: inherit; text-decoration: none; }
.seo-section h2 a:hover { color: var(--accent-ink); }
.seo-section h2 .count { font-size: 15px; font-weight: 600; color: var(--ink-muted); margin-left: 6px; }
.seo-section p, .seo-section li { font-size: 16.5px; line-height: 1.7; color: var(--ink-secondary); }
.seo-section a { color: var(--accent-ink); }
/* Links inside running text must be distinguishable without relying on colour alone (WCAG 1.4.1). */
.seo-section p a, .lede a { text-decoration: underline; text-underline-offset: 2px; }
.seo-section code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-band); padding: 2px 6px; border-radius: 6px; }
.more { margin: 16px 0 0; font-weight: 600; }
.more a { color: var(--accent-ink); text-decoration: none; }
.more a:hover { text-decoration: underline; }

/* Hero figure */
.seo-fig { margin: 28px 0 0; }
.seo-fig img { display: block; width: 100%; max-width: 780px; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-line); box-shadow: var(--shadow-hard); background: var(--bg-band); }
.seo-fig figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-muted); }

/* Prompt box */
.prompt-box { background: var(--term-bg); color: var(--term-text); border: 1px solid var(--term-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-hard); }
.prompt-text { margin: 0; padding: 22px 22px 18px; white-space: pre-wrap; word-wrap: break-word; font-family: var(--font-mono); font-size: 14.5px; line-height: 1.7; color: var(--term-text); max-height: 520px; overflow: auto; }
.prompt-text:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.prompt-text mark.var { background: rgba(255, 224, 102, .2); color: #FFE066; border-radius: 4px; padding: 0 3px; }
.prompt-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 18px; background: var(--term-surface); border-top: 1px solid var(--term-border); }
.prompt-actions .btn-secondary { background: transparent; color: var(--term-text); border-color: var(--term-border); }
.prompt-actions .btn-secondary:hover { border-color: var(--term-text-dim); }
.pro-tip { margin: 16px 0 0; padding: 14px 18px; border-radius: var(--radius-md); background: var(--accent-light); color: var(--ink-primary); font-size: 16px; line-height: 1.6; }

/* Steps, facts, bullets */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 12px 48px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.bullets { padding-left: 22px; }
.bullets li { margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 14px 16px; }
.facts dt { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15.5px; color: var(--ink-primary); line-height: 1.5; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 17px; color: var(--ink-primary); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--accent-ink); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }

/* Card grid */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow-hard-sm); transition: box-shadow .15s, transform .15s, border-color .15s; }
.pcard:hover { box-shadow: var(--shadow-hard-lg); transform: translateY(-2px); border-color: var(--outline); }
.pcard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard-img { display: block; aspect-ratio: 4 / 3; background: var(--bg-band); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-noimg { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent-light), var(--bg-band)); }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.pcard-cat { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.pcard-title { font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--ink-primary); }
.pcard-tools { font-size: 13px; color: var(--ink-muted); }

/* Link lists */
.linklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.linklist a { color: var(--accent-ink); text-decoration: none; font-size: 16px; }
.linklist a:hover { text-decoration: underline; }
.linklist-wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* Guide */
.table-wrap { overflow-x: auto; margin: 16px 0 0; }
.seo-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.seo-table th, .seo-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border-line); vertical-align: top; color: var(--ink-secondary); }
.seo-table th { font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare > div { background: var(--bg-card); border: 1px solid var(--border-line); border-radius: var(--radius-md); padding: 16px 18px; }
.compare h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.compare-bad { border-left: 4px solid var(--cat-text-accent) !important; }
.compare-good { border-left: 4px solid var(--success) !important; }
.mini-prompt { margin: 0 0 10px; white-space: pre-wrap; font-family: var(--font-mono); font-size: 14px; line-height: 1.6; color: var(--ink-primary); }
.compare p { font-size: 15px; margin: 0; }

/* Footer link columns */
.seo-foot-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin-top: 24px; width: 100%; }
.seo-foot-links strong { display: block; margin-bottom: 10px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); }
.seo-foot-links a { display: block; padding: 3px 0; font-size: 15px; color: var(--ink-secondary); text-decoration: none; }
.seo-foot-links a:hover { color: var(--accent-ink); text-decoration: underline; }
.seo-page .footer-inner { flex-wrap: wrap; }

/* Homepage blocks */
.seo-explore, .seo-faq { padding: 64px 0; }
.seo-explore { background: var(--bg-band); }
.explore-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 28px; }
.seo-explore h3 { font-size: 16px; margin: 0 0 12px; color: var(--ink-primary); }
.seo-explore .more { margin-top: 28px; }
.seo-explore .more a, .seo-faq .faq summary { font-size: 16px; }
.seo-faq .faq { margin-top: 24px; max-width: 820px; }

@media (max-width: 900px) { .explore-cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .explore-cols { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .seo-main { padding-top: 16px; }
  .lede { font-size: 17px; }
  .prompt-text { font-size: 13.5px; padding: 16px; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .pcard, .skip-link { transition: none; } .pcard:hover { transform: none; } }

/* Legal pages and footer notices */
.legal { max-width: 780px; }
.legal .seo-section { margin-top: 28px; }
.legal .seo-section h2 { font-size: 21px; }
.todo { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--highlighter-bg); color: var(--ink-primary); border: 1px dashed var(--highlighter-border); }
.footer-legal { margin: 10px 0 0; font-size: 14px; color: var(--ink-muted); }
.footer-legal a { color: var(--ink-secondary); text-decoration: none; }
.footer-legal a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-disclaimer { margin: 8px 0 0; max-width: 62ch; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }

.legal .seo-section p { margin: 0 0 12px; }
