/* ==========================================================================
   RED · Red de Emprendedores · estilos de /red (se carga después de rdn.css)
   Solo piezas nuevas con prefijo red-. Usa los tokens de rdn.css.

   ÍNDICE
   1. Tokens propios (sombreado del mapa, tonos de portada)
   2. Cabecera de la Red, subnavegación, avisos
   3. Autocompletar (combobox)
   4. Muro: filtros, caja de publicar, publicaciones, comentarios, barra lateral
   5. Directorio: filtros, grupos, mapa, lista de estados
   6. Perfil: calificación, histograma, reseñas, catálogo, contacto
   7. Únete: pasos, niveles, renglones de catálogo
   8. Mi perfil: secciones plegables, cargas, editor de catálogo, estadísticas
   9. Utilidades
   ========================================================================== */

/* ==========================================================================
   1. TOKENS PROPIOS
   Escala de azules acero para el mapa (de 0 negocios a muchos). Contra el
   trazo blanco del mapa se distinguen todos los niveles.
   ========================================================================== */
:root {
}

/* ==========================================================================
   2. CABECERA DE LA RED, SUBNAVEGACIÓN, AVISOS
   ========================================================================== */
.red-hero { background: var(--paper); }
.red-hero__in { padding-top: var(--sp-6); padding-bottom: var(--sp-6); display: grid; gap: var(--sp-3); }
.red-hero__logo { display: block; width: min(100%, 380px); aspect-ratio: 5 / 1; overflow: hidden; }
.red-hero__logo img { width: 100%; height: auto; margin-top: -6%; }
.red-hero h1 { font-size: var(--fs-2xl); margin-top: var(--sp-1); }
.red-hero .dek { margin-top: var(--sp-1); }
.red-hero--yellow { border-top: 0; }
.red-hero__tab {
  display: inline-block; justify-self: start;
  padding: 5px var(--sp-4) 3px; background: var(--yellow); color: var(--ink);
  border: 2px solid var(--ink); border-top: 0;
  font-family: var(--font-head); font-weight: 800; font-size: var(--fs-sm); letter-spacing: 0.14em; text-transform: uppercase;
}
@media (min-width: 900px) {
  .red-hero__in { padding-top: var(--sp-6); padding-bottom: var(--sp-6); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gap); align-items: end; }
  .red-hero__logo { grid-column: 1 / -1; width: 360px; }
  .red-hero h1 { font-size: clamp(2.75rem, 1rem + 4.2vw, 4.5rem); }
  .red-hero .dek { margin: 0 0 6px; }
}

