/* ============================================================================
   La CasaMía · ACM — design system
   Premium-editorial. Brand: navy/orange/cream · Plus Jakarta Sans + Inter.
   Tokens source of truth: app/static/brand/tokens.json
   ========================================================================== */
:root {
  /* Brand palette */
  --navy: #24305E;
  --navy-dark: #1B2547;
  --azul-oscuro: #1B2547;     /* footer / deep surfaces */
  --azul: #0B2986;
  --azul-medio: #7EC8E3;
  --azul-cielo: #BFE5FB;
  --naranja: #FFA522;
  --naranja-dark: #E8901A;
  --verde: #3A9E3A;
  --rojo: #E05050;
  --neutro-100: #FFFFFF;
  --neutro-300: #E8E8E8;
  --neutro-500: #CCCCCC;

  /* Semantic */
  --primary: var(--naranja);
  /* Naranja, verde y rojo de marca son colores de RELLENO: como texto sobre claro dan
     1.9:1, 3.4:1 y 3.9:1, y AA pide 4.5:1. Estos son sus equivalentes legibles, y son
     los únicos válidos para texto. Los de marca siguen siendo los de fondo y borde. */
  --naranja-texto: #9a5300;   /* 5.6:1 sobre papel */
  --verde-texto: #2C7A2C;     /* 5.1:1 sobre papel */
  --rojo-texto: #a1201f;      /* 7.3:1 sobre papel */
  --ink: var(--navy);
  --ink-soft: #475069;        /* navy-tinted body/muted text */
  --ink-faint: #6B7185;       /* el gris más claro que aún pasa AA (4.8:1 sobre blanco) */
  --info: var(--azul);
  --bg: #FBFAF6;              /* warm paper background */
  --cream: #F4F1EA;          /* cream band */
  --surface: #FFFFFF;        /* cards / nav */
  --hairline: #ECE7DC;       /* warm hairline */
  --hairline-cool: #E4E7EF;  /* cool hairline (on white near data) */

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  /* Shadows — soft, tinted to navy (never harsh black) */
  --shadow-soft: 0 1px 2px rgba(27,37,71,.04), 0 8px 24px -12px rgba(27,37,71,.12);
  --shadow-card: 0 2px 8px rgba(36,48,94,.10);
  --shadow-lg: 0 24px 60px -24px rgba(27,37,71,.28);

  /* Type scale */
  --fs-display: clamp(2.4rem, 5.2vw, 4rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 2.1rem);
  --fs-h3: 1.2rem;
  --fs-lede: clamp(1.05rem, 1.6vw, 1.22rem);
  --fs-body: 1rem;
  --fs-sm: .9rem;
  --fs-cap: .78rem;

  /* Spacing scale */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem; --sp-9: 6rem;

  --container: 1120px;
  --measure: 60ch;

  --ease: cubic-bezier(.32,.72,0,1);
  --dur: .45s;

  --font-headline: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* ── base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
/* El navegador pinta [hidden] con display:none desde su hoja de usuario-agente, y CUALQUIER
   regla nuestra de display se la gana. Con `label { display: flex }` unas lineas mas abajo,
   las tarjetas ocultas del paso 1 seguian a la vista. Esto le devuelve al atributo la
   autoridad que se supone que tiene, para este caso y para todo hidden futuro. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
h1, h2, h3, h4 { font-family: var(--font-headline); font-weight: 700; line-height: 1.12; letter-spacing: -.018em; color: var(--ink); }
h1 { font-size: var(--fs-h1); margin: 0 0 var(--sp-3); }
h2 { font-size: var(--fs-h2); margin: 0 0 var(--sp-3); }
h3 { font-size: var(--fs-h3); margin: 0 0 var(--sp-2); }
p { margin: 0 0 var(--sp-3); }
a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 2px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--naranja-texto); outline-offset: 2px; border-radius: 4px; }

/* ── shared bits ─────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-block; color: #9a5300; font-weight: 700;  /* AA on light bg */
  letter-spacing: .16em; text-transform: uppercase; font-size: var(--fs-cap);
  margin: 0 0 var(--sp-3);
}
.eyebrow--pill {
  background: rgba(255,165,34,.16); color: #9a5300;
  padding: .35rem .7rem; border-radius: var(--radius-pill); letter-spacing: .14em;
}
.lede { font-size: var(--fs-lede); max-width: var(--measure); color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.error { color: var(--rojo-texto); font-weight: 600; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; white-space: nowrap;
  padding: .8rem 1.4rem; border-radius: var(--radius-pill);
  font-family: var(--font-headline); font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--naranja); color: var(--navy-dark); box-shadow: 0 8px 20px -10px rgba(255,165,34,.7); }
.btn-primary:hover { background: var(--naranja-dark); box-shadow: 0 12px 26px -10px rgba(232,144,26,.75); transform: translateY(-1px); }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--navy); transform: translateY(-1px); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }
/* Button-in-button trailing arrow (premium cue) */
.btn .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5rem; height: 1.5rem; border-radius: var(--radius-pill);
  background: rgba(27,37,71,.12); font-size: .9rem; transition: transform var(--dur) var(--ease);
}
.btn-secondary .ico, .btn-primary.is-dark .ico { background: rgba(255,255,255,.18); }
.btn:hover .ico { transform: translate(2px,-1px); }

/* ── layout shell ────────────────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding-inline: 1.5rem; }
.site-main { flex: 1 0 auto; width: 100%; }
.page { max-width: 960px; margin: 0 auto; padding: var(--sp-7) 1.5rem var(--sp-8); }
.page--narrow { max-width: 680px; }
.section { padding: var(--sp-8) 0; }
.section--cream { background: var(--cream); border-block: 1px solid var(--hairline); }
.section--navy { background: var(--navy-dark); color: #fff; }
.section--navy h1, .section--navy h2 { color: #fff; }

/* ── header / nav ────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(251,250,246,.82);
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--hairline); box-shadow: var(--shadow-soft); background: rgba(251,250,246,.92); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.nav .brand { display: inline-flex; align-items: center; }
.nav .brand img { height: 34px; display: block; }
.nav-burger { display: none; }
/* Skip link — first tab stop, visible only on focus (WCAG 2.4.1). */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--ink);
  color: #fff; padding: .6rem 1rem; border-radius: var(--radius-md, 8px); transition: top var(--dur) var(--ease); }
.skip-link:focus { top: 8px; }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; position: relative; padding: .25rem 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--naranja); transition: right var(--dur) var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-account { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav-account .avatar { width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--navy);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-headline);
  font-weight: 700; font-size: .85rem; }

