/* =========================================================
   IMPUGNA COMPARENDOS · Sistema visual
   Azul marino institucional · dorado de acento · tipografía editorial
   ========================================================= */

:root {
  --navy: #0F2A4F;
  --navy-deep: #07182F;
  --navy-700: #163764;
  --navy-50: #EEF2F8;
  --gold: #B8893A;
  --gold-light: #D8AF65;
  --gold-text: #8A6420;        /* dorado legible sobre blanco (AA) */
  --gold-50: #FBF5EA;
  --white: #FFFFFF;
  --gray: #F7F8FA;
  --ink: #202938;
  --muted: #667085;
  --line: #E4E8ED;
  --line-strong: #CBD2DC;
  --success: #1F7A55;
  --success-50: #EAF6F0;
  --danger: #B42318;
  --danger-50: #FEF3F2;
  --warn-50: #FFF8EB;

  --font-display: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
  --font-body: 'Inter', 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(7, 24, 47, .06), 0 1px 3px rgba(7, 24, 47, .08);
  --shadow: 0 10px 30px rgba(7, 24, 47, .10);
  --shadow-lg: 0 24px 60px rgba(7, 24, 47, .22);
  --header-h: 76px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--navy); line-height: 1.15; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 4px; }
.section-light :focus-visible, .content :focus-visible, .sidebar :focus-visible { outline-color: var(--gold); }

.icon { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--gold); color: var(--navy-deep); font-weight: 600; border-radius: var(--radius-sm); transition: top .2s; }
.skip-link:focus { top: 12px; color: var(--navy-deep); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid transparent; border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .icon { width: 18px; height: 18px; stroke-width: 2; transition: transform .2s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn-sm { min-height: 42px; padding: 9px 16px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 16px; }
.btn-gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 6px 18px rgba(184, 137, 58, .28); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy-deep); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(184, 137, 58, .36); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); transform: translateY(-1px); }
.btn-ghost-light { background: rgba(255, 255, 255, .06); color: var(--white); border-color: rgba(255, 255, 255, .45); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); color: var(--white); border-color: var(--white); }

/* ---------- Encabezados de sección ---------- */
.kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--gold-text); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.kicker::before { content: ''; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
.kicker-light { color: var(--gold-light); }
.section { padding: 104px 0; }
.section-light { background: var(--gray); }
.section-heading { max-width: 640px; margin-bottom: 52px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading.center .kicker { justify-content: center; }
.section-heading h2 { margin-top: 14px; font-size: clamp(30px, 4vw, 44px); }
.section-heading p { margin-top: 16px; color: var(--muted); font-size: 17px; }

/* =========================================================
   HEADER
   ========================================================= */
.topbar { position: sticky; top: 0; z-index: 100; background: var(--navy); border-bottom: 1px solid rgba(216, 175, 101, .18); transition: background-color .25s, box-shadow .25s; }
.topbar.scrolled { background: rgba(7, 24, 47, .97); box-shadow: 0 10px 30px rgba(3, 12, 26, .35); }
@supports (backdrop-filter: blur(8px)) { .topbar.scrolled { background: rgba(7, 24, 47, .9); backdrop-filter: blur(10px); } }
.topbar-inner { max-width: 1320px; height: var(--header-h); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; transition: height .25s; }
.topbar.scrolled .topbar-inner { height: 66px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: auto; height: 52px; transition: height .25s; }
.topbar.scrolled .brand img { height: 44px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.main-nav a { position: relative; padding: 10px 14px; color: rgba(255, 255, 255, .86); font-size: 14.5px; font-weight: 500; border-radius: 8px; transition: color .2s, background-color .2s; }
.main-nav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--gold); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.main-nav a:hover { color: var(--white); }
.main-nav a:hover::after { transform: scaleX(1); }
.main-nav .nav-secondary, .main-nav .nav-cta-mobile { display: none; }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.main-nav + .topbar-right { margin-left: 0; }
.nav-link-quiet, .account-link { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; color: rgba(255, 255, 255, .86); font-size: 14.5px; font-weight: 500; border-radius: 8px; }
.nav-link-quiet:hover, .account-link:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.account-link .icon { width: 18px; height: 18px; color: var(--gold-light); }
.nav-cta { margin-left: 6px; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(216, 175, 101, .45); border-radius: 10px; background: transparent; color: var(--gold-light); }
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-toggle:hover { background: rgba(255, 255, 255, .08); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--white); background: var(--navy-deep); }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, rgba(7, 24, 47, .97) 0%, rgba(7, 24, 47, .92) 34%, rgba(15, 42, 79, .72) 62%, rgba(15, 42, 79, .55) 100%),
  linear-gradient(0deg, rgba(7, 24, 47, .65) 0%, rgba(7, 24, 47, 0) 40%); }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent); opacity: .7; }
.hero-inner { max-width: 1320px; margin: 0 auto; padding: 96px 24px 104px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; min-height: min(780px, calc(100vh - var(--header-h))); }
.hero-copy { max-width: 640px; }
.hero-copy h1 { margin-top: 22px; color: var(--white); font-size: clamp(40px, 5.6vw, 68px); line-height: 1.04; }
.hero-lead { margin-top: 18px; font-family: var(--font-display); font-size: clamp(24px, 2.8vw, 34px); font-weight: 600; color: var(--gold-light); line-height: 1.2; }
.hero-description { margin-top: 20px; max-width: 540px; color: rgba(255, 255, 255, .86); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-benefits { list-style: none; margin: 40px 0 0; padding: 26px 0 0; border-top: 1px solid rgba(255, 255, 255, .14); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.hero-benefits li { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .9); font-size: 14.5px; }
.hero-benefits .icon { width: 20px; height: 20px; color: var(--gold-light); }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 20px 0 40px; }
.hero-doc {
  position: relative; display: flex; flex-direction: column; width: min(390px, 100%); aspect-ratio: 8.5 / 11.6; padding: 30px 32px;
  background: var(--white); color: var(--ink); border-radius: 6px; box-shadow: var(--shadow-lg);
  transform: rotate(-2deg); transition: transform .5s var(--ease);
}
.hero-doc::before { content: ''; position: absolute; inset: 0; border-radius: 6px; box-shadow: 18px 18px 0 -6px rgba(216, 175, 101, .25); z-index: -1; }
.hero-visual:hover .hero-doc { transform: rotate(-1deg) translateY(-4px); }
.hero-doc-logo { width: 62%; height: auto; }
.hero-doc-rule { display: block; height: 2px; margin: 16px 0 18px; background: linear-gradient(90deg, var(--gold), transparent); }
.hero-doc-to { font-size: 12px; line-height: 1.5; color: var(--muted); }
.hero-doc-to b { color: var(--navy); font-size: 12.5px; }
.hero-doc-subject { margin-top: 14px; padding: 8px 10px; background: var(--gold-50); border-left: 3px solid var(--gold); font-size: 11.5px; color: var(--ink); }
.hero-doc-label { margin-top: 16px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.doc-lines { display: grid; gap: 9px; margin-top: 14px; }
.doc-lines i { display: block; height: 6px; width: 100%; background: #E9EDF2; border-radius: 3px; }
.hero-doc-sign { margin-top: auto; padding-top: 22px; width: 46%; }
.hero-doc-sign span { display: block; height: 1px; background: var(--navy); margin-bottom: 6px; }
.hero-doc-sign small { font-size: 10px; color: var(--muted); }
.hero-badge {
  position: absolute; right: 2%; bottom: 8px; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: var(--white); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(184, 137, 58, .35);
}
.hero-badge b { display: block; color: var(--navy); font-size: 14.5px; line-height: 1.3; }
.hero-badge small { color: var(--muted); font-size: 12.5px; }
.hero-badge-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); }
.hero-badge-icon .icon { width: 22px; height: 22px; stroke-width: 2.4; }

