/* Escuela Meelko (Fase 10): portada, índice de libro y capítulos. */
:root {
  --esc-text: #1f2937;
  --esc-muted: #6b7280;
  --esc-border: #e5e7eb;
  --esc-soft: #f6f7f9;
  --esc-accent: #0366D6;
  --esc-accent-soft: #e8f1fb;
}
.esc-hero { max-width: 60rem; margin-top: 28px; }
.esc-hero--left { text-align: left; }
.esc-hero h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); line-height: 1.15; margin: 8px 0 16px; }
.esc-eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--esc-accent); font-weight: 700; margin: 0 0 6px; }
.esc-lead { font-size: 1.15rem; line-height: 1.6; color: var(--esc-text); max-width: 46em; margin: 0; }
.esc-meta { margin-top: 14px; }
.esc-small { font-size: .9rem; color: var(--esc-muted); }
.esc-section { padding: 56px 0; }
.esc-section.pt-0 { padding-top: 0; }
.esc-h2 { font-size: 1.5rem; margin: 0 0 18px; }
.esc-narrow { max-width: 50rem; margin: 0 auto; }
.esc-text { font-size: 1.05rem; line-height: 1.7; }

.esc-card { display: block; background: #fff; border: 1px solid var(--esc-border); border-radius: 14px; padding: 24px; height: 100%; color: var(--esc-text); }
.esc-card--value i { font-size: 1.6rem; color: var(--esc-accent); display: block; margin-bottom: 10px; }
.esc-card--value h2 { font-size: 1.15rem; margin: 0 0 8px; }
.esc-card--value p, .esc-card--info p { margin: 0; font-size: .97rem; line-height: 1.55; }
.esc-card--info { padding: 16px 18px; }
.esc-card--info .esc-eyebrow { display: block; margin-bottom: 6px; }
.esc-card--soft { background: var(--esc-soft); }
.esc-card--soft p:last-child { margin-bottom: 0; }
.esc-card--link { text-decoration: none; transition: border-color .2s, transform .2s; }
.esc-card--link:hover { border-color: var(--esc-accent); transform: translateY(-2px); color: var(--esc-text); }
.esc-card--link h3 { font-size: 1.1rem; margin: 10px 0 8px; line-height: 1.35; }
.esc-card--link p { font-size: .95rem; color: var(--esc-muted); margin: 0 0 10px; }

.esc-chip { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--esc-accent-soft); color: var(--esc-accent); white-space: nowrap; }
.esc-chip--live { background: var(--esc-accent); color: #fff; }
.esc-chip--muted { background: var(--esc-soft); color: var(--esc-muted); }

.esc-books { display: grid; gap: 24px; }
.esc-book { padding: 32px; }
.esc-book__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: .88rem; color: var(--esc-muted); margin-bottom: 12px; }
.esc-book h2 { font-size: 1.7rem; margin: 0 0 6px; }
.esc-book h2 a { color: inherit; text-decoration: none; }
.esc-book h2 a:hover { color: var(--esc-accent); }
.esc-book__subtitle { font-size: 1.1rem; line-height: 1.5; margin: 0 0 12px; }
.esc-book__actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 18px; }

.esc-progress { margin: 14px 0 6px; }
.esc-progress__label { display: flex; justify-content: space-between; gap: 12px; font-size: .85rem; color: var(--esc-muted); margin-bottom: 6px; }
.esc-progress__bar { height: 6px; border-radius: 3px; background: var(--esc-border); overflow: hidden; }
.esc-progress__bar > div { height: 100%; background: var(--esc-accent); border-radius: 3px; }

.esc-part { margin-top: 40px; }
.esc-part h2 { font-size: 1.35rem; margin: 0 0 4px; }
.esc-part__intro { color: var(--esc-muted); margin: 0 0 8px; }
.esc-rows { border-top: 1px solid var(--esc-border); }
.esc-row { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--esc-border); color: var(--esc-text); text-decoration: none; }
.esc-row--live:hover { background: var(--esc-soft); color: var(--esc-text); }
.esc-row__n { min-width: 36px; font-size: 1.3rem; font-weight: 700; color: var(--esc-muted); line-height: 1.2; }
.esc-row__body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.esc-row__title { font-weight: 600; line-height: 1.35; }
.esc-row--live .esc-row__title { color: var(--esc-accent); }
.esc-row__summary { font-size: .93rem; color: var(--esc-muted); line-height: 1.45; }
.esc-row__status { align-self: flex-start; }

