/* ============ AGLAYA · Ley 21.719 — tema claro, profesional ============ */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-tint: #eef4ff;
  --ink: #0b1524;
  --ink-2: #38465b;
  --muted: #6b7a90;
  --line: #e4e9f2;
  --primary: #1d4ed8;
  --primary-d: #1640b0;
  --primary-soft: #e7efff;
  --ok: #15803d;
  --ok-bg: #e7f6ec;
  --warn: #b45309;
  --warn-bg: #fdf2e3;
  --fail: #c2261c;
  --fail-bg: #fdeceb;
  --shadow: 0 10px 30px rgba(16, 38, 76, 0.08);
  --shadow-sm: 0 4px 14px rgba(16, 38, 76, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Plus Jakarta Sans", var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1140px, 92vw); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: .98rem; padding: .85rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(29,78,216,.25); }
.btn--primary:hover { background: var(--primary-d); transform: translateY(-1px); }
.btn--primary:disabled { opacity: .6; cursor: progress; transform: none; }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { transform: translateY(-1px); }
.btn--sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--display); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), #4f7df6); color: #fff; font-weight: 800;
}
.brand__name { font-weight: 800; font-size: 1.05rem; line-height: 1; display: flex; flex-direction: column; gap: 2px; }
.brand__name small { font-weight: 600; font-size: .68rem; color: var(--muted); font-family: var(--font); letter-spacing: .01em; }
.nav__links { display: flex; gap: 1.4rem; margin-left: auto; font-weight: 500; font-size: .94rem; color: var(--ink-2); }
.nav__links a:hover { color: var(--primary); }
.nav .btn { margin-left: .5rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 3.5rem; background:
    radial-gradient(1100px 460px at 78% -8%, var(--bg-tint), transparent 60%),
    linear-gradient(180deg, #fff, var(--bg-soft)); }
.hero__grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 2.5rem; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600;
  color: var(--primary-d); background: var(--primary-soft); padding: .4rem .8rem; border-radius: 999px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.18); }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin: 1.1rem 0 .9rem; }
.hl { color: var(--primary); }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 38ch; }

.scanbox { margin: 1.6rem 0 1.2rem; }
.scanbox__row { display: flex; gap: .6rem; background: #fff; padding: .5rem; border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.scanbox__row:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(29,78,216,.12); }
.scanbox__row input {
  flex: 1; border: none; outline: none; font-size: 1.05rem; padding: .6rem 1rem; background: transparent; color: var(--ink); font-family: var(--font);
  border-radius: 999px 0 0 999px;
}
.scanbox__row input:-webkit-autofill,
.scanbox__row input:-webkit-autofill:hover,
.scanbox__row input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: var(--ink) !important;
}
.scanbox__hint { font-size: .85rem; color: var(--muted); margin: .7rem 0 0 .4rem; }
.scanbox__error { color: var(--fail); font-size: .9rem; font-weight: 500; margin: .6rem 0 0 .4rem; }

.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 1.2rem; padding: 0; margin: 1.2rem 0 0; font-size: .92rem; color: var(--ink-2); font-weight: 500; }