/* =========================================================
   CÓMO FUNCIONA
   ========================================================= */
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps-grid::before { content: ''; position: absolute; top: 60px; left: 12%; right: 12%; height: 1px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 14px); opacity: .55; }
.step-card { position: relative; padding: 30px 26px 30px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num { position: absolute; top: 22px; right: 24px; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold); line-height: 1; }
.icon-badge { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--navy); color: var(--gold-light); box-shadow: 0 8px 20px rgba(15, 42, 79, .18); }
.icon-badge .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.step-card h3 { margin-top: 22px; font-size: 18.5px; font-weight: 700; line-height: 1.3; }
.step-card p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* =========================================================
   TIPOS DE ESCRITOS
   ========================================================= */
.types-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.type-card { position: relative; display: flex; flex-direction: column; height: 100%; padding: 30px 26px 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.type-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.type-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(184, 137, 58, .45); }
.type-card:hover::before, .type-card:focus-within::before { transform: scaleX(1); }
.type-card .icon-badge { width: 54px; height: 54px; border-radius: 14px; }
.type-card .icon-badge .icon { width: 26px; height: 26px; }
.type-card h3 { margin-top: 22px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.type-card p { margin-top: 12px; color: var(--muted); font-size: 15px; flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 22px; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--navy); border-radius: 10px; color: var(--navy); font-size: 14.5px; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.card-link .icon { width: 17px; height: 17px; stroke-width: 2; transition: transform .2s var(--ease); }
.card-link:hover { background: var(--navy); color: var(--white); }
.card-link:hover .icon { transform: translateX(3px); color: var(--gold-light); }

/* =========================================================
   FRANJA DE BENEFICIOS
   ========================================================= */
.band { position: relative; background: var(--navy); color: var(--white); overflow: hidden; }
.band::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(900px 400px at 100% 0%, rgba(216, 175, 101, .12), transparent 60%),
  repeating-linear-gradient(135deg, transparent 0 40px, rgba(255, 255, 255, .025) 40px 41px); pointer-events: none; }
.band-inner { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 64px; align-items: center; }
.band h2 { margin-top: 16px; color: var(--white); font-size: clamp(30px, 3.6vw, 42px); }
.band-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.band-list li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); transition: border-color .25s, background-color .25s; }
.band-list li:hover { border-color: rgba(216, 175, 101, .55); background: rgba(255, 255, 255, .07); }
.band-list .icon { width: 26px; height: 26px; color: var(--gold-light); margin-top: 2px; }
.band-list b { display: block; font-size: 16px; line-height: 1.35; }
.band-list small { display: block; margin-top: 4px; color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.5; }

/* =========================================================
   VISTA PREVIA DEL DOCUMENTO
   ========================================================= */
.preview-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.preview-copy h2 { margin-top: 14px; font-size: clamp(30px, 4vw, 44px); }
.preview-copy > p { margin-top: 16px; color: var(--muted); font-size: 17px; max-width: 480px; }
.check-list { list-style: none; margin: 28px 0 34px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15.5px; color: var(--ink); }
.check-list .icon { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); stroke-width: 3; }

.paper-wrap { position: relative; margin: 0; display: flex; justify-content: center; }
.paper-shadow { position: absolute; width: min(470px, 92%); aspect-ratio: 8.5 / 13; transform: rotate(3.5deg) translate(18px, 8px); background: var(--white); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }
.paper {
  position: relative; display: flex; flex-direction: column; width: min(470px, 100%); aspect-ratio: 8.5 / 13; padding: 36px 40px 40px;
  background: var(--white); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow-lg);
  font-family: Georgia, 'Times New Roman', serif; color: var(--ink);
}
.paper::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--navy) 0 70%, var(--gold) 70%); }
.paper-demo { position: absolute; top: 16px; right: 16px; padding: 4px 10px; border: 1px dashed var(--gold); border-radius: 999px; background: var(--gold-50); color: var(--gold-text); font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.paper-head { padding-bottom: 14px; border-bottom: 1.5px solid var(--gold); }
.paper-head img { width: 54%; height: auto; }
.paper-meta { margin-top: 16px; font-size: 11.5px; color: var(--muted); }
.paper-to { margin-top: 12px; font-size: 12px; line-height: 1.5; }
.paper-to b { color: var(--navy); }
.paper-subject { margin-top: 12px; font-size: 11.5px; line-height: 1.5; }
.paper h4 { margin-top: 14px; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.paper-text { margin-top: 6px; font-size: 11.5px; line-height: 1.55; }
.paper-sign { margin-top: auto; padding-top: 28px; width: 52%; font-family: var(--font-body); }
.paper-sign span { display: block; height: 1px; background: var(--navy); margin-bottom: 6px; }
.paper-sign b { display: block; font-size: 11px; color: var(--navy); }
.paper-sign small { font-size: 10.5px; color: var(--muted); }

/* =========================================================
   PREGUNTAS FRECUENTES
   ========================================================= */
.faq-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-layout .section-heading { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: rgba(184, 137, 58, .55); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 16px 22px; font-weight: 600; font-size: 16.5px; color: var(--navy); cursor: pointer; border-radius: var(--radius); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--gray); }
.faq-item summary .icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--navy-50); color: var(--navy); stroke-width: 2.2; transition: transform .3s var(--ease), background-color .2s, color .2s; }
.faq-item[open] summary .icon { transform: rotate(45deg); background: var(--gold); color: var(--navy-deep); }
.faq-body { padding: 0 22px 20px; }
.faq-body p { color: var(--muted); font-size: 15.5px; line-height: 1.7; max-width: 640px; }

