/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --negro:         #0a0908;
  --negro-2:       #100f0d;
  --negro-3:       #161411;
  --negro-input:   #12110f;
  --dorado:        #c9a84c;
  --dorado-claro:  #e8c97a;
  --dorado-oscuro: #8f7633;
  --dorado-tenue:  rgba(201,168,76,0.10);
  --dorado-borde:  rgba(201,168,76,0.32);
  --linea:         rgba(201,168,76,0.16);
  --blanco:        #f5f0e8;
  --blanco-suave:  rgba(245,240,232,0.80);
  --gris:          rgba(245,240,232,0.60);
  --gris-2:        rgba(245,240,232,0.42);
  --gris-sutil:    rgba(245,240,232,0.09);
  --rojo:          #ec9494;
  --rojo-tenue:    rgba(224,112,112,0.10);
  --rojo-borde:    rgba(224,112,112,0.50);
  --verde:         #94d4b0;
  --verde-tenue:   rgba(126,200,160,0.09);
  --verde-borde:   rgba(126,200,160,0.45);
  --seg-1:         #e8c97a;
  --seg-2:         #b8933a;
  --seg-3:         #7d6a3c;
  --seg-1b:        #f4e2b4;
  --seg-2b:        #9a7b31;
  --seg-4:         #9a6150;
  --seg-5:         #4a4436;
  --radio:         3px;
  --sobre-dorado:  #0a0908;
  --fondo-barra:   rgba(10,9,8,0.86);
  --fondo-ticket:  linear-gradient(180deg, #151310, #0e0d0b);
  --fondo-foco:    #15130f;
  --grano:         0.05;
  --serif:         'Cormorant Garamond', Georgia, serif;
  --sans:          'DM Sans', system-ui, sans-serif;
}

:root[data-theme="claro"] {
  --negro:         #f6f1e7;
  --negro-2:       #fffdf9;
  --negro-3:       #efe7d8;
  --negro-input:   #ffffff;
  --dorado:        #a07a22;
  --dorado-claro:  #7f5d12;
  --dorado-oscuro: #c9a84c;
  --dorado-tenue:  rgba(160,122,34,0.09);
  --dorado-borde:  rgba(160,122,34,0.38);
  --linea:         rgba(70,52,20,0.15);
  --blanco:        #1e1a14;
  --blanco-suave:  rgba(30,26,20,0.84);
  --gris:          rgba(30,26,20,0.64);
  --gris-2:        rgba(30,26,20,0.48);
  --gris-sutil:    rgba(30,26,20,0.10);
  --rojo:          #b23c2c;
  --rojo-tenue:    rgba(178,60,44,0.07);
  --rojo-borde:    rgba(178,60,44,0.42);
  --verde:         #2c7a52;
  --verde-tenue:   rgba(44,122,82,0.07);
  --verde-borde:   rgba(44,122,82,0.40);
  --seg-1:         #c99a2e;
  --seg-1b:        #e8cf8c;
  --seg-2:         #9c7a2a;
  --seg-2b:        #b59248;
  --seg-3:         #6f5c32;
  --seg-4:         #a8604d;
  --seg-5:         #8a8170;
  --fondo-barra:   rgba(246,241,231,0.92);
  --fondo-ticket:  #fffdf9;
  --fondo-foco:    #ffffff;
  --grano:         0.025;
}
:root[data-theme="claro"] .brand img { filter: brightness(0.2); }
:root[data-theme="claro"] .ticket { box-shadow: 0 24px 60px rgba(70,52,20,0.14); }
:root[data-theme="claro"] .panel, :root[data-theme="claro"] .svc-card, :root[data-theme="claro"] .verdict { background: var(--negro-2); }
:root[data-theme="claro"] .btn-primary { box-shadow: 0 8px 22px rgba(160,122,34,0.22); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
.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;
}

body {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(201,168,76,0.09), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(201,168,76,0.05), transparent 60%),
    var(--negro);
  background-attachment: fixed;
  color: var(--blanco);
  font-family: var(--sans);
  font-weight: 300;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
/* Grano sutil, como papel de partitura antiguo */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: var(--grano);
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cormorant usa cifras de estilo antiguo («10» parece «IO»): en importes y
   cantidades usamos cifras alineadas. */
.input-wrap input, .num, .sum-big, .sc-price, .kv-row > span:last-child, .t-row span:last-child, .t-big,
.compo strong, .compo-legend b, .por-hora strong, .live strong, .rule-formula, .var-result, .desglose-total strong,
.cmp-table td, .var-fixed-val, details.more summary, .svc-tag b, .liberar-result strong, .informe {
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

/* ─── BARRA SUPERIOR ──────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--fondo-barra);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 32px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; cursor: pointer; color: var(--blanco);
  font-family: var(--serif); font-size: 20px; font-weight: 400; letter-spacing: 0.01em;
}
.brand img { height: 30px; width: auto; }
.brand em { font-style: italic; color: var(--dorado-claro); }
.top-actions { display: flex; align-items: center; gap: 10px; }
/* Marca centrada en la barra superior; en móvil, a la izquierda */
.topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.topbar-inner .brand-logo { grid-column: 1; justify-self: start; }
.topbar-inner .brand-title { grid-column: 2; }
.topbar-inner .top-actions { grid-column: 3; justify-self: end; }
@media (max-width: 700px) {
  .topbar-inner { display: flex; }
  .topbar-inner .brand-title { margin-right: auto; }
}
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--dorado-borde); background: var(--dorado-tenue); color: var(--dorado);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-toggle:hover { border-color: var(--dorado); }
.ctx-chip {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dorado); background: var(--dorado-tenue);
  border: 1px solid var(--dorado-borde); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.ctx-chip:hover { color: var(--dorado-claro); border-color: var(--dorado); }

/* ─── ESTRUCTURA ──────────────────────────────────────── */
.shell {
  flex: 1;
  width: 100%; max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
  padding: 48px 32px 64px;
}
.shell.no-rail { grid-template-columns: minmax(0, 1fr); }
.stage { min-width: 0; max-width: 760px; width: 100%; }
.shell.no-rail .stage { max-width: none; }

