/* ============================================================
   blog-data.css — Sistema de diseño para artículos de la serie
   "Calorías de [plato]" (datos verificados BEDCA, contenido denso).

   Filosofía: data-first, sobrio, autoridad visual. Inspirado en
   FT Visual, NYT graphics, Bloomberg, Mayo Clinic.

   Reglas:
     · 1 acento (verde Caliro #16a34a)
     · Tipografía protagonista (Instrument Serif + DM Sans)
     · Color con cuentagotas, sin emojis, sin gradientes
     · Container 1080px wide uniforme (no breakouts)
     · Body 17px / line-height 1.7 para compensar línea larga

   Para artículos de opinión/guías/herramientas usar /blog/blog.css.
   ============================================================ */

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

:root {
  --paper:      #FAFAF7;
  --paper-soft: #F5F3EC;
  --ink:        #1a1a1a;
  --ink-soft:   #2a2a2a;
  --gray:       #6b6b6b;
  --gray-light: #989898;
  --rule:       #e0ddd5;
  --rule-soft:  #efece5;
  --highlight:  #f0ede2;
  --accent:     #16a34a;
  --serif:      'Instrument Serif', Georgia, serif;
  --sans:       'DM Sans', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

/* ── NAV ───────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 40px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav-logo { font-family: var(--serif); font-size: 20px; color: var(--accent); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { font-size: 13px; color: var(--gray); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { background: var(--ink) !important; color: white !important; padding: 8px 18px; border-radius: 100px; font-weight: 500 !important; }
@media (max-width: 640px) { nav { padding: 14px 20px; } .nav-links { display: none; } }

/* ── ARTICLE WRAP ──────────────────────────────────────────── */
.article-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 120px 32px 80px;
}

/* ── HEADER ────────────────────────────────────────────────── */
.article-meta {
  display: flex; gap: 16px; align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
  margin-bottom: 32px;
}
.meta-tag {
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 100px;
}

.article-title {
  font-family: var(--serif);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.article-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 400;
  color: var(--gray);
  line-height: 1.3;
  margin-bottom: 48px;
}

.article-lead {
  font-size: 22px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 56px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.article-lead strong { font-weight: 500; color: var(--ink); }

/* ── HERO CARDS — sin emojis, tipográficas ─────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 48px;
}
.card {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.card:last-child { border-right: none; }
.card-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 16px;
  font-weight: 600;
}
.card-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 60px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
  font-variant-numeric: oldstyle-nums;
}
.card-num-unit {
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  color: var(--gray);
  margin-left: 5px;
  font-weight: 400;
  letter-spacing: 0.02em;
}
.card-portion {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 500;
}
.card-meta {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.5;
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
  .card { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .card:nth-child(2n) { border-right: none; }
  .card:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 380px) {
  .cards { grid-template-columns: 1fr; }
  .card { border-right: none; border-bottom: 1px solid var(--rule); }
  .card:last-child { border-bottom: none; }
}

/* ── RANGE VISUALIZATION — línea sobria ─────────────────────── */
.range {
  margin-top: 48px;
  margin-bottom: 48px;
  padding: 28px 0 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.range-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 64px;
}
.range-title-spread {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-weight: 400;
}
.range-bar {
  position: relative;
  height: 1px;
  background: var(--rule);
  margin: 0 16px 8px;
}
.range-dot {
  position: absolute;
  top: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid var(--gray);
}
.range-dot.active { background: var(--ink); border-color: var(--ink); width: 11px; height: 11px; }
.range-num {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--ink-soft);
  line-height: 1;
}
.range-num.active { color: var(--ink); font-size: 36px; font-weight: 500; }
.range-labels {
  display: flex;
  justify-content: space-between;
  margin: 8px 16px 0;
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.range-note {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-top: 28px;
}

/* ── BODY TEXT ─────────────────────────────────────────────── */
.article-body p { margin-bottom: 20px; line-height: 1.65; }
.article-body strong { font-weight: 500; color: var(--ink); }
.article-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.article-body a:hover { color: var(--accent); }

.article-body h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 64px 0 20px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.article-body h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  margin: 36px 0 14px;
}

