/* SEO template pages (/templates...). Uses the tokens and form cards from lab.css. */
.tp-page { background: var(--canvas, var(--bg)); height: auto; min-height: 100%; overflow-y: auto; }
.tp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Top bar */
.tp-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 10px 20px;
  background: color-mix(in srgb, var(--canvas, var(--bg)) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); }
.tp-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); text-decoration: none; }
.tp-brand img { border-radius: 7px; }
.tp-top-link { margin-inline-start: auto; color: var(--text-muted); text-decoration: none; font-size: var(--fs-sm); }
.tp-top-link:hover { color: var(--text); }
.tp-top-cta { text-decoration: none; padding: 7px 14px; font-size: var(--fs-sm); }

.tp-main { max-width: 860px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.tp-main a.btn { text-decoration: none; }

/* Breadcrumbs */
.tp-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.tp-crumbs li + li::before { content: '›'; margin-inline-end: 6px; }
.tp-crumbs a { color: inherit; }
.tp-crumbs [aria-current] { color: var(--text); }

/* Hero */
.tp-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tp-hero h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.tp-intro { margin: 0; font-size: 17px; color: var(--text-muted); max-width: 640px; line-height: 1.6; }
.tp-count { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.tp-cta { padding: 12px 22px; font-size: 16px; font-weight: 600; border-radius: 999px; margin-top: 6px; }

/* The inert form preview */
.tp-preview { position: relative; background: var(--sunken, var(--surface)); border: 1px solid var(--border); border-radius: var(--r-lg, 16px);
  padding: 34px 16px 16px; }
.tp-preview-tag { position: absolute; top: 10px; inset-inline-start: 16px; font-size: var(--fs-xs); color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; }
.tp-sheet { border: 0; padding: 0; margin: 0 auto; min-width: 0; pointer-events: none; user-select: none; }
.tp-sheet .tp-form-title { margin: 0; font-size: 22px; font-weight: 600; }
.tp-sheet .f-section h4 { margin: 0; font-size: 18px; font-weight: 600; }
.tp-sheet .f-input { background: transparent; }
.tp-sheet .f-input:disabled, .tp-sheet .f-option input:disabled { opacity: 1; cursor: default; }
.tp-sheet select.f-input { appearance: none; color: var(--text-muted); }
.tp-sheet .tp-short { max-width: 260px; }
.tp-sheet .tp-area { min-height: 56px; resize: none; }
.tp-opts-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tp-opts-list li { font-size: var(--fs-xs); color: var(--text-muted); background: var(--sunken, var(--canvas)); border-radius: 999px; padding: 3px 10px; }
.tp-stars { color: var(--border-strong, var(--border)); }
.tp-stars svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.tp-drop { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--border-strong, var(--border));
  border-radius: var(--r-md); padding: 16px; color: var(--text-muted); font-size: var(--fs-sm); }
.tp-drop svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tp-sign { height: 70px; }
.tp-consent { align-items: flex-start; }
.tp-consent .star { color: var(--danger); margin-inline-start: 3px; }
.tp-fake-submit { pointer-events: none; }
.tp-preview-note { margin: 12px 4px 0; font-size: var(--fs-xs); color: var(--text-muted); text-align: center; }

.tp-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tp-cta-row p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.tp-cta-row .tp-cta { margin: 0; }

/* Text blocks */
.tp-block h2 { margin: 0 0 10px; font-size: 22px; font-weight: 600; }
.tp-block p { margin: 0 0 10px; line-height: 1.7; }
.tp-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.tp-tags li { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 5px 14px; font-size: var(--fs-sm); font-weight: 500; }
.tp-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tp-steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; }
.tp-steps li::before { content: counter(step); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink, #fff); font-weight: 600; font-size: var(--fs-sm); margin-bottom: 6px; }
.tp-steps span { color: var(--text-muted); font-size: var(--fs-sm); }
.tp-faq { display: flex; flex-direction: column; gap: 8px; }
.tp-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
.tp-faq summary { cursor: pointer; font-weight: 500; }
.tp-faq details p { margin: 8px 0 0; color: var(--text-muted); }
.tp-more { margin: 10px 0 0 !important; font-size: var(--fs-sm); }
.tp-more a { color: var(--accent); }

/* Cards and categories */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tp-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px; color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tp-card h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.tp-card p { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.55; flex: 1; }
.tp-card-cat { font-size: var(--fs-xs); color: var(--accent); font-weight: 500; }
.tp-card-meta { font-size: var(--fs-xs); color: var(--text-muted); }
@media (hover: hover) { .tp-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0,0,0,.06); } }
.tp-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tp-chip { flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: var(--fs-sm); white-space: nowrap; }
.tp-chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
@media (hover: hover) { a.tp-chip:hover { border-color: var(--accent); } }
.tp-cat-head { margin-bottom: 10px; }
.tp-cat-head h2 { margin: 0 0 4px; }
.tp-cat-head h2 a { color: inherit; text-decoration: none; }
.tp-cat-head p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); }

.tp-bottom { text-align: center; background: var(--accent-soft); border-radius: var(--r-lg, 16px); padding: 28px 20px; }
.tp-bottom h2 { margin: 0 0 6px; font-size: 22px; }
.tp-bottom p { margin: 0 0 8px; color: var(--text-muted); }

.tp-foot { text-align: center; padding: 20px 16px 32px; font-size: var(--fs-xs); color: var(--text-muted); }
.tp-foot a { color: inherit; }

@media (max-width: 600px) {
  .tp-top { padding: 8px 12px; gap: 10px; }
  .tp-brand span { display: none; }
  .tp-main { padding: 14px 16px 32px; gap: 18px; }
  .tp-preview { padding: 32px 8px 10px; }
  .tp-cta { width: 100%; text-align: center; }
  .tp-cta-row { flex-direction: column; align-items: stretch; text-align: center; }
}
.tp-grid-cat .tp-card-cat { display: none; } /* the page is about that category already */
