:root {
  --ink-950: #102A2A;
  --ink-800: #254646;
  --ink-600: #527070;
  --paper-50: #F7F8F3;
  --paper-100: #EEF1E8;
  --white: #FFFFFF;
  --teal-700: #146C66;
  --teal-600: #1B7F78;
  --teal-100: #DDEFEA;
  --lime-400: #B7D84B;
  --lime-100: #EEF6CE;
  --amber-600: #B76A17;
  --amber-100: #FFF0D5;
  --red-600: #B5483F;
  --red-100: #FBE5E2;
  --border: #D8DED3;
  --shadow: rgba(16,42,42,.06);
  --header-bg: rgba(247,248,243,.9);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --ink-950: #EAF2F1;
  --ink-800: #C7D6D5;
  --ink-600: #93A8A7;
  --paper-50: #0E1716;
  --paper-100: #16211F;
  --white: #182726;
  --teal-700: #4FBDB4;
  --teal-600: #3FA69D;
  --teal-100: #1E3634;
  --lime-400: #B7D84B;
  --lime-100: #2A3320;
  --amber-600: #E3A65C;
  --amber-100: #3A2E17;
  --red-600: #E58579;
  --red-100: #3A201D;
  --border: #29403D;
  --shadow: rgba(0,0,0,.35);
  --header-bg: rgba(14,23,22,.85);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink-950: #EAF2F1;
    --ink-800: #C7D6D5;
    --ink-600: #93A8A7;
    --paper-50: #0E1716;
    --paper-100: #16211F;
    --white: #182726;
    --teal-700: #4FBDB4;
    --teal-600: #3FA69D;
    --teal-100: #1E3634;
    --lime-400: #B7D84B;
    --lime-100: #2A3320;
    --amber-600: #E3A65C;
    --amber-100: #3A2E17;
    --red-600: #E58579;
    --red-100: #3A201D;
    --border: #29403D;
    --shadow: rgba(0,0,0,.35);
    --header-bg: rgba(14,23,22,.85);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper-50);
  color: var(--ink-950);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.625;
  transition: background .15s, color .15s;
}
h1, h2, h3, .display {
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 700;
  color: var(--ink-950);
  margin: 0 0 16px;
}
.display { font-size: 56px; line-height: 60px; letter-spacing: -0.03em; }
h1 { font-size: 42px; line-height: 48px; }
h2 { font-size: 32px; line-height: 38px; }
h3 { font-size: 22px; line-height: 28px; font-weight: 600; }
p { max-width: 68ch; }
.small { font-size: 14px; line-height: 21px; color: var(--ink-600); }
.label {
  font-size: 12px; line-height: 16px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-700);
}
.tabular { font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
  .display { font-size: 34px; line-height: 38px; }
  h1 { font-size: 30px; line-height: 36px; }
  h2 { font-size: 26px; line-height: 32px; }
  h3 { font-size: 19px; line-height: 25px; }
  body { font-size: 15px; }
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 768px) { .container { padding: 0 16px; } }

.section { padding: 88px 0; }
@media (max-width: 1024px) { .section { padding: 64px 0; } }
@media (max-width: 768px) { .section { padding: 40px 0; } }
.section--white { background: var(--white); }
.section--tint { background: var(--paper-100); }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 40; min-height: 72px;
  display: flex; align-items: center;
  background: var(--header-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-950); font-family: "Manrope"; font-weight: 700; font-size: 18px; }
.logo svg { color: var(--ink-950); flex-shrink: 0; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-800); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--teal-700); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  background: transparent; border: 1px solid transparent; cursor: pointer; color: var(--ink-950);
}
.icon-btn:hover { background: var(--paper-100); }
.nav-toggle { display: none; }
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
@media (max-width: 768px) {
  .header-actions .btn--primary { padding: 0 14px; font-size: 14px; }
  .nav-toggle { display: inline-flex; }
  .site-header { position: sticky; }
  .nav-links {
    display: none; position: absolute; top: 100%; right: 16px; left: 16px;
    margin-top: 8px; flex-direction: column; gap: 0; background: var(--white);
    border: 1px solid var(--border); border-radius: 16px; padding: 8px;
    box-shadow: 0 18px 48px var(--shadow); z-index: 50;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 14px; border-radius: 10px; }
  .nav-links a:hover, .nav-links a.active { background: var(--teal-100); }
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--primary { background: var(--teal-700); color: var(--white); }
.btn--primary:hover { background: var(--teal-600); }
:root[data-theme="dark"] .btn--primary { color: var(--ink-950); }
.btn--secondary { background: var(--white); color: var(--ink-950); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--teal-700); }
.btn--tertiary { background: transparent; color: var(--teal-700); border: none; padding: 0; height: auto; }
.btn--tertiary:hover { text-decoration: underline; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal-600); outline-offset: 2px;
}