.red-subnav { background: var(--paper); border-top: var(--line-4); border-bottom: var(--line); }
.red-subnav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.red-subnav__list { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin-left: -12px; }
.red-subnav__list::-webkit-scrollbar { display: none; }
.red-subnav__list a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px;
  border-bottom: 4px solid transparent; margin-bottom: -1px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-mute); white-space: nowrap;
}
.red-subnav__list a:hover { color: var(--ink); }
.red-subnav__list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--red); }
#red-me { display: flex; align-items: center; gap: var(--sp-4); min-width: 0; flex: 1 0 100%; padding-bottom: var(--sp-2); }
.red-subnav__in { flex-wrap: wrap; }
.red-me__out { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; color: var(--ink); min-height: 32px; }
.red-me__link { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.red-me__link:hover .red-me__name { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.red-me__name { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.red-me__none { font-size: var(--fs-sm); color: var(--fg-mute); }
@media (min-width: 640px) {
  #red-me { flex: 0 0 auto; padding-bottom: 0; }
  .red-subnav__in { flex-wrap: nowrap; }
  .red-subnav__list a { padding: 0 16px; font-size: 1.125rem; }
  .red-subnav__list { margin-left: -16px; }
}

.red-notes { display: grid; gap: var(--sp-2); padding-top: var(--sp-4); }
.red-note { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); }
.red-note p { margin: 0; }
.red-note a { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
/* Aviso "Instalar la app" (PWA): texto a la izquierda, botón y cierre a la derecha; en móvil se apilan */
.red-note > div { flex: 1 1 auto; min-width: 0; }
.red-note__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); }
.red-note__row > p { flex: 1 1 240px; }
.red-note__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.red-note__close { display: grid; place-items: center; width: 36px; height: 36px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.red-note__close:hover { background: var(--paper-3); }
.red-note__close .icon { width: 16px; height: 16px; }

.red-page { padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
.red-cols { display: grid; gap: var(--sp-8) var(--gap); grid-template-columns: minmax(0, 1fr); }
.red-cols > * { min-width: 0; }
@media (min-width: 960px) {
  .red-cols--feed { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .red-cols--dir { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: start; }
  .red-cols--perfil { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .red-sticky { position: sticky; top: calc(var(--header-h) + 16px); }
}

/* ==========================================================================
   3. AUTOCOMPLETAR
   ========================================================================== */
.red-combo { position: relative; }
.red-combo__list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 60;
  margin-top: 4px; max-height: 320px; overflow-y: auto;
  background: var(--paper); border: var(--line-2); box-shadow: var(--shadow-pop);
  color: var(--ink);
}
.searchbar .red-combo__list { left: -3px; right: -3px; top: calc(100% + 6px); }
.red-combo__opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  min-height: 44px; padding: 8px 14px; cursor: pointer; line-height: 1.25;
  border-bottom: var(--line-soft);
}
.red-combo__opt:last-child { border-bottom: 0; }
.red-combo__opt strong { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.02em; }
.red-combo__opt span { font-size: var(--fs-sm); color: var(--fg-mute); text-align: right; }
.red-combo__opt small { display: block; font-size: var(--fs-xs); color: var(--fg-mute); font-weight: 400; }
.red-combo__opt:hover { background: var(--red-tint); }
.red-combo__opt[aria-selected="true"] { background: var(--ink); color: #fff; }
.red-combo__opt[aria-selected="true"] span, .red-combo__opt[aria-selected="true"] small { color: #E4DEDE; }
.red-combo__empty { padding: 12px 14px; font-size: var(--fs-sm); color: var(--fg-2); }
.red-combo__tipo { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-deep); }
.red-combo__opt[aria-selected="true"] .red-combo__tipo { color: #FF8CA0; }

/* Estado del municipio ("Estás cerca de…") */
.red-status { font-size: var(--fs-sm); color: var(--fg-2); min-height: 1.4em; }
.red-status.is-error { color: var(--err); font-weight: 600; }
.red-status.is-ok { color: var(--ok); font-weight: 600; }

/* Botón "Usar mi ubicación" fuera de la barra de búsqueda */
.red-locate {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-4);
  border: 2px solid var(--ink); border-radius: var(--r-1);
  font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--paper);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.red-locate:hover { background: var(--ink); color: #fff; }
.red-locate[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.red-locate[aria-pressed="true"] { background: var(--ink); color: #fff; }
/* Dentro de .searchbar imita la pieza "Cerca de mí" del sistema de diseño */
.searchbar .red-locate {
  justify-content: flex-start; min-height: 48px; padding: 0 var(--sp-4);
  border: 0; border-bottom: var(--line); border-radius: 0; background: var(--paper);
}
.searchbar .red-locate:hover { background: var(--paper-2); color: var(--ink); }
.searchbar .red-locate[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (min-width: 900px) {
  .searchbar .red-locate { border-bottom: 0; border-right: var(--line); padding: 0 var(--sp-5); }
}

/* ==========================================================================
   4. MURO
   ========================================================================== */
.red-feedbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5); }
.red-feedbar .select { width: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.red-state-pick { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.red-state-pick label { font-weight: 600; }

/* Caja para publicar (sobre .composer) */
.red-composer { margin-bottom: var(--sp-6); }
.red-composer__preview { position: relative; margin: 0 var(--sp-4) var(--sp-4); width: min(100%, 320px); }
.red-composer__preview img { width: 100%; height: auto; max-height: 240px; object-fit: cover; border: var(--line); }
.red-composer__preview button { position: absolute; right: -10px; top: -10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-round); background: var(--ink); color: #fff; border: 2px solid var(--paper); }
.red-composer__preview button:hover { background: var(--red); }
.red-composer__preview button .icon { width: 14px; height: 14px; stroke-width: 3; }
.red-composer__meta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.red-composer .select { width: auto; min-height: 40px; padding: 6px 40px 6px 12px; font-size: var(--fs-sm); background-position: right 10px center; }
.red-count { font-size: var(--fs-xs); color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.red-count.is-over { color: var(--err); font-weight: 700; }
.red-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.red-file:focus-visible + .chip { outline: 3px solid var(--focus); outline-offset: 3px; }
.red-composer__lock { padding: var(--sp-5); display: grid; gap: var(--sp-3); justify-items: start; background: var(--paper-2); border: var(--line-2); margin-bottom: var(--sp-6); }
.red-composer__lock h2 { font-size: var(--fs-xl); }

/* Publicación */
.red-post { margin-top: 0; }
.red-post + .red-post { margin-top: var(--sp-6); }
.red-post__type { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-deep); }
.red-post__img { margin-top: var(--sp-3); }
.red-post__img img { width: 100%; height: auto; max-height: 520px; object-fit: cover; border: var(--line); }
.red-post__who .post__name { display: inline; }
.red-post__who .badge { margin-left: var(--sp-1); vertical-align: 2px; }
.red-react { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.red-react__btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 var(--sp-3);
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1; color: var(--ink);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.red-react__btn:hover { background: var(--paper-2); }
.red-react__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.red-react__n { font-variant-numeric: tabular-nums; font-weight: 700; }
.red-post__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: var(--line-soft); }
.red-post__bar .post__stats { margin-top: 0; }
.red-linkbtn {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0 var(--sp-2);
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-base); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.red-linkbtn:hover { color: var(--red-deep); }
.red-linkbtn .icon { width: 1.1em; height: 1.1em; }
.red-comments { display: grid; gap: var(--sp-3); padding-top: var(--sp-3); }
.red-comments .comment__bubble strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--sp-2); }
.red-comments .comment__bubble time { font-size: var(--fs-xs); color: var(--fg-mute); font-weight: 400; font-family: var(--font-ui); letter-spacing: 0; }
.red-comment__note { font-size: var(--fs-xs); color: var(--fg-mute); }
.red-comment__x { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; min-height: 28px; }
.red-comment-form { display: flex; gap: var(--sp-2); align-items: flex-start; padding-top: var(--sp-2); }
.red-comment-form .field { flex: 1; min-width: 0; }
.red-comment-form .input { min-height: 44px; }

/* Menú de tres puntos con <details> */
.red-menu { position: relative; }
.red-menu > summary { list-style: none; cursor: pointer; }
.red-menu > summary::-webkit-details-marker { display: none; }
.red-menu__pop {
  position: absolute; right: 0; top: 100%; z-index: 30; min-width: 220px; margin-top: 4px;
  background: var(--paper); border: var(--line-2); box-shadow: var(--shadow-pop);
}
.red-menu__pop button { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; padding: 0 var(--sp-4); text-align: left; font-weight: 600; font-size: var(--fs-sm); }
.red-menu__pop button:hover { background: var(--paper-2); }
.red-menu__pop button.is-danger { color: var(--red-deep); }

/* Barra lateral */
.red-side { display: grid; gap: var(--sp-8); align-content: start; }
.red-side__block > .rubric { margin-bottom: var(--sp-3); }
.red-side h2 { font-size: var(--fs-xl); }
.red-cats { display: grid; }
.red-cats a {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  min-height: 44px; padding: 10px 0; border-bottom: var(--line-soft); text-decoration: none; font-weight: 600;
}
.red-cats a:hover { color: var(--red-deep); }
.red-cats a span { font-size: var(--fs-sm); color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.red-mini { display: grid; }
.red-mini__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: var(--line-soft); }
.red-mini__name { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); line-height: 1.1; text-decoration: none; overflow-wrap: anywhere; }
.red-mini__name:hover { color: var(--red-deep); text-decoration: underline; }
.red-mini__meta { font-size: var(--fs-sm); color: var(--fg-mute); }
.red-join { padding: var(--sp-5); background: var(--ink); color: #fff; display: grid; gap: var(--sp-3); }
.red-join h2 { font-size: var(--fs-xl); }
.red-join p { font-size: var(--fs-sm); color: #E4DEDE; }
.red-join { --focus: #fff; }

/* ==========================================================================
   5. DIRECTORIO
   ========================================================================== */
.red-search { margin-top: var(--sp-5); }
.red-search__hint { margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--fg-mute); max-width: 70ch; }
.red-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.red-chips:empty { display: none; }

.red-filters { margin-bottom: var(--sp-5); border: var(--line); background: var(--paper-2); }
.red-filters > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: 0 var(--sp-4); cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.08em; text-transform: uppercase; list-style: none; }
.red-filters > summary::-webkit-details-marker { display: none; }
.red-filters > summary .icon { transition: transform var(--t-fast) var(--ease); }
.red-filters[open] > summary .icon { transform: rotate(180deg); }
.red-filters__grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); padding: var(--sp-4); border-top: var(--line); }
.red-filters__grid .select { min-height: 44px; }
.red-filters__grid .check { padding: 6px 0; min-height: 44px; align-self: end; }

.red-results__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-3); }
.red-results__count { font-size: var(--fs-md); }
.red-results__count strong { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; margin-right: 4px; }
.red-sort { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.red-sort label { font-weight: 600; }
.red-sort .select { width: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.red-dist-note { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--fg-mute); }
.red-group { margin-top: var(--sp-8); }
.red-group:first-of-type { margin-top: var(--sp-4); }
.red-group > .rubric { margin-bottom: var(--sp-2); }
.red-group .listing:first-of-type { border-top-color: var(--ink); }
.red-more { display: grid; justify-items: center; gap: var(--sp-2); margin-top: var(--sp-6); }
.red-listing-sub { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); font-size: var(--fs-sm); color: var(--fg-mute); }
.red-near { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-base); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.red-near .icon { color: var(--red-deep); }
.listing__desc { overflow-wrap: anywhere; }
.red-empty { margin-top: var(--sp-4); }
.red-empty .row { margin-top: var(--sp-2); }

/* Mapa de México */
.red-mapbox { border: var(--line-2); background: var(--steel); padding: var(--sp-3); }
.red-mapbox--c { background: var(--ink); color: #fff; border-color: var(--ink); --focus: #fff; padding: var(--sp-4); }
.red-mapbox--c > summary { color: #fff; }
.red-mapbox--c .cm-nombre { font-size: 2.25rem; }
.red-mapbox > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.08em; text-transform: uppercase; }
.red-mapbox > summary::-webkit-details-marker { display: none; }
.red-mapbox > summary .icon { transition: transform var(--t-fast) var(--ease); }
.red-mapbox[open] > summary .icon { transform: rotate(180deg); }
.red-statelist { margin-top: var(--sp-3); border-top: 1px solid var(--steel-2); padding-top: var(--sp-2); }
.red-statelist > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: var(--fs-sm); }
.red-statelist ul { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2) 0 var(--sp-1); }
.red-statelist .chip { background: var(--paper); }
.red-statelist .chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.red-statelist .chip b { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   6. PERFIL
   ========================================================================== */
.red-profile .profile-head__name { font-size: var(--fs-2xl); }
.red-profile .profile-head__cover { background: var(--ink); }
.red-profile .profile-head__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.red-profile .profile-head__stats dd { font-size: var(--fs-xl); }
.red-profile-sub { font-family: var(--font-text); font-size: var(--fs-md); color: var(--fg-2); max-width: 60ch; overflow-wrap: anywhere; }
.red-cover { position: absolute; inset: 0; background-color: var(--red); }
.red-cover--1 { background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / 0.16) 14px 16px), var(--red); }
.red-cover--2 { background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(255 255 255 / 0.1) 14px 16px), var(--ink); }
.red-cover--3 { background: radial-gradient(circle at 2px 2px, rgb(255 255 255 / 0.22) 2px, transparent 2.5px) 0 0 / 22px 22px, var(--steel-ink); }
.red-cover--4 { background: repeating-linear-gradient(0deg, transparent 0 21px, rgb(255 255 255 / 0.14) 21px 22px), repeating-linear-gradient(90deg, transparent 0 21px, rgb(255 255 255 / 0.14) 21px 22px), var(--red-deep); }

