/* ============================================================
   Croptia — páginas públicas (fichas, calendario, herramientas)
   Se apoya en landing.css (tokens, botones, logo y pie).
   Mismo sistema «cuaderno de campo»: hojas blancas con líneas
   finas, sin mayúsculas en etiquetas ni bordes de color.
   ============================================================ */

:root { --measure: 720px; }

body.seo { background: var(--paper); }
.seo-main a { color: var(--forest); }
.seo main a:not(.btn):not(.seo-card) { text-decoration: underline; text-decoration-color: rgba(46,125,50,.35); text-underline-offset: 2px; }
.seo main a:not(.btn):not(.seo-card):hover { text-decoration-color: currentColor; }

/* ---------- Cabecera ---------- */
.seo-header { background: rgba(247, 248, 245, .96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.seo-header__inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap;
}
.seo-logo { display: inline-flex; min-height: 44px; align-items: center; }
.seo-logo .logo { font-size: 28px; }
.seo-header__cta { order: 3; }
.seo-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; margin-left: auto; order: 2; }
.seo .seo-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--stone); font-size: 15px; font-weight: 500; text-decoration: none; }
.seo .seo-nav a:hover, .seo .seo-nav a.is-active { color: var(--ink); }
.seo .seo-nav a.is-active { box-shadow: inset 0 -2px 0 var(--leaf); }