/* ─── PASOS ───────────────────────────────────────────── */
.rail { position: sticky; top: 104px; align-self: start; }
.stepper { list-style: none; position: relative; }
.stepper li { position: relative; padding-bottom: 26px; }
.stepper li:last-child { padding-bottom: 0; }
.stepper li:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 36px; bottom: 4px; width: 1px;
  background: linear-gradient(var(--linea), var(--linea));
}
.stepper li.done:not(:last-child)::after { background: var(--dorado-borde); }
.stepper button {
  display: flex; gap: 14px; align-items: flex-start; width: 100%;
  background: none; border: 0; color: inherit; text-align: left; font: inherit;
  cursor: pointer; padding: 2px 0;
}
.stepper button:disabled { cursor: default; }
.st-num {
  flex-shrink: 0;
  width: 33px; height: 33px; border-radius: 50%;
  border: 1px solid var(--linea);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1; color: var(--gris);
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--negro);
  transition: all .25s;
}
.st-txt { display: flex; flex-direction: column; gap: 3px; padding-top: 6px; min-width: 0; }
.st-txt b { font-weight: 400; font-size: 14px; color: var(--gris); letter-spacing: 0.01em; }
.st-txt small { font-size: 12px; color: var(--gris-2); line-height: 1.45; overflow-wrap: anywhere; }
.stepper li.done .st-num { border-color: var(--dorado-borde); color: var(--dorado); }
.stepper li.done .st-num::before { content: "✓"; font-style: normal; font-family: var(--sans); font-size: 13px; }
.stepper li.done .st-num { font-size: 0; }
.stepper li.done .st-num::before { font-size: 13px; }
.stepper li.done .st-txt b { color: var(--blanco-suave); }
.stepper li.current .st-num {
  background: var(--dorado); border-color: var(--dorado); color: var(--sobre-dorado); font-size: 13px;
  box-shadow: 0 0 0 5px rgba(201,168,76,0.12);
}
.stepper li.current .st-num::before { content: none; }
.stepper li.current .st-txt b { color: var(--blanco); font-weight: 500; }
.stepper li.current .st-txt small { color: var(--gris); }
.stepper button:not(:disabled):hover .st-txt b { color: var(--dorado-claro); }
.rail-note {
  margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--linea);
  font-size: 12px; line-height: 1.6; color: var(--gris-2);
}

/* ─── PANTALLAS ───────────────────────────────────────── */
.screen { display: none; animation: fadeUp 0.45s ease both; }
.screen.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ─── TIPOGRAFÍA ──────────────────────────────────────── */
.eyebrow {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--dorado); margin-bottom: 14px;
}
.headline { font-family: var(--serif); font-weight: 300; line-height: 1.04; letter-spacing: -0.015em; color: var(--blanco); }
.headline:focus { outline: none; }
.h1 { font-size: clamp(52px, 8vw, 92px); margin-bottom: 22px; }
.h2 { font-size: clamp(38px, 6vw, 58px); margin-bottom: 18px; }
em { font-style: italic; color: var(--dorado-claro); }
.lead { font-size: 17px; color: var(--blanco-suave); line-height: 1.65; margin-bottom: 28px; max-width: 60ch; }
.note { font-size: 13px; color: var(--gris); line-height: 1.6; margin-top: 12px; }
.help { font-size: 13.5px; color: var(--gris); line-height: 1.6; margin-bottom: 14px; }
strong { font-weight: 500; }

/* Pentagrama decorativo */
.staff {
  height: 33px; margin: 4px 0 26px; max-width: 420px; position: relative;
  background: repeating-linear-gradient(to bottom, var(--dorado-borde) 0 1px, transparent 1px 8px);
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
          mask-image: linear-gradient(to right, #000 55%, transparent);
}
.staff::after {
  content: ""; position: absolute; left: 30%; top: 9px;
  width: 13px; height: 10px; border-radius: 50%;
  background: var(--dorado-claro);
  transform: rotate(-22deg);
  box-shadow: 0 0 12px rgba(232,201,122,0.6);
}

/* ─── PORTADA ─────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; padding-top: 12px; }
.intro-list { list-style: none; display: grid; gap: 12px; margin: 0 0 30px; }
.intro-list li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--blanco-suave); }
.intro-list span {
  font-family: var(--sans); font-size: 13px; font-weight: 500; line-height: 1; color: var(--dorado);
  font-variant-numeric: lining-nums tabular-nums;
  width: 30px; height: 30px; border: 1px solid var(--dorado-borde); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-hero { max-width: 340px; }
.resume-box {
  padding: 18px; border: 1px solid var(--dorado-borde); background: var(--dorado-tenue);
  border-radius: var(--radio); margin-bottom: 8px; font-size: 14px; color: var(--blanco-suave);
}
.resume-box p { margin-bottom: 6px; }

.ticket {
  position: relative;
  background: var(--fondo-ticket);
  border: 1px solid var(--dorado-borde);
  border-radius: var(--radio);
  padding: 30px 28px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(232,201,122,0.08);
  transform: rotate(1.2deg);
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; left: 22px; right: 22px; height: 1px;
  background: repeating-linear-gradient(to right, var(--dorado-borde) 0 6px, transparent 6px 11px);
}
.ticket::before { top: 12px; }
.ticket::after { bottom: 12px; }
.ticket-tag { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--dorado); margin-bottom: 18px; }
.t-row {
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--linea);
  font-size: 14px; color: var(--blanco-suave);
}
.t-row span:last-child { font-family: var(--serif); font-size: 21px; color: var(--blanco); white-space: nowrap; }
.t-total span:first-child { color: var(--dorado); }
.t-total span:last-child { color: var(--dorado-claro); font-style: italic; }
.t-big {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 76px; line-height: 1; color: var(--dorado-claro); margin: 22px 0 6px;
}
.t-big small { font-family: var(--sans); font-style: normal; font-size: 14px; color: var(--gris); letter-spacing: 0.04em; }
.t-foot { font-size: 13px; color: var(--gris); line-height: 1.55; }

/* ─── PANELES ─────────────────────────────────────────── */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008));
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 28px 28px 10px;
  margin-bottom: 18px;
}
.panel-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15;
  margin-bottom: 18px;
}
.panel-num {
  font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.1em;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--dorado-borde); color: var(--dorado); flex-shrink: 0;
}
.panel-title + .help { margin-top: -8px; }