.red-block { margin-top: var(--sp-10); }
.red-block > .rubric { margin-bottom: var(--sp-4); }
.red-block h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-4); }
.red-block__intro { color: var(--fg-2); margin-bottom: var(--sp-4); max-width: 62ch; }
.red-chiplist { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.red-tag { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--sp-3); border: 1px solid var(--ink); font-size: var(--fs-sm); font-weight: 600; background: var(--paper); }
.red-tag--main { background: var(--ink); color: #fff; }
.red-dl { display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.red-dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--sp-3); }
.red-dl dt { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); padding-top: 2px; }
.red-dl dd { margin: 0; overflow-wrap: anywhere; }

/* Panel de calificación */
.red-ratepanel { padding: var(--sp-5); border: var(--line-2); background: var(--paper); display: grid; gap: var(--sp-4); }
.red-ratepanel__big { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; }
.red-ratepanel__num { font-family: var(--font-display); font-size: 4rem; line-height: 0.9; }
.red-ratepanel__sub { font-size: var(--fs-sm); color: var(--fg-2); }
.red-hist { display: grid; gap: 6px; }
.red-hist__row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.red-hist__row span:first-child { font-weight: 700; }
.red-hist__bar { height: 10px; background: var(--paper-3); }
.red-hist__bar i { display: block; height: 100%; background: var(--star); }
.red-hist__n { text-align: right; color: var(--fg-mute); font-variant-numeric: tabular-nums; }
.red-weighted { font-size: var(--fs-xs); color: var(--fg-mute); line-height: 1.4; }
.red-lock { padding: var(--sp-4); background: var(--paper-2); border: 2px dashed var(--ink); display: grid; gap: var(--sp-2); font-size: var(--fs-sm); }
.red-lock h3 { font-size: var(--fs-lg); display: flex; align-items: center; gap: var(--sp-2); }
.red-contact { display: grid; gap: var(--sp-2); }
.red-contact .btn { justify-content: flex-start; }
.red-sidebox { padding: var(--sp-5); border: var(--line); display: grid; gap: var(--sp-3); }
.red-sidebox h2 { font-size: var(--fs-lg); font-family: var(--font-head); text-transform: none; font-weight: 700; letter-spacing: 0.005em; line-height: 1.1; }
.red-sidebox + .red-sidebox { margin-top: var(--sp-5); }
.red-sidebox .btn { width: 100%; }

/* Reseñas */
.red-reviews { display: grid; }
.red-review { padding: var(--sp-4) 0; border-top: var(--line-soft); display: grid; gap: var(--sp-2); }
.red-review:first-child { border-top: var(--line-2); }
.red-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); }
.red-review__who { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); }
.red-review__text { overflow-wrap: anywhere; max-width: 66ch; }
.red-review__meta { font-size: var(--fs-sm); color: var(--fg-mute); }
.red-reply { margin-top: var(--sp-1); padding: var(--sp-3) var(--sp-4); background: var(--paper-2); border-left: 4px solid var(--ink); font-size: var(--fs-sm); max-width: 66ch; }
.red-reply strong { display: block; font-family: var(--font-head); font-size: var(--fs-base); letter-spacing: 0.04em; }
.red-review.is-new { outline: 3px solid var(--ink); outline-offset: 6px; background: var(--yellow-soft); }
.red-review .red-linkbtn { min-height: 36px; font-size: var(--fs-sm); justify-self: start; padding: 0; }

