/* SigatokAlert — Hoja de estilo principal
   Paleta derivada del subject:
   - Verde hoja de banano oscura (#1F3D2B)
   - Beige papel agronómico (#FAF5EB)
   - Marrón-negro de la lesión de Sigatoka (#3A2418)
   - Tierra de El Oro / banano maduro (#C8841C)
   - Rojo crítico (#B33A1E)
*/

:root {
  /* Fondo más limpio y fresco — menos "beige IA", más pro */
  --bg: #F7F9F6;
  --paper: #FFFFFF;
  --paper-warm: #EEF3EC;
  --rule: #DBE4D8;
  --ink: #14261C;
  --ink-soft: #3F4E44;
  --ink-muted: #6E7C72;

  /* Verde institucional UTMACH — más profundo y saturado */
  --leaf: #0E4D2A;
  --leaf-soft: #1B6E42;
  --leaf-bright: #2E9D5B;
  --leaf-hair: rgba(14, 77, 42, 0.10);

  /* Azul marino institucional UTMACH como acento secundario */
  --navy: #123A5E;
  --navy-soft: #1E5687;

  --sigatoka: #3A2418;
  --oro: #C8841C;
  --oro-soft: #E8C547;

  /* Escala de riesgo — más saturada para destacar sobre fondo claro,
     con borde/sombra para que nunca se pierda */
  --risk-vlow:  #3E8E41;
  --risk-low:   #7FA02C;
  --risk-mid:   #E0A020;
  --risk-high:  #DD5A1E;
  --risk-crit:  #B01E1E;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Menlo', monospace;

  --w-max: 1200px;
  --pad-h: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--leaf); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ============================================================
   HEADER
   ============================================================ */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.masthead__inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 16px var(--pad-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--leaf);
}

.brand:hover { text-decoration: none; }

.brand__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 2px;
}

.primary-nav {
  display: flex;
  gap: 28px;
}

.primary-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14.5px;
}

.primary-nav a:hover {
  color: var(--leaf);
  text-decoration: none;
}

@media (max-width: 720px) {
  .primary-nav { gap: 14px; font-size: 13px; }
  .primary-nav a { font-size: 13px; }
  .brand__sub { display: none; }
}

/* ============================================================
   GENERIC TYPOGRAPHY & SECTION HEADS
   ============================================================ */

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 12px 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 32px 0;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin: 0 0 16px 0;
}

.page-lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 100px) var(--pad-h) clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leaf);
  margin: 0 0 24px 0;
}

.hero__eyebrow em {
  font-style: italic;
  color: var(--ink-muted);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: var(--ink);
  margin: 0 0 28px 0;
}

.hero__highlight {
  font-style: italic;
  font-weight: 500;
  color: var(--leaf);
  position: relative;
}

.hero__highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  background: var(--oro-soft);
  opacity: 0.55;
  z-index: -1;
  border-radius: 2px;
}

.hero__lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 0 36px 0;
  line-height: 1.55;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
  text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn--primary {
  background: var(--leaf);
  color: var(--bg);
}

.btn--primary:hover { background: var(--leaf-soft); }

.btn--primary:disabled {
  background: var(--ink-muted);
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  background: transparent;
  color: var(--leaf);
  border: 1px solid var(--leaf);
}

.btn--ghost:hover { background: var(--leaf); color: var(--bg); }

/* Hero panel - signature element */

.hero__panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 28px;
  font-family: var(--font-mono);
  box-shadow: 0 8px 30px rgba(14, 77, 42, 0.08);
}

.hero__packy {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 120px;
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(14, 38, 28, 0.22));
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero__packy { width: 92px; bottom: -20px; right: -10px; }
}

.panel__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 20px 0;
}

.panel__rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel__row {
  display: grid;
  grid-template-columns: 90px 1fr 42px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.panel__canton {
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
}

.panel__bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.panel__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--risk-mid);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}

.panel__value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.panel__foot {
  margin: 24px 0 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ============================================================
   PROBLEM
   ============================================================ */

.problem {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.problem__inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--pad-h);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}

.stat {
  padding: 32px 24px 28px 0;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.stat:last-child { border-right: none; }

@media (max-width: 720px) {
  .stat { border-right: none; padding-right: 0; }
}

.stat__number {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 52px);
  letter-spacing: -0.02em;
  color: var(--leaf);
  margin: 0 0 12px 0;
  line-height: 1;
}

.stat__label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 14px 0;
}

.stat__source {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin: 0;
}

/* ============================================================
   HOW
   ============================================================ */

.how__inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: clamp(60px, 8vw, 100px) var(--pad-h);
}

.how__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 720px) {
  .how__cols { grid-template-columns: 1fr; gap: 32px; }
}

.how__col {
  padding-top: 24px;
  border-top: 2px solid var(--leaf);
}

.how__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--leaf);
  margin: 0 0 12px 0;
}

.how__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin: 0 0 16px 0;
  color: var(--ink);
}

.how__body {
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0 0 16px 0;
}

.how__detail {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--paper);
  padding: 12px 14px;
  margin: 0;
  line-height: 1.5;
  border-left: 2px solid var(--oro);
}

/* ============================================================
   FOOTER
   ============================================================ */

.page-footer {
  margin-top: 60px;
  background: linear-gradient(135deg, var(--leaf) 0%, #0A3D20 60%, var(--navy) 100%);
  color: rgba(255, 255, 255, 0.75);
}

.page-footer__inner {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 40px var(--pad-h);
}

.page-footer__brand {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
}

.page-footer__packy {
  width: 88px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.page-footer__slogan {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  line-height: 1.15;
}

.page-footer__slogan strong {
  color: var(--oro-soft);
  font-weight: 600;
}

.page-footer__uni {
  font-size: 13px;
  letter-spacing: 0.04em;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

.page-footer__rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0 0 16px 0;
}

.page-footer__small {
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  max-width: 640px;
}

@media (max-width: 560px) {
  .page-footer__brand { flex-direction: column; text-align: center; gap: 14px; }
  .page-footer__slogan { font-size: 22px; }
}

/* ============================================================
   RIESGO GRID
   ============================================================ */

.riesgo {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad-h);
}

.riesgo__head {
  margin-bottom: 40px;
}

.riesgo__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.riesgo-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 20px 20px 18px 20px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.08s, box-shadow 0.2s;
}

.riesgo-card:hover {
  border-color: var(--leaf);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 61, 43, 0.08);
}

.riesgo-card:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 2px;
}

.riesgo-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 8px;
}

.riesgo-card__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.tag--banana {
  color: var(--oro);
}

.riesgo-card__siri {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 10px 0;
}

.riesgo-card__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--leaf);
}

.riesgo-card__unit {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.riesgo-card__bar {
  height: 4px;
  background: var(--paper);
  margin-bottom: 10px;
}

.riesgo-card__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--risk-mid);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}

.riesgo-card__cat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px 0;
}

.riesgo-card__elev {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

/* Risk color modifiers */
.cat--muy_bajo .riesgo-card__fill, .panel__fill--muy_bajo { background: var(--risk-vlow); }
.cat--bajo     .riesgo-card__fill, .panel__fill--bajo     { background: var(--risk-low); }
.cat--medio    .riesgo-card__fill, .panel__fill--medio    { background: var(--risk-mid); }
.cat--alto     .riesgo-card__fill, .panel__fill--alto     { background: var(--risk-high); }
.cat--critico  .riesgo-card__fill, .panel__fill--critico  { background: var(--risk-crit); }

.cat--muy_bajo .riesgo-card__value { color: var(--risk-vlow); }
.cat--bajo     .riesgo-card__value { color: var(--risk-low); }
.cat--medio    .riesgo-card__value { color: var(--risk-mid); }
.cat--alto     .riesgo-card__value { color: var(--risk-high); }
.cat--critico  .riesgo-card__value { color: var(--risk-crit); }

/* ============================================================
   DETAIL DIALOG
   ============================================================ */

.detail {
  padding: 0;
  border: none;
  background: var(--bg);
  width: min(900px, 92vw);
  max-height: 90vh;
  margin: auto;
}

.detail::backdrop {
  background: rgba(26, 31, 27, 0.6);
}

.detail__inner {
  padding: 32px clamp(20px, 4vw, 40px);
  overflow-y: auto;
  max-height: 90vh;
}

.detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.detail__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px 0;
}

.detail__title {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 0 0 6px 0;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.detail__desc {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}

.detail__close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 4px;
}

.detail__close:hover { color: var(--ink); }

.detail__top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 640px) {
  .detail__top { grid-template-columns: 1fr; }
}

.detail__small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px 0;
}