fieldset.group { border: 0; margin-bottom: 26px; min-width: 0; }
.group-label {
  font-size: 15px; font-weight: 500; color: var(--blanco); margin-bottom: 4px; padding: 0;
}
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input, .currency-grid input, .segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-body {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 20px 18px;
  border: 1px solid var(--linea); background: var(--negro-2);
  border-radius: var(--radio);
  transition: border-color .2s, background .2s, transform .2s;
}
.choice-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--dorado); stroke-width: 1.4; }
.choice-icon svg circle { fill: var(--dorado); stroke: none; }
.choice-icon svg circle.hollow { fill: none; stroke: var(--dorado); }
.choice-title { font-family: var(--serif); font-size: 25px; line-height: 1.1; color: var(--blanco); }
.choice-desc { font-size: 13px; color: var(--gris); line-height: 1.5; }
.choice:hover .choice-body { border-color: var(--dorado-borde); transform: translateY(-1px); }
.choice input:checked + .choice-body { border-color: var(--dorado); background: rgba(201,168,76,0.08); box-shadow: inset 0 0 0 1px var(--dorado); }
.choice input:checked + .choice-body .choice-title { color: var(--dorado-claro); }
.choice input:focus-visible + .choice-body,
.currency-grid input:focus-visible + span,
.segmented input:focus-visible + span { outline: 2px solid var(--dorado-claro); outline-offset: 3px; }

.currency-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.currency-grid label { position: relative; cursor: pointer; display: block; }
.currency-grid span {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--gris-sutil); background: var(--negro-2);
  font-size: 14px; color: var(--blanco-suave); border-radius: var(--radio);
  transition: border-color .2s;
}
.currency-grid b { font-weight: 500; letter-spacing: 0.12em; color: var(--dorado); font-size: 12px; }
.currency-grid label:hover span { border-color: var(--dorado-borde); }
.currency-grid input:checked + span { border-color: var(--dorado); background: rgba(201,168,76,0.08); color: var(--blanco); }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px;
  border: 1px solid var(--linea); border-radius: 999px; background: var(--negro-2);
  margin: 0 0 20px; max-width: 420px;
}
.segmented label { position: relative; cursor: pointer; }
.segmented span {
  display: block; text-align: center; padding: 10px 12px; border-radius: 999px;
  font-size: 13px; color: var(--gris); transition: background .2s, color .2s;
}
.segmented input:checked + span { background: var(--dorado); color: var(--sobre-dorado); font-weight: 500; }

/* ─── CAMPOS ──────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-2 .field, .grid-3 .field { display: flex; flex-direction: column; }
.grid-2 .input-wrap, .grid-3 .input-wrap { margin-top: auto; }
.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 15px; font-weight: 500; color: var(--blanco); margin-bottom: 4px; line-height: 1.35; }
.field .help { margin-bottom: 9px; font-size: 13px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .unit {
  position: absolute; right: 14px;
  font-size: 11px; letter-spacing: 0.14em; color: var(--dorado); pointer-events: none;
}
.input-wrap input {
  width: 100%;
  background: var(--negro-input);
  border: 1px solid var(--dorado-borde);
  color: var(--blanco);
  font-family: var(--serif); font-size: 24px; font-weight: 400;
  padding: 11px 64px 11px 16px;
  border-radius: var(--radio);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background .2s;
}
.input-wrap input:hover { border-color: rgba(201,168,76,0.5); }
.input-wrap input:focus { border-color: var(--dorado); box-shadow: 0 0 0 3px rgba(201,168,76,0.14); background: var(--fondo-foco); }
.input-wrap input::placeholder { color: rgba(245,240,232,0.3); font-style: italic; font-size: 19px; }
.input-wrap input.text-input { font-family: var(--sans); font-size: 16px; padding-right: 14px; }
.input-wrap input.text-input::placeholder { font-size: 14px; }
.field.invalid .input-wrap input { border-color: var(--rojo-borde); }
.field-error { font-size: 13px; color: var(--rojo); margin-top: 6px; line-height: 1.45; }
.field-error:empty { display: none; }
.field-echo { font-size: 12px; color: var(--dorado); margin-top: 5px; }
.field-echo:empty { display: none; }

button:focus-visible, a:focus-visible, .input-wrap input:focus-visible { outline: 2px solid var(--dorado-claro); outline-offset: 3px; }

.desglose { padding: 18px 18px 4px; background: var(--negro-2); border-left: 2px solid var(--dorado); margin-bottom: 16px; border-radius: 0 var(--radio) var(--radio) 0; }
.desglose .input-wrap input { font-size: 20px; }
.desglose-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--blanco-suave); padding: 4px 0 14px; }
.desglose-total strong { font-family: var(--serif); font-style: italic; font-size: 24px; font-weight: 400; color: var(--dorado-claro); }

/* Asistente de horas */
.helper-toggle { margin: -6px 0 18px; }
.helper {
  border: 1px dashed var(--dorado-borde); border-radius: var(--radio);
  padding: 18px 18px 6px; margin-bottom: 18px; background: rgba(201,168,76,0.035);
}
.helper-intro { font-size: 13.5px; color: var(--blanco-suave); line-height: 1.6; margin-bottom: 16px; }
.helper .input-wrap input { font-size: 20px; padding-right: 54px; }
.helper-result { font-size: 14px; color: var(--blanco-suave); line-height: 1.6; padding: 0 0 14px; }
.helper-result:empty { display: none; }
.helper-result strong { font-family: var(--serif); font-style: italic; font-size: 22px; font-weight: 400; color: var(--dorado-claro); }
.helper-result .btn-small { margin-left: 8px; }

/* ─── AVISOS Y RESÚMENES ──────────────────────────────── */
.info-box, .copy-box {
  padding: 14px 16px; border-left: 2px solid var(--dorado-borde); background: var(--negro-2);
  font-size: 13.5px; line-height: 1.6; color: var(--blanco-suave); margin-bottom: 20px;
  border-radius: 0 var(--radio) var(--radio) 0;
}
.info-box strong { color: var(--blanco); }
.notice {
  padding: 14px 16px; border: 1px solid var(--dorado); background: var(--dorado-tenue);
  font-size: 14px; line-height: 1.55; color: var(--blanco); margin: 0 0 20px; border-radius: var(--radio);
}
.notice .btn-link { margin-top: 6px; }
.btn-link {
  background: none; border: 0; padding: 0; font-family: var(--sans); font-size: 13.5px;
  color: var(--dorado-claro); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--dorado-borde); cursor: pointer; display: inline-block;
}
.btn-link:hover { text-decoration-color: var(--dorado-claro); }