/* Catálogo: tarjetas con filete, sin sombra */
.red-items { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .red-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.red-item { display: flex; flex-direction: column; border: var(--line); background: var(--paper); min-width: 0; }
.red-item__media { aspect-ratio: 4 / 3; background: var(--paper-3); border-bottom: var(--line); overflow: hidden; }
.red-item__media img { width: 100%; height: 100%; object-fit: cover; }
.red-item__body { display: grid; gap: var(--sp-2); align-content: start; padding: var(--sp-4); flex: 1; }
.red-item__name { font-size: var(--fs-lg); overflow-wrap: anywhere; }
.red-item__desc { font-size: var(--fs-sm); color: var(--fg-2); overflow-wrap: anywhere; }
.red-item__price { margin-top: auto; padding-top: var(--sp-2); font-size: var(--fs-lg); }
.red-item--locked { border: 2px dashed var(--ink); background: var(--paper-2); }
.red-item--locked .red-item__body { align-content: center; justify-items: start; }

/* Estrellas del diálogo de calificar */
.red-rate-state { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); border: 1px solid var(--ink); background: var(--paper-2); }
.red-rate-state strong { display: block; font-family: var(--font-head); font-size: var(--fs-base); letter-spacing: 0.04em; text-transform: uppercase; }
.red-rate-state.is-verified { border-color: var(--ok); background: var(--ok-tint); color: #0A5632; }

/* ==========================================================================
   7. ÚNETE
   ========================================================================== */
.red-wizard { display: grid; gap: var(--sp-6); max-width: 820px; }
.red-progress { display: grid; gap: var(--sp-2); }
.red-progress__bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.red-progress__bar i { display: block; height: 8px; background: var(--paper-3); }
.red-progress__bar i.is-done { background: var(--ink); }
.red-progress__bar i.is-now { background: var(--red); }
.red-progress__text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-sm); color: var(--fg-mute); }
.red-progress__text strong { color: var(--fg); font-family: var(--font-head); font-size: var(--fs-lg); letter-spacing: 0.03em; }
.red-step { display: grid; gap: var(--sp-5); }
.red-step h2 { font-size: var(--fs-2xl); }
.red-step > .dek { margin-top: calc(var(--sp-2) * -1); }
.red-step__nav { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: center; padding-top: var(--sp-4); border-top: var(--line-2); }
.red-errsum { padding: var(--sp-3) var(--sp-4); background: var(--err-tint); border: 1px solid var(--red-deep); color: #7A0320; font-size: var(--fs-sm); }
.red-errsum strong { display: block; }
.red-errsum ul { margin-top: var(--sp-1); padding-left: 1.1em; list-style: disc; }
.red-errsum a { color: inherit; font-weight: 600; text-underline-offset: 3px; }

.red-plans { display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .red-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.red-plan { position: relative; display: grid; gap: var(--sp-2); align-content: start; padding: var(--sp-4); border: var(--line); background: var(--paper); cursor: pointer; min-width: 0; }
.red-plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.red-plan:hover { border-color: var(--red); }
.red-plan:has(input:checked) { border: 3px solid var(--red); padding: calc(var(--sp-4) - 2px); background: var(--red-tint); }
.red-plan:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.red-plan__name { font-family: var(--font-display); font-size: var(--fs-xl); text-transform: uppercase; line-height: 1; }
.red-plan__state { display: none; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-deep); }
.red-plan:has(input:checked) .red-plan__state { display: block; }
.red-plan .check-list { font-size: var(--fs-sm); }
.red-plan .check-list li { font-size: var(--fs-sm); }

.red-rows { display: grid; gap: var(--sp-4); }
.red-row { display: grid; gap: var(--sp-3); padding: var(--sp-4); border: var(--line); background: var(--paper); }
.red-row__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.red-row__head h3 { font-size: var(--fs-lg); }
.red-row__grid { display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) {
  .red-row__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .red-row__grid .c-6 { grid-column: span 6; }
  .red-row__grid .c-3 { grid-column: span 3; }
  .red-row__grid .c-2 { grid-column: span 2; }
}
.red-photo { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.red-photo__thumb { width: 72px; height: 54px; background: var(--paper-3); border: var(--line); object-fit: cover; }
.red-photo__thumb[hidden] { display: none; }
.red-lead-img { display: grid; gap: var(--sp-3); }

.red-upl { display: grid; gap: var(--sp-3); }
.red-upl__preview { border: var(--line); background: var(--paper-3); overflow: hidden; display: grid; place-items: center; }
.red-upl__preview--avatar { width: 112px; height: 112px; border-radius: var(--r-round); }
.red-upl__preview--cover { aspect-ratio: 3 / 1; width: 100%; max-width: 560px; }
.red-upl__preview img { width: 100%; height: 100%; object-fit: cover; }
.red-upl__preview .avatar { --av: 112px; }
.red-upl__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.red-btn-file { position: relative; }
.red-btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.red-btn-file:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ==========================================================================
   8. MI PERFIL
   ========================================================================== */
.red-sec { border-top: var(--line-4); margin-top: var(--sp-6); }
.red-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 56px; padding: var(--sp-2) 0; }
.red-sec > summary::-webkit-details-marker { display: none; }
.red-sec > summary h2 { font-size: var(--fs-xl); }
.red-sec > summary .icon { transition: transform var(--t-fast) var(--ease); flex: none; }
.red-sec[open] > summary .icon { transform: rotate(180deg); }
.red-sec__body { display: grid; gap: var(--sp-5); padding: var(--sp-2) 0 var(--sp-6); max-width: 820px; }
.red-sec__foot { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.red-mp-top { display: grid; gap: var(--sp-4); }
.red-level { padding: var(--sp-5); border: var(--line-2); display: grid; gap: var(--sp-3); background: var(--paper); }
.red-level h2 { font-size: var(--fs-xl); }
.red-level__demo { padding-top: var(--sp-3); border-top: var(--line-soft); }
.red-level__demo legend { font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-1); }
.red-stats { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--line-4); }
.red-stats > div { padding: var(--sp-4) var(--sp-3) var(--sp-4) 0; border-bottom: var(--line); display: flex; flex-direction: column-reverse; gap: 2px; }
.red-stats dt { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); }
.red-stats dd { margin: 0; font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; }
@media (min-width: 768px) { .red-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .red-stats > div { padding-left: var(--sp-4); border-right: var(--line); } .red-stats > div:nth-child(3n+1) { padding-left: 0; } .red-stats > div:nth-child(3n) { border-right: 0; } }
.red-todo { display: grid; gap: var(--sp-1); font-size: var(--fs-sm); }
.red-todo li { display: flex; gap: var(--sp-2); align-items: flex-start; }
.red-todo .icon { margin-top: 2px; color: var(--red-deep); }
.red-pct { display: flex; align-items: center; gap: var(--sp-3); }
.red-pct__bar { flex: 1; height: 10px; background: var(--paper-3); }
.red-pct__bar i { display: block; height: 100%; background: var(--ok); }
.red-pct strong { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 400; }

