/* A short transition keeps the header steady as one page gives way to the next. */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root), ::view-transition-group(eg-header) { animation-duration: 215ms; }
  ::view-transition-old(root) { animation: eg81-page-leave 75ms ease-out both; }
  ::view-transition-new(root) { animation: eg81-page-arrive 140ms 75ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes eg81-page-leave { to { opacity: 0; } }
  @keyframes eg81-page-arrive { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
}

/* Reading, reference and practice. The forms keep their native display states. */
.eg81-reading {
  --read-ink: #172c25;
  --read-green: #223d35;
  --read-muted: #4a6257;
  --read-paper: #f6f4ef;
  --read-sage: #e1e9e2;
  --read-light: #edf1eb;
  --read-rule: #bfccc2;
  --read-gutter: clamp(18px, 5vw, 48px);
  --read-width: min(1120px, calc(100% - 2 * var(--read-gutter)));
  --read-pad: clamp(20px, 4vw, 46px);
}
.eg81-reading :where(section, h2, h3, [id]) { scroll-margin-top: 105px; }
.eg81-reading :where(a, summary, button):focus-visible {
  outline: 2px solid #628574;
  outline-offset: 4px;
}
.eg81-reading :where(h2, h3, p, li, a, dd) { overflow-wrap: anywhere; }
.eg81-read-jumps { margin-top: 25px; color: var(--read-ink); }
.eg81-read-jumps ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 5px 20px;
  max-width: 56rem;
  border-block: 1px solid var(--read-rule);
  margin: 0;
  padding: 0;
}
.eg81-read-jumps a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: .9rem;
  font-weight: 610;
  text-decoration: none;
}
.eg81-read-jumps a:hover { text-decoration: underline; text-underline-offset: 4px; }
.eg81-read-jumps a span { margin-inline-start: auto; color: var(--read-muted); }

