/* ========================================
   AVALÚA.GT — Design System
   Palette: Midnight navy + warm gold + ivory
   ======================================== */

:root {
  --ink: #0A1628;
  --ink-soft: #1A2942;
  --gold: #C9A961;
  --gold-deep: #A68842;
  --emerald: #1B4332;
  --terracotta: #B46654;
  --ivory: #FAFAF7;
  --paper: #F4F1EA;
  --line: #E8E3D8;
  --muted: #6B7280;
  --text: #1A1A1A;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.04), 0 2px 6px rgba(10, 22, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.06), 0 12px 32px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 20px 48px rgba(10, 22, 40, 0.12);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-xl: 32px;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" on, "cv11" on, "kern" on;
  font-optical-sizing: auto;
}
.display,
.h2,
.h2 em,
.display em {
  font-optical-sizing: auto;
  font-feature-settings: "ss01" on, "dlig" on, "kern" on, "liga" on;
  text-wrap: balance;
}
code, pre,
.adoc-n, .adoc-k,
.nav-plat-k,
.fuentes-inner,
.foot-plat-inner {
  font-feature-settings: "calt" on, "ss01" on, "zero" on;
}
[class*="-val"],
[class*="stat-num"],
[class*="pu-num"],
.adoc-val,
.zr-marker,
.zf-val,
.zf-mix-val,
.cov-n {
  font-variant-numeric: tabular-nums;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ================== TYPOGRAPHY ================== */
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}
.h2.white { color: var(--ivory); }

.lede {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 560px;
  margin-top: 1.5rem;
}
.lede strong { color: var(--ink); font-weight: 600; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 2rem;
}
.kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.15);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}
/* Section tag reads like a plat-code header — leading diamond + dashed underline echoes the .adoc-plat row. */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding: 0 4px 10px;
  margin-bottom: 18px;
  border-bottom: 1px dashed rgba(168, 136, 66, 0.38);
}
.section-tag::before {
  content: '◆';
  font-size: 0.62rem;
  color: var(--gold);
  opacity: 0.7;
  transform: translateY(-1px);
}
/* Subtitle = italic Fraunces in warm ink — matches .adoc-rk / .adoc-note voice, not generic body copy. */
.section-sub {
  margin: 1.4rem auto 0;
  max-width: 620px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  text-wrap: balance;
}
.section-sub strong {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}

/* ================== BUTTONS ================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: transform 200ms, background 200ms, color 200ms, box-shadow 200ms;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 0.875rem; }
.btn-lg { padding: 18px 30px; font-size: 1.02rem; }

.btn-primary {
  background: var(--ink);
  color: var(--ivory);
}
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--ivory); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }

.btn-dark {
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-dark:hover { background: var(--gold); color: var(--ink); }

.btn-light {
  background: var(--ivory);
  color: var(--ink);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ================== NAV · LETTERHEAD ================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 247, 0.88);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 28px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav-emissor {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}
.nav-plat-k {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--gold-deep);
  font-weight: 600;
  text-transform: uppercase;
}
.nav-emissor-sub {
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.nav-emissor-sub em {
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color 180ms;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.nav-links a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  font-weight: 600;
  opacity: 0.75;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover i { opacity: 1; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--gold-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a::after { right: 0; }

.nav-cta {
  color: var(--ink) !important;
  font-weight: 600 !important;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.nav-cta::after {
  background: var(--emerald) !important;
  transform: scaleX(1) !important;
  left: 16px !important;
  height: 1.5px !important;
}
.nav-cta:hover { color: var(--emerald) !important; }

/* Mobile nav toggle — hidden on desktop */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: border-color 180ms, background 180ms;
}
.nav-toggle:hover { border-color: var(--ink-soft); background: var(--paper); }
.nav-toggle:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.nav-toggle-k { color: var(--gold-deep); }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 14px;
  height: 10px;
}
.nav-toggle-bars i {
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 200ms, opacity 200ms;
  transform-origin: center;
}
.nav.is-open .nav-toggle-bars i:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }
.nav-drawer-k { display: none; }

/* ================== HERO ================== */
.hero {
  position: relative;
  padding: 96px 0 120px;
  overflow: hidden;
  background: var(--ivory);
}
/* Cadastral grid — survey document aesthetic */
.hero-grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(10, 22, 40, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 22, 40, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, black 40%, transparent 100%);
}
.hero-corner {
  position: absolute;
  color: var(--gold-deep);
  opacity: 0.5;
  pointer-events: none;
}
.hero-corner-tl { top: 24px; left: 24px; }
.hero-corner-tr { top: 24px; right: 24px; }

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
  align-items: center;
}
.hero-cta { display: flex; gap: 14px; margin-top: 2.4rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  gap: 0;
}
.hero-stats .stat-item {
  flex: 1;
  padding-right: 28px;
  margin-right: 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stats .stat-item:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}
.stat-item .stat-k {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.stat-item .stat-num {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1;
  font-variant-numeric: tabular-nums oldstyle-nums;
}

/* ================== ZONA FINGERPRINT — signature ================== */
.zona-fingerprint {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 26px 20px;
  box-shadow:
    0 1px 0 var(--line),
    0 24px 48px -24px rgba(10, 22, 40, 0.18);
  font-family: var(--sans);
}
.zona-fingerprint::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(10, 22, 40, 0.08);
  border-radius: 2px;
  pointer-events: none;
}

.zf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.zf-plat { display: flex; align-items: baseline; gap: 10px; }
.zf-plat-k {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.zf-plat-n {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.zf-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  padding: 5px 9px 4px;
  border: 1px solid rgba(27, 67, 50, 0.3);
  border-radius: 2px;
  background: rgba(27, 67, 50, 0.04);
}
.zf-stamp svg { stroke: currentColor; }

.zf-body { display: flex; flex-direction: column; gap: 22px; }

.zf-zone {
  display: flex;
  align-items: center;
  gap: 16px;
}
.zf-zone-n {
  font-family: var(--serif);
  font-size: 4.2rem;
  font-weight: 500;
  line-height: 0.9;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-variant-numeric: oldstyle-nums;
}
.zf-zone-meta { display: flex; flex-direction: column; gap: 4px; }
.zf-k {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.zf-zone-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-soft);
}