.red-cat-list { display: grid; gap: var(--sp-3); }
.red-cat-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3) var(--sp-4); align-items: start; padding: var(--sp-3) 0; border-top: var(--line-soft); }
.red-cat-item__thumb { width: 72px; height: 54px; background: var(--paper-3); border: var(--line); object-fit: cover; display: grid; place-items: center; font-size: var(--fs-xs); color: var(--fg-mute); }
.red-cat-item h3 { font-size: var(--fs-lg); overflow-wrap: anywhere; }
.red-cat-item__actions { grid-column: 1 / -1; display: flex; gap: var(--sp-2); flex-wrap: wrap; }
@media (min-width: 640px) { .red-cat-item { grid-template-columns: auto minmax(0, 1fr) auto; } .red-cat-item__actions { grid-column: auto; } }
.red-mypost { display: grid; gap: var(--sp-2); padding: var(--sp-3) 0; border-top: var(--line-soft); }
.red-mypost p { overflow-wrap: anywhere; }
.red-mypost img { max-width: 160px; height: auto; border: var(--line); }
.red-danger { padding: var(--sp-5); border: 2px solid var(--red-deep); background: var(--red-tint); display: grid; gap: var(--sp-3); }
.red-danger h3 { font-size: var(--fs-lg); color: var(--red-deep); }

/* ==========================================================================
   9. UTILIDADES
   ========================================================================== */
