/* 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 {
  --bg: #FAF5EB;
  --paper: #F2EAD9;
  --rule: #D9CFB8;
  --ink: #1A1F1B;
  --ink-soft: #4A4F46;
  --ink-muted: #7A7569;

  --leaf: #1F3D2B;
  --leaf-soft: #2D5A3F;
  --leaf-hair: rgba(31, 61, 43, 0.12);

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

  --risk-vlow:  #6B8E5A;
  --risk-low:   #9CAF4A;
  --risk-mid:   #D9A53A;
  --risk-high:  #C8541C;
  --risk-crit:  #8E2410;

  --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 {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 28px;
  font-family: var(--font-mono);
}

.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: var(--ink);
  color: rgba(250, 245, 235, 0.7);
}

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

.page-footer__lead {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--bg);
  margin: 0 0 8px 0;
}

.page-footer__meta {
  font-size: 13.5px;
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.page-footer__rule {
  height: 1px;
  background: rgba(250, 245, 235, 0.12);
  margin: 0 0 16px 0;
}

.page-footer__small {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  margin: 0;
  color: rgba(250, 245, 235, 0.5);
}

/* ============================================================
   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-muted);
  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;
  color: var(--ink-soft);
}

.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--noes { color: var(--ink-muted); }

.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__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__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.2fr;
  gap: 28px;
  margin-top: 28px;
}

.impacto__form { min-width: 0; }

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

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

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

.param__input {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  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: 24px; background: var(--paper); border-radius: 12px; }
.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; }
}
