/* ============================================================
   CSPA Calculator – Academia Migratoria Digital
   Stylesheet v4.0 — matched exactly to the current AMID landing page
   Palette: navy + vivid blue + gold (official brand tokens) + Sora / Inter
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand — matched exactly to the current AMID landing page */
  --navy-950:     #0B2A5B;
  --navy-900:     #0B2A5B;
  --navy-800:     #123A7A;
  --navy-700:     #123A7A;
  --navy-600:     #1A56D4;
  --blue-dark:    #0B2A5B;   /* kept for backward compatibility */
  --blue-mid:     #1A56D4;
  --blue-light:   #1A56D4;
  --blue-pale:    #EAF0FC;
  --gold:         #F6B319;
  --gold-light:   #FFD45A;
  --gold-dark:    #C98A0A;

  /* Neutrals — matched to the site's gray tokens */
  --paper:        #F8FAFC;
  --gray-bg:      #F1F5F9;
  --gray-border:  #E2E8F0;
  --gray-text:    #64748B;
  --ink:          #0F1923;
  --white:        #ffffff;

  /* Semantic */
  --success:      #167a4c;
  --success-bg:   #e3f3ea;
  --danger:       #b3261e;
  --danger-bg:    #fbe9e7;
  --warning:      #96691c;
  --warning-bg:   #faf1de;
  --info:         #175a72;
  --info-bg:      #e3f1f4;

  --shadow-sm:    0 1px 2px rgba(11,42,91,.07), 0 1px 3px rgba(11,42,91,.09);
  --shadow-md:    0 4px 14px rgba(11,42,91,.12);
  --shadow-lg:    0 16px 48px rgba(11,42,91,.18);
  --radius:       14px;
  --radius-sm:    9px;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font:         'Inter', system-ui, sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-mid); text-decoration: none; }
a:hover { color: var(--navy-900); text-decoration: underline; }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; }

/* ── Top navbar ────────────────────────────────────────────── */
.navbar {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  padding: .7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--gray-border);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.navbar-logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}
.navbar-logo-full { height: 38px; }
.navbar-app-pill {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--blue-pale);
  border: 1px solid var(--gray-border);
  padding: .3rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.navbar-title {
  display: flex; flex-direction: column;
}
.navbar-title-main {
  color: var(--navy-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.navbar-title-sub {
  color: var(--gray-text);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .02em;
}
.navbar-actions { display: flex; align-items: center; gap: 1rem; }
.lang-switcher { display: flex; gap: .25rem; }
.lang-btn {
  background: transparent;
  border: 1px solid var(--gray-border);
  color: var(--gray-text);
  padding: .3rem .65rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
}
.lang-btn:hover, .lang-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-950);
}

/* ── Hero section ──────────────────────────────────────────── */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 900px 400px at 12% -10%, rgba(246,179,25,.14), transparent 60%),
    linear-gradient(165deg, #0B2A5B 0%, #123A7A 45%, #0B2A5B 100%);
  color: var(--white);
  padding: 3rem 1.5rem 2.75rem;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  /* subtle ledger-line motif: faint horizontal rules, nodding to
     a document / calendar timeline without being literal */
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 38px,
    rgba(255,255,255,.035) 39px,
    transparent 40px
  );
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding: .3rem .9rem;
  border: 1px solid rgba(255,207,1,.4);
  border-radius: 20px;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 .75rem;
}
.hero-title-accent {
  color: var(--gold-light);
  position: relative;
}
.hero p {
  font-size: 1rem;
  opacity: .85;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
/* Single centered column — no second empty column on desktop. */
.content-container {
  max-width: 720px;
  padding: 2rem 1.25rem 3rem;
}
#form-section { margin-bottom: 1.5rem; }
#result-section { margin-top: 1.5rem; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-border);
  overflow: hidden;
}
.card-header {
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-border);
  padding: 1.05rem 1.35rem;
  display: flex;
  align-items: center;
  gap: .65rem;
}
.card-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -.01em;
}
.card-header .icon {
  width: 30px; height: 30px;
  background: var(--blue-pale);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  color: var(--blue-mid);
  flex-shrink: 0;
}
.card-body { padding: 1.35rem; }

.form-intro {
  font-size: .85rem;
  color: var(--gray-text);
  background: var(--gray-bg);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .65rem .9rem;
  margin: 0 0 1.15rem;
  line-height: 1.5;
}

/* ── Form ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.05rem; }
.form-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: .4rem;
}
.form-label .required { color: var(--danger); }
.form-control {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: var(--font);
  transition: border-color .2s, box-shadow .2s, background .2s;
  background: var(--white);
  color: var(--ink);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(47,104,181,.14);
}
.form-control:disabled {
  background: var(--gray-bg);
  color: var(--gray-text);
  cursor: not-allowed;
  border-style: dashed;
}
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6455' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; }
.form-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem .85rem;
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  margin-bottom: .6rem;
}
.form-check:hover { background: var(--gray-bg); border-color: var(--blue-light); }
.form-check.form-check-inline { margin-bottom: 0; padding: .5rem .7rem; }
.form-check input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue-mid); flex-shrink: 0; }
.form-check label { font-size: .87rem; cursor: pointer; color: var(--ink); margin: 0; line-height: 1.4; }

/* Checkboxes the person must actively confirm — visually emphasized
   so they don't get skipped, without hard-blocking submission (the
   app still needs to work when these are left unchecked, to surface
   the appropriate warnings). */
