/* ==========================================================================
   IDEALCOMPRA.ES — Stripe / Apple Minimalist Design System (v2 SEO + AdSense)
   Crafted with precision typography, tabular numerals, and zero-latency UI
   ========================================================================== */

/* Fuentes autoalojadas (solo subconjunto latino: cubre ñ, tildes, ¿¡ y €).
   Antes se cargaban de Google Fonts, lo que enviaba la IP de cada visitante a
   Google antes de cualquier consentimiento y contradecía la regla de "cero
   dependencias externas". Licencia SIL OFL. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/assets/fonts/inter-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/instrument-serif-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/assets/fonts/jetbrains-mono-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Surfaces */
  --bg-canvas: #F6F8FA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F5F9;
  --bg-elevated: rgba(255, 255, 255, 0.85);
  --bg-input: #F8FAFC;
  --bg-input-focus: #FFFFFF;

  /* Typography Colors */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #64748B;
  --text-muted: #94A3B8;

  /* Borders & Dividers */
  --border-hairline: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --border-focus: #2563EB;

  /* Brand & Semantic Accents */
  --accent-primary: #0F172A;
  --accent-brand: #EA580C;
  --accent-brand-soft: rgba(234, 88, 12, 0.08);
  --accent-brand-border: rgba(234, 88, 12, 0.22);
  --accent-blue: #2563EB;
  --accent-blue-soft: rgba(37, 99, 235, 0.08);
  --accent-emerald: #059669;
  --accent-emerald-soft: rgba(5, 150, 105, 0.09);
  --accent-emerald-border: rgba(5, 150, 105, 0.24);
  --accent-amber: #D97706;
  --accent-amber-soft: rgba(217, 119, 6, 0.10);
  --accent-rose: #E11D48;
  --accent-rose-soft: rgba(225, 29, 72, 0.08);

  /* Elevation Shadows (Stripe-style multi-layered) */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 12px 32px -4px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 0 0 1px rgba(15, 23, 42, 0.12), 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 24px 48px -8px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 3px rgba(37, 99, 235, 0.16);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Custom Easing Curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* Typography Families */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="dark"] {
  --bg-canvas: #0B0F19;
  --bg-surface: #111827;
  --bg-subtle: #1E293B;
  --bg-elevated: rgba(17, 24, 39, 0.86);
  --bg-input: #0F172A;
  --bg-input-focus: #1E293B;

  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --text-muted: #64748B;

  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #3B82F6;

  --accent-primary: #F8FAFC;
  --accent-brand: #FB923C;
  --accent-brand-soft: rgba(251, 146, 60, 0.12);
  --accent-brand-border: rgba(251, 146, 60, 0.28);
  --accent-blue: #60A5FA;
  --accent-blue-soft: rgba(96, 165, 250, 0.12);
  --accent-emerald: #34D399;
  --accent-emerald-soft: rgba(52, 211, 153, 0.12);
  --accent-emerald-border: rgba(52, 211, 153, 0.28);
  --accent-amber: #FBBF24;
  --accent-amber-soft: rgba(251, 191, 36, 0.12);

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 16px 36px -6px rgba(0, 0, 0, 0.6);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    radial-gradient(at 15% 0%, rgba(234, 88, 12, 0.045) 0px, transparent 45%),
    radial-gradient(at 85% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 45%);
}

.tabular,
input[type="number"],
.metric-value,
.result-big,
.calc-table td,
.badge-mono {
  font-variant-numeric: tabular-nums;
}

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

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER & TRANSLUCENT NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.025em;
  transition: opacity 150ms ease, transform 140ms var(--ease-out);
}

.brand-logo:active {
  transform: scale(0.98);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F97316;
}

.brand-text span {
  color: var(--accent-brand);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: var(--radius-xs);
  transition: color 150ms ease, background-color 150ms ease, transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.045);
  }
}

.nav-link:active {
  transform: scale(0.97);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.065);
  font-weight: 600;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 7px 12px 7px 14px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms var(--ease-out);
}

@media (max-width: 640px) {
  .cmd-kbd {
    display: none;
  }
  .cmd-trigger {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .cmd-trigger:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
  }
}

.cmd-trigger:active {
  transform: scale(0.97);
}