.zf-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.zf-val {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ==== ZONA RIBBON — signature component ==== */
.zona-ribbon { display: flex; flex-direction: column; gap: 8px; }
.zr-scale,
.zr-values {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.zr-scale > span:nth-child(2) { text-align: center; color: var(--gold-deep); }
.zr-scale > span:last-child { text-align: right; }
.zr-values {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.zr-values > span:last-child { text-align: right; }
.zr-track {
  position: relative;
  height: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.zr-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(27, 67, 50, 0.25) 0%,
    rgba(201, 169, 97, 0.35) 50%,
    rgba(180, 102, 84, 0.25) 100%);
}
.zr-tick-med {
  position: absolute;
  top: -4px; bottom: -4px;
  left: 50%;
  width: 1.5px;
  background: var(--gold-deep);
  transform: translateX(-50%);
}
.zr-marker {
  position: absolute;
  top: -6px; bottom: -6px;
  left: 50%;
  width: 3px;
  background: var(--ink);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--ink);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: left 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Type mix segmented bar */
.zf-mix { display: flex; flex-direction: column; gap: 10px; }
.zf-mix-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.zf-mix-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.tm-bar {
  display: flex;
  height: 6px;
  border-radius: 1px;
  overflow: hidden;
  background: var(--paper);
}
.tm-seg {
  display: block;
  height: 100%;
  transition: width 600ms ease-out;
}
.tm-apto { background: var(--ink); }
.tm-casa { background: var(--gold-deep); }
.tm-ter  { background: var(--emerald); }
.tm-ofi  { background: var(--terracotta); }

.tm-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.tm-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tm-legend i {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 1px;
}
.tm-legend b {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.zf-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}
.zf-coord {
  font-family: var(--mono);
  letter-spacing: 0;
  text-transform: none;
}
.zf-sig { color: var(--gold-deep); font-weight: 600; }

/* ================== FUENTES · PLAT LINE ================== */
/* Fuentes strip — reads as a certified-sources seal, not a generic logo marquee.
   Dashed top-border echoes .adoc-plat row; emerald stamp ties it to the doc language. */
.fuentes {
  border-top: 1px dashed rgba(168, 136, 66, 0.35);
  border-bottom: 1px dashed rgba(168, 136, 66, 0.35);
  background: var(--paper);
  padding: 14px 0;
}
.fuentes-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
}
.fuentes-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
  font-weight: 600;
  letter-spacing: 0.16em;
  flex-shrink: 0;
  padding-right: 12px;
  border-right: 1px solid rgba(27, 67, 50, 0.18);
}
.fuentes-stamp svg { stroke: currentColor; }
.fuentes-k {
  color: var(--gold-deep);
  font-weight: 600;
  flex-shrink: 0;
}
.fuentes-dots {
  color: var(--line);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.fuentes-list {
  display: flex;
  gap: 14px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.fuentes-list span {
  position: relative;
  color: var(--ink);
  font-weight: 500;
}
.fuentes-list span:not(:last-child)::after {
  content: '·';
  position: absolute;
  right: -10px;
  top: 0;
  color: var(--line);
}
.fuentes-n {
  color: var(--ink-soft);
  flex-shrink: 0;
  font-weight: 500;
}
.fuentes-n b {
  color: var(--gold-deep);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ================== COBERTURA — ZONES MAP ================== */
.cobertura {
  padding: 120px 0;
  background: var(--ivory);
  border-top: 1px solid var(--line);
}
.cov-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  max-width: 1180px;
  margin: 56px auto 0;
  align-items: start;
}
.cov-map-wrap { padding: 18px 18px 14px; }
.cov-map-wrap .adoc-head { padding-left: 8px; padding-right: 8px; }
.cov-map {
  height: 520px;
  width: 100%;
  border-radius: 2px;
  margin-top: 14px;
  background: #f2efe8;
  overflow: hidden;
  position: relative;
}
.cov-map::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px dashed rgba(10, 22, 40, 0.08);
  margin: 6px;
  border-radius: 2px;
  z-index: 500;
}
.cov-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 8px 4px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.cov-leg-item { display: inline-flex; align-items: center; gap: 8px; }
.cov-leg-item i {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
  opacity: 0.75;
}

.cov-ledger {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 24px 20px;
  box-shadow: 0 1px 0 rgba(10,22,40,0.02), 0 6px 24px -14px rgba(10,22,40,0.08);
  position: relative;
}
.cov-ledger::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--line);
  border-radius: 2px;
  pointer-events: none;
}
.cov-ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 8px;
  position: relative;
}
.cov-lh-k {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gold-deep);
}
.cov-lh-n {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.cov-list {
  list-style: none;
  padding: 0 4px;
  margin: 0;
  position: relative;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cov-list::-webkit-scrollbar { width: 6px; }
.cov-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.cov-row.is-hidden { display: none; }
.cov-row {
  display: grid;
  grid-template-columns: 24px 1fr 54px 48px 46px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 0.84rem;
}
.cov-row:last-child { border-bottom: none; }
.cov-rank {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.cov-zname {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}
.cov-bar {
  display: block;
  height: 4px;
  background: rgba(10, 22, 40, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
.cov-bar i {
  display: block;
  height: 100%;
  opacity: 0.7;
  border-radius: 2px;
}
.cov-nlist {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cov-pm2 {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--gold-deep);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cov-ledger-foot {
  display: flex;
  justify-content: space-between;
  padding: 14px 4px 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Leaflet tooltip override */
.cov-tooltip {
  background: var(--ink) !important;
  border: 1px solid var(--gold-deep) !important;
  border-radius: 2px !important;
  padding: 8px 10px !important;
  box-shadow: 0 6px 20px -8px rgba(10,22,40,0.3) !important;
  color: var(--ivory) !important;
  font-family: var(--sans) !important;
  font-size: 0.8rem !important;
}
.cov-tooltip::before { display: none !important; }
.cov-tip { display: flex; flex-direction: column; gap: 3px; line-height: 1.35; }
.cov-tip-z { font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: var(--gold); }
.cov-tip-n { font-family: var(--mono); font-size: 0.7rem; color: rgba(250,250,247,0.75); letter-spacing: 0.04em; }
.cov-tip-p { font-family: var(--mono); font-size: 0.78rem; color: var(--ivory); font-weight: 600; }

/* ================== ANATOMY OF AN AVALÚO ================== */
.how { padding: 120px 0; background: var(--paper); }

.anatomy {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

/* The mini avalúo document */
.adoc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 24px;
  box-shadow:
    0 1px 0 var(--line),
    0 30px 60px -30px rgba(10, 22, 40, 0.2);
  position: relative;
}
.adoc::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(10, 22, 40, 0.08);
  border-radius: 2px;
  pointer-events: none;
}

.adoc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.adoc-plat { display: flex; align-items: baseline; gap: 10px; }
.adoc-k {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold-deep);
  font-weight: 500;
}
.adoc-n {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.adoc-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--emerald);
  letter-spacing: 0.04em;
  transition: color 0.6s ease, opacity 0.6s ease;
}

/* Each region in the mini document */
.adoc-region {
  padding: 14px 10px;
  margin: 0 -10px;
  border-radius: 3px;
  position: relative;
  transition: background 240ms;
}
.adoc-region + .adoc-region {
  margin-top: 6px;
  border-top: 1px dashed var(--line);
  padding-top: 16px;
}
.adoc-region::before {
  content: attr(data-region);
  position: absolute;
  top: 14px;
  left: -26px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--gold-deep);
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.5;
  transition: opacity 240ms, transform 240ms;
}
.adoc-region:hover,
.adoc-region.is-active {
  background: rgba(201, 169, 97, 0.06);
}
.adoc-region:hover::before,
.adoc-region.is-active::before {
  opacity: 1;
  transform: scale(1.1);
}
.adoc-rk {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.adoc-rk em {
  font-style: normal;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
}

/* Region 1 — inputs grid */
.adoc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 20px;
}
.adoc-inputs > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
}
.adoc-inputs span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.adoc-inputs b {
  font-family: var(--sans);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.88rem;
}

/* Region 2 — comparables list */
.adoc-comps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adoc-comp {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--paper);
  border-radius: 2px;
  overflow: hidden;
}
.adoc-comp i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(201, 169, 97, 0.18);
  border-right: 1px solid rgba(201, 169, 97, 0.5);
}
.adoc-comp span { position: relative; }
.adoc-comp b {
  position: relative;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
}

/* Region 3 — verdict */
.adoc-verdict { display: flex; flex-direction: column; gap: 10px; }
.adoc-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.adoc-vk {
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.adoc-val {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.adoc-range {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.adoc-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--emerald);
}

/* ============================================================
   ELIGIBILITY CHIPS · CHN Mi Primera Casa + disclaimer
   Inline pill row rendered below the verdict after a calc.
   Monochrome by default; emerald when elegible, terracotta
   when over-cap. Keeps the .adoc visual language (mono codes,
   small caps, quiet borders) consistent with the rest.
   ============================================================ */
.adoc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 12px;
}
.adoc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink);
  line-height: 1.2;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.adoc-chip-k {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  font-style: normal;
  padding: 2px 6px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 2px;
  background: rgba(201, 169, 97, 0.08);
  line-height: 1;
}
.adoc-chip-lbl { font-weight: 500; }
.adoc-chip-val {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

/* Eligible state — emerald, quiet */
.adoc-chip[data-state="ok"] {
  border-color: rgba(27, 67, 50, 0.3);
  background: rgba(27, 67, 50, 0.05);
}
.adoc-chip[data-state="ok"] .adoc-chip-k {
  color: var(--emerald);
  border-color: rgba(27, 67, 50, 0.35);
  background: rgba(27, 67, 50, 0.08);
}
.adoc-chip[data-state="ok"] .adoc-chip-val {
  color: var(--emerald);
  border-left-color: rgba(27, 67, 50, 0.2);
}

/* Over-cap — terracotta, still restrained */
.adoc-chip[data-state="over"] {
  border-color: rgba(180, 102, 84, 0.35);
  background: rgba(180, 102, 84, 0.05);
}
.adoc-chip[data-state="over"] .adoc-chip-k {
  color: var(--terracotta);
  border-color: rgba(180, 102, 84, 0.35);
  background: rgba(180, 102, 84, 0.08);
}
.adoc-chip[data-state="over"] .adoc-chip-val {
  color: var(--terracotta);
  border-left-color: rgba(180, 102, 84, 0.2);
}

/* Muted variant — the "referencial · no oficial" disclaimer chip */
.adoc-chip-muted {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}
.adoc-chip-muted .adoc-chip-k {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

/* On pending (empty-state) the chips are hidden via [hidden]; when live,
   desaturate them the same way we desaturate the rest. */
.adoc.is-pending .adoc-chips { display: none; }

@media (max-width: 480px) {
  .adoc-chip { font-size: 0.74rem; padding: 5px 10px 5px 6px; }
  .adoc-chip-k { font-size: 0.56rem; padding: 2px 5px; }
}

/* Zona ribbon — small variant */
.zona-ribbon-sm .zr-track { height: 8px; }
.zona-ribbon-sm .zr-marker { top: -4px; bottom: -4px; }

/* Callouts column */
.anatomy-callouts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  counter-reset: ca;
}
.anatomy-callouts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px 20px;
  align-items: start;
  padding: 20px 4px 20px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.anatomy-callouts li:first-child { border-top: none; padding-top: 0; }
.cb-num {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gold-deep);
  background: #fff;
  border: 1px solid var(--gold-deep);
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 2px;
}
.anatomy-callouts h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.anatomy-callouts p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
  grid-column: 2;
}

/* ================== COMPARE — DUAL RECEIPT ================== */
.compare { padding: 130px 0; background: var(--ivory); }
.receipts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.receipt {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px 26px 18px;
  position: relative;
  box-shadow:
    0 1px 0 var(--line),
    0 18px 48px -28px rgba(10, 22, 40, 0.16);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
}
/* subtle perforated top edge — receipt feel */
.receipt::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-image:
    radial-gradient(circle at 4px 0px, transparent 2.5px, var(--line) 2.5px, var(--line) 3px, transparent 3px);
  background-size: 8px 4px;
  background-position: 0 -2px;
  opacity: 0.6;
}

