/* Estilos de las calculadoras NEC. Compartidos por /herramientas (indice)
   y las paginas propias de cada calculadora en /herramientas/<calculadora>.
   Los tokens de marca viven en /css/tokens.css. */
    /* Display: Michroma modificada, ver el comentario en index.html. */
    @font-face {
      font-family: 'Michroma Quatric';
      src: url('/fonts/michroma-quatric.woff2') format('woff2');
      font-weight: 100 900;
      font-display: swap;
      size-adjust: 84%;
    }

    @font-face {
      font-family: 'Montserrat';
      src: url('/fonts/montserrat-var-latin.woff2') format('woff2');
      font-weight: 300 700;
      font-style: normal;
      font-display: swap;
    }

    /* Los tokens de marca viven en /css/tokens.css. */

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html {
      font-size: 16px;
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--font-body);
      background: #f8f7f4;
      color: #111;
      overflow-x: hidden;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    img {
      max-width: 100%;
      display: block;
    }

    ul {
      list-style: none;
    }

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

    /* NAVBAR */
    #navbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1000;
      background: rgba(0, 51, 51, 1);
      border-bottom: 1px solid rgba(32, 114, 106, 0.3);
      transform: translateZ(0);
      transition: top 0.75s var(--ease-out), left 0.75s var(--ease-out), right 0.75s var(--ease-out), width 0.75s var(--ease-out), height 0.75s var(--ease-out), border-radius 0.9s var(--ease-out), background 0.5s ease, box-shadow 0.5s ease;
    }

    #navbar.scrolled {
      top: 20px;
      left: 20px;
      right: auto;
      width: 58px;
      height: 58px;
      background: rgba(5, 28, 27, 0.38);
      backdrop-filter: blur(24px) saturate(1.8);
      -webkit-backdrop-filter: blur(24px) saturate(1.8);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1.5px rgba(42, 140, 130, 0.3);
      border-radius: 62% 38% 52% 42%/54% 46% 54% 46%;
      overflow: hidden;
      border: none;
      animation: blob-float 4s ease-in-out infinite;
    }

    #navbar.scrolled .container {
      padding: 0;
      width: 100%;
      height: 100%;
    }

    #navbar.scrolled .nav-inner {
      height: 100%;
      justify-content: center;
      padding: 0;
      gap: 0;
    }

    /* Al hacer scroll esta barra se colapsa al logo solo. El acceso al portal
       tiene que esconderse con el resto: si no, queda flotando sobre un
       navbar que ya no tiene donde ponerlo. */
    #navbar.scrolled .nav-links,
    #navbar.scrolled .btn-nav-cta,
    #navbar.scrolled .nav-toggle {
      display: none !important;
    }

    #navbar.scrolled .nav-logo {
      margin: auto;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
    }

    #navbar.scrolled .nav-logo img {
      content: url(/img/isotipo-96.png);
      height: 32px;
      width: 32px;
      object-fit: contain;
    }

    .nav-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 72px;
      gap: 40px;
    }

    /* El enlace no puede encogerse: con flex-shrink por defecto y el
       max-width: 100% global de img, la barra lo aplastaba a 45x60 y el logo
       salia deformado. */
    .nav-logo {
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }

    .nav-logo img {
      display: block;
      height: 60px;
      width: auto;
      max-width: none;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 32px;
    }

    .nav-links a {
      font-family: var(--font-body);
      font-size: 0.78rem;
      font-weight: 500;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.75);
      transition: color 0.2s;
      position: relative;
    }

    .nav-links a::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 0;
      width: 0;
      height: 1px;
      background: var(--q-teal-light);
      transition: width 0.3s;
    }

    .nav-links a:hover,
    .nav-links a.active {
      color: #fff;
    }

    .nav-links a:hover::after,
    .nav-links a.active::after {
      width: 100%;
    }

    .nav-links a.active {
      color: var(--q-teal-light);
    }

    .btn-nav-cta {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 22px;
      background: var(--q-teal);
      color: #fff;
      font-family: var(--font-body);
      font-size: 0.76rem;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      border: 1px solid var(--q-teal-light);
      border-radius: 3px;
      transition: background 0.25s;
      cursor: pointer;
      white-space: nowrap;
    }

    .btn-nav-cta:hover {
      background: var(--q-teal-mid);
    }

    /* La barra se colapsa a una gota de 58px: el boton se centra con ella. */
    @media (max-width: 1024px) {
      #navbar.scrolled + .acceso-cliente { --acc-top-scrolled: 30px; }
    }

    .nav-toggle {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 8px;
      background: none;
      border: none;
      outline: none;
    }

    .nav-toggle span {
      display: block;
      width: 24px;
      height: 2px;
      background: var(--q-teal-light);
      transition: transform 0.3s, opacity 0.2s;
    }

    .nav-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 999;
    }

    .nav-overlay.visible {
      display: block;
    }

    .mobile-menu {
      display: flex;
      flex-direction: column;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      padding: 0;
      transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.3s ease;
    }

    .mobile-menu.open {
      max-height: 400px;
      opacity: 1;
      padding: 16px 0;
    }

    .mobile-menu a {
      display: block;
      padding: 14px 24px;
      font-size: 0.82rem;
      font-weight: 500;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.8);
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      transition: color 0.2s;
    }

    .mobile-menu a:hover {
      color: #fff;
    }

    .nav-toggle.open span:nth-child(1) {
      transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.open span:nth-child(2) {
      opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
      transform: translateY(-7px) rotate(-45deg);
    }

    /* HERO */
    .page-hero {
      background: var(--q-forest) url('/hero_tablero.png') no-repeat center center;
      background-size: cover;
      background-attachment: fixed;
      padding: 140px 0 80px;
      position: relative;
      overflow: hidden;
    }

    .page-hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(0, 25, 25, 0.88) 0%, rgba(0, 40, 35, 0.82) 100%);
      z-index: 1;
    }

    .page-hero::after {
      content: '';
      position: absolute;
      right: -100px;
      top: -100px;
      width: 500px;
      height: 500px;
      border: 1px solid rgba(32, 114, 106, 0.15);
      border-radius: 50%;
      pointer-events: none;
    }

    .hero-inner {
      position: relative;
      z-index: 2;
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
    }

    .hero-eyebrow-line {
      width: 36px;
      height: 1px;
      background: var(--q-teal-light);
    }

    .hero-eyebrow-text {
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 500;
      letter-spacing: 0.28em;
      text-transform: uppercase;
      color: var(--q-teal-light);
    }

    .page-hero h1 {
      font-family: var(--font-primary);
      font-size: clamp(2rem, 4vw, 3.6rem);
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #fff;
      line-height: 1.1;
      margin-bottom: 20px;
    }

    .page-hero h1 .accent {
      color: var(--q-teal-light);
    }

    .page-hero p {
      font-family: var(--font-body);
      font-size: 1rem;
      font-weight: 400;
      color: rgba(255, 255, 255, 0.9);
      max-width: 580px;
      line-height: 1.7;
      margin-bottom: 40px;
    }

    .tool-nav {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .tool-nav a {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 18px;
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
      border: 1.5px solid rgba(255, 255, 255, 0.6);
      border-radius: 3px;
      font-family: var(--font-body);
      font-size: 0.74rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }

    .tool-nav a:hover {
      background: var(--q-teal);
      color: #fff;
      border-color: var(--q-teal);
      transform: translateY(-2px);
    }

    /* TOOLS LAYOUT */
    .tools-section {
      padding: 80px 0;
    }

    .tools-grid {
      display: flex;
      flex-direction: column;
      gap: 40px;
    }

    /* CARD */
    .tool-card {
      position: relative;
      background: #fff;
      border-radius: 18px;
      border: 1px solid rgba(0, 51, 51, 0.12);
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 12px 30px rgba(0, 51, 51, 0.08);
      transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
      overflow: hidden;
    }

    .tool-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05), 0 24px 40px rgba(0, 51, 51, 0.1);
    }

    .card-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      padding: 22px 28px 18px;
      border-bottom: 1px solid rgba(0, 51, 51, 0.08);
      gap: 16px;
      background: linear-gradient(160deg, rgba(237, 231, 220, 0.5) 0%, rgba(255, 255, 255, 0) 55%);
    }

    .card-num {
      font-family: var(--font-primary);
      font-size: 2.5rem;
      font-weight: 700;
      color: rgba(0, 51, 51, 0.08);
      line-height: 1;
      flex-shrink: 0;
    }

    .card-title-wrap {
      flex: 1;
    }

    .card-title-wrap h2 {
      font-family: var(--font-primary);
      font-size: 1.1rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--q-forest);
      margin-bottom: 4px;
    }

    .card-nec {
      font-family: var(--font-body);
      font-size: 0.72rem;
      color: var(--q-teal);
      font-weight: 500;
      letter-spacing: 0.06em;
    }

    /* Enlace a la pagina propia de cada calculadora (solo en el indice). */
    .card-link {
      display: inline-block;
      margin-top: 6px;
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      color: var(--q-teal-dark);
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .card-link:hover {
      color: var(--q-teal);
    }

    .card-body {
      padding: 28px 32px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
      margin-bottom: 20px;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .form-group label {
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #222;
    }

    .form-group input,
    .form-group select {
      font-family: var(--font-body);
      font-size: 1rem;
      min-height: 44px;
      padding: 10px 14px;
      border: 1px solid var(--q-silver);
      border-radius: var(--radius);
      background: #fafafa;
      color: #111;
      outline: none;
      transition: border-color 0.2s;
      -webkit-appearance: none;
      appearance: none;
    }

    .form-group input:focus,
    .form-group select:focus {
      border-color: var(--q-teal);
      box-shadow: 0 0 0 3px rgba(32, 114, 106, 0.3);
      background: #fff;
    }

    .form-group select {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 12px center;
      padding-right: 36px;
    }

    .btn-calc {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 12px 28px;
      background: var(--q-teal-dark);
      color: #fff;
      font-family: var(--font-body);
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      border: none;
      border-radius: 3px;
      cursor: pointer;
      transition: background 0.25s;
    }

    .btn-calc:hover {
      background: var(--q-teal);
    }

    .btn-calc svg {
      flex-shrink: 0;
    }

    /* RESULTS */
    /* RESULTS MODERNIZED */
    .result-card {
      margin-top: 20px;
      background: var(--q-forest);
      color: #fff;
      padding: 28px 32px;
      display: none;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    }

    .result-card.show {
      display: block;
      animation: fadeInUp 0.4s ease-out;
    }

    .result-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 20px;
      margin-bottom: 20px;
    }

    .result-item label {
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.72);
      display: block;
      margin-bottom: 6px;
    }

    .result-item .val {
      font-family: var(--font-primary);
      font-size: 1.4rem;
      font-weight: 700;
      color: #FFFFFF;
      font-variant-numeric: tabular-nums;
      line-height: 1.2;
    }

    .result-item .val.highlight {
      font-size: 2rem;
      color: #F5E6C8;
      letter-spacing: -0.01em;
      border-bottom: 2px solid rgba(245, 230, 200, 0.5);
      display: inline-block;
      padding-bottom: 2px;
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      padding: 12px 20px;
      font-family: var(--font-body);
      font-size: 0.85rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      margin-top: 8px;
      border-radius: 6px;
      transition: all 0.3s;
    }

    .status-ok {
      background: rgba(42, 140, 130, 0.15);
      border: 1px solid rgba(42, 140, 130, 0.6);
      color: #a7f3ec;
    }

    .status-warn {
      background: rgba(255, 165, 0, 0.1);
      border: 1px solid rgba(255, 165, 0, 0.5);
      color: #ffd580;
    }

    .status-fail {
      background: rgba(239, 68, 68, 0.15);
      border: 1px solid rgba(239, 68, 68, 0.5);
      color: #fca5a5;
    }

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* OBSERVATION */
    .obs-box {
      margin-top: 20px;
      padding: 16px 20px;
      background: var(--q-cream);
      border: 1px solid rgba(32, 114, 106, 0.22);
      border-radius: var(--radius);
    }

    .obs-box p {
      font-family: var(--font-body);
      font-size: 0.82rem;
      color: #444;
      line-height: 1.7;
    }

    .obs-box strong {
      color: var(--q-teal-dark);
    }

    /* ERROR */
    .field-error {
      font-size: 0.72rem;
      color: #c0392b;
      margin-top: 2px;
    }

    /* ═══════════════════════════════════════════
   EXCEL BLOB DOCK  –  Water-Drop FAB
   ═══════════════════════════════════════════ */

    /* ═══════════════════════════════════════════
   EXCEL BLOB DOCK  –  Water-Drop FAB (Refined)
   ═══════════════════════════════════════════ */

    .excel-blob {
      position: fixed;
      z-index: 999;
      bottom: 32px;
      right: 32px;
      width: 64px;
      height: 64px;
      cursor: pointer;
      transition:
        opacity 0.25s ease,
        transform 0.3s var(--ease-out),
        box-shadow 0.3s ease,
        border-radius 0.9s var(--ease-out);
      will-change: transform, opacity;
      border-radius: 50% 50% 0 50%;
      background: rgba(0, 30, 30, 0.65);
      backdrop-filter: blur(10px) saturate(1.8);
      -webkit-backdrop-filter: blur(10px) saturate(1.8);
      border: 1px solid rgba(32, 114, 106, 0.25);
      box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: visible;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    .excel-blob:hover {
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
      transform: translateY(-4px);
    }

    .excel-blob.is-open {
      opacity: 0;
      pointer-events: none;
      transform: scale(0.75);
    }

    .blob-face {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 0.3s ease;
    }

    .blob-icon {
      width: 28px;
      height: 28px;
      color: #fff;
    }

    /* Notification badge — Corrected position and visible pop */
    .blob-badge {
      position: absolute;
      top: -2px;
      right: -2px;
      z-index: 10;
      min-width: 20px;
      height: 20px;
      padding: 0 5px;
      background: var(--q-teal-light);
      color: #fff;
      font-family: var(--font-primary);
      font-size: 0.6875rem;
      font-weight: 700;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
      border: 1.5px solid rgba(255, 255, 255, 0.2);
      opacity: 0;
      transform: scale(0);
      transition: all 0.4s ease-out;
      pointer-events: none;
    }

    .blob-badge.visible {
      opacity: 1;
      transform: scale(1);
    }

    /* ── EXCEL PANEL (elemento separado del FAB) ── */
    .excel-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      z-index: 997;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    .excel-overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }

    .excel-sheet {
      position: fixed;
      z-index: 998;
      bottom: 32px;
      left: 50%;
      width: min(900px, calc(100vw - 64px));
      height: 85px;
      border-radius: 24px;
      background: rgba(5, 28, 27, 0.9);
      backdrop-filter: blur(20px) saturate(1.8);
      -webkit-backdrop-filter: blur(20px) saturate(1.8);
      border: 1px solid rgba(32, 114, 106, 0.35);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
      display: flex;
      align-items: center;
      justify-content: center;
      /* Solo opacity + transform — GPU puro, cero reflow */
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(16px);
      transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
      will-change: transform, opacity;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    .excel-sheet.is-open {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0);
    }

    .blob-close {
      position: absolute;
      top: 6px;
      right: 12px;
      background: none;
      border: none;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: rgba(255,255,255,0.7);
      border-radius: 50%;
      transition: color 0.2s, background 0.2s;
      z-index: 20;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }
    .blob-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
    .blob-close svg { width: 14px; height: 14px; stroke-width: 3.5; }

    .excel-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 15px;
      width: 100%;
    }

    .excel-checks {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .excel-check {
      display: flex;
      align-items: center;
      gap: 6px;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 20px;
      padding: 4px 12px;
      transition: all 0.2s;
    }

    .excel-check:has(input:checked) {
      background: rgba(42, 140, 130, 0.5);
      border-color: var(--q-teal-light);
    }

    .excel-check span {
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.8);
    }

    /* Premium high-contrast button (Hero Style) */
    .btn-excel {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 20px;
      background: var(--q-cream);
      color: var(--q-forest);
      font-family: var(--font-primary);
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      border: none;
      border-radius: 30px;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-excel:hover {
      background: #fff;
      transform: scale(1.05);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .btn-excel svg {
      color: var(--q-forest);
    }


    /* FOOTER */
    footer {
      background: var(--q-black);
      padding: 64px 0 0;
      position: relative;
      overflow: hidden;
    }

    footer::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--q-teal), var(--q-teal-light), var(--q-teal), transparent);
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1.5fr;
      gap: 60px;
      padding-bottom: 48px;
    }

    .footer-brand .nav-logo {
      margin-bottom: 20px;
    }

    .footer-brand p {
      font-family: var(--font-body);
      font-size: 0.85rem;
      font-weight: 300;
      color: rgba(255, 255, 255, 0.62);
      line-height: 1.7;
      max-width: 280px;
    }

    .footer-col-title {
      font-family: var(--font-primary);
      font-size: 0.78rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--q-white);
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 1px solid rgba(32, 114, 106, 0.3);
    }

    .footer-links {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .footer-links a {
      font-family: var(--font-body);
      font-size: 0.82rem;
      font-weight: 300;
      color: rgba(255, 255, 255, 0.62);
      transition: color 0.2s, padding-left 0.2s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .footer-links a::before {
      content: '—';
      font-size: 0.65rem;
      color: var(--q-teal);
      opacity: 0;
      transition: opacity 0.2s;
    }

    .footer-links a:hover {
      color: rgba(255, 255, 255, 0.85);
      padding-left: 4px;
    }

    .footer-links a:hover::before {
      opacity: 1;
    }

    .footer-contact-item {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .footer-contact-item svg {
      width: 18px;
      height: 18px;
      stroke: var(--q-teal-light);
      fill: none;
      stroke-width: 1.5;
      flex-shrink: 0;
      display: block;
    }

    .footer-contact-item a,
    .footer-contact-item span {
      display: flex;
      align-items: center;
      font-family: var(--font-body);
      font-size: 0.83rem;
      font-weight: 300;
      color: rgba(255, 255, 255, 0.55);
      line-height: 1;
      transition: color 0.2s;
    }

    .footer-contact-item a:hover {
      color: var(--q-white);
    }

    .footer-bottom {
      border-top: 1px solid rgba(255, 255, 255, 0.07);
      padding: 20px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .footer-bottom p {
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 300;
      color: rgba(255, 255, 255, 0.55);
    }

    .footer-bottom-links {
      display: flex;
      gap: 24px;
    }

    .footer-bottom-links a {
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 300;
      color: rgba(255, 255, 255, 0.55);
      transition: color 0.2s;
    }

    .footer-bottom-links a:hover {
      color: rgba(255, 255, 255, 0.7);
    }

    .footer-bottom-links a:hover {
      color: rgba(255, 255, 255, 0.7);
    }

    .tools-cta-banner {
      background: #0A4946;
      border-radius: 4px;
      padding: 40px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 32px;
      margin: 48px 0 0;
    }

    .tools-cta-banner h3 {
      font-family: var(--font-primary);
      font-size: clamp(1rem, 2.5vw, 1.25rem);
      font-weight: 700;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      color: #fff;
      margin-bottom: 6px;
    }

    .tools-cta-banner p {
      color: rgba(255,255,255,0.7);
      font-size: 0.88rem;
    }

    .tools-cta-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #EDE7DC;
      color: #0A4946;
      padding: 13px 26px;
      font-family: 'Montserrat', sans-serif;
      font-size: 0.82rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      border-radius: 4px;
      white-space: nowrap;
      text-decoration: none;
      transition: background 0.2s;
    }

    .tools-cta-btn:hover {
      background: #fff;
    }

    @media (max-width: 640px) {
      .tools-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
      }
    }


    /* RESPONSIVE */
    @media(max-width:900px) {
      .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
      }

      .form-grid {
        grid-template-columns: 1fr 1fr;
      }
    }

    /* MOBILE EXCEL SHEET — Bottom Sheet nativo */
    @media (max-width: 768px) {
      .excel-sheet {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: auto;
        min-height: 240px;
        border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 16px);
        /* Solo translateY — más barato en Android */
        transform: translateY(100%);
        transition: opacity 0.25s ease, transform 0.35s var(--ease-out);
      }
      .excel-sheet.is-open {
        transform: translateY(0);
        opacity: 1;
      }
      .excel-inner {
        flex-direction: column;
        gap: 14px;
        padding: 24px 20px 16px;
        height: auto;
      }
      .excel-checks {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
      }
      .excel-check {
        width: 100%;
        padding: 10px 16px;
        justify-content: flex-start;
        border-radius: 12px;
      }
      .excel-check span { font-size: 0.73rem; }
      .btn-excel {
        width: 100%;
        justify-content: center;
        padding: 13px;
        font-size: 0.75rem;
        border-radius: 20px;
      }
      .blob-close { top: 10px; right: 14px; }
    }

    @media(max-width:640px) {
      .container {
        padding: 0 20px;
      }

      .nav-links,
      .btn-nav-cta {
        display: none;
      }

      .nav-inner {
        gap: 14px;
      }

      .nav-toggle {
        display: flex;
      }

      .page-hero {
        padding: 120px 0 60px;
      }

      .page-hero h1 {
        font-size: 1.8rem;
      }

      .footer-grid {
        grid-template-columns: 1fr;
      }

      .card-header {
        flex-direction: column;
      }

      .card-num {
        font-size: 1.8rem;
      }

      .form-grid {
        grid-template-columns: 1fr;
      }

      .result-grid {
        grid-template-columns: 1fr 1fr;
      }

      .excel-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
      }

      .excel-checks {
        gap: 5px;
      }

      .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
      }
    }

    @keyframes blob-float {

      0%,
      100% {
        border-radius: 62% 38% 52% 42%/54% 46% 54% 46%;
      }

      33% {
        border-radius: 50% 50% 38% 62%/60% 42% 58% 40%;
      }

      66% {
        border-radius: 44% 56% 62% 38%/46% 58% 42% 54%;
      }
    }
    .solo-lector {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      white-space: nowrap;
    }

    main:focus { outline: none; }

    .saltar {
      position: absolute;
      left: -9999px;
      top: 0;
      z-index: 100000;
    }

    .saltar:focus-visible {
      left: 12px;
      top: 12px;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      padding: 12px 18px;
      background: var(--q-forest);
      color: #fff;
      font-family: var(--font-body);
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      outline: 2px solid var(--q-mint);
      outline-offset: 2px;
    }
    /* Movimiento reducido: se conservan los cambios de estado (la gota, los
       resultados) y se quita solo el movimiento continuo o de entrada. */
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      #navbar.scrolled { animation: none; }
      .result-card.show { animation: none; }
    }
