/* Páginas públicas (research 162/163) — estructura común; tema.css define los tokens --d-* y su composición.
   Breakpoints canónicos del proyecto: 1024 / 768 / 480. */

:root {
    --d-bg: #fff; --d-bg2: #f4f5f8; --d-surface: #fff; --d-ink: #101828; --d-soft: #5b6475; --d-line: #dde1ea;
    --d-accent: #101828; --d-accent-ink: #fff; --d-link: #3a4bc4; --d-sun: #ffd21f; --d-danger: #b42318; --d-ok: #067647;
    --d-radius: 12px; --d-radius-lg: 20px;
    --d-font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --d-font-display: var(--d-font); --d-display-weight: 600; --d-display-track: -0.02em;
    --d-hdr-h: 68px; --d-gutter: 24px; --d-max: 1160px;
    --d-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    --d-link-a22: rgba(58, 75, 196, 0.22); --d-link-a12: rgba(58, 75, 196, 0.12); --d-link-a14: rgba(58, 75, 196, 0.14); --d-link-a45: rgba(58, 75, 196, 0.45); --d-link-a0: rgba(58, 75, 196, 0);
    --d-ink-a7: rgba(16, 24, 40, 0.07); --d-ink-a8: rgba(16, 24, 40, 0.08); --d-sun-a22: rgba(255, 210, 31, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.d-sin-scroll { overflow: hidden; }
.d-body { margin: 0; font-family: var(--d-font); font-size: 1rem; line-height: 1.6; color: var(--d-ink); background: var(--d-bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.d-body img { max-width: 100%; display: block; }
.d-body a { color: var(--d-link); }
.d-body [hidden] { display: none !important; }
.d-body :focus-visible { outline: 2px solid var(--d-link); outline-offset: 3px; border-radius: 4px; }
.d-i { flex: none; }
.d-wrap { width: 100%; max-width: var(--d-max); margin: 0 auto; padding-left: var(--d-gutter); padding-right: var(--d-gutter); }
.d-wrap-prosa { max-width: 820px; }
#inicio, #calculadora, #como-funciona, #sistemas, #por-que-solar, #faq, #contacto { scroll-margin-top: calc(var(--d-hdr-h) + 12px); }

/* ── Encabezado ─────────────────────────────────────────────────────────────── */
.d-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--d-hdr-h); background: var(--d-hdr-bg, rgba(255, 255, 255, .86)); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.d-header.is-scrolled { border-bottom-color: var(--d-line); }
.d-header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.d-logo { display: inline-flex; line-height: 0; }
.d-nav { display: flex; align-items: center; gap: 28px; }
.d-nav a { color: var(--d-ink); text-decoration: none; font-size: .95rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.d-nav a:hover { color: var(--d-link); }
.d-nav .d-btn { color: var(--d-accent-ink); }
.d-nav .d-nav-sec { color: var(--d-soft); }
.d-menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--d-ink); cursor: pointer; align-items: center; justify-content: center; border-radius: 10px; }
.d-menu-ico { display: inline-flex; }
.d-menu-cerrar { display: none; }
.d-header.is-open .d-menu-abrir { display: none; }
.d-header.is-open .d-menu-cerrar { display: inline-flex; }

/* ── Botones ────────────────────────────────────────────────────────────────── */
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--d-accent); color: var(--d-accent-ink); font: 600 1rem/1 var(--d-font); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, opacity .2s; }
.d-body a.d-btn { color: var(--d-accent-ink); }
.d-body a.d-btn-ghost { color: var(--d-ink); }
.d-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 24, 40, .18); }
.d-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.d-btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.d-btn-ghost { background: transparent; color: var(--d-ink); box-shadow: inset 0 0 0 1.5px var(--d-line); }
.d-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── Secciones genéricas ────────────────────────────────────────────────────── */
.d-sec { padding: clamp(64px, 9vw, 128px) 0; }
.d-sec-alt { background: var(--d-bg2); }
.d-titulo { font-family: var(--d-font-display); font-weight: var(--d-display-weight); letter-spacing: var(--d-display-track); line-height: 1.08; font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 0 0 18px; text-wrap: balance; }
.d-lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--d-soft); max-width: 62ch; margin: 0; }

/* ── Campos ─────────────────────────────────────────────────────────────────── */
.d-campos { display: grid; gap: 14px; }
.d-campo { position: relative; display: block; border: 0; padding: 0; margin: 0; min-width: 0; }
.d-campo > label, .d-campo > legend { display: flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: var(--d-soft); margin-bottom: 6px; padding: 0; }
.d-body select, .d-body .d-flot input, .d-body .d-flot textarea { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-surface); color: var(--d-ink); font: 500 1rem var(--d-font); appearance: none; -webkit-appearance: none; transition: border-color .2s, box-shadow .2s; }
.d-body select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px; text-overflow: ellipsis; }
.d-body select:disabled { opacity: .6; }
.d-body select:focus, .d-body .d-flot input:focus, .d-body .d-flot textarea:focus { outline: none; border-color: var(--d-link); box-shadow: 0 0 0 3px var(--d-link-a22); }
.d-ayuda { margin: 6px 2px 0; min-height: 1.2em; font-size: .85rem; color: var(--d-soft); }
.d-btn-calc { width: 100%; min-height: 54px; }