.detail__big {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--leaf);
  margin: 0 0 6px 0;
}

.detail__cat {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.detail__rec {
  background: var(--paper);
  padding: 18px 20px;
  border-left: 3px solid var(--leaf);
}

.detail__action {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 10px 0;
  color: var(--ink);
}

.detail__detail {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* Daily series */

.detail__series {
  margin-bottom: 32px;
}

.series {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 160px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
  margin: 14px 0 12px 0;
}

.series__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  height: 100%;
}

.series__bar {
  width: 100%;
  background: var(--risk-mid);
  position: relative;
  min-height: 2px;
}

.series__day {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink);
  font-weight: 500;
  margin-top: 6px;
  transform: rotate(-45deg);
  transform-origin: top left;
  white-space: nowrap;
}

.series__val {
  position: absolute;
  top: -18px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
}

.series__col[data-cat="muy_bajo"] .series__bar { background: var(--risk-vlow); }
.series__col[data-cat="bajo"]     .series__bar { background: var(--risk-low); }
.series__col[data-cat="medio"]    .series__bar { background: var(--risk-mid); }
.series__col[data-cat="alto"]     .series__bar { background: var(--risk-high); }
.series__col[data-cat="critico"]  .series__bar { background: var(--risk-crit); }

.series__legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-top: 22px;
}

.series__sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: middle;
}

.series__sw--low  { background: var(--risk-low); }
.series__sw--mid  { background: var(--risk-mid); }
.series__sw--high { background: var(--risk-high); }
.series__sw--crit { background: var(--risk-crit); }

/* Components grid */

.comp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

@media (max-width: 540px) {
  .comp { grid-template-columns: repeat(2, 1fr); }
}

.comp__item {
  background: var(--paper);
  padding: 14px;
}

.comp__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px 0;
}

.comp__value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

/* ============================================================
   DIAGNOSTICO
   ============================================================ */

.diag {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad-h);
}

.diag__head { margin-bottom: 40px; }

.diag__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media (max-width: 820px) {
  .diag__layout { grid-template-columns: 1fr; }
}

.diag__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diag__drop {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--rule);
  background: var(--paper);
  min-height: 340px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}

.diag__drop:hover { border-color: var(--leaf); background: #ECE3CC; }

.diag__drop--dragging {
  border-color: var(--leaf);
  background: #E5DBC2;
}

.diag__drop-content {
  text-align: center;
  color: var(--leaf);
  padding: 30px;
}

.diag__leaf-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: block;
}

.diag__drop-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px 0;
}

.diag__drop-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.diag__preview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 480px;
}

.diag__preview--shown { display: block; }
.diag__preview--shown ~ .diag__drop-content { display: none; }

.diag__hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

/* Result */

.diag__result {
  background: var(--paper);
  padding: 32px clamp(20px, 4vw, 36px);
  min-height: 340px;
  border: 1px solid var(--rule);
}

.diag__placeholder-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0 0 16px 0;
}

.diag__placeholder-list {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
  padding-left: 20px;
  line-height: 1.7;
}

.diag__output-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px 0;
}

.diag__output-class {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: var(--leaf);
}

.diag__output-class--avanzada { color: var(--risk-crit); }
.diag__output-class--temprana { color: var(--risk-high); }
.diag__output-class--sana { color: var(--risk-vlow); }
.diag__output-class--otra { color: #7A5CA8; }
.diag__output-class--noes { color: var(--ink-muted); }

/* Panel de enfermedad no-Sigatoka (Cordana / Pestalotiopsis) */
.otra-enf {
  margin: 20px 0;
  padding: 18px 20px;
  background: #F4F0F8;
  border: 1px solid #D9CCE9;
  border-left: 4px solid #7A5CA8;
  border-radius: 0 12px 12px 0;
}

.otra-enf__head {
  margin-bottom: 12px;
}

.otra-enf__badge {
  display: inline-block;
  background: #7A5CA8;
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.otra-enf__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: #4A3768;
  margin: 0 0 2px;
}

.otra-enf__patogeno {
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}

.otra-enf__sev {
  font-size: 13.5px;
  color: var(--ink);
  margin: 0 0 12px;
  padding: 8px 12px;
  background: rgba(122, 92, 168, 0.08);
  border-radius: 6px;
}

.otra-enf__sec {
  margin-bottom: 14px;
}

.otra-enf__sec-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7A5CA8;
  margin: 0 0 5px;
}

.otra-enf__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

.otra-enf__sec--diff .otra-enf__text {
  background: white;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #E5DAF0;
}

.otra-enf__manejo {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.otra-enf__manejo li {
  margin-bottom: 5px;
}

.otra-enf__disclaimer {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #D9CCE9;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.diag__output-sev {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 24px 0;
}

.diag__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.metric__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 8px 0;
}

.metric__value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.02em;
}

.metric__unit {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  margin-left: 4px;
  letter-spacing: 0.04em;
}

.diag__small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 10px 0;
}

.diag__rec-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

.diag__technical {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.diag__technical summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.diag__technical pre {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg);
  padding: 12px;
  margin: 12px 0 0 0;
  overflow-x: auto;
  color: var(--ink-soft);
}

.diag__error {
  color: var(--risk-crit);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 14px;
  background: rgba(179, 58, 30, 0.06);
  border-left: 3px solid var(--risk-crit);
}

/* ============================================================
   METODOLOGIA
   ============================================================ */

.meto {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--pad-h);
}

.meto__head { margin-bottom: 48px; }

.meto__section {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule);
}

.meto__section:last-child { border-bottom: none; }

.meto__section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 16px 0;
  color: var(--ink);
}

.meto__section p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 16px 0;
}

.meto__formula {
  background: var(--paper);
  padding: 18px 20px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  border-left: 3px solid var(--oro);
  overflow-x: auto;
}

.meto__list {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 16px 0;
  padding-left: 22px;
}

.meto__list li { margin-bottom: 8px; }

.meto__refs {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  padding-left: 22px;
}

.meto__refs li {
  margin-bottom: 12px;
  font-family: var(--font-body);
}

/* ============================================================
   UTILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   V0.2 — Indicadores en vivo, refresh, overlay de diagnóstico
   ============================================================ */

/* Status strip en homepage */
.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-soft);
  font-feature-settings: 'tnum' 1;
}

.status-strip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

.status-strip[data-status="ok"] { border-color: rgba(45, 90, 63, 0.35); }
.status-strip[data-status="ok"] .status-strip__dot {
  background: var(--leaf-soft);
  animation: none;
}
.status-strip[data-status="warn"] { border-color: rgba(200, 132, 28, 0.5); background: #FBF2DE; }
.status-strip[data-status="warn"] .status-strip__dot { background: var(--oro); animation: none; }
.status-strip[data-status="error"] { border-color: rgba(179, 58, 30, 0.5); background: #FBE8E2; }
.status-strip[data-status="error"] .status-strip__dot { background: #B33A1E; animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Meta bar en /riesgo */
.riesgo__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  flex-wrap: wrap;
}

.riesgo__meta-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}

.riesgo__meta-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-muted);
}
.riesgo__meta-dot--ok { background: var(--leaf-soft); }
.riesgo__meta-dot--warn { background: var(--oro); }

.riesgo__meta-label { font-weight: 500; color: var(--ink); }
.riesgo__meta-sep { color: var(--ink-muted); }
.riesgo__meta-time { font-feature-settings: 'tnum' 1; }

.btn--small {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid var(--leaf);
  background: transparent;
  color: var(--leaf);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.15s;
}
.btn--small:hover:not(:disabled) {
  background: var(--leaf);
  color: var(--bg);
}
.btn--small:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Weather chips en cada riesgo-card */
.riesgo-card__weather {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.rcw__chip {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11.5px;
  background: rgba(31, 61, 43, 0.06);
  border-radius: 999px;
  color: var(--ink-soft);
  font-feature-settings: 'tnum' 1;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Source line en detail dialog */
.detail__source {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
  font-feature-settings: 'tnum' 1;
}

/* Bloque de clima en detail dialog */
.detail__weather {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wx-cell {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
}

.wx-cell__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.wx-cell__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  font-feature-settings: 'tnum' 1;
}

.wx-cell__sub {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--ink-muted);
  font-feature-settings: 'tnum' 1;
}

/* Overlay de diagnóstico */
.diag__overlay-fig {
  margin: 18px 0 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 12px;
}

.diag__overlay-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--rule);
}

.diag__overlay-cap {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}

.diag__overlay-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.diag__overlay-sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.diag__overlay-sw--leaf {
  background: transparent;
  border: 2px solid #32C850;
}