.rc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.rc-from { display: flex; flex-direction: column; gap: 2px; }
.rc-k {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.rc-v {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 500;
}
.rc-ref {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.rc-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.rc-lines {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.rc-lines td {
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}
.rc-lines td:first-child {
  color: var(--muted);
  font-weight: 400;
}
.rc-val {
  text-align: right;
  font-family: var(--mono);
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.rc-val em {
  font-family: var(--sans);
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 400;
}
.rc-total-row td {
  padding-top: 14px;
  border-bottom: none;
  border-top: 1px solid var(--line);
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}
.rc-total-val {
  font-family: var(--mono);
  font-size: 1.1rem;
}

.rc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px dashed var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.rc-wm { font-style: italic; color: var(--muted); letter-spacing: 0.04em; text-transform: none; font-family: var(--serif); }
.rc-stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--emerald);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: none;
}
.rc-sig { color: var(--gold-deep); font-weight: 600; }

/* Traditional — stamped "slow" look */
.receipt-old {
  opacity: 0.92;
}
.receipt-old::after {
  content: 'LENTO';
  position: absolute;
  top: 32px; right: 18px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2.2rem;
  font-weight: 400;
  color: rgba(180, 102, 84, 0.14);
  letter-spacing: 0.08em;
  transform: rotate(-8deg);
  pointer-events: none;
  border: 2px solid rgba(180, 102, 84, 0.18);
  padding: 4px 12px;
  border-radius: 4px;
}
.receipt-old .rc-total-val { color: var(--terracotta); }

/* AvaluoGT — slight elevation, fresh stamp */
.receipt-new {
  border-color: rgba(27, 67, 50, 0.25);
  transform: translateY(-6px);
}
.receipt-new .rc-title { color: var(--ink); }
.receipt-new .rc-total-val { color: var(--emerald); }

.compare-foot {
  text-align: center;
  max-width: 680px;
  margin: 56px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.compare-foot em {
  color: var(--ink);
  font-weight: 500;
  font-style: normal;
}

/* ================== AVALUO — MERGED ADOC ================== */
.avaluo { padding: 130px 0; }

/* Merged adoc: form (region 1) + output (regions 2+3) in one document */
.adoc-merged {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0;
}
.adoc-merged .adoc-head {
  margin: 0;
  padding: 22px 32px 14px;
}
.adoc-merged .adoc-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
}
.adoc-merged .adoc-region {
  padding: 28px 32px 28px 56px;
  margin: 0;
}
.adoc-merged .adoc-region::before {
  left: 20px;
  top: 30px;
}

/* Region 1 — form */
.adoc-region-form {
  border-right: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  padding-bottom: 28px;
}
.adoc-region-form .adoc-rk em {
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82em;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  margin-left: 4px;
}

.adoc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-top: 18px;
  margin-bottom: 22px;
}
.adoc-fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.adoc-fld-full { grid-column: 1 / -1; }
.adoc-fld > span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.adoc-fld input,
.adoc-fld select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.96rem;
  padding: 6px 0 8px;
  transition: border-bottom-color 180ms;
  appearance: none;
  -webkit-appearance: none;
}
.adoc-fld select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><path d='M3 5.5l4 4 4-4' stroke='%23A68842' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: right 2px center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
  padding-right: 22px;
  cursor: pointer;
}
.adoc-fld select:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><path d='M3 5.5l4 4 4-4' stroke='%231A2942' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.adoc-fld select option { font-family: var(--sans); color: var(--ink); background: var(--ivory); }
.adoc-fld input:focus,
.adoc-fld select:focus {
  outline: none;
  border-bottom-color: var(--emerald);
}
.adoc-fld input:hover,
.adoc-fld select:hover { border-bottom-color: var(--ink-soft); }
/* Inline validation: highlight the missing field in terracotta without a popup. */
.adoc-fld input[aria-invalid="true"],
.adoc-fld select[aria-invalid="true"] {
  border-bottom-color: var(--terracotta);
  color: var(--terracotta);
  animation: field-shake 0.32s ease;
}
@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

/* Radio chips on paper */
.adoc-region-form .radio-row {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.adoc-region-form .radio-chip {
  flex: 1;
  position: relative;
  cursor: pointer;
  margin: 0;
}
.adoc-region-form .radio-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.adoc-region-form .radio-chip span {
  display: block;
  padding: 10px 8px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  transition: all 160ms;
}
.adoc-region-form .radio-chip:hover span { border-color: var(--ink-soft); }
.adoc-region-form .radio-chip input:checked + span {
  background: var(--emerald);
  border-color: var(--emerald);
  color: var(--ivory);
  font-weight: 500;
}

/* Emit button — signs the document */
.adoc-btn {
  margin-top: auto;
  width: 100%;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--ivory);
  border: 1px solid var(--ink);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 180ms, border-color 180ms, transform 120ms;
}
.adoc-btn:hover {
  background: var(--emerald);
  border-color: var(--emerald);
}
.adoc-btn:active { transform: translateY(1px); }
.adoc-btn:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
}

/* Right column — regions 2 & 3 stacked */
.adoc-output {
  display: flex;
  flex-direction: column;
}
.adoc-output .adoc-region + .adoc-region {
  border-top: 1px dashed var(--line);
}

/* Pending modifier — applied to .adoc until calc runs */
.adoc.is-pending .adoc-stamp { color: var(--muted); opacity: 0.75; }
/* When .is-pending drops, docVal + note transition back to ink — reads as "document signs itself". */
.adoc-val, .adoc-range, .adoc-note { transition: color 0.6s ease, opacity 0.6s ease; }
.adoc.is-pending .adoc-val {
  color: var(--muted);
  opacity: 0.55;
}
.adoc.is-pending .adoc-val { font-variant-numeric: tabular-nums; }
.adoc.is-pending .adoc-range { color: var(--muted); opacity: 0.7; }
.adoc.is-pending .adoc-note {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
}
.adoc.is-pending .adoc-note strong {
  color: var(--ink-soft);
  font-weight: 500;
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--paper);
  padding: 1px 8px;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.adoc.is-pending .adoc-region::before { opacity: 0.3; }
.adoc.is-pending .zr-marker {
  background: var(--muted);
  opacity: 0.4;
}

/* Placeholder comp rows — dotted waiting lines */
.adoc-comp.placeholder {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.adoc-comp.placeholder span {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  color: var(--line);
  font-size: 0.78rem;
}
.adoc-comp.placeholder b {
  color: var(--muted);
  opacity: 0.6;
}

/* Result populated */

/* ================== ZONES ================== */
.zonas { padding: 130px 0; background: var(--paper); }
.zone-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.zone-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: all 180ms;
}
.chip:hover { border-color: var(--ink); }
.chip-active {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}
.zone-search {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 0.9rem;
  min-width: 240px;
  font-family: var(--sans);
}
.zone-search:focus { outline: none; border-color: var(--ink); }

.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.zone-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  cursor: pointer;
  transition: all 280ms;
  position: relative;
  overflow: hidden;
}
.zone-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--seg-color, var(--gold));
  transition: width 280ms;
}
.zone-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink);
}
.zone-card:hover::before { width: 8px; }
.zc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.zc-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.zc-seg {
  font-size: 0.7rem;
  padding: 4px 8px;
  background: var(--seg-bg, var(--paper));
  color: var(--seg-color, var(--gold-deep));
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.zc-price {
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 6px;
}
.zc-price small {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}
.zc-meta {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
.zc-meta span { color: var(--muted); }
.zc-meta b { color: var(--ink); font-weight: 600; font-family: var(--mono); }

/* ================== INSIGHTS ================== */
.insights { padding: 130px 0; }
.insight-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-bottom: 40px;
}
.insight-grid-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
}
.insight-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.insight-card.big { grid-row: span 2; }
.insight-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.insight-sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.chart-wrap { position: relative; height: 280px; }
.insight-card.big .chart-wrap { height: 460px; }

.suspect-card {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: var(--ivory);
  padding: 36px 40px;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.suspect-card::before {
  content: '◆';
  position: absolute;
  top: -40px; right: -40px;
  font-size: 260px;
  color: rgba(201, 169, 97, 0.05);
  transform: rotate(15deg);
}
.suspect-head { display: flex; align-items: center; gap: 14px; }
.suspect-head h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pulse {
  width: 10px; height: 10px;
  background: var(--terracotta);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(180, 102, 84, 0.3);
  animation: pulse 1.8s infinite;
}
.suspect-card p {
  color: rgba(250, 250, 247, 0.8);
  max-width: 640px;
  font-size: 0.98rem;
  line-height: 1.6;
}
.suspect-card .btn-ghost {
  align-self: flex-start;
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.4);
}
.suspect-card .btn-ghost:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* ================== LISTINGS ================== */
.listados { padding: 130px 0; background: var(--paper); }
.list-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
  background: var(--ivory);
  padding: 18px 24px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.select {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
  font-family: var(--sans);
  color: var(--ink);
  min-width: 160px;
}
.select:focus { outline: none; border-color: var(--ink); }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  padding: 8px 14px;
  background: #fff;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.toggle input { accent-color: var(--ink); }