/* =========================================================
   CTA FINAL
   ========================================================= */
.cta-final { position: relative; overflow: hidden; padding: 112px 0; background: var(--navy-deep); color: var(--white); text-align: center; isolation: isolate; }
.cta-final::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(115deg, transparent 0 18%, rgba(216, 175, 101, .55) 18% calc(18% + 1px), transparent calc(18% + 1px) 22%, rgba(216, 175, 101, .3) 22% calc(22% + 1px), transparent calc(22% + 1px)),
  linear-gradient(115deg, transparent 0 78%, rgba(216, 175, 101, .3) 78% calc(78% + 1px), transparent calc(78% + 1px) 82%, rgba(216, 175, 101, .55) 82% calc(82% + 1px), transparent calc(82% + 1px)),
  radial-gradient(700px 360px at 50% 0%, rgba(22, 55, 100, .9), transparent 70%); }
.cta-watermark { position: absolute; z-index: -1; left: 50%; top: 50%; width: 460px; height: auto; transform: translate(-50%, -50%); opacity: .07; pointer-events: none; }
.cta-inner { max-width: 760px; }
.cta-final h2 { color: var(--white); font-size: clamp(32px, 4.6vw, 52px); }
.cta-final p { margin: 18px auto 34px; max-width: 560px; color: rgba(255, 255, 255, .82); font-size: 18px; }

/* =========================================================
   FORMULARIO (app-shell) · conserva clases e IDs de app.js
   ========================================================= */
.app-shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 100vh; border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.sidebar { position: relative; padding: 56px 36px 40px; background: var(--gray); border-right: 1px solid var(--line); }
.sidebar > * { max-width: 280px; }
.sidebar-title { margin-top: 14px; font-family: var(--font-display); font-size: 32px; line-height: 1.15; }
.sidebar-copy { margin-top: 14px; color: var(--muted); font-size: 15px; }
.eyebrow { color: var(--gold-text); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.escrito-chip { margin-top: 22px; padding: 14px 16px; background: var(--white); border: 1px solid rgba(184, 137, 58, .5); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); }
.escrito-chip small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.escrito-chip b { display: block; margin-top: 3px; color: var(--navy); font-size: 15px; line-height: 1.35; }
.escrito-chip span { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }

.progress-wrap { margin: 36px 0 30px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.progress-label strong { color: var(--navy); }
.progress-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 25%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 999px; transition: width .45s var(--ease); }

.steps { display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; margin-left: -12px; border-radius: var(--radius-sm); color: var(--muted); transition: background-color .2s; }
.step > span { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--white); font-size: 13px; font-weight: 700; color: var(--muted); transition: all .25s; }
.step b { display: block; font-size: 14.5px; font-weight: 600; color: inherit; line-height: 1.3; }
.step small { display: block; margin-top: 2px; font-size: 13px; }
.step.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.step.active > span { background: var(--navy); border-color: var(--navy); color: var(--gold-light); }
.step.done { color: var(--ink); cursor: pointer; }
.step.done:hover { background: rgba(15, 42, 79, .05); }
.step.done > span { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); font-size: 0; }
.step.done > span::before { content: ''; width: 10px; height: 6px; border-left: 2.2px solid currentColor; border-bottom: 2.2px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); }

.legal-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.legal-note p { font-size: 13px; line-height: 1.55; }
.note-icon { width: 20px; height: 20px; color: var(--gold); margin-top: 1px; }