.cmd-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-tertiary);
  border: 1px solid var(--border-hairline);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 32px 0 16px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-xs);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.hero-title {
  font-size: clamp(1.95rem, 3.8vw, 3.05rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  max-width: 780px;
  margin: 0 auto 12px;
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  color: var(--accent-brand);
  letter-spacing: -0.01em;
  padding-right: 4px;
}

.hero-subtitle {
  font-size: clamp(0.96rem, 1.5vw, 1.08rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 22px;
  line-height: 1.5;
}

/* Search & Category Filter Bar */
.hub-controls {
  max-width: 780px;
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.hub-search-input {
  width: 100%;
  height: 54px;
  padding: 0 90px 0 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.hub-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus), var(--shadow-card);
}

.search-shortcut-hint {
  position: absolute;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
  pointer-events: none;
}

.category-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  appearance: none;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cat-pill:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
  }
}

.cat-pill:active {
  transform: scale(0.96);
}

.cat-pill.active {
  background: var(--text-primary);
  color: var(--bg-surface); /* era #FFFFFF: en modo oscuro quedaba blanco sobre casi blanco */
  border-color: var(--text-primary);
}

/* ==========================================================================
   TOOLS DIRECTORY GRID
   ========================================================================== */
@keyframes toolCardEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tools-grid {
  display: grid;
  /* min(): con 335px fijos, en móviles de 375px (327px útiles) la columna se
     salía 8px por la derecha y la tarjeta quedaba cortada. */
  grid-template-columns: repeat(auto-fill, minmax(min(335px, 100%), 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.tools-grid:not(.is-filtered) .tool-card {
  opacity: 0;
  animation: toolCardEnter 260ms var(--ease-out) forwards;
}

.tools-grid:not(.is-filtered) .tool-card:nth-child(1)  { animation-delay: 0ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(2)  { animation-delay: 35ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(3)  { animation-delay: 70ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(4)  { animation-delay: 105ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(5)  { animation-delay: 140ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(6)  { animation-delay: 175ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(7)  { animation-delay: 210ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(8)  { animation-delay: 245ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(9)  { animation-delay: 280ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(10) { animation-delay: 315ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(11) { animation-delay: 350ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(12) { animation-delay: 385ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(13) { animation-delay: 420ms; }
.tools-grid:not(.is-filtered) .tool-card:nth-child(14) { animation-delay: 455ms; }

.tool-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
  }
}

.tool-card:active {
  transform: scale(0.985);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.tool-icon.cat-compras {
  background: var(--accent-brand-soft);
  color: var(--accent-brand);
  border: 1px solid var(--accent-brand-border);
}

.tool-icon.cat-hogar {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.tool-icon.cat-motor {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald-border);
}

.tool-icon.cat-vivienda {
  background: var(--accent-amber-soft);
  color: var(--accent-amber);
  border: 1px solid rgba(217, 119, 6, 0.22);
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.tool-card h2,
.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.tool-card p {
  font-size: 0.91rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 13px;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tool-card-preview {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.tool-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-blue);
  transition: transform 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover .tool-arrow {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   CALCULATOR WORKSPACE
   ========================================================================== */
.calc-page-header {
  padding: 32px 0 24px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms ease;
}

.breadcrumbs a:hover {
  color: var(--text-primary);
}

.calc-h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.calc-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 760px;
  line-height: 1.6;
}

.preset-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

@media (max-width: 640px) {
  .preset-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .preset-label {
    display: none;
  }
  .preset-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .panel-section-title > span:last-child:not(.tool-badge) {
    display: none;
  }
}

.preset-label {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-right: 4px;
}

.preset-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .preset-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: var(--bg-subtle);
  }
}

.preset-btn:active {
  transform: scale(0.96);
}

.preset-btn.active {
  background: var(--text-primary);
  color: var(--bg-surface); /* era #FFFFFF: ilegible en modo oscuro */
  border-color: var(--text-primary);
}

.calc-workspace {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 36px;
}

@media (max-width: 920px) {
  .calc-workspace {
    grid-template-columns: 1fr;
  }
}

.calc-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
}

.calc-results-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  position: sticky;
  top: 84px;
  border-top: 3px solid var(--text-primary);
}

.panel-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-group {
  margin-bottom: 18px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.865rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}

.field-hint {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-blue);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.num-input,
.select-input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.select-input {
  font-family: var(--font-sans);
  padding-right: 32px;
  cursor: pointer;
}

.num-input:focus,
.select-input:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.input-unit {
  position: absolute;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 140ms ease;
}

.input-wrap:focus-within .input-unit {
  color: var(--accent-blue);
}

/* Tactile − and + Stepper Buttons */
.num-input::-webkit-outer-spin-button,
.num-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.num-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-wrap.has-steppers .num-input {
  padding-right: 108px;
}

.input-wrap.has-steppers .input-unit {
  right: 72px;
}

.input-steppers {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.step-btn {
  appearance: none;
  width: 28px;
  height: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  box-shadow: var(--shadow-xs);
  transition:
    background-color 140ms ease,
    color 140ms ease,
    border-color 140ms ease,
    transform 120ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .step-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: var(--border-strong);
  }
}

.step-btn:active {
  transform: scale(0.92);
  background: var(--bg-subtle);
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-blue) var(--slider-pct, 40%), var(--bg-subtle) var(--slider-pct, 40%));
  outline: none;
  margin-top: 10px;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--accent-blue);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  cursor: grab;
  transition: transform 120ms var(--ease-out), box-shadow 120ms ease;
}

.range-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.16);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.15);
}

/* Firefox: sin esto mostraba su control gris por defecto */
.range-slider::-moz-range-track {
  background: transparent;
  border: none;
}
.range-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--accent-blue);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  cursor: grab;
}

/* Intuitive Human Question Tag on Cards */
.card-question {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-brand);
  background: var(--accent-brand-soft);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  margin-bottom: 10px;
}

/* Step Indicator Badges inside Calculators */
.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
  background: var(--accent-blue-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.field-help-text {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 5px;
  line-height: 1.4;
}

/* Mobile Sticky Live Result Bar (Instant feedback without scrolling on phones) */
.mobile-live-bar {
  display: none;
}

@media (max-width: 920px) {
  .mobile-live-bar {
    position: fixed;
    bottom: 14px;
    left: 14px;
    right: 14px;
    z-index: 850;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #FFFFFF;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .mobile-live-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    font-weight: 600;
  }
  .mobile-live-val {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: #34D399;
  }
  .mobile-live-btn {
    background: #FFFFFF;
    color: #0F172A;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
  }
}

/* Results Display */
.result-hero-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 18px;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.result-hero-box.winner-emerald {
  background: var(--accent-emerald-soft);
  border-color: var(--accent-emerald-border);
}

.result-hero-box.winner-amber {
  background: var(--accent-amber-soft);
  border-color: rgba(217, 119, 6, 0.28);
}

.result-hero-box.winner-blue {
  background: var(--accent-blue-soft);
  border-color: rgba(37, 99, 235, 0.24);
}

.result-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.result-big {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 6px;
  transform-origin: left center;
  transition:
    transform 180ms var(--ease-out),
    opacity 180ms var(--ease-out),
    filter 180ms ease;
}

.result-big.preset-transitioning {
  transform: scale(0.985);
  opacity: 0.72;
  filter: blur(1.5px);
}

.result-sub {
  font-size: 0.89rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.metric-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 13px;
}

.metric-card-label {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 3px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bar-comparison {
  margin: 16px 0;
  min-height: 116px;
}

.bar-row {
  margin-bottom: 11px;
}

.bar-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--text-primary);
  transition: width 240ms var(--ease-out);
}

.bar-fill.fill-emerald { background: var(--accent-emerald); }
.bar-fill.fill-brand { background: var(--accent-brand); }
.bar-fill.fill-blue { background: var(--accent-blue); }

/* Action Buttons & Utility Bar */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-hairline);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 140ms var(--ease-out),
    opacity 120ms var(--ease-out),
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.btn.is-morphing {
  transform: scale(0.95);
  opacity: 0.72;
}

.btn-primary.is-confirmed {
  background: #047857;
  border-color: #047857;
  color: #FFFFFF;
}

html[data-theme="dark"] .btn-primary.is-confirmed {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: var(--text-on-inverse);
}

.btn-secondary.is-confirmed {
  color: var(--accent-emerald-text);
  border-color: var(--accent-emerald-border);
  background: var(--accent-emerald-soft);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-surface);
  border: 1px solid var(--text-primary);
  flex: 1 1 calc(50% - 6px);
}

.btn-whatsapp {
  background: #059669;
  color: #FFFFFF;
  border: 1px solid #047857;
  flex: 1 1 calc(50% - 6px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  flex: 1 1 auto;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { opacity: 0.9; }
  .btn-whatsapp:hover { background: #047857; }
  .btn-secondary:hover { color: var(--text-primary); border-color: var(--text-primary); }
}

/* Header Action Group & Theme Toggle */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 140ms var(--ease-out), border-color 150ms ease, color 150ms ease;
}

.theme-toggle-btn:active {
  transform: scale(0.92);
}

.theme-icon-moon { display: block; }
.theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }

/* Programmatic Subpages Scenario Bar */
.subpages-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.subpages-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.subpage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  transition: transform 120ms var(--ease-out), background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.subpage-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.subpage-pill.active {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* Hero Trust Metrics Strip */
.hero-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px auto 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust-item strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Saved Calculations Drawer */
.saved-calcs-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  margin-bottom: 36px;
  display: none;
}

.saved-calcs-box.has-items {
  display: block;
}

.saved-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.saved-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.saved-item.is-new {
  opacity: 1;
  transform: translateY(0) scale(1);
  border-color: var(--accent-emerald-border);
  transition:
    opacity 220ms var(--ease-out),
    transform 220ms var(--ease-out),
    border-color 600ms ease;

  @starting-style {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

.saved-item-title {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.saved-item-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.saved-item-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   SEO CONTENT, FORMULAS, TABLES & FAQ
   ========================================================================== */
.seo-content-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
  margin-bottom: 48px;
}

@media (max-width: 640px) {
  .seo-content-section {
    padding: 24px;
  }
}

.seo-content-section h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 30px 0 12px;
  color: var(--text-primary);
}

.seo-content-section h2:first-child {
  margin-top: 0;
}

.seo-content-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 22px 0 8px;
  color: var(--text-primary);
}

.seo-content-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.72;
}