.count {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--mono);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.listing-card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 280ms, box-shadow 280ms;
  cursor: pointer;
  position: relative;
}
.listing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.listing-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--ink), var(--ink-soft));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.listing-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201, 169, 97, 0.28), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(180, 102, 84, 0.22), transparent 45%);
}
.listing-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent 0, transparent 14px,
    rgba(250, 250, 247, 0.03) 14px, rgba(250, 250, 247, 0.03) 15px
  );
}
.listing-thumb .tipo-badge {
  position: relative;
  z-index: 2;
  font-size: 0.72rem;
  padding: 5px 10px;
  background: rgba(250, 250, 247, 0.94);
  color: var(--ink);
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.listing-thumb .suspect-badge {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  font-size: 0.68rem;
  padding: 4px 9px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.listing-body { padding: 20px; }
.listing-zona {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.listing-price {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.listing-pm2 {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--gold-deep);
  margin-top: 4px;
}
.listing-specs {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.listing-specs span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.listing-specs b { color: var(--ink); font-weight: 600; }

.list-more { text-align: center; margin-top: 32px; }

/* ================== MAP ================== */
.mapa { padding: 130px 0; }
.leaflet-shell {
  height: 560px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  z-index: 1;
}
.map-legend {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.map-legend i {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* ================== PRICING ================== */
.pricing { padding: 130px 0; background: var(--paper); }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.plans-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  max-width: 1320px;
  gap: 20px;
}
.plan {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  transition: transform 280ms, box-shadow 280ms;
  position: relative;
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.plan-featured {
  background: var(--ink);
  color: var(--ivory);
  transform: scale(1.04);
  border-color: var(--ink);
  box-shadow: 0 30px 60px rgba(10, 22, 40, 0.2);
}
.plan-featured:hover { transform: scale(1.04) translateY(-6px); }
.plan-featured .plan-head h3 { color: var(--ivory); }
.plan-featured .plan-desc { color: rgba(250, 250, 247, 0.6); }
.plan-featured .plan-features li { color: rgba(250, 250, 247, 0.88); border-color: rgba(250, 250, 247, 0.08); }
.plan-featured .plan-features li.muted { color: rgba(250, 250, 247, 0.35); }
.plan-featured .plan-features li i { color: var(--gold); background: rgba(201, 169, 97, 0.12); }
.plan-featured .plan-features li.muted i { color: rgba(250, 250, 247, 0.3); background: rgba(250, 250, 247, 0.05); }

.plan-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; position: relative; }
.plan-featured .plan-head { border-color: rgba(250, 250, 247, 0.1); }

/* Plan folio — mini plat code tying each card to the document world */
.plan-folio {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.plan-folio em {
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.18em;
}
.plan-featured .plan-folio { color: var(--gold); border-bottom-color: rgba(250, 250, 247, 0.12); }
.plan-featured .plan-folio em { color: rgba(250, 250, 247, 0.55); }

.tier-label {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.plan-featured .tier-label { color: var(--gold); background: none; border: none; padding: 0; }
.plan-head h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.plan-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }

/* Unit-economics hero — Q/avalúo leads */
.plan-unit-hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 22px 0 10px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.plan-featured .plan-unit-hero { border-color: rgba(250, 250, 247, 0.12); }
.pu-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.plan-featured .pu-num { color: var(--ivory); }
.pu-dec {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.02em;
}
.plan-featured .pu-dec { color: rgba(250, 250, 247, 0.7); }
.pu-custom {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-style: italic;
  letter-spacing: -0.015em;
}
.pu-lbl {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.plan-featured .pu-lbl { color: rgba(250, 250, 247, 0.55); }

.plan-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.plan-meta b { color: var(--ink); font-weight: 600; }
.plan-featured .plan-meta { color: rgba(250, 250, 247, 0.55); }
.plan-featured .plan-meta b { color: var(--gold); }

/* ---- Plan mockups — progressive visual density per tier ---- */
.plan-mockup {
  margin: 0 0 22px;
  padding: 16px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  font-family: var(--sans);
}
.plan-featured .plan-mockup {
  background: rgba(250, 250, 247, 0.04);
  border-color: rgba(250, 250, 247, 0.1);
}
.plan-mockup::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.mk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.mk-zona {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 0;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-featured .mk-zona { color: rgba(250, 250, 247, 0.5); }
.mk-tag {
  font-size: 0.58rem;
  padding: 3px 7px;
  background: var(--paper);
  color: var(--muted);
  border-radius: 3px;
  letter-spacing: 0.1em;
  font-weight: 700;
  flex-shrink: 0;
}
.mk-tag.gold { background: rgba(201, 169, 97, 0.18); color: var(--gold-deep); }
.mk-tag.dark { background: var(--ink); color: var(--gold); }
.plan-featured .mk-tag { background: var(--gold); color: var(--ink); }
.plan-featured .mk-tag.dark { background: rgba(201, 169, 97, 0.15); color: var(--gold); }

.mk-hero {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1;
}
.plan-featured .mk-hero { color: var(--ivory); }

.mk-bar {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.plan-featured .mk-bar { background: rgba(250, 250, 247, 0.1); }
.mk-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--gold));
  border-radius: 999px;
}

.mk-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.72rem;
}
.mk-stats > div { display: flex; flex-direction: column; gap: 2px; }
.mk-stats span {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mk-stats b {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.82rem;
}
.plan-featured .mk-stats b { color: var(--ivory); }

.mk-comps {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan-featured .mk-comps { border-color: rgba(250, 250, 247, 0.1); }
.mk-comp {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
}
.mk-comp i {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--terracotta));
  border-radius: 999px;
  flex-shrink: 0;
}
.mk-comp b {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  margin-left: auto;
  font-size: 0.7rem;
}
.plan-featured .mk-comp b { color: var(--ivory); }

.mk-sparkline {
  margin: 8px 0 10px;
  position: relative;
}
.mk-sparkline svg { display: block; }
.spark-label {
  position: absolute;
  top: 2px;
  right: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--gold-deep);
  font-weight: 600;
}

.mk-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  font-size: 0.7rem;
  padding: 10px;
  background: var(--paper);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}
.plan-featured .mk-stats-grid { background: rgba(201, 169, 97, 0.08); }
.mk-stats-grid > div { display: flex; flex-direction: column; gap: 2px; }
.mk-stats-grid span {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mk-stats-grid b {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.76rem;
}
.plan-featured .mk-stats-grid b { color: var(--ivory); }
.plan-featured .mk-stats-grid span { color: rgba(250, 250, 247, 0.5); }

.mk-simulator {
  padding: 8px 10px;
  background: rgba(201, 169, 97, 0.1);
  border-radius: var(--r-sm);
  margin-top: 6px;
}
.plan-featured .mk-simulator { background: rgba(201, 169, 97, 0.12); }
.sim-label {
  display: block;
  font-size: 0.68rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.sim-label b { font-weight: 600; color: var(--gold-deep); }
.plan-featured .sim-label { color: rgba(250, 250, 247, 0.8); }
.plan-featured .sim-label b { color: var(--gold); }
.sim-plus {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--emerald);
  margin-left: 4px;
}
.sim-track {
  height: 4px;
  background: linear-gradient(90deg, var(--terracotta), var(--gold), var(--emerald));
  border-radius: 999px;
  position: relative;
}
.sim-dot {
  position: absolute;
  top: -3px;
  width: 10px;
  height: 10px;
  background: var(--ivory);
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: translateX(-50%);
}
.plan-featured .sim-dot { background: var(--ink); border-color: var(--gold); }

.mk-api {
  background: #0A1628;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  margin-bottom: 10px;
  border: 1px solid rgba(201, 169, 97, 0.2);
}
.mk-api-line {
  color: rgba(250, 250, 247, 0.75);
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tok-kw { color: var(--gold); font-weight: 600; }
.tok-path { color: var(--ivory); }
.tok-str { color: var(--terracotta); }
.tok-ok { color: #5EBE8A; font-weight: 600; }

.mk-collab {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.plan-featured .mk-collab { border-color: rgba(250, 250, 247, 0.1); }
.dot-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  font-family: var(--sans);
  letter-spacing: 0;
  border: 2px solid var(--ivory);
  margin-left: -6px;
}
.dot-avatar:first-child { margin-left: 0; }
.plan-featured .dot-avatar { border-color: var(--ink); }
.dot-avatar.more {
  background: var(--paper);
  color: var(--muted);
}
.plan-featured .dot-avatar.more { background: rgba(250, 250, 247, 0.1); color: rgba(250, 250, 247, 0.7); }
.collab-label {
  font-size: 0.66rem;
  color: var(--muted);
  margin-left: 6px;
}
.plan-featured .collab-label { color: rgba(250, 250, 247, 0.5); }

/* Tier-specific accents ------------------------------------------------ */
.plan-tier-1::before,
.plan-tier-2::before,
.plan-tier-3::before,
.plan-tier-4::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  opacity: 0.8;
}
.plan-tier-1::before { background: var(--muted); }
.plan-tier-2::before { background: linear-gradient(90deg, var(--emerald), var(--gold)); }
.plan-tier-3::before { background: linear-gradient(90deg, var(--gold), var(--terracotta), var(--gold-deep)); }
.plan-tier-4::before { background: linear-gradient(90deg, var(--ink), var(--gold), var(--ink)); }

/* ---- Plan features / cta ---- */
.plan-features {
  list-style: none;
  margin-bottom: 22px;
  flex: 1;
}
.plan-features li {
  padding: 9px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
  line-height: 1.35;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li i {
  font-style: normal;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(27, 67, 50, 0.1);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  flex-shrink: 0;
  font-weight: 700;
}
.plan-features li.muted {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--line);
}
.plan-features li.muted i { background: rgba(107, 114, 128, 0.1); color: var(--muted); }

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}
.btn-gold:hover { background: #d9b874; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.plan .btn { width: 100%; justify-content: center; padding: 12px 20px; font-size: 0.9rem; }
.plans-foot {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.plans-foot a { color: var(--gold-deep); border-bottom: 1px solid var(--line); }

/* ================== FAQ · §08 ================== */
.faq {
  background: var(--ivory);
  padding: 120px 0 110px;
}
.faq-doc {
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
}
.faq-doc .adoc-head {
  margin: 0;
  padding: 22px 32px 14px;
}
.faq-item {
  border-top: 1px dashed var(--line);
  padding: 22px 32px 22px 58px;
  position: relative;
  transition: background 180ms;
}
.faq-item:hover { background: rgba(201, 169, 97, 0.03); }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 20px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 6px;
  border-radius: 2px;
}
.faq-n {
  position: absolute;
  left: 20px;
  top: 24px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-deep);
  font-weight: 600;
  background: #fff;
}
.faq-q {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.faq-toggle {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--ink-soft);
  transition: transform 260ms ease, color 180ms;
  width: 18px;
  text-align: center;
  display: inline-block;
  line-height: 1;
}
.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
  color: var(--emerald);
}
.faq-item[open] .faq-n {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
}
.faq-a {
  padding-top: 14px;
  max-width: 68ch;
}
.faq-a p {
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 0;
}
.faq-a p + p { margin-top: 10px; }
.faq-a p strong { color: var(--ink); font-weight: 600; }
.faq-a p em { font-style: italic; color: var(--ink); font-weight: 500; }
.faq-a code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* ================== FINAL CTA — stamped adoc ================== */
.final-cta {
  background: var(--paper);
  padding: 96px 0 120px;
  position: relative;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.cta-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 36px 24px;
  position: relative;
  overflow: hidden;
}
.cta-watermark {
  position: absolute;
  top: 50%;
  right: -18px;
  transform: translateY(-50%) rotate(-11deg);
  transform-origin: center;
  color: var(--terracotta);
  opacity: 0.14;
  pointer-events: none;
  border: 2.5px solid currentColor;
  border-radius: 6px;
  padding: 10px 18px 8px;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background:
    repeating-linear-gradient(
      -11deg,
      transparent 0,
      transparent 2px,
      rgba(180, 102, 84, 0.08) 2px,
      rgba(180, 102, 84, 0.08) 3px
    );
}
.cta-wm-stamp {
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.cta-wm-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  text-transform: uppercase;
  padding-top: 3px;
  border-top: 1.5px solid currentColor;
  align-self: stretch;
  text-align: center;
}
.cta-doc > * { position: relative; z-index: 1; }
.cta-body {
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cta-head {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cta-head em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-deep);
}
.cta-sub {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 520px;
}
.cta-action { align-self: flex-start; margin-top: 6px; }

.cta-doc-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.cta-sig-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--gold-deep) 40%, var(--line));
  opacity: 0.6;
}
.cta-sig {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* ================== FOOTER — certificate verso ================== */
.foot {
  background: var(--ink);
  color: rgba(250, 250, 247, 0.7);
}

/* Top plat strip — gold mono band */
.foot-plat {
  border-top: 1px solid rgba(201, 169, 97, 0.28);
  border-bottom: 1px solid rgba(201, 169, 97, 0.14);
  background:
    linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.06), transparent);
}
.foot-plat-inner {
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  flex-wrap: wrap;
}
.foot-plat-code { font-weight: 600; }
.foot-plat-sep { color: rgba(201, 169, 97, 0.4); }
.foot-plat-tag {
  color: rgba(250, 250, 247, 0.55);
  font-weight: 400;
}