.red-empty-card { padding: var(--sp-6); background: var(--paper-2); border: 2px dashed var(--ink); display: grid; gap: var(--sp-3); justify-items: start; }
.red-empty-card h3 { font-size: var(--fs-xl); }
.red-empty-card p { max-width: 52ch; color: var(--fg-2); }
.red-badge-member { background: var(--paper-2); }
.red-skeleton { height: 120px; background: var(--paper-2); border-top: var(--line-2); }
.red-modal-intro { color: var(--fg-2); font-size: var(--fs-sm); }
.modal__form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal__form .modal__body { flex: 1; }
.red-title-line { overflow-wrap: anywhere; }
.red-honest { font-size: var(--fs-xs); color: var(--fg-mute); }
.red-tel { white-space: nowrap; }
.red-fieldset-cols { display: grid; gap: var(--sp-5) var(--sp-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .red-fieldset-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .red-fieldset-cols .span-all { grid-column: 1 / -1; } }
.red-hint-row { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; }
.red-pill-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: var(--fs-sm); }
.red-pill-ok .icon { width: 1em; height: 1em; stroke-width: 3; }
body.red-body .field__hint a, .red-body .red-block a:not(.btn):not(.red-mini__name) { text-underline-offset: 3px; }
.red-link-in-text { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.red-link-in-text:hover { color: var(--red-deep); }
.red-hero__logo picture { display: block; }

/* Directorio: filtros, mapa y resultados. En móvil: filtros, mapa, resultados; en escritorio mapa a la derecha */
.red-dirgrid .red-filters { margin-bottom: 0; }
@media (min-width: 960px) {
  .red-dirgrid { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); grid-template-areas: "filters map" "results map"; grid-template-rows: auto 1fr; }
  .red-dirgrid .red-filters { grid-area: filters; }
  .red-dirgrid .red-mapwrap { grid-area: map; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-color: #57534B var(--ink); }
  .red-dirgrid .red-results { grid-area: results; }
}
.red-hero--slim .red-hero__in { padding-top: var(--sp-3); padding-bottom: var(--sp-3); display: block; }
.red-hero--slim .red-hero__logo { width: min(100%, 260px); }

/* ==========================================================================
   10. RONDA DE CORRECCIONES
   Avatares con sistema, portada por giro, un solo sello por resultado,
   reacciones compactas, expertos de la revista, códigos de trato.
   ========================================================================== */

/* Avatares: cuadrado de esquina recta, monograma en Anton y color POR GIRO
   (tinta, rojo, acero, rojo profundo, azul informativo), no al azar */
.red-body .avatar { border-radius: var(--r-1); font-family: var(--font-display); font-weight: 400; letter-spacing: 0.03em; background: var(--ink); color: #fff; }
.red-body .avatar[data-tone="1"] { background: var(--ink); color: #fff; }
.red-body .avatar[data-tone="2"] { background: var(--red); color: #fff; }
.red-body .avatar[data-tone="3"] { background: var(--steel-ink); color: #fff; }
.red-body .avatar[data-tone="4"] { background: var(--red-deep); color: #fff; }
.red-body .avatar[data-tone="5"] { background: var(--info); color: #fff; }
.red-body .avatar img { border-radius: 0; }
.red-body .profile-head__avatar { box-shadow: 0 0 0 5px var(--paper); }

/* Portada de perfil: baja y por giro, con el nombre del giro como titular */
.red-profile .profile-head__cover { aspect-ratio: auto; height: clamp(104px, 11vw, 160px); max-height: none; background: var(--ink); }
.red-cover { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: var(--sp-3) max(16px, env(safe-area-inset-left, 0px)); overflow: hidden; color: #fff; }
.red-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 2px 2px, rgb(255 255 255 / 0.14) 1.5px, transparent 2px) 0 0 / 20px 20px; }
.red-cover__giro { position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.75rem, 0.9rem + 3.4vw, 3.75rem); line-height: 0.95; letter-spacing: 0.01em; padding-top: 0.06em; }
.red-cover--g1 { background-color: var(--ink); }
.red-cover--g2 { background-color: var(--red); }
.red-cover--g3 { background-color: var(--steel-ink); }
.red-cover--g4 { background-color: var(--red-deep); }
.red-cover--g5 { background-color: var(--info); }
@media (min-width: 768px) { .red-profile .profile-head__cover { aspect-ratio: auto; } }

/* Directorio: sin pestaña amarilla por tarjeta; kicker de texto y banderas en versalitas */
.red-body .listing { padding: var(--sp-5) 0 var(--sp-6); }
.red-body .listing .kicker { margin-bottom: -2px; }
.listing__flags { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-deep); }
span.listing__flags { display: inline; }
.red-expert .avatar { --av: 72px; }
@media (min-width: 640px) { .red-expert .avatar { --av: 88px; } }
.red-experts { margin-top: var(--sp-10); }

/* Reacciones: 2 visibles y "Más" */
.red-react__more { min-height: 40px; padding: 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.red-react__more:hover { color: var(--red-deep); }
.red-react__rest { display: contents; }
.red-react__rest[hidden] { display: none; }

/* Héroe con segunda columna útil */
.red-hero__aside { display: grid; gap: var(--sp-3); align-self: end; }
.red-hero__aside .dek { margin: 0; }
.red-hero__aside .check-list { font-size: var(--fs-sm); }
.red-hero__aside .check-list li { font-size: var(--fs-sm); }

/* Calificar: código de trato y reglas */
.red-demo-code { display: grid; gap: 2px; justify-items: start; }
.red-demo-code .btn { padding-left: 0; }
.red-rules { font-size: var(--fs-sm); border-top: var(--line-soft); padding-top: var(--sp-3); }
.red-rules > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.red-rules ul { margin-top: var(--sp-2); padding-left: 1.2em; list-style: disc; display: grid; gap: var(--sp-1); color: var(--fg-2); }
.red-demo-toggle { background: var(--yellow-soft); padding: var(--sp-2) var(--sp-3); border: 1px dashed var(--ink); font-size: var(--fs-sm); }
.red-rate-state.is-verified { border-color: var(--ok); background: var(--ok-tint); color: #0A5632; }

/* Mi perfil: códigos de trato */
.red-codes { display: grid; }
.red-codes li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-3) 0; border-top: var(--line-soft); }
.red-code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; font-size: var(--fs-lg); letter-spacing: 0.12em; padding: 4px 10px; background: var(--paper-2); border: 1px solid var(--ink); }

/* ==========================================================================
   11. PORTADA DE LA RED (red/index.html)
   Primer pliegue: buscador a la izquierda y "Tu perfil, en tres minutos" a la
   derecha. Después, el mapa de la Red en banda de tinta (módulo mapa-c),
   "¿Tu negocio no aparece?", cifras, giros, verbos, niveles (membresias.js),
   movimiento y muestra del muro.
   ========================================================================== */
.red-landing { border-bottom: var(--line-4); }
.red-landing__in { display: grid; gap: var(--sp-8) var(--gap); padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
.red-landing__copy { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.red-landing__copy h1 { font-size: clamp(2.5rem, 1rem + 5.2vw, 5rem); }
.red-landing__copy .red-search { margin-top: var(--sp-2); }
@media (min-width: 960px) {
  .red-landing__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; padding-top: var(--sp-8); padding-bottom: var(--sp-10); }
  .red-landing__copy .searchbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .red-landing__copy .searchbar .searchbar__field:first-child { border-right: var(--line); }
  .red-landing__copy .searchbar .searchbar__field { border-bottom: var(--line); }
  .red-landing__copy .searchbar .red-locate { grid-column: 1 / -1; border-right: 0; border-bottom: var(--line); }
  .red-landing__copy .searchbar .searchbar__submit { grid-column: 1 / -1; min-height: 52px; }
}

/* Alta: Tu perfil, en tres minutos (tarjeta de tinta: lo primero que se ve junto al buscador) */
.red-alta { --focus: #fff; display: grid; gap: var(--sp-4); align-content: start; min-width: 0; padding: var(--sp-6); border: 4px solid var(--ink); border-top: 10px solid var(--yellow); background: var(--ink); color: #fff; box-shadow: 10px 10px 0 var(--red); }
.red-alta .kicker { color: var(--yellow); }
.red-alta h2 { font-size: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem); line-height: .92; color: #fff; }
.red-alta h2 .t-red { color: #FF5B7A; }
.red-alta__pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; gap: 0; }
.red-alta__pasos li { counter-increment: paso; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: var(--sp-3); align-items: baseline; padding: var(--sp-3) 0; border-top: 1px solid #55514A; font-size: var(--fs-md); line-height: 1.4; color: #E4DEDE; }
.red-alta__pasos li::before { content: counter(paso); font-family: var(--font-display); font-size: 2.5rem; line-height: .9; color: var(--yellow); }
.red-alta__pasos strong { color: #fff; font-family: var(--font-head); font-size: var(--fs-lg); letter-spacing: .01em; }
.red-alta__cta { justify-content: center; width: 100%; min-height: 64px; font-size: 1.25rem; }
.red-alta__cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.red-alta__promesa { margin: 0; padding: var(--sp-3) var(--sp-4); background: #2B2927; border-left: 4px solid var(--yellow); font-size: var(--fs-sm); line-height: 1.5; color: #E4DEDE; }
.red-alta__promesa strong { color: #fff; }
@media (max-width: 599.98px) { .red-alta { padding: var(--sp-4); box-shadow: 6px 6px 0 var(--red); margin-right: 6px; } }

/* Mapa de la Red en banda de tinta */
.red-mapa-banda { padding-top: var(--sp-10); padding-bottom: var(--sp-10); }
.red-mapa-banda__cab { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-6); max-width: 70ch; }
.red-mapa-banda__cab h2 { font-size: var(--fs-2xl); }
.red-mapa-banda__cab p { margin: 0; color: #E4DEDE; font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.5; }
.red-mapa-banda .cm { background: transparent; }

/* ¿Tu negocio no aparece? (portada, estado vacío y final del directorio) */
.red-empty__noap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: var(--line-soft); }
.red-empty__noap p { margin: 0; max-width: 52ch; }
.red-noaparece { display: grid; gap: var(--sp-4) var(--gap); align-items: end; margin-top: var(--section); padding-top: var(--sp-6); padding-bottom: var(--sp-6); border-top: var(--line-4); border-bottom: var(--line); }
.red-noaparece h2 { font-size: var(--fs-2xl); }
.red-noaparece .dek { margin-top: var(--sp-3); max-width: 56ch; }
@media (min-width: 960px) { .red-noaparece { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .red-noaparece .row { justify-content: flex-end; } }

.red-facts .facts dd { font-size: var(--fs-2xl); }
.red-facts .facts dt { text-transform: uppercase; }

.red-giros { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); column-gap: var(--gap); align-content: start; }
.red-giros a { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); min-height: 48px; padding: 10px 0; border-top: var(--line-soft); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); line-height: 1.1; }
.red-giros a small { font-family: var(--font-ui); font-weight: 500; font-size: var(--fs-xs); color: var(--fg-mute); white-space: nowrap; }
.red-giros a:hover { color: var(--red-deep); }
.red-giros a:hover span { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.red-how { margin-top: var(--section); padding-top: var(--sp-10); padding-bottom: var(--sp-10); }
.red-how h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-6); }
.red-how__list { display: grid; margin: 0; }
.red-how__list > div { display: grid; gap: var(--sp-2) var(--gap); padding: var(--sp-5) 0; border-top: var(--line-2); }
.red-how__list dt { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 0.95; text-transform: uppercase; }
.red-how__list dd { margin: 0; font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.5; max-width: 56ch; color: var(--fg-2); }
@media (min-width: 768px) { .red-how__list > div { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: baseline; } }


.red-move { margin-top: var(--section); padding-top: var(--sp-10); padding-bottom: var(--sp-10); }
.red-move h2 { font-size: var(--fs-2xl); }
.red-move__grid { display: grid; gap: var(--sp-8) var(--gap); margin-top: var(--sp-8); }
.red-move__grid h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.red-move__grid p { color: #E4DEDE; max-width: 46ch; margin-bottom: var(--sp-4); }
.red-move__lead p.cintillo { color: #fff; margin-bottom: var(--sp-4); max-width: 220px; }
.red-move__lead h3 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: var(--fs-2xl); line-height: 0.95; }
.red-move .btn--secondary { border-color: #fff; color: #fff; }
.red-move .btn--secondary:hover { background: #fff; color: var(--ink); }
@media (min-width: 900px) { .red-move__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); align-items: start; } }

.red-peek { display: grid; gap: var(--sp-2); padding: var(--sp-4) 0; border-top: var(--line-2); text-decoration: none; }
.red-peek:hover .red-peek__text { color: var(--red-deep); }
.red-peek__text { font-size: var(--fs-md); line-height: 1.45; overflow-wrap: anywhere; max-width: 62ch; }
.red-peek__foot { display: flex; gap: var(--sp-3); align-items: center; font-size: var(--fs-sm); color: var(--fg-mute); }

.red-final { margin-top: var(--section); padding: var(--sp-10) 0; border-top: var(--line-4); background: var(--paper-2); }
.red-final__in { display: grid; gap: var(--sp-5); }
.red-final h2 { font-size: var(--fs-2xl); }
@media (min-width: 900px) { .red-final__in { grid-template-columns: 1fr auto; align-items: end; } }
.red-landing__copy .searchbar .searchbar__field:nth-child(2) { border-right: 0; }
@media (max-width: 959.98px) { .red-landing__copy .searchbar .searchbar__field { border-bottom: var(--line); } }

/* ==========================================================================
   12. ACCESIBILIDAD (ronda 2)
   Estrellas: encendida rellena #B07400 (3.9:1 sobre blanco), apagada solo
   contorno #767070 (4.9:1); el estado se distingue por forma, no solo por color.
   Orden DOM ascendente 1 a 5: la flecha derecha sube la nota.
   Mapa: frontera de estado #5F7B96 y anillo de foco blanco+tinta de grosor fijo.
   ========================================================================== */
:root {
  --red-star-on: #B07400;
  --red-star-off: #767070;
  --red-star-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6l2.9 6.1 6.7.8-4.9 4.6 1.3 6.6L12 17.3l-6 3.4 1.3-6.6-4.9-4.6 6.7-.8z' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Estrellas de solo lectura: contorno completo debajo, relleno recortado al promedio encima */
.red-body .stars { position: relative; background: none; -webkit-mask: none; mask: none; }
.red-body .stars::before, .red-body .stars::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%;
  -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x;
  -webkit-mask-position: 0 0; mask-position: 0 0;
  -webkit-mask-size: var(--size) var(--size); mask-size: var(--size) var(--size);
}
.red-body .stars::before { width: 100%; background: var(--red-star-off); -webkit-mask-image: var(--red-star-outline); mask-image: var(--red-star-outline); }
.red-body .stars::after { width: calc(var(--rating) / 5 * 100%); background: var(--red-star-on); -webkit-mask-image: var(--star-shape); mask-image: var(--star-shape); }
.red-hist__bar i { background: var(--red-star-on); }

/* Estrellas interactivas: de 1 a 5, de izquierda a derecha */
.red-body .rate-input__stars { flex-direction: row; justify-content: flex-start; }
.red-body .rate-input label { --red-shape: var(--red-star-outline); color: var(--red-star-off); }
.red-body .rate-input label::before { -webkit-mask-image: var(--red-shape); mask-image: var(--red-shape); }
.red-body .rate-input input:checked ~ label,
.red-body .rate-input label:hover ~ label { --red-shape: var(--red-star-outline); color: var(--red-star-off); }
.red-body .rate-input input:checked + label,
.red-body .rate-input label:has(~ input:checked),
.red-body .rate-input label:hover,
.red-body .rate-input label:has(~ label:hover) { --red-shape: var(--star-shape); color: var(--red-star-on); }
/* Con el cursor encima solo se previsualiza el tramo señalado */
.red-body .rate-input__stars:hover label { --red-shape: var(--red-star-outline); color: var(--red-star-off); }
.red-body .rate-input__stars:hover label:hover,
.red-body .rate-input__stars:hover label:has(~ label:hover) { --red-shape: var(--star-shape); color: var(--red-star-on); }

/* Mapa */
#map-clear { margin-top: 2px; }

/* Planes de la página de membresía (tarjetas informativas, sin radio) */
.red-plan--static { cursor: default; }
.red-plan--static:hover { border-color: inherit; }
.red-plan--static .price { font-weight: 700; }
#m-pago:empty { display: none; }

/* Primer pliegue de la Red: buscador a la izquierda y el mapa interactivo a la derecha */
.red-landing__mapa { min-width: 0; }
/* "Tu perfil, en tres minutos": sección normal, arriba del mapa municipio por municipio */
.red-alta-sec { padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--rule-soft, #D5CECE); }
.red-alta-sec h2 { margin: 6px 0 22px; }
.red-alta-sec__pasos { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: paso; }
.red-alta-sec__pasos li { counter-increment: paso; display: flex; gap: 14px; align-items: flex-start; }
.red-alta-sec__pasos li::before { content: counter(paso); flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--red, #DB0632); color: #fff; font-weight: 700; display: grid; place-items: center; }
.red-alta-sec__pie { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.red-alta-sec__promesa { margin: 0; max-width: 46em; font-size: .95rem; }
@media (max-width: 800px) { .red-alta-sec__pasos { grid-template-columns: 1fr; } }

/* ==========================================================================
   13. PORTADA DE LA RED · REVISIÓN DE DISEÑO (octubre 2026)
   El primer pliegue como producto: buscador con peso, panel de mapa en tinta
   con la silueta de México en trama mientras el servicio no está conectado,
   y estados vacíos (muro, "en preparación") con diseño en vez de texto suelto.
   Nada de aquí inventa datos: la silueta viene de data/mexico-mapa.svg y los
   textos siguen saliendo de red-portada.js.
   ========================================================================== */
.red-landing__in { padding-top: var(--sp-8); }
.red-landing__copy h1 { font-size: clamp(2.75rem, 1rem + 5.6vw, 5.75rem); line-height: .92; }
.red-landing__copy .dek { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); }
.red-landing__copy .searchbar { box-shadow: 8px 8px 0 var(--red); margin-right: 8px; }
.red-landing__copy .searchbar__input { font-size: 1.125rem; min-height: 36px; }
.red-landing__copy .searchbar__submit { font-size: 1.25rem; letter-spacing: .12em; }
.red-landing__copy .red-status { margin-top: var(--sp-2); }

/* Panel del mapa: banda de tinta siempre; el módulo real (.cm) ya es de tinta y encaja */
.red-landing__mapa { position: relative; display: grid; min-height: 280px; overflow: hidden; background: var(--ink); color: #fff; --focus: #fff; }
@media (min-width: 960px) {
  .red-landing__in { align-items: stretch; }
  .red-landing__mapa { min-height: 420px; }
}
.red-landing__mapa:has(#p-mapa-c-hero.cm) { display: block; min-height: 0; overflow: visible; }
.red-landing__mapa:has(#p-mapa-c-hero.cm) .red-mapa-prep { display: none; }

/* Capa decorativa: cabecera en condensada y México en trama de medio tono */
.red-mapa-prep { position: absolute; inset: 0; pointer-events: none; }
.red-mapa-prep__cab {
  position: absolute; left: var(--sp-5); right: var(--sp-5); top: var(--sp-4); z-index: 1;
  display: flex; justify-content: space-between; gap: var(--sp-3); margin: 0; padding-bottom: var(--sp-2);
  border-bottom: 1px solid #45423E;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: #BDB6AF;
}
.red-mapa-prep__cab span:first-child { color: #fff; }
.red-mapa-prep__cab span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 1px; }
.red-mapa-prep__mx {
  display: none; position: absolute; left: 7%; right: 7%; top: 16%; bottom: 10%; opacity: .62;
  background:
    radial-gradient(circle, #FFF7E6 0 1.1px, transparent 1.45px) 0 0 / 6px 6px,
    #3A3734;
}
@supports (mask-image: url("data:image/svg+xml,")) or (-webkit-mask-image: url("data:image/svg+xml,")) {
  .red-mapa-prep__mx {
    display: block;
    -webkit-mask: url("../../data/mexico-mapa.svg") center / contain no-repeat;
            mask: url("../../data/mexico-mapa.svg") center / contain no-repeat;
  }
}
@media (max-width: 959.98px) { .red-landing__mapa { min-height: 420px; } .red-mapa-prep__mx { top: 15%; bottom: 44%; } #p-mapa-c-hero:not(.cm) { margin: var(--sp-4); padding: var(--sp-3) var(--sp-4) var(--sp-4); } #p-mapa-c-hero:not(.cm) > p { font-size: var(--fs-base); } }

/* El aviso que escribe red-portada.js (o el "Cargando…" inicial) se vuelve una ficha de papel sobre el mapa */
#p-mapa-c-hero:not(.cm) {
  position: relative; z-index: 2; align-self: end; justify-self: start;
  margin: var(--sp-5); max-width: 46ch;
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  background: var(--paper); color: var(--ink); --focus: var(--ink);
  border-left: 6px solid var(--red);
  box-shadow: 0 18px 30px -16px rgb(0 0 0 / 0.8);
}
#p-mapa-c-hero:not(.cm) > p { margin: 0; font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.45; color: var(--ink); }
#p-mapa-c-hero:not(.cm) > p::before {
  content: "Mapa de la Red"; display: block; margin-bottom: 6px;
  font: 700 var(--fs-xs)/1.2 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--red-deep);
}
#p-mapa-c-hero:not(.cm) a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#p-mapa-c-hero:not(.cm) a:hover { color: var(--red-deep); }
.red-landing__mapa { animation: rise 900ms var(--ease) 260ms both; }

/* "Tu perfil, en tres minutos": pasos en columnas con filetes y numeración en Anton */
.red-alta-sec { background: var(--paper-2); border-top: var(--line-4); }
.red-alta-sec h2 { font-size: var(--fs-3xl); margin: 6px 0 28px; }
.red-alta-sec__pasos { gap: 0; border-top: var(--line-2); border-bottom: var(--line); margin-bottom: 28px; }
.red-alta-sec__pasos li { flex-direction: column; gap: 10px; padding: 20px 28px 22px 0; }
.red-alta-sec__pasos li + li { border-left: 1px solid var(--ink); padding-left: 28px; }
.red-alta-sec__pasos li::before { width: auto; height: auto; border-radius: 0; background: none; color: var(--red); font: 400 var(--fs-2xl)/.9 var(--font-display); display: block; }
.red-alta-sec__pasos li > span { font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.45; color: var(--fg-2); max-width: 34ch; }
.red-alta-sec__pasos strong { display: block; margin-bottom: 4px; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-lg); line-height: 1.1; color: var(--ink); }
@media (max-width: 800px) {
  .red-alta-sec__pasos li { padding: 16px 0; }
  .red-alta-sec__pasos li + li { border-left: 0; border-top: 1px solid var(--ink); padding-left: 0; }
}

/* Cifras: numerales grandes; el guion largo que escribe el JS cuando no hay datos se lee como un espacio reservado */
.red-facts .facts { border-top-width: 6px; }
.red-facts .facts dd { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem); letter-spacing: -.01em; }
.red-facts .facts dt { font-size: var(--fs-xs); }
.red-facts .red-honest { font-family: var(--font-text); font-style: italic; font-size: var(--fs-base); color: var(--fg-2); max-width: 70ch; }

/* Giros con más cuerpo */
.red-giros a { font-size: var(--fs-xl); min-height: 56px; padding: 12px 0; border-top: var(--line); transition: color var(--t-fast); }
.red-giros a small { font-family: var(--font-head); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Cómo funciona: verbos a escala de portada */
.red-how { border-top: var(--line-4); }
.red-how h2 { font-size: var(--fs-2xl); }
.red-how__list dt { font-size: var(--fs-3xl); }

/* Muro vacío: página en blanco con el título en fantasma (texto que sigue escribiendo red-portada.js) */
#p-posts > p.dek {
  position: relative; margin: 0; max-width: none;
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  border: 2px solid var(--ink);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgb(29 29 27 / 0.06) 11px 12px),
    var(--paper-2);
  font-style: italic; color: var(--ink);
}
#p-posts > p.dek::before {
  content: "Muro" / ""; display: block; margin-bottom: var(--sp-3);
  font: 400 clamp(3rem, 2rem + 4vw, 6rem)/.85 var(--font-display); font-style: normal; text-transform: uppercase; color: var(--rule-soft);
}
#p-posts > p.dek a { color: var(--ink); font-style: normal; font-weight: 600; }

/* Tarjeta "en preparación" de únete / entrar: papel rayado, sin aire de borrador */
.red-empty-card {
  padding: clamp(24px, 4vw, 48px);
  border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--red);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgb(29 29 27 / 0.06) 11px 12px),
    var(--paper-2);
}

/* Subnavegación de la Red: pestaña activa con más peso */
.red-subnav__list a[aria-current="page"] { font-weight: 800; }
.red-subnav__list a { transition: color var(--t-fast), border-color var(--t-fast); }

@media (prefers-reduced-motion: reduce) {
  .red-landing__mapa { animation: none !important; }
}

/* Número de afiliado (RE-00001) en el encabezado del perfil */
.red-folio { font-family: var(--font-mono, ui-monospace, monospace); font-size: .8125rem; letter-spacing: .04em; color: var(--red, #DB0632); font-weight: 600; }