.form-check-required {
  border-color: var(--gold-dark);
  background: rgba(255,207,1,.08);
}
.form-check-required:hover { background: rgba(255,207,1,.14); border-color: var(--gold-dark); }
.form-check-required .required { color: var(--gold-dark); font-weight: 800; margin-left: .15rem; }
.form-hint { font-size: .78rem; color: var(--gray-text); margin-top: .3rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* Tooltip */
.tooltip-icon {
  width: 16px; height: 16px;
  background: var(--gray-text);
  color: #fff;
  border-radius: 50%;
  font-size: .64rem;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-950);
  color: #fff;
  padding: .5rem .75rem;
  border-radius: 6px;
  font-size: .78rem;
  white-space: pre-wrap;
  max-width: 220px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  z-index: 200;
  line-height: 1.4;
  font-weight: 400;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .68rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(155deg, var(--blue-mid), var(--navy-900));
  color: var(--white);
  box-shadow: 0 3px 10px rgba(20,51,92,.3);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-gold {
  background: linear-gradient(155deg, var(--gold-light), var(--gold));
  color: var(--navy-950);
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-border);
  color: var(--navy-900);
}
.btn-outline:hover { border-color: var(--blue-mid); color: var(--blue-mid); background: var(--blue-pale); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn-sm { padding: .38rem .8rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.btn-loading .btn-text { opacity: 0; }

/* ── Result dashboard ──────────────────────────────────────── */
#result-section { display: none; }
#result-section.visible { display: block; }

.result-header {
  padding: 1.6rem 1.5rem;
  text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
}
.result-header.protected     { background: var(--success-bg); }
.result-header.not-protected { background: var(--danger-bg); }
.result-header.risk-medium   { background: var(--warning-bg); }
.result-header.risk-unknown  { background: var(--blue-pale); }

.calc-mode-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(20,51,92,.08);
  color: var(--navy-900);
  padding: .3rem .8rem;
  border-radius: 20px;
  margin-bottom: .75rem;
}

.result-conclusion {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .75rem;
  padding: 1.35rem;
}
.result-card {
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
}
.result-card-label {
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-text);
  margin-bottom: .3rem;
}
.result-card-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.result-card-value.highlight { color: var(--blue-mid); font-size: 1rem; }
.result-card-value.green     { color: var(--success); }
.result-card-value.red       { color: var(--danger); }
.result-card-value.amber     { color: var(--warning); }

/* Risk badge */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .32rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 700;
}
.risk-badge.low     { background: var(--success-bg); color: var(--success); }
.risk-badge.medium  { background: var(--warning-bg); color: var(--warning); }
.risk-badge.high    { background: var(--danger-bg);  color: var(--danger);  }
.risk-badge.unknown { background: var(--blue-pale);  color: var(--blue-mid);}

/* Projection box */
.projection-box {
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  background: #fdf9ee;
  margin: 1rem 1.35rem;
}
.projection-box h4 {
  margin: 0 0 .75rem;
  color: var(--gold-dark);
  font-family: var(--font-display);
  font-size: .92rem;
  display: flex; align-items: center; gap: .4rem;
}

/* Warnings & errors */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  display: flex; align-items: flex-start; gap: .6rem;
  margin: .5rem 0;
  line-height: 1.5;
}
.alert-warning { background: var(--warning-bg); color: #6b4d12; border: 1px solid #edd9a3; }
.alert-danger   { background: var(--danger-bg);  color: #7d1912; border: 1px solid #f0b3ac; }
.alert-info     { background: var(--info-bg);    color: #103e4f; border: 1px solid #a6d3de; }
.alert-success  { background: var(--success-bg); color: #0f4a30; border: 1px solid #9bd8b7; }

/* Legal disclaimer */
.disclaimer {
  font-size: .8rem;
  color: var(--gray-text);
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .75rem 1rem;
  margin: 1rem 0;
  line-height: 1.5;
}

/* Calculation breakdown box */
.calc-breakdown {
  background: var(--blue-pale);
  border: 1px solid #c3d6ec;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.calc-breakdown h4 {
  margin: 0 0 .65rem;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-size: .9rem;
}
.breakdown-cutoff {
  font-size: .82rem;
  color: var(--ink);
  margin-bottom: .8rem;
}
.breakdown-cutoff strong { color: var(--navy-900); }
.breakdown-cutoff span {
  display: block;
  font-size: .74rem;
  color: var(--gray-text);
  margin-top: .1rem;
}
.formula-row {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  flex-wrap: wrap;
}
.formula-card {
  flex: 1 1 140px;
  background: var(--white);
  border: 1px solid #c3d6ec;
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  text-align: center;
}
.formula-card-result {
  background: var(--navy-900);
  border-color: var(--navy-900);
}
.formula-card-result .formula-card-label { color: rgba(255,255,255,.7); }
.formula-card-result .formula-card-value { color: var(--gold); }
.formula-card-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--gray-text);
  margin-bottom: .3rem;
}
.formula-card-value {
  font-size: .95rem;
  font-weight: 700;
  color: var(--navy-900);
}
.formula-op {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-dark);
  flex: 0 0 auto;
  padding: 0 .15rem;
}
.breakdown-pending-note {
  margin-top: .7rem;
  font-size: .74rem;
  color: var(--gray-text);
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--navy-950);
  color: rgba(255,255,255,.65);
  text-align: center;
  padding: 1.6rem;
  font-size: .8rem;
  margin-top: 3rem;
  border-top: 2px solid var(--gold);
}
footer a { color: var(--gold-light); }