.diag__overlay-sw--lesion {
  background: rgba(220, 30, 30, 0.65);
  border: 2px solid #F0B428;
}

/* Note en diagnóstico placeholder */
.diag__placeholder-note {
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(31, 61, 43, 0.05);
  border-left: 3px solid var(--leaf-soft);
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Pequeño ajuste responsive */
@media (max-width: 640px) {
  .riesgo__meta {
    padding: 12px 14px;
  }
  .riesgo__meta-info {
    font-size: 13px;
  }
  .weather-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   V0.3 — Diagnóstico integrado: pasos, ubicación, veredicto, PDF
   ============================================================ */

/* Acciones en meta-bar */
.riesgo__meta-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn--ghost-small {
  border-color: var(--rule);
  color: var(--ink-soft);
}
.btn--ghost-small:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* Pasos del diagnóstico */
.diag__steps {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 24px 0 28px;
  padding: 0;
  background: var(--paper);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid var(--rule);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.diag__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
  transition: all 0.15s;
}

.diag__step--active {
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
}

.diag__step--done {
  background: var(--leaf);
  color: var(--bg);
}
.diag__step--done .diag__step-num {
  background: var(--bg);
  color: var(--leaf);
}
.diag__step--done .diag__step-num::after {
  content: "✓";
}

.diag__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink-muted);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.diag__step--done .diag__step-num {
  font-size: 0;
}

/* Grupos del formulario */
.diag__group {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 20px;
  background: var(--bg);
}

.diag__group-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding: 0 6px;
  margin: 0 0 4px;
}

.diag__group-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Selector de ubicación */
.loc-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.loc-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px dashed var(--rule);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.loc-btn:hover:not(:disabled) {
  border-color: var(--leaf);
  border-style: solid;
  background: var(--paper);
}
.loc-btn--active {
  border-color: var(--leaf);
  border-style: solid;
  background: rgba(45, 90, 63, 0.08);
}
.loc-btn--loading {
  opacity: 0.7;
  cursor: wait;
}

.loc-btn__icon {
  font-size: 24px;
  flex-shrink: 0;
}

.loc-btn__text {
  display: flex;
  flex-direction: column;
}

.loc-btn__title {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.3;
}

.loc-btn__sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.loc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 14px 0;
}
.loc-divider::before, .loc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.loc-select-wrap {
  display: block;
}

.loc-select-label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.loc-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.loc-select:focus {
  outline: none;
  border-color: var(--leaf);
}

.loc-status {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  background: var(--paper);
  color: var(--ink-soft);
}
.loc-status[data-mode="ok"] {
  background: rgba(45, 90, 63, 0.1);
  border-left: 3px solid var(--leaf-soft);
  color: var(--ink);
}
.loc-status[data-mode="error"] {
  background: rgba(179, 58, 30, 0.1);
  border-left: 3px solid #B33A1E;
  color: #6B1A0A;
}
.loc-status[data-mode="loading"] {
  background: rgba(200, 132, 28, 0.1);
  border-left: 3px solid var(--oro);
}

/* Veredicto integrado */
.verdict {
  background: var(--paper);
  border-left: 4px solid var(--ink-muted);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin-bottom: 22px;
}
.verdict--urgent { border-left-color: var(--risk-crit); background: rgba(142, 36, 16, 0.07); }
.verdict--high   { border-left-color: var(--risk-high); background: rgba(200, 84, 28, 0.07); }
.verdict--mid    { border-left-color: var(--risk-mid); background: rgba(217, 165, 58, 0.1); }
.verdict--low    { border-left-color: var(--risk-vlow); background: rgba(107, 142, 90, 0.1); }
.verdict--otra   { border-left-color: #7A5CA8; background: rgba(122, 92, 168, 0.08); }

.verdict__priority {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.verdict--urgent .verdict__priority { color: var(--risk-crit); }
.verdict--high .verdict__priority   { color: var(--risk-high); }
.verdict--otra .verdict__priority   { color: #7A5CA8; }

.bioclim__note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--paper-warm);
  padding: 8px 12px;
  border-radius: 8px;
  margin: 8px 0;
  border-left: 3px solid var(--leaf-soft);
}

.verdict__message {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.verdict__plan {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
}
.verdict__plan li {
  margin-bottom: 4px;
}

/* Bioclim block dentro de diagnóstico */
.diag__bioclim {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.bioclim__siri {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}

.bioclim__siri-val {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
  line-height: 1;
}

.bioclim__siri-unit {
  font-size: 12px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bioclim__siri-cat {
  font-size: 13px;
  font-weight: 500;
  margin-left: 8px;
}

.bioclim__wx {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.bw-cell {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.bw-cell__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.bw-cell__value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  font-feature-settings: 'tnum' 1;
}

/* Acciones del resultado */
.diag__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.diag__actions .btn {
  flex: 1;
  min-width: 160px;
}

/* Modal explicativo */
.explain {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: 760px;
  width: 92%;
  max-height: 88vh;
  background: var(--bg);
  color: var(--ink);
}
.explain::backdrop {
  background: rgba(26, 31, 27, 0.55);
  backdrop-filter: blur(2px);
}

.explain__inner {
  padding: 28px 32px;
  max-height: 88vh;
  overflow-y: auto;
}

.explain__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.explain__eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--oro);
  margin: 0 0 4px;
}

.explain__title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.explain__close {
  background: transparent;
  border: 1px solid var(--rule);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.explain__close:hover {
  background: var(--paper);
  color: var(--ink);
}

.explain__sec {
  margin-bottom: 26px;
}
.explain__sec:last-child { margin-bottom: 0; }

.explain__h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--leaf);
}

.explain__sec p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.explain__sec p strong, .explain__sec li strong { color: var(--ink); }

.explain__cats {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.explain__cats li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 6px 10px;
  background: var(--paper);
  border-radius: 6px;
}

.explain__sw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.explain__sw[data-cat="muy_bajo"] { background: var(--risk-vlow); }
.explain__sw[data-cat="bajo"]     { background: var(--risk-low); }
.explain__sw[data-cat="medio"]    { background: var(--risk-mid); }
.explain__sw[data-cat="alto"]     { background: var(--risk-high); }
.explain__sw[data-cat="critico"]  { background: var(--risk-crit); }

.explain__table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.explain__table th, .explain__table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
}

.explain__table th {
  background: var(--paper);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.explain__note {
  font-size: 12px;
  font-style: italic;
  color: var(--ink-muted);
  margin: 8px 0 0;
}

.explain__bullets {
  margin: 8px 0;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.explain__bullets li { margin-bottom: 6px; }

@media (max-width: 640px) {
  .diag__steps { width: 100%; }
  .diag__step { padding: 6px 10px; font-size: 12px; }
  .explain__inner { padding: 20px 18px; }
  .explain__title { font-size: 22px; }
  .verdict__priority { font-size: 18px; }
}

/* ============================================================
   V0.4 — Feedback widget, impacto, validación, presentación
   ============================================================ */

/* Feedback widget post-diagnóstico */
.diag__feedback {
  margin: 22px 0;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
}

.fb-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.fb-btn {
  padding: 8px 14px;
  border: 1px solid var(--rule);
  background: var(--bg);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  transition: all 0.15s;
}
.fb-btn:hover:not(:disabled) {
  border-color: var(--leaf);
  background: var(--paper);
}
.fb-btn--selected {
  background: var(--leaf);
  color: var(--bg);
  border-color: var(--leaf);
}
.fb-btn:disabled { opacity: 0.5; cursor: default; }

.fb-comment {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  resize: vertical;
  background: var(--bg);
}
.fb-comment:disabled { opacity: 0.6; }

.fb-thanks {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--leaf);
  font-weight: 500;
}

/* ============ Página de impacto ============ */

.impacto__head { max-width: 720px; }

.impacto__layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}

.impacto__form {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
}

.impacto__params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.param {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.param__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.param__input {
  padding: 11px 13px;
  border: 1.5px solid var(--rule);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg);
  font-feature-settings: 'tnum' 1;
}
.param__input:focus { outline: none; border-color: var(--leaf); }

.param__hint {
  font-size: 11px;
  color: var(--ink-muted);
}

.impacto__result { min-width: 0; }
.impacto__placeholder {
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  color: var(--ink-soft);
}
.impacto__output { display: flex; flex-direction: column; gap: 20px; }

/* Hero del impacto */
.impact-hero {
  background: linear-gradient(135deg, var(--leaf), var(--leaf-soft));
  color: var(--bg);
  border-radius: 16px;
  padding: 26px 28px;
}

.impact-hero__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin: 0 0 6px;
}