@media (max-width: 820px) {
  .nav-burger { display: inline-flex; flex-direction: column; gap: 5px; width: 44px; height: 44px;
    align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
  .nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
  .nav-menu { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--hairline); box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem 1.5rem; transform: translateY(-12px); opacity: 0; pointer-events: none;
    visibility: hidden;  /* keep closed-menu links out of the tab order */
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease), visibility var(--dur) var(--ease); }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { padding: .9rem 0; border-bottom: 1px solid var(--hairline); }
  .nav-links a::after { display: none; }
  .nav-cta { margin-top: 1rem; flex-direction: column; align-items: stretch; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* No JS: the toggle can't work, so hide the button and show the nav stacked. */
  html:not(.js) .nav-burger { display: none; }
  html:not(.js) .nav-menu { position: static; transform: none; opacity: 1; visibility: visible;
    pointer-events: auto; box-shadow: none; border-bottom: 0; padding: 0 0 1rem; }
}

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; display: flex; align-items: center;
  padding: var(--sp-9) 0 var(--sp-8); min-height: clamp(460px, 62vh, 600px); }
.hero .container { position: relative; z-index: 1; width: 100%; }
/* Brand alluded to inside the headline claim (not a separate logo). */
.hero h1 .ring-word { color: var(--naranja-texto); letter-spacing: .02em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 600px); gap: var(--sp-7); align-items: center; }
.hero h1 { font-size: var(--fs-display); margin: var(--sp-3) 0 var(--sp-4); }
.hero .lede { font-size: var(--fs-lede); }
.hero .cta-row { margin-top: var(--sp-5); }
.trust-row { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: var(--sp-6); color: var(--ink-soft); font-size: var(--fs-sm); }
.trust-row span { display: inline-flex; align-items: center; gap: .5rem; }
.trust-row .check { display: inline-flex; color: var(--verde-texto); }
.trust-row .check svg { display: block; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.cta-stack { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }
.cta-hint { margin: 0; font-size: .82rem; color: var(--ink-soft); }

/* ── Loading overlay al generar el ACM: el isotipo de marca late y un anillo
   naranja (RING) orbita a su alrededor ──────────────────────────────────────── */
.acm-loading { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center;
  background: rgba(244,241,234,.92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.acm-loading.is-on { display: grid; }
.acm-loading__card { text-align: center; padding: 2rem; }
.acm-loading__mark { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.acm-loading__ring { position: absolute; inset: 0; animation: ringSpin 1.5s linear infinite; }
.acm-loading__ring .ring-track { fill: none; stroke: rgba(255,165,34,.18); stroke-width: 5; }
.acm-loading__ring .ring-arc { fill: none; stroke: var(--naranja); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 90 250; }
.acm-loading__iso { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px;
  transform: translate(-50%, -50%); animation: isoPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 6px 16px rgba(255,165,34,.35)); }
.acm-loading__title { font-family: var(--font-headline); font-weight: 800; font-size: 1.35rem; color: var(--navy);
  margin: 1.1rem 0 .25rem; letter-spacing: -.01em; }
.acm-loading__msg { color: var(--ink-soft); font-size: .95rem; margin: 0; min-height: 1.4em; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes isoPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .92; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .acm-loading__ring { animation: none; }
  .acm-loading__iso { animation: none; }
}

/* Hero visual — foto de Bogotá a sangre a la derecha, desvaneciéndose en cream a
   la izquierda para que el texto quede legible. Foto self-hosted; si falta el
   archivo se ve el degradado cálido de respaldo (no ícono roto). */
.hero-media { position: absolute; inset: 0; z-index: 0;
  background-image: url("/static/img/hero-bogota.jpg"), linear-gradient(120deg, #f3e3cf, #e9d3bd);
  background-size: cover; background-position: center right; background-repeat: no-repeat; }
/* El velo terminaba de desvanecerse en el 54% y la columna de texto llega hasta el ~51%
   en escritorio y hasta el ~69% cerca de los 900px: la cola del lede y el enlace de
   "buscas dónde comprar" caían sobre los edificios (medido: 1.7:1 contra la fachada más
   clara). La meseta opaca se extiende hasta el 46% y el desvanecido termina en el 96%:
   el texto queda sobre crema en todo su ancho y el skyline sigue leyéndose a la derecha. */
.hero-media::after { content: ""; position: absolute; inset: 0;
  /* El velo se ancla a la geometría de la columna de texto, no a porcentajes: la columna
     arranca en el borde del contenedor y mide 600px como tope, así que su borde derecho
     es exactamente esta cuenta. Con porcentajes fijos el texto quedaba sobre los edificios
     entre 860 y 1000px de ancho (medido: 3.3:1 en el lede, AA pide 4.5). */
  --hero-texto-fin: calc(max(1.5rem, (100vw - var(--container)) / 2) + 600px);
  background:
    linear-gradient(90deg,
      var(--cream) 0,
      var(--cream) var(--hero-texto-fin),
      rgba(244,241,234,.34) calc(var(--hero-texto-fin) + 14vw),
      rgba(244,241,234,0) calc(var(--hero-texto-fin) + 30vw)),
    linear-gradient(0deg, rgba(244,241,234,.5), rgba(244,241,234,0) 44%); }

/* ── feature / steps grids (no boring 3-equal-cards: numbered steps + 2-col features) ── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-6); counter-reset: step; }
.step { position: relative; padding-top: var(--sp-5); border-top: 2px solid var(--navy); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-headline); font-weight: 800; color: var(--naranja-texto); font-size: 1.1rem; letter-spacing: .02em; }
.step h3 { margin: .35rem 0 .35rem; }
.step p { color: var(--ink-soft); margin: 0; font-size: var(--fs-sm); }

/* Seis tarjetas idénticas (ícono + título + párrafo, todas del mismo tamaño) es el patrón
   que el sistema prohíbe, y el CSS ya se jactaba de evitarlo tres reglas más arriba. Pasan a
   ser entradas editoriales con filete superior: el mismo vocabulario que .steps, sin marco. */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-7); margin-top: var(--sp-6); }
.feature { padding-top: var(--sp-4); border-top: 1px solid var(--hairline);
  transition: border-top-color var(--dur) var(--ease); }
.feature:hover { border-top-color: var(--naranja); }
.feature .ficon { flex: none; color: var(--naranja-texto); display: inline-flex; align-items: center; }
.feature .ficon svg { width: 20px; height: 20px; display: block; }
.feature h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .4rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: var(--fs-sm); max-width: 46ch; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff;
  border-radius: var(--radius-xl); padding: var(--sp-7); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfd6ea; max-width: 52ch; margin-inline: auto; }
/* El .eyebrow global usa el naranja de texto, calibrado para fondo claro; sobre esta
   banda navy cae a 1.6:1. Sobre oscuro el que contrasta es el naranja de marca. */
.cta-band .eyebrow { color: var(--naranja); }
.cta-band .cta-row { justify-content: center; margin-top: var(--sp-5); }

/* ── forms ───────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-soft); }
.acm-form .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: var(--sp-5) 0; align-items: stretch; }
.acm-form .grid .full { grid-column: 1 / -1; }
/* Shared ciudad/barrio block that JS relocates between steps: flatten so its ciudad/barrio
   labels stay direct grid items in whichever step hosts it. */
.loc-block, .loc-slot { display: contents; }
/* Pet-accessibility checkbox: a horizontal label, not the column layout. */
.acm-form .check-row { flex-direction: row; align-items: center; gap: .55rem; font-weight: 500; cursor: pointer; }
.acm-form .check-row input { margin: 0; }  /* el `width: auto` ya no hace falta */
/* keep inputs on a tidy baseline even when labels/hints have different heights */
.acm-form label > input, .acm-form label > select, .acm-form label > textarea { margin-top: auto; }
.acm-form label .opt, .acm-form label .req { display: inline; }
/* El texto de la etiqueta y sus marcadores (* / opcional) son UN solo item flex. Sin este
   envoltorio, la columna flex de `label` los apila y el "*" cae en su propia línea. */
.acm-form label .lbl-txt, .unlock-form label .lbl-txt { display: block; }
label, .acm-form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
/* El selector desnudo `input` alcanzaba también a checkbox y radio, que no son campos
   de texto: les daba `width: 100%`, relleno de 12px y —desde el arreglo de altura del
   <select>— un `min-height` de 45px. En el control de capas del mapa, que Leaflet crea
   con checkboxes y radios nativos, cada casilla salía de 114×45 px en vez de 13×13. El
   checkbox de mascotas del cuestionario cargaba lo mismo. */
input:not([type="checkbox"]):not([type="radio"]), select, textarea,
.acm-form input:not([type="checkbox"]):not([type="radio"]), .acm-form select,
.auth-form input:not([type="checkbox"]):not([type="radio"]), .redeem input[type="text"] {
  padding: .75rem .85rem; border: 1px solid var(--hairline-cool); border-radius: var(--radius-md);
  font: inherit; line-height: 1.5; background: var(--surface); color: var(--ink);
  /* Chromium fuerza `line-height: normal` en <select> y lo ignora aquí: el select medía 44px
     y el input 47px, así que en una misma fila el select quedaba 3px más bajo y 3px corrido.
     El min-height los fija a los dos en la misma altura, calculada con la misma receta
     (texto + padding + borde), así que sigue el tamaño de fuente sin números mágicos. */
  min-height: calc(1.5em + 1.5rem + 2px);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--naranja-texto); box-shadow: 0 0 0 3px rgba(255,165,34,.28); }