/* ── Print / PDF ────────────────────────────────────────────── */
@media print {
  .navbar, .hero, footer, .btn, #form-section, .lang-switcher, #result-actions { display: none !important; }
  body { background: #fff; font-size: 11px; }
  #result-section { display: block !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }

  @page { size: A4; margin: 9mm; }

  .content-container { padding: 0 !important; max-width: 100% !important; }
  #result-section { margin-top: 0 !important; }
  .container { padding: 0 !important; }

  .report-letterhead { padding: .5rem 0 .5rem; gap: .5rem; }
  .report-letterhead-logo { height: 28px; }
  .report-letterhead-text strong { font-size: .85rem; }
  .report-letterhead-text span { font-size: .65rem; }

  .result-header { padding: .75rem 1rem; }
  .result-conclusion { font-size: .85rem; }
  .calc-mode-badge { font-size: .62rem; padding: .2rem .55rem; margin-bottom: .4rem; }
  .risk-badge { font-size: .7rem; padding: .2rem .6rem; }

  .result-grid { grid-template-columns: repeat(4,1fr); gap: .4rem; padding: .6rem 0; }
  .result-card { padding: .4rem .5rem; }
  .result-card-label { font-size: .58rem; }
  .result-card-value { font-size: .76rem; }

  .calc-breakdown { padding: .6rem .7rem; }
  .calc-breakdown h4 { font-size: .78rem; margin-bottom: .4rem; }
  .breakdown-cutoff { font-size: .7rem; margin-bottom: .5rem; }
  .formula-card { padding: .4rem .5rem; }
  .formula-card-label { font-size: .56rem; }
  .formula-card-value { font-size: .8rem; }
  .breakdown-pending-note { font-size: .62rem; margin-top: .4rem; }

  .projection-box { padding: .6rem .7rem; margin: 0 0 .5rem !important; }
  .alert { padding: .45rem .6rem; font-size: .68rem; margin: .3rem 0; }
}

/* Report letterhead — logo + title, shown both on-screen (as a
   preview of the report) and captured identically in PDF export /
   browser print, so there's a single source of truth for it. */
.report-letterhead {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.1rem 1.25rem .9rem;
  border-bottom: 2px solid var(--gold);
}
.report-letterhead-logo { height: 38px; width: auto; flex-shrink: 0; }
.report-letterhead-text { display: flex; flex-direction: column; }
.report-letterhead-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy-900);
}
.report-letterhead-text span { font-size: .76rem; color: var(--gray-text); }

/* ── One-page-fit tightening (applies both on screen and in PDF) ── */
.result-grid { gap: .55rem; padding: 1rem 1.25rem; }
.result-card { padding: .65rem .8rem; }
.result-card-value { font-size: .92rem; }
.result-header { padding: 1.25rem 1.5rem; }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.calc-progress {
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--gray-text);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.calc-progress::before {
  content: '';
  width: 12px; height: 12px;
  border: 2px solid var(--gray-border);
  border-top-color: var(--blue-mid);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}

/* ── Responsive tweaks — compact, elegant mobile layout ──────── */
@media (max-width: 600px) {
  .navbar { padding: .5rem .85rem; }
  .navbar-brand { gap: .5rem; }
  .navbar-logo-full { height: 30px; }
  .navbar-app-pill { font-size: .66rem; padding: .22rem .55rem; }
  .lang-btn { padding: .25rem .5rem; font-size: .72rem; }

  .hero { padding: 1.75rem 1rem 1.6rem; }
  .hero-eyebrow { font-size: .62rem; padding: .22rem .65rem; margin-bottom: .7rem; }
  .hero h1 { font-size: 1.3rem; margin-bottom: .5rem; }
  .hero p { font-size: .86rem; line-height: 1.5; }

  .content-container { padding: 1.15rem .7rem 2rem; }
  #form-section { margin-bottom: 1rem; }
  .card-header { padding: .8rem 1rem; }
  .card-header h2 { font-size: .92rem; }
  .card-body { padding: .9rem; }
  .form-group { margin-bottom: .8rem; }
  .form-label { font-size: .8rem; margin-bottom: .3rem; }
  .form-control { padding: .52rem .75rem; font-size: .87rem; }
  .form-intro { font-size: .78rem; padding: .55rem .75rem; }
  .form-check { padding: .55rem .7rem; margin-bottom: .45rem; }
  .form-check label { font-size: .82rem; }
  .btn-lg { padding: .7rem 1.5rem; font-size: .92rem; }

  .result-header { padding: 1rem 1.1rem; }
  .result-conclusion { font-size: .92rem; }
  .calc-mode-badge { font-size: .66rem; padding: .25rem .65rem; }
  .result-grid { grid-template-columns: 1fr 1fr; gap: .45rem; padding: .85rem; }
  .result-card { padding: .55rem .65rem; }
  .result-card-label { font-size: .64rem; }
  .result-card-value { font-size: .84rem; }
  .report-letterhead { padding: .8rem 1rem .7rem; gap: .55rem; }
  .report-letterhead-logo { height: 30px; }
  .report-letterhead-text strong { font-size: .88rem; }
  .report-letterhead-text span { font-size: .68rem; }

  .calc-breakdown { padding: .8rem .85rem; }
  .formula-row { gap: .35rem; }
  .formula-card { flex: 1 1 100px; padding: .5rem .55rem; }
  .formula-card-label { font-size: .6rem; }
  .formula-card-value { font-size: .82rem; }
  .formula-op { font-size: 1rem; }

  footer { padding: 1.1rem; font-size: .74rem; }
}