.content { background: var(--white); }
.content-inner { max-width: 920px; margin: 0 auto; padding: 56px 56px 48px; }
.mobile-kicker { display: none; margin-bottom: 10px; color: var(--gold-text); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; }
.content-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.content-heading h2 { margin: 10px 0 10px; font-size: clamp(28px, 3.2vw, 38px); }
.content-heading p { color: var(--muted); font-size: 16px; max-width: 560px; }
.saved { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; background: var(--success-50); color: var(--success); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.saved-icon { width: 16px; height: 16px; }

.form-step { display: none; }
.form-step.active { display: block; animation: stepIn .35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Paso 1 · opciones */
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 36px; }
.option-card { position: relative; display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 18px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, box-shadow .2s, background-color .2s; }
.option-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.option-card:has(input:checked) { border-color: var(--navy); background: var(--navy-50); box-shadow: 0 0 0 1px var(--navy); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.option-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio { position: relative; flex: 0 0 auto; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--white); transition: border-color .2s; }
.option-card input:checked + .radio { border-color: var(--navy); }
.option-card input:checked + .radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--gold); }
.option-copy { flex: 1; }
.option-copy strong { display: block; font-size: 15.5px; color: var(--navy); line-height: 1.35; }
.option-copy small { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.arrow { color: var(--line-strong); font-size: 20px; transition: transform .2s, color .2s; }
.option-card:hover .arrow, .option-card:has(input:checked) .arrow { color: var(--gold); transform: translateX(3px); }
.full { grid-column: 1 / -1; }
.helper { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.helper .icon { width: 18px; height: 18px; color: var(--gold); stroke-width: 2.2; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Campos */
.required-note { margin-top: 32px; font-size: 13.5px; color: var(--muted); }
.req { color: var(--danger); font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; margin-top: 18px; }
.field-grid label, .wide-label, .control-grid label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.field-grid input, .field-grid select, textarea, .control-grid select, .signage-row select, .request-edit {
  display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 12px 14px;
  background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 10px;
  color: var(--ink); font-size: 15.5px; font-weight: 400; line-height: 1.4;
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
select, .field-grid select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F2A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field-grid input::placeholder, textarea::placeholder { color: #98A2B3; }
.field-grid input:hover, .field-grid select:hover, textarea:hover, .control-grid select:hover, .signage-row select:hover { border-color: #98A2B3; }
.field-grid input:focus, .field-grid select:focus, textarea:focus, .control-grid select:focus, .signage-row select:focus, .request-edit:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(184, 137, 58, .25); }
[aria-invalid="true"] { border-color: var(--danger) !important; background: var(--danger-50) !important; }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--danger); font-size: 13.5px; font-weight: 500; }
.field-error::before { content: '!'; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); color: var(--white); font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.field-error.block { margin-top: 14px; }
.wide-label { margin-top: 36px; }
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

/* Consultas (infracción / cámara) */
.offense-lookup { margin: 20px 0; padding: 18px 20px; background: var(--navy-50); border: 1px solid #D5DEEA; border-left: 4px solid var(--navy); border-radius: var(--radius-sm); color: var(--ink); font-size: 15px; }
.offense-lookup strong { display: block; margin-bottom: 6px; color: var(--navy); }
.offense-lookup p { margin: 6px 0; line-height: 1.55; }
.offense-lookup small { color: var(--muted); }
.offense-lookup details { margin-top: 10px; }
.offense-lookup summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.offense-lookup ul { margin: 8px 0 0 18px; padding: 0; }
.offense-lookup .field-grid { margin-top: 14px; }
.offense-lookup .secondary-button { margin: 16px 0 0; }

/* Carga de archivos */
.upload-box { display: flex; align-items: center; gap: 18px; margin-top: 28px; padding: 22px 24px; background: var(--gray); border: 2px dashed var(--line-strong); border-radius: var(--radius); transition: border-color .2s, background-color .2s; }
.upload-box:hover { border-color: var(--gold); background: var(--gold-50); }
.upload-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: var(--gold-light); }
.upload-symbol .icon { width: 26px; height: 26px; transform: rotate(180deg); }
.upload-box strong { display: block; font-size: 15.5px; color: var(--navy); }
.upload-box p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-left: auto; min-height: 46px; padding: 10px 18px; background: var(--white); border: 1.5px solid var(--navy); border-radius: 10px; color: var(--navy); font-size: 14.5px; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background-color .2s, color .2s; }
.secondary-button:hover { background: var(--navy); color: var(--white); }
.secondary-button:disabled { opacity: .55; cursor: not-allowed; }
.document-list { display: grid; gap: 10px; margin-top: 14px; }
.document-list:empty { display: none; }
.document-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.document-item > div { flex: 1; min-width: 0; }
.document-item strong { display: block; font-size: 14.5px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-item small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.document-type { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; background: var(--gold-50); color: var(--gold-text); font-size: 12px; font-weight: 700; border: 1px solid rgba(184, 137, 58, .35); }
.document-item button { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.document-item button:hover { background: var(--danger-50); color: var(--danger); }

/* Paso 3 · hechos y puesto de control */
.question-box, .evidence-checks { display: grid; gap: 4px; margin-top: 22px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.question-box strong, .evidence-checks strong { margin-bottom: 8px; font-size: 15.5px; color: var(--navy); }
.question-box label, .evidence-checks label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; font-size: 15px; color: var(--ink); cursor: pointer; }
.question-box label:hover, .evidence-checks label:hover { background: var(--gray); }
.question-box input, .evidence-checks input, .request-row input[type="checkbox"] { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--navy); }
.control-box { margin-top: 28px; padding: 26px; background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.control-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.control-heading strong { display: block; margin-top: 6px; font-family: var(--font-display); font-size: 22px; color: var(--navy); line-height: 1.25; }
.section-intro { margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.plain-language { margin-top: 18px; padding: 16px 18px; background: var(--white); border-left: 4px solid var(--gold); border-radius: var(--radius-sm); }
.plain-language strong { color: var(--navy); font-size: 15px; }
.plain-language p { margin-top: 6px; color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 20px; }
.signage-list, .protocol-list, .figure-box { margin-top: 22px; padding: 6px 20px 10px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.figure-box { padding-top: 16px; }
.signage-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.signage-title strong { color: var(--navy); font-size: 15.5px; }
.signage-title span { color: var(--gold-text); font-size: 12.5px; font-weight: 600; }
.signage-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.signage-row:last-child { border-bottom: 0; }
.signage-row b { display: block; font-size: 14.5px; color: var(--navy); }
.signage-row small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.signage-row select { margin-top: 0; }
.figure-box .control-grid { margin-top: 14px; }
.evidence-checks { background: var(--white); }

/* Paso 4 · diagnóstico */
.diagnostic-card { display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; padding: 24px; background: linear-gradient(135deg, var(--navy), var(--navy-700)); border-radius: var(--radius-lg); color: var(--white); }
.diagnostic-card h3 { margin-top: 6px; color: var(--white); font-family: var(--font-display); font-size: 22px; }
.diagnostic-card p { margin-top: 8px; color: rgba(255, 255, 255, .82); font-size: 15px; }
.diagnostic-card .eyebrow { color: var(--gold-light); }
.diagnostic-icon { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; background: rgba(216, 175, 101, .18); color: var(--gold-light); }
.diagnostic-icon .icon { width: 26px; height: 26px; }
.timeline-card, .defenses-card, .strategy-card, .summary-card { margin-top: 20px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.timeline-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.timeline-heading strong { color: var(--navy); font-size: 17px; }
.tag { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: var(--gold-50); border: 1px solid rgba(184, 137, 58, .35); color: var(--gold-text); font-size: 12.5px; font-weight: 600; }
.tag.neutral { background: var(--navy-50); border-color: #D5DEEA; color: var(--navy); }
.timeline { display: grid; gap: 0; margin-top: 8px; }
.timeline-empty { padding: 16px; background: var(--gray); border-radius: var(--radius-sm); color: var(--muted); font-size: 14.5px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-50); }
.timeline-name { display: block; font-weight: 600; font-size: 15px; color: var(--navy); }
.timeline-note { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.timeline-date { font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; }
.defense-list { display: grid; gap: 12px; margin-top: 14px; }
.defense-list:empty { display: none; }
.defense-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.defense-top { display: flex; gap: 12px; align-items: flex-start; }
.defense-icon { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-size: 14px; }
.defense-item strong { display: block; color: var(--navy); font-size: 15.5px; line-height: 1.35; }
.defense-level { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--gold-text); }
.defense-item p { margin-top: 10px; color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.defense-item details, .summary-card details { margin-top: 10px; }
.defense-item summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 14.5px; }
.defense-item ul { margin: 8px 0 0 18px; padding: 0; color: var(--muted); font-size: 14px; }
.strategy-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 16px; }
.strategy-flow div { padding: 14px 12px; text-align: center; background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); }
.strategy-flow b { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--navy); color: var(--gold-light); font-size: 13px; }
.strategy-flow span { display: block; font-weight: 600; color: var(--navy); font-size: 14.5px; }
.strategy-flow small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.strategy-flow i { color: var(--gold); font-style: normal; font-size: 18px; }
.strategy-footnote, .summary-note { margin-top: 14px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.summary-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.summary-columns b { display: block; color: var(--navy); font-size: 14.5px; margin-bottom: 6px; }
.summary-columns ul { margin: 0; padding-left: 18px; color: var(--ink); font-size: 14px; line-height: 1.6; }
.summary-columns li + li { margin-top: 6px; }
.request-review { margin-top: 20px; padding: 18px; background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius); }
.request-review-title { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.request-review-title b { color: var(--navy); font-size: 15px; }
.request-review-title span { color: var(--muted); font-size: 13px; }
.request-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.request-edit { margin-top: 0; min-height: 44px; font-size: 14.5px; }
.engine-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.engine-actions .secondary-button { margin-left: 0; background: var(--gold); border-color: var(--gold); color: var(--navy-deep); min-height: 50px; padding: 12px 22px; font-size: 15px; white-space: normal; text-align: center; max-width: 100%; }
.engine-actions .secondary-button:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy-deep); }
.engine-actions .secondary-button[aria-busy="true"] { opacity: .7; cursor: progress; }
#engineStatus { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--gray); color: var(--muted); font-size: 13.5px; font-weight: 500; }
#engineStatus::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
#engineStatus[data-state="loading"] { background: var(--navy-50); color: var(--navy); }
#engineStatus[data-state="loading"]::before { width: 14px; height: 14px; background: none; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
#engineStatus[data-state="success"] { background: var(--success-50); color: var(--success); }
#engineStatus[data-state="error"] { background: var(--danger-50); color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }
.draft-preview { margin-top: 16px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); }
.draft-preview strong { color: var(--navy); font-size: 15.5px; }
.draft-preview p { margin-top: 6px; color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.draft-preview .text-button { padding: 0; margin-top: 10px; }
.generated-downloads { display: grid; gap: 10px; margin: 14px 0; }
.download-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--gray); border-radius: var(--radius-sm); }
.download-row strong { flex: 1 1 200px; font-size: 14.5px; }
.download-row .secondary-button { margin-left: 0; }
.warning-box { margin-top: 20px; padding: 18px 20px; background: var(--warn-50); border: 1px solid #F3D9A4; border-left: 4px solid var(--gold); border-radius: var(--radius); }
.warning-box strong { color: var(--navy); font-size: 15px; }
.warning-box p { margin-top: 6px; color: var(--ink); font-size: 14.5px; line-height: 1.6; }

/* Acciones del formulario */
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.actions-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.back-button, .text-button { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--navy); font-size: 15px; font-weight: 600; text-decoration: none; }
.back-button:hover, .text-button:hover { background: var(--gray); color: var(--navy); }
.text-button { color: var(--muted); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; border: 0; border-radius: 10px; background: var(--navy); color: var(--white); font-size: 15.5px; font-weight: 600; box-shadow: 0 8px 20px rgba(15, 42, 79, .22); transition: background-color .2s, transform .2s; }
.primary-button span { color: var(--gold-light); transition: transform .2s; }
.primary-button:hover { background: var(--navy-700); transform: translateY(-1px); }
.primary-button:hover span { transform: translateX(3px); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .78); padding: 72px 0 28px; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.footer-brand img { width: 240px; height: auto; }
.footer-brand p { margin-top: 18px; font-size: 15px; line-height: 1.6; }
.footer-brand b { color: var(--white); }
.footer-domain { display: inline-block; margin-top: 12px; color: var(--gold-light); font-size: 14.5px; font-weight: 500; border-bottom: 1px solid rgba(216, 175, 101, .4); }
.footer-domain:hover { color: var(--white); border-color: var(--white); }
.footer-col { display: flex; flex-direction: column; gap: 4px; }
.footer-col strong { margin-bottom: 10px; color: var(--gold-light); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.footer-col a, .footer-pending { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.footer-col a:hover { color: var(--white); }
.footer-pending { flex-wrap: wrap; row-gap: 2px; }
.footer-pending small { white-space: nowrap;  padding: 2px 8px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 52px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .6); font-size: 13.5px; }

/* =========================================================
   Animaciones de aparición
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.steps-grid .reveal:nth-child(2), .types-grid .reveal:nth-child(2), .band-list .reveal:nth-child(2) { transition-delay: .08s; }
.steps-grid .reveal:nth-child(3), .types-grid .reveal:nth-child(3), .band-list .reveal:nth-child(3) { transition-delay: .16s; }
.steps-grid .reveal:nth-child(4), .types-grid .reveal:nth-child(4), .band-list .reveal:nth-child(4) { transition-delay: .24s; }
.band-list .reveal:nth-child(5) { transition-delay: .32s; }
.band-list .reveal:nth-child(6) { transition-delay: .4s; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1180px) {
  .topbar-right .nav-link-quiet { display: none; }
  .main-nav a { padding: 10px 10px; }
  .main-nav a::after { left: 10px; right: 10px; }
  .types-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --header-h: 68px; }
  .menu-toggle { display: inline-flex; }
  .topbar-right .account-link, .topbar-right .nav-cta { display: none; }
  .brand img, .topbar.scrolled .brand img { height: 42px; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 99;
    display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    padding: 20px 24px 32px; background: var(--navy-deep); overflow-y: auto;
    transform: translateX(100%); visibility: hidden; transition: transform .3s var(--ease), visibility .3s;
  }
  .topbar.scrolled .main-nav { top: 66px; }
  .topbar.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(7, 24, 47, .98); }
  .main-nav.open { transform: none; visibility: visible; }
  .main-nav a { padding: 16px 8px; font-size: 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
  .main-nav a::after { display: none; }
  .main-nav .nav-secondary { display: block; }
  .main-nav .nav-cta-mobile { display: inline-flex; margin-top: 24px; border-bottom: 0; border-radius: 10px; font-size: 16px; padding: 14px 22px; }

  .hero-inner { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding: 72px 24px 80px; }
  .hero::before { background: linear-gradient(180deg, rgba(7, 24, 47, .94) 0%, rgba(7, 24, 47, .88) 55%, rgba(15, 42, 79, .7) 100%); }
  .hero-copy { max-width: 680px; }
  .hero-visual { padding-bottom: 32px; }
  .hero-doc { width: min(340px, 82%); }

  .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-grid::before { display: none; }
  .band-inner, .preview-grid, .faq-layout { grid-template-columns: 1fr; gap: 44px; }
  .faq-layout .section-heading { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 40px 24px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar > * { max-width: 640px; }
  .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .step { margin-left: 0; min-width: 0; padding: 10px; }
  .step b { font-size: 13.5px; }
  .step small { display: none; }
  .legal-note { margin-top: 24px; }
  .content-inner { max-width: none; padding: 40px 24px 40px; }
}

@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 36px; }
  .hero-inner { padding: 52px 20px 64px; }
  .container { padding: 0 20px; }
  .hero-benefits { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-badge { right: 0; padding: 12px 14px; }
  .steps-grid, .types-grid, .band-list, .check-list { grid-template-columns: 1fr; }
  .preview-grid { gap: 36px; }
  .paper { padding: 28px 24px 34px; }
  .paper-demo { position: static; display: inline-block; margin-bottom: 12px; }
  .paper-shadow { transform: rotate(3deg) translate(8px, 6px); }
  .cta-final { padding: 80px 0; }
  .cta-watermark { width: 320px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }

  .sidebar .steps { display: none; }
  .sidebar-title { font-size: 26px; }
  .progress-wrap { margin: 24px 0 0; }
  .mobile-kicker { display: block; }
  .content-heading { flex-direction: column; gap: 12px; }
  .option-grid, .field-grid, .control-grid, .summary-columns { grid-template-columns: 1fr; }
  .upload-box { flex-wrap: wrap; }
  .upload-box .secondary-button { margin-left: 0; width: 100%; }
  .engine-actions .secondary-button, .download-row .secondary-button { width: 100%; }
  .signage-row { grid-template-columns: 1fr; gap: 10px; }
  .control-box { padding: 20px 16px; }
  .signage-list, .protocol-list, .figure-box { padding: 4px 14px 8px; }
  .control-heading { flex-direction: column; }
  .strategy-flow { grid-template-columns: 1fr 1fr; }
  .strategy-flow i { display: none; }
  .timeline-item { grid-template-columns: 16px minmax(0, 1fr); }
  .timeline-date { grid-column: 2; }
  .form-actions { flex-wrap: wrap; }
  .actions-right { width: 100%; flex-direction: column-reverse; align-items: stretch; }
  .primary-button { width: 100%; }
  .text-button { justify-content: center; }
}

@media (max-width: 400px) {
  .brand img, .topbar.scrolled .brand img { height: 36px; }
  .hero-copy h1 { font-size: 36px; }
  .hero-description { font-size: 16.5px; }
  .hero-doc { padding: 22px 22px; }
  .hero-badge { position: relative; right: auto; bottom: auto; margin: -28px auto 0; width: max-content; max-width: 100%; }
  .hero-visual { flex-direction: column; align-items: center; }
  .paper { font-size: 11px; }
  .paper-text, .paper-to, .paper-subject { font-size: 10.5px; }
}

/* Accesibilidad: movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-doc { transform: none; }
}

/* Impresión */
@media print {
  .topbar, .hero-bg, .cta-final, .site-footer, .menu-toggle { display: none; }
  .hero { background: none; color: var(--ink); }
}

/* =========================================================
   MI CASO (dashboard.html)
   ========================================================= */
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
button.account-link { border: 0; background: transparent; font-family: inherit; font-size: 14.5px; cursor: pointer; }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold-light); font-size: 14px; font-weight: 600; }
.nav-link-quiet.is-current { color: var(--white); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

.dash-page { background: var(--gray); }
.dash-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--navy-deep), var(--navy) 70%); color: var(--white); padding: 64px 0 96px; }
.dash-hero::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 46px, rgba(216, 175, 101, .05) 46px 47px); pointer-events: none; }
.dash-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.dash-hero h1 { margin-top: 14px; color: var(--white); font-size: clamp(34px, 4.6vw, 52px); }
.dash-hero p { margin-top: 12px; color: rgba(255, 255, 255, .8); font-size: 17px; max-width: 560px; }
.dash-body { position: relative; z-index: 2; margin-top: -56px; padding-bottom: 88px; }
.dash-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 56px 24px; }
.dash-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.dash-state h2 { font-size: clamp(24px, 3vw, 30px); }
.dash-state p { max-width: 480px; color: var(--muted); font-size: 16px; }
#stateLoading { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); color: var(--muted); }
.dash-spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.dash-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.dash-error .icon-badge { background: var(--danger-50); color: var(--danger); box-shadow: none; }

