/* =============================================================
   B•OK — Diagnóstico Cultural y Comunicacional
   Paleta B•OK: navy #142247 · coral #FF4564 · gris #8a91a3 · blanco
   Tipografía: Barlow Condensed 900 (display) · Barlow SemiBold (cuerpo)
   ============================================================= */

/* ---------- Tipografía alojada localmente ---------- */
@font-face { font-family:'Barlow'; src:url('../fonts/Barlow-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('../fonts/Barlow-Medium.woff2') format('woff2'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('../fonts/Barlow-SemiBold.woff2') format('woff2'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('../fonts/Barlow-Bold.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow Condensed'; src:url('../fonts/BarlowCondensed-Bold.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow Condensed'; src:url('../fonts/BarlowCondensed-Black.woff2') format('woff2'); font-weight:900; font-style:normal; font-display:swap; }

:root {
  --primary: #142247;
  --secondary: #FF4564;
  --gray: #8a91a3;
  --white: #FFFFFF;

  --ink: #142247;
  --muted: #8a91a3;
  --bg: #F5F6F8;
  --line: #E2E5EB;
  --line-strong: #C6CBD5;
  --soft: #FAFBFC;

  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --good: #157A4B;
  --warn: #B47309;
  --bad: #C0392B;

  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 34, 71, .06), 0 8px 24px rgba(20, 34, 71, .06);
  --maxw: 720px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--body);
  font-weight: 500;
  font-size: 16.5px;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0; font-family: var(--display); font-weight: 900;
  color: var(--primary); line-height: 1.1; letter-spacing: -.005em;
}
p { margin: 0 0 1rem; line-height: 1.6; }
a { color: var(--primary); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 44px; width: auto; }
.logo--sm img { height: 26px; }

/* =============================================================
   HOME
   ============================================================= */
.home { min-height: 100vh; display: flex; flex-direction: column; }

.home__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem 2rem; border-bottom: 1px solid var(--line);
}
.home__bar-right { font-size: .88rem; color: var(--muted); }
.home__bar-right a { color: var(--secondary); font-weight: 600; }

.home__body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; }

.home__left {
  padding: 3.5rem 3.25rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 640px;
}
.home__title { font-size: 3.5rem; letter-spacing: -.015em; }
.home__subtitle {
  color: var(--secondary); font-family: var(--display); font-weight: 700;
  font-size: 1.5rem; margin: .9rem 0 1.6rem; line-height: 1.2;
}
.home__intro { font-size: .95rem; color: var(--ink); max-width: 50ch; }

.home__meta { display: flex; gap: 2.75rem; margin: 2rem 0 2.25rem; }
.home__meta-item { display: flex; align-items: center; gap: .7rem; }
.home__meta-item svg { flex: 0 0 auto; color: var(--primary); }
.home__meta-label { font-size: .88rem; font-weight: 600; color: var(--primary); }
.home__meta-value { font-size: .85rem; color: var(--muted); }

.home__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.25rem; }

.home__note {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .82rem; color: var(--muted); line-height: 1.55; max-width: 52ch;
}
.home__note svg { flex: 0 0 auto; margin-top: 2px; color: var(--muted); }

.home__right {
  background: var(--primary);
  min-height: 460px;
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem;
}
.home__photo {
  width: 100%; max-width: 520px; aspect-ratio: 1 / 1;
  border-radius: 4px; background: transparent;
}
.home__photo.has-image {
  background-image: url('../img/home.jpg');
  background-size: cover; background-position: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

.home__footer {
  border-top: 1px solid var(--line);
  padding: 1rem 2rem; font-size: .8rem; color: var(--muted);
}

/* ---------- Subtítulo de grupo dentro de un formulario ---------- */
.field-group-title {
  font-family: var(--display); font-weight: 900;
  font-size: 1.1rem; color: var(--primary);
  margin: 1.9rem 0 1rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .02em;
}

/* =============================================================
   AGRADECIMIENTO
   ============================================================= */
.thanks {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.25rem; background: var(--bg);
}
.thanks__card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 3rem 2.75rem;
  max-width: 560px; text-align: center;
}
.thanks__check {
  width: 62px; height: 62px; margin: 1.75rem auto 1.5rem;
  border-radius: 50%; background: #E9F5EF; color: var(--good);
  display: grid; place-items: center;
}
.thanks__card h1 { font-size: 2rem; margin-bottom: .9rem; }
.thanks__card p { font-size: .95rem; color: var(--ink); }
.thanks__note {
  font-size: .86rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1.25rem; margin: 1.5rem 0 0;
}