/* Tarjetas */
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 1px 2px var(--shadow); transition: border-color .15s;
}
a.card, a.pick-card {
  display: block; text-decoration: none; color: inherit;
}
.card:hover { border-color: var(--teal-600); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  background: var(--teal-100); color: var(--teal-700); font-size: 13px; font-weight: 600;
}
.chip--amber { background: var(--amber-100); color: var(--amber-600); }
.chip--red { background: var(--red-100); color: var(--red-600); }

/* Grid utilitario */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1024px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

/* Hero */
.hero { background: var(--paper-50); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 1024px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow { color: var(--teal-700); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; margin-bottom: 16px; }
.hero-actions { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 768px) { .hero-actions .btn { width: 100%; } .hero-actions { flex-direction: column; } }

/* Franja de confianza */
.trust-strip { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; padding: 24px 0; border-bottom: 1px solid var(--border); }
.trust-strip span { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-800); font-size: 14px; }
@media (max-width: 768px) { .trust-strip { gap: 16px 24px; padding: 16px; } .trust-strip span { font-size: 13px; } }

/* Tarjetas de selección */
.pick-card {
  min-height: 96px; min-width: 160px; padding: 18px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--white); cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  transition: border-color .15s, background .15s;
}
.pick-card:hover { border-color: var(--teal-600); background: var(--teal-100); }
.pick-card.selected { background: var(--teal-100); border-color: var(--teal-600); }
.pick-card svg { color: var(--teal-700); }
@media (max-width: 768px) { .pick-card { width: 100%; min-height: 64px; } }

/* Formularios */
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 15px; }
.help { color: var(--ink-600); font-size: 14px; margin-top: 6px; }
input[type=text], input[type=number], select {
  height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--border); padding: 0 14px; font-size: 16px; background: var(--white); color: var(--ink-950);
}
.field { margin-bottom: 20px; }
.error-text { color: var(--red-600); font-size: 14px; margin-top: 6px; display: flex; gap: 6px; align-items: center; }

/* Wizard */
.wizard-shell { max-width: 720px; margin: 0 auto; }
.progress-track { height: 6px; background: var(--paper-100); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.progress-fill { height: 100%; background: var(--teal-600); transition: width .2s; }
.wizard-step-label { font-size: 14px; color: var(--ink-600); margin-bottom: 28px; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }
@media (max-width: 480px) { .wizard-nav .btn { flex: 1; } }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }

