/* Shared reading layout; functional app controls keep their existing styles. */
.seo-page .generator-hero:not(:has(.generator-hero-media)) { grid-template-columns: minmax(0, 1fr); }
.seo-page .generator-hero-copy { max-width: 80ch; }
.authored-lesson { max-width: 1120px; gap: 24px; }
.authored-lesson .landing-topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.authored-lesson .landing-brand { font-weight: 750; font-size: 24px; color: inherit; }
.authored-lesson .topbar-store-badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lesson-hero { padding: 12px 20px; max-width: 86ch; }
.lesson-hero h1 { font-size: clamp(27px, 2.5vw, 36px); line-height: 1.13; margin: 12px 0 18px; text-wrap: balance; }
.lesson-hero .generator-intro { font-size: 18px; line-height: 1.65; }
.lesson-access { font-size: 13px; color: var(--muted, #625f58); }
.lesson-section h2 { font-size: clamp(23px, 3vw, 31px); margin: 0 0 16px; scroll-margin-top: 20px; }
.lesson-section p, .lesson-section li { line-height: 1.75; max-width: 82ch; }
.lesson-section li + li { margin-top: 9px; }
.lesson-section .seo-table th[scope="row"] { font-weight: 650; text-align: left; }
.lesson-section .seo-table { min-width: 520px; }
.lesson-section .progression-library-item { margin-block: 20px; }
.lesson-screenshot { width: 100%; max-width: 760px; margin: 24px auto 8px; }
.lesson-screenshot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #d5d1c9; }
.lesson-screenshot figcaption { line-height: 1.6; margin-top: 10px; font-size: 14px; color: var(--muted, #625f58); }
.lesson-screenshot-compact { max-width: 425px; }
.lesson-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,425px); gap: 24px; align-items: start; }
.lesson-split .seo-table { min-width: 340px; }
.lesson-note { padding: 14px 18px; border-left: 3px solid var(--accent, #aa6b32); background: var(--panel-soft, #f5f2ec); }
.lesson-footer { padding: 16px 20px; line-height: 1.8; }
@media (max-width: 760px) {
 .lesson-split { grid-template-columns: minmax(0,1fr); }
 .authored-lesson { gap: 16px; }
 .lesson-hero { padding: 6px 10px; }
 .lesson-section { padding: 18px 14px; }
}
.seo-page .generator-hero .generator-intro { font-size: 16px; line-height: 1.65; }
.seo-page .generator-hero h1 { font-size: clamp(27px, 2.5vw, 36px); line-height: 1.2; max-width: 28ch; }
/* Without media, use a compact reading header instead of an empty hero card. */
.seo-page .generator-hero:not(:has(.generator-hero-media)) {
  padding: 16px 20px 20px;
  gap: 0;
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.seo-page .generator-hero:not(:has(.generator-hero-media)) .generator-hero-copy {
  width: 100%;
  max-width: none;
  gap: 12px;
  animation: none;
}
.seo-page .generator-hero:not(:has(.generator-hero-media)) h1 { max-width: none; }
.seo-page .generator-hero:not(:has(.generator-hero-media)) .generator-intro { max-width: 80ch; }
.seo-page .generator-hero:not(:has(.generator-hero-media)) .generator-actions { margin-top: 2px; }
@media (max-width: 760px) {
  .seo-page .generator-hero:not(:has(.generator-hero-media)) { padding: 8px 10px 12px; }
  .seo-page .generator-hero:not(:has(.generator-hero-media)) .generator-hero-copy { gap: 10px; }
}
/* Show the musical example beside its introduction without an oversized card. */
.lesson-context-visual { width: 100%; max-width: 760px; margin: 18px 0 0; }
.lesson-context-visual .seo-voicing-diagrams { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
.lesson-context-visual .seo-voicing-figure { flex: 0 1 150px; min-width: 0; margin: 0; }
.lesson-context-screenshot { max-width: var(--context-image-width, 745px); }
.lesson-context-screenshot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border, #d7d3cb); }
.context-visual-caption { margin: 10px 0 0; color: var(--muted, #625f58); font-size: 14px; line-height: 1.6; max-width: 80ch; }
.seo-page .generator-section p a:not([class]),
.seo-page .seo-longform a,
.seo-page .lesson-section p a,
.seo-page .context-example-link { color: var(--accent-deep, #754723); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .lesson-context-visual .seo-voicing-figure { flex-basis: calc(50% - 6px); }
}
/* Keep each caption attached to the visual it describes. */
.generator-hero-media { justify-items: center; justify-self: center; width: 100%; max-width: 560px; }
.generator-hero-media > .generator-example-diagrams { display: flex; justify-content: center; width: fit-content; max-width: 100%; }
.generator-hero-media > figcaption { justify-self: center; width: 100%; max-width: 100%; margin: 0; text-align: center; }
.lesson-screenshot > figcaption, .lesson-context-screenshot > figcaption { width: 100%; max-width: 100%; text-align: left; box-sizing: border-box; }

/* A compact table of contents with a clear label and orderly link columns. */
.lesson-jumps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 24px;
  padding: 18px 22px;
  border: 1px solid var(--border, #d7d3cb);
  border-radius: 14px;
  background: rgba(255, 253, 248, .6);
}
.lesson-jumps::before {
  content: 'On this page';
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted, #625f58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lesson-jumps a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(120, 96, 68, .12);
  color: var(--text, #292620);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
  text-decoration: none;
}
.lesson-jumps a::after { content: '↓'; flex: none; color: var(--accent-deep, #754723); opacity: .65; }
.lesson-jumps a:hover { color: var(--accent-deep, #754723); text-decoration: underline; text-underline-offset: 4px; }
.lesson-jumps a:focus-visible { outline: 2px solid var(--accent, #aa6b32); outline-offset: 4px; }
.seo-page .seo-link-list { list-style: none; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
/* A list item may contain a sentence with several links; only the item is a row. */
.seo-page .seo-link-list li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border, #d7d3cb); }
.seo-page .seo-link-list a { display: inline; padding: 0; border: 0; font-weight: 600; line-height: inherit; }
@media (max-width: 640px) {
  .lesson-jumps { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 0; }
  .seo-page .seo-link-list { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1000px) {
  .seo-page .generator-hero:has(.lesson-context-portrait) { grid-template-columns: minmax(0,1fr) 380px; gap: 30px; align-items: center; }
  .seo-page .generator-hero .lesson-context-portrait { margin-top: 0; }
}
.feature-hero-media > figcaption, .story-hero-media > figcaption { width: 100%; max-width: none; text-align: left; justify-self: start; }
.seo-page .generator-hero p a { color: var(--accent-deep, #754723); text-decoration: underline; text-underline-offset: 3px; }
.generator-hero-media .example-chord-card { width: 170px; max-width: 100%; }
.generator-hero-media .example-chord-card-diagram-frame { --diagram-display-width: 130px; }
@media (min-width: 1000px) {
  .seo-page .generator-hero:has(.generator-hero-media [data-chord-diagrams]) { grid-template-columns: minmax(0, 1fr) 260px; }
}

.seo-page .generator-hero-copy, .seo-page .generator-hero-media { animation: none; }