/* Composición mensual (ganar · costes · invertir · ahorrar) */
.compo { border-top: 1px solid var(--linea); padding: 20px 0 18px; margin-top: 4px; }
.compo-title { font-size: 15px; color: var(--blanco-suave); line-height: 1.5; }
.compo-title strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 30px; color: var(--dorado-claro); display: block; line-height: 1.15; }
.compo-sub { font-size: 13px; color: var(--gris); margin: 4px 0 14px; line-height: 1.55; }
.compo-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--gris-sutil); gap: 2px; }
.compo-bar span { display: block; height: 100%; min-width: 3px; }
.seg-1 { background: var(--seg-1); }
.seg-2 { background: var(--seg-2); }
.seg-3 { background: var(--seg-3); }
.seg-4 { background: var(--seg-4); }
.seg-2b { background: var(--seg-2b); }
.seg-1b { background: var(--seg-1b); }
.seg-5 { background: var(--seg-5); }
.compo-legend { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin-top: 14px; }
.compo-legend li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--blanco-suave); }
.compo-legend i { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; transform: translateY(1px); }
.compo-legend b { margin-left: auto; font-weight: 500; color: var(--blanco); white-space: nowrap; }
.compo-legend small { display: block; color: var(--gris-2); font-size: 11.5px; }

.por-hora {
  border-top: 1px solid var(--linea); padding: 18px 0 20px;
  font-size: 14px; line-height: 1.65; color: var(--blanco-suave);
}
.por-hora strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 28px; color: var(--dorado-claro); }
.por-hora .muted { display: block; font-size: 12.5px; color: var(--gris); margin-top: 6px; }

.live {
  padding: 18px 20px; background: var(--dorado-tenue); border: 1px solid var(--dorado-borde);
  border-radius: var(--radio); font-size: 14px; line-height: 1.75; color: var(--blanco-suave); margin: 4px 0 20px;
}
.live strong { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--dorado-claro); font-weight: 400; }
.live .muted { color: var(--gris); font-size: 13px; }

/* ─── BOTONES ─────────────────────────────────────────── */
.nav-buttons { display: flex; justify-content: space-between; gap: 12px; padding-top: 14px; }
.nav-buttons .btn-primary { width: auto; min-width: 260px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  width: 100%;
  background: linear-gradient(180deg, var(--dorado-claro), var(--dorado));
  color: var(--sobre-dorado); border: none;
  padding: 17px 26px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: var(--radio); cursor: pointer;
  box-shadow: 0 10px 30px rgba(201,168,76,0.18);
  transition: filter 0.2s, transform 0.1s, box-shadow .2s;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 34px rgba(201,168,76,0.28); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost {
  background: transparent; color: var(--blanco-suave);
  border: 1px solid var(--gris-sutil);
  padding: 15px 22px;
  font-family: var(--sans); font-size: 12px; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: var(--radio); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--dorado-borde); color: var(--blanco); }
.btn-small {
  background: var(--dorado); color: var(--sobre-dorado); border: 0; border-radius: 999px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  padding: 6px 14px; cursor: pointer;
}

/* ─── RESULTADOS ──────────────────────────────────────── */
.verdicts { display: grid; gap: 12px; margin: 10px 0 40px; }
.verdict {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: center;
  padding: 22px 24px; border: 1px solid var(--linea); border-radius: var(--radio);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008));
  position: relative; overflow: hidden;
}
.verdict::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dorado); }
.verdict .sum-q { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dorado); margin-bottom: 8px; }
.verdict .sum-text { font-size: 14px; color: var(--blanco-suave); line-height: 1.6; }
.verdict .sum-big {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(38px, 5vw, 54px); line-height: 1; color: var(--dorado-claro);
  text-align: right; white-space: nowrap;
}
.verdict .sum-big small { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: 0.06em; color: var(--gris); margin-top: 6px; }
.verdict.bad { border-color: var(--rojo-borde); background: var(--rojo-tenue); }
.verdict.bad::before { background: var(--rojo); }
.verdict.bad .sum-big { color: var(--rojo); }
.verdict.good { border-color: var(--verde-borde); background: var(--verde-tenue); }
.verdict.good::before { background: var(--verde); }
.verdict.good .sum-big { color: var(--verde); }
.meter { grid-column: 1 / -1; margin-top: 8px; }
.meter-track { position: relative; height: 8px; border-radius: 999px; background: var(--gris-sutil); overflow: hidden; }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--verde); }
.verdict.bad .meter-fill { background: var(--rojo); }
.meter-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--gris); margin-top: 7px; }

.r-section { margin-bottom: 44px; }
.r-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.r-head h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; }
.r-num { font-family: var(--serif); font-style: italic; color: var(--dorado); font-size: 22px; }
.r-intro { font-size: 14px; color: var(--gris); line-height: 1.6; margin-bottom: 16px; }

/* Regla de precio */
.rule {
  border: 1px solid var(--dorado-borde); border-radius: var(--radio);
  background: radial-gradient(500px 200px at 100% 0%, rgba(201,168,76,0.12), transparent 70%), var(--negro-2);
  padding: 24px; margin-bottom: 14px;
}
.rule-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dorado); margin-bottom: 10px; }
.rule-formula { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.25; color: var(--blanco); }
.rule-formula em { font-style: italic; }
.rule-formula .op { color: var(--dorado); padding: 0 4px; }
.rule-note { font-size: 13px; color: var(--gris); margin-top: 10px; line-height: 1.6; }

.variants { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.var-head, .var-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) 36px;
  gap: 10px; align-items: center; padding: 10px 14px;
}
.var-head { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gris); background: var(--negro-2); border-bottom: 1px solid var(--linea); }
.var-row { border-bottom: 1px solid var(--gris-sutil); }
.var-row:last-child { border-bottom: 0; }
.var-row .input-wrap input { font-size: 18px; padding: 8px 40px 8px 10px; }
.var-row .input-wrap input.text-input { padding-right: 10px; font-size: 16px; }
.var-row .input-wrap .unit { right: 10px; font-size: 10px; }
.var-row.fixed { background: rgba(201,168,76,0.05); }
.var-fixed-name { font-size: 14px; color: var(--blanco); }
.var-fixed-name small { display: block; font-size: 12px; color: var(--gris); }
.var-fixed-val { font-family: var(--serif); font-size: 19px; color: var(--blanco-suave); }
.var-result { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--dorado-claro); text-align: right; white-space: nowrap; }
.var-result small { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; color: var(--gris); white-space: normal; }
.var-result.muted { color: var(--gris-2); font-size: 16px; }
.var-del { background: none; border: 1px solid var(--gris-sutil); color: var(--gris); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.var-del:hover { border-color: var(--rojo-borde); color: var(--rojo); }
.var-add { margin-top: 12px; }
.var-cell-label { display: none; }

/* Escenarios */
.prueba-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.prueba-box label { font-size: 15px; font-weight: 500; }
.prueba-box .input-wrap { width: 220px; }
.prueba-box .input-wrap input { font-size: 22px; padding-top: 9px; padding-bottom: 9px; }
.cmp-table { width: 100%; border-collapse: collapse; border: 1px solid var(--linea); }
.cmp-table th, .cmp-table td { padding: 12px 14px; border-bottom: 1px solid var(--gris-sutil); text-align: right; font-size: 14px; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; color: var(--blanco-suave); }
.cmp-table thead th { vertical-align: bottom; background: var(--negro-2); border-bottom: 1px solid var(--linea); }
.cmp-table thead th small { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dorado); font-weight: 400; margin-bottom: 4px; }
.cmp-table thead th .sc-price { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; color: var(--blanco); white-space: nowrap; }
.cmp-table thead th .sc-diff { display: block; font-size: 11.5px; color: var(--gris); font-weight: 300; margin-top: 2px; }
.cmp-table td { font-family: var(--serif); font-size: 18px; color: var(--blanco); }
.cmp-table td:first-child { font-family: var(--sans); font-size: 13.5px; }
.cmp-table .col-min { background: rgba(201,168,76,0.06); }
.cmp-table thead th.col-min .sc-price { color: var(--dorado-claro); }
.cmp-table td.neg { color: var(--rojo); }
.badge {
  white-space: nowrap;
  display: inline-block; font-family: var(--sans); font-style: normal; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 4px 9px; border: 1px solid; border-radius: 999px;
}
.badge.ok { color: var(--verde); border-color: var(--verde-borde); }
.badge.no { color: var(--rojo); border-color: var(--rojo-borde); }
.badge.na { color: var(--gris); border-color: var(--gris-sutil); }