.impact-hero__big {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  margin: 0 0 8px;
  font-feature-settings: 'tnum' 1;
}

.impact-hero__sub {
  font-size: 14px;
  opacity: 0.92;
  margin: 0;
  font-feature-settings: 'tnum' 1;
}

/* Comparación calendario vs risk-based */
.impact-comp {
  background: var(--paper);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--rule);
}

.impact-comp__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--ink);
}

.impact-comp__bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-bar {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 12px;
}

.comp-bar__label {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.comp-bar__visual {
  height: 16px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.comp-bar__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.comp-bar__fill--calendar { background: var(--risk-high); }
.comp-bar__fill--rb { background: var(--leaf-soft); }

.comp-bar__value {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
  color: var(--ink);
  min-width: 90px;
  text-align: right;
}

.impact-comp__delta {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--bg);
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid var(--leaf-soft);
}

/* Grid de tarjetas de impacto */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.impact-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
}

.impact-card__label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 6px;
}

.impact-card__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
  font-feature-settings: 'tnum' 1;
  color: var(--ink);
}

.impact-card__sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* Retrospectivo */
.impact-retro {
  background: var(--paper);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--rule);
}

.retro-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.retro-stat {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--rule);
  text-align: center;
}

.retro-stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  font-feature-settings: 'tnum' 1;
}

.retro-stat__lbl {
  font-size: 11px;
  color: var(--ink-muted);
}

.retro-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.retro-bar {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: 10px;
}

.retro-bar__lbl { font-size: 12px; color: var(--ink-soft); }
.retro-bar__visual {
  height: 12px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
}
.retro-bar__fill { height: 100%; transition: width 0.3s; }
.retro-bar__fill--muy_bajo { background: var(--risk-vlow); }
.retro-bar__fill--bajo { background: var(--risk-low); }
.retro-bar__fill--medio { background: var(--risk-mid); }
.retro-bar__fill--alto { background: var(--risk-high); }
.retro-bar__fill--critico { background: var(--risk-crit); }
.retro-bar__val {
  font-size: 12px;
  font-feature-settings: 'tnum' 1;
  color: var(--ink-soft);
  text-align: right;
}

/* ============ Página de validación ============ */

.vali__head { max-width: 720px; }

.vali__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

.vali__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 26px;
}

.vali__card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.vali__card-big {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--leaf);
  font-feature-settings: 'tnum' 1;
  line-height: 1;
}

.vali__card-unit {
  font-size: 28px;
  color: var(--ink-muted);
  margin-left: 4px;
}

.vali__card-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 4px 0 0;
}

.vali__sec { margin: 36px 0; }

.vali__h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}

.vali__actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.vali__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.vali__panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 14px 16px;
}

.vali__panel-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0 0 10px;
}

.vali__panel-empty { font-size: 13px; color: var(--ink-muted); font-style: italic; }

.vali__bars { display: flex; flex-direction: column; gap: 6px; }

.vali-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 30px;
  gap: 8px;
  align-items: center;
}

.vali-bar__lbl { font-size: 12px; color: var(--ink-soft); }
.vali-bar__vis {
  height: 10px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.vali-bar__fill { background: var(--leaf-soft); height: 100%; transition: width 0.3s; }
.vali-bar__val {
  font-size: 12px;
  font-feature-settings: 'tnum' 1;
  color: var(--ink);
  text-align: right;
  font-weight: 500;
}

.vali__feed {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vali__feed-empty {
  color: var(--ink-muted);
  font-style: italic;
  font-size: 13.5px;
  padding: 14px;
  background: var(--paper);
  border-radius: 8px;
}

.vali__feed-item {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
}

.vali__feed-comment {
  margin: 0 0 6px;
  font-style: italic;
  color: var(--ink);
  font-size: 14px;
}

.vali__feed-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0;
}

.vali__feed-acuerdo {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
}
.vali__feed-acuerdo--si { background: rgba(45, 90, 63, 0.15); color: var(--leaf); }
.vali__feed-acuerdo--parcialmente { background: rgba(200, 132, 28, 0.15); color: var(--oro); }
.vali__feed-acuerdo--no { background: rgba(142, 36, 16, 0.15); color: var(--risk-crit); }

/* ============ Página de presentación ============ */

.pres__head {
  background: linear-gradient(135deg, var(--leaf), var(--leaf-soft));
  color: var(--bg);
  padding: 38px 36px;
  border-radius: 18px;
  margin-bottom: 28px;
}
.pres__head .section-eyebrow { color: rgba(250, 245, 235, 0.85); }
.pres__head .page-title { color: var(--bg); }
.pres__head .page-lede { color: rgba(250, 245, 235, 0.92); max-width: 720px; }

.pres__cta { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pres__head .btn--ghost { color: var(--bg); border-color: rgba(250, 245, 235, 0.5); }
.pres__head .btn--ghost:hover { background: rgba(250, 245, 235, 0.15); }

.pres__sec {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 18px;
}

.pres__sec--axis { background: var(--bg); border-left: 4px solid var(--oro); }
.pres__sec--accent { background: var(--bg); border: 2px solid var(--leaf-soft); }
.pres__sec--end { text-align: center; background: var(--leaf); color: var(--bg); }
.pres__sec--end .pres__sec-eyebrow { color: rgba(250, 245, 235, 0.8); }
.pres__sec--end .pres__sec-title { color: var(--bg); }

.pres__sec-eyebrow {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--oro);
  margin: 0 0 6px;
  font-weight: 500;
}

.pres__sec-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.2;
}

.pres__sec p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 10px; }
.pres__sec p:last-child { margin-bottom: 0; }
.pres__sec a { color: var(--leaf); text-decoration: underline; }

.pres__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.pres__fact {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  border-top: 3px solid var(--oro);
}

.pres__fact-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
  font-feature-settings: 'tnum' 1;
}

.pres__fact-txt { font-size: 13px; color: var(--ink-soft); margin: 0 0 4px; line-height: 1.4; }
.pres__fact-src { font-size: 10.5px; color: var(--ink-muted); margin: 0; font-style: italic; }

.pres__steps { padding-left: 22px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.pres__steps li { margin-bottom: 6px; }
.pres__list { padding-left: 22px; font-size: 14px; line-height: 1.7; color: var(--ink); }
.pres__list li { margin-bottom: 6px; }

.pres__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pres__metric {
  background: var(--leaf);
  color: var(--bg);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.pres__metric-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  margin: 0 0 6px;
  font-feature-settings: 'tnum' 1;
  line-height: 1;
}

.pres__metric-lbl { font-size: 12px; opacity: 0.92; margin: 0; line-height: 1.4; }

.pres__small { font-size: 11.5px; color: var(--ink-muted); font-style: italic; margin-top: 10px; }

.pres__roadmap {
  padding-left: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.pres__roadmap li { margin-bottom: 8px; }
.pres__roadmap strong { color: var(--oro); }

@media (max-width: 760px) {
  .impacto__layout, .vali__top, .vali__grid {
    grid-template-columns: 1fr;
  }
  .impacto__params { grid-template-columns: 1fr; }
  .comp-bar { grid-template-columns: 1fr; }
  .pres__head { padding: 24px 20px; }
  .pres__sec { padding: 18px 20px; }
}

.diag__lote-hint {
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  border-left: 3px solid #FFD93D;
}
.diag__lote-hint a { color: var(--leaf); font-weight: 500; }

/* ============================================================
   V0.5 — Lote multi-foto + Vista aérea (roadmap drones)
   ============================================================ */

.lote__layout { grid-template-columns: 1fr 1.2fr; }

.lote__drop {
  min-height: 180px;
}

.lote__file-list {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.lote__file-count {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink);
}

.lote__file-names {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lote__file-names li {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: var(--ink-soft);
  padding: 2px 6px;
  background: var(--bg);
  border-radius: 4px;
}

.lote__file-more {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  font-style: italic;
}

.lote__dist, .lote__worst, .lote__grid-sec {
  margin-top: 20px;
}

.lote__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lote-tile {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.12s;
}
.lote-tile:hover { transform: translateY(-2px); }

.lote-tile img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.lote-tile__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  background: var(--bg);
  color: var(--ink-muted);
}

.lote-tile figcaption {
  padding: 6px 8px;
}

.lote-tile__cls {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lote-tile__met {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--ink-muted);
  font-feature-settings: 'tnum' 1;
}

.lote-tile--sana { border-left: 3px solid var(--risk-vlow); }
.lote-tile--temprana { border-left: 3px solid var(--risk-mid); }
.lote-tile--avanzada { border-left: 3px solid var(--risk-crit); }
.lote-tile--noes { border-left: 3px solid var(--ink-muted); opacity: 0.7; }

/* Fills para distribución del lote */
.vali-bar__fill--sana { background: var(--risk-vlow); }
.vali-bar__fill--sigatoka_temprana { background: var(--risk-mid); }
.vali-bar__fill--sigatoka_avanzada { background: var(--risk-crit); }
.vali-bar__fill--no_es_hoja { background: var(--ink-muted); }

/* ============ Vista aérea (roadmap) ============ */

.aerea__head {
  position: relative;
  background: linear-gradient(135deg, #234C2E, #1F3D2B);
  color: var(--bg);
  padding: 36px 36px;
  border-radius: 18px;
  margin-bottom: 28px;
  overflow: hidden;
}

.aerea__head::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(250, 245, 235, 0.05) 39px, rgba(250, 245, 235, 0.05) 40px),
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(250, 245, 235, 0.05) 39px, rgba(250, 245, 235, 0.05) 40px);
  pointer-events: none;
}