.case-list { display: grid; gap: 20px; }
.case-card { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border-top: 4px solid var(--navy); }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.case-stage { display: inline-block; color: var(--gold-text); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.case-head h2 { margin-top: 8px; font-size: clamp(22px, 2.6vw, 28px); overflow-wrap: anywhere; }
.case-meta { margin-top: 6px; color: var(--muted); font-size: 15px; }
.case-person { margin-top: 4px; color: var(--ink); font-size: 14.5px; }
.case-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.case-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.case-status.is-ready { background: var(--success-50); color: var(--success); }
.case-status.is-draft { background: var(--gold-50); color: var(--gold-text); border: 1px solid rgba(184, 137, 58, .35); }
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 22px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-facts dt { color: var(--muted); font-size: 13px; }
.case-facts dd { margin: 4px 0 0; color: var(--navy); font-weight: 600; font-size: 15px; }
.case-counters { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; color: var(--muted); font-size: 14.5px; }
.case-counters b { color: var(--navy); font-size: 16px; }
.case-downloads { display: grid; gap: 10px; margin-top: 20px; }
.case-downloads > strong { color: var(--navy); font-size: 15px; }
.case-download { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--gray); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.case-download-name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); font-size: 15px; }
.case-download-name .icon { color: var(--gold); width: 22px; height: 22px; }
.case-download-actions { display: flex; gap: 8px; }
.case-empty-docs { margin-top: 18px; padding: 14px 16px; background: var(--gray); border-radius: var(--radius-sm); color: var(--muted); font-size: 14.5px; }
.dash-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); color: var(--muted); font-size: 14px; line-height: 1.6; }
.dash-note .icon { width: 22px; height: 22px; color: var(--gold); margin-top: 1px; }