.d-flot input, .d-flot textarea { padding-top: 20px; }
.d-flot textarea { padding-top: 24px; min-height: 104px; resize: vertical; line-height: 1.45; }
.d-flot > label { position: absolute; left: 17px; top: 16px; margin: 0; font-size: 1rem; font-weight: 500; color: var(--d-soft); pointer-events: none; transition: all .15s; max-width: calc(100% - 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-flot input:focus + label, .d-flot input:not(:placeholder-shown) + label, .d-flot textarea:focus + label, .d-flot textarea:not(:placeholder-shown) + label { top: 7px; font-size: .74rem; font-weight: 600; }
.d-error { display: block; margin-top: 6px; font-size: .85rem; color: var(--d-danger); }

.d-afinar { margin-top: 14px; border-top: 1px solid var(--d-line); }
.d-afinar > summary { list-style: none; cursor: pointer; padding: 14px 0; min-height: 48px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-weight: 600; font-size: .95rem; }
.d-afinar > summary::-webkit-details-marker { display: none; }
.d-afinar > summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--d-soft); }
.d-afinar[open] > summary::after { content: '–'; }
.d-afinar > summary span { font-weight: 400; color: var(--d-soft); font-size: .85rem; }
.d-afinar-cuerpo { display: grid; gap: 14px; padding-bottom: 6px; }
.d-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.d-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 12px; border: 1.5px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-surface); color: var(--d-ink); font: 600 .95rem var(--d-font); cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.d-chip small { font-weight: 400; font-size: .75rem; color: var(--d-soft); }
.d-chip.is-on { border-color: var(--d-ink); box-shadow: inset 0 0 0 1px var(--d-ink); }

/* ── Resultado ──────────────────────────────────────────────────────────────── */
.d-res-idle-t { font-weight: 600; margin: 0 0 6px; }
.d-res-idle-s { margin: 0; color: var(--d-soft); font-size: .95rem; max-width: 46ch; }
.d-res-cargando { display: flex; align-items: center; gap: 14px; min-height: 120px; color: var(--d-soft); }
.d-res-cargando p { margin: 0; }
.d-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--d-line); border-top-color: var(--d-ink); animation: d-gira .8s linear infinite; }
@keyframes d-gira { to { transform: rotate(360deg); } }
.d-res-tipo { margin: 0 0 14px; font-size: .88rem; color: var(--d-soft); font-weight: 600; }
.d-res-etq { margin: 0; color: var(--d-soft); font-size: .95rem; }
.d-res-big { margin: 2px 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-family: var(--d-font-display); font-weight: var(--d-display-weight); font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; letter-spacing: var(--d-display-track); }
.d-res-big small { font: 600 1rem var(--d-font); letter-spacing: 0; color: var(--d-ok); }
.d-res-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0 0 20px; }
.d-res-datos div { border-top: 1px solid var(--d-line); padding-top: 10px; }
.d-res-datos dt { font-size: .8rem; color: var(--d-soft); display: flex; align-items: center; gap: 6px; }
.d-res-datos dd { margin: 2px 0 0; font-weight: 600; font-size: 1.05rem; }
.d-btn-res { width: 100%; }
.d-res-nota { margin: 14px 0 0; font-size: .8rem; color: var(--d-soft); }
.d-res-analisis-t { margin: 0 0 8px; font-weight: 700; font-size: 1.15rem; }
.d-res-analisis-s { margin: 0 0 18px; color: var(--d-soft); }