.aerea__head > * { position: relative; z-index: 1; }
.aerea__head .section-eyebrow { color: rgba(250, 245, 235, 0.7); }
.aerea__head .page-title { color: var(--bg); }
.aerea__head .page-lede { color: rgba(250, 245, 235, 0.92); max-width: 760px; }
.aerea__head a { color: #FFD93D; text-decoration: underline; }

.aerea__badge {
  display: inline-block;
  background: #FFD93D;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-top: 18px;
}

.aerea__mockup-wrap { margin: 28px 0; }

.aerea__mockup {
  background: #1A2A1F;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--rule);
}

.aerea__svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.aerea__legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(250, 245, 235, 0.15);
  font-size: 11.5px;
  color: rgba(250, 245, 235, 0.85);
}

.aerea__legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aerea__sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.aerea__sec {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 18px;
}

.aerea__benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.aerea__benefit {
  background: var(--bg);
  border-radius: 10px;
  padding: 16px;
  border-top: 3px solid var(--leaf-soft);
}

.aerea__benefit-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--leaf);
  margin: 0;
  line-height: 1;
  font-feature-settings: 'tnum' 1;
}

.aerea__benefit-lbl {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 6px 0 8px;
  font-weight: 600;
}

.aerea__benefit-txt {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

.aerea__cta {
  background: var(--leaf);
  color: var(--bg);
  border-radius: 14px;
  padding: 22px 28px;
  text-align: center;
}
.aerea__cta h2 { color: var(--bg); margin: 0 0 8px; }
.aerea__cta p { color: rgba(250, 245, 235, 0.92); margin: 0; font-size: 14px; }
.aerea__cta a { color: #FFD93D; text-decoration: underline; }

@media (max-width: 760px) {
  .lote__layout { grid-template-columns: 1fr; }
  .aerea__head { padding: 24px 20px; }
  .aerea__sec { padding: 18px 20px; }
}

/* ============================================================
   V0.6 — Monitoreo en vivo: live badge, pulse, value flash
   ============================================================ */

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  background: rgba(45, 90, 63, 0.12);
  border-radius: 999px;
  color: var(--leaf);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.live-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf-soft);
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { transform: scale(1); opacity: 0.5; box-shadow: 0 0 0 0 rgba(45, 90, 63, 0.4); }
  50%      { transform: scale(1.2); opacity: 1;    box-shadow: 0 0 0 6px rgba(45, 90, 63, 0); }
}

/* Animación que dispara cada fetch exitoso */
.live-badge--pulse {
  animation: liveBadgeFlash 0.6s ease-out;
}

@keyframes liveBadgeFlash {
  0%   { background: var(--leaf); color: var(--bg); transform: scale(1); }
  40%  { background: var(--leaf); color: var(--bg); transform: scale(1.06); }
  100% { background: rgba(45, 90, 63, 0.12); color: var(--leaf); transform: scale(1); }
}

/* Cuando un valor cambia entre auto-refreshes, breve flash */
.value-flash {
  animation: valueFlash 1.2s ease-out;
}

@keyframes valueFlash {
  0%   { background: rgba(200, 132, 28, 0.4); color: var(--ink); }
  100% { background: transparent; color: inherit; }
}

/* Las tarjetas de riesgo se vuelven sutilmente "vivas" — transición suave en width */
.riesgo-card__fill {
  transition: width 0.6s ease, background-color 0.4s;
}

/* Hover de la tarjeta — más feedback de "interactividad viva" */
.riesgo-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.riesgo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(26, 31, 27, 0.08);
}

/* Status strip en homepage — pulse continuo más sutil */
.status-strip[data-status="ok"] .status-strip__dot {
  animation: livePulse 2.5s ease-in-out infinite;
}

/* ============================================================
   V0.8 — Sparklines, reloj en vivo, animaciones dinámicas
   ============================================================ */

/* Row con SIRI + sparkline al lado */
.riesgo-card__siri-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 6px;
}

.riesgo-card__sparkline {
  flex: 1;
  min-width: 60px;
  max-width: 130px;
  height: 28px;
  opacity: 0.95;
}

.sparkline {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Animación de dibujo de la línea */
.sparkline__line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: sparklineDraw 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sparklineDraw {
  to { stroke-dashoffset: 0; }
}

.sparkline__dot {
  opacity: 0;
  animation: sparklineDot 0.4s ease-out 1.2s forwards;
}

@keyframes sparklineDot {
  to { opacity: 1; }
}

/* Reloj en vivo en header */
.live-clock {
  display: inline-flex;
  align-items: center;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

.live-clock::before {
  content: "🕐";
  margin-right: 6px;
  font-size: 11px;
  opacity: 0.7;
}

/* Animación de las barras diarias en el modal */
.series__bar {
  transition: height 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Las tarjetas SIRI cuentan desde 0 al cargar — los números son monospace
   tabular para que no salten de ancho */
.riesgo-card__value,
.panel__value,
.detail__big {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* Animación de entrada de las tarjetas al cargar la página */
.riesgo-card {
  animation: cardFadeIn 0.5s ease-out backwards;
}

.riesgo-card:nth-child(1)  { animation-delay: 0.02s; }
.riesgo-card:nth-child(2)  { animation-delay: 0.04s; }
.riesgo-card:nth-child(3)  { animation-delay: 0.06s; }
.riesgo-card:nth-child(4)  { animation-delay: 0.08s; }
.riesgo-card:nth-child(5)  { animation-delay: 0.10s; }
.riesgo-card:nth-child(6)  { animation-delay: 0.12s; }
.riesgo-card:nth-child(7)  { animation-delay: 0.14s; }
.riesgo-card:nth-child(8)  { animation-delay: 0.16s; }
.riesgo-card:nth-child(9)  { animation-delay: 0.18s; }
.riesgo-card:nth-child(10) { animation-delay: 0.20s; }
.riesgo-card:nth-child(11) { animation-delay: 0.22s; }
.riesgo-card:nth-child(12) { animation-delay: 0.24s; }
.riesgo-card:nth-child(13) { animation-delay: 0.26s; }
.riesgo-card:nth-child(14) { animation-delay: 0.28s; }

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* La barra de la tarjeta debe transicionar al cargar inicialmente */
.riesgo-card__fill {
  transition: width 1.0s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 640px) {
  .live-clock { font-size: 12px; padding: 2px 8px; }
  .riesgo-card__siri-row { gap: 6px; }
  .riesgo-card__sparkline { max-width: 80px; }
}

/* ============================================================
   V0.7 — Croquis de vuelo / GPS / EXIF
   ============================================================ */

.vuelo {
  margin: 20px 0;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.vuelo__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.vuelo__head .impact-comp__title { margin: 0 0 4px; }

.vuelo__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vuelo__chip {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
}

.vuelo__chip--drone {
  background: #FFF6E6;
  border-color: var(--oro);
  color: #8C5A0F;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.vuelo__warn {
  margin: 10px 0 12px;
  padding: 10px 14px;
  background: #FBF2DE;
  border-left: 3px solid var(--oro);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #6B4910;
  line-height: 1.5;
}

.vuelo__map {
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #F2EAD9;
  border: 1px solid var(--rule);
}

/* Cuando no hay Leaflet, dentro va el SVG croquis */
.vuelo__map .croquis-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Marcadores customizados de Leaflet */
.finca-marker {
  background: transparent !important;
  border: none !important;
}

.finca-marker__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  border: 2.5px solid white;
  box-shadow: 0 2px 8px rgba(26, 31, 27, 0.45);
  font-family: var(--font-body, system-ui);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.finca-marker__dot:hover {
  transform: scale(1.15);
}

/* Popup customizado */
.finca-popup {
  font-family: var(--font-body, system-ui);
}

.finca-popup__title {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ink-muted);
  font-family: 'SF Mono', monospace;
}

.finca-popup__class {
  margin: 0 0 6px;
  font-size: 14px;
}

.finca-popup__meta {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
}

.finca-popup__coords {
  margin: 0;
  font-size: 11px;
  font-family: 'SF Mono', monospace;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  padding-top: 4px;
}

/* Tip al lado de la leyenda */
.vuelo__map-tip {
  margin-left: auto;
  font-style: italic;
  color: var(--ink-muted);
}

/* Override sutil de los controles Leaflet para que combinen */
.leaflet-control-attribution {
  font-size: 10px;
  background: rgba(250, 245, 235, 0.92) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--bg, #FAF5EB) !important;
  color: var(--ink, #1A1F1B);
  border-radius: 8px;
}

.leaflet-popup-tip {
  background: var(--bg, #FAF5EB) !important;
}

.vuelo__legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-soft);
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}

.vuelo__legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vuelo__legend-flight {
  font-style: italic;
}

.vuelo__sw {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--ink);
}

.vuelo__detail { margin-top: 8px; }

.vuelo__nogps {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--paper);
  border-left: 3px solid var(--ink-muted);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Badge GPS en cada tile + highlight click */
.lote-tile {
  position: relative;
}

.lote-tile__gps {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(31, 61, 43, 0.92);
  color: var(--bg);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  cursor: help;
}

.lote-tile--highlight {
  outline: 3px solid var(--oro);
  outline-offset: 2px;
  animation: tileHighlight 2s ease-out;
}

@keyframes tileHighlight {
  0%   { box-shadow: 0 0 0 0 rgba(200, 132, 28, 0.7); }
  50%  { box-shadow: 0 0 0 10px rgba(200, 132, 28, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 132, 28, 0); }
}

/* ============================================================
   VALIDACIÓN — Encuesta online + estadísticas en vivo
   ============================================================ */

.vali__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 40px;
}

@media (max-width: 700px) {
  .vali__stats { grid-template-columns: repeat(2, 1fr); }
}

.vali__stat {
  background: linear-gradient(135deg, var(--leaf) 0%, #0A3D20 100%);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  box-shadow: 0 6px 20px rgba(14, 77, 42, 0.15);
}

.vali__stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  margin: 0 0 6px;
  color: #fff;
}

.vali__stat-unit {
  font-size: 22px;
  color: var(--oro-soft);
  margin-left: 2px;
}

.vali__stat-lbl {
  font-size: 12.5px;
  letter-spacing: 0.03em;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
}

.vali__layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .vali__layout { grid-template-columns: 1fr; }
}

.vali__form-wrap {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
}

.vali__h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--leaf);
  margin: 0 0 4px;
}