@media (max-width: 1024px) {
  .topbar-right .account-name, .topbar-right .account-logout { display: none; }
}
@media (max-width: 760px) {
  .dash-hero { padding: 44px 0 84px; }
  .dash-hero-inner .btn { width: 100%; }
  .case-card { padding: 22px 18px; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-download-actions { width: 100%; }
  .case-download-actions .btn { flex: 1; }
}

/* =========================================================
   PANEL DEL DUEÑO (admin.html)
   ========================================================= */
.admin-page { background: var(--gray); }
.admin-page .topbar-inner { max-width: none; }
.admin-badge { padding: 4px 12px; border: 1px solid rgba(216, 175, 101, .5); border-radius: 999px; color: var(--gold-light); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.admin-gate { max-width: 560px; margin: 72px auto; padding: 0 20px; }
.gate-title { font-size: clamp(24px, 3vw, 30px); }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); background: linear-gradient(90deg, var(--navy-deep) 250px, transparent 250px); }
.admin-nav { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; gap: 2px; padding: 24px 14px; background: var(--navy-deep); overflow-y: auto; }
.admin-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; border-radius: 10px; color: rgba(255, 255, 255, .78); font-size: 15px; font-weight: 500; }
.admin-nav a .icon { width: 20px; height: 20px; color: rgba(216, 175, 101, .8); }
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.admin-nav a.active { background: rgba(216, 175, 101, .14); color: var(--white); box-shadow: inset 3px 0 0 var(--gold); }
.admin-nav a.active .icon { color: var(--gold-light); }
.admin-main { padding: 32px 36px 72px; min-width: 0; outline: none; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h1 { font-size: clamp(26px, 3vw, 34px); }
.admin-head p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.admin-head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-head-actions .btn .icon { width: 17px; height: 17px; }
.admin-card { margin-bottom: 20px; padding: 22px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.admin-card h2 { margin-bottom: 14px; font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--navy); }
.admin-card > .muted { margin: -6px 0 16px; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admin-grid-2 > .admin-card { margin-bottom: 20px; }
.muted { color: var(--muted); font-size: 14px; }
.admin-hint { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.admin-empty { padding: 22px; background: var(--gray); border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 15px; }
.admin-fail { background: var(--danger-50); border-color: #F3B8B2; color: var(--danger); }
.admin-loading { display: flex; align-items: center; gap: 12px; padding: 40px; color: var(--muted); }
.admin-loading .dash-spinner { width: 24px; height: 24px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); min-width: 0; }
.kpi span { display: block; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi strong { display: block; margin-top: 6px; font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 28px); color: var(--navy); overflow-wrap: anywhere; line-height: 1.15; }
.kpi small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.kpi-gold { border-top: 3px solid var(--gold); }
.kpi-good strong { color: var(--success); }
.kpi-bad strong { color: var(--danger); }

.status-list, .alert-list, .audit-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.status-list li:last-child { border-bottom: 0; }
.status-list b { color: var(--navy); }
.alert-list li { padding: 10px 12px 10px 14px; margin-bottom: 8px; border-radius: var(--radius-sm); font-size: 14.5px; border-left: 4px solid; }
.alert-warn { background: var(--warn-50); border-color: var(--gold) !important; }
.alert-error { background: var(--danger-50); border-color: var(--danger) !important; }
.alert-info { background: var(--navy-50); border-color: var(--navy) !important; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.dot-in { background: var(--gold); } .dot-out { background: var(--navy); }

.filter-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-bar label, .form-grid label, .inline-form label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.filter-bar .grow, .inline-form .grow { flex: 1 1 260px; }
.admin-page input:not([type=checkbox]), .admin-page select, .admin-page textarea { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); }
.admin-page select { padding-right: 36px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F2A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.admin-page input:focus, .admin-page select:focus, .admin-page textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(184, 137, 58, .25); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid label.check, .plan-card label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.form-actions-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.year-form select { min-width: 110px; margin-top: 0 !important; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table thead th { position: sticky; top: 0; background: var(--gray); color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.admin-table tbody tr:hover { background: #FAFBFC; }
.admin-table tbody tr:last-child td, .admin-table tbody tr:last-child th { border-bottom: 0; }
.admin-table td small, .admin-table td .muted + small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.admin-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.admin-table .neg { color: var(--danger); }
.admin-table.compact th, .admin-table.compact td { padding: 9px 10px; font-size: 13.5px; }
.admin-table tbody th { color: var(--navy); font-weight: 600; text-transform: capitalize; }
.admin-table .actions { white-space: nowrap; }
.admin-table tr.is-voided td { color: var(--muted); text-decoration: line-through; }
.admin-table tr.is-voided td.actions { text-decoration: none; }
.btn-link { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 8px; border: 0; background: none; color: var(--navy); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; border-radius: 6px; }
.btn-link:hover { background: var(--navy-50); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--gray); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-good, .pill-documentos-listos, .pill-radicado { background: var(--success-50); border-color: #B7E0CB; color: var(--success); }
.pill-bad { background: var(--danger-50); border-color: #F3B8B2; color: var(--danger); }
.pill-admin, .pill-en-revision { background: var(--gold-50); border-color: rgba(184, 137, 58, .45); color: var(--gold-text); }
.pill-out { background: var(--navy-50); border-color: #D5DEEA; color: var(--navy); }
.pill-cerrado { background: #EEF0F3; color: var(--muted); }

.case-rows { display: grid; gap: 10px; }
.case-row { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.case-row[open] { border-color: rgba(184, 137, 58, .55); box-shadow: var(--shadow-sm); }
.case-row summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto 110px; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; border-radius: var(--radius); }
.case-row summary::-webkit-details-marker { display: none; }
.case-row summary:hover { background: #FAFBFC; }
.case-row summary small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-main b { color: var(--navy); }
.cr-person { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-date { color: var(--muted); font-size: 13.5px; text-align: right; }
.case-detail { padding: 4px 18px 18px; border-top: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.detail-grid dt { color: var(--muted); font-size: 12.5px; }
.detail-grid dd { margin: 2px 0 0; font-weight: 600; color: var(--navy); font-size: 14.5px; }
.detail-line { margin-top: 6px; font-size: 14.5px; }
.detail-line small { color: var(--muted); }
.notes { margin-top: 14px; padding: 12px 14px; background: var(--gray); border-radius: var(--radius-sm); font-size: 14.5px; }
.notes ul { margin: 8px 0 0; padding-left: 18px; }
.notes li small { display: block; color: var(--muted); font-size: 12.5px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan-card { margin-bottom: 0; border-top: 4px solid var(--line-strong); }
.plan-card.is-active { border-top-color: var(--gold); }
.plan-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.plan-top small { color: var(--muted); font-size: 12.5px; }
#newPlanSlot .plan-card { margin-bottom: 20px; border-top-color: var(--navy); }

.legend { display: flex; gap: 18px; margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; height: 200px; align-items: end; padding-top: 8px; border-bottom: 1px solid var(--line); }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bar-stack { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar { display: block; width: 42%; max-width: 16px; min-height: 2px; border-radius: 3px 3px 0 0; transition: height .4s var(--ease); }
.bar-col small { margin-top: 6px; color: var(--muted); font-size: 11.5px; text-transform: capitalize; }
.bar-in { background: var(--gold); } .bar-out { background: var(--navy); } .bar-users { background: #7A93B8; } .bar-subs { background: var(--gold); }

.audit-list li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list small { display: block; color: var(--muted); font-size: 12.5px; }
.audit-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.admin-toast { position: fixed; right: 24px; bottom: 24px; z-index: 300; max-width: min(420px, calc(100vw - 32px)); padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 15px; font-weight: 500; }
.admin-toast.ok { background: var(--navy); color: var(--white); border-left: 4px solid var(--gold); }
.admin-toast.error { background: var(--danger); color: var(--white); }
.admin-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.admin-dialog::backdrop { background: rgba(7, 24, 47, .55); }
.admin-dialog form { padding: 24px; }
.admin-dialog h2 { font-size: 22px; }
.admin-dialog p { margin: 8px 0 14px; color: var(--muted); font-size: 14.5px; }
.admin-dialog label { display: block; font-size: 14px; font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; background: none; }
  .admin-nav { position: sticky; top: var(--header-h); z-index: 50; height: auto; flex-direction: row; gap: 4px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { flex: 0 0 auto; min-height: 42px; padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  .admin-nav a.active { box-shadow: inset 0 -3px 0 var(--gold); }
  .admin-main { padding: 24px 20px 64px; }
  .admin-grid-2 { grid-template-columns: 1fr; gap: 0; }
  .admin-page .topbar-right .account-name { display: none; }
  .admin-page .topbar-right .account-logout { display: inline-flex; }
}
@media (max-width: 760px) {
  .admin-badge { display: none; }
  .admin-page .nav-link-quiet { display: none; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 14px; }
  .admin-card { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .case-row summary { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; }
  .cr-person { grid-column: 1; grid-row: 2; }
  .cr-date { grid-column: 2; grid-row: 2; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-form > * { flex: 1 1 100%; }
  .admin-head-actions { width: 100%; }
  .audit-list li { grid-template-columns: 1fr; gap: 2px; }
  .bars { gap: 3px; height: 160px; }
  .bar-col small { font-size: 10px; }
}
.admin-link { color: var(--gold-light) !important; }
.admin-link .icon { color: var(--gold-light); }
@media (max-width: 1024px) { .topbar-right .admin-link { display: inline-flex; } .topbar-right .admin-link span { display: none; } }
.main-nav a, .account-link, .nav-link-quiet { white-space: nowrap; }
@media (max-width: 1320px) { .topbar-right .nav-link-quiet { display: none; } .topbar-inner { gap: 16px; } }
@media (min-width: 1025px) and (max-width: 1180px) { .main-nav a { padding: 10px 8px; font-size: 14px; } .topbar-right .account-link span { display: none; } }

/* Planes públicos, contacto y WhatsApp */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; align-items: stretch; }
.plan-tile { position: relative; display: flex; flex-direction: column; padding: 30px 26px 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.plan-tile.is-featured { border: 2px solid var(--gold); box-shadow: var(--shadow); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px; background: var(--gold); color: var(--navy-deep); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.plan-type { color: var(--gold-text); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.plan-tile h3 { margin-top: 8px; font-size: 21px; }
.plan-desc { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.plan-price { margin: 18px 0 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-price strong { display: block; font-family: var(--font-display); font-size: 34px; color: var(--navy); line-height: 1.1; }
.plan-price span { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.plan-tile ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-tile li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan-tile li .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--gold); stroke-width: 2.4; }
.plan-tile .btn { width: 100%; }
.plans-note { margin-top: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.footer-grid.has-contact { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); }
.footer-col a { overflow-wrap: anywhere; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px 18px; border-radius: 999px; background: #1F7A55; color: var(--white); font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lg); }
.wa-float:hover { background: #18664a; color: var(--white); }
.wa-float svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1024px) { .footer-grid.has-contact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .footer-grid.has-contact { grid-template-columns: 1fr; } .wa-float span { display: none; } .wa-float { padding: 14px; } }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.form-subtitle { margin: 10px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line); }
.plans-tabs { display: flex; justify-content: center; gap: 4px; width: max-content; max-width: 100%; margin: -16px auto 32px; padding: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.plans-tabs button { min-height: 44px; padding: 8px 24px; border: 0; border-radius: 999px; background: transparent; color: var(--navy); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.plans-tabs button[aria-selected="true"] { background: var(--navy); color: var(--white); }
.plans-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); justify-content: center; }
.plan-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; padding: 24px 28px; background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.plan-box h2 { margin-top: 6px; font-size: clamp(22px, 2.6vw, 28px); }
.plan-box-count { text-align: center; padding: 10px 22px; background: var(--navy); color: var(--white); border-radius: var(--radius); }
.plan-box-count strong { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1.1; color: var(--gold-light); }
.plan-box-count span { font-size: 13px; }
.plan-box-note { flex-basis: 100%; margin: 0; padding: 12px 14px; background: var(--gold-50); border-radius: var(--radius-sm); font-size: 14.5px; }
.plan-box-note a { font-weight: 600; text-decoration: underline; }