/* Listas de valores */
.kv { border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--gris-sutil); font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row > span:first-child { color: var(--blanco-suave); line-height: 1.45; }
.kv-row > span:first-child small { display: block; font-size: 12px; color: var(--gris); }
.kv-row > span:last-child { font-family: var(--serif); font-size: 20px; color: var(--blanco); white-space: nowrap; text-align: right; }
.kv-row.strong { background: rgba(201,168,76,0.06); }
.kv-row.strong > span:last-child { color: var(--dorado-claro); font-style: italic; font-size: 23px; }
.kv-row.sub > span:first-child { padding-left: 16px; font-size: 13px; color: var(--gris); }
.kv-row.sub > span:last-child { font-size: 17px; color: var(--blanco-suave); }
.kv-row.neg > span:last-child { color: var(--rojo); }
.kv-row.pos > span:last-child { color: var(--verde); }

.actions { list-style: none; counter-reset: a; display: grid; gap: 10px; }
.actions li {
  counter-increment: a; position: relative;
  padding: 16px 18px 16px 58px;
  background: var(--negro-2); border: 1px solid var(--linea); border-radius: var(--radio);
  font-size: 14.5px; line-height: 1.6; color: var(--blanco-suave);
}
.actions li::before {
  content: counter(a); position: absolute; left: 18px; top: 13px;
  font-family: var(--serif); font-style: italic; font-size: 28px; color: var(--dorado); line-height: 1;
}

details.more { border: 1px solid var(--linea); border-radius: var(--radio); margin-bottom: 12px; background: var(--negro-2); }
details.more summary {
  cursor: pointer; list-style: none; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 22px;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-family: var(--sans); color: var(--dorado); font-size: 20px; transition: transform .2s; }
details.more[open] summary::after { transform: rotate(45deg); }
details.more .more-body { padding: 0 18px 18px; }
details.more .r-edit { margin-top: 12px; }

.disclaimer {
  font-size: 13px; line-height: 1.7; color: var(--gris);
  padding: 18px 20px; border: 1px dashed var(--linea); border-radius: var(--radio); margin: 8px 0 28px;
}
.final-actions { display: grid; gap: 10px; }
.final-actions .btn-row > * { flex: 1; }
.print-help { font-size: 12px; color: var(--gris); text-align: center; margin: -2px 0 10px; }

.app-footer { text-align: center; padding: 40px 0 0; font-size: 12px; letter-spacing: 0.12em; }
.app-footer a { display: inline-block; opacity: 0.85; transition: opacity .2s; }
.app-footer a:hover { opacity: 1; }
.app-footer img { height: 34px; width: auto; display: block; }
:root[data-theme="claro"] .app-footer img { filter: brightness(0.2); }
.meta-box { margin-top: 18px; }
.meta-box .segmented { max-width: 460px; margin-bottom: 0; }

/* ─── SERVICIOS ───────────────────────────────────────── */
.choice-grid-4 { grid-template-columns: 1fr 1fr; }
.choice input[type="checkbox"] + .choice-body { position: relative; }
.choice input[type="checkbox"] + .choice-body::after {
  content: ""; position: absolute; top: 16px; right: 16px;
  width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--dorado-borde);
}
.choice input[type="checkbox"]:checked + .choice-body::after {
  content: "✓"; background: var(--dorado); color: var(--sobre-dorado); border-color: var(--dorado);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.svc-list { display: grid; gap: 16px; margin-bottom: 18px; }
.svc-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008));
  border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 22px 24px 8px;
}
.svc-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--dorado); border-radius: var(--radio) 0 0 var(--radio); }
.svc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.svc-tag {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dorado);
  display: inline-flex; align-items: center; gap: 8px;
}
.svc-tag b { font-family: var(--serif); font-style: italic; font-size: 18px; letter-spacing: 0; text-transform: none; color: var(--dorado-claro); font-weight: 400; }
.svc-tools { display: flex; gap: 6px; }
.btn-tool {
  background: none; border: 1px solid var(--gris-sutil); color: var(--gris);
  font-family: var(--sans); font-size: 12px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-tool:hover { border-color: var(--dorado-borde); color: var(--blanco); }
.btn-tool.danger:hover { border-color: var(--rojo-borde); color: var(--rojo); }
.svc-block-title { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gris); margin: 6px 0 12px; padding-top: 14px; border-top: 1px solid var(--gris-sutil); }
.svc-card .segmented { margin-bottom: 18px; }
.svc-live {
  margin: 4px -24px 0; padding: 14px 24px; border-top: 1px solid var(--linea);
  background: rgba(201,168,76,0.05); font-size: 13.5px; line-height: 1.65; color: var(--blanco-suave);
}
.svc-live strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px; color: var(--dorado-claro); }
.svc-live .bad { color: var(--rojo); }
.svc-live .good { color: var(--verde); }
.svc-live:empty { display: none; }