.esc-toc { background: var(--esc-soft); border-radius: 12px; padding: 18px 22px; margin: 0 0 32px; }
.esc-toc__title { font-weight: 700; margin: 0 0 8px; font-size: .95rem; }
.esc-toc ol { margin: 0; padding-left: 20px; }
.esc-toc li { margin: 4px 0; font-size: .95rem; }
.esc-toc a { color: var(--esc-text); }
.esc-toc a:hover { color: var(--esc-accent); }

.esc-prose { font-size: 1.07rem; line-height: 1.75; color: var(--esc-text); }
.esc-prose > * + * { margin-top: 1.1em; }
.esc-prose h2 { font-size: 1.55rem; line-height: 1.25; margin-top: 2.2em; scroll-margin-top: 110px; }
.esc-prose h3 { font-size: 1.22rem; line-height: 1.3; margin-top: 1.8em; scroll-margin-top: 110px; }
.esc-prose h4 { font-size: 1.05rem; margin-top: 1.4em; font-weight: 700; }
.esc-prose p { margin-bottom: 0; }
.esc-prose ul, .esc-prose ol { padding-left: 1.5em; }
.esc-prose li { margin: .35em 0; }
.esc-prose li > ul, .esc-prose li > ol { margin-top: .3em; }
.esc-prose a { color: var(--esc-accent); text-decoration: underline; text-underline-offset: 2px; }
.esc-prose strong { font-weight: 700; }
.esc-prose blockquote { border-left: 4px solid var(--esc-accent); background: var(--esc-soft); padding: 12px 18px; border-radius: 0 10px 10px 0; font-size: 1rem; }
.esc-prose blockquote > * + * { margin-top: .6em; }
.esc-prose code { background: var(--esc-soft); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.esc-prose pre { background: #111827; color: #f9fafb; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: .9rem; }
.esc-prose pre code { background: none; padding: 0; color: inherit; }
.esc-prose hr { border: 0; border-top: 1px solid var(--esc-border); margin: 2em 0; }
.esc-prose figure { margin: 1.5em 0; text-align: center; }
.esc-prose figure img { max-width: 100%; height: auto; border-radius: 10px; }
.esc-prose figcaption { font-size: .9rem; color: var(--esc-muted); margin-top: 8px; text-align: left; }
.esc-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.esc-table table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.esc-table th, .esc-table td { border: 1px solid var(--esc-border); padding: 8px 10px; vertical-align: top; text-align: left; }
.esc-table th { background: var(--esc-soft); font-weight: 700; }
.esc-table tr:nth-child(even) td { background: #fafbfc; }

.esc-chapter-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 48px 0 32px; padding-top: 24px; border-top: 1px solid var(--esc-border); }
.esc-chapter-nav__link { display: flex; flex-direction: column; gap: 2px; color: var(--esc-text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.esc-chapter-nav__link:hover { color: var(--esc-accent); }
.esc-chapter-nav__link--next { text-align: right; align-items: flex-end; }
.esc-chapter-nav__index { color: var(--esc-accent); text-decoration: none; white-space: nowrap; font-weight: 600; }

.esc-cta { text-align: center; padding: 32px; }
.esc-cta p { max-width: 40em; margin: 0 auto 18px; }
.esc-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.esc-btn-outline { display: inline-flex; align-items: center; gap: 6px; padding: 12px 22px; border: 2px solid var(--esc-accent); border-radius: 999px; color: var(--esc-accent); font-weight: 600; text-decoration: none; }
.esc-btn-outline:hover { background: var(--esc-accent); color: #fff; }
.esc-more { margin-top: 56px; }

@media (max-width: 767px) {
  .esc-section { padding: 36px 0; }
  .esc-book { padding: 22px; }
  .esc-row { gap: 10px; flex-wrap: wrap; }
  .esc-row__status { order: 3; width: 100%; padding-left: 46px; }
  .esc-chapter-nav { grid-template-columns: 1fr; }
  .esc-chapter-nav__link--next { text-align: left; align-items: flex-start; }
  .esc-chapter-nav__index { order: -1; }
  .esc-prose { font-size: 1.02rem; }
}

/* Enlace a un capítulo que todavía no salió: texto, sin enlace */
.esc-soon { border-bottom: 1px dotted var(--esc-muted); cursor: help; }