/* Main body — emissor + nav cols */
.foot-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  padding: 72px 28px 56px;
  align-items: start;
}

.foot-emissor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--ivory);
  font-weight: 600;
  margin-bottom: 20px;
}
.foot-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2px;
}
.foot-emissor-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ivory);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.foot-emissor-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: rgba(250, 250, 247, 0.48);
  line-height: 1.6;
  max-width: 340px;
  margin-top: 4px;
}

/* Nav cols */
.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.foot-cols > div { display: flex; flex-direction: column; gap: 10px; }
.foot-col-code {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  font-weight: 600;
  opacity: 0.7;
}
.foot-cols h4 {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ivory);
  text-transform: none;
  margin: 0;
}
.foot-cols a {
  display: block;
  padding: 3px 0;
  color: rgba(250, 250, 247, 0.62);
  font-size: 0.88rem;
  transition: color 180ms;
}
.foot-cols a:hover { color: var(--gold); }

/* Signature row */
.foot-sign {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px 22px;
  border-top: 1px dashed rgba(250, 250, 247, 0.09);
}
.foot-sign-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(250, 250, 247, 0.04),
    rgba(201, 169, 97, 0.45) 55%,
    rgba(250, 250, 247, 0.04));
}
.foot-sign-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  white-space: nowrap;
}
.foot-sign-stamp em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  color: rgba(250, 250, 247, 0.72);
  font-weight: 400;
}

.foot-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 28px 28px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(250, 250, 247, 0.38);
  border-top: 1px solid rgba(201, 169, 97, 0.14);
}
.foot-bottom-sep { color: rgba(201, 169, 97, 0.4); }
.foot-bottom-mono { color: rgba(250, 250, 247, 0.48); }