.add-svc { border: 1px dashed var(--dorado-borde); border-radius: var(--radio); padding: 16px 18px; margin-bottom: 18px; }
.add-svc-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dorado); margin-bottom: 10px; }
.add-svc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-chip {
  background: var(--negro-2); border: 1px solid var(--dorado-borde); color: var(--blanco);
  font-family: var(--sans); font-size: 13px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.btn-chip:hover { border-color: var(--dorado); background: rgba(201,168,76,0.08); }

/* Confirmación en la propia página (sin ventanas del navegador) */
.confirming { border-color: var(--rojo-borde) !important; color: var(--rojo) !important; background: var(--rojo-tenue) !important; }

/* Tablas de resultados */
.svc-table, .nivel-table { width: 100%; border-collapse: collapse; border: 1px solid var(--linea); }
.svc-table th, .nivel-table th { vertical-align: bottom; }
.svc-table td:first-child { min-width: 150px; }
.svc-table th, .svc-table td, .nivel-table th, .nivel-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--gris-sutil); text-align: right; font-size: 14px; vertical-align: middle;
}
.svc-table th, .nivel-table th { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); font-weight: 400; background: var(--negro-2); border-bottom: 1px solid var(--linea); }
.svc-table th:first-child, .svc-table td:first-child, .nivel-table th:first-child, .nivel-table td:first-child { text-align: left; }
.svc-table td, .nivel-table td { font-family: var(--serif); font-size: 19px; color: var(--blanco); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }
.svc-table td:first-child, .nivel-table td:first-child { font-family: var(--sans); font-size: 14px; color: var(--blanco-suave); }
.svc-table td small, .nivel-table td small { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--gris); }
.svc-table td.min { color: var(--dorado-claro); font-style: italic; }
.svc-table td.neg { color: var(--rojo); }
.nivel-table tr.base td { background: rgba(255,255,255,0.02); }
.nivel-table tr.hl td { background: rgba(201,168,76,0.06); }
.nivel-table td.pos { color: var(--verde); }
.nivel-table td.neg { color: var(--rojo); }

.liberar-box {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; padding: 18px; border: 1px solid var(--dorado-borde); border-radius: var(--radio);
  background: radial-gradient(400px 160px at 100% 0%, rgba(201,168,76,0.1), transparent 70%), var(--negro-2);
}
.liberar-box label { font-size: 15px; font-weight: 500; }
.liberar-box .input-wrap { width: 160px; }
.liberar-box .input-wrap input { font-size: 22px; padding-top: 8px; padding-bottom: 8px; }
.liberar-result { flex-basis: 100%; font-size: 14px; line-height: 1.7; color: var(--blanco-suave); }
.liberar-result:empty { display: none; }
.liberar-result strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; color: var(--dorado-claro); }
.liberar-result ul { list-style: none; margin-top: 6px; display: grid; gap: 2px; }
.liberar-result li::before { content: "→ "; color: var(--dorado); }

.bloque-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) 32px; gap: 0 10px; align-items: end; }
.bloque-row .field { margin-bottom: 14px; }
.bloque-x { font-family: var(--serif); font-size: 26px; color: var(--dorado); padding-bottom: 24px; }
.bloque-row .var-del { margin-bottom: 22px; }
.estim-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: -6px 0 14px; }
.estim { margin-top: 0; }
.estim .input-wrap input { font-size: 20px; }
.svc-live .muted { color: var(--gris); font-size: 12.5px; }
.periodo-panel { padding-bottom: 6px; }
.periodo-panel .segmented { margin-bottom: 18px; }
.liberar-box { display: block; }
.liberar-chips { margin: 8px 0 16px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span {
  display: inline-block; background: var(--negro); border: 1px solid var(--dorado-borde); color: var(--blanco-suave);
  font-size: 13px; padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s;
}
.chip-check input:checked + span { background: var(--dorado); color: var(--sobre-dorado); border-color: var(--dorado); font-weight: 500; }
.chip-check input:focus-visible + span { outline: 2px solid var(--dorado-claro); outline-offset: 3px; }
.liberar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.liberar-row label { font-size: 15px; font-weight: 500; }
.liberar-row .input-wrap { width: 170px; }
.liberar-result p { margin: 8px 0 2px; }
.liberar-result .muted { color: var(--gris); font-size: 13px; }
.estim-ejemplo {
  font-size: 13px; line-height: 1.6; color: var(--dorado-claro); font-style: italic;
  border-left: 2px solid var(--dorado-borde); padding: 2px 0 2px 12px; margin: -6px 0 16px;
}
.svc-table th small { display: block; text-transform: none; letter-spacing: 0; font-size: 10.5px; color: var(--gris-2); margin-top: 2px; }
.btn-ejemplo { display: block; margin: 14px 0 0; font-size: 14px; }
.resumen {
  border: 1px solid var(--dorado); border-radius: var(--radio); padding: 20px 22px; margin: 6px 0 14px;
  background: radial-gradient(500px 200px at 100% 0%, rgba(201,168,76,0.12), transparent 70%), var(--negro-2);
}
.resumen .sum-q { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dorado); margin-bottom: 10px; }
.resumen ul { list-style: none; display: grid; gap: 10px; }
.resumen li { position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.6; color: var(--blanco-suave); }
.resumen li::before { content: "♪"; position: absolute; left: 0; top: 0; color: var(--dorado); }
.resumen strong { color: var(--dorado-claro); font-weight: 500; }
.res-link { color: var(--dorado); font-size: 13px; white-space: nowrap; text-underline-offset: 3px; text-decoration-color: var(--dorado-borde); }
.ok-txt { color: var(--verde); }
.no-txt { color: var(--rojo); }
.r-section { scroll-margin-top: 150px; }
.compo-sum { grid-template-columns: 1fr !important; gap: 8px; }
.compo-total { border-top: 1px solid var(--dorado-borde); padding-top: 12px; margin-top: 4px; align-items: flex-start !important; }
.compo-total span { color: var(--blanco); font-weight: 500; }
.compo-total small { font-weight: 300; max-width: 52ch; }
.compo-total b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 26px; color: var(--dorado-claro); }
.rule-step { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--blanco-suave); margin-bottom: 10px; }
.rule-step .n {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--dorado-borde);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--dorado); margin-top: 1px;
}
.rule-step strong { color: var(--blanco); font-weight: 500; }
.rule-ej { font-size: 14px; line-height: 1.6; color: var(--dorado-claro); font-style: italic; border-left: 2px solid var(--dorado-borde); padding-left: 12px; margin: 4px 0 12px 36px; }
.rule-ej strong { font-style: normal; font-weight: 500; }
.tarifa-hora {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: center;
  padding: 16px 18px; margin: 0 0 16px; border-radius: var(--radio);
  background: var(--dorado-tenue); border: 1px solid var(--dorado-borde);
}
.tarifa-hora .big { font-family: var(--serif); font-style: italic; font-size: clamp(34px, 5vw, 46px); line-height: 1; color: var(--dorado-claro); white-space: nowrap; font-variant-numeric: lining-nums; }
.tarifa-hora .big small { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dorado); margin-top: 6px; }
.tarifa-hora .why { font-size: 14px; line-height: 1.6; color: var(--blanco-suave); }
.tarifa-hora .why b { color: var(--blanco); font-weight: 500; }
.iva-box { padding: 14px 16px; margin: 0 0 14px; border-radius: var(--radio); border: 1px dashed var(--rojo-borde); background: var(--rojo-tenue); font-size: 14px; line-height: 1.6; color: var(--blanco-suave); }
.iva-box strong { color: var(--rojo); font-weight: 500; }
.ganar-box { margin-top: 16px; padding: 18px; border: 1px solid var(--verde-borde); border-radius: var(--radio); background: var(--verde-tenue); }
.ganar-box .liberar-row label { font-size: 15px; font-weight: 500; }
.ganar-result { font-size: 14px; line-height: 1.7; color: var(--blanco-suave); }
.ganar-result:empty { display: none; }
.ganar-result ol { padding-left: 18px; margin-top: 6px; display: grid; gap: 6px; }
.ganar-result strong { color: var(--blanco); font-weight: 500; }
@media (max-width: 600px) {
  .tarifa-hora { grid-template-columns: minmax(0, 1fr); }
}
/* Puerta de acceso (comprar o entrar con código) */
.puerta { max-width: 420px; display: grid; gap: 10px; }
.puerta form, .puerta [data-paso="inicio"] { display: grid; gap: 10px; }
.puerta [hidden] { display: none !important; }
.puerta-precio { font-size: 15px; color: var(--blanco-suave); }
.puerta-precio strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 34px; color: var(--dorado-claro); margin-right: 6px; font-variant-numeric: lining-nums; }
.puerta-legal { font-size: 12px; line-height: 1.55; color: var(--gris); max-width: 46ch; }
.puerta-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.puerta-texto { font-size: 14px; line-height: 1.6; color: var(--blanco-suave); }
.puerta a.btn-primary { text-decoration: none; }
.codigo-input { letter-spacing: 0.4em; text-align: center; font-family: var(--sans) !important; font-size: 24px !important; padding-right: 16px !important; }
.puerta-cargando { font-size: 14px; color: var(--dorado); }
.prompt-card { padding: 18px 20px; border: 1px dashed var(--dorado-borde); border-radius: var(--radio); font-size: 14px; line-height: 1.6; color: var(--blanco-suave); }
.prompt-card .btn-link { margin-top: 8px; }