::placeholder { color: var(--ink-faint); opacity: 1; }  /* el gris del navegador se queda en 4.05:1 */
.auth-form { display: grid; gap: .65rem; max-width: 24rem; margin-top: var(--sp-5); }
.auth-form .btn { margin-top: .3rem; }
.form-error { color: var(--rojo); font-weight: 600; margin: 0 0 .5rem; }
@media (max-width: 720px) { .acm-form .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .acm-form .grid { grid-template-columns: 1fr; } }

/* ── redeem ──────────────────────────────────────────────────────────────── */
.redeem code { background: var(--cream); padding: .15rem .45rem; border-radius: var(--radius-sm); font-size: .92em; }
.redeem .small { font-size: var(--fs-sm); color: var(--ink-soft); }
.redeem form { margin-top: var(--sp-4); display: grid; gap: .65rem; max-width: 24rem; }
.redeem-result .badge { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .8rem;
  border-radius: var(--radius-pill); font-weight: 700; font-size: var(--fs-cap); text-transform: uppercase; letter-spacing: .08em; }
.badge-ok { background: rgba(58,158,58,.14); color: var(--verde-texto); }
.badge-no { background: rgba(224,80,80,.14); color: var(--rojo-texto); }

/* ── paywall ─────────────────────────────────────────────────────────────── */
.paywall { max-width: 620px; margin-inline: auto; }

/* ── Página legal (política de tratamiento de datos) ──────────────────────────
   El repo no tenía estilos de prosa: todas sus páginas son formularios o tarjetas. Un
   documento legal es lo contrario —párrafos largos que alguien tiene que poder leer de
   verdad—, así que necesita medida de línea, aire entre secciones y listas legibles. */
.legal { text-align: left; }
.legal h2 { font-size: 1.05rem; margin: var(--sp-6) 0 var(--sp-3); color: var(--navy); }
.legal p, .legal li { max-width: var(--measure); line-height: 1.65; }
.legal ul { margin: 0 0 var(--sp-4); padding-left: 1.15rem; }
.legal li { margin-bottom: .45rem; }
/* Los datos del responsable son una ficha, no prosa: se leen buscando un dato concreto. */
.legal-datos { display: grid; gap: .5rem; margin: var(--sp-4) 0 var(--sp-5); padding: var(--sp-5);
  border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface); }
.legal-datos > div { display: flex; flex-wrap: wrap; gap: .2rem .75rem; }
.legal-datos dt { font-weight: 700; color: var(--ink-soft); font-size: var(--fs-sm); min-width: 7.5rem; }
.legal-datos dd { margin: 0; color: var(--ink); }
/* El candado y el eyebrow son hermanos EN LÍNEA, así que este margin-bottom no hacía nada. */
.paywall .lock { width: 52px; height: 52px; border-radius: var(--radius-md); background: rgba(255,165,34,.14);
  color: var(--naranja-texto); display: inline-flex; align-items: center; justify-content: center; }
.paywall .cta-row { margin-top: var(--sp-5); }

/* El formulario de desbloqueo vive DENTRO del muro: es un paso del flujo, no una página
   aparte, así que no lleva el ancho ni el aire de un cuestionario completo. */
.unlock-form { margin-top: var(--sp-5); text-align: left; }
.unlock-form .grid { gap: var(--sp-4); }
.unlock-form .btn-block { margin-top: var(--sp-4); }

/* ── El muro con cobro: dos puertas ────────────────────────────────────────────
   Pagar es la principal —la mayoría de quien llega aquí no trae código— y el canje
   queda plegado. Esta ES nuestra pantalla de pago: con Checkout Pro la de Mercado
   Pago es una redirección que no podemos tocar, así que todo lo que hay que
   preguntarle al cliente cabe aquí, una sola vez. */
.pagar-form .factura { border: 0; padding: 0; margin: var(--sp-5) 0 0; min-inline-size: 0; }
.factura-legend { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); padding: 0; }
.factura-lede { font-size: .85rem; color: var(--ink-soft); margin: .25rem 0 var(--sp-4); }
/* Rejilla PROPIA, de dos columnas. La del cuestionario son tres y aquí no hay ninguna fila
   de tres campos: reusarla dejaba un hueco de una columna en cada fila. */
/* `align-items: start` y NO `stretch`, que es lo que usa la rejilla del cuestionario. Con
   `stretch` las etiquetas se estiran a la altura de la fila y el `margin-top: auto` de
   `.acm-form label > input` empuja cada campo al fondo de SU celda: como "Número" lleva una
   pista debajo y "Tipo de documento" no, el <select> acababa alineado con la pista en vez de
   con el input, tres cuartos de campo más abajo. Alineando arriba, las dos etiquetas ocupan
   una línea y sus campos empiezan a la misma altura sin depender de lo que lleven debajo. */