/* Resultado */
.result-card { position: relative; padding: 28px; overflow: hidden; }
.result-card--top { border-top: 4px solid var(--teal-700); }
.result-price { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-capacity { font-size: 32px; font-weight: 700; color: var(--teal-700); font-variant-numeric: tabular-nums; }
.reason-list { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.reason-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.reason-list li svg { color: var(--teal-700); flex-shrink: 0; margin-top: 3px; }
.limitations { background: var(--amber-100); border-radius: 10px; padding: 14px 16px; margin-top: 16px; font-size: 14px; color: var(--ink-800); }

/* Tabla */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
thead th { background: var(--paper-100); text-align: left; padding: 14px 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-600); white-space: nowrap; }
tbody td, tbody th { padding: 14px 16px; min-height: 56px; border-bottom: 1px solid var(--border); font-size: 15px; text-align: left; white-space: nowrap; }
tbody tr td.better { background: var(--lime-100); }
tbody tr td.worse { background: var(--amber-100); }

/* Catálogo */
.catalog-shell { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
@media (max-width: 768px) { .catalog-shell { grid-template-columns: 1fr; } }

/* Pie */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; background: var(--paper-100); min-height: 320px; }
@media (max-width: 768px) { .site-footer { min-height: 460px; } }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-grid a { color: var(--ink-600); text-decoration: none; font-size: 14px; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--teal-700); }
.legal-bar { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-bar a { color: var(--ink-600); text-decoration: none; font-size: 13px; }
.legal-bar a:hover { color: var(--teal-700); }
@media (max-width: 768px) { .footer-grid { gap: 24px; } .footer-grid > div { min-width: 45%; } }

/* Blog */
.prose p { margin: 0 0 16px; }
.prose h2 { margin-top: 32px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose table { margin: 0 0 16px; }
.prose blockquote { border-left: 3px solid var(--teal-600); margin: 0 0 16px; padding: 4px 16px; color: var(--ink-800); }
.prose code { background: var(--paper-100); border-radius: 4px; padding: 2px 6px; font-size: 14px; }
.prose pre { background: var(--paper-100); border-radius: 10px; padding: 16px; overflow-x: auto; margin: 0 0 16px; }
.prose pre code { background: none; padding: 0; }
.blog-product { padding: 18px; margin: 24px 0; }

/* Panel de administración */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.admin-tab {
  background: none; border: none; cursor: pointer; padding: 10px 16px;
  font-weight: 600; font-size: 15px; color: var(--ink-600); border-bottom: 2px solid transparent;
}
.admin-tab:hover { color: var(--ink-950); }
.admin-tab.active { color: var(--teal-700); border-bottom-color: var(--teal-700); }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .editor-split { grid-template-columns: 1fr; } }
.editor-textarea {
  width: 100%; min-height: 480px; border-radius: 12px; border: 1px solid var(--border);
  padding: 14px; font-size: 14px; line-height: 1.6; font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--white); color: var(--ink-950); resize: vertical;
}
.editor-preview {
  min-height: 480px; max-height: 720px; overflow-y: auto; border-radius: 12px;
  border: 1px solid var(--border); padding: 16px; background: var(--paper-100);
}
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px; border: 1px solid var(--border); border-radius: 10px 10px 0 0; border-bottom: none;
  background: var(--paper-100);
}
.editor-toolbar button {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent;
  background: var(--white); color: var(--ink-950); font-size: 13px; font-weight: 600; cursor: pointer;
}
.editor-toolbar button:hover { border-color: var(--teal-600); }
.editor-toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.editor-split .editor-textarea { border-radius: 0 0 12px 12px; }
.amazon-picker {
  display: flex; gap: 8px; align-items: center; padding: 10px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--teal-100);
}
.amazon-picker select { height: 36px; flex: 1; }
.editor-help { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; }
.editor-help summary { cursor: pointer; font-weight: 600; }
.editor-help-body { margin-top: 12px; }
.editor-help-body table { font-size: 14px; }
.editor-help-body code { white-space: nowrap; }

/* Estilos de énfasis insertables desde el editor (se ven igual en la vista previa
   del admin y en el artículo publicado, porque marked deja pasar el HTML tal cual). */
.text-highlight-lg { font-size: 1.3em; font-weight: 700; line-height: 1.3; }
.text-highlight-accent { color: var(--teal-700); font-weight: 600; }
.text-highlight-warn { color: var(--amber-600); font-weight: 600; }

/* Espacios reservados para Google AdSense: sin ningún estilo visible.
   Quedan vacíos e invisibles para los visitantes hasta que se inserte dentro
   el bloque real <ins class="adsbygoogle">…</ins> con tu ad-client/slot. */
.ad-slot:empty { display: block; margin: 0; padding: 0; border: 0; }

/* Estados vacíos */
.empty-state { text-align: center; padding: 56px 24px; color: var(--ink-600); }

/* Utilidades */
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}
.mb-0{margin-bottom:0}
.text-center{text-align:center}
.flex{display:flex} .items-center{align-items:center} .gap-8{gap:8px} .gap-16{gap:16px} .justify-between{justify-content:space-between}
.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; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
