:root {
  --navy: #101d32;
  --deep: #0b1527;
  --paper: #f8f5ee;
  --orange: #ffad69;
  --blue: #284671;
  --ink: #142239;
  --muted: #49566a;
  --light-muted: #c5cfde;
  --line: #dedbd2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 "Instrument Sans", "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #527bcb; outline-offset: 5px; }
.dark :focus-visible { outline-color: var(--orange); }
.skip { position: fixed; left: 1rem; top: 1rem; transform: translateY(-200%); z-index: 10; padding: .75rem 1rem; background: white; }
.skip:focus { transform: translateY(0); }
.wrap { width: min(1120px, calc(100% - 56px)); margin-inline: auto; }
.dark { background: var(--navy); color: var(--paper); }
.nav, .foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav { min-height: 78px; border-bottom: 1px solid #ffffff26; }
.nav nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav nav a { color: var(--light-muted); text-decoration: none; font-size: .9rem; }
.nav nav a:hover, .text-link:hover { text-decoration: underline; }
.brand { text-decoration: none; font-size: 1.35rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.brand span { color: var(--orange); }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.15rem; min-height: 48px; border-radius: 8px; font-weight: 750; text-decoration: none; line-height: 1.25; }
.outline { border: 1px solid #ffffff50; font-size: .88rem; }
.outline:hover { background: #ffffff12; }
.primary { background: var(--orange); color: var(--deep); min-width: 230px; }
.primary:hover { background: #ffd1ab; }
.hero { overflow: hidden; background: radial-gradient(ellipse at 79% 57%, #1e3558, var(--navy) 56%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; padding-block: clamp(3rem, 7vw, 6.5rem); }
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .13em; line-height: 1.45; text-transform: uppercase; color: var(--blue); margin: 0 0 1rem; }
.dark .eyebrow { color: var(--orange); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "DM Serif Text", Georgia, serif; font-weight: 400; line-height: .99; letter-spacing: -.044em; }
h1 { font-size: clamp(3.75rem, 8.4vw, 7.5rem); margin-bottom: 1.4rem; }
h1 em { color: var(--orange); }
h2 { font-size: clamp(2.5rem, 5.6vw, 4.65rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.18rem; line-height: 1.3; margin-bottom: .55rem; }
.intro { color: var(--light-muted); max-width: 34ch; font-size: clamp(1rem, 2vw, 1.2rem); margin-bottom: 1.6rem; }
.book-stage { position: relative; isolation: isolate; display: grid; place-items: center; padding: 1rem; }
.book-stage img { width: min(100%, 390px); filter: drop-shadow(14px 23px 23px #050c1a9c); }
.orbit { position: absolute; inset: 12% 3%; border: 1px solid #627ba85e; border-radius: 50%; transform: rotate(-20deg); z-index: -1; }
.orbit::after { content: ""; position: absolute; inset: 7%; border: 1px solid #627ba842; border-radius: inherit; }
.section { padding-block: clamp(3.4rem, 8vw, 7.1rem); }
.section-heading { max-width: 720px; margin-bottom: 2rem; }
.section-heading > p:last-child, .topics p, .author p:not(.eyebrow), details p { color: var(--muted); }
.section-heading > p:last-child { max-width: 53ch; }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); }
.topics p, .exercise p:last-child, .exercise h3 { margin-bottom: 0; }
.exercise { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1.45fr; align-items: center; gap: 1rem 2rem; padding: clamp(1.25rem, 4vw, 2rem); background: #e9edf2; border-radius: 12px; }
.exercise .eyebrow { margin-bottom: .35rem; }
.author { background: #e7ecf3; }
.author-grid, .faq-grid, .close-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.text-link { color: #24446e; font-weight: 750; text-underline-offset: .25em; }
.faq-grid { align-items: start; }
details { border-bottom: 1px solid var(--line); }
details:first-child { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; padding: 1rem 1.8rem 1rem 0; position: relative; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .25rem; color: var(--blue); }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 1rem; }
.close { background: var(--deep); }
.close-grid { grid-template-columns: 1.5fr 1fr; }
.close h2 { margin-bottom: 0; }
.foot { padding-block: 1.35rem; color: var(--light-muted); font-size: .82rem; flex-wrap: wrap; }
.foot .brand { color: var(--paper); }
.foot button { background: none; border: 0; color: inherit; text-decoration: underline; padding: .3rem; }
.consent { position: fixed; bottom: 1rem; right: 1rem; z-index: 4; width: min(350px, calc(100% - 2rem)); padding: 1rem; border-radius: 10px; background: white; box-shadow: 0 4px 35px #101d3240; }
.consent p { margin: .25rem 0 .75rem; }
.consent button { padding: .4rem .85rem; border-radius: 6px; border: 1px solid var(--blue); background: white; color: var(--blue); margin-right: .4rem; }
.consent button:last-child { color: white; background: var(--blue); }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .nav nav { display: none; }
  .nav { min-height: 65px; }
  .hero-grid, .author-grid, .faq-grid, .close-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-grid { padding-block: 2.6rem 1.6rem; }
  .book-stage { padding: 0; justify-self: center; width: min(100%, 295px); }
  .topics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .exercise { grid-template-columns: 1fr; }
  .primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (min-width: 761px) {
  h1 { font-size: clamp(3.25rem, 6.5vw, 6rem); }
}
@media (max-width: 355px) {
  h1 { font-size: 3.3rem; }
}

/* Los tonos cálidos y verdes toman como referencia la portada. */
:root {
  --paper: #fff8ee;
  --orange: #ffab64;
  --line: #e5d7c7;
}
header.dark { background: #101f38; }
.hero {
  background:
    radial-gradient(ellipse at 90% 100%, #235b57 0%, transparent 49%),
    radial-gradient(ellipse at 74% 28%, #344f81 0%, transparent 52%),
    #101f38;
}
h1 em { color: #ffbc79; }
.primary {
  background: #ffad69;
  border: 1px solid #ffd3a8;
  box-shadow: 0 6px 0 #b9663d55;
}
.primary:hover { transform: translateY(-2px); }
.orbit { border-color: #8be0c183; }
.orbit::after { border-color: #fbc78464; }

.topics {
  gap: 1rem;
  border: 0;
}
.topics article {
  padding: 1.35rem;
  border: 1px solid #e6c0a4;
  border-radius: 14px;
  background: #ffead8;
  box-shadow: inset 0 4px #e68852;
}
.topics article:nth-child(2) { background: #e6eefc; border-color: #c5d4ed; box-shadow: inset 0 4px #7495cd; }
.topics article:nth-child(3) { background: #e1f2e8; border-color: #c3e0cd; box-shadow: inset 0 4px #62a985; }
.topics article:nth-child(4) { background: #fff0cc; border-color: #ead8a5; box-shadow: inset 0 4px #d4a84a; }
.exercise { background: #f5e9d6; }
.author { background: linear-gradient(126deg, #dae8fa, #edf5fd 68%, #dcefea); }


.close {
  background:
    radial-gradient(ellipse at bottom right, #287364 0%, transparent 58%),
    #112b2c;
}
footer.dark { background: #102124; }
@media (max-width: 760px) {
  .topics { gap: .7rem; }
  .topics article { padding: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .primary:hover { transform: none; }
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; }
.offer-note { font-size: .88rem; font-weight: 650; margin-bottom: .8rem; }
.checkout-note { margin: .75rem 0 0; color: var(--light-muted); font-size: .82rem; }
.sample-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-size: .9rem; text-underline-offset: .23em; }
.sample-link:hover { color: var(--orange); }
.exercise { scroll-margin-top: 1rem; }
.exercise h3 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.12; margin-bottom: .7rem; }
.author-photo { width: min(100%, 365px); margin: 0 auto; }
.author-photo img { width: 100%; border: 5px solid #fff8ee; border-radius: 14px; box-shadow: 0 10px 25px #15294326; }
.author-photo figcaption { margin-top: .6rem; color: var(--muted); font-size: .84rem; }
@media (max-width: 760px) {
  .exercise { grid-template-columns: 1fr; }
  .author-photo { order: 1; }
}
@media (max-width: 420px) {
  .sample-link { min-height: 36px; }
  .hero-actions { gap: .25rem; }
  .checkout-note { margin-top: .35rem; }
}

.sample-credit { color: var(--muted); font-size: .84rem; }
.budget-card { min-width: 0; padding: clamp(.85rem, 3vw, 1.5rem); border-radius: 12px; background: #fffaf1; }
.budget-income { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem .5rem; margin-bottom: .6rem; }
.budget-income strong, .budget dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget-bar { display: grid; grid-template-columns: 5fr 3fr 2fr; gap: 3px; height: 10px; overflow: hidden; border-radius: 10px; }
.budget-bar span:nth-child(1) { background: #5577ab; }
.budget-bar span:nth-child(2) { background: #d6854f; }
.budget-bar span:nth-child(3) { background: #4d9674; }
.budget { margin: .55rem 0 .75rem; }
.budget > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: baseline; padding: .6rem 0; border-bottom: 1px solid #e8ddcd; }
.budget dt small { display: block; color: var(--muted); font-size: .78rem; }
.budget dd { margin: 0; font-size: .91rem; font-weight: 750; }
.budget-adjust { color: #24493b; background: #e4f1e7; padding: .7rem .8rem; border-radius: 8px; font-size: .88rem; }