.factura-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.factura-campos .full { grid-column: 1 / -1; }
/* TRES tarjetas en una fila. Con el `flex: 1 1 180px` de siempre caían 2 + 1, y eso hace leer
   la tercera —«a nombre de mi empresa»— como una opción de segunda categoría.
   **La clase va DOBLADA (`.radio-cards.radio-cards--trio`) y no es un tic.** `.radio-cards label`
   es (0,1,1) y `.radio-cards--trio label` también: empatan, y gana la que va después en el
   archivo — que es la genérica, 270 líneas más abajo. Es la misma colisión que dejó la casilla
   de habeas data apilada sobre su texto y el `<select>` de documento fuera de su fila. */
.radio-cards.radio-cards--trio label { flex: 1 1 28%; }
@media (max-width: 640px) { .radio-cards.radio-cards--trio label { flex: 1 1 100%; } }

/* El documento y su dígito son UN campo partido en dos cajas, porque el RUT los imprime
   juntos y así se lee que el de la derecha no se teclea. `margin-top: auto` va aquí y no en
   el input: dentro de este envoltorio el input deja de ser hijo directo del label, así que
   la regla de alineación de `.acm-form label > input` ya no lo alcanza. */
.doc-num { display: flex; gap: .4rem; align-items: stretch; margin-top: auto; }
.doc-num input { flex: 1 1 auto; }
.doc-dv { flex: 0 0 auto; min-width: 2.9rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px dashed var(--hairline-cool); border-radius: var(--radius-md); background: #FFF9EF;
  color: var(--navy); font-weight: 700; font-variant-numeric: tabular-nums; }

/* La autorización de habeas data. Dos cosas que NO son estilo:
   - El selector va acotado con `.acm-form` porque `.acm-form label` es (0,1,1) y le ganaba a
     un `.check-linea` pelado (0,1,0): la casilla salía APILADA encima de su texto, con el
     aspecto de dos elementos sin relación en vez de una casilla y su etiqueta.
   - `align-items: flex-start` y no `center`: el texto ocupa dos líneas, y una casilla centrada
     contra dos líneas queda flotando a media altura sin tocar la primera. */
.acm-form .check-linea { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 500;
  font-size: .85rem; line-height: 1.45; color: var(--ink-soft); cursor: pointer; margin-top: var(--sp-5); }
.acm-form .check-linea input { margin: .18rem 0 0; flex: 0 0 auto; }
.pagar-nota { margin-top: var(--sp-3); }

/* La otra puerta. Plegada, pero nunca escondida: para quien trae código es su única salida. */
.canje-alterno { margin-top: var(--sp-5); text-align: left;
  border-top: 1px solid var(--hairline); padding-top: var(--sp-4); }
.canje-alterno > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--navy);
  list-style: none; display: flex; align-items: center; gap: .5rem; }
.canje-alterno > summary::-webkit-details-marker { display: none; }
.canje-alterno > summary::before { content: "+"; display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; background: rgba(255,165,34,.16);
  color: var(--naranja-texto); font-weight: 700; line-height: 1; }
.canje-alterno[open] > summary::before { content: "2"; }
.canje-alterno .unlock-form { margin-top: var(--sp-4); }

/* Una sola columna antes de que los pares de campos se estrechen de más. */
@media (max-width: 560px) { .factura-campos { grid-template-columns: 1fr; } }

/* La prueba de que el cuestionario no se perdió. Existe para que el usuario LO VEA: el bug
   que motivó todo esto no era solo perder los datos, era creer que se habían perdido. */
.resumen-borrador { max-width: 620px; margin: var(--sp-6) auto 0; padding: var(--sp-5);
  border: 1px solid var(--linea, rgba(36,48,94,.12)); border-radius: var(--radius-md); }
.resumen-titulo { font-size: 1rem; margin: 0 0 var(--sp-4); color: var(--navy); }
.resumen-lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: var(--sp-3) var(--sp-5); margin: 0 0 var(--sp-5); }
.resumen-lista dt { font-size: .72rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: .15rem; }
.resumen-lista dd { margin: 0; font-weight: 700; color: var(--navy); }
/* En 390px el auto-fit se queda a un pixel de la segunda columna y las seis respuestas
   caen en fila india: 500px de alto que empujan "Editar mis respuestas" fuera de la
   pantalla. Dos columnas fijas y menos relleno lo devuelven a un vistazo. */
@media (max-width: 480px) {
  .resumen-borrador { padding: var(--sp-4); }
  .resumen-lista { grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); }
}

/* ── teaser / premium ────────────────────────────────────────────────────── */
.watermark { display: inline-block; color: var(--ink-soft); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; }
.teaser-facts, .facts { margin: .75rem 0 1rem; padding-left: 1.2rem; color: var(--ink-soft); line-height: 1.9; }

/* ── account / me ────────────────────────────────────────────────────────── */
.account .profile { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.2rem; margin: var(--sp-4) 0; }
.account .profile dt { color: var(--ink-soft); font-size: var(--fs-sm); }
.account .profile dd { margin: 0; font-weight: 600; }
.status-card { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--sp-5); margin: var(--sp-5) 0;
  background: var(--surface); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.status-card p { margin: 0; }
.report-list { list-style: none; padding: 0; margin: .5rem 0 var(--sp-5); }
.report-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--hairline); }
.account-links { display: flex; gap: .6rem; margin: var(--sp-5) 0; flex-wrap: wrap; }

/* ── plans ───────────────────────────────────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin: var(--sp-6) 0; align-items: stretch; }
.plan-card { height: 100%; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  padding: var(--sp-5); display: flex; flex-direction: column; box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); position: relative; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan-card.featured { border-color: var(--naranja); box-shadow: var(--shadow-lg); }
/* Real DOM element (was CSS ::before, which screen readers don't reliably announce). */
.plan-badge { position: absolute; top: -11px; left: var(--sp-5);
  background: var(--naranja); color: var(--navy-dark); font-family: var(--font-headline); font-weight: 700;
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: .25rem .6rem; border-radius: var(--radius-pill); }
.plan-card h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.plan-price { color: var(--naranja-texto); font-family: var(--font-headline); font-weight: 700; margin: 0 0 .15rem; }
.plan-meta { color: var(--ink-soft); font-size: .82rem; margin: 0 0 var(--sp-4); }
.plans-note { background: var(--cream); border: 1px solid var(--hairline); border-radius: var(--radius-md);
  padding: .8rem 1.1rem; margin: 0 auto var(--sp-6); max-width: 46rem; text-align: center; color: var(--ink-soft); }