/* ─── ADAPTACIÓN ──────────────────────────────────────── */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 24px 56px; }
  .stage { max-width: 760px; margin: 0 auto; }
  /* Los pasos pasan a una barra fija bajo la cabecera */
  .rail {
    position: sticky; top: 55px; z-index: 50;
    margin: 0 -24px 28px; padding: 12px 24px 12px;
    background: var(--fondo-barra); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--linea);
  }
  .stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .stepper li { padding: 0; }
  .stepper li::after { display: none; }
  .stepper button { flex-direction: column; gap: 7px; align-items: stretch; }
  .st-num {
    width: 100%; height: 3px; border-radius: 3px; border: 0; background: var(--gris-sutil);
    font-size: 0 !important; box-shadow: none !important;
  }
  .st-num::before { content: none !important; }
  .stepper li.done .st-num { background: var(--dorado-oscuro); }
  .stepper li.current .st-num { background: var(--dorado); }
  .st-txt { padding: 0; }
  .st-txt b { font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .st-txt small { display: none; }
  .rail-note { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 32px; }
  .ticket { transform: none; max-width: 440px; }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 10px 16px; }
  .brand { font-size: 16px; gap: 10px; white-space: nowrap; }
  .top-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--dorado-borde); background: var(--dorado-tenue); color: var(--dorado);
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-toggle:hover { border-color: var(--dorado); }
.ctx-chip { font-size: 10px; letter-spacing: 0.1em; padding: 6px 10px; }
  .brand img { height: 26px; }
  .shell { padding: 0 16px 48px; }
  .rail { margin: 0 -16px 24px; padding: 10px 16px; top: 49px; }
  .st-txt b { font-size: 10px; }
  .stepper li:not(.current) .st-txt b { color: var(--gris-2); }
  .panel { padding: 22px 18px 6px; }
  .panel-title { font-size: 23px; }
  .choice-grid, .grid-3, .choice-grid-4 { grid-template-columns: 1fr; }
  .svc-card { padding: 18px 16px 6px; }
  .svc-live { margin: 4px -16px 0; padding: 12px 16px; }
  .svc-tools .btn-tool span { display: none; }
  .svc-table thead { display: none; }
  .svc-table, .svc-table tbody, .svc-table tr, .svc-table td { display: block; width: 100%; }
  .svc-table tr { border-bottom: 1px solid var(--linea); padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .svc-table td { border: 0; padding: 0; text-align: left !important; }
  .svc-table td:first-child { grid-column: 1 / -1; }
  .svc-table td[data-label]::before { content: attr(data-label); display: block; font-family: var(--sans); font-style: normal; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gris); margin-bottom: 2px; }
  .nivel-table th, .nivel-table td { padding: 9px 6px; font-size: 11px; }
  .nivel-table td { font-size: 15px; }
  .nivel-table td:first-child { font-size: 12.5px; }
  .nivel-table td small.brk { display: none; }
  .lead { font-size: 16px; }
  .nav-buttons { flex-direction: column-reverse; }
  .nav-buttons .btn-primary, .nav-buttons .btn-ghost { width: 100%; min-width: 0; }
  .compo-legend { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; }
  .verdict .sum-big { text-align: left; order: -1; white-space: normal; }
  .verdict .sum-big small { display: inline; margin-left: 6px; }
  .kv-row { padding: 11px 13px; }
  .kv-row > span:last-child { font-size: 18px; white-space: normal; }
  .r-head h3 { font-size: 27px; }
  .t-big { font-size: 60px; }
  /* Tipos de servicio: cada fila se convierte en una ficha */
  .var-head { display: none; }
  .var-row { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; position: relative; }
  .var-row > :first-child { grid-column: 1 / -1; padding-right: 40px; }
  .var-row .var-result { grid-column: 1 / -1; text-align: left; border-top: 1px dashed var(--linea); padding-top: 10px; }
  .var-row .var-del { position: absolute; top: 14px; right: 14px; }
  .var-cell-label { display: block; font-size: 11px; color: var(--gris); margin-bottom: 4px; letter-spacing: 0.06em; }
  .cmp-table th, .cmp-table td { padding: 10px 8px; font-size: 13px; }
  .cmp-table td { font-size: 16px; }
  .cmp-table td:first-child { font-size: 12px; }
  .cmp-table thead th .sc-price { font-size: 19px; white-space: normal; }
  .cmp-table thead th small { font-size: 9.5px; letter-spacing: 0.08em; }
  .cmp-table thead th .sc-diff { display: none; }
  .prueba-box .input-wrap { width: 100%; }
}
/* En móvil, los enlaces de texto tienen más zona para el dedo */
@media (max-width: 600px) {
  .btn-link, .res-link { display: inline-block; padding: 7px 0; }
}
@media (max-width: 380px) {
  .brand span { font-size: 15px; }
  .currency-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screen { animation: none; }
  .choice:hover .choice-body { transform: none; }
}