@media (max-width: 360px) {
  .navbar-app-pill { display: none; }
  .result-grid { grid-template-columns: 1fr; }
  .formula-row { flex-direction: column; }
  .formula-op { padding: .15rem 0; }
}

/* ── Divider ───────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--gray-border); margin: 1rem 0; }

/* ── Section title (used in admin pages) ───────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-border);
}

/* ── Stat cards (admin dashboard) ───────────────────────────── */
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:1rem; margin-bottom:2rem; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--navy-900); }
.stat-label { font-size: .8rem; color: var(--gray-text); margin-top: .25rem; }

.badge-protected   { background: var(--success-bg); color: var(--success); padding: .2rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-unprotected { background: var(--danger-bg);  color: var(--danger);  padding: .2rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-unknown     { background: var(--blue-pale);  color: var(--blue-mid);padding: .2rem .55rem; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-c { background: var(--success-bg); color: var(--success); padding: .2rem .5rem; border-radius: 4px; font-size: .72rem; font-weight: 700; }
.badge-u { background: var(--danger-bg);  color: var(--danger);  padding: .2rem .5rem; border-radius: 4px; font-size: .72rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th { background: var(--gray-bg); padding: .65rem .85rem; text-align: left; font-weight: 700; color: var(--navy-900); border-bottom: 2px solid var(--gray-border); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
td { padding: .65rem .85rem; border-bottom: 1px solid var(--gray-border); vertical-align: middle; }
tr:hover td { background: #faf8f3; }

/* ── Admin layout ────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy-950);
  padding: 1.5rem 1rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 2px solid var(--gold);
}
.sidebar-logo { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .95rem; margin-bottom: 2rem; padding: .5rem; }
.sidebar-logo span { color: var(--gold-light); display: block; font-size: .74rem; font-weight: 500; margin-top: .15rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .6rem;
  color: rgba(255,255,255,.72);
  padding: .62rem .75rem;
  border-radius: 7px;
  font-size: .87rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: .25rem;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(255,207,1,.16);
  color: #fff;
}
.sidebar-nav a.active { border-left: 3px solid var(--gold); padding-left: calc(.75rem - 3px); }
.sidebar-nav .divider { border-color: rgba(255,255,255,.15); margin: .75rem 0; }
.main-content { padding: 2rem; background: var(--gray-bg); }
.page-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--navy-900); margin: 0 0 1.5rem; }
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ── Progress bar (bulletin scraper) ────────────────────────── */
.progress-bar-track {
  width: 100%; height: 10px;
  background: var(--gray-border);
  border-radius: 20px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-mid), var(--gold));
  border-radius: 20px;
  transition: width .3s ease;
  width: 0%;
}
.scrape-log-item {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  border: 1px solid var(--gray-border);
  margin-bottom: .4rem;
  background: var(--white);
}
.scrape-log-item.success { border-left: 3px solid var(--success); }
.scrape-log-item.error   { border-left: 3px solid var(--danger); }
.scrape-log-item.partial { border-left: 3px solid var(--warning); }
.scrape-log-item.skipped { border-left: 3px solid var(--gray-text); }

/* Live word-format date preview, shown under date inputs — spells out
   the selected date in words so mm/dd vs dd/mm confusion never happens,
   regardless of the visitor's browser locale. */
.date-preview {
  font-size: .78rem;
  color: var(--blue-mid);
  font-weight: 600;
  margin-top: .3rem;
  min-height: 1.1em;
}

/* ════════════════════════════════════════════════════════════
   Captación (v2.2) — consulta, reporte y academia
   ════════════════════════════════════════════════════════════ */
#growth-section { display: grid; gap: 1rem; margin-top: 1.25rem; }
#growth-section:empty { display: none; }
.growth-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-top: 4px solid var(--navy-900);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 6px 20px rgba(11, 42, 91, .06);
  transition: box-shadow .3s, transform .3s;
}
.growth-card h3 {
  font-family: 'Sora', sans-serif;
  color: var(--navy-900);
  font-size: 1.2rem;
  line-height: 1.35;
  margin: .25rem 0 .5rem;
}
.growth-card p { color: var(--gray-text); line-height: 1.6; margin: 0 0 1rem; }
.growth-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-dark);
}
.growth-no_protegido { border-top-color: var(--danger); }
.growth-protegido    { border-top-color: var(--success); }
.growth-proyeccion, .growth-pendiente { border-top-color: var(--gold); }
.growth-lead  { border-top-color: var(--navy-600); }
.growth-amid  { border-top-color: var(--gold); background: linear-gradient(180deg, #fffdf6 0%, #fff 60%); }
.growth-highlight { box-shadow: 0 0 0 4px rgba(26, 86, 212, .35), 0 10px 26px rgba(11,42,91,.12); transform: translateY(-2px); }
.btn-whatsapp {
  background: #1FA855; color: #fff; border: none;
  display: inline-flex; align-items: center; gap: .5rem;
}
.btn-whatsapp:hover { filter: brightness(1.06); color: #fff; text-decoration: none; }
.lead-profile { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .35rem; }
.lead-profile label { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-weight: 500; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
#lead-form .form-check { margin: .25rem 0 1rem; align-items: flex-start; }
#lead-form .form-check label { font-size: .88rem; color: var(--gray-text); line-height: 1.5; }
.site-footer { padding: 2rem 0 2.5rem; text-align: center; }
.site-footer p { max-width: 760px; margin: 0 auto .5rem; font-size: .82rem; line-height: 1.6; color: rgba(255,255,255,.78); }
.site-footer-brand { font-weight: 600; color: var(--gold) !important; }
@media (max-width: 600px) {
  .growth-card { padding: 1.2rem 1.1rem; }
  .growth-card .btn { width: 100%; justify-content: center; text-align: center; }
}
@media print { #growth-section, .site-footer { display: none !important; } }

/* ── Ventana para descargar el PDF ── */
body.modal-open { overflow: hidden; }
.lead-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(11, 42, 91, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: leadFade .18s ease-out;
}
.lead-modal-box {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 16px; border-top: 4px solid var(--gold);
  padding: 1.5rem 1.4rem 1.25rem;
  box-shadow: 0 20px 50px rgba(11, 42, 91, .35);
  max-height: calc(100vh - 2rem); overflow-y: auto;
}
.lead-modal-box h3 { font-family: 'Sora', sans-serif; color: var(--navy-900); font-size: 1.2rem; margin: 0 0 .35rem; }
.lead-modal-box p { color: var(--gray-text); margin: 0 0 1rem; line-height: 1.5; font-size: .95rem; }
.lead-modal-box .form-control { margin-bottom: .65rem; font-size: 16px; }
.lead-modal-box .lead-profile { margin: .2rem 0 .8rem; }
.lead-modal-close {
  position: absolute; top: .5rem; right: .6rem; width: 36px; height: 36px;
  border: none; background: transparent; font-size: 1.6rem; line-height: 1;
  color: var(--gray-text); cursor: pointer; border-radius: 50%;
}
.lead-modal-close:hover { background: var(--gray-bg); }
.lead-consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .8rem; color: var(--gray-text); line-height: 1.45; margin-bottom: .9rem; cursor: pointer; }
.lead-consent input { margin-top: .15rem; flex-shrink: 0; }
@keyframes leadFade { from { opacity: 0; } to { opacity: 1; } }
@media print { .lead-modal { display: none !important; } }

/* ════════════════════════════════════════════════════════════
   Acabado profesional (v2.3): relieve, brillo y animaciones
   ════════════════════════════════════════════════════════════ */
.ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { fill: currentColor; stroke: none; }

/* Portada */
.hero { padding: 3.25rem 1.5rem 3.5rem; }
.hero::before {
  content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  right: -160px; top: -260px;
  background: radial-gradient(circle, rgba(26,86,212,.45), transparent 65%);
  animation: heroGlow 9s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes heroGlow { from { transform: translate(0,0) scale(1); opacity: .7; } to { transform: translate(-60px,40px) scale(1.15); opacity: 1; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: .55rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  padding: .38rem .9rem .38rem .75rem; border-radius: 999px; margin-bottom: 1.1rem;
  backdrop-filter: blur(6px);
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 9px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.hero .hero-badge, .hero h1, .hero p { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) both; }
.hero h1 { animation-delay: .08s; }
.hero p  { animation-delay: .16s; }

/* Tarjeta del formulario: se eleva sobre la portada */
.content-container { padding-top: 0; }
#form-section { margin-top: -2rem; position: relative; z-index: 2; }
#form-section .card {
  border: 1px solid rgba(11,42,91,.08);
  box-shadow: 0 1px 2px rgba(11,42,91,.04), 0 18px 40px -12px rgba(11,42,91,.22);
  border-radius: 16px;
  position: relative;
  animation: fadeUp .7s .22s cubic-bezier(.2,.7,.2,1) both;
}
#form-section .card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--navy-600), var(--gold) 55%, var(--navy-600));
  background-size: 200% 100%; animation: shimmerBar 6s linear infinite;
}
@keyframes shimmerBar { to { background-position: -200% 0; } }

/* Campos */
.form-control { border-radius: 10px; min-height: 46px; }
.form-control:hover:not(:focus):not(:disabled) { border-color: #b9c6dc; }
.form-control:focus { border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(26,86,212,.12); }
.form-check { border-radius: 10px; }

/* Botones con relieve */
.btn { border-radius: 10px; position: relative; overflow: hidden; letter-spacing: .01em; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(180deg, #2A68E0 0%, #1A56D4 38%, #123A7A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #0B2A5B, 0 8px 20px -6px rgba(18,58,122,.55);
  border: 1px solid #0F3270;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); filter: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 0 #0B2A5B, 0 14px 28px -8px rgba(18,58,122,.6); }
.btn-gold {
  background: linear-gradient(180deg, #FFD45A 0%, #F6B319 55%, #E0A010 100%);
  border: 1px solid #C98A0A; color: var(--navy-950);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 #B07A00, 0 8px 18px -6px rgba(201,138,10,.5);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); filter: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 0 #B07A00, 0 14px 26px -8px rgba(201,138,10,.55); }
.btn-whatsapp {
  background: linear-gradient(180deg, #2BC468 0%, #1FA855 60%, #178C46 100%);
  border: 1px solid #157A3D;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 0 #11652F, 0 8px 18px -6px rgba(23,140,70,.5);
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 0 #11652F, 0 14px 26px -8px rgba(23,140,70,.55); }
.btn-outline { background: #fff; border: 1.5px solid var(--gray-border); box-shadow: 0 1px 2px rgba(11,42,91,.06); }
.btn-outline:hover { transform: translateY(-1px); }
/* Destello que recorre los botones principales */
.btn-primary::after, .btn-gold::after, .btn-whatsapp::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.32), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.btn-primary:hover::after, .btn-gold:hover::after, .btn-whatsapp:hover::after { animation: btnShine .75s ease; }
@keyframes btnShine { to { left: 120%; } }
#btn-calculate { min-height: 54px; font-size: 1.02rem; }
.btn-pdf { padding: .75rem 1.35rem; }
.btn-pdf.is-busy .ico { animation: bob .8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }
.btn .ico + span, .btn span + .ico { margin: 0; }
.growth-amid .btn .ico { transition: transform .2s; }
.growth-amid .btn:hover .ico { transform: translateX(3px); }

/* Resultado: entrada escalonada */
#result-section { scroll-margin-top: 84px; border-radius: 16px; box-shadow: 0 18px 40px -14px rgba(11,42,91,.2); }
#result-section.reveal .report-letterhead,
#result-section.reveal .result-header { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
#result-section.reveal .result-card { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }
#result-section.reveal .result-card:nth-child(1) { animation-delay: .05s; }
#result-section.reveal .result-card:nth-child(2) { animation-delay: .10s; }
#result-section.reveal .result-card:nth-child(3) { animation-delay: .15s; }
#result-section.reveal .result-card:nth-child(4) { animation-delay: .20s; }
#result-section.reveal .result-card:nth-child(5) { animation-delay: .25s; }
#result-section.reveal .result-card:nth-child(6) { animation-delay: .30s; }
#result-section.reveal .result-card:nth-child(7) { animation-delay: .35s; }
#result-section.reveal .result-card:nth-child(8) { animation-delay: .40s; }
#result-section.reveal .calc-breakdown { animation: fadeUp .55s .4s cubic-bezier(.2,.7,.2,1) both; }
#result-section.reveal .formula-card-result { animation: popIn .6s .75s cubic-bezier(.2,1.4,.4,1) both, resultGlow 2.4s 1.4s ease-in-out 2; }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes resultGlow { 50% { box-shadow: 0 0 0 6px rgba(246,179,25,.25); } }
.result-card { border-radius: 10px; transition: transform .2s, box-shadow .2s; }
.result-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(11,42,91,.3); }
.formula-card { border-radius: 10px; }
.formula-card-result { box-shadow: 0 10px 24px -10px rgba(11,42,91,.6); }

/* Bloques de captación: entrada escalonada */
#growth-section .growth-card { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; border-radius: 16px; }
#growth-section .growth-card:nth-child(1) { animation-delay: .55s; }
#growth-section .growth-card:nth-child(2) { animation-delay: .7s; }
.growth-card:hover { box-shadow: 0 14px 32px -14px rgba(11,42,91,.28); }

/* Ventana de descarga */
.lead-modal-box { animation: modalIn .32s cubic-bezier(.2,1.2,.4,1) both; border-radius: 18px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
  .hero { padding: 2.5rem 1.25rem 3rem; }
  #form-section { margin-top: -1.5rem; }
  .btn-pdf { width: 100%; }
}
@media print {
  #result-section { box-shadow: none !important; }
  #result-section * { animation: none !important; }
}

/* ── Invitar a descargar el PDF ── */
.btn-attention { animation: attnPulse 2.2s 1.6s ease-out infinite; }
.btn-attention .ico { animation: attnBob 1.1s 1.6s ease-in-out infinite; }
@keyframes attnPulse {
  0%   { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #0B2A5B, 0 0 0 0 rgba(26,86,212,.45); }
  70%  { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #0B2A5B, 0 0 0 12px rgba(26,86,212,0); }
  100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 #0B2A5B, 0 0 0 0 rgba(26,86,212,0); }
}
@keyframes attnBob { 50% { transform: translateY(2px); } }
.lead-modal-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: .85rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #EAF0FC, #d7e3fb); color: var(--navy-600);
  box-shadow: inset 0 1px 0 #fff;
}
.lead-modal-icon .ico { width: 26px; height: 26px; }
.lead-modal-later {
  display: block; width: 100%; margin-top: .55rem; padding: .55rem;
  background: none; border: none; color: var(--gray-text);
  font-size: .88rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.lead-modal-later:hover { color: var(--navy-900); text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   Reporte de resultado (v2.4): encabezado, resumen y relieve
   ════════════════════════════════════════════════════════════ */
:root { --gold-vivid: #FFC21A; --gold-vivid-2: #FFB000; }
#result-section { overflow: hidden; }

/* Encabezado con el logo integrado */
.report-letterhead {
  justify-content: flex-start; flex-wrap: wrap; gap: 1rem; padding: 1.15rem 1.5rem; position: relative;
  background:
    radial-gradient(320px 170px at 96% 0, rgba(42,104,224,.55), transparent 70%),
    linear-gradient(135deg, #0B2A5B 0%, #123A7A 100%);
  border-bottom: 3px solid var(--gold-vivid);
}
.report-letterhead-badge {
  height: 56px; padding: 0 .9rem; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F6FC 100%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(11,42,91,.08) inset, 0 6px 16px -4px rgba(0,0,0,.35);
}
.report-letterhead-badge img { height: 38px; width: auto; display: block; }
.report-letterhead-text { padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.22); }
.report-letterhead-text strong { color: #fff; font-size: 1.1rem; letter-spacing: -.01em; }
.report-letterhead-text span { color: rgba(255,255,255,.72); font-size: .78rem; letter-spacing: .03em; }
.report-letterhead-meta { margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; color: rgba(255,255,255,.82); }
.report-letterhead-meta b { color: var(--gold-vivid); font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; }

/* Resumen grande: edad CSPA + estado */
.result-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.35rem 1.5rem; border-bottom: 1px solid var(--gray-border); border-left: 6px solid var(--blue-mid);
  background: linear-gradient(180deg, #F3F7FE, #fff);
}
.result-hero.protected     { border-left-color: #1E9E63; background: linear-gradient(180deg, #EAF8F0, #fff); }
.result-hero.not-protected { border-left-color: #D2382E; background: linear-gradient(180deg, #FDEDEB, #fff); }
.result-hero.projection    { border-left-color: var(--gold-vivid-2); background: linear-gradient(180deg, #FFF7E0, #fff); }
.result-hero-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-text); margin-bottom: .2rem; }
.result-hero-value { font-family: var(--font-display); font-size: clamp(1.45rem, 4.6vw, 2.05rem); font-weight: 800; letter-spacing: -.02em; color: var(--navy-900); line-height: 1.15; font-variant-numeric: tabular-nums; }
.status-pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .88rem; color: #fff; margin-bottom: 3px;
  background: linear-gradient(180deg, #34C98A, #14804F);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 3px 0 #0E5C39, 0 8px 14px -6px rgba(14,92,57,.5);
}
.status-pill .ico { width: 16px; height: 16px; stroke-width: 3; }
.status-pill.not-protected { background: linear-gradient(180deg, #F0615A, #B3261E); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 3px 0 #7D1912, 0 8px 14px -6px rgba(125,25,18,.5); }
.status-pill.projection { background: linear-gradient(180deg, #FFD45A, #F0A500); color: var(--navy-900); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 3px 0 #A9740A, 0 8px 14px -6px rgba(169,116,10,.5); }
#result-section.reveal .result-hero-value { animation: fadeUp .6s .1s both; }
#result-section.reveal .status-pill { animation: popIn .6s .35s cubic-bezier(.3,1.5,.5,1) both; }

/* Título de sección */
.report-section-title { display: flex; align-items: center; gap: .55rem; padding: 1.1rem 1.5rem 0; font-family: var(--font-display); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-800); }
.report-section-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-vivid), var(--gold-dark)); }
.report-section-title::after { content: ''; flex: 1; height: 1px; background: var(--gray-border); }

/* Tarjetas de datos con relieve */
.result-grid { padding: .85rem 1.5rem 1.1rem; gap: .7rem; }
.result-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FD 100%);
  border: 1px solid #DCE4F0; border-radius: 12px; padding: .75rem .95rem;
  box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(11,42,91,.05) inset, 0 2px 0 #E1E8F3, 0 8px 16px -10px rgba(11,42,91,.28);
}
.result-card:hover { transform: translateY(-2px); box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(11,42,91,.05) inset, 0 3px 0 #D6DFEC, 0 14px 22px -12px rgba(11,42,91,.35); }
.result-card-label { font-family: var(--font-display); font-size: .64rem; letter-spacing: .08em; color: #7586A0; }
.result-card-value { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.result-card-value.highlight { color: var(--blue-mid); }
.result-card-value.green { color: var(--success); }
.result-card-value.red { color: var(--danger); }

/* Desglose del cálculo */
.calc-breakdown {
  background: linear-gradient(180deg, #EEF4FD, #E5EDFB); border: 1px solid #C9D9F1; border-radius: 16px;
  box-shadow: 0 1px 0 #fff inset, 0 10px 22px -16px rgba(11,42,91,.35); padding: 1.1rem 1.15rem;
}
.calc-breakdown h4 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy-800); display: flex; align-items: center; gap: .5rem; }
.calc-breakdown h4::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-vivid), var(--gold-dark)); }
.formula-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F9FE 100%);
  border: 1px solid #C9D9F1; border-radius: 12px; padding: .75rem .8rem;
  box-shadow: 0 1px 0 #fff inset, 0 -2px 0 rgba(11,42,91,.06) inset, 0 3px 0 #D3E0F4, 0 10px 18px -12px rgba(11,42,91,.4);
}
.formula-card-value { font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.formula-op { color: var(--gold-vivid-2); font-family: var(--font-display); text-shadow: 0 1px 0 #fff; }

/* Tarjeta EDAD CSPA: relieve y dorado intenso */
.formula-card-result {
  background:
    radial-gradient(140px 70px at 85% 0, rgba(58,120,240,.45), transparent 70%),
    linear-gradient(165deg, #1A4A9A 0%, #0F3270 45%, #0B2A5B 100%);
  border: 1px solid #0A2350;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 -3px 0 rgba(0,0,0,.25) inset, 0 4px 0 #071B40, 0 14px 26px -10px rgba(11,42,91,.7);
}
.formula-card-result .formula-card-label { color: rgba(255,255,255,.78); }
.formula-card-result .formula-card-value {
  color: var(--gold-vivid); font-size: 1.12rem; font-weight: 800;
  text-shadow: 0 1px 0 rgba(0,0,0,.35), 0 0 18px rgba(255,194,26,.35);
}

/* Pie del reporte y acciones */
.report-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem 1rem; padding: .85rem 1.5rem; margin-top: .4rem; background: #F4F7FB; border-top: 1px solid var(--gray-border); font-size: .68rem; color: var(--gray-text); line-height: 1.45; }
.report-footer b { color: var(--navy-800); font-family: var(--font-display); }
.result-actions-bar { padding: 1rem 1.5rem 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* PDF: ancho fijo, sin sombras ni animaciones */
#result-section.pdf-mode { width: 780px !important; max-width: none !important; border-radius: 0; box-shadow: none; border: none; }
#result-section.pdf-mode, #result-section.pdf-mode * { animation: none !important; transition: none !important; }
#result-section.pdf-mode .result-grid { grid-template-columns: repeat(3, 1fr); }
#result-section.pdf-mode .result-hero { flex-wrap: nowrap; }
#result-section.pdf-mode .result-card,
#result-section.pdf-mode .formula-card,
#result-section.pdf-mode .calc-breakdown,
#result-section.pdf-mode .status-pill,
#result-section.pdf-mode .report-letterhead-badge { box-shadow: none; }
#result-section.pdf-mode .formula-card-result { background: #0B2A5B; box-shadow: none; }
#result-section.pdf-mode .formula-card-result .formula-card-value { text-shadow: none; }
#result-section.pdf-mode .status-pill { background: #14804F; }
#result-section.pdf-mode .status-pill.not-protected { background: #B3261E; }
#result-section.pdf-mode .status-pill.projection { background: #F6B319; }

@media (max-width: 600px) {
  .report-letterhead { padding: 1rem; gap: .75rem; }
  .report-letterhead-badge { height: 50px; padding: 0 .75rem; }
  .report-letterhead-badge img { height: 33px; }
  .report-letterhead-text { padding-left: .75rem; }
  .report-letterhead-meta { margin-left: 0; text-align: left; width: 100%; flex-direction: row; gap: .9rem; }
  .result-hero { padding: 1.1rem 1rem; }
  .report-section-title, .result-grid, .result-actions-bar, .report-footer { padding-left: 1rem; padding-right: 1rem; }
}
@media print {
  .report-letterhead, .result-hero, .status-pill, .formula-card-result, .report-footer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .result-actions-bar { display: none !important; }
}
@media (max-width: 600px) {
  .report-letterhead-text { padding-left: 0; border-left: none; width: 100%; }
}
.formula-card-sub { font-size: .7rem; color: var(--gray-text); margin-top: .15rem; font-variant-numeric: tabular-nums; }

/* ── Encabezado del reporte: logo blanco integrado al azul (v2.5) ── */
.report-letterhead { align-items: center; gap: 1.1rem; padding: 1.25rem 1.5rem; }
.report-letterhead-brand { height: 44px; width: auto; display: block; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.report-letterhead-text { padding-left: 1.1rem; border-left: 1px solid rgba(255,255,255,.25); }
.report-letterhead-meta { align-self: center; }
#result-section.pdf-mode .report-letterhead-brand { filter: none; }

@media (max-width: 600px) {
  .report-letterhead {
    flex-direction: column; align-items: center; text-align: center;
    gap: .7rem; padding: 1.4rem 1rem 1.1rem;
  }
  .report-letterhead-brand { height: 40px; }
  .report-letterhead-text { padding-left: 0; border-left: none; width: auto; padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.2); }
  .report-letterhead-text strong { font-size: 1.05rem; }
  .report-letterhead-meta { margin: 0; width: auto; text-align: center; flex-direction: row; justify-content: center; flex-wrap: wrap; gap: .25rem .9rem; }
}