.plans-note a { color: var(--naranja-texto); font-weight: 600; }
.plan-card ul { padding-left: 1.1rem; color: var(--ink-soft); flex: 1; line-height: 1.8; font-size: .9rem;
  margin: 0 0 var(--sp-5); }  /* aire fijo entre el último ítem y el botón: `margin-top: auto` da 0 en la card más alta */
.plan-card .btn { margin-top: auto; min-height: 48px; }
/* Dos rejillas: lo que se vende (2) y lo que viene (3). Van antes de los media queries de
   abajo para que esos sigan ganando por orden. Un pendiente no invita: sin hover ni sombra. */
.plan-grid--vivos { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 760px; margin-inline: auto; }
.plan-grid--pendientes { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--sp-4); }
.plans-pendientes { margin-top: var(--sp-6); }
/* Un pendiente se apaga por color, no por `opacity`: la opacidad de la card también lavaba la
   etiqueta, que además heredaba el navy del badge naranja sobre un fondo gris-navy (1.3:1). */
.plan-card.pendiente { border-style: dashed; box-shadow: none; background: var(--bg); }
.plan-card.pendiente:hover { transform: none; box-shadow: none; }
.plan-card.pendiente h2 { color: var(--ink-soft); }
.plan-badge--pendiente { background: var(--navy); color: #fff; }  /* 12:1 */
.plan-foot { color: var(--ink-soft); font-size: .78rem; line-height: 1.5; margin: var(--sp-3) 0 0; }
.plans-b2b { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: var(--sp-5); }
.plans-b2b a { color: var(--naranja-texto); font-weight: 600; }
@media (max-width: 900px) { .plan-grid--pendientes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .plan-grid--vivos, .plan-grid--pendientes { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .plan-grid { grid-template-columns: 1fr; } }

/* ── admin ───────────────────────────────────────────────────────────────── */
.admin-nav { list-style: none; padding: 0; display: flex; gap: 1rem; }
.admin-nav a { color: var(--info); font-weight: 600; }
.admin-subhead { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-h3, 1.2rem); }
.admin-flash { padding: .7rem 1rem; border-radius: var(--radius-md, 10px); margin: var(--sp-4) 0; font-weight: 500; }
.admin-flash-ok { background: rgba(58,158,58,.14); color: var(--verde-texto); }
.admin-flash-warn { background: rgba(224,80,80,.14); color: var(--rojo); }
/* Wide content scrolls inside its own container so the page never scrolls sideways. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; margin: var(--sp-5) 0; }
.admin-table th, .admin-table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--hairline); }
.admin-table th { font-size: var(--fs-cap); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; }
.pill-active { background: rgba(58,158,58,.15); color: var(--verde-texto); }
.pill-revoked { background: rgba(224,80,80,.15); color: var(--rojo); }
.pill-paused, .pill-expired { background: var(--neutro-300); color: var(--ink-soft); }
/* Free is an active (if limited) state — not the grey of paused/expired. */
.pill-free { background: rgba(214,123,30,.14); color: var(--naranja-texto); }
.btn-danger { color: var(--rojo); border-color: rgba(224,80,80,.4); background: var(--surface); }
/* dashboard polish: section cards, type tags, mini progress */
.admin > .lede { margin-bottom: var(--sp-5); }
.admin-card { margin: 0 0 var(--sp-5); }
.admin-card--primary { border-top: 3px solid var(--naranja); }
.admin-card-title { font-size: 1.15rem; margin: 0 0 .2rem; }
.admin-card-hint { color: var(--ink-soft); font-size: .86rem; margin: 0; }
.admin-card .acm-form .grid { margin-top: var(--sp-4); }
.admin-card .admin-table { margin: var(--sp-4) 0 0; }
.admin-card .admin-table tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: .12rem .55rem; border-radius: var(--radius-pill);
  font-size: .74rem; font-weight: 600; text-transform: capitalize;
  background: var(--cream); color: var(--ink-soft); border: 1px solid var(--hairline); }
.canjes { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.canjes-bar { width: 52px; height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.canjes-bar > i { display: block; height: 100%; background: var(--naranja); }
.row-actions { text-align: right; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: var(--sp-5); }
/* code lifecycle pills */
.pill-available { background: rgba(58,158,58,.15); color: var(--verde-texto); }
.pill-reserved { background: rgba(214,123,30,.14); color: var(--naranja-texto); }
.pill-redeemed { background: var(--neutro-300); color: var(--ink-soft); }
/* fotos del inmueble — galería (reporte) + preview (form) */
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.foto-item { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-md); border: 1px solid var(--hairline); }
.fotos-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.fotos-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--hairline); }

/* ── Zona de carga de fotos ────────────────────────────────────────────────────
   El control nativo ("Elegir archivos · Sin archivos seleccionados") es el único
   trozo de cromo del navegador que quedaba a la vista, y no se puede estilar de
   forma fiable entre motores. El patrón: el <input type=file> real se queda —
   transparente y estirado sobre la zona, como ya hacen las .radio-cards— así que
   sigue recibiendo foco, teclado y el clic, y SIN JavaScript se comporta igual
   que siempre. Lo que se ve es el <label>. */