.vali__form-hint {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.encuesta__field { margin-bottom: 22px; }

.encuesta__label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.encuesta__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rol-chip {
  padding: 8px 16px;
  border: 1.5px solid var(--rule);
  background: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rol-chip:hover { border-color: var(--leaf-soft); }

.rol-chip--active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

.encuesta__q {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.encuesta__q-text {
  font-size: 14.5px;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.45;
}

.encuesta__scale {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.scale-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.12s ease;
}

.scale-btn:hover { border-color: var(--leaf-bright); transform: translateY(-2px); }

.scale-btn--filled {
  background: var(--leaf-bright);
  border-color: var(--leaf-bright);
  color: #fff;
}

.scale-btn--active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
  transform: scale(1.08);
}

.encuesta__scale-ends {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
  order: 3;
}

.encuesta__textarea {
  width: 100%;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
  background: var(--bg);
}

.encuesta__textarea:focus {
  outline: none;
  border-color: var(--leaf-soft);
}

.encuesta__thanks {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: rgba(46, 157, 91, 0.12);
  border-left: 3px solid var(--leaf-bright);
  border-radius: 8px;
  font-size: 14px;
  color: var(--leaf);
  font-weight: 500;
}

/* Panel lateral */
.vali__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.vali__panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 24px;
}

.vali__panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 18px;
}

.vali__empty {
  font-size: 13.5px;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0;
}

.aspect { margin-bottom: 16px; }

.aspect__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.aspect__lbl {
  font-size: 13px;
  color: var(--ink-soft);
}

.aspect__val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--leaf);
}

.aspect__max {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 400;
}

.aspect__bar {
  height: 8px;
  background: var(--paper-warm);
  border-radius: 999px;
  overflow: hidden;
}

.aspect__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--leaf-soft), var(--leaf-bright));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.vali__comments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vali__comment {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 10px;
  border-left: 3px solid var(--leaf-bright);
}

.vali__comment-text {
  font-size: 13.5px;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.5;
  font-style: italic;
}

.vali__comment-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ============================================================
   AÉREA — Mapa real de la finca
   ============================================================ */

.aerea__layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 28px;
  margin-top: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .aerea__layout { grid-template-columns: 1fr; }
}

.aerea__upload {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 26px;
}

.aerea__form { margin-top: 8px; }

.aerea__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  border: 2px dashed var(--rule);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 18px;
}

.aerea__drop:hover { border-color: var(--leaf-bright); background: var(--paper-warm); }

.aerea__drop-icon { font-size: 32px; }
.aerea__drop-text { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.aerea__drop-sub { font-size: 12.5px; color: var(--ink-muted); }

.aerea__hint {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 12px 0 0;
}

.aerea__legend {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.aerea__legend-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.aerea__legend-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aerea__leg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.aerea__leg i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--rule);
}

.aerea__map-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--rule);
  min-height: 480px;
  background: var(--paper);
}

.aerea__map {
  width: 100%;
  height: 480px;
}

.aerea__map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
  background: var(--paper);
  z-index: 500;
}

.aerea__summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

@media (max-width: 700px) {
  .aerea__summary { grid-template-columns: repeat(2, 1fr); }
}

.aerea__sum-stat {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}

.aerea__sum-num {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  color: var(--leaf);
  line-height: 1;
  margin: 0 0 6px;
}

.aerea__sum-lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  margin: 0;
}

/* ============================================================
   SIGATOKALERT — SAAS UI 2026
   Capa de reemplazo visual compatible con todos los módulos.
   ============================================================ */

:root {
  --bg: #f4f7f5;
  --paper: #ffffff;
  --paper-warm: #edf4ef;
  --rule: #dce6df;
  --ink: #12231a;
  --ink-soft: #4f6057;
  --ink-muted: #7a8a81;
  --leaf: #0b4a2b;
  --leaf-soft: #17653d;
  --leaf-bright: #2b8a57;
  --navy: #163d55;
  --navy-soft: #245e7d;
  --oro: #b7791f;
  --oro-soft: #efc66b;
  --font-display: 'Manrope', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --w-max: 1180px;
  --pad-h: clamp(20px, 4vw, 48px);
  --radius-control: 9px;
  --radius-card: 14px;
  --radius-panel: 20px;
  --shadow-xs: 0 1px 2px rgba(18,35,26,.05);
  --shadow-sm: 0 8px 24px rgba(18,35,26,.07);
  --shadow-md: 0 18px 50px rgba(18,35,26,.11);
}

html { scroll-behavior: smooth; }
body.site-body {
  background: radial-gradient(circle at 10% 0%, rgba(43,138,87,.06), transparent 30rem), var(--bg);
  color: var(--ink);
}
.site-main { min-height: 70vh; }
.masthead, .page-footer { display: none !important; }

/* Header */
.saas-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(220,230,223,.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.saas-header__inner {
  width: min(var(--w-max), calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.saas-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 220px;
  color: var(--ink);
}
.saas-brand:hover { text-decoration: none; }
.saas-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--leaf), var(--leaf-soft));
  box-shadow: 0 8px 18px rgba(11,74,43,.18);
}
.saas-brand__mark img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.saas-brand__copy { display: flex; flex-direction: column; line-height: 1.12; }
.saas-brand__copy strong { font-family: var(--font-display); font-size: 17px; letter-spacing: -.02em; }
.saas-brand__copy small { margin-top: 3px; color: var(--ink-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.saas-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-left: auto; }
.saas-nav a { color: var(--ink-soft); font-size: 13.5px; font-weight: 600; padding: 9px 11px; border-radius: 8px; }
.saas-nav a:hover, .saas-nav a.is-active { color: var(--leaf); background: var(--paper-warm); text-decoration: none; }
.saas-nav__secondary { color: var(--ink-muted) !important; }
.saas-header__cta { min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 9px; background: var(--leaf); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 8px 18px rgba(11,74,43,.18); }
.saas-header__cta:hover { background: var(--leaf-soft); text-decoration: none; }
.saas-menu-btn { display: none; width: 42px; height: 42px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 10px; }
.saas-menu-btn span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 4px; }

