:root {
  --ink: #17212b;
  --muted: #5d6874;
  --surface: #ffffff;
  --soft: #f4f7f8;
  --line: #dbe3e7;
  --brand: #145b63;
  --brand-dark: #0c444b;
  --accent: #e7a33a;
  --focus: #ffb53b;
  --shadow: 0 10px 28px rgba(23, 33, 43, .08);
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img, svg { max-width: 100%; }
.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.skip-link { position: absolute; left: -10000px; top: auto; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 999; padding: .7rem 1rem; background: #fff; border-radius: .5rem; box-shadow: var(--shadow); }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.header-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: white; box-shadow: 0 6px 16px rgba(20,91,99,.22); }
.brand-mark svg { width: 22px; height: 22px; }
.brand small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .02em; }
.menu-toggle { display: none; border: 1px solid var(--line); background: white; border-radius: 10px; padding: .55rem .7rem; font: inherit; color: var(--ink); }
.primary-nav ul { list-style: none; display: flex; gap: .15rem; padding: 0; margin: 0; }
.primary-nav a { color: var(--ink); text-decoration: none; display: inline-block; padding: .55rem .72rem; border-radius: 9px; font-size: .92rem; font-weight: 650; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: var(--soft); color: var(--brand-dark); }

.hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 4rem; background: linear-gradient(135deg, #eef7f7, #f8fbfb 55%, #fff7ea); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.eyebrow { display: inline-flex; gap: .45rem; align-items: center; margin: 0 0 1rem; color: var(--brand-dark); font-size: .84rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow::before { content: ""; width: .55rem; height: .55rem; background: var(--accent); border-radius: 50%; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.035em; margin: 0 0 .8rem; }
h1 { font-size: clamp(2.2rem, 5vw, 4.55rem); max-width: 13ch; }
h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); }
h3 { font-size: 1.18rem; }
.hero p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 57ch; color: #394551; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: .72rem 1.05rem; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 780; cursor: pointer; }
.button-primary { background: var(--brand); color: white; box-shadow: 0 7px 18px rgba(20,91,99,.2); }
.button-primary:hover { background: var(--brand-dark); color: white; }
.button-secondary { color: var(--brand-dark); background: white; border-color: var(--line); }
.button-secondary:hover { border-color: var(--brand); background: #fbfdfd; }
.hero-note { margin: 1.1rem 0 0; font-size: .88rem; color: var(--muted); }
.hero-visual { min-height: 310px; position: relative; display: grid; place-items: center; }
.paper-stack { position: relative; width: min(100%, 400px); height: 290px; }
.paper { position: absolute; background: white; border: 1px solid #dbe5e7; border-radius: 16px; box-shadow: var(--shadow); }
.paper.one { width: 260px; height: 205px; left: 34px; top: 47px; transform: rotate(-7deg); }
.paper.two { width: 280px; height: 218px; right: 15px; top: 35px; transform: rotate(5deg); }
.paper.main { width: 270px; height: 230px; left: 72px; top: 23px; padding: 23px; transform: rotate(-1deg); }
.paper .bar { height: 11px; border-radius: 99px; background: #d9eff0; margin-bottom: 12px; }
.paper .bar.dark { background: var(--brand); width: 62%; height: 17px; margin-bottom: 23px; }
.paper .bar.short { width: 60%; }
.paper .check { display: flex; align-items: center; gap: 9px; color: #3b4a53; font-weight: 750; margin: 12px 0; font-size: .88rem; }
.paper .check span { width: 17px; height: 17px; border-radius: 6px; background: #eaf5f4; border: 2px solid #74afb0; position: relative; }
.paper .check span::after { content: ""; position: absolute; width: 7px; height: 3px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); left: 3px; top: 3px; transform: rotate(-45deg); }
.visual-chip { position: absolute; right: -4px; bottom: 9px; padding: .55rem .8rem; border-radius: 999px; color: var(--brand-dark); background: #fff7e9; border: 1px solid #f4dca8; font-weight: 800; font-size: .84rem; box-shadow: 0 7px 18px rgba(108,74,12,.12); }

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section-soft { background: var(--soft); }
.section-head { max-width: 720px; margin-bottom: 2.1rem; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.45rem; box-shadow: 0 3px 10px rgba(23,33,43,.025); }
.card:hover { border-color: #b9cdd0; box-shadow: var(--shadow); transform: translateY(-2px); transition: .18s ease; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 1.1rem; border-radius: 12px; background: #eaf5f4; color: var(--brand); font-weight: 900; }
.card p { color: var(--muted); margin: 0; }
.card-link { font-weight: 780; text-decoration: none; display: inline-flex; margin-top: 1rem; }
.card-link::after { content: "→"; padding-left: .4rem; }

.pillar-card { display: grid; grid-template-columns: 68px 1fr; align-items: start; gap: 1rem; }
.pillar-number { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #eaf5f4; color: var(--brand); font-size: 1.35rem; font-weight: 900; }

.article-hero { padding: 3.1rem 0 2.5rem; background: #eef7f7; border-bottom: 1px solid #d8e6e6; }
.article-hero .breadcrumbs { margin-bottom: 1.1rem; font-size: .9rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-dark); text-decoration: underline; }
.article-hero h1 { max-width: 19ch; font-size: clamp(2rem, 4vw, 3.6rem); }
.article-intro { max-width: 730px; color: #3c4b57; font-size: 1.18rem; margin: 1rem 0 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.article-content { max-width: 760px; }
.article-content h2 { margin-top: 2.6rem; }
.article-content h3 { margin-top: 1.75rem; }
.article-content p, .article-content li { color: #374550; }
.article-content ul, .article-content ol { padding-left: 1.3rem; }
.article-content li + li { margin-top: .5rem; }
.toc { position: sticky; top: 90px; border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1rem; }
.toc strong { display: block; margin-bottom: .55rem; }
.toc a { display: block; color: var(--muted); font-size: .92rem; text-decoration: none; padding: .18rem 0; }
.toc a:hover { color: var(--brand-dark); text-decoration: underline; }
.callout { padding: 1rem 1.15rem; border-radius: 14px; background: #fff8e9; border: 1px solid #f0ddb0; margin: 1.5rem 0; }
.callout strong { color: #59420f; }
.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 1.85rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 900; color: var(--brand); }

.recommendation-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin: 1.6rem 0; }
.recommendation { border: 1px solid var(--line); padding: 1.1rem; border-radius: 15px; background: #fff; }
.recommendation .tag { display: inline-block; color: var(--brand-dark); background: #eaf5f4; font-weight: 800; font-size: .78rem; padding: .25rem .55rem; border-radius: 99px; }
.recommendation h3 { margin: .7rem 0 .4rem; font-size: 1.06rem; }
.recommendation p { font-size: .94rem; margin: 0 0 .85rem; }
.amazon-action { min-height: 42px; width: 100%; border-radius: 10px; font: inherit; font-weight: 780; border: 1px solid var(--brand); color: var(--brand); background: white; cursor: pointer; }
.amazon-action:hover { background: #eff8f7; }
.amazon-action[aria-disabled="true"] { cursor: default; opacity: .78; border-color: #aab9bd; color: #627277; }
.affiliate-note { font-size: .82rem; color: var(--muted); margin: .8rem 0 0; }

.faq details { border: 1px solid var(--line); border-radius: 12px; padding: .95rem 1rem; background: white; }
.faq details + details { margin-top: .7rem; }
.faq summary { cursor: pointer; font-weight: 780; }
.faq p { margin-bottom: 0; color: var(--muted); }

.disclosure { background: #122b30; color: #e7f1f2; padding: 1.25rem 0; }
.disclosure p { margin: 0; font-size: .91rem; }
.site-footer { background: #0e2025; color: #dce6e9; padding: 2.6rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.8rem; }
.site-footer h2 { color: white; font-size: 1rem; letter-spacing: 0; }
.site-footer p { color: #b9c8cc; max-width: 52ch; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: .45rem; }
.site-footer a { color: #dce6e9; text-decoration: none; }
.site-footer a:hover { color: white; text-decoration: underline; }
.footer-bottom { padding-top: 1.45rem; margin-top: 1.8rem; border-top: 1px solid rgba(255,255,255,.15); color: #a5b8bd; font-size: .85rem; }

.notice { border-radius: 14px; padding: 1rem 1.1rem; border: 1px solid #f2d6a1; background: #fff7e8; color: #5a431a; }
.notice strong { color: #45300c; }

@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav { display: none; width: 100%; padding-bottom: 1rem; }
  .primary-nav.is-open { display: block; }
  .header-row { flex-wrap: wrap; }
  .primary-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .primary-nav a { padding: .65rem; }
  .hero-grid, .article-layout { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .paper-stack { transform: scale(.84); }
  .toc { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2, .recommendation-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .container { width: min(calc(100% - 1.3rem), var(--max)); }
  .brand small { display: none; }
  .primary-nav ul { grid-template-columns: 1fr; }
  .hero { padding-top: 2.8rem; }
  .paper-stack { transform: scale(.72); }
  .hero-visual { min-height: 190px; }
}

/* Tarjetas de producto dinámicas: se rellenan desde assets/js/affiliate-links.js */
.product-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0; }
.product-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 3px 10px rgba(23,33,43,.025); }
.product-card:hover { border-color: #b9cdd0; box-shadow: var(--shadow); transform: translateY(-2px); transition: .18s ease; }
.product-card-body { display: flex; flex: 1; flex-direction: column; padding: 1.2rem; }
.product-card .tag { align-self: flex-start; display: inline-block; color: var(--brand-dark); background: #eaf5f4; font-weight: 800; font-size: .78rem; padding: .25rem .55rem; border-radius: 99px; }
.product-card h3 { margin: .75rem 0 .45rem; font-size: 1.1rem; }
.product-card-description { margin: 0; font-size: .95rem; }
.product-card-note { margin: .95rem 0 0; padding-top: .85rem; border-top: 1px solid var(--line); color: var(--muted) !important; font-size: .88rem !important; }
.product-card-disclosure { margin: .9rem 0 .55rem; color: var(--muted) !important; font-size: .78rem !important; }
.product-card-media { display: grid; place-items: center; min-height: 205px; padding: 1rem; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f4fbfb, #fffaf1); }
.product-card-media > * { display: block; max-width: 100%; }
.product-card-image-link { display: inline-block; line-height: 0; border-radius: 10px; outline-offset: 4px; }
.product-card-media img { display: block; width: auto; max-width: 100%; max-height: 235px; height: auto; object-fit: contain; }
.product-card-image-link:focus-visible { outline: 3px solid var(--brand); }
.product-card--pending { border-style: dashed; background: #fcfdfd; }
.product-card--pending .amazon-action { margin-top: auto; }
.product-card--missing { display: grid; place-items: center; min-height: 180px; padding: 1.2rem; border-style: dashed; color: var(--muted); }
.product-card-status { margin: 0; text-align: center; }
.amazon-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

@media (max-width: 820px) {
  .product-card-grid { grid-template-columns: 1fr; }
}

/* Todas las recomendaciones usan imágenes locales. Las ilustraciones SVG incluidas pueden reemplazarse por fotos propias. */
.product-card-media[data-image-kind="illustration"]::after {
  content: "Ilustración orientativa";
  position: absolute;
  right: .7rem;
  bottom: .65rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  color: #315d61;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(20,91,99,.16);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .01em;
}
.product-card-media { position: relative; }