.article-body ul {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}
.article-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
}
.article-body ul li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--gray);
  font-weight: 700;
}

/* ── TABLES — clean, BEDCA style ───────────────────────────── */
.table-wrap {
  margin: 24px 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
table.data th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray);
  padding: 14px 14px;
  border-bottom: 1px solid var(--ink);
  vertical-align: bottom;
  white-space: nowrap;
}
table.data td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: none; }
table.data .num { text-align: right; }
table.data tr.highlight td {
  background: var(--paper-soft);
}
table.data tr.total td {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-weight: 500;
  color: var(--ink);
}
table.data tr.caliro td {
  border-top: 1px solid var(--ink);
  background: var(--highlight);
  font-weight: 500;
  color: var(--ink);
}
table.data .tag-text {
  font-style: italic;
  color: var(--gray);
  font-size: 13px;
}
.table-source {
  font-size: 12px;
  color: var(--gray);
  font-style: italic;
  margin: 8px 0 32px;
  line-height: 1.5;
}

/* ── FAQ — accordion nativo <details> ──────────────────────── */
.faq-list { margin: 8px 0 0; }
.faq-list details {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
}
.faq-list details:last-child {
  border-bottom: 1px solid var(--rule);
}
.faq-list summary {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-right: 4px;
  transition: color 0.15s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::marker { display: none; }
.faq-list summary:hover { color: var(--accent); }
.faq-list summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 300;
  color: var(--gray);
  flex-shrink: 0;
  line-height: 1;
  margin-top: 4px;
  transition: transform 0.2s ease, color 0.15s;
}
.faq-list details[open] summary::after {
  content: "−";
  color: var(--ink);
}
.faq-list details[open] summary { color: var(--ink); }
.faq-list details > p,
.faq-list details > ul {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.faq-list details > p:last-child,
.faq-list details > ul:last-child { margin-bottom: 0; }

/* ── Tabla compacta para "estimar sin báscula" ─────────────── */
.estimate-table { margin: 16px 0 24px; }
.estimate-table .data td:first-child { font-weight: 500; color: var(--ink); }

/* ── NOTES — un patrón único, sin colores ──────────────────── */
.note {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 18px;
  margin: 24px 0;
}
.note strong { font-weight: 500; }

/* ── CTA — botón negro limpio ──────────────────────────────── */
.cta-block {
  margin: 64px 0 48px;
  padding: 36px 32px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: center;
}
.cta-block h3 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.25;
  margin-bottom: 14px;
  font-weight: 400;
}
.cta-block p {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 24px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
/* Selector mas especifico que .article-body a (que tenia color:var(--ink)) */
.article-body a.cta-btn,
a.cta-btn {
  display: inline-block;
  background: var(--ink);
  color: white;
  padding: 12px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.2s ease;
}
.article-body a.cta-btn:hover,
a.cta-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

/* ── DISCLAIMER ─────────────────────────────────────────────── */
.disclaimer {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.6;
  margin: 32px 0;
  font-style: italic;
}

/* ── AUTHOR ─────────────────────────────────────────────────── */
.author {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 32px 0;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: var(--serif);
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.author-name { font-weight: 500; font-size: 14px; }
.author-bio { font-size: 13px; color: var(--gray); line-height: 1.5; }

/* ── RELATED ────────────────────────────────────────────────── */
.related {
  margin-top: 56px;
}
.related-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
}
.related-card {
  padding: 18px;
  border-right: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.related-card:last-child { border-right: none; }
.related-card:hover { background: var(--paper-soft); }
.related-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray);
  margin-bottom: 8px;
}
.related-title {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.25;
  color: var(--ink);
}
@media (max-width: 720px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .related-card:last-child { border-bottom: none; }
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  border-top: 1px solid #1e1e1e;
  padding: 28px 40px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  margin-top: 80px;
}
.f-logo { font-family: var(--serif); font-size: 18px; color: var(--accent); text-decoration: none; }
.f-links { display: flex; gap: 24px; list-style: none; }
.f-links a { font-size: 12px; color: #555; text-decoration: none; }
.f-links a:hover { color: #888; }
.f-copy { font-size: 12px; color: #444; }