/* Hero */
.saas-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.saas-hero::before { content: ''; position: absolute; width: 600px; height: 600px; top: -300px; right: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(43,138,87,.14), transparent 68%); pointer-events: none; }
.saas-hero__inner { width: min(var(--w-max), calc(100% - 32px)); margin: 0 auto; min-height: 710px; padding: 78px 0 86px; display: grid; grid-template-columns: minmax(0,1.02fr) minmax(440px,.98fr); align-items: center; gap: 70px; }
.saas-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--leaf-soft); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 24px; }
.saas-kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-bright); box-shadow: 0 0 0 5px rgba(43,138,87,.12); }
.saas-hero__title { max-width: 700px; margin: 0; font-family: var(--font-display); font-size: clamp(48px,5.6vw,76px); line-height: .99; letter-spacing: -.055em; font-weight: 700; color: var(--ink); }
.saas-hero__title span { color: var(--leaf); }
.saas-hero__lede { max-width: 630px; margin: 28px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.65; }
.saas-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.saas-btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border-radius: var(--radius-control); font-size: 14px; font-weight: 700; transition: transform .15s, box-shadow .15s, background .15s; }
.saas-btn:hover { transform: translateY(-1px); text-decoration: none; }
.saas-btn--primary { color: #fff; background: var(--leaf); box-shadow: 0 10px 24px rgba(11,74,43,.20); }
.saas-btn--primary:hover { background: var(--leaf-soft); }
.saas-btn--secondary { color: var(--leaf); background: #fff; border: 1px solid #bfcfc4; }
.saas-btn--secondary:hover { border-color: var(--leaf-soft); box-shadow: var(--shadow-xs); }
.saas-btn--light { background: #fff; color: var(--leaf); white-space: nowrap; }
.saas-trust-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 38px; }
.saas-trust { display: flex; align-items: center; gap: 10px; }
.saas-trust__icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 10px; background: #fff; color: var(--leaf); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.saas-trust span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.saas-trust strong { color: var(--ink); font-size: 12px; }
.saas-trust small { color: var(--ink-muted); font-size: 11px; }
.saas-status { margin-top: 28px; background: rgba(255,255,255,.82); border-radius: 10px; box-shadow: var(--shadow-xs); }

/* Dashboard y Packy */
.saas-hero__visual { position: relative; min-height: 510px; display: flex; align-items: flex-start; justify-content: flex-end; }
.saas-dashboard-card { width: min(100%,510px); margin-top: 10px; padding: 26px; border: 1px solid rgba(205,219,209,.9); border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-md); }
.saas-dashboard-card__head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.saas-dashboard-card__head h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 22px; letter-spacing: -.03em; }
.saas-overline { color: var(--ink-muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.saas-data-badge { height: 28px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 999px; background: #e9f5ed; color: var(--leaf-soft); font-size: 10px; font-weight: 700; }
.saas-data-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf-bright); }
.saas-risk-list { gap: 17px; }
.saas-risk-list .panel__row { grid-template-columns: 92px 1fr 40px; }
.saas-risk-list .panel__bar { height: 8px; border-radius: 999px; background: #e9eeeb; }
.saas-risk-list .panel__fill { border-radius: 999px; }
.saas-dashboard-card__foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 19px; margin-top: 22px; border-top: 1px solid var(--rule); color: var(--ink-muted); font-size: 10.5px; }
.saas-dashboard-card__foot a { color: var(--leaf); font-weight: 700; white-space: nowrap; }
.saas-assistant-card { position: absolute; left: -26px; bottom: 0; width: 380px; display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 15px; padding: 14px 17px 14px 10px; border: 1px solid rgba(205,219,209,.95); border-radius: 18px; background: #fff; box-shadow: 0 16px 42px rgba(18,35,26,.15); }
.saas-assistant-card__image { height: 126px; overflow: hidden; border-radius: 14px; background: linear-gradient(145deg,rgba(11,74,43,.08),rgba(43,138,87,.02)),var(--paper-warm); }
.saas-assistant-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.saas-assistant-card__copy span { display: block; color: var(--leaf-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.saas-assistant-card__copy strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 14px; line-height: 1.25; }
.saas-assistant-card__copy p { margin: 6px 0 8px; color: var(--ink-muted); font-size: 10.5px; line-height: 1.45; }
.saas-assistant-card__copy a { color: var(--leaf); font-size: 11px; font-weight: 800; }

/* Secciones portada */
.saas-section { width: min(var(--w-max), calc(100% - 32px)); margin: 0 auto; padding: 88px 0; }
.saas-proof { background: #fff; border-bottom: 1px solid var(--rule); }
.saas-section__head { max-width: 700px; margin-bottom: 38px; }
.saas-section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.saas-section__head h2 { margin: 8px 0 0; font-family: var(--font-display); font-size: clamp(32px,4vw,46px); line-height: 1.08; letter-spacing: -.045em; }
.saas-section__head p { margin: 16px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.saas-metrics { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden; }
.saas-metric { min-height: 225px; padding: 28px; background: #fff; border-right: 1px solid var(--rule); }
.saas-metric:last-child { border-right: 0; }
.saas-metric__value { display: block; color: var(--leaf); font-size: 31px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.saas-metric h3 { margin: 28px 0 8px; font-family: var(--font-display); font-size: 16px; }
.saas-metric p { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.55; }
.saas-workflow { background: var(--bg); }
.saas-workflow__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.saas-step-card { position: relative; min-height: 300px; padding: 28px; border: 1px solid var(--rule); border-radius: 16px; background: #fff; box-shadow: var(--shadow-xs); }
.saas-step-card__number { position: absolute; top: 22px; right: 24px; color: #a8b7ae; font-family: var(--font-mono); font-size: 11px; }
.saas-step-card__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--paper-warm); color: var(--leaf); font-family: var(--font-mono); font-size: 11px; font-weight: 800; }
.saas-step-card h3 { margin: 26px 0 10px; font-family: var(--font-display); font-size: 21px; letter-spacing: -.025em; }
.saas-step-card p { margin: 0 0 26px; color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.saas-step-card a { position: absolute; left: 28px; bottom: 26px; color: var(--leaf); font-size: 12px; font-weight: 800; }
.saas-cta-section { padding: 0 16px 88px; }
.saas-cta-panel { width: min(var(--w-max),100%); margin: 0 auto; padding: 42px 46px; display: flex; align-items: center; justify-content: space-between; gap: 40px; border-radius: 22px; color: #fff; background: radial-gradient(circle at 90% 20%,rgba(255,255,255,.16),transparent 20rem),linear-gradient(135deg,var(--leaf),#123f36 58%,var(--navy)); box-shadow: 0 22px 52px rgba(11,74,43,.18); }
.saas-cta-panel .saas-overline { color: rgba(255,255,255,.68); }
.saas-cta-panel h2 { margin: 8px 0; font-family: var(--font-display); font-size: 30px; letter-spacing: -.035em; }
.saas-cta-panel p { margin: 0; color: rgba(255,255,255,.76); font-size: 14px; }

/* Footer */
.saas-footer { background: #10251a; color: rgba(255,255,255,.75); }
.saas-footer__inner { width: min(var(--w-max),calc(100% - 32px)); margin: 0 auto; padding: 42px 0 36px; display: grid; grid-template-columns: 1fr auto; gap: 28px 48px; align-items: center; }
.saas-footer__brand { display: flex; align-items: center; gap: 12px; }
.saas-footer__brand img { width: 34px; height: 34px; filter: brightness(0) invert(1); opacity: .9; }
.saas-footer__brand div { display: flex; flex-direction: column; }
.saas-footer__brand strong { color: #fff; font-family: var(--font-display); font-size: 15px; }
.saas-footer__brand span { margin-top: 3px; font-size: 11px; color: rgba(255,255,255,.55); }
.saas-footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.saas-footer__links a { color: rgba(255,255,255,.7); font-size: 12px; }
.saas-footer__legal { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.46); font-size: 11px; }

/* Normalización de módulos existentes */
.page-title, .section-title, .detail__title, .diag__output-class, .vali__h2, .pres__sec-title, .impact-comp__title { font-family: var(--font-display); }
.page-title { font-weight: 700; letter-spacing: -.045em; }
.btn { border-radius: var(--radius-control); font-family: var(--font-body); font-weight: 700; }
.riesgo-card, .diag__result, .diag__group, .impacto__form, .impacto__placeholder, .impact-card, .vali__panel, .vali__form-wrap, .aerea__upload, .aerea__map-wrap { background: var(--paper); border-color: var(--rule); border-radius: var(--radius-card); box-shadow: var(--shadow-xs); }
.riesgo-card { animation: none !important; }
.riesgo-card__value, .detail__big, .metric__value, .comp__value, .wx-cell__value, .retro-stat__num, .vali__stat-num, .aerea__sum-num, .impact-card__value, .impact-hero__big { font-family: var(--font-body); font-weight: 700; font-variant-numeric: tabular-nums; }
.diag__drop:hover { background: #f0f8f3; border-color: var(--leaf-bright); }
.diag__drop--dragging { background: #e5f3e9; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(43,138,87,.10); }
.live-clock::before { content: none !important; }
.live-badge__dot, .status-strip__dot, .sparkline__line, .sparkline__dot { animation: none !important; }

@media (max-width: 1040px) {
  .saas-header__cta { display: none; }
  .saas-brand { min-width: 190px; }
  .saas-hero__inner { grid-template-columns: 1fr; min-height: auto; padding-top: 62px; }
  .saas-hero__copy { max-width: 760px; }
  .saas-hero__visual { min-height: 550px; justify-content: center; }
  .saas-assistant-card { left: 4%; }
}
@media (max-width: 820px) {
  .saas-header__inner { height: 66px; }
  .saas-menu-btn { display: block; margin-left: auto; }
  .saas-nav { position: absolute; top: 66px; left: 16px; right: 16px; display: none; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; background: #fff; border: 1px solid var(--rule); border-radius: 14px; box-shadow: var(--shadow-md); }
  .saas-nav.is-open { display: flex; }
  .saas-nav a { padding: 12px; }
  .saas-metrics { grid-template-columns: 1fr 1fr; }
  .saas-metric:nth-child(2) { border-right: 0; }
  .saas-metric:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .saas-workflow__grid { grid-template-columns: 1fr; }
  .saas-step-card { min-height: 250px; }
}
@media (max-width: 620px) {
  .saas-brand__copy small { display: none; }
  .saas-brand { min-width: 0; }
  .saas-hero__inner { width: min(100% - 24px,var(--w-max)); padding: 48px 0 66px; gap: 42px; }
  .saas-hero__title { font-size: 45px; }
  .saas-hero__lede { font-size: 16px; }
  .saas-trust-row { gap: 16px; }
  .saas-hero__visual { display: block; min-height: auto; }
  .saas-dashboard-card { padding: 20px; }
  .saas-dashboard-card__foot { flex-direction: column; }
  .saas-assistant-card { position: relative; left: auto; bottom: auto; width: 100%; margin-top: 16px; grid-template-columns: 100px 1fr; }
  .saas-metrics { grid-template-columns: 1fr; }
  .saas-metric { min-height: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .saas-metric:last-child { border-bottom: 0; }
  .saas-cta-panel { padding: 32px 24px; flex-direction: column; align-items: flex-start; }
  .saas-footer__inner { grid-template-columns: 1fr; }
}

/* ============================================================
   FIX FINAL DE CONTENEDORES — IMPACTO, MAPA Y PÁGINAS INTERNAS
   Mantener este bloque al final absoluto del archivo.
   ============================================================ */

.site-main > .impacto,
.site-main > .aerea,
.site-main > .riesgo,
.site-main > .diag,
.site-main > .lote,
.site-main > .vali,
.site-main > .meto,
.site-main > .pres {
  box-sizing: border-box;
  width: 100%;
  max-width: 1248px;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Corrige el ancho útil de los encabezados */
.site-main > .impacto > .impacto__head,
.site-main > .aerea > .aerea__head,
.site-main > .riesgo > .riesgo__head,
.site-main > .diag > .diag__head,
.site-main > .lote > .diag__head,
.site-main > .vali > .vali__head,
.site-main > .meto > .meto__head,
.site-main > .pres > .pres__head {
  width: 100%;
  max-width: 820px;
  margin-left: 0;
  margin-right: 0;
}

/* Evita que las columnas internas desborden */
.site-main > .impacto *,
.site-main > .aerea *,
.site-main > .riesgo *,
.site-main > .diag *,
.site-main > .lote *,
.site-main > .vali *,
.site-main > .meto *,
.site-main > .pres * {
  min-width: 0;
}

.impacto__layout,
.aerea__layout,
.diag__layout,
.vali__layout {
  width: 100%;
  max-width: 100%;
}

/* Integración visual del encabezado del mapa */
.site-main > .aerea > .aerea__head {
  position: relative;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  overflow: visible;
}

.site-main > .aerea > .aerea__head::before,
.site-main > .aerea > .aerea__head::after {
  display: none !important;
}

.site-main > .aerea > .aerea__head .section-eyebrow {
  color: var(--leaf-soft);
}

.site-main > .aerea > .aerea__head .page-title {
  color: var(--ink);
}

.site-main > .aerea > .aerea__head .page-lede {
  color: var(--ink-soft);
  max-width: 760px;
}

/* Paneles principales */
.impacto__form,
.impacto__placeholder,
.impacto__result > div,
.impacto__result > section,
.aerea__upload,
.aerea__map-wrap {
  border-radius: 16px;
}

.aerea__map-wrap,
.aerea__map {
  min-height: 520px;
}

.aerea__map {
  height: 520px;
}

/* Escritorio ancho */
@media (min-width: 1280px) {
  .site-main > .impacto,
  .site-main > .aerea,
  .site-main > .riesgo,
  .site-main > .diag,
  .site-main > .lote,
  .site-main > .vali,
  .site-main > .meto,
  .site-main > .pres {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .site-main > .impacto,
  .site-main > .aerea,
  .site-main > .riesgo,
  .site-main > .diag,
  .site-main > .lote,
  .site-main > .vali,
  .site-main > .meto,
  .site-main > .pres {
    max-width: none;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .impacto__layout,
  .aerea__layout,
  .diag__layout,
  .vali__layout {
    grid-template-columns: 1fr !important;
  }
}

/* Móvil */
@media (max-width: 600px) {
  .site-main > .impacto,
  .site-main > .aerea,
  .site-main > .riesgo,
  .site-main > .diag,
  .site-main > .lote,
  .site-main > .vali,
  .site-main > .meto,
  .site-main > .pres {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .aerea__map-wrap,
  .aerea__map {
    min-height: 400px;
    height: 400px;
  }
}

/* ============================================================
   SIGATOKALERT — CONTENEDOR UNIVERSAL DEFINITIVO
   Evita depender de la clase del elemento <main>.
   ============================================================ */
html body main section.impacto,
html body main section.aerea,
html body main section.riesgo,
html body main section.diag,
html body main section.lote,
html body main section.vali,
html body main section.meto,
html body main section.pres {
  box-sizing: border-box !important;
  display: block !important;
  width: calc(100% - 64px) !important;
  max-width: 1240px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Espacio superior e inferior consistente */
html body main section.impacto,
html body main section.aerea,
html body main section.riesgo,
html body main section.diag,
html body main section.lote,
html body main section.vali,
html body main section.meto,
html body main section.pres {
  padding-top: clamp(40px, 5vw, 68px) !important;
  padding-bottom: clamp(64px, 7vw, 92px) !important;
}

/* El contenido interno nunca puede exceder el contenedor */
html body main section.impacto > *,
html body main section.aerea > *,
html body main section.riesgo > *,
html body main section.diag > *,
html body main section.lote > *,
html body main section.vali > *,
html body main section.meto > *,
html body main section.pres > * {
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Encabezados operativos */
html body main section.impacto .impacto__head,
html body main section.aerea .aerea__head,
html body main section.riesgo .riesgo__head,
html body main section.diag .diag__head,
html body main section.vali .vali__head,
html body main section.meto .meto__head {
  width: 100% !important;
  max-width: 820px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 36px !important;
}

/* Layouts internos */
html body .impacto__layout,
html body .aerea__layout,
html body .diag__layout,
html body .vali__layout {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 900px) {
  html body main section.impacto,
  html body main section.aerea,
  html body main section.riesgo,
  html body main section.diag,
  html body main section.lote,
  html body main section.vali,
  html body main section.meto,
  html body main section.pres {
    width: calc(100% - 40px) !important;
  }
}

@media (max-width: 600px) {
  html body main section.impacto,
  html body main section.aerea,
  html body main section.riesgo,
  html body main section.diag,
  html body main section.lote,
  html body main section.vali,
  html body main section.meto,
  html body main section.pres {
    width: calc(100% - 24px) !important;
    padding-top: 32px !important;
    padding-bottom: 56px !important;
  }
}