/* A short note uses margin headings, a stable text measure and a practical closing. */
.eg81-read-essay > .wrap { width: var(--read-width); max-width: none; }
body.v36 .eg81-read-essay .eg81-read-essay-intro {
  text-align: start;
  padding-block: clamp(48px,7vw,96px) 28px;
}
body .eg81-read-essay .eg81-read-essay-intro h1 {
  max-width: 18ch;
  text-wrap: balance;
  font-size: clamp(2.55rem,5.7vw,5.1rem);
  font-weight: 510;
  line-height: 1.04;
  letter-spacing: -.06em;
  margin-inline: 0;
}
.eg81-read-essay .eg81-read-essay-intro .lead {
  margin: 22px 0 10px;
  max-width: 52ch;
  color: var(--read-muted);
  font-size: clamp(1.03rem,1.9vw,1.25rem);
}
.eg81-read-essay .article-meta { margin: 20px 0 0; color: var(--read-muted); }
.eg81-read-essay .reading.prose.article {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}
.eg81-read-preface {
  max-width: 64ch;
  padding: 8px 0 23px;
  font-size: clamp(1.06rem,1.8vw,1.25rem);
  line-height: 1.65;
}
.eg81-read-preface p { margin: 0; }
.eg81-read-chapter {
  display: grid;
  grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr);
  align-items: start;
  gap: clamp(18px,5vw,64px);
}
.eg81-read-heading, .eg81-read-copy { min-width: 0; }
.eg81-read-chapter .eg81-read-heading > h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.68rem,3.4vw,2.8rem);
  line-height: 1.1;
  letter-spacing: -.042em;
  font-weight: 540;
  text-align: start;
  text-wrap: pretty;
}
.eg81-reading .eg81-read-copy {
  width: auto;
  font-size: clamp(.99rem,1.43vw,1.075rem);
  line-height: 1.72;
  overflow-wrap: anywhere;
}
.eg81-reading .eg81-read-copy > p {
  max-width: 64ch;
  margin: 0 0 .85em;
  line-height: 1.72;
}
.eg81-reading .eg81-read-copy > :last-child { margin-bottom: 0; }
.eg81-read-essay .eg81-read-essay-chapter {
  border-top: 1px solid var(--read-rule);
  padding: clamp(23px, 4.1vw, 54px) var(--read-pad);
}
.eg81-read-essay .eg81-read-essay-chapter:nth-of-type(odd) { background: #fffefa; }
.eg81-read-essay .eg81-read-essay-chapter:nth-of-type(2) { background: var(--read-sage); }
.eg81-read-essay .v30-article-next {
  border-block: 1px solid var(--read-rule);
  margin-block: clamp(24px,6vw,72px) 0;
  padding: 24px 0;
}

/* Long articles give the figures, applied examples and comparison tables room. */
.eg81-read-feature .eg81-read-feature-section {
  padding-block: clamp(26px,5vw,66px);
}
.eg81-read-feature .eg81-read-feature-section > .eg81-read-chapter,
.eg81-read-feature .eg81-read-feature-section > div > .eg81-read-chapter {
  width: var(--read-width);
  max-width: none;
  margin-inline: auto;
}
.eg81-read-feature .eg81-read-chapter .eg81-read-heading > :is(p,span) {
  margin: 0 0 10px;
  font-size: .82rem;
  line-height: 1.4;
}
.eg81-read-feature :is(.q70-copy,.b68-copy,.f70-copy,.c70-copy,.r72-reading,.r72-wide,.m71-inner,.bh-text).eg81-read-chapter {
  width: var(--read-width);
  max-width: none;
}
.eg81-read-feature .eg81-read-chapter:has(.m71-table),
.eg81-read-feature .eg81-read-chapter:has(.m71-scenarios),
.eg81-read-feature .eg81-read-chapter:has(.q70-compare),
.eg81-read-feature .eg81-read-chapter:has(.b68-table),
.eg81-read-feature .eg81-read-chapter:has(.r72-cards) {
  grid-template-columns: 1fr;
  gap: clamp(12px,2vw,22px);
}
.eg81-read-feature :is(.eg81-read-chapter:has(table),.eg81-read-chapter:has(.m71-scenarios)) .eg81-read-heading h2 {
  margin-inline: 0;
  max-width: 32ch;
}
.eg81-read-feature .eg81-read-copy :is(figure, table, img, details, span, a) { max-width: 100%; }
.eg81-read-feature .eg81-read-copy :is(details, figure) { margin-block: 20px; }
.eg81-read-feature :is(.f70-chapter,.b68-chapter,.q70-chapter,.c70-chapter).eg81-read-feature-section:nth-of-type(2n) {
  border-block-start: 1px solid #92aa972b;
}
.eg81-read-feature :is(.bh-story,.r72-story) .eg81-read-jumps { margin-top: 30px; }
.eg81-read-feature .bh-story .bh-hero { max-width: 100%; }
.eg81-read-feature .bh-story .bh-hero :is(.bh-lead,h1) { max-width: 42rem; }
.eg81-read-feature .bh-story .bh-text.eg81-read-feature-section {
  width: 100%;
  padding: var(--read-pad) 0;
  margin: 0;
  border-top: 1px solid var(--read-rule);
}
.eg81-read-feature .bh-story .bh-media { margin-block: 0 var(--read-pad); }
.eg81-read-feature .bh-story .eg81-read-feature-section:has(#bh-espana) {
  background: var(--read-sage);
  box-shadow: 0 0 0 var(--read-gutter) var(--read-sage);
  clip-path: inset(0 calc(-1 * var(--read-gutter)));
}
.eg81-read-eligibility { padding: 14px 0; border-bottom: 1px solid #a3b5a7; }
.eg81-read-eligibility h3 { margin-top: 0; font-weight: 650; }
.eg81-read-eligibility p { margin-bottom: 0; }

/* The topic index starts with the question. The featured reading keeps its own sequence. */
.eg81-read-ideas .i70-topics {
  padding: 17px clamp(0px,2vw,20px);
  min-height: 52px;
  background: var(--read-sage);
}
.eg81-read-ideas .i70-group li a {
  padding-inline-end: 8px;
}
.eg81-read-ideas .i70-group li a:hover,
.eg81-read-ideas .i70-group li a:focus-visible {
  background: #e1e9e255;
}
.eg81-read-ideas .i70-group header > h2 { max-width: 14ch; }
.eg81-read-ideas .i70-feature-map a { min-height: 49px; }
.eg81-read-ideas .i70-resource { border-top: 1px solid var(--read-rule); }

/* Guides put the key comparison before the supporting detail. */
.eg81-read-guide .g34-hero,
.eg81-read-guide .g34-section,
.eg81-read-guide .g34-cta,
.eg81-read-guide .a38-reading-nav {
  width: var(--read-width);
  max-width: none;
}
.eg81-read-guide .g34-section {
  padding: clamp(23px,4.75vw,64px) var(--read-pad);
  border-top: 1px solid var(--read-rule);
  margin-block: 0;
}
.eg81-read-guide .g34-section:nth-of-type(odd) { background: #fffefa; }
.eg81-read-guide .g34-section:nth-of-type(2) { background: var(--read-sage); }
.eg81-read-guide .g34-section:has(table),
.eg81-read-guide .g34-section:has(.g34-route),
.eg81-read-guide .g34-section:has(.g34-grid) {
  grid-template-columns: minmax(0,1fr);
  gap: 24px;
}
.eg81-read-guide .g34-section:has(.g34-grid) h2,
.eg81-read-guide .g34-section:has(.g34-route) h2,
.eg81-read-guide .g34-section:has(table) h2 {
  max-width: 28ch;
}
body.v36 .eg81-read-guide .a38-reading-nav {
  padding: 16px 0 20px;
  margin-block: 0;
  border-block: 1px solid var(--read-rule);
}
.eg81-read-guide .g34-equation {
  margin: 20px 0 0;
  padding: min(4vw,36px);
  border: 0;
  background: var(--read-green);
  color: var(--read-paper);
  border-radius: 6px;
}
.eg81-read-guide .g34-equation strong { color: var(--read-paper); }
.eg81-read-guide .g34-equation p { color: #dce7dd; }
.eg81-read-guide-roas-y-rentabilidad .g34-hero .g34-equation { max-width: 44rem; }
.eg81-read-compare {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin: 24px 0 0;
  width: min(100%, 45rem);
  border-block: 1px solid var(--read-rule);
}
.eg81-read-compare > div { padding: 18px 25px 20px 0; }
.eg81-read-compare > div + div { border-inline-start: 1px solid var(--read-rule); padding-inline-start: 25px; }
.eg81-read-compare dt { font-size: clamp(1.5rem,3vw,2.3rem); font-weight: 580; letter-spacing: -.045em; }
.eg81-read-compare dd { margin: 8px 0 0; color: var(--read-muted); line-height: 1.55; }
.eg81-read-guide .eg81-read-steps > div {
  padding: 20px;
  border-radius: 0;
  background: var(--read-sage);
  border-top: 4px solid #638577;
}
.eg81-read-guide .eg81-read-steps > div:nth-child(2) { background: #ecf1e9; }
.eg81-read-guide .eg81-read-steps > div:nth-child(3) { background: var(--read-green); color: var(--read-paper); }
.eg81-read-guide .eg81-read-steps > div:nth-child(3) :is(h3,p) { color: #e1e9e2; }
.eg81-read-guide .eg81-read-deliverables .g34-card {
  background: transparent;
  border: 0;
  border-top: 2px solid #7a9486;
  padding: 18px 6px 0;
}
.eg81-read-guide .g34-cta { margin-top: 32px; }
.eg81-read-guides .g34-section > .g34-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px 32px;
}
.eg81-read-guides .g34-grid .g34-card {
  background: transparent;
  border: 0;
  border-top: 2px solid var(--read-rule);
  padding: 24px 0;
}

/* Library rows stay short and keep the original functional filters. */
body.v38 .eg81-read-library .a38-resource-hub .a38-hero {
  width: var(--read-width);
  max-width: none;
  text-align: start;
}
body.v38 .eg81-read-library .a38-resource-hub .a38-hero :is(h1,.lead) { margin-inline: 0; }
body.v38 .eg81-read-library .a38-resource-hub .a38-hero .a38-actions { justify-content: flex-start; }
.eg81-read-library .a38-resource-hub .a38-resource-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0 30px;
}
body.v38 .eg81-read-library .a38-resource-hub .a38-resource-card:not([hidden]) {
  min-width: 0;
  padding: 19px 0 18px;
  gap: 10px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--read-rule);
  border-radius: 0;
  box-shadow: none;
}
.eg81-read-library .a38-resource-card .a38-resource-meta { font-size: .78rem; }
.eg81-read-library .a38-resource-card h3 { max-width: 30ch; font-weight: 570; }
.eg81-read-library .a38-resource-card p { max-width: 54ch; }
.eg81-read-library .a38-resource-filters {
  padding: clamp(16px,3.5vw,32px);
  background: var(--read-sage);
}
.eg81-read-library .a38-resource-hub #checklist-landing {
  background: #fffefa;
  padding: var(--read-pad);
  border: 1px solid var(--read-rule);
}
.eg81-read-library .a38-resource-hub #comparar-seo-sem {
  background: var(--read-sage);
  padding: var(--read-pad);
}
.eg81-read-library .a38-resource-checklist li + li { border-top: 1px solid #bfccc25d; }
.eg81-read-library .a38-resource-checklist label { display: flex; align-items: start; gap: 13px; padding: 10px 0; }
.eg81-read-library .a38-resource-checklist input { min-width: 1em; min-height: 1em; }
.eg81-read-workbook .resource-preview {
  background: var(--read-green);
  color: var(--read-paper);
  box-shadow: 8px 8px 0 #b7cdbd;
}
.eg81-read-workbook .resource-preview :is(h2,.eyebrow,p) { color: inherit; }
.eg81-read-workbook .resource-feature li { padding-block: 6px; border-top: 1px solid var(--read-rule); }
.eg81-read-workbook .resource-feature li + li { margin-top: 0; }

/* Three learning formats are distinguished by the experience and deliverable. */
.eg81-read-learning > .wrap { width: var(--read-width); max-width: none; }
body.v36 .eg81-read-learning .intro { text-align: start; }
body.v36 .eg81-read-learning .intro :is(h1,.lead) { margin-inline: 0; }
.eg81-read-learning .intro h1 { max-width: 21ch; }
.eg81-read-session-facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  width: min(100%, 56rem);
  margin: 25px 0 0;
  border-block: 1px solid var(--read-rule);
}
.eg81-read-session-facts > div { padding: 17px clamp(10px,2vw,24px) 17px 0; }
.eg81-read-session-facts > div + div { border-inline-start: 1px solid var(--read-rule); padding-inline-start: clamp(10px,2vw,24px); }
.eg81-read-session-facts dt {
  color: var(--read-green);
  font-family: Editorial,Georgia,serif;
  font-size: clamp(1.5rem,3.2vw,2.5rem);
  line-height: 1.12;
}
.eg81-read-session-facts dd { margin: 6px 0 0; color: var(--read-muted); line-height: 1.45; }
.eg81-read-learning .training-catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.eg81-read-learning .training-catalog > article {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.4fr);
  gap: 12px clamp(20px,5vw,60px);
  align-items: start;
  padding: var(--read-pad);
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--read-rule);
  box-shadow: none;
  background: #fffefa;
}
.eg81-read-learning .training-catalog > article:nth-child(2) { background: var(--read-sage); }
.eg81-read-learning .training-catalog > article > h3 { grid-row: span 3; }
.eg81-read-learning .training-catalog > article > p { margin: 0; }
.eg81-read-agenda {
  list-style: none;
  margin: 14px 0;
  padding: 0;
}
.eg81-read-agenda li {
  display: grid;
  grid-template-columns: 5.5ch minmax(0,1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--read-rule);
}
.eg81-read-learning .eg81-read-choices > a {
  padding: var(--read-pad);
  color: var(--read-ink);
  background: #fffefa;
  border: 0;
  border-top: 3px solid #6c8a7c;
}
.eg81-read-learning .eg81-read-choices > a:first-child { background: var(--read-green); color: var(--read-paper); }
.eg81-read-learning .eg81-read-choices > a:first-child :is(span,p,h2) { color: inherit; }
.eg81-read-learning .eg81-read-choices > a:nth-child(2) { background: var(--read-sage); }
.eg81-read-learning .mentoring-topics > article {
  min-width: 0;
  border: 0;
  border-top: 2px solid var(--read-rule);
  background: transparent;
  padding-inline: 4px;
}
.eg81-read-learning .eg81-read-steps { border-top: 1px solid var(--read-rule); }
.eg81-read-learning .eg81-read-steps > li { padding-block: 18px; }
.eg81-read-learning .eg81-read-steps .index { color: var(--read-muted); }
.eg81-read-calculator .g34-calculator {
  min-width: 0;
  border-top: 1px solid var(--read-rule);
  align-items: start;
  gap: clamp(18px,4vw,48px);
}
.eg81-read-calculator .g34-calculator-results {
  min-width: 0;
  padding: var(--read-pad);
  background: var(--read-green);
  color: var(--read-paper);
}
.eg81-read-calculator .g34-calculator-results :is(.eyebrow,p,.text-link,dt) { color: #dce8df; }
.eg81-read-calculator #roas-output dl { gap: 6px 15px; }
.eg81-read-calculator #roas-output dl > div { background: transparent; border-top: 1px solid #9fb7a580; padding: 10px 0; }
.eg81-read-calculator #roas-output dd { overflow-wrap: anywhere; color: #f6f4ef; }

@media (max-width: 760px) {
  .eg81-read-chapter { grid-template-columns: 1fr; gap: 13px; }
  .eg81-read-chapter .eg81-read-heading > h2 { max-width: 27ch; font-size: clamp(1.5rem,6vw,2rem); }
  .eg81-read-jumps { margin-top: 18px; }
  .eg81-read-jumps ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; }
  .eg81-read-essay .eg81-read-essay-chapter { padding-inline: min(4vw,22px); }
  .eg81-read-feature .bh-story .bh-text.eg81-read-feature-section { padding-inline: 0; }
  .eg81-read-guide .g34-section,
  .eg81-read-library .a38-resource-hub #comparar-seo-sem,
  .eg81-read-library .a38-resource-hub #checklist-landing { padding-inline: 15px; }
  .eg81-read-guide .g34-equation { padding: 18px; }
  .eg81-read-library .a38-resource-hub .a38-resource-grid,
  .eg81-read-guides .g34-section > .g34-grid,
  .eg81-read-learning .training-catalog > article { grid-template-columns: 1fr; }
  .eg81-read-learning .training-catalog > article > h3 { grid-row: auto; }
  .eg81-read-learning .eg81-read-steps > li { padding-block: 14px; }
}
@media (max-width: 530px) {
  .eg81-read-session-facts { display: block; }
  .eg81-read-session-facts > div { padding: 12px 0; }
  .eg81-read-session-facts > div + div { border-inline: 0; border-top: 1px solid var(--read-rule); padding-inline-start: 0; }
  .eg81-read-session-facts dt { font-size: 1.46rem; }
  .eg81-read-compare > div { padding-inline-end: 10px; }
  .eg81-read-compare > div + div { padding-inline-start: 12px; }
  .eg81-read-compare dd { font-size: .95rem; }
}
@media (max-width: 360px) {
  .eg81-read-jumps ul { grid-template-columns: 1fr; }
  .eg81-read-jumps li + li { border-top: 1px solid #c6d4ca; }
  .eg81-read-jumps a { width: 100%; }
}