/* ─── INFORME (IMPRESIÓN / PDF) ───────────────────────── */
.informe { display: none; }

@media print {
  /* Margen de página 0: el navegador no añade fecha, título ni dirección.
     El margen real lo pone .informe y se repite en cada página (clone). */
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; color: #1a1a1a; min-height: 0; }
  body::before { display: none; }
  /* Solo el informe: fuera la app y cualquier cosa que inyecten extensiones */
  body > *:not(.informe) { display: none !important; }
  .informe { display: block; padding: 16mm 14mm; box-decoration-break: clone; -webkit-box-decoration-break: clone; font-family: 'DM Sans', Arial, sans-serif; font-size: 10.5pt; line-height: 1.45; color: #1a1a1a; }
  .informe * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .inf-head { border-bottom: 2px solid #b0913d; padding-bottom: 8pt; margin-bottom: 12pt; }
  .inf-head h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-size: 24pt; line-height: 1.1; }
  .inf-head h1 em { color: #8a6f22; }
  .inf-meta { display: flex; flex-wrap: wrap; gap: 4pt 18pt; font-size: 9.5pt; color: #555; margin-top: 4pt; }
  .inf-meta b { color: #1a1a1a; font-weight: 500; }
  .informe h2 {
    font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 14pt;
    color: #1a1a1a; margin: 14pt 0 5pt; border-bottom: 0.5pt solid #ccc; padding-bottom: 2pt; break-after: avoid;
  }
  .informe section { break-inside: avoid; }
  .informe table { width: 100%; border-collapse: collapse; }
  .informe td, .informe th { padding: 3.5pt 6pt; border-bottom: 0.5pt solid #e2e2e2; text-align: left; vertical-align: top; }
  .informe td:last-child, .informe th:not(:first-child) { text-align: right; white-space: nowrap; }
  .informe .sc-table td:not(:first-child) { text-align: right; white-space: nowrap; }
  .informe th { font-weight: 500; font-size: 9pt; color: #555; background: #f5f1e6; }
  .informe tr.strong td { font-weight: 500; background: #faf7ef; }
  .informe .inf-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8pt; margin-bottom: 4pt; }
  .informe .inf-box { border: 0.75pt solid #c9b680; padding: 7pt; }
  .informe .inf-box p:first-child { font-size: 8pt; text-transform: uppercase; letter-spacing: 0.08em; color: #8a6f22; }
  .informe .inf-box p.big { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16pt; margin: 2pt 0; }
  .informe .inf-box p.small, .informe .inf-small { font-size: 8.5pt; color: #444; }
  .informe .inf-tarifa { display: grid; grid-template-columns: auto 1fr; gap: 6pt 14pt; align-items: center; border: 1pt solid #b0913d; background: #faf5e6; padding: 9pt 11pt; margin-bottom: 8pt; }
  .informe .inf-tarifa .big { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 26pt; line-height: 1; color: #7f5d12; }
  .informe .inf-tarifa .big small { display: block; font-family: 'DM Sans', Arial, sans-serif; font-style: normal; font-size: 7.5pt; letter-spacing: 0.1em; text-transform: uppercase; color: #8a6f22; margin-top: 3pt; }
  .informe .inf-tarifa p { font-size: 9.5pt; margin: 2pt 0; }
  .informe .inf-rule { border: 0.75pt solid #c9b680; background: #faf7ef; padding: 7pt 9pt; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 13pt; margin-bottom: 6pt; }
  .informe ol { padding-left: 16pt; }
  .informe ol li { margin-bottom: 4pt; }
  .informe .inf-note { margin-top: 14pt; font-size: 8.5pt; color: #555; border-top: 0.5pt solid #ccc; padding-top: 6pt; }
  /* Aire entre apartados: cada bloque de color se separa de lo anterior */
  .informe section { margin-bottom: 16pt; }
  .informe h2 { margin: 22pt 0 9pt; padding-bottom: 4pt; }
  .informe section:first-of-type h2 { margin-top: 6pt; }
  .informe .inf-summary { margin: 8pt 0 6pt; gap: 10pt; }
  .informe .inf-box { padding: 9pt 10pt; }
  .informe .inf-tarifa { margin: 10pt 0 12pt; padding: 11pt 13pt; }
  .informe .inf-rule { margin: 8pt 0 10pt; }
  .informe table { margin: 6pt 0 8pt; }
  .informe .inf-small { margin-top: 8pt; line-height: 1.5; }
  .informe ol { margin-top: 6pt; }
  .informe .inf-note { margin-top: 22pt; padding-top: 10pt; }
  .informe .inf-precios td:first-child { width: 26%; }
  /* El nombre del servicio destaca sobre su desglose */
  .informe .inf-precios td:first-child { font-size: 11pt; font-weight: 600; color: #1a1a1a; }
  .informe .inf-precios td:first-child small { display: block; font-size: 8pt; font-weight: 400; color: #777; margin-top: 2pt; }
  .informe .inf-precios td small { font-size: 7.5pt; color: #777; }
  .informe h3.inf-svc { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 13pt; font-weight: 600; color: #1a1a1a; margin: 14pt 0 3pt; break-after: avoid; }
  .informe h3.inf-svc small { font-family: 'DM Sans', Arial, sans-serif; font-size: 8pt; font-weight: 400; color: #777; margin-left: 6pt; }
  .informe .inf-precios td:nth-child(2), .informe .inf-precios th:nth-child(2) { white-space: normal; text-align: left; font-size: 9pt; color: #444; }
}