.seo-content-section ul,
.seo-content-section ol {
  margin: 0 0 20px 22px;
  color: var(--text-secondary);
}

.seo-content-section li {
  margin-bottom: 8px;
  line-height: 1.65;
}

.formula-callout {
  background: var(--bg-canvas);
  border-left: 4px solid var(--accent-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.calc-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.calc-table th {
  background: var(--bg-subtle);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-hairline);
}

.calc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-secondary);
}

.calc-table tr:last-child td {
  border-bottom: none;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.faq-item {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  overflow: hidden;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.faq-item[open] {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  transition: transform 200ms var(--ease-out), color 150ms ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  color: var(--text-primary);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 200ms var(--ease-out),
    transform 200ms var(--ease-out);

  @starting-style {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Author / Methodology E-E-A-T Box */
.eeat-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   GDPR / GOOGLE CONSENT MODE V2 BANNER
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0F172A;
  color: #F8FAFC;
  z-index: 950;
  padding: 16px 0;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: none;
}

.cookie-banner.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 240ms var(--ease-out),
    transform 240ms var(--ease-out);

  @starting-style {
    opacity: 0;
    transform: translateY(16px);
  }
}

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #CBD5E1;
}

.cookie-text a {
  color: #93C5FD;
  text-decoration: underline;
}

.cookie-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-btn {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

.cookie-btn:active {
  transform: scale(0.97);
}

.cookie-btn-accept {
  background: #2563EB;
  color: #FFFFFF;
}

.cookie-btn-reject {
  background: rgba(255, 255, 255, 0.1);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   TOAST & COMMAND PALETTE
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: var(--text-on-inverse);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out);
  z-index: 999;
}

.toast-notification.visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .toast-notification {
    left: 14px;
    right: 14px;
    bottom: calc(20px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media (max-width: 920px) {
  .page-calc .toast-notification {
    top: calc(76px + env(safe-area-inset-top));
    bottom: auto;
    left: 14px;
    right: 14px;
    text-align: center;
    transform: translateY(-140%);
  }
  .page-calc .toast-notification.visible {
    transform: translateY(0);
  }
}

.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.cmd-backdrop.open { display: flex; }

.cmd-modal {
  width: 100%;
  max-width: 600px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  border: 1px solid var(--border-strong);
  overflow: hidden;
  margin: 0 16px;
}

.cmd-input-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.cmd-input {
  width: 100%;
  border: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  outline: none;
}

.cmd-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  list-style: none;
}

.cmd-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.cmd-item a:hover,
.cmd-item a:focus {
  background: var(--bg-subtle);
  outline: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  padding: 52px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }

.footer-col a,
.footer-link-btn {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.86rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
  transition: color 150ms ease;
}

.footer-col a:hover,
.footer-link-btn:hover {
  color: var(--text-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* Print Stylesheet for PDF Export */
@media print {
  .site-header, .site-footer, .preset-bar, .result-actions, .cookie-banner, .range-slider {
    display: none !important;
  }
  body { background: #FFFFFF !important; }
  .calc-workspace { grid-template-columns: 1fr 1fr !important; }
  .calc-panel, .calc-results-panel, .seo-content-section {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .eyebrow-dot {
    animation: none;
  }
  .tool-card,
  .cmd-backdrop.open .cmd-modal,
  .faq-answer,
  .saved-item.is-new,
  .cookie-banner.show,
  .toast-notification {
    animation: none !important;
    transform: none !important;
    transition: opacity 150ms ease !important;
  }
  .result-big.preset-transitioning {
    transform: none;
    filter: none;
  }
  .btn:active,
  .step-btn:active,
  .preset-btn:active,
  .cat-pill:active,
  .cmd-trigger:active {
    transform: none;
  }
}

/* ==========================================================================
   MEJORAS DE DISEÑO Y EXPERIENCIA — 24/10/2026
   Móvil primero: que la primera pantalla muestre calculadoras, objetivos
   táctiles de 44px (guía de Apple), menú en móvil y foco visible.
   ========================================================================== */

/* Foco visible para quien navega con teclado (los inputs ya tienen el suyo) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.range-slider:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- Atajo de teclado: no tiene sentido sin teclado físico --- */
@media (hover: none), (pointer: coarse) {
  .cmd-kbd,
  .search-shortcut-hint {
    display: none;
  }
  .hub-search-input {
    padding-right: 18px;
  }
}

/* --- Menú de navegación en móvil --- */
.nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: transform 140ms var(--ease-out), border-color 150ms ease;
  }
  .nav-toggle:active {
    transform: scale(0.94);
  }
  .nav-toggle-close {
    display: none;
  }
  .site-header.nav-open .nav-toggle-open {
    display: none;
  }
  .site-header.nav-open .nav-toggle-close {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-hairline);
    box-shadow: 0 18px 36px -14px rgba(15, 23, 42, 0.22);
    padding: 8px 16px 16px;
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .site-header.nav-open .site-nav {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 12px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
  .nav-link.active {
    background: var(--bg-subtle);
  }
}

/* --- Cabecera compacta en móvil --- */
@media (max-width: 640px) {
  .header-inner {
    gap: 10px;
  }
  .brand-logo {
    min-height: 44px;
  }
  .cmd-trigger {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  .cmd-trigger-text {
    display: none;
  }
  .theme-toggle-btn {
    width: 44px;
    height: 44px;
  }
  /* En la portada ya está el buscador grande: el de la cabecera solo
     aparece cuando ese buscador sale de la pantalla al hacer scroll. */
  .page-home:not(.hero-search-out) .cmd-trigger {
    display: none;
  }
}

/* --- Portada en móvil: calculadoras visibles en la primera pantalla --- */
@media (max-width: 640px) {
  .hero {
    padding: 20px 0 8px;
  }
  .hero-eyebrow {
    font-size: 0.75rem;
    padding: 4px 12px;
    margin-bottom: 12px;
  }
  .eyebrow-extra {
    display: none;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }
  .hub-controls {
    gap: 10px;
    margin-bottom: 20px;
  }
  .hub-search-input {
    height: 50px;
  }
  /* Categorías en una sola fila deslizable en vez de cinco filas apiladas */
  .category-pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin: 0 -24px;
    padding: 2px 24px 6px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 24px; /* sin esto, el enganche desplazaba la fila 24px y pegaba la 1ª píldora al borde */
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
  }
  .category-pills::-webkit-scrollbar {
    display: none;
  }
  .cat-pill {
    flex-shrink: 0;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .hero-trust-strip {
    gap: 6px 14px;
    margin-top: 2px;
    font-size: 0.76rem;
  }
  .trust-detail {
    display: none;
  }
  .tools-grid {
    gap: 14px;
  }
  .tool-card {
    padding: 20px;
  }
}

/* --- Calculadora: fila de ejemplos limpia en móvil --- */
@media (max-width: 640px) {
  .preset-bar {
    margin: 0 -24px 16px;
    padding: 2px 24px 4px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 24px; /* sin esto, el enganche desplazaba la fila 24px y pegaba la 1ª píldora al borde */
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 20px, #000 calc(100% - 28px), transparent 100%);
  }
  .preset-bar::-webkit-scrollbar {
    display: none;
  }
  .preset-btn {
    scroll-snap-align: start;
  }
  .calc-page-header {
    padding: 20px 0 16px;
  }
}

/* --- Casos concretos: ahora debajo de la calculadora, como tarjeta --- */
.subpages-bar {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 36px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
}
.subpages-label {
  margin: 0;
}
.subpages-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Barra fija de resultado en móvil --- */
@media (max-width: 920px) {
  .mobile-live-bar {
    bottom: calc(14px + env(safe-area-inset-bottom));
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
  }
  .mobile-live-bar.is-hidden {
    opacity: 0;
    transform: translateY(calc(100% + 24px));
    pointer-events: none;
  }
  /* Al final de la página, que la barra no tape el pie */
  .page-calc .site-footer {
    padding-bottom: 112px;
  }
}

/* --- Banner de cookies más compacto en móvil (ocupaba ~30% de la pantalla) --- */
@media (max-width: 640px) {
  .cookie-banner {
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  }
  .cookie-inner {
    gap: 10px;
  }
  .cookie-text {
    min-width: 0;
    font-size: 0.8rem;
  }
  .cookie-btns {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Objetivos táctiles de 44px en pantallas táctiles --- */
@media (pointer: coarse) {
  .cat-pill,
  .preset-btn,
  .subpage-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .num-input,
  .select-input {
    height: 52px;
  }
  .step-btn {
    width: 42px;
  }
  .input-wrap.has-steppers .num-input {
    padding-right: 140px;
  }
  .input-wrap.has-steppers .input-unit {
    right: 100px;
  }
  .range-slider {
    height: 10px;
    margin-top: 16px;
  }
  .range-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  .range-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }
  .btn,
  .cookie-btn {
    min-height: 44px;
  }
  .mobile-live-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .faq-item summary {
    min-height: 52px;
  }
  .footer-col li {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav,
  .mobile-live-bar {
    transition: opacity 150ms ease !important;
    transform: none !important;
  }
  .nav-toggle:active {
    transform: none;
  }
}

/* ==========================================================================
   AUDITORÍA VISUAL — 24/10/2026
   Modo oscuro, contraste AA, foco visible y coherencia de colores.
   ========================================================================== */
:root {
  --text-on-inverse: #FFFFFF;
  --accent-brand-text: #C2410C;   /* naranja de marca para TEXTO pequeño: 4,7:1 (el #EA580C daba 3,2:1) */
  --accent-emerald-text: #047857; /* verde esmeralda para TEXTO pequeño: 5,48:1 (el #059669 daba 3,77:1) */
  --text-tertiary: #5B6B82;       /* era #64748B: 4,3-4,5:1 sobre los grises claros, no llegaba a AA */
  --hover-tint: rgba(15, 23, 42, 0.05);
  --accent-blue-border: rgba(37, 99, 235, 0.22);
  --accent-amber-border: rgba(217, 119, 6, 0.24);
  color-scheme: light;
}
html[data-theme="dark"] {
  --text-on-inverse: #0F172A;
  --accent-brand-text: #FB923C;
  --accent-emerald-text: #34D399;
  --text-tertiary: #94A3B8;
  --hover-tint: rgba(255, 255, 255, 0.06);
  --accent-blue-border: rgba(96, 165, 250, 0.28);
  --accent-amber-border: rgba(251, 191, 36, 0.28);
  --accent-rose: #FB7185;
  color-scheme: dark; /* selects, scrollbars y la ✕ de búsqueda salían en claro en modo oscuro */
}

/* Modo oscuro: el buscador ⌘K heredaba fondo claro */
.cmd-input {
  background: transparent;
}

/* Foco visible en tarjetas y en el control deslizante */
.tool-card:focus-visible {
  outline-offset: 3px;
}
.range-slider:focus-visible {
  outline: none;
}
.range-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 5px var(--accent-blue-soft), 0 2px 6px rgba(15, 23, 42, 0.22);
}
.range-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 5px var(--accent-blue-soft);
}

/* Las tarjetas de la portada heredaban el texto centrado del hero; en
   categorías y "relacionadas" iban a la izquierda. Mismo aspecto en todas. */
.tools-grid {
  text-align: left;
}
.tool-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tools-grid:not(.is-filtered) .tool-card:nth-child(n+15) {
  animation-delay: 490ms; /* las tarjetas 15-18 aparecían antes que las 5-14 */
}

/* Contraste AA del texto naranja pequeño (pregunta de cada tarjeta y H1) */
.card-question {
  color: var(--accent-brand-text);
}

/* Calculadora de precio por kilo: filas de 3 columnas que en móvil se
   apretaban a ~78px (el select mostraba solo "G") */
.field-row--3 {
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
}
.field-row--spaced {
  margin-bottom: 22px;
}
@media (max-width: 560px) {
  .field-row--3 {
    grid-template-columns: 1fr 1fr;
  }
  .field-row--3 > :last-child {
    grid-column: 1 / -1;
  }
}
input.num-input[type="text"] {
  font-family: var(--font-sans); /* "Envase estándar (500 g)" no es una cifra: no en monoespaciada */
}

/* Panel de resultados: el borde superior de 3px se afilaba en las esquinas
   y en oscuro era una barra blanca */
.calc-results-panel {
  border-top: 0;
  box-shadow: inset 0 3px 0 var(--accent-emerald), var(--shadow-card);
}

/* Un color, una función: el azul es "se puede pulsar", no texto fijo */
.field-hint {
  color: var(--text-tertiary);
}
.step-badge {
  color: var(--text-secondary);
  background: var(--bg-subtle);
}
.subpage-pill.active {
  background: var(--text-primary);
  color: var(--text-on-inverse);
  border-color: var(--text-primary);
}

/* Resultado principal más legible en móvil; cifras sin partir en dos líneas.
   "La cifra manda": el número mantiene todo el peso (700) y la unidad acompaña. */
.result-big {
  font-size: clamp(1.45rem, 2.2vw + 0.8rem, 2.4rem);
  text-wrap: balance;
}
.result-big .result-unit {
  font-family: var(--font-sans);
  font-size: 0.56em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  white-space: nowrap;
}
.metric-value,
.bar-row-header > span:last-child {
  white-space: nowrap;
}
.metric-value {
  font-size: 1rem;
}

/* WhatsApp: texto blanco sobre #059669 daba 3,8:1 */
.btn-whatsapp {
  background: #047857;
  border-color: #065F46;
}
@media (hover: hover) and (pointer: fine) {
  .btn-whatsapp:hover {
    background: #065F46;
  }
}
.btn-small {
  height: 36px;
  font-size: 0.8125rem;
}

/* Estados que desaparecían en modo oscuro (rgba fijos en vez de tokens) */
.nav-link.active,
.nav-link:hover {
  background: var(--hover-tint);
}
.tool-icon.cat-hogar,
.result-hero-box.winner-blue {
  border-color: var(--accent-blue-border);
}
.tool-icon.cat-vivienda,
.result-hero-box.winner-amber {
  border-color: var(--accent-amber-border);
}

/* Logotipo: en oscuro se fundía con la cabecera; el punto usa el naranja de marca */
.brand-mark::after {
  background: var(--accent-brand);
}
html[data-theme="dark"] .brand-mark {
  background: linear-gradient(135deg, #1E293B, #334155);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* El naranja de marca no debe significar "la opción mala" en las gráficas */
.bar-fill.fill-brand {
  background: var(--accent-amber);
}

/* En táctil el :hover se queda "pegado" tras tocar */
@media (hover: none) {
  .breadcrumbs a:hover,
  .footer-col a:hover,
  .footer-link-btn:hover {
    color: var(--text-secondary);
  }
  .subpage-pill:not(.active):hover {
    color: var(--text-secondary);
    border-color: var(--border-hairline);
  }
}

/* Separación entre filas de campos consecutivas (en móvil se pegaban) */
.field-row + .field-row {
  margin-top: 14px;
}

/* Barra fija móvil: el veredicto cabe en dos líneas como mucho. En una
   sola se cortaba ("0,82 € / mes de hi…") y se perdía la unidad. */
@media (max-width: 920px) {
  .mobile-live-bar > div:first-child {
    min-width: 0;
  }
  .mobile-live-val {
    font-size: 0.95rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-wrap: balance;
  }
}

/* ==========================================================================
   AUDITORÍA UX — 24/10/2026
   Estados vacíos, errores de campo, acciones en dos niveles, impresión y
   movimiento reducido.
   ========================================================================== */
.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;
}

/* Con "reduce", la regla general quitaba la animación pero dejaba las
   tarjetas en opacity:0: la portada salía vacía. Ahora la animación solo
   existe si el sistema la permite, y el estado base es visible. */
.tools-grid:not(.is-filtered) .tool-card {
  opacity: 1;
  animation: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tools-grid:not(.is-filtered) .tool-card {
    animation: toolCardEnter 260ms var(--ease-out) both;
  }
}

/* --- Sin resultados de búsqueda --- */
.hub-empty[hidden],
.cmd-empty[hidden] {
  display: none;
}
.hub-empty {
  margin: -24px 0 56px;
  padding: 40px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  text-wrap: balance;
}
.hub-empty-title {
  margin-bottom: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.hub-empty a {
  color: var(--accent-blue);
  font-weight: 600;
}
.cmd-empty {
  padding: 22px 18px 26px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-wrap: balance;
}

/* --- Errores de campo --- */
.field-error {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--accent-rose);
}
.num-input[aria-invalid="true"],
.num-input[aria-invalid="true"]:focus {
  border-color: var(--accent-rose);
  box-shadow: 0 0 0 3px var(--accent-rose-soft);
}

/* --- Acciones del resultado: compartir arriba, el resto discreto debajo.
   Seis botones iguales competían entre sí; ahora hay una acción clara. --- */
.result-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.result-actions-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.result-actions-main .btn {
  width: 100%;
}
.result-actions-more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
}
.btn-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 4px;
  border-radius: var(--radius-xs);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease, transform 140ms var(--ease-out);
}
.btn-link:hover {
  color: var(--text-primary);
}
.btn-link:active {
  transform: scale(0.97);
}
.btn-link.is-confirmed {
  color: var(--accent-emerald-text);
  font-weight: 600;
}
@media (pointer: coarse) {
  .btn-link {
    min-height: 44px;
    padding: 0 6px;
  }
}

/* --- Simulaciones guardadas: ahora son enlaces que restauran el cálculo --- */
.saved-calcs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.saved-calcs-title {
  font-size: 1.1rem;
  font-weight: 700;
}
a.saved-item {
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, transform 140ms var(--ease-out);
}
a.saved-item:hover {
  border-color: var(--border-strong);
}
a.saved-item:active {
  transform: scale(0.98);
}

/* --- Clases semánticas (cero estilos en línea en plantillas) --- */
.num-input--compact {
  padding-right: 14px;
}
.panel-section-title--divider,
.field-row--divider {
  border-top: 1px solid var(--border-hairline);
  padding-top: 18px;
}
.footer-brand {
  margin-bottom: 12px;
}
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.86rem;
  max-width: 300px;
  margin-bottom: 12px;
}
.footer-contact {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}
.footer-contact a {
  display: inline;
}
.footer-divider {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}
.scenarios-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 28px;
}
.eeat-link {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}
.eeat-link:hover {
  text-decoration: underline;
}
.related-section {
  margin-bottom: 56px;
}
.related-heading {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.related-section .tools-grid {
  margin-bottom: 0;
}
.page-main {
  padding-top: 38px;
  padding-bottom: 64px;
}
.cat-lead {
  margin-bottom: 32px;
}
.cat-seo-section {
  margin-top: 24px;
  margin-bottom: 0;
}
.cat-other-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.legal-h1 {
  margin-bottom: 18px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  margin-top: 16px;
}
textarea.num-input {
  height: auto;
  padding: 12px 14px;
  font-family: var(--font-sans);
}
.btn-inline-cta {
  max-width: 280px;
}
.print-meta {
  display: none;
}

/* --- Cookies: "Rechazar" con el mismo peso visual que "Aceptar" (lo exige
   la AEPD: rechazar no puede ser más difícil ni menos visible) --- */
.cookie-btn-reject {
  background: #FFFFFF;
  color: #0F172A;
  border: 0;
}

/* --- Menú móvil: velo oscuro bajo el desplegable --- */
@media (max-width: 900px) {
  .site-nav {
    z-index: 1;
  }
  .site-header::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100vh;
    background: rgba(15, 23, 42, 0.32);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms var(--ease-out), visibility 0s linear 180ms;
  }
  .site-header.nav-open::after {
    opacity: 1;
    visibility: visible;
    transition: opacity 180ms var(--ease-out), visibility 0s;
  }
}

/* --- Impresión: solo el formulario, el resultado y la referencia de fecha/URL --- */
@media print {
  .mobile-live-bar,
  .toast-notification,
  .cmd-backdrop,
  .subpages-bar,
  .seo-content-section,
  .tools-grid,
  .saved-calcs-box,
  .nav-toggle,
  .hub-empty,
  .step-btn,
  .input-steppers,
  .panel-section-title > span:not(.step-badge),
  .related-section,
  main section:has(.tools-grid) {
    display: none !important;
  }
  .print-meta {
    display: block;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #475569;
  }
  .page-calc .site-footer {
    padding-bottom: 0;
  }
}