.fotos-drop { position: relative; display: flex; flex-direction: column; align-items: center;
  gap: .3rem; padding: var(--sp-5) var(--sp-4); text-align: center; cursor: pointer;
  border: 1.5px dashed var(--hairline-cool); border-radius: var(--radius-md);
  background: var(--bg); color: var(--ink-soft);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.fotos-drop:hover { border-color: var(--naranja-texto); background: #FFFCF6; }
/* El foco vive en el input invisible; el aro tiene que dibujarlo el contenedor. */
.fotos-drop:focus-within { border-color: var(--naranja-texto); border-style: solid;
  box-shadow: 0 0 0 3px rgba(255,165,34,.28); }
.fotos-drop.is-dragging { border-color: var(--naranja-texto); border-style: solid; background: #FFF9EF; }
.fotos-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; padding: 0; border: 0; min-height: 0; }
.fotos-drop__ico { color: var(--naranja-texto); display: flex; }
.fotos-drop__ico svg { width: 26px; height: 26px; }
.fotos-drop__txt { font-family: var(--font-headline); font-weight: 600; color: var(--ink); font-size: .96rem; }
.fotos-drop__txt b { color: var(--naranja-texto); font-weight: 600; }
.fotos-drop__hint { font-size: var(--fs-cap); color: var(--ink-soft); }

/* Miniatura + su botón de quitar. El botón es real (no un ::after) para que se
   pueda tabular y anunciar. */
.fotos-thumb-wrap { position: relative; line-height: 0; }
.fotos-thumb-quitar { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  min-height: 0; padding: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: var(--radius-pill); border: 1px solid var(--hairline);
  background: var(--surface); color: var(--ink); font-size: .8rem; line-height: 1;
  box-shadow: var(--shadow-soft); }
.fotos-thumb-quitar:hover { background: var(--rojo-texto); color: #fff; border-color: var(--rojo-texto); }
.fotos-resumen { font-size: var(--fs-sm); color: var(--ink-soft); margin: .5rem 0 0; }

/* ── ACM report — mirrors the premium v4 report ──────────────────────────── */
.acm-report { counter-reset: repsec; }
.acm-report .rep-hero { margin-bottom: var(--sp-5); }
.rep-sub { color: var(--ink-soft); margin: .35rem 0 0; font-size: var(--fs-sm); }
.sample-note { background: var(--cream); color: var(--ink-soft); padding: .55rem .85rem;
  border-radius: var(--radius-md); font-size: var(--fs-sm); font-weight: 500; border: 1px solid var(--hairline);
  margin: 0 0 var(--sp-5); }

/* numbered v4-style cards */
.rep-card { background: var(--surface); border: 1px solid var(--hairline-cool); border-top: 4px solid var(--naranja);
  border-radius: var(--radius-lg); padding: var(--sp-6); margin: 0 0 var(--sp-5); box-shadow: var(--shadow-card); }
.rep-card > h2 { display: flex; align-items: center; gap: .6rem; margin: 0 0 var(--sp-4);
  padding-bottom: .6rem; border-bottom: 3px solid var(--naranja); font-family: var(--font-headline);
  font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.rep-card > h2::before { counter-increment: repsec; content: counter(repsec);
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 999px;
  background: linear-gradient(135deg, var(--naranja), var(--naranja-dark));
  color: var(--navy-dark); font-size: .95rem; font-weight: 800; }  /* blanco sobre naranja = 1.97:1 */

/* profile card (v4): icon + label + value rows */
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-6); }
.profile-stat { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--hairline); }
.ps-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--bg);
  display: grid; place-items: center; color: var(--navy); font-size: 1.05rem; }
.ps-content { display: flex; flex-direction: column; min-width: 0; }
.ps-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.ps-value { font-family: var(--font-headline); font-weight: 700; font-size: 1.05rem; color: var(--navy); margin-top: 2px; }
.profile-stat.is-locked .ps-value.lock-blur { font-size: 1.05rem; margin: 2px 0 0; }
.profile-stat.is-locked .lock-badge { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }

/* KPI boxes */
.stat-caveat { margin: 0 0 var(--sp-3); font-size: .82rem; color: var(--ink-soft); font-style: italic; }
.share-cta { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between;
  background: var(--cream); border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 1rem 1.25rem; margin-top: var(--sp-5); }
.share-cta p { margin: 0; font-weight: 500; }
.report-degraded { color: var(--ink-soft); background: var(--cream); border: 1px dashed var(--hairline);
  border-radius: var(--radius-md); padding: 1.5rem; text-align: center; margin: 0; }
.hero-alt { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--ink-soft); }
.hero-alt a { color: var(--naranja-texto); font-weight: 600; }
.stat-boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-box { background: var(--bg); border: 1px solid var(--hairline-cool); border-radius: var(--radius-md); padding: var(--sp-4); }
.stat-label { display: block; font-size: .74rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.stat-val { display: block; font-family: var(--font-headline); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin-top: .25rem; }

/* chart frame (v4) */
.chart-container { background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(240,244,248,.6));
  border: 1px solid var(--hairline-cool); border-radius: 12px; padding: var(--sp-4); }
.acm-map { height: 560px; border-radius: var(--radius-md); overflow: hidden; margin: 0; border: 1px solid var(--hairline-cool); position: relative; z-index: 1; }
.acm-chart { margin: .25rem 0; }
.acm-chart svg { max-width: 100%; }

/* recommendation — premium (real data) + teaser (locked) share the navy card */
.recommendation { position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1B2547 0%, var(--navy) 40%, #2A3F73 100%); color: #fff;
  border-radius: var(--radius-lg); padding: var(--sp-6); margin: 0 0 var(--sp-5); box-shadow: var(--shadow-lg); }