/* ---------- Estructura ---------- */
.seo-main { max-width: 1120px; margin: 0 auto; padding: 20px 24px 64px; }
.seo-article { max-width: 960px; }
.seo-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; font-size: 14px; color: var(--stone); margin-bottom: 20px; }
.seo-crumbs li + li::before { content: '/'; margin-right: 4px; color: #b5bab0; }
.seo-crumbs a { color: var(--stone) !important; }

.seo-hero { margin-bottom: 28px; }
.seo-kicker { font-size: 15px; font-weight: 600; color: var(--soil); margin-bottom: 6px; }
.seo h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; color: var(--ink); margin-bottom: 14px; overflow-wrap: anywhere; }
.seo h2 { font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.seo h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 20px 0 8px; }
.seo-answer { font-size: 19px; line-height: 1.45; font-weight: 500; color: var(--ink); max-width: var(--measure); margin-bottom: 14px; }
.seo-h2-big { font-size: 28px !important; margin-top: 40px !important; }
.seo-lead { font-size: 17px; color: #3c4338; max-width: var(--measure); }
.seo p, .seo li { max-width: var(--measure); }
.seo-section { margin: 40px 0; }
.seo-section > p + p { margin-top: 10px; }
.seo-note { margin-top: 12px; font-size: 15px; color: var(--stone); }
.seo-small { margin-top: 10px; font-size: 14px; color: var(--stone); }
.seo-muted { color: #9aa095; }
.seo-count { font-size: 14px; font-weight: 500; color: var(--stone); margin-left: 4px; font-variant-numeric: tabular-nums; }

.seo-list { padding-left: 1.2em; list-style: disc; }
ol.seo-list { list-style: decimal; }
.seo-list li { margin: 8px 0; }
.seo-product { font-weight: 600; color: var(--soil); }

/* ---------- Ficha técnica ---------- */
.seo-facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin: 8px 0 12px;
}
.seo-facts div { padding: 12px 16px; box-shadow: 1px 1px 0 var(--line); }
.seo-facts dt { font-size: 13px; color: var(--stone); }
.seo-facts dd { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- Tablas ---------- */
.seo-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
.seo-table { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); font-size: 15px; font-variant-numeric: tabular-nums; }
.seo-table caption { caption-side: top; text-align: left; font-size: 14px; color: var(--stone); padding: 0 0 8px; }
.seo-table th, .seo-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.seo-table tr:last-child th, .seo-table tr:last-child td { border-bottom: 0; }
.seo-table thead th { color: var(--stone); font-size: 13px; font-weight: 600; }
.seo-table tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.seo-table tbody th small { font-weight: 400; color: var(--stone); }
.seo-table tr.is-ref, .seo-table tr.is-now { background: var(--leaf-wash); }
.seo-table--compact { width: auto; min-width: 280px; }
.seo-table--compact td { text-align: center; font-weight: 600; }
.seo-table--months td { min-width: 150px; }
.seo-table--et0 th, .seo-table--et0 td { padding: 8px 6px; text-align: center; }
.seo-table--et0 tbody th { text-align: left; padding-left: 12px; }

/* ---------- Bloques ---------- */
.seo-example { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin: 16px 0; }
.seo-example__title { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.seo-example ul { padding-left: 1.2em; list-style: disc; margin: 8px 0; }
.seo-legal { background: #fbf6ec; border: 1px solid #ecdcc0; border-radius: var(--radius); padding: 12px 14px; font-size: 15px; margin-bottom: 12px; }
.seo-warning { background: #fdf1ec; border: 1px solid #f1c9b6; color: #7a2d12; border-radius: var(--radius); padding: 10px 14px; font-size: 15px; margin-top: 10px; }
.seo-now { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin: 8px 0 28px; }
.seo-now ul { list-style: none; }
.seo-now li { margin: 8px 0; }

.seo-faq h3 { margin-top: 24px; }
.seo-faq p { color: #3c4338; }

.seo-cta { background: var(--leaf-wash); border-radius: var(--radius-lg); padding: 24px; margin: 40px 0; }
.seo-cta p { color: #3c4338; margin-bottom: 16px; }
.seo-cta .seo-cta__title { font-size: 20px; font-weight: 700; color: var(--forest); margin-bottom: 6px; }
.seo .seo-cta .btn { white-space: normal; text-align: center; }

.seo-related ul, .seo-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.seo-related li a, .seo-chips li a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none !important; background: var(--sheet); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 15px; }
.seo-related li a:hover, .seo-chips li a:hover { border-color: var(--leaf); }
.seo-chips small { color: var(--stone); }
.seo-related { margin: 32px 0; }

.seo-zones { list-style: none; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.seo-zones li { padding: 12px 16px; font-size: 15px; border-bottom: 1px solid var(--line); }
.seo-zones li:last-child { border-bottom: 0; }
.seo-pill { font-size: 14px; font-weight: 500; color: var(--stone); font-variant-numeric: tabular-nums; }
.seo-bands { list-style: none; margin: 8px 0 12px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.seo-bands li { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.seo-bands li:last-child { border-bottom: 0; }
.seo-bands li.is-now { background: var(--leaf-wash); }

.seo-sources { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 32px; }
.seo-sources h2 { font-size: 17px; }
.seo-sources ul { list-style: none; font-size: 14px; }
.seo-sources li { overflow-wrap: anywhere; margin: 4px 0; }

/* ---------- Índices: listas, no rejillas de tarjetas ---------- */
.seo-cards, .seo-tools { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 32px; border-top: 1px solid var(--line); }
.seo-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); height: 100%; color: var(--ink) !important; }
.seo-card:hover strong { color: var(--forest); }
.seo-card__emoji { font-size: 24px; line-height: 1.2; }
.seo-card strong { display: block; color: var(--ink); font-weight: 600; }
.seo-card small { display: block; color: var(--stone); font-size: 14px; line-height: 1.4; margin-top: 2px; }
.seo-card--tool { padding: 16px 0; }
.seo-card--tool strong { font-size: 18px; margin-bottom: 4px; }

/* ---------- Herramientas ---------- */
.seo-tool { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin: 8px 0 24px; }
.seo-tool__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.seo-tool label { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; color: #3c4338; }
.seo-tool label[hidden] { display: none; }
.seo-tool input, .seo-tool select { font: inherit; font-weight: 400; font-size: 16px; min-height: 44px; padding: 9px 10px; border: 1px solid #cfd4c9; border-radius: var(--radius); background: #fff; width: 100%; min-width: 0; }
.seo-tool input:focus, .seo-tool select:focus { outline: 2px solid var(--leaf); outline-offset: 1px; border-color: transparent; }
.seo-tool__result { display: block; margin-top: 18px; }
.seo-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border-top: 1px solid var(--line); column-gap: 20px; }
.seo-results div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.seo-results b { display: block; font-size: 24px; color: var(--forest); line-height: 1.2; font-variant-numeric: tabular-nums; }
.seo-results span { font-size: 14px; color: #3c4338; }
.seo-tool__explain { margin-top: 10px; font-size: 14px; color: var(--stone); }

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
  .seo-header__inner { padding: 6px 16px; }
  .seo-logo .logo { font-size: 26px; }
  .seo-header__cta { order: 2; margin-left: auto; }
  .seo-nav { order: 3; width: calc(100% + 16px); margin: 0 -8px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
  .seo .seo-nav a { font-size: 14px; padding: 0 8px; }
  .seo-main { padding: 16px 16px 48px; }
  .seo-answer { font-size: 17px; }
  .seo-lead { font-size: 16px; }
  .seo-section { margin: 32px 0; }
  .seo-cta { padding: 20px 18px; }
  .seo-cta .btn { width: 100%; }
  .seo-tool { padding: 16px; }

  /* Tablas apiladas: cada fila es un bloque y cada celda lleva su etiqueta */
  .seo-table--stack, .seo-table--stack tbody, .seo-table--stack tr, .seo-table--stack th, .seo-table--stack td { display: block; width: 100%; }
  .seo-table--stack { background: transparent; border: 0; }
  .seo-table--stack caption { display: block; width: 100%; }
  .seo-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .seo-table--stack tr { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
  .seo-table--stack tbody th { white-space: normal; }
  .seo-table--stack td { border-bottom: 1px solid var(--line) !important; min-width: 0 !important; }
  .seo-table--stack td:last-child { border-bottom: 0 !important; }
  .seo-table--stack td::before { content: attr(data-label); display: block; font-size: 13px; color: var(--stone); margin-bottom: 2px; }
  .seo-table--stack tr.is-ref, .seo-table--stack tr.is-now { border-color: var(--leaf); background: var(--sheet); }
}

/* Guías de primeros pasos: lectura, herramientas y una hoja para llevar a la finca. */
.seo [hidden] { display: none !important; }
.seo-editorial { max-width: 680px; font-size: 13px; color: var(--stone); margin: 16px 0; line-height: 1.6; }
.seo-toc { max-width: var(--measure); padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--sheet); margin: 28px 0 36px; }
.seo-toc h2 { font-size: 17px; margin-bottom: 10px; }
.seo-toc ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; }
.seo-toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.seo-guide-list { display: block; max-width: 800px; list-style: none; border-top: 1px solid var(--line); }
.seo-guide-list li { max-width: none; border-bottom: 1px solid var(--line); }
.seo .seo-guide-list a { display: block; padding: 24px 0; text-decoration: none !important; }
.seo-guide-list h2 { font-size: 22px; color: var(--forest); margin: 0 0 8px; }
.seo-guide-list a:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.seo-guide-list p { color: var(--stone); }
.seo-checklist { max-width: var(--measure); margin: 16px 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; list-style: none; }
.seo-checklist li { border-bottom: 1px solid var(--line); padding: 0 16px; }
.seo-checklist li:last-child { border: 0; }
.seo-checklist label { display: flex; gap: 12px; align-items: flex-start; min-height: 52px; padding: 14px 0; cursor: pointer; font-size: 15px; }
.seo-checklist input { appearance: auto; accent-color: var(--leaf); flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }
.seo-tool input[aria-invalid="true"] { border-color: var(--heat); outline: 1px solid var(--heat); }
.seo-tool__result.has-excess .seo-results b { color: var(--heat); }
.seo-tool .seo-small { font-size: 12px; font-weight: 400; margin-top: 0; }
.seo-related li a, .seo-chips li a { min-height: 44px; }
.seo-guide .seo-section > p { margin-bottom: 12px; }
.seo-guide .seo-sources p { color: var(--stone); font-size: 14px; }
@media (max-width: 720px) {
  .seo-toc { padding: 16px 20px; }
  .seo-toc ol { grid-template-columns: 1fr; gap: 0; }
  .seo-main { scroll-margin-top: 120px; }
  .seo-section[id] { scroll-margin-top: 120px; }
}
@media print {
  .seo { background: #fff; color: #000; font-size: 11pt; }
  .seo-header, .seo .footer, .seo .seo-cta, .seo .seo-related, .seo .seo-crumbs, .seo .seo-print, .seo .skip { display: none !important; }
  .seo-main { max-width: none; padding: 0; }
  .seo h1 { font-size: 25pt; }
  .seo h2 { font-size: 16pt; }
  .seo h3 { font-size: 12pt; }
  .seo-section { margin: 22px 0; }
  .seo p, .seo li { max-width: none; }
  .seo .seo-toc { display: none; }
  .seo-checklist li, .seo-table tr { break-inside: avoid; }
  .seo-tool, .seo-checklist { border-radius: 0; }
  .seo .seo-tool input, .seo .seo-tool select { border-color: #aaa; color: #000; }
  .seo .seo-table-wrap { overflow: visible; }
}
/* La regla de enlaces del contenido no debe quitar el contraste al CTA. */
.seo-main a.btn--primary { color: #fff; }
.seo-muted { color: var(--stone); }