.hero__side { display: flex; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.countdown { width: 100%; padding: 1.6rem; text-align: center; }
.countdown__label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.countdown__num { font-family: var(--display); font-size: 4.2rem; font-weight: 800; color: var(--primary); line-height: 1; margin: .5rem 0 .2rem; }
.countdown__unit { font-size: .95rem; color: var(--ink-2); }
.countdown__foot { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px dashed var(--line); font-size: .9rem; color: var(--ink-2); }

/* ---------- Secciones ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--alt { background: var(--bg-soft); }
.section__head { max-width: 60ch; margin-bottom: 2.2rem; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.eyebrow--light { color: #bcd0ff; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: .6rem 0 .7rem; }
.section__sub { color: var(--ink-2); font-size: 1.05rem; }
.section__sub--light { color: #cdd9ee; }

.grid { display: grid; gap: 1rem; }
.grid--controls { 
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); 
  gap: 1.25rem;
}
.ctrl { 
  background: #fff; 
  border: 1px solid var(--line); 
  border-radius: var(--radius-sm); 
  padding: 1.35rem; 
  box-shadow: 0 4px 10px rgba(16, 38, 76, 0.03); 
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}
.ctrl::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--line);
  transition: height 0.2s ease, background-color 0.2s ease;
}
.ctrl:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 38, 76, 0.07);
  border-color: rgba(29, 78, 216, 0.2);
}
.ctrl:hover::before {
  height: 5px;
}
/* Colores de borde y acento según categoría del control */
.ctrl[data-cat="Transparencia"]::before { background: #3b82f6; } /* Azul */
.ctrl[data-cat="Derechos"]::before { background: #8b5cf6; }       /* Púrpura */
.ctrl[data-cat="Consentimiento"]::before { background: #10b981; } /* Esmeralda */
.ctrl[data-cat="Seguridad"]::before { background: #f59e0b; }      /* Ámbar */

.ctrl:hover[data-cat="Transparencia"] { border-color: rgba(59, 130, 246, 0.3); }
.ctrl:hover[data-cat="Derechos"] { border-color: rgba(139, 92, 246, 0.3); }
.ctrl:hover[data-cat="Consentimiento"] { border-color: rgba(16, 185, 129, 0.3); }
.ctrl:hover[data-cat="Seguridad"] { border-color: rgba(245, 158, 171, 0.3); }

.ctrl__top { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: .5rem; 
  margin-bottom: 0.8rem; 
}
.ctrl__id { 
  font-size: .75rem; 
  font-weight: 700; 
  color: var(--muted); 
  letter-spacing: .06em; 
  background: var(--bg-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}
.ctrl__cat { 
  font-size: .72rem; 
  font-weight: 700; 
  padding: .2rem .6rem; 
  border-radius: 999px; 
  letter-spacing: 0.02em;
}
.ctrl[data-cat="Transparencia"] .ctrl__cat { color: #1e40af; background: #eff6ff; }
.ctrl[data-cat="Derechos"] .ctrl__cat { color: #5b21b6; background: #f5f3ff; }
.ctrl[data-cat="Consentimiento"] .ctrl__cat { color: #065f46; background: #ecfdf5; }
.ctrl[data-cat="Seguridad"] .ctrl__cat { color: #92400e; background: #fffbeb; }

.ctrl h3 { 
  font-size: 1.05rem; 
  font-family: var(--font); 
  font-weight: 700; 
  line-height: 1.35; 
  color: var(--ink);
  margin-bottom: auto;
  padding-top: 0.2rem;
}
.ctrl__ref { 
  font-size: .78rem; 
  font-weight: 600;
  color: var(--muted); 
  margin-top: 1rem; 
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.ctrl__ref::before {
  content: "§";
  color: var(--primary);
  font-size: 0.9rem;
}

.grid--steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.step__n { font-family: var(--display); font-weight: 800; color: var(--primary); font-size: 1.4rem; }
.step h3 { font-size: 1.08rem; margin: .5rem 0 .4rem; font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.step p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------- Riesgo ---------- */
.section--risk { background: linear-gradient(135deg, #0f2557, #163a8a); color: #fff; }
.risk__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.section--risk h2 { color: #fff; }
.risk__cards { display: grid; gap: .8rem; }
.riskcard { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }
.riskcard span { color: #cdd9ee; font-weight: 500; }
.riskcard strong { font-size: 1.15rem; }
.riskcard--max { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.risk__note { font-size: .82rem; color: #aebfdd; margin: .4rem 0 0; }

/* ---------- CTA / Lead ---------- */
.section--cta { background: var(--bg-soft); }
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.cta__bullets { list-style: none; padding: 0; margin: 1.3rem 0 0; display: grid; gap: .6rem; color: var(--ink-2); font-weight: 500; }
.leadform { padding: 1.6rem; }
.leadform h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.field { margin-bottom: .85rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: .3rem; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .85rem;
  font-family: var(--font); font-size: .98rem; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.field--checkbox { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 1rem; margin-bottom: 1.2rem; }
.field--checkbox input[type="checkbox"] { width: auto; margin-top: 0.25rem; cursor: pointer; flex-shrink: 0; }
.field--checkbox label { font-size: 0.85rem; color: var(--ink-2); line-height: 1.4; font-weight: 500; cursor: pointer; }
.field--checkbox a { color: var(--primary); text-decoration: none; font-weight: 600; }
.field--checkbox a:hover { text-decoration: underline; }
.leadform__msg { margin: .8rem 0 0; font-size: .92rem; font-weight: 600; }
.leadform__msg.ok { color: var(--ok); }
.leadform__msg.err { color: var(--fail); }
.leadform__legal { font-size: .8rem; color: var(--muted); margin: .8rem 0 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.brand--footer .brand__mark { width: 30px; height: 30px; }
.footer__legal { font-size: .82rem; color: var(--muted); max-width: 60ch; margin: 0; }

/* ---------- Resultados ---------- */
.results { padding: 2.5rem 0 3.5rem; scroll-margin-top: 80px; }
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.report__head { display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center; padding: 1.6rem 1.8rem; border-bottom: 1px solid var(--line); }
.gauge { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.gauge__inner { width: 80px; height: 80px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.7rem; }
.report__title h2 { font-size: 1.4rem; }
.report__title p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }
.report__title .dom { color: var(--ink); font-weight: 600; }
.riskbadge { padding: .45rem .9rem; border-radius: 999px; font-weight: 700; font-size: .85rem; text-transform: capitalize; }
.riskbadge.bajo { background: var(--ok-bg); color: var(--ok); }
.riskbadge.medio { background: var(--warn-bg); color: var(--warn); }
.riskbadge.alto { background: var(--fail-bg); color: var(--fail); }

.report__stats { display: flex; gap: 1.5rem; flex-wrap: wrap; padding: 1.1rem 1.8rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.stat { display: flex; align-items: baseline; gap: .4rem; font-size: .92rem; color: var(--ink-2); }
.stat strong { font-size: 1.3rem; font-family: var(--display); }
.stat.ok strong { color: var(--ok); }
.stat.warn strong { color: var(--warn); }
.stat.fail strong { color: var(--fail); }

/* Estimación de multa */
.multa { margin: 1.2rem 1.8rem 0; border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; border: 1px solid var(--line); }
.multa--grave { background: var(--fail-bg); border-color: #f3c5c1; }
.multa--leve { background: var(--warn-bg); border-color: #f3ddb8; }
.multa--ok { background: var(--ok-bg); border-color: #c3e6cf; display: flex; gap: .8rem; align-items: center; color: var(--ink-2); }
.multa--ok .multa__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.multa__head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.multa__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.multa__cat { font-size: .76rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: rgba(255,255,255,.7); color: var(--ink); }
.multa__main { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; }
.multa__utm { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
.multa--grave .multa__utm { color: var(--fail); }
.multa--leve .multa__utm { color: var(--warn); }
.multa__clp { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.multa__clp small { color: var(--muted); font-weight: 500; font-size: .8rem; }
.multa__detail { font-size: .9rem; color: var(--ink-2); margin-top: .55rem; }
.multa__disc { font-size: .78rem; color: var(--muted); margin: .7rem 0 0; line-height: 1.5; }

.findings { padding: .6rem 1.8rem 1.4rem; }
.finding { display: grid; grid-template-columns: auto 1fr; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: none; }
.finding__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800; color: #fff; margin-top: 2px; }
.finding__icon.pass { background: var(--ok); }
.finding__icon.warning { background: var(--warn); }
.finding__icon.fail { background: var(--fail); }
.finding__title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.finding__sev { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 6px; background: var(--bg-tint); color: var(--primary-d); }
.finding__ev { color: var(--ink-2); font-size: .92rem; margin: .25rem 0 0; }
.finding__act { color: var(--muted); font-size: .88rem; margin: .35rem 0 0; }
.finding__act b { color: var(--primary-d); font-weight: 600; }
.finding__ref { font-size: .76rem; color: var(--muted); }

.report__cta { padding: 1.6rem 1.8rem; background: linear-gradient(135deg, #0f2557, #163a8a); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.report__cta h3 { color: #fff; font-size: 1.3rem; }
.report__cta p { margin: .3rem 0 0; color: #cdd9ee; font-size: .95rem; }

.skeleton { padding: 3rem 1.8rem; text-align: center; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Controles: Layout Lateral Integrado ---------- */
.controls-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}
.controls-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
button.ctrl {
  text-align: left;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  outline: none;
  width: 100%;
}
.ctrl.active {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.08);
}
.ctrl.active::before {
  height: 5px;
}
.ctrl__action-hint {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.ctrl.active .ctrl__action-hint {
  color: var(--primary-d);
}

/* Panel de detalle */
.controls-detail-panel {
  position: sticky;
  top: 90px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  margin: auto;
  color: var(--muted);
}
.detail-placeholder__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.detail-placeholder h3 {
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.detail-placeholder p {
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 32ch;
}

.detail-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.detail-card__header {
  padding: 1.25rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.detail-card__header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}
.detail-card[data-cat="Transparencia"] .detail-card__header::before { background: #3b82f6; }
.detail-card[data-cat="Derechos"] .detail-card__header::before { background: #8b5cf6; }
.detail-card[data-cat="Consentimiento"] .detail-card__header::before { background: #10b981; }
.detail-card[data-cat="Seguridad"] .detail-card__header::before { background: #f59e0b; }

.detail-card__id {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.detail-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.detail-card[data-cat="Transparencia"] .detail-card__cat { color: #1e40af; background: #eff6ff; }
.detail-card[data-cat="Derechos"] .detail-card__cat { color: #5b21b6; background: #f5f3ff; }
.detail-card[data-cat="Consentimiento"] .detail-card__cat { color: #065f46; background: #ecfdf5; }
.detail-card[data-cat="Seguridad"] .detail-card__cat { color: #92400e; background: #fffbeb; }

.detail-card__body {
  padding: 2rem 1.6rem;
  flex: 1;
}
.detail-card__body h2 {
  font-size: 1.55rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}
.detail-card__ref {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.8rem;
}
.detail-card__ref strong {
  color: var(--primary);
}
.detail-card__content h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.detail-card__content p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}

.animate-fade-in {
  animation: panelFadeIn 0.25s ease-out;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- FAQ / Acordeones ---------- */
.faq__container {
  max-width: 800px;
  margin-inline: auto;
}
.faq__list {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}
.faq-item {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 8px rgba(16, 38, 76, 0.02);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.06);
}
.faq-item__trigger {
  width: 100%;
  padding: 1.3rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: none;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  outline: none;
}
.faq-item__icon {
  font-size: 1.3rem;
  color: var(--primary);
  line-height: 1;
  font-weight: 500;
}
.faq-item__content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 1.6rem;
  background: var(--bg-soft);
}
.faq-item.active .faq-item__content {
  max-height: 500px; /* Altura máxima suficiente */
  padding: 1.2rem 1.6rem 1.6rem;
  border-top: 1px solid var(--line);
}
.faq-item__content p {
  margin: 0 0 1rem;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.faq-item__content p:last-child {
  margin-bottom: 0;
}
.faq-item__content ul {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
  font-size: 0.96rem;
  color: var(--ink-2);
}
.faq-item__content li {
  margin-bottom: 0.4rem;
}


/* ---------- Responsive ---------- */
@media (max-width: 990px) {
  .controls-layout {
    grid-template-columns: 1fr;
  }
  .controls-detail-panel {
    position: static;
    min-height: auto;
  }
}
@media (max-width: 640px) {
  .controls-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .hero__grid, .risk__grid, .cta__grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .report__head { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .report__cta { flex-direction: column; text-align: center; }
}

@media (max-width: 580px) {
  .scanbox__row {
    flex-direction: column;
    border-radius: var(--radius-sm);
    padding: 0;
    gap: 0.6rem;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .scanbox__row input {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.1rem;
    width: 100%;
    box-sizing: border-box;
  }
  .scanbox__row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29,78,216,.12);
  }
  .scanbox__row .btn {
    width: 100%;
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .nav__inner {
    gap: 0.5rem;
    justify-content: space-between;
  }
  .brand__name {
    font-size: 0.95rem;
  }
  .brand__name small {
    display: none;
  }
  .nav .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    margin-left: 0;
  }
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.cookie-banner__actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}
.cookie-banner .btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* ---------- Admin Dashboard ---------- */
.admin-login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem;
}
.admin-login-card {
  max-width: 400px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.admin-login-card h2 {
  margin-bottom: 1.5rem;
  font-family: var(--display);
}
.admin-login-card input {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.admin-dashboard {
  padding: 3rem 0;
}
.admin-dashboard__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-dashboard__header h1 {
  font-size: 2.2rem;
  font-family: var(--display);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.kpi-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.kpi-card__title {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.kpi-card__value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--display);
}

.table-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-card__header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.table-card__search {
  max-width: 320px;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-size: 0.95rem;
}
.table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th, .admin-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.admin-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--ink-2);
}
.admin-table tr {
  cursor: pointer;
  transition: background 0.15s ease;
}
.admin-table tr:hover {
  background: var(--bg-soft);
}

.badge-risk {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-risk.bajo { background: var(--ok-bg); color: var(--ok); }
.badge-risk.medio { background: var(--warn-bg); color: var(--warn); }
.badge-risk.alto { background: var(--fail-bg); color: var(--fail); }

/* Modal */
.admin-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 21, 36, 0.4);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.admin-modal[hidden] {
  display: none !important;
}
.admin-modal__card {
  background: var(--bg);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.admin-modal__header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-modal__header h2 {
  font-family: var(--display);
}
.admin-modal__close {
  background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--muted);
}
.admin-modal__body {
  padding: 2rem;
}