/* =============================================================
   BOTONES
   ============================================================= */
.btn {
  font-family: var(--body); font-weight: 600; font-size: .95rem;
  border-radius: var(--radius-sm); padding: .8rem 1.5rem;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px;
}
.btn--primary { background: var(--secondary); color: #fff; }
.btn--primary:hover { background: #E63A57; }
.btn--secondary { background: #fff; color: var(--primary); border-color: var(--line-strong); }
.btn--secondary:hover { background: var(--soft); }
.btn--ghost { background: transparent; color: var(--primary); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--soft); }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; min-height: 36px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, label:focus-within {
  outline: 2px solid var(--secondary); outline-offset: 2px;
}

/* =============================================================
   WIZARD
   ============================================================= */
.wizard { min-height: 100vh; background: var(--bg); padding-bottom: 4rem; }

.wizard__topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.wizard__topbar-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem 1.5rem;
}
.wizard__step { font-family: var(--display); font-size: 1rem; font-weight: 900; letter-spacing: .01em; color: var(--primary); white-space: nowrap; }
.progress {
  flex: 1; height: 7px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress__fill {
  height: 100%; background: var(--secondary); border-radius: 999px;
  transition: width .25s ease;
}
.wizard__pct { font-family: var(--display); font-size: 1rem; font-weight: 900; color: var(--muted); min-width: 38px; text-align: right; }

.breadcrumb {
  max-width: 1080px; margin: 0 auto; padding: .85rem 1.5rem 0;
  font-size: .82rem; color: var(--muted);
}
.breadcrumb b { color: var(--primary); font-weight: 600; }

.card {
  max-width: var(--maxw); margin: 1.1rem auto 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2.1rem 2.25rem 1.75rem;
}
.card__title { font-family: var(--body); font-weight: 600; font-size: 1.18rem; line-height: 1.4; color: var(--primary); }
.card__help { font-size: .87rem; color: var(--muted); margin: .5rem 0 1.4rem; }

/* ---------- Campos ---------- */
.field { margin-bottom: 1.05rem; }
.field__label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--primary); margin-bottom: .4rem;
}
.field__label .req { color: var(--secondary); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; font-family: var(--body); font-size: .92rem; font-weight: 500;
  color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .72rem .85rem; min-height: 44px;
}
.input::placeholder, .textarea::placeholder { color: var(--gray); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%238a91a3' d='M1 1l5 5 5-5'/></svg>"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem; }
.field__error { font-size: .82rem; color: var(--bad); margin-top: .35rem; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--bad); }

.hint {
  display: flex; gap: .6rem; align-items: flex-start;
  background: #FFF8E8; border: 1px solid #F3DFA8; border-radius: var(--radius-sm);
  padding: .7rem .85rem; font-size: .84rem; color: #7A5B10; line-height: 1.5;
  margin-top: .5rem;
}
.hint svg { flex: 0 0 auto; margin-top: 1px; }
/* El atributo hidden debe ganarle a display:flex */
.hint[hidden], .choice[hidden], .field-group-title[hidden] { display: none !important; }

.counter { text-align: right; font-size: .82rem; color: var(--muted); margin-top: .35rem; }
.counter.is-max { color: var(--secondary); font-weight: 600; }

/* ---------- Alternativas A/B/C ---------- */
.abc { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 1rem; }
.abc__opt {
  display: flex; align-items: center; gap: .95rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .95rem 1.1rem; cursor: pointer; background: #fff;
  transition: border-color .15s ease, background-color .15s ease;
}
.abc__opt:hover { border-color: var(--primary); background: var(--soft); }
.abc__opt.is-selected { border-color: var(--secondary); background: #FFF5F7; }
.abc__key {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-size: 1.2rem; font-weight: 900; line-height: 1; padding-top: 1px;
}
.abc__opt.is-selected .abc__key { background: var(--secondary); }
.abc__label { font-size: .95rem; line-height: 1.45; }
.abc__opt input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- Checkbox / radio de lista ---------- */
.choices { display: flex; flex-direction: column; gap: .1rem; margin-bottom: 1rem; }
.choice {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .35rem; cursor: pointer; border-radius: 6px;
  font-size: .95rem; line-height: 1.4;
}
.choice:hover { background: var(--soft); }
.choice input { width: 17px; height: 17px; accent-color: var(--secondary); flex: 0 0 auto; margin: 0; }
.choice.is-disabled { opacity: .4; cursor: not-allowed; }
.choice.is-disabled:hover { background: transparent; }

.selection-status { font-size: .84rem; color: var(--good); font-weight: 600; margin: .4rem 0 0; }
.selection-status.is-warn { color: var(--muted); font-weight: 500; }

.other-box {
  margin: .6rem 0 0; padding: .9rem 1rem;
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
}

/* ---------- Comentario opcional ---------- */
.comment-toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  background: none; border: none; padding: .3rem 0; cursor: pointer;
  font-family: var(--body); font-size: .85rem; font-weight: 600;
  color: var(--primary); text-decoration: underline; text-underline-offset: 3px;
}
.comment-toggle svg { color: var(--muted); }