/* ================== RESPONSIVE ================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 60px 0 90px; }

  /* Mobile nav — document index drawer */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow:
      0 1px 0 var(--line),
      0 22px 48px -24px rgba(10, 22, 40, 0.22);
    padding: 8px 0 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 280ms ease, opacity 200ms ease;
  }
  .nav.is-open .nav-links {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-drawer-k {
    display: block;
    padding: 12px 28px 6px;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-deep);
    font-weight: 600;
    border-bottom: 1px dashed var(--line);
    margin-bottom: 6px;
  }
  .nav-links a {
    padding: 14px 28px;
    border-bottom: 1px dashed rgba(232, 227, 216, 0.6);
    font-size: 1rem;
    gap: 12px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a i {
    font-size: 0.66rem;
    min-width: 28px;
    opacity: 0.85;
  }
  .nav-links a::after { display: none; }
  .nav-cta {
    border-left: none !important;
    padding-left: 28px !important;
    color: var(--emerald) !important;
    margin-top: 4px;
    border-top: 1px solid var(--line) !important;
  }

  .steps, .insight-grid, .insight-grid-2, .plans-grid { grid-template-columns: 1fr; }
  .insight-card.big { grid-row: auto; }
  .adoc-merged .adoc-body { grid-template-columns: 1fr; }
  .adoc-region-form { border-right: none; border-bottom: 1px dashed var(--line); }
  .foot-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 28px 40px; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .cta-doc { padding: 24px 24px 20px; }
  .cta-doc-foot { flex-direction: row; }
  .plan-featured { transform: none; }
  .plan-featured:hover { transform: translateY(-6px); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat-item .stat-num { font-size: 1.4rem; }
  .adoc-merged .adoc-region { padding: 24px 24px 24px 48px; }
  .cov-grid { grid-template-columns: 1fr; gap: 32px; }
  .cov-map { height: 420px; }
  .cobertura { padding: 80px 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .adoc-fields { grid-template-columns: 1fr; gap: 14px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat-item:last-child { grid-column: span 2; text-align: center; }
  .adoc-merged .adoc-region { padding: 22px 20px 22px 40px; }
  .adoc-merged .adoc-region::before { left: 12px; top: 24px; }
  .zone-controls { flex-direction: column; align-items: stretch; }
  .zone-search { min-width: auto; }
  .list-controls .select { width: 100%; }
  .count { margin-left: 0; width: 100%; text-align: left; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-plat-inner { font-size: 0.64rem; gap: 8px; padding: 12px 20px; }
  .foot-sign { padding: 16px 20px 20px; flex-wrap: wrap; }
  .foot-sign-stamp em { font-size: 0.78rem; white-space: normal; }
  .adoc-merged .adoc-region { padding: 20px 18px 20px 36px; }
  .adoc-merged .adoc-head { padding: 18px 20px 12px; }
  .faq-item { padding: 20px 20px 20px 44px; }
  .faq-n { left: 12px; top: 22px; }
  .faq-q { font-size: 0.98rem; }
  .cta-watermark { right: -8px; padding: 8px 14px 6px; }
  .cta-wm-stamp { font-size: 1.4rem; }
  .cta-wm-date { font-size: 0.58rem; letter-spacing: 0.18em; }
  .cov-row { grid-template-columns: 20px 1fr 44px 44px; gap: 8px; font-size: 0.78rem; }
  .cov-bar { display: none; }
  .cov-map { height: 360px; }
}

/* ================== AUTH · NAV BUTTON ================== */
.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
  margin-left: 6px;
}
.nav-auth:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper);
}
.nav-auth:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.nav-auth-k {
  color: var(--gold-deep);
  font-weight: 700;
}
.nav-auth-label { display: inline-block; }
.nav-auth.is-signed-in {
  border-color: var(--emerald);
  color: var(--emerald);
}
.nav-auth.is-signed-in .nav-auth-k { color: var(--emerald); }
.nav-auth.is-signed-in:hover { background: rgba(27, 67, 50, 0.06); }

/* ================== AUTH · MODAL DOCUMENT ================== */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  animation: auth-fade 220ms ease both;
}
.auth-modal[hidden] { display: none; }
@keyframes auth-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes auth-lift {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.62);
  backdrop-filter: saturate(160%) blur(6px);
  cursor: pointer;
}
.auth-doc {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #fff;
  padding: 22px 26px 24px;
  animation: auth-lift 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
  box-shadow: 0 24px 60px rgba(10, 22, 40, 0.28), 0 2px 8px rgba(10, 22, 40, 0.12);
}
.auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms, color 160ms, background 160ms;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
}
.auth-close:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper);
}
.auth-close:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.auth-doc .adoc-head {
  padding-right: 52px;
}
.auth-body {
  padding: 20px 0 4px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-body .auth-region {
  padding: 14px 10px 14px 10px;
}
.auth-body .auth-region::before {
  top: 16px;
}

/* OAuth buttons */
.auth-oauth {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  position: relative;
}
.auth-oauth + .auth-oauth { margin-top: 10px; }
.auth-oauth:hover {
  border-color: var(--ink);
  background: var(--paper);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(10, 22, 40, 0.08);
}
.auth-oauth:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
.auth-oauth:disabled,
.auth-oauth[aria-busy="true"] {
  opacity: 0.55;
  cursor: progress;
  transform: none;
  box-shadow: none;
}
.auth-oauth-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.auth-oauth-label {
  flex: 1;
  text-align: center;
  letter-spacing: -0.005em;
}
.auth-oauth-google:hover { border-color: #4285F4; }
.auth-oauth-facebook:hover { border-color: #1877F2; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin: 4px 0 -4px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.auth-divider span {
  white-space: nowrap;
  color: var(--gold-deep);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field-k {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.96rem;
  color: var(--ink);
  transition: border-color 160ms, background 160ms, box-shadow 160ms;
}
.auth-field input::placeholder { color: var(--muted); opacity: 0.7; }
.auth-field input:hover { border-color: var(--ink-soft); }
.auth-field input:focus {
  outline: none;
  border-color: var(--gold-deep);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

/* Password field — visibility toggle sits inside the input box */
.auth-field-pw { position: relative; }
.auth-field-pw input { padding-right: 62px; }
.auth-pw-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 160ms, border-color 160ms, background 160ms;
  line-height: 1;
  min-height: 30px;
}
.auth-pw-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.auth-pw-toggle:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 1px;
}
.auth-pw-toggle[aria-pressed="true"] {
  color: var(--gold-deep);
  border-color: var(--gold-deep);
  background: rgba(201, 169, 97, 0.08);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 0.95rem;
}
.auth-submit[aria-busy="true"] {
  opacity: 0.6;
  cursor: progress;
}
.auth-link {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: color 160ms;
}
.auth-link:hover { color: var(--ink); }
.auth-link:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Message strip */
.auth-msg {
  margin: 2px 0 0;
  min-height: 1.2em;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  line-height: 1.5;
}
.auth-msg.is-error {
  color: var(--terracotta);
  background: rgba(180, 102, 84, 0.08);
  border-left: 2px solid var(--terracotta);
  padding: 10px 12px;
  margin-top: 10px;
}
.auth-msg.is-success {
  color: var(--emerald);
  background: rgba(27, 67, 50, 0.08);
  border-left: 2px solid var(--emerald);
  padding: 10px 12px;
  margin-top: 10px;
}
.auth-msg.is-info {
  color: var(--gold-deep);
  background: rgba(201, 169, 97, 0.08);
  border-left: 2px solid var(--gold-deep);
  padding: 10px 12px;
  margin-top: 10px;
}

/* Foot inside modal (optional) */
.auth-doc .adoc-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Body scroll lock when modal open */
body.auth-open { overflow: hidden; }

/* Pending/loading variant for the stamp */
.adoc-stamp.is-pending {
  color: var(--muted);
  border-color: var(--line);
  background: var(--paper);
}

/* Signed-in state (inline inside modal body) */
.auth-signed-in {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0;
}
.auth-signed-in .auth-user-email {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  word-break: break-all;
}
.auth-signed-in .auth-user-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-signout {
  align-self: flex-start;
  margin-top: 2px;
}

/* Responsive: mobile */
@media (max-width: 640px) {
  .auth-modal { padding: 20px 14px; align-items: flex-end; }
  .auth-doc {
    max-width: 100%;
    padding: 20px 20px 22px;
    max-height: calc(100vh - 40px);
    animation: auth-slide 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .auth-body { padding-left: 20px; }
  .auth-close { top: 8px; right: 10px; }
  .auth-oauth { padding: 11px 16px; font-size: 0.88rem; }
  .auth-divider { font-size: 0.6rem; letter-spacing: 0.18em; }
  @keyframes auth-slide {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Hide nav-auth label on very small screens inside the desktop nav (mobile menu keeps full label) */
@media (max-width: 960px) {
  .nav-auth {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 6px;
    padding: 12px 18px;
  }
}

/* ================== QUOTA · GATE BANNER ================== */
.quota-gate {
  display: none;
  margin-top: 14px;
  padding: 14px 16px 14px 18px;
  background: rgba(180, 102, 84, 0.06);
  border: 1px dashed var(--terracotta);
  border-radius: 3px;
  position: relative;
  animation: auth-fade 240ms ease both;
}
.quota-gate.is-active { display: block; }
.quota-gate-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
  margin-bottom: 6px;
}
.quota-gate-head::before {
  content: "§";
  color: var(--terracotta);
  font-weight: 700;
}
.quota-gate-body {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.55;
}
.quota-gate-body strong { color: var(--terracotta); font-weight: 600; }
.quota-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.quota-gate .btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}
.quota-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
.quota-meta strong { color: var(--ink); }

/* ============================================================
   PLAN STRIP · shown at the bottom of the avalúo adoc, below
   the 2-col (form / output) grid — spans full width so the user
   always sees what's included vs. locked on their current plan.
   Uses default .adoc-region::before § badge from the base rules.
   ============================================================ */
#avaluoDoc .adoc-plan-strip {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  background: linear-gradient(to bottom, rgba(201, 169, 97, 0.04), transparent 60%);
}
.adoc-plan-feats {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 22px;
  font: 400 0.86rem/1.45 var(--sans);
}
.adoc-plan-feats li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.adoc-plan-feats li i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(27, 67, 50, 0.14);
  color: var(--emerald);
  flex-shrink: 0;
  line-height: 1;
}
.adoc-plan-feats li.off {
  color: var(--muted);
}
.adoc-plan-feats li.off i {
  background: rgba(10, 22, 40, 0.06);
  color: var(--muted);
}
.adoc-plan-up {
  display: inline-block;
  margin-top: 6px;
  font: 500 0.76rem/1 var(--mono);
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px dotted var(--gold-deep);
  padding: 6px 2px 4px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.adoc-plan-up:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Muted variant for auth modal forgot-password link */
.auth-link-muted {
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  border-bottom-color: rgba(10, 22, 40, 0.15) !important;
}
.auth-link-muted:hover {
  color: var(--ink) !important;
  border-bottom-color: var(--ink) !important;
}

/* ============================================================
   MOBILE POLISH · §09
   Final pass for phones — tap targets, font sizes (iOS 16px
   zoom prevention), pricing stack, result adoc on narrow
   screens, sticky-safe footer, horizontal-scroll guards.
   ============================================================ */

/* Prevent horizontal scroll without breaking position: sticky on the nav.
   `overflow-x: hidden` on body/html kills sticky descendants; `overflow-x: clip`
   does not. (Baseline ~94% browsers; legacy falls back to normal overflow, which
   is fine — our layout doesn't overflow in practice, only widgets might.) */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* iOS/Android: inputs <16px trigger autozoom. Force 16px on phones. */
@media (max-width: 640px) {
  input, select, textarea, .auth-field input, .adoc-fld input, .adoc-fld select {
    font-size: 16px !important;
  }
}

/* Tap targets — Apple HIG & Material both put 44px as the minimum.
   Small inline buttons (.btn-sm) are excluded by design — forcing them taller
   creates weird empty boxes next to text. They live inside quota banners where
   extra height hurts more than it helps. */
@media (max-width: 960px) {
  .btn, .btn-primary, .btn-gold, .btn-outline, .btn-ghost, .btn-lg,
  .nav-auth, .auth-submit, .adoc-btn, .cta-action,
  .auth-oauth, .foot-cols a, .nav-links a {
    min-height: 44px;
  }
  .auth-oauth { min-height: 48px; }
}

/* Pricing — phone layout. 4 plans stack cleanly, featured loses
   the scale(1.04) hover that breaks on small screens. */
@media (max-width: 960px) {
  .plans-grid, .plans-grid-4 {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .plan-featured { transform: none; }
  .plan-featured:hover { transform: translateY(-4px); }
}

/* Hero — font scaling on phones. Avoids the "billboard headline" look. */
@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.6rem);
    line-height: 1.08;
  }
  .hero p.lede, .hero .lede {
    font-size: 1rem;
  }
  .hero-stats .stat-num {
    font-size: 1.6rem;
  }
}

/* Result adoc (the "document waiting to fill") on phones —
   stack the 2-col body, tighten padding, shrink the hero number. */
@media (max-width: 780px) {
  .adoc-live .adoc-body { grid-template-columns: 1fr; }
  .adoc-live .adoc-region-form { border-right: none; border-bottom: 1px dashed var(--line); }
}
@media (max-width: 560px) {
  .adoc-live .adoc-val { font-size: 1.5rem; }
  .adoc-live .adoc-range { font-size: 0.74rem; }
  .adoc-live .adoc-region { padding: 22px 18px 22px 40px; }
  .adoc-plan-feats { grid-template-columns: 1fr; gap: 6px; }
}

