/* pseo.css — programmatic SEO pages (template gallery + per-template pages).
   Loaded only on those pages via the `pageCss` local in partials/head.ejs. */

.pseo-hero,
.pseo-detail {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0;
}

.breadcrumbs { font-size: 0.85rem; color: #64748b; margin-bottom: 1rem; }
.breadcrumbs a { color: #475569; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 0.4rem; color: #cbd5e1; }

.pseo-hero h1,
.pseo-detail-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0.25rem 0 0.75rem; }
.pseo-lede { font-size: 1.1rem; color: #475569; max-width: 60ch; line-height: 1.6; }

.pseo-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.pseo-btn {
  display: inline-block; padding: 0.7rem 1.3rem; border-radius: 8px;
  font-weight: 600; text-decoration: none; font-size: 0.95rem; border: 1px solid transparent;
}
.pseo-btn-primary { background: #4f46e5; color: #fff; }
.pseo-btn-primary:hover { background: #4338ca; }
.pseo-btn-ghost { background: transparent; color: #4f46e5; border-color: #c7d2fe; }
.pseo-btn-ghost:hover { background: #eef2ff; }

/* ---- gallery grid ---- */
.pseo-grid-section { max-width: 1120px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
.pseo-card-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.pseo-card {
  border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.pseo-card:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1); transform: translateY(-2px); }
.pseo-card-link { display: block; text-decoration: none; color: inherit; }
.pseo-card-thumb { background: #f1f5f9; padding: 0.9rem; border-bottom: 1px solid #e2e8f0; }
.pseo-card-thumb .tpl-thumb { max-width: 100%; }
.pseo-card-body { padding: 1rem 1.1rem 1.25rem; }
.pseo-card-cat {
  display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 700; color: #6366f1; background: #eef2ff; padding: 0.2rem 0.55rem; border-radius: 999px;
}
.pseo-card-title { font-size: 1.1rem; margin: 0.6rem 0 0.4rem; }
.pseo-card-desc { font-size: 0.9rem; color: #64748b; line-height: 1.5; margin: 0 0 0.75rem; }
.pseo-card-more { font-size: 0.88rem; font-weight: 600; color: #4f46e5; }

/* ---- per-template page ---- */
.pseo-detail-head { margin-bottom: 1.5rem; }

.pseo-preview { margin: 1rem 0 2.5rem; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #fff; }
.pseo-preview-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc;
}
.pseo-swatches { display: flex; gap: 0.4rem; }
.pseo-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; padding: 0;
}
.pseo-swatch.is-active { box-shadow: 0 0 0 2px #0f172a; }
.pseo-swatch--slate   { background: #475569; }
.pseo-swatch--indigo  { background: #4f46e5; }
.pseo-swatch--emerald { background: #059669; }
.pseo-swatch--rose    { background: #e11d48; }
.pseo-swatch--amber   { background: #d97706; }

.pseo-themes { display: flex; gap: 0.4rem; }
.pseo-pill {
  border: 1px solid #cbd5e1; background: #fff; color: #475569; cursor: pointer;
  padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.82rem; text-transform: capitalize;
}
.pseo-pill.is-active { background: #0f172a; color: #fff; border-color: #0f172a; }

.pseo-frame-wrap { background: #f1f5f9; }
.pseo-frame { display: block; width: 100%; height: 70vh; min-height: 480px; border: 0; background: #fff; }
.pseo-preview-note { font-size: 0.82rem; color: #94a3b8; padding: 0.6rem 1rem; margin: 0; }

.pseo-detail-cols { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr; margin-bottom: 2rem; }
@media (max-width: 760px) { .pseo-detail-cols { grid-template-columns: 1fr; } }
.pseo-detail-main p { font-size: 1.02rem; line-height: 1.7; color: #334155; margin: 0 0 1rem; }
.pseo-detail-main h2, .pseo-detail-aside h2, .pseo-faq h2, .pseo-bottom-cta h2 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }

.pseo-ticks { list-style: none; padding: 0; margin: 0; }
.pseo-ticks li { padding-left: 1.6rem; position: relative; margin-bottom: 0.5rem; color: #334155; line-height: 1.5; }
.pseo-ticks li::before { content: "✓"; position: absolute; left: 0; color: #059669; font-weight: 700; }

.pseo-detail-aside { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.25rem; align-self: start; }
.pseo-detail-aside h2 { margin-top: 0; }
.pseo-sections { margin: 0; padding-left: 1.2rem; }
.pseo-sections li { margin-bottom: 0.7rem; }
.pseo-section-label { display: block; font-weight: 600; color: #1e293b; }
.pseo-section-desc { display: block; font-size: 0.85rem; color: #64748b; line-height: 1.45; }

.pseo-faq { margin: 1rem 0 2.5rem; }
.pseo-faq-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 0.85rem 1.1rem; margin-bottom: 0.6rem; background: #fff; }
.pseo-faq-item summary { cursor: pointer; font-weight: 600; color: #1e293b; }
.pseo-faq-item p { margin: 0.6rem 0 0; color: #475569; line-height: 1.6; }

.pseo-bottom-cta { text-align: center; background: #eef2ff; border-radius: 16px; padding: 2.5rem 1.5rem; margin: 0 0 3rem; }
.pseo-bottom-cta p { color: #475569; margin: 0.5rem 0 1.25rem; }

/* ---- free tools (social-preview checker) ---- */
.tool-form { margin: 1rem 0 1.5rem; }
.tool-label { display: block; font-weight: 600; font-size: 0.9rem; color: #334155; margin-bottom: 0.4rem; }
.tool-input-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tool-input { flex: 1 1 320px; min-width: 0; padding: 0.7rem 0.9rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; }
.tool-input:focus { outline: 2px solid #4f46e5; outline-offset: 1px; border-color: #4f46e5; }
.tool-status { font-size: 0.9rem; color: #64748b; min-height: 1.2em; margin: 0.6rem 0 0; }

.tool-scorebar { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.5rem 0 1.5rem; }
.tool-score { font-size: 1.6rem; font-weight: 800; }
.tool-score.is-good { color: #059669; }
.tool-score.is-ok { color: #d97706; }
.tool-score.is-bad { color: #e11d48; }
.tool-score-label { font-size: 0.85rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.04em; }

.tool-cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 2rem; }
.tool-card { margin: 0; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.tool-card-cap { font-size: 0.75rem; color: #94a3b8; padding: 0.5rem 0.8rem; border-bottom: 1px solid #f1f5f9; }
.tool-card-body--row { display: flex; align-items: stretch; }
.tool-card-img { aspect-ratio: 1200 / 630; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 0.85rem; }
.tool-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-card-img--sq { aspect-ratio: 1 / 1; width: 96px; flex: 0 0 96px; }
.tool-card-img.is-empty { font-style: italic; }
.tool-card-meta { padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.tool-card-domain { font-size: 0.72rem; color: #94a3b8; text-transform: lowercase; }
.tool-card--large .tool-card-domain { text-transform: uppercase; letter-spacing: 0.03em; }
.tool-card-title { font-size: 0.98rem; color: #1e293b; line-height: 1.3; }
.tool-card-desc { font-size: 0.85rem; color: #64748b; line-height: 1.4; }

.tool-issues { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.tool-issue { padding: 0.6rem 0.8rem 0.6rem 2rem; position: relative; border-radius: 8px; margin-bottom: 0.5rem; font-size: 0.9rem; line-height: 1.45; }
.tool-issue::before { position: absolute; left: 0.7rem; font-weight: 700; }
.tool-issue.is-error { background: #fef2f2; color: #991b1b; } .tool-issue.is-error::before { content: "✕"; color: #dc2626; }
.tool-issue.is-warn  { background: #fffbeb; color: #92400e; } .tool-issue.is-warn::before  { content: "!"; color: #d97706; }
.tool-issue.is-info  { background: #f8fafc; color: #475569; } .tool-issue.is-info::before  { content: "i"; color: #64748b; }
.tool-issue.is-good  { background: #f0fdf4; color: #166534; } .tool-issue.is-good::before  { content: "✓"; color: #16a34a; }

.tool-rawtags { font-size: 0.85rem; color: #475569; margin-bottom: 2rem; }
.tool-rawtags summary { cursor: pointer; font-weight: 600; }
.tool-rawtags dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0.75rem 0 0; }
.tool-rawtags dt { font-family: ui-monospace, monospace; color: #6366f1; }
.tool-rawtags dd { margin: 0; color: #334155; word-break: break-word; }