/* ── Formulario ─────────────────────────────────────────────────────────────── */
.d-form { display: grid; gap: 16px; }
.d-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.d-span { grid-column: 1 / -1; }
.d-resumen { padding: 14px 16px; border-radius: var(--d-radius); background: var(--d-bg2); font-size: .92rem; }
.d-resumen p { margin: 0; }
.d-resumen-t { font-weight: 700; margin-bottom: 2px !important; }
.d-resumen-v { color: var(--d-soft); margin-bottom: 6px !important; }
.d-boleta { border: 1.5px dashed var(--d-line); border-radius: var(--d-radius); padding: 0 16px; }
.d-boleta > summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-weight: 600; font-size: .95rem; }
.d-boleta > summary::-webkit-details-marker { display: none; }
.d-boleta > summary span { font-weight: 400; color: var(--d-soft); font-size: .85rem; }
.d-boleta-cuerpo { display: grid; gap: 12px; padding: 4px 0 16px; }
.d-archivos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-archivo { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-surface); cursor: pointer; min-height: 88px; overflow: hidden; }
.d-archivo span { font-weight: 600; font-size: .92rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-archivo small { color: var(--d-soft); font-size: .75rem; }
.d-archivo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.d-archivo:focus-within { border-color: var(--d-link); }
.d-nota { margin: 0; font-size: .82rem; color: var(--d-soft); }
.d-check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.45; color: var(--d-soft); cursor: pointer; }
.d-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--d-ink); }
.d-nota-envio { text-align: center; }
.d-btn-enviar { width: 100%; min-height: 56px; }
.d-alerta { padding: 14px 16px; border-radius: var(--d-radius); font-size: .95rem; }
.d-alerta-error { background: #fef3f2; color: var(--d-danger); border: 1px solid #fecdca; }
.d-alerta-ok { background: #ecfdf3; color: var(--d-ok); border: 1px solid #abefc6; }
.d-alerta ul { margin: 8px 0 0; padding-left: 18px; }

/* ── Preguntas frecuentes ───────────────────────────────────────────────────── */
.d-faq { border-top: 1px solid var(--d-line); }
.d-faq details { border-bottom: 1px solid var(--d-line); }
.d-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 64px; padding: 14px 0; font-weight: 600; font-size: 1.1rem; }
.d-faq summary::-webkit-details-marker { display: none; }
.d-faq summary::after { content: '+'; font-size: 1.6rem; font-weight: 300; line-height: 1; color: var(--d-soft); transition: transform .2s; flex: none; }
.d-faq details[open] summary::after { transform: rotate(45deg); }
.d-faq details p { margin: 0 0 20px; color: var(--d-soft); max-width: 70ch; }

/* ── Pie ────────────────────────────────────────────────────────────────────── */
.d-footer { background: var(--d-foot-bg, #0b1220); color: var(--d-foot-ink, #c4cad6); padding: 64px 0 28px; font-size: .92rem; }
.d-footer a { color: inherit; text-decoration: none; }
.d-footer a:hover { color: #fff; text-decoration: underline; }
.d-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.d-footer-grid h4 { margin: 0 0 14px; font-size: .85rem; color: #fff; font-weight: 600; }
.d-footer-grid a, .d-footer-grid span { display: block; padding: 5px 0; }
.d-footer-marca { color: #fff; }
.d-footer-marca p { margin: 14px 0 0; color: var(--d-foot-ink, #c4cad6); max-width: 32ch; }
.d-footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .8rem; color: #8b93a4; }
.d-footer-base p { margin: 0; }
.d-wa { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #1fa855; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }

/* ── Páginas interiores (contenido y legales con las clases originales) ──────── */
.d-interior .d-prose { padding: calc(var(--d-hdr-h) + 28px) 0 96px; background: var(--d-bg); max-width: none; margin: 0; }
.d-prose h1 { font-family: var(--d-font-display); font-weight: var(--d-display-weight); letter-spacing: var(--d-display-track); line-height: 1.08; font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 14px; text-wrap: balance; }
.d-prose h2 { font-family: var(--d-font-display); font-weight: var(--d-display-weight); font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.2; margin: 2.6rem 0 .8rem; padding: 0; border: 0; color: var(--d-ink); }
.d-prose h3 { font-size: 1.1rem; margin: 1.8rem 0 .5rem; }
.d-prose p, .d-prose li { color: var(--d-ink); line-height: 1.75; max-width: 72ch; }
.d-prose ul, .d-prose ol { padding-left: 1.3rem; }
.d-prose li { margin-bottom: .4rem; }
.d-prose a { color: var(--d-link); }
.d-prose .privacy-back { display: inline-block; margin-bottom: 20px; font-size: .9rem; color: var(--d-soft); text-decoration: none; }
.d-prose .privacy-date, .d-prose .contenido-meta { color: var(--d-soft); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 24px; }
.d-prose .contenido-migas { font-size: .85rem; color: var(--d-soft); margin-bottom: 18px; }
.d-prose .contenido-migas a { color: var(--d-soft); }
.d-prose .contenido-resumen { background: var(--d-bg2); border: 0; border-radius: var(--d-radius); padding: 20px 22px; margin: 0 0 36px; }
.d-prose .contenido-resumen p { margin: 4px 0 0; }
.d-prose .contenido-faq details { border: 0; border-bottom: 1px solid var(--d-line); border-radius: 0; background: transparent; padding: 0; margin: 0; }
.d-prose .contenido-faq details:first-child { border-top: 1px solid var(--d-line); }
.d-prose .contenido-faq summary { list-style: none; padding: 18px 0; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 16px; }
.d-prose .contenido-faq summary::-webkit-details-marker { display: none; }
.d-prose .contenido-faq summary::after { content: '+'; font-size: 1.5rem; font-weight: 300; line-height: 1; color: var(--d-soft); }
.d-prose .contenido-faq details[open] summary::after { content: '–'; }
.d-prose .contenido-faq details p { margin: 0 0 18px; color: var(--d-soft); }
.d-prose .contenido-glosario dt { font-weight: 700; margin-top: 1.4rem; }
.d-prose .contenido-glosario dd { margin: .2rem 0 0; color: var(--d-soft); }
.d-prose .privacy-table, .d-prose .contenido-tabla, .d-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .95rem; }
.d-prose th { text-align: left; font-size: .82rem; color: var(--d-soft); font-weight: 600; padding: 10px 12px; border-bottom: 1.5px solid var(--d-ink); }
.d-prose td { padding: 12px; border-bottom: 1px solid var(--d-line); vertical-align: top; }
.d-prose .contenido-aviso { font-size: .85rem; color: var(--d-soft); }
.d-prose .contenido-cta { text-align: left; margin: 3rem 0 0; padding: 28px; border-radius: var(--d-radius-lg); background: var(--d-bg2); }
.d-prose .contenido-cta p { margin: 0 0 14px; font-weight: 600; font-size: 1.15rem; }
.d-prose .contenido-cta .btn-cta { display: inline-flex; min-height: 48px; align-items: center; padding: 0 24px; border-radius: 999px; background: var(--d-accent); color: var(--d-accent-ink) !important; text-decoration: none; font-weight: 600; }
.d-prose .contenido-revisor { border: 1px solid var(--d-line); border-radius: var(--d-radius); padding: 18px 20px; background: var(--d-bg2); margin: 2.5rem 0 1rem; }
.d-prose .contenido-enlaces { list-style: none; padding: 0; }
.d-prose .banner-borrador, .d-prose [class*="borrador"] { border-radius: var(--d-radius); }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --d-hdr-h: 60px; --d-gutter: 20px; }
    .d-menu-btn { display: inline-flex; }
    .d-nav { position: fixed; inset: var(--d-hdr-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--d-gutter) 32px; background: var(--d-bg); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
    .d-header.is-open .d-nav { transform: none; opacity: 1; visibility: visible; }
    .d-nav a { min-height: 56px; font-size: 1.15rem; border-bottom: 1px solid var(--d-line); }
    .d-nav .d-nav-cta { margin-top: 20px; border: 0; justify-content: center; min-height: 54px; }
    .d-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .d-form-grid, .d-archivos { grid-template-columns: 1fr; }
    .d-res-datos { grid-template-columns: 1fr 1fr; }
    .d-prose table { display: block; overflow-x: auto; }
    .d-footer { padding: 48px 0 24px; }
}
@media (max-width: 480px) {
    :root { --d-gutter: 16px; }
    .d-chips { grid-template-columns: 1fr; }
    .d-footer-grid { grid-template-columns: 1fr; }
    .d-wa { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .d-body *, .d-body *::before, .d-body *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Iconos y «ver más» (iteración 2) ───────────────────────────────────────── */
.d-ico { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 13px; color: var(--d-link); background: var(--d-link-a12); }
.d-chip-ico { display: inline-flex; color: var(--d-link); margin-bottom: 4px; }
.d-chip.is-on .d-chip-ico { color: var(--d-ink); }
.d-vermas { margin: 28px 0 0; }
.d-vermas a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--d-link); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.d-vermas a:hover { gap: 12px; }
.d-footer-grid a, .d-footer-grid span { display: flex; align-items: flex-start; gap: 9px; }
.d-footer-grid .d-i { margin-top: 3px; opacity: .8; }
.d-h-ico { display: flex; align-items: center; gap: 14px; }
.d-ico-sm { width: 36px; height: 36px; border-radius: 10px; }
strong.d-h-ico { display: flex; font-weight: 600; }
.d-ico + p, .a-stat > .d-ico, .b-stat > .d-ico, .c-stat > .d-ico { margin-bottom: 14px; }
.d-ico > .d-i { display: block; }

/* ── Iteración 3: iconos sin fondo y más grandes, enlaces sin subrayado, latido, combobox de distribuidora ── */
.d-ico { width: auto; height: auto; background: none; border-radius: 0; }
.d-ico .d-i { width: 32px; height: 32px; stroke-width: 1.5; }
.d-ico-sm .d-i { width: 28px; height: 28px; }
.d-h-ico { gap: 12px; }
.d-body a, .d-link, .d-prose a, .d-check a, .d-footer a:hover { text-decoration: none; }
.d-vermas a { border-bottom: 0; padding-bottom: 0; }
.b-hero-link { text-decoration: none; }
.d-prose a:hover, .d-check a:hover, .d-link:hover { opacity: .78; }
.d-btn-completar { margin-top: 8px; }
.d-resumen-vacio p { margin: 0; }
.d-resumen-vacio .d-resumen-v { margin-bottom: 4px; }

@keyframes d-latido {
    0%, 100% { box-shadow: 0 0 0 0 var(--d-link-a45); }
    50% { box-shadow: 0 0 0 7px var(--d-link-a0); }
}
.d-body select.is-pulso { border-color: var(--d-link); animation: d-latido 1.3s ease-in-out infinite; }

.d-combo { position: relative; }
.d-combo-select { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; min-height: 0 !important; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden; }
.d-combo-input { width: 100%; min-height: 52px; padding: 0 42px 0 16px; border: 1.5px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-surface); color: var(--d-ink); font: 500 1rem var(--d-font); text-overflow: ellipsis; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.d-combo.is-editable .d-combo-input { cursor: text; }
.d-combo-input:focus { outline: none; border-color: var(--d-link); box-shadow: 0 0 0 3px var(--d-link-a22); }
.d-combo-input:disabled { opacity: .6; cursor: not-allowed; }
.d-combo-lista { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; background: var(--d-surface); border: 1.5px solid var(--d-line); border-radius: var(--d-radius); box-shadow: 0 14px 40px rgba(0, 0, 0, .22); }
.d-combo-lista li { min-height: 44px; display: flex; align-items: center; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: .95rem; color: var(--d-ink); }
.d-combo-lista li.is-activo { background: var(--d-link-a14); }
.d-combo-lista li[aria-selected="true"] { font-weight: 700; }
.d-combo-lista li.d-combo-vacio { cursor: default; color: var(--d-soft); }

/* ── Iteración 4: «Me interesa» (solo borde) + tick, imágenes de sección ── */
.d-btn-borde { background: transparent; color: var(--d-ink); box-shadow: inset 0 0 0 1.5px var(--d-ink); }
.d-body a.d-btn-borde { color: var(--d-ink); }
.d-btn-borde:hover { background: var(--d-ink-a7); box-shadow: inset 0 0 0 1.5px var(--d-ink); }
.d-btn-borde:disabled { opacity: 1; cursor: default; transform: none; }
.d-btn-borde[aria-pressed="true"]:not(:disabled) { box-shadow: inset 0 0 0 2px var(--d-ok); }
.d-sis-accion { display: flex; align-items: center; gap: 10px; }
.d-tick { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--d-ok); flex: none; }
.d-tick .d-i { width: 18px; height: 18px; }
.d-fig { margin: 0; border-radius: var(--d-radius-lg); overflow: hidden; }
.d-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-fig-collage { background: #0f1b33; }
.d-fig-collage img { height: auto; }

/* Pasos explicados a fondo (sobre-enren en las propuestas) */
.d-pasos-detalle { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0; }
.d-pasos-detalle li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding: 26px 0; border-top: 1px solid var(--d-line); max-width: none; margin: 0; }
.d-pasos-detalle li:last-child { border-bottom: 1px solid var(--d-line); }
.d-paso-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--d-ink); color: var(--d-bg); font-family: var(--d-font-display); font-weight: 700; font-size: 1.1rem; }
.d-pasos-detalle h3 { margin: 0 0 6px; font-size: 1.25rem; }
.d-pasos-detalle p { margin: 0 0 10px; }
.d-pasos-detalle .d-paso-lead { font-weight: 600; color: var(--d-ink); }
@media (max-width: 480px) { .d-pasos-detalle li { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; } .d-paso-num { width: 36px; height: 36px; } }

/* ── Iteración 5: tick sin círculo, calculadora desplegable en móvil ── */
.d-tick { width: auto; height: auto; border-radius: 0; background: none; color: var(--d-ok); display: inline-flex; }
.d-tick .d-i { width: 26px; height: 26px; stroke-width: 2.4; }
.d-btn:disabled.d-btn { opacity: 1; }
.d-sis-accion.is-base .d-btn { opacity: 1; cursor: default; transform: none; box-shadow: none; }
.d-calc-slot { margin-top: 16px; display: grid; gap: 10px; }
.d-calc-ocultar { justify-self: end; background: none; border: 0; cursor: pointer; font: 600 .92rem var(--d-font); color: var(--d-link); padding: 6px 0; min-height: 44px; }
.d-calc-marcador { padding: 18px 20px; border: 1.5px dashed var(--d-line); border-radius: var(--d-radius-lg); color: var(--d-soft); display: grid; gap: 6px; justify-items: start; margin-bottom: 24px; }
.d-calc-marcador p { margin: 0; }
.d-calc-marcador button { background: none; border: 0; cursor: pointer; font: 600 .95rem var(--d-font); color: var(--d-link); padding: 6px 0; min-height: 44px; }

.d-calc-slot > .d-calc-ocultar { margin-bottom: -4px; }
.d-calc-slot > [id="calculadora"] { margin: 0; }

/* ── Iteración 6: chips de tipo = «Me interesa» enlazado con las tarjetas ── */
.d-chip { position: relative; }
.d-chip-base { cursor: default; }
.d-chip.is-marcada { border-color: var(--d-ok); box-shadow: inset 0 0 0 1px var(--d-ok); }
.d-chip-tick { position: absolute; top: 8px; right: 10px; display: inline-flex; color: var(--d-ok); }
.d-chip-tick .d-i { width: 22px; height: 22px; stroke-width: 2.4; }
@media (max-width: 480px) {
    .d-chips { grid-template-columns: 1fr 1fr; }
    .d-chips [data-emb-chip="off_grid"] { grid-column: 1 / -1; }
}

/* ── Iteración 7: boleta con un archivo + «+» ── */
.d-archivo-fila { display: flex; align-items: stretch; gap: 10px; }
.d-archivo-fila .d-archivo { flex: 1; min-width: 0; }

/* ── Iteración 9: título de sección/página en la barra, junto al logo (comportamiento de followUP) ── */
.d-logo { gap: 0; }
.d-logo-iso { display: none; }
.d-hdr-titulo { flex: 1 1 auto; min-width: 0; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--d-font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; color: var(--d-ink); opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; pointer-events: none; }
.d-hdr-titulo::before { content: ''; display: inline-block; width: 1px; height: 18px; margin: 0 14px 0 6px; background: var(--d-line); vertical-align: middle; }
.d-header[data-titulo-visible] .d-hdr-titulo { opacity: 1; transform: none; }
.d-hdr-titulo.is-cambio { opacity: 0 !important; transform: translateY(-4px) !important; }
.d-header[data-titulo-visible] { border-bottom-color: var(--d-line); }
@media (max-width: 1024px) {
    .d-header-in { gap: 10px; }
}
@media (max-width: 768px) {
    .d-header[data-titulo-visible] .d-logo .marca--completo { display: none; }
    .d-header[data-titulo-visible] .d-logo-iso { display: inline-flex; }
    .d-hdr-titulo { font-size: .98rem; }
    .d-hdr-titulo::before { margin: 0 10px 0 2px; }
}

/* ── Iteración 10 ── */
/* backdrop-filter en la barra la convierte en el "bloque contenedor" del menú fijo y lo deja sin alto: en pantallas chicas la barra es sólida */
@media (max-width: 1024px) {
    .d-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--d-bg); }
}
.d-res-como { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .95rem; color: var(--d-link); text-decoration: none; }
.d-res-como:hover { opacity: .8; }
.d-res-idle-t { margin-bottom: 0; }
.d-afinar { margin-top: 10px; }
.d-afinar > summary { padding: 10px 0; min-height: 44px; }

/* ── Iteración 12 ── */
/* Sin el rectángulo de selección al tocar (páginas públicas) */
.d-body a, .d-body button, .d-body label, .d-body summary, .d-body input, .d-body select, .d-body textarea, .d-body [role="button"], .d-body [role="option"] { -webkit-tap-highlight-color: transparent; }
.d-res-prom { color: var(--d-soft); font-size: .85em; }

/* ── Iteración 14 ── */
/* Migas: más separación entre ítems y todas en azul */
.d-prose .contenido-migas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .92rem; margin-bottom: 14px; color: var(--d-link); }
.d-prose .contenido-migas a, .d-prose .contenido-migas span { color: var(--d-link); text-decoration: none; }

/* Globo de chat de WhatsApp */
.d-chat { position: fixed; right: 18px; bottom: 18px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.d-chat-fab { position: relative; width: 58px; height: 58px; border: 0; border-radius: 50%; background: #1fa855; color: #fff; display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); -webkit-tap-highlight-color: transparent; transition: transform .15s; }
.d-chat-fab:hover { transform: scale(1.05); }
.d-chat-fab::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1fa855; opacity: 0; animation: d-chat-latido 2.8s ease-out infinite; pointer-events: none; }
@keyframes d-chat-latido { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
.d-chat.is-abierto .d-chat-fab::after { animation: none; opacity: 0; }
.d-chat-fab-ico { grid-area: 1 / 1; display: inline-flex; transition: opacity .15s, transform .2s; }
.d-chat-fab-x { opacity: 0; transform: rotate(-90deg); }
.d-chat.is-abierto .d-chat-fab-wa { opacity: 0; transform: rotate(90deg); }
.d-chat.is-abierto .d-chat-fab-x { opacity: 1; transform: none; }
.d-chat-panel { width: min(360px, calc(100vw - 24px)); background: var(--d-surface); color: var(--d-ink); border: 1px solid var(--d-line); border-radius: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28); overflow: hidden; transform-origin: bottom right; animation: d-chat-entra .18s ease-out; }
@keyframes d-chat-entra { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.d-chat-cab { display: flex; align-items: center; gap: 12px; padding: 16px 16px 16px 18px; background: var(--d-accent); color: var(--d-accent-ink); }
.d-chat-av { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .16); flex: none; }
.d-chat-cab-t { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.d-chat-cab-t strong { font-family: var(--d-font-display); font-size: 1.1rem; }
.d-chat-cab-t span { font-size: .85rem; opacity: .85; }
.d-chat-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: inline-grid; place-items: center; cursor: pointer; }
.d-chat-cuerpo { padding: 16px 18px 18px; display: grid; gap: 14px; }
.d-chat-etq { margin: 0; font-weight: 600; font-size: .9rem; }
.d-chat-etq span { font-weight: 400; color: var(--d-soft); margin-left: 6px; }
.d-chat-temas { display: flex; flex-wrap: wrap; gap: 8px; }
.d-chat-tema { min-height: 40px; padding: 0 14px; border: 1.5px solid var(--d-line); border-radius: 999px; background: transparent; color: var(--d-ink); font: 500 .9rem var(--d-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.d-chat-tema.is-on { border-color: var(--d-ink); background: var(--d-ink-a8); font-weight: 600; }
.d-chat-enviar { width: 100%; background: #1fa855; color: #fff !important; }
.d-chat-nota { margin: -4px 0 0; text-align: center; font-size: .8rem; color: var(--d-soft); }
@media (max-width: 480px) {
    .d-chat { right: 12px; bottom: 12px; }
    .d-chat-fab { width: 54px; height: 54px; }
    .d-chat-panel { width: calc(100vw - 24px); }
}
@media (prefers-reduced-motion: reduce) { .d-chat-fab::after { animation: none; } .d-chat-panel { animation: none; } }

/* Campos con etiqueta flotante: el padding superior debe ganarle a la regla genérica de los campos (la etiqueta subía sobre el texto escrito) */
.d-body .d-flot input, .d-body .d-flot textarea { padding-top: 20px; padding-bottom: 4px; }
.d-body .d-flot textarea { padding-top: 26px; min-height: 104px; resize: vertical; line-height: 1.45; }

/* ── Ajustes de formulario y calculadora (research 163) ─────────────────────────────────────────────── */
/* «Recibir mi cotización detallada» lleva a «Tu solicitud»: que no quede tapado por la barra fija */
.d-resumen { scroll-margin-top: calc(var(--d-hdr-h, 72px) + 16px); }
/* «Cambiar datos» al final del texto del resumen */
.d-resumen-v .d-resumen-cambiar { white-space: nowrap; }
/* «¿Cómo calculamos tu solución?» con flecha, como los demás enlaces de la página */
.d-res-como { display: inline-flex; align-items: center; gap: 8px; }
.d-res-como:hover { opacity: 1; gap: 12px; }
/* Subida de boleta: icono y nombre en la misma línea; el botón «+» y el primer archivo miden lo mismo (mitad y mitad) y son más altos que anchos de texto */
.d-archivo-t { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.d-archivo-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-archivo { align-items: flex-start; justify-content: center; min-height: 104px; }
.d-archivo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Sugerencias de notas: texto sin fondo ni borde */
.d-sug { grid-column: 1 / -1; margin-top: 2px; }
.d-sug[hidden], .d-sug-lista[hidden] { display: none !important; }
.d-sug button { background: none; border: 0; padding: 6px 0; margin: 0; color: var(--d-link); font: inherit; font-size: .9rem; cursor: pointer; }
.d-sug button:hover { text-decoration: underline; }
.d-sug-abrir { font-weight: 600; }
.d-sug-abrir::after { content: '+'; margin-left: 6px; font-weight: 400; }
.d-sug-abrir[aria-expanded="true"]::after { content: '−'; }
.d-sug-lista { display: flex; flex-wrap: wrap; gap: 0 18px; }
.d-sug-lista button[aria-pressed="true"] { font-weight: 700; text-decoration: underline; }
@media (max-width: 768px) { .d-sug button { min-height: 44px; } }


/* Notas con caja propia: el borde y el fondo los lleva el contenedor y el cuadro de texto empieza DEBAJO de la franja de la etiqueta, así el texto que se
   desplaza nunca pasa por detrás (ni por encima) de ella. */
.d-flot-area { border: 1.5px solid var(--d-line); border-radius: var(--d-radius); background: var(--d-surface); }
.d-flot-area:focus-within { border-color: var(--d-link); box-shadow: 0 0 0 3px var(--d-link-a22); }
.d-body .d-flot-area textarea { border: 0; border-radius: 0 0 var(--d-radius) var(--d-radius); background: transparent; box-shadow: none; margin-top: 26px; padding: 0 16px 10px; min-height: 78px; }
.d-body .d-flot-area textarea:focus { border: 0; box-shadow: none; }
.d-flot-area > label { left: 15.5px; top: 14px; }
.d-flot-area textarea:focus + label, .d-flot-area textarea:not(:placeholder-shown) + label { top: 6px; }

/* ── Boleta: dos cuadros de tamaño y posición fijos (con o sin miniatura) ───────────────────────────────────── */
.d-archivo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.d-archivo { height: 104px; min-height: 104px; box-sizing: border-box; padding: 12px 14px; align-items: center; justify-content: center; }
.d-archivo-vacio, .d-archivo-lleno { width: 100%; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; justify-content: center; min-width: 0; }
.d-archivo-vacio[hidden], .d-archivo-lleno[hidden], .d-archivo-mini[hidden], .d-archivo-pdf[hidden] { display: none !important; }
.d-archivo-mas .d-archivo-vacio { align-items: center; color: var(--d-link); }
.d-archivo-mas .d-archivo-vacio .d-i { width: 28px; height: 28px; stroke-width: 1.5; }
.d-archivo-mas:not(.is-deshabilitado):not(:has(.d-archivo-lleno:not([hidden]))) { border-style: dashed; }
.d-archivo-lleno { flex-direction: row; align-items: center; gap: 12px; }
.d-archivo-mini { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 8px; background: var(--d-bg2); }
.d-archivo-pdf { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--d-bg2); color: var(--d-link); }
.d-archivo-peso { font-weight: 700; font-size: .95rem; white-space: nowrap; }
.d-archivo.is-deshabilitado { opacity: .45; cursor: not-allowed; }
.d-archivo.is-deshabilitado input { cursor: not-allowed; }
.d-archivo.is-comprimiendo { opacity: .7; }
.d-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Barras de desplazamiento finas (listas desplegables y notas) ──────────────────────────────────────────── */
:root { --d-sb: rgba(15, 27, 51, .28); --d-sb-hover: rgba(15, 27, 51, .5); }
.d-body select::-webkit-scrollbar, .d-body textarea::-webkit-scrollbar, .d-combo-lista::-webkit-scrollbar { width: 6px; }
.d-body select::-webkit-scrollbar-track, .d-body textarea::-webkit-scrollbar-track, .d-combo-lista::-webkit-scrollbar-track { background: transparent; }
.d-body select::-webkit-scrollbar-thumb, .d-body textarea::-webkit-scrollbar-thumb, .d-combo-lista::-webkit-scrollbar-thumb { background: var(--d-sb); border-radius: 3px; }
.d-body select::-webkit-scrollbar-thumb:hover, .d-body textarea::-webkit-scrollbar-thumb:hover, .d-combo-lista::-webkit-scrollbar-thumb:hover { background: var(--d-sb-hover); }
.d-body textarea { overscroll-behavior: contain; }

/* ── Barra de desplazamiento de la PÁGINA (todas las páginas públicas) y de cualquier zona con scroll: la misma fina y discreta ─────────── */
/* Chrome/Edge/Safari: barra propia sin flechas (::-webkit-scrollbar); Firefox: las propiedades estándar. No se combinan: en Chrome las estándar anulan las propias y vuelven las flechas. */
@supports not selector(::-webkit-scrollbar) { html, .d-body * { scrollbar-width: thin; scrollbar-color: var(--d-sb) transparent; } }
html::-webkit-scrollbar-button, .d-body *::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: var(--d-sb); border-radius: 4px; }
html::-webkit-scrollbar-thumb:hover { background: var(--d-sb-hover); }
.d-body *::-webkit-scrollbar { width: 6px; height: 6px; }
.d-body *::-webkit-scrollbar-track { background: transparent; }
.d-body *::-webkit-scrollbar-thumb { background: var(--d-sb); border-radius: 3px; }
.d-body *::-webkit-scrollbar-thumb:hover { background: var(--d-sb-hover); }

.d-chat-panel:focus { outline: none; }

/* «Afinar el estimado»: solo el título, con el «+» en la misma línea */
.d-afinar > summary { flex-wrap: nowrap; align-items: center; }

/* Fin de la página: sin el espacio en blanco de más entre el formulario y el pie */
.c-cuerpo > .c-sec:last-child { padding-bottom: 0; }
.c-cuerpo > .c-sec:last-child .c-form { margin-bottom: 0; }