.recommendation .rec-eyebrow { color: var(--naranja); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: var(--fs-cap); margin: 0; }
.rec-price { font-family: var(--font-headline); font-weight: 800; font-size: 2.6rem; margin: .25rem 0; letter-spacing: -.02em; }
.rec-price .rec-per { font-size: 1rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.rec-range { color: var(--azul-cielo); font-size: .9rem; margin: 0 0 .75rem; }
.rec-analisis { color: #dfe6f5; }
.rec-strats { color: #dfe6f5; padding-left: 1.1rem; line-height: 1.8; }
.rec-blur { filter: blur(7px); user-select: none; }
.rec-locked .rec-analisis { margin-top: .5rem; }
.rec-locked .btn-lg { margin-top: var(--sp-4); }
.rec-locked .small-note { color: rgba(255,255,255,.72); }
.premium-tag { display: inline-block; vertical-align: middle; margin-left: .4rem; font-size: .6rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--navy); background: var(--naranja); padding: 2px 8px; border-radius: 999px; }

.acm-watermark::after { content: "RING · LA CASAMÍA"; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) rotate(-30deg); font-size: 4rem; font-weight: 800;
  color: rgba(36,48,94,.06); pointer-events: none; z-index: 0; white-space: nowrap; }
.report-actions { display: flex; gap: .6rem; margin-top: var(--sp-5); flex-wrap: wrap; align-items: center; }
.report-actions .share-form { margin: 0; }
.share-sent { color: var(--verde-texto); font-weight: 600; }
.share-link { display: flex; gap: .5rem; margin: var(--sp-4) 0 .5rem; }
.share-url { flex: 1; min-width: 0; padding: .6rem .8rem; border: 1px solid var(--hairline);
  border-radius: var(--radius-md); background: var(--surface); font-family: var(--mono, monospace); font-size: .9rem; }

/* map: subject marker + density legend (bottom-left), like v4 */
.acm-subject-dot { display: block; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%;
  background: var(--navy); border: 3px solid var(--naranja); box-shadow: 0 0 0 4px rgba(255,165,34,.22); }
.acm-legend { background: #fff; border: 1px solid var(--hairline-cool); border-radius: 8px; padding: 8px 10px;
  box-shadow: var(--shadow-card); font-size: .72rem; color: var(--navy); line-height: 1.5; }
.acm-legend strong { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.acm-legend-row { display: flex; align-items: center; gap: 6px; }
.acm-legend-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.acm-legend-foot { display: block; margin-top: 5px; color: var(--ink-soft); font-size: .64rem; }

@media (max-width: 720px) {
  .profile-stats { grid-template-columns: 1fr; }
  .stat-boxes { grid-template-columns: 1fr; }
  .acm-map { height: 440px; }
}

/* ── hosted motor report (real ACM, sandboxed iframe) ─────────────────────── */
.acm-hosted { margin: var(--sp-5) 0; }
/* Centrada, no `space-between`: con el rótulo compitiendo por la fila, "centrar" acababa
   siendo "lo que sobra a la derecha del rótulo". El rótulo se va a su propia fila
   (`flex-basis: 100%`) y los botones quedan centrados de verdad bajo él. */
.acm-hosted-bar { display: flex; align-items: center; justify-content: center; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .75rem; text-align: center; }
.acm-hosted-bar .eyebrow { flex-basis: 100%; }
.acm-hosted-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.acm-hosted-actions .share-form { display: flex; gap: .4rem; margin: 0; }
/* La frase que el vendedor necesita leer justo antes de mandarle esto a su contraparte.
   Vivía en la página de confirmación, que este flujo ya no atraviesa. */
.acm-hosted-nota { flex-basis: 100%; margin: .5rem 0 0; text-align: center; }
.acm-frame { width: 100%; height: calc(100dvh - 200px); min-height: 560px; border: 1px solid var(--hairline-cool);
  border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
/* On a phone the fixed 560px min forces a cramped inner scroll; give the iframe
   more of the viewport and let it shrink so the double-scroll is minimal. */
@media (max-width: 640px) {
  .acm-frame { height: calc(100dvh - 128px); min-height: 420px; }
}

/* ── multi-step ACM questionnaire ─────────────────────────────────────────── */
.form-error { background: rgba(224,80,80,.12); color: #a1201f; border: 1px solid rgba(224,80,80,.3);
  padding: .6rem .85rem; border-radius: var(--radius-md); margin: 0 0 1rem; font-weight: 600; }
.qsteps-bar { display: flex; gap: 8px; margin: 0 0 1.25rem; }
.qsteps-bar .seg { flex: 1; height: 6px; border-radius: 99px; background: var(--hairline); transition: background .2s; }
.qsteps-bar .seg.done { background: var(--verde); }
.qsteps-bar .seg.active { background: var(--naranja); }
.qstep h2 { font-size: 1.2rem; margin: 0 0 .25rem; }
.qstep .sub { color: var(--ink-soft); margin: 0 0 1.1rem; font-size: .93rem; }
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 1.1rem; }
.radio-cards label { flex: 1 1 180px; margin: 0; border: 1.5px solid var(--hairline-cool); border-radius: var(--radius-md);
  padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--navy); transition: .15s; position: relative; }
.radio-cards input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-cards label:hover { border-color: var(--naranja); }
.radio-cards label:has(input:checked) { border-color: var(--naranja); background: #FFF9EF; box-shadow: 0 0 0 3px rgba(255,165,34,.12); }
.radio-cards .rc small { display: block; font-weight: 500; color: var(--ink-soft); font-size: .78rem; margin-top: 2px; }
label .req { color: #9a5300; }  /* AA on light bg */
label .opt { color: var(--ink-soft); font-weight: 500; font-size: .85em; }
.acm-form textarea { width: 100%; min-height: 92px; resize: vertical; }
.stepper-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.stepper-nav .cta-row { margin: 0; }
/* JS mode shows one step at a time; without JS every step is visible (still submits). */
html.js .acm-form[data-steps] .qstep:not(.is-active) { display: none; }
.acm-form .qhead { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.15rem; }
.acm-form .qhead .qsteps-bar { flex: 1; margin: 0; }
.acm-form .qstep-label { font-size: .78rem; font-weight: 700; color: var(--ink-soft); white-space: nowrap; letter-spacing: .02em; }
.acm-form .qstep h2 { scroll-margin-top: 88px; outline: none; }
.radio-cards .rc { display: flex; flex-direction: column; }
.radio-cards .rc-ico { font-size: 1.35rem; line-height: 1; margin-bottom: .3rem; }
.radio-cards label:has(input:focus-visible) { border-color: var(--naranja-texto); box-shadow: 0 0 0 3px rgba(255,165,34,.35); }
/* Cruce a la otra puerta del nav. Es un enlace de servicio, no una acción: pesa menos que
   las tarjetas que tiene encima y no compite con "Continuar". */
/* El cruce vive FUERA de la tarjeta, al pie. No lleva separador propio: el borde de la
   propia tarjeta ya marca dónde acaba el formulario y empieza la salida a otra sección.
   (Cuando vivía dentro sí hizo falta una regla, porque quedaba con el mismo aire arriba y
   abajo y el ojo lo enganchaba a la tarjeta seleccionada como si fuera su pie.) */
.familia-cruce { margin: 1.1rem 0 0; font-size: var(--fs-sm); }
.familia-cruce a { color: var(--naranja-texto); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(154,83,0,.35); padding-bottom: 1px;
  transition: border-color var(--dur) var(--ease); }
.familia-cruce a:hover { border-bottom-color: var(--naranja-texto); }

/* single-screen ACM entry: optional "afinar" disclosure + trust hint */
.acm-form .afinar { margin: 1.1rem 0 0; border-top: 1px solid var(--hairline); padding-top: .8rem; }
.acm-form .afinar > summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; user-select: none; }
.acm-form .afinar > summary::-webkit-details-marker { display: none; }
.acm-form .afinar > summary::before { content: "＋ "; color: var(--naranja-texto); font-weight: 700; }
.acm-form .afinar[open] > summary::before { content: "－ "; }
.acm-form .afinar .grid { margin-top: .9rem; }
.field-hint { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 500; margin-top: .35rem; min-height: 1em; }
/* El verde es una CONFIRMACIÓN, no la tipografía por defecto de una pista. Se pide a mano, y
   en un tono que sí pasa AA sobre blanco: #2C7A2C da 4.9:1, --verde se quedaba en 3.4:1. */
.field-hint.is-ok { color: var(--verde-texto); font-weight: 600; }
.small-note { font-size: .82rem; color: var(--ink-soft); margin-top: .85rem; }

/* teaser: locked "Premium" markers (badge + blurred non-numeric token) */
.lock-badge { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #9a5300; background: rgba(255,165,34,.16); padding: 2px 7px; border-radius: 99px; }
.lock-blur { display: block; font-family: var(--font-headline); font-weight: 800; font-size: 1.05rem; color: var(--navy);
  filter: blur(5px); user-select: none; margin: .2rem 0 .35rem; }

/* ── auth / redeem split shell (centered) ────────────────────────────────── */
.auth-split { min-height: calc(100dvh - 69px); display: grid; place-items: center; padding: var(--sp-7) 1.5rem; }
.auth-shell { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1.02fr .98fr;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-aside { position: relative; overflow: hidden; color: #fff; padding: var(--sp-7);
  background: linear-gradient(165deg, #27345f 0%, var(--navy-dark) 100%);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-6); }
.auth-aside::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,165,34,.28), transparent 70%); pointer-events: none; }
.auth-aside .eyebrow { color: var(--naranja); position: relative; z-index: 1; }
.auth-aside h2 { color: #fff; font-size: clamp(1.5rem, 2.1vw, 2rem); margin: var(--sp-2) 0 var(--sp-3); position: relative; z-index: 1; }
.auth-aside p { color: rgba(255,255,255,.78); margin: 0; position: relative; z-index: 1; }
.auth-aside-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; position: relative; z-index: 1; }
.auth-aside-list li { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.92); font-size: var(--fs-sm); }
.auth-aside-list li::before { content: "✓"; color: var(--naranja); font-weight: 800; }
.auth-main { padding: var(--sp-7); display: flex; flex-direction: column; justify-content: center; }
.auth-form-wrap { width: 100%; max-width: 340px; margin: 0 auto; }
.auth-form-wrap .eyebrow { display: block; }
.auth-form-wrap h1 { font-size: 1.6rem; margin-bottom: var(--sp-2); }
.auth-form-wrap .lede { font-size: 1rem; margin-bottom: var(--sp-5); }
.auth-form-wrap form { display: grid; gap: .7rem; max-width: none; margin: 0; }
.auth-form-wrap .auth-form { gap: .7rem; }
.auth-form-wrap .cta-row { margin-top: var(--sp-2); }
.auth-foot { margin-top: var(--sp-5); font-size: var(--fs-sm); color: var(--ink-soft); }
.auth-foot a { font-weight: 600; }
@media (max-width: 760px) {
  .auth-split { padding: var(--sp-5) 1rem; min-height: calc(100dvh - 69px); }
  .auth-shell { grid-template-columns: 1fr; max-width: 460px; }
  .auth-aside { display: none; }
  .auth-main { padding: var(--sp-6); }
}

/* ── footer ──────────────────────────────────────────────────────────────── */
.site-footer { flex-shrink: 0; background: var(--azul-oscuro); color: #fff; margin-top: var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: var(--sp-6); padding: var(--sp-7) 0 var(--sp-5); }
/* Sin la columna "Producto" (páginas con `cromo_minimo`): tres columnas, no cuatro con un hueco. */
.footer-grid--minimo { grid-template-columns: 1.5fr 1fr 1.1fr; }
.footer-brand img { height: 42px; display: block; margin-bottom: var(--sp-4); }
.footer-brand p { color: rgba(255,255,255,.72); font-size: var(--fs-sm); max-width: 34ch; }
.footer-col h2 { color: var(--naranja); font-family: var(--font-headline); font-size: .95rem; font-weight: 700;
  letter-spacing: 0; line-height: 1.3; margin: 0 0 var(--sp-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-col a { color: rgba(255,255,255,.82); text-decoration: none; font-size: var(--fs-sm); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--naranja); }
.footer-contact a { display: inline-flex; align-items: center; gap: .55rem; }
.footer-contact svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.footer-social { display: flex; gap: .6rem; margin-top: var(--sp-4); }
.footer-social a { width: 38px; height: 38px; border-radius: var(--radius-pill); background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; transition: background var(--dur) var(--ease), transform var(--dur) var(--ease); }
.footer-social a:hover { background: rgba(255,165,34,.9); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; fill: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: var(--sp-4) 0; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; color: rgba(255,255,255,.6); font-size: var(--fs-cap); }
.footer-bottom a { color: rgba(255,255,255,.6); text-decoration: none; }
.footer-bottom a:hover { color: var(--naranja); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  /* Phone: the photo becomes a soft backdrop; a stronger vertical cream scrim keeps
     the text (top) readable and lets the Bogotá skyline peek through lower down. */
  .hero { min-height: auto; }
  .hero-media { background-position: center 22%; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(244,241,234,.55) 0%, var(--cream) 20%, var(--cream) 50%,
      rgba(244,241,234,.85) 80%, rgba(244,241,234,.92) 100%); }
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

/* ── scroll reveal (progressive enhancement; only hides when JS is present) ── */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ── print ───────────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .report-actions, .btn, .leaflet-control-container { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0 .5rem; }
  .acm-report { -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 12px; }
  .acm-report h1 { margin-top: 0; }
  .acm-map { height: 300px; }
  .rep-card { box-shadow: none; break-inside: avoid; }
  /* locked placeholders are non-numeric tokens (honest in print) — just un-smudge them */
  .rec-blur, .lock-blur { filter: none; opacity: .5; }
}

/* ── Página de espera (/p/{id} mientras el reporte se prepara) ─────────────────
   Reusa el isotipo+anillo del overlay de generación (.acm-loading__*) pero
   inline, no como capa fija. La señal de avance son los tres pasos REALES del
   job (en cola → revisando listings → generando): un porcentaje sería inventado,
   porque nadie sabe cuánto falta dentro de un scrape. */
.prep { max-width: 34rem; text-align: center; }
.prep-estado { display: flex; flex-direction: column; align-items: center; gap: .85rem; margin: 1.5rem 0; }
.prep-mark { margin: 0 auto; }
.prep-fase { font-family: var(--font-headline); font-weight: 700; font-size: 1.1rem;
  color: var(--navy); margin: 0; }

.prep-pasos { list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .35rem 1.4rem; margin: 0; padding: 0; }
.prep-paso { display: flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--ink-soft); }
.prep-paso__punto { display: grid; place-items: center; width: 1.15rem; height: 1.15rem; flex: 0 0 auto;
  border-radius: 50%; border: 2px solid var(--neutro-500); background: transparent;
  font-size: .7rem; line-height: 1; color: var(--neutro-100); }
.prep-paso.is-hecho { color: var(--ink-soft); }
.prep-paso.is-hecho .prep-paso__punto { border-color: var(--verde); background: var(--verde); }
.prep-paso.is-actual { color: var(--navy); font-weight: 700; }
/* El punto del paso actual late al mismo ritmo que el isotipo (2s), pero con su propio
   keyframe: isoPulse lleva un translate(-50%,-50%) que aquí lo sacaría de su sitio. */
.prep-paso.is-actual .prep-paso__punto { border-color: var(--naranja); background: var(--naranja);
  animation: puntoPulse 2s ease-in-out infinite; }
@keyframes puntoPulse {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.18); opacity: 1; }
}
.prep-paso.is-pendiente { opacity: .55; }

.prep-meta { margin: 0; font-size: .88rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.prep-lento { margin: .35rem 0 0; padding: .7rem .9rem; border-radius: .6rem; max-width: 30rem;
  background: rgba(255,165,34,.12); border: 1px solid rgba(255,165,34,.4);
  color: var(--ink); font-size: .88rem; }
.prep-hint { font-size: .85rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .prep-paso.is-actual .prep-paso__punto { animation: none; }
}

/* Rastreador de pasos dentro del overlay de generación: mismo lenguaje visual que la
   página de espera (.prep-pasos), centrado y apilado bajo el mensaje. */
.acm-loading__pasos { flex-direction: column; align-items: flex-start; gap: .45rem;
  margin: 1.1rem auto 0; width: max-content; max-width: 100%; }
.acm-loading__pasos .prep-paso__txt { text-align: left; }
