/* Search landing pages (scripts/seo_pages.py): editorial, hairline rows, one red.
   Built on the site's tokens, buttons and section headings; nothing here needs the main bundle. */

.seo-hero {
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 7rem));
  padding-bottom: var(--space-block);
}

.seo-hero__title {
  display: block;
  margin-top: 0.5rem;
  max-width: 14ch;
  font-size: var(--fs-d1);
}

.seo-hero__lead {
  max-width: 40rem;
  margin-top: 1.5rem;
  text-wrap: pretty;
}

.seo-actions {
  display: grid;
  gap: 0.5rem;
  max-width: 28rem;
  margin-top: 2rem;
}

.seo-section {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: clamp(3rem, 7vw, 6rem);
  border-top: var(--border);
}

.seo-section .section-heading__title {
  font-size: var(--fs-h1);
}

.seo-body {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.seo-body > p {
  max-width: 40rem;
  text-wrap: pretty;
}

/* Numbered hairline rows */
.seo-list {
  list-style: none;
  border-top: var(--border);
}

.seo-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding-block: 1.25rem;
  border-bottom: var(--border);
}

.seo-list li .muted {
  grid-column: 2;
}

.seo-list__title {
  font-size: var(--fs-lead);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Comparison table */
.seo-table-wrap {
  overflow-x: auto;
}

.seo-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
}

.seo-table th,
.seo-table td {
  padding: 1rem 1rem 1rem 0;
  border-bottom: var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 1rem;
}

.seo-table thead th {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  text-transform: uppercase;
}

.seo-table tbody th {
  width: 22%;
  font-weight: 700;
}

.seo-table td {
  color: var(--c-text-muted);
}

/* Questions: native details, so it works without JavaScript */
.seo-faq {
  grid-column: 1 / -1;
  max-width: 48rem;
}

.seo-faq__item {
  border-bottom: var(--border);
}

.seo-faq__item summary {
  padding-block: 1.25rem;
  font-size: var(--fs-lead);
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  list-style: none;
}

.seo-faq__item summary::-webkit-details-marker {
  display: none;
}

.seo-faq__item summary::after {
  content: '+';
  float: right;
  color: var(--c-accent);
}

.seo-faq__item[open] summary::after {
  content: '\2212';
}

.seo-faq__item summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.seo-faq__item p {
  padding-bottom: 1.25rem;
  max-width: 40rem;
}

/* The FAQ and tools sit under their heading, not beside it */
.seo-section:has(.seo-faq),
.seo-section:has(.seo-tools) {
  grid-template-columns: minmax(0, 1fr);
}

.seo-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.seo-tool {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: 1.5rem;
  background: var(--c-surface);
  transition: background-color var(--dur-base) ease;
}

.seo-tool__title {
  font-size: var(--fs-lead);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.seo-tool__go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: var(--border);
  font-weight: 700;
}

.seo-tool__arrow {
  width: 1rem;
  height: 1rem;
  color: var(--c-accent);
  transition: transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .seo-tool:hover {
    background: var(--c-surface-2);
  }

  .seo-tool:hover .seo-tool__arrow {
    transform: translate(3px, -3px);
  }
}

@media (max-width: 900px) {
  .seo-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .seo-tools {
    grid-template-columns: minmax(0, 1fr);
  }
}