/* CTA adoc on phones — watermark shouldn't overflow */
@media (max-width: 480px) {
  .cta-doc { padding: 22px 20px 22px; }
  .cta-watermark {
    right: 4px;
    top: 4px;
    padding: 6px 10px 5px;
    transform: rotate(-8deg);
  }
  .cta-wm-stamp { font-size: 1.15rem; }
  .cta-wm-date { font-size: 0.55rem; }
  .cta-doc-foot { flex-direction: column; gap: 10px; align-items: stretch; }
  .cta-doc-foot a { width: 100%; text-align: center; }
}

/* Footer — narrow phones stack everything to single column */
@media (max-width: 640px) {
  .foot-inner { grid-template-columns: 1fr; gap: 36px; padding: 48px 24px 40px; }
}
@media (max-width: 480px) {
  .foot-cols { grid-template-columns: 1fr; gap: 20px; }
  .foot-inner { gap: 28px; padding: 40px 20px 32px; }
  .foot-emissor { border-right: none; border-bottom: 1px dashed rgba(201, 169, 97, 0.18); padding-bottom: 20px; }
  .foot-sign { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-sign-line { display: none; }
  .foot-bottom { flex-wrap: wrap; gap: 8px; padding: 16px 20px; text-align: left; }
}

/* Auth modal on phones — bottom sheet feel, full width */
@media (max-width: 560px) {
  .auth-doc { padding: 18px 18px 20px; }
  .auth-field input { font-size: 16px; padding: 12px 14px; }
  .auth-field-pw input { padding-right: 66px; }
  .auth-actions { gap: 12px; }
  .auth-submit { width: 100%; }
}

/* Nav — ensure the mobile drawer scrolls if it gets long */
@media (max-width: 960px) {
  .nav.is-open .nav-links { overflow-y: auto; max-height: calc(100vh - 80px); }
}

/* Small screens: tighten horizontal padding + compress vertical rhythm */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero { padding: 40px 0 60px; }
  .pricing, .cov, .faq, .final-cta { padding: 70px 0; }
}

/* Safe-area insets for iPhone notch / Android gesture bar */
@supports (padding: max(0px)) {
  .nav { padding-top: max(0px, env(safe-area-inset-top)); }
  .foot { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}

/* Map popup on phones — avoid cramped 2-line titles */
@media (max-width: 480px) {
  .leaflet-popup-content { font-size: 0.84rem; }
  .leaflet-popup-content-wrapper { max-width: 80vw; }
  .cov-map, .gps-map { height: 320px !important; }
}

/* ================================================================
   MOBILE HARDENING — catch-all fixes for phones
   Goal: on any viewport ≤ 480px, nothing overflows horizontally,
   typography scales down sanely, and padding doesn't eat content.
   Added 2026-04-18.
   ================================================================ */

/* --- 1. Global overflow guard ---------------------------------- */
/* Prevents any descendant (wide leaflet tile, monospace string that
   didn't wrap, stray iframe) from pushing the page wider than the
   viewport. overflow-x on html kills sideways scroll; on body it's a
   belt-and-suspenders for older Safari. */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}
img, video, iframe, svg, canvas, .leaflet-container {
  max-width: 100%;
}

/* --- 2. Viewport-fit for iPhone notch -------------------------- */
/* Paired with the viewport meta tag — keeps nav + footer inside the
   safe-area when the device has a notch or a gesture bar. */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }
}

/* --- 3. Tablet + small-laptop (≤ 820px) ------------------------ */
@media (max-width: 820px) {
  .container { padding: 0 22px; }
  .hero { padding: 56px 0 80px; }
  .section-head { margin-bottom: 36px; }
  .h2 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); }
  .display { font-size: clamp(2.1rem, 6.5vw, 3.2rem); line-height: 1.08; }
  /* Anything that declared a desktop grid but didn't get a mobile
     override in an earlier block — stack it. */
  .steps, .insight-grid, .insight-grid-2, .plans-grid, .plans-grid-4,
  .hero-inner, .adoc-merged .adoc-body, .cov-grid,
  .anatomy, .receipts {
    grid-template-columns: 1fr !important;
  }
  /* Anatomy: close the 72px gap and let the callouts sit under the
     mini avalúo — they're meant to be read together, not side-by-side. */
  .anatomy { gap: 36px !important; }
  .receipts { gap: 24px; max-width: 100%; }
  .receipt { padding: 22px 20px 16px; }
}

/* --- 4. Phones (≤ 560px) --------------------------------------- */
@media (max-width: 560px) {
  /* Headline — never bigger than the viewport will comfortably hold. */
  .hero h1, .hero .display {
    font-size: clamp(1.9rem, 8.4vw, 2.4rem) !important;
    line-height: 1.06;
    text-wrap: balance;
  }
  .hero .lede, .hero p.lede { font-size: 0.98rem; }
  .h2 { font-size: clamp(1.55rem, 6.6vw, 2rem); line-height: 1.12; }
  h3 { font-size: 1.15rem; }

  /* Section rhythm — less white space when we only have 560px. */
  .pricing, .cov, .faq, .final-cta, .cobertura { padding: 60px 0; }
  .section-head { margin-bottom: 28px; }
  .section-sub { font-size: 0.96rem; }

  /* Plat strips wrap (monospace strings were overflowing on iPhone SE). */
  .adoc-plat, .hero-plat, .nav-plat,
  .foot-plat-inner, .adoc-head { flex-wrap: wrap; }
  .adoc-plat { gap: 6px 10px; }

  /* Adoc card — narrow the padding so the content actually reads. */
  .adoc, .adoc-merged, .adoc-live { padding: 18px 16px; }
  .adoc-head { padding: 14px 16px 10px; }
  .adoc-body { padding: 16px; }

  /* Plan cards — tighter in-card padding + smaller price display. */
  .plan { padding: 24px 20px; }
  .plan-head h3 { font-size: 1.6rem; }
  .pu-num { font-size: 2.8rem !important; }
  .plan-features { font-size: 0.92rem; }
  .plan-features li { padding: 7px 0; }

  /* Hero stats — let the 3-number row become a tidy 2+1. */
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero-stats .stat-item:last-child { grid-column: 1 / -1; text-align: center; }
  .stat-num { font-size: 1.45rem; }
}

/* --- 5. Narrow phones (≤ 420px — iPhone SE, small Android) ----- */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 56px; }
  .hero h1, .hero .display {
    font-size: clamp(1.7rem, 8.6vw, 2.1rem) !important;
  }
  .h2 { font-size: clamp(1.4rem, 7vw, 1.8rem); }
  .plan { padding: 22px 16px; }
  .plan-head h3 { font-size: 1.5rem; }
  .pu-num { font-size: 2.4rem !important; }
  .adoc, .adoc-merged, .adoc-live { padding: 16px 14px; }

  /* Buttons — full-width on narrow phones so thumbs can hit them. */
  .btn-lg, .plan .btn { width: 100%; text-align: center; justify-content: center; }

  /* Footer — strongest compression at this width. */
  .foot-inner { padding: 32px 16px 28px; }
  .foot-plat-inner { padding: 10px 16px; font-size: 0.6rem; letter-spacing: 0.14em; }

  /* Section tag — the "plat-code" header can overflow on short screens. */
  .section-tag { font-size: 0.62rem; letter-spacing: 0.18em; }
}

/* --- 6. Tiny phones (≤ 360px — old Android, Galaxy Fold closed) - */
@media (max-width: 360px) {
  .container { padding: 0 14px; }
  .hero h1, .hero .display { font-size: 1.7rem !important; }
  .h2 { font-size: 1.35rem; }
  .pu-num { font-size: 2.1rem !important; }
  .adoc, .adoc-merged, .adoc-live { padding: 14px 12px; }
  .plan { padding: 20px 14px; }
}

/* --- 7. Modal sizing on phones --------------------------------- */
/* The PayPal modal (#payModal) and auth modal both have max-width
   caps that are fine on tablet, but on a 390px screen the outer
   padding (24px × 2) leaves ~342px for the card — tighten it. */
@media (max-width: 480px) {
  #payModal { padding: 16px 12px; }
  #payModal .pay-card { padding: 22px 20px 18px; }
  #payModal .pay-title { font-size: 1.25rem; }
  #payModal .pay-price { font-size: 0.85rem; }
  #payModal .pay-desc, #payModal .pay-foot { font-size: 0.78rem; line-height: 1.5; }

  .auth-modal { padding: 16px 12px; }
  .auth-doc { padding: 20px 18px 22px; max-height: calc(100dvh - 32px); }
  .auth-head h2 { font-size: 1.3rem; }
}

/* --- 8. Pricing quick-chart / mockups ------------------------- */
/* The fake "mockup" charts inside plan cards have absolute-positioned
   numbers that can overflow at <360px — let them shrink gracefully. */
@media (max-width: 480px) {
  .mk-head, .mk-hero, .mk-stats { font-size: 0.82rem; }
  .mk-hero { font-size: 1.45rem; }
  .mk-stats { gap: 10px; }
}