/* ---------- Stakeholders ---------- */
.stk { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin-bottom: .75rem; background: var(--soft); }
.stk__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stk__remove {
  background: none; border: none; color: var(--bad); font-family: var(--body);
  font-size: .84rem; font-weight: 600; cursor: pointer; padding: .4rem 0; margin-top: .5rem;
}

/* ---------- Navegación ---------- */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.nav__right { display: flex; align-items: center; gap: 1.1rem; }
.autosave {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; color: var(--good); font-weight: 600;
  opacity: 0; transition: opacity .3s ease;
}
.autosave.is-visible { opacity: 1; }
.autosave .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  flex-shrink: 0;
}

/* Estados del guardado en el servidor. El caso "sólo en este dispositivo"
   se queda a la vista: es información que quien responde necesita. */
.autosave.is-guardando { color: var(--muted); }
.autosave.is-guardando .dot { background: var(--muted); animation: latido 1.1s ease-in-out infinite; }
.autosave.is-local { color: var(--warn); opacity: 1; }
.autosave.is-local .dot { background: var(--warn); }

@keyframes latido { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .autosave .dot { animation: none; } }

/* =============================================================
   RESULTADOS
   ============================================================= */
.result { max-width: 980px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.result__head {
  background: var(--primary); color: #fff; border-radius: var(--radius);
  padding: 2rem 2.25rem; margin-bottom: 1.25rem;
}
.result__head h1 { color: #fff; font-size: 2.3rem; }
.result__badge {
  display: inline-block; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; padding: .3rem .85rem;
  font-size: .8rem; font-weight: 600; margin-bottom: .9rem;
}
.result__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem 1.5rem; margin-top: 1.4rem; }
.result__meta dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); margin-bottom: .25rem; }
.result__meta dd { margin: 0; font-size: .92rem; font-weight: 600; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.75rem; margin-bottom: 1.25rem;
}
.panel h2 { font-size: 1.4rem; margin-bottom: 1.1rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.kpi__label { font-size: .84rem; color: var(--muted); line-height: 1.4; min-height: 2.6em; }
.kpi__value { font-family: var(--display); font-size: 2.6rem; font-weight: 900; color: var(--primary); margin: .35rem 0 .2rem; }
.kpi__class { font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; }
.kpi__class .sem { width: 9px; height: 9px; border-radius: 50%; }

.sem.good { background: var(--good); } .kpi__class.good { color: var(--good); }
.sem.warn { background: var(--warn); } .kpi__class.warn { color: var(--warn); }
.sem.bad  { background: var(--bad);  } .kpi__class.bad  { color: var(--bad); }
.sem.none { background: var(--line-strong); } .kpi__class.none { color: var(--muted); }

.bars { display: flex; flex-direction: column; gap: .9rem; }
.bar__top { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: .35rem; gap: 1rem; }
.bar__label { font-weight: 500; }
.bar__value { font-weight: 600; color: var(--primary); white-space: nowrap; }
.bar__track { position: relative; height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar__fill { position: relative; height: 100%; border-radius: 999px; }
.bar__fill.good { background: var(--good); }
.bar__fill.warn { background: var(--warn); }
.bar__fill.bad  { background: var(--bad); }
.bar__fill.none { background: var(--line-strong); }

.radar-wrap { display: flex; justify-content: center; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: none; }

.taglist { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag {
  background: var(--soft); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: .35rem .85rem; font-size: .86rem;
}
.tag--risk { background: #FFF1F3; border-color: #FBD3DA; color: #8E1F30; }

.disclaimer {
  background: var(--soft); border-left: 3px solid var(--primary);
  padding: 1rem 1.2rem; font-size: .9rem; color: var(--ink); line-height: 1.6;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.trend { font-weight: 600; }
.trend.up { color: var(--good); } .trend.down { color: var(--bad); } .trend.flat { color: var(--muted); }

.result__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* =============================================================
   PANEL ADMINISTRATIVO
   ============================================================= */
.admin { max-width: 1080px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.admin__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin__tabs { display: flex; gap: .35rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin__tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  font-family: var(--body); font-size: .9rem; font-weight: 600; color: var(--muted);
  padding: .7rem 1rem; cursor: pointer;
}
.admin__tab.is-active { color: var(--primary); border-bottom-color: var(--secondary); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: .92rem; }

.timeline { border-left: 2px solid var(--line); padding-left: 1.25rem; margin-left: .4rem; }
.timeline__item { position: relative; padding-bottom: 1.25rem; }
.timeline__item::before {
  content: ''; position: absolute; left: -1.66rem; top: .3rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--secondary);
  border: 2px solid #fff;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .home__body { grid-template-columns: 1fr; }
  .home__right { order: -1; min-height: 0; padding: 1.75rem; }
  .home__photo { max-width: 340px; }
  .home__left { padding: 2.25rem 1.5rem; max-width: none; }
  .home__title { font-size: 2.6rem; }
  /* Se oculta el salto; el espacio antes del <br> mantiene la separación. */
  .home__subtitle br { display: none; }
}
@media (max-width: 640px) {
  .card { padding: 1.4rem 1.15rem 1.25rem; margin: .75rem .75rem 0; border-radius: var(--radius); }
  .wizard__topbar-inner { padding: .7rem 1rem; gap: .75rem; }
  .wizard__step { font-size: .72rem; }
  .breadcrumb { padding: .7rem 1rem 0; }
  .home__meta { flex-direction: column; gap: 1rem; }
  .home__actions .btn { width: 100%; }
  .nav { flex-direction: column-reverse; align-items: stretch; }
  .nav__right { justify-content: space-between; }
  .nav .btn { width: 100%; }
  .stk__grid { grid-template-columns: 1fr; }
  .thanks__card { padding: 2.25rem 1.4rem; }
  .thanks__card h1 { font-size: 1.6rem; }
  .home__photo { max-width: 260px; }
  .result__head { padding: 1.4rem 1.25rem; }
  .panel { padding: 1.2rem 1.1rem; }
}

/* =============================================================
   IMPRESIÓN / PDF
   ============================================================= */
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; }
  .no-print, .wizard__topbar, .home__bar, .result__actions, .admin__tabs { display: none !important; }
  .result, .admin { max-width: none; padding: 0; }
  .panel, .card { break-inside: avoid; box-shadow: none; border-color: #D8DCE3; }
  .result__head { background: #142247 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bar__fill, .bar__range, .freq__fill, .sem, .abc__key, .progress__fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* =============================================================
   COMPONENTES DEL PANEL CENTRAL
   Agregados al conectar el sitio con la base de datos.
   ============================================================= */

/* ---- Indicador de carga ---- */
.spinner {
  width: 28px; height: 28px; margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* ---- Avisos del panel ---- */
.aviso {
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--primary);
}
.aviso--ok    { border-color: #BFE3CB; background: #F2FAF5; }
.aviso--warn  { border-color: #F0DDA8; background: #FDF8EC; }
.aviso--error { border-color: #F3C2CB; background: #FEF3F5; }

/* ---- Contador de registros ---- */
.panel__count {
  margin: 0 0 1rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ---- Barra de dispersión en el consolidado ---- */
.bar__range {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(20, 34, 71, .10);
  border-radius: 999px;
}
.bar__spread {
  margin-top: .3rem;
  font-size: .72rem;
  color: var(--muted);
}

/* ---- Frecuencia de menciones (consolidado) ---- */
.freq { display: flex; flex-direction: column; gap: .6rem; }
.freq__row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr auto;
  gap: .75rem;
  align-items: center;
}
.freq__track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.freq__fill {
  position: absolute; inset: 0 auto 0 0;
  background: var(--secondary);
  border-radius: 999px;
}
.freq__n {
  font-size: .76rem;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .freq__row { grid-template-columns: 1fr auto; }
  .freq__track { grid-column: 1 / -1; }
}

/* ---- Estado de error en la pantalla de envío ---- */
.thanks__check--error {
  background: #FEF3F5;
  color: var(--secondary);
}

/* ---- Barra de avance en el listado de encuestas en curso ---- */
.mini-bar {
  width: 100%; max-width: 120px; height: 5px;
  background: var(--line); border-radius: 999px;
  overflow: hidden; margin: .3rem 0 .2rem;
}
.mini-bar__fill { height: 100%; background: var(--secondary); border-radius: 999px; }