/* --- 9. Long text wrapping ------------------------------------ */
/* Addresses, monospace folios, and emails sometimes have no spaces. */
.foot a, .foot-emissor address, .foot-plat-code,
.adoc-k, .adoc-n, .plan-folio em {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- 10. Nav brand on phones — stop the mark+wordmark from ---
   pushing the hamburger off-screen. */
@media (max-width: 480px) {
  .nav-inner { padding: 10px 0; gap: 10px; }
  .nav-brand .brand-wordmark { font-size: 1rem; }
  .nav-brand .brand-k { font-size: 0.58rem; }
}

/* --- 11. Fuentes row (data-sources strip) --------------------- */
/* Desktop: single-line flex+nowrap. On phones the line can't fit, so
   we let the list wrap to multiple lines instead — no horizontal scroll,
   no body overflow. The separator dots between items become noise when
   items wrap, so we hide them at the same breakpoint. */
@media (max-width: 820px) {
  .fuentes-inner {
    flex-wrap: wrap;
    white-space: normal;
    overflow: visible;
    gap: 10px 14px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .fuentes-list {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    white-space: normal;
    gap: 6px 14px;
    padding: 2px 0;
    min-width: 0;
    max-width: 100%;
  }
  .fuentes-list span {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  /* Kill the "·" pseudo-separators on wrap — they look wrong when lines
     break between items. The wrap itself provides enough separation. */
  .fuentes-list span:not(:last-child)::after { content: none !important; }
  .fuentes-stamp { padding-right: 4px; }
  .fuentes-n {
    flex-basis: 100%;
    margin-top: 2px;
    font-size: 0.7rem;
  }
}
@media (max-width: 480px) {
  .fuentes { padding: 10px 0; }
  .fuentes-inner { font-size: 0.6rem; gap: 8px 10px; }
  .fuentes-k { font-size: 0.6rem; }
  .fuentes-list { gap: 4px 10px; }
  /* Hide the stamp on the smallest screens — the list itself conveys the
     source credibility; the stamp just burns horizontal real estate. */
  .fuentes-stamp { display: none; }
}

/* ============================================================
   v3 · System-state moments
   Skeleton loading, error notice, rechazado stamp, mode switch,
   coverage search empty state, §Sistema showcase.
   ============================================================ */

@keyframes skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg,
    rgba(10,22,40,0.06) 0%,
    rgba(10,22,40,0.14) 40%,
    rgba(10,22,40,0.06) 80%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s linear infinite;
  color: transparent !important;
  user-select: none;
  vertical-align: middle;
  border-radius: 2px;
}
.adoc.is-loading .adoc-rk em,
.adoc.is-loading .adoc-vk { opacity: 0.6; }

@keyframes adoc-emerge {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.zona-fingerprint.is-ready,
.hero-adoc.is-ready { animation: adoc-emerge 320ms ease-out both; }
.zona-fingerprint { position: relative; }
.adoc-replay {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.66rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  background: transparent; border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 999px;
  cursor: pointer; z-index: 3;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.adoc-replay:hover { color: var(--ink); border-color: var(--ink-soft); background: rgba(0,0,0,0.03); }
.adoc-replay svg { width: 11px; height: 11px; }

/* ---- Mode switch (Emitido / Con error / Rechazado) ---- */
.adoc-mode-switch {
  display: inline-flex; gap: 2px;
  margin: 16px 20px 0;
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
  font-family: var(--sans);
  width: fit-content;
  position: relative; z-index: 2;
}
.adoc-mode-switch button {
  appearance: none; background: transparent; border: 0;
  padding: 7px 14px; border-radius: 999px;
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  font-family: var(--sans);
}
.adoc-mode-switch button:hover { color: var(--ink-soft); }
.adoc-mode-switch button.is-active { background: var(--ink); color: var(--ivory); }

/* ---- Rechazado stamp + container ---- */
.adoc-stamp-reject {
  background: rgba(180,102,84,0.14) !important;
  color: #B46654 !important;
  border-color: rgba(180,102,84,0.28) !important;
}
.adoc-stamp-warn {
  background: rgba(166,136,66,0.14) !important;
  color: #8a6a2c !important;
  border-color: rgba(166,136,66,0.30) !important;
}
.adoc-rechazado { position: relative; }
.adoc-rechazado::after {
  content: 'RECHAZADO';
  position: absolute; top: 48%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  letter-spacing: 0.06em;
  color: rgba(180,102,84,0.42);
  border: 4px solid rgba(180,102,84,0.42);
  padding: 8px 24px; border-radius: 8px;
  pointer-events: none;
  animation: stamp-slam 380ms cubic-bezier(0.22, 1.3, 0.36, 1) both;
  z-index: 2;
  white-space: nowrap;
}
@keyframes stamp-slam {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); }
  60%  { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(0.95); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }
}
.adoc-val-muted { color: var(--muted) !important; font-style: italic; font-family: var(--serif); }
.adoc-note-warn {
  color: #B46654 !important;
  border-top: 1px dashed rgba(180,102,84,0.30);
  padding-top: 10px; margin-top: 10px;
}

/* ---- Error notice ---- */
.adoc-notice {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 12px 0 18px;
  padding: 12px 14px;
  border-left: 3px solid #B46654;
  background: rgba(180,102,84,0.08);
  border-radius: 2px;
  font-family: var(--sans); font-size: 0.86rem;
  color: var(--ink-soft);
}
.adoc-notice b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; font-size: 0.9rem; }
.adoc-notice span { font-style: italic; font-family: var(--serif); color: var(--muted); font-size: 0.84rem; }
.adoc-notice-icon {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 999px;
  background: #B46654; color: var(--ivory);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-family: var(--serif);
  font-size: 0.95rem;
}
.adoc-fld-error input,
.adoc-fld-error select { border-color: #B46654 !important; background: rgba(180,102,84,0.06); }
.adoc-fld-err-hint {
  color: #B46654; font-family: var(--serif);
  font-style: italic; font-size: 0.78rem; margin-left: 8px;
  font-weight: 400;
}

/* ---- Coverage search + empty ---- */
.cov-search {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  margin: 0 0 12px;
  background: var(--ivory); border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--sans);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.cov-search:focus-within { border-color: var(--ink-soft); box-shadow: 0 0 0 3px rgba(201,169,97,0.15); }
.cov-search-icon { color: var(--muted); font-size: 1rem; line-height: 1; }
.cov-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-family: var(--sans); font-size: 0.88rem; color: var(--ink);
  min-width: 0;
}
.cov-search input::placeholder { color: var(--muted); font-style: italic; }
.cov-search-clear {
  appearance: none; background: transparent; border: 0;
  color: var(--muted); font-size: 1.2rem; line-height: 1;
  cursor: pointer; padding: 0 4px;
}

.cov-empty {
  padding: 32px 20px; text-align: center;
  background: var(--ivory);
  border: 1px dashed var(--line);
  border-radius: 2px;
  margin: 12px 0;
}
.cov-empty-stamp {
  display: inline-block; font-family: var(--sans);
  font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px;
  margin-bottom: 12px;
}
.cov-empty-title {
  font-family: var(--serif); font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.2; margin: 0 0 8px; color: var(--ink);
}
.cov-empty-title em { font-style: italic; color: var(--ink-soft); }
.cov-empty p {
  font-family: var(--serif); font-style: italic;
  color: var(--muted); line-height: 1.5; margin: 0 0 14px;
  font-size: 0.86rem;
}
.cov-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cov-empty-actions button {
  font-family: var(--sans); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-soft); cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.cov-empty-actions button:hover { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---- §Sistema section ---- */
.section-sistema { background: var(--paper); padding: 80px 0; }
.section-sistema .section-head { margin-bottom: 48px; }
.sis-wrap {
  display: grid; grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 48px; align-items: start;
}
@media (max-width: 840px) { .sis-wrap { grid-template-columns: 1fr; gap: 24px; } }
.sis-index { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sis-index li { margin: 0; }
.sis-index button {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto;
  column-gap: 14px; row-gap: 2px;
  padding: 16px 18px; border-radius: 2px;
  background: transparent; border: 1px solid transparent;
  border-left: 2px solid var(--line);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
  font-family: var(--sans); color: var(--ink-soft);
}
.sis-index button:hover { background: var(--ivory); border-left-color: var(--ink-soft); }
.sis-index button.is-active { background: var(--ivory); border-left-color: var(--ink); color: var(--ink); }
.sis-index .sis-n {
  grid-row: 1 / span 2;
  font-family: var(--serif); font-size: 1.7rem; font-weight: 500;
  color: var(--muted); align-self: start; line-height: 1;
}
.sis-index .is-active .sis-n { color: var(--ink); }
.sis-index .sis-t {
  grid-column: 2; font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.005em; color: inherit;
}
.sis-index .sis-d {
  grid-column: 2; font-family: var(--serif); font-style: italic;
  font-size: 0.86rem; color: var(--muted); line-height: 1.45;
}
.sis-stage {
  display: grid; place-items: center;
  padding: 28px;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 2px;
  min-height: 440px;
}
.sis-stage .adoc { width: 100%; max-width: 460px; margin: 0; animation: adoc-emerge 280ms ease-out both; }
.sis-stage .adoc .adoc-head { padding: 18px 20px; }
.sis-stage .adoc .adoc-body,
.sis-stage .adoc .adoc-region { padding: 18px 20px; }

@media (max-width: 480px) {
  .sis-stage { padding: 16px; min-height: 380px; }
  .section-sistema { padding: 56px 0; }
  .sis-index button { padding: 14px 14px; grid-template-columns: 36px 1fr; column-gap: 10px; }
  .sis-index .sis-n { font-size: 1.4rem; }
  .adoc-mode-switch { margin: 14px 14px 0; }
  .adoc-mode-switch button { padding: 6px 10px; font-size: 0.66rem; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton, .adoc-rechazado::after, .zona-fingerprint.is-ready, .hero-adoc.is-ready, .sis-stage .adoc { animation: none; }
}
