.music-theory-main {
      --hero-enter-ease: cubic-bezier(0.2, 0.74, 0.22, 1);
      width: 100vw;
      max-width: none;
      margin: 0;
      margin-left: calc(50% - 50vw);
      padding-top: 0;
    }
    .lesson-content-wrap {
      position: relative;
      width: 100%;
      margin: 0;
      display: block;
      --section-pad-top: clamp(1.9rem, 4vw, 3.1rem);
      --section-pad-x: clamp(1rem, 5vw, 4rem);
      --section-pad-bottom: clamp(2.1rem, 4.6vw, 3.2rem);
      --amp-gold-gradient: linear-gradient(180deg, #f3d27c 0%, #ddb357 45%, #a97b2f 100%);
      --hero-enter-ease: cubic-bezier(0.2, 0.74, 0.22, 1);
      --section-enter-ease: cubic-bezier(0.18, 0.76, 0.24, 1);
      background: linear-gradient(180deg, #070a10 0%, #090d14 100%);
    }
    .site-footer {
      margin-top: 0;
      gap: 0;
      padding: 0;
      background: transparent !important;
    }
    .site-footer .audio-visualizer--footer {
      margin: 0;
      height: 50px;
      padding-top: 0;
      background: none !important;
    }
    .site-footer .audio-visualizer--footer .vis-bar {
      height: 100%;
    }

    @keyframes hero-rise-fade {
      0% {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(0.985);
        filter: blur(2px);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
      }
    }

    @keyframes hero-bg-settle {
      0% {
        transform: scale(1.1);
      }
      100% {
        transform: scale(1.04);
      }
    }

    @keyframes section-rise-fade {
      0% {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
      }
      100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes section-surface-drift {
      0%, 100% { background-position: 50% 0%; }
      50% { background-position: 50% 100%; }
    }

    .lesson-content-wrap::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: clamp(8px, 1.1vw, 12px);
      background: var(--amp-gold-gradient);
      pointer-events: none;
      z-index: 4;
    }
    .lesson-section {
      position: relative;
      width: 100%;
      border: 0;
      overflow: hidden;
      --section-fill: #06080c;
      --section-glow-a: rgba(246, 194, 74, 0.06);
      --section-glow-b: rgba(246, 194, 74, 0.025);
      --section-surface:
        radial-gradient(620px 360px at 14% 16%, var(--section-glow-a), rgba(255, 255, 255, 0) 72%),
        radial-gradient(560px 320px at 86% 84%, var(--section-glow-b), rgba(255, 255, 255, 0) 74%),
        var(--section-fill);
      background: var(--section-surface);
      padding: var(--section-pad-top) var(--section-pad-x) var(--section-pad-bottom);
      isolation: isolate;
    }

    .lesson-section:nth-of-type(even) {
      --section-fill: #11131d;
      --section-glow-a: rgba(246, 194, 74, 0.07);
      --section-glow-b: rgba(95, 146, 220, 0.06);
      --section-surface:
        radial-gradient(620px 360px at 14% 16%, var(--section-glow-a), rgba(255, 255, 255, 0) 72%),
        radial-gradient(560px 320px at 86% 84%, var(--section-glow-b), rgba(255, 255, 255, 0) 74%),
        var(--section-fill);
      background: var(--section-surface);
    }

    .lesson-section:nth-of-type(1) { --section-index: 0; }
    .lesson-section:nth-of-type(2) { --section-index: 1; }
    .lesson-section:nth-of-type(3) { --section-index: 2; }
    .lesson-section:nth-of-type(4) { --section-index: 3; }
    .lesson-section:nth-of-type(5) { --section-index: 4; }
    .lesson-section:nth-of-type(6) { --section-index: 5; }

    .lesson-section,
    .lesson-section:nth-of-type(even) {
      background: #06080c;
    }

    .lesson-section::after {
      background: none;
      animation: none;
    }

    .lesson-hero-overlay__kicker,
    .lesson-hero-overlay__content h1,
    .lesson-hero-overlay__content > p:not(.lesson-hero-overlay__kicker),
    .lesson-section h2,
    .lesson-section h3,
    .lesson-emphasis-gold {
      text-shadow: none;
    }

    .lesson-section + .lesson-section {
      position: relative;
      padding-top: calc(var(--section-pad-top) + clamp(0.9rem, 1.6vw, 1.2rem));
    }

    .lesson-section + .lesson-section::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: clamp(8px, 1.1vw, 12px);
      background: var(--amp-gold-gradient);
      pointer-events: none;
      z-index: 3;
    }

    .lesson-section::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(0, 0, 0, 0.08));
      background-size: 100% 165%;
      pointer-events: none;
      z-index: 1;
      animation: section-surface-drift 13s ease-in-out infinite;
    }

    .lesson-section > * {
      position: relative;
      z-index: 5;
      width: min(1240px, 100%);
      margin-left: auto;
      margin-right: auto;
    }

    .lesson-section h2 {
      margin: 0 0 0.9rem;
      color: #f8cf72;
      font-size: clamp(1.22rem, 2.55vw, 2rem);
      line-height: 1.18;
      display: block;
      padding: 0;
      border: 0;
      background: none;
      letter-spacing: 0.01em;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
      text-align: center;
    }

    .lesson-section h2 + h2 {
      margin-top: 1.55rem;
      padding-top: 1.1rem;
      border-top: 1px solid rgba(214, 177, 83, 0.45);
    }

    .lesson-section h3 {
      margin: 0.95rem 0 0.34rem;
      color: #f8cf72;
      font-size: 1.03rem;
      padding-left: 0;
      border-left: 0;
      text-align: center;
    }

    .lesson-section h3::before {
      content: none;
    }
    .lesson-section h2,
    .lesson-section h3 {
      width: 100%;
      max-width: none;
      margin-left: 0;
      margin-right: 0;
    }


    .lesson-section p {
      margin: 0.3rem 0 0;
      color: #e1e6ee;
      line-height: 1.66;
      max-width: min(118ch, 100%);
      margin-left: auto;
      margin-right: auto;
      text-align: center;
      text-wrap: pretty;
    }

    .lesson-emphasis-gold {
      color: #f8cf72;
      text-shadow: 0 2px 10px rgba(248, 207, 114, 0.25), 0 0 18px rgba(248, 207, 114, 0.2);
    }

    .lesson-progression-line {
      margin-top: 0.8rem;
      font-size: clamp(1.05rem, 2.2vw, 1.45rem);
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .lesson-progression-grid {
      width: min(1120px, 100%);
      margin: 1.2rem auto 1.4rem;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.9rem;
    }

    .lesson-progression-card {
      border: 1px solid rgba(246, 194, 74, 0.24);
      border-radius: 12px;
      background: linear-gradient(160deg, rgba(13, 18, 28, 0.9), rgba(8, 11, 18, 0.96));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.06), 0 8px 18px rgba(0, 0, 0, 0.18);
      padding: 1rem 1.1rem;
      text-align: center;
    }

    .lesson-progression-title {
      margin: 0 0 0.45rem;
      color: #f8cf72;
      font-weight: 700;
      font-size: 1.05rem;
      letter-spacing: 0.02em;
    }

    .lesson-progression-notes {
      margin-top: 0.35rem;
      color: #e6ebf3;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    @media (max-width: 900px) {
      .lesson-progression-grid {
        grid-template-columns: 1fr;
      }
    }

    .lesson-section ul {
      margin: 0.48rem auto 0;
      padding-left: 0;
      color: #e1e6ee;
      line-height: 1.64;
      max-width: min(96ch, 100%);
      width: fit-content;
      text-align: center;
      list-style-position: inside;
    }

    .lesson-section li {
      margin: 0.16rem 0;
      text-align: center;
    }

    .lesson-bullet-list {
      margin-top: 0.85rem;
      padding-left: 1.2rem;
      text-align: left;
      width: min(960px, 100%);
      list-style: disc;
      list-style-position: outside;
    }

    .lesson-bullet-list li {
      margin: 0.35rem 0;
      text-align: left;
    }

    .lesson-callout {
      margin: 1.2rem auto 0;
      width: min(960px, 100%);
      padding: 1rem 1.1rem;
      border-radius: 12px;
      border: 1px solid rgba(246, 194, 74, 0.28);
      background: linear-gradient(160deg, rgba(18, 22, 32, 0.92), rgba(10, 13, 20, 0.98));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.06), 0 8px 18px rgba(0, 0, 0, 0.22);
      text-align: center;
    }

    .lesson-callout h3 {
      margin: 0 0 0.35rem;
      color: #f8cf72;
      font-size: 1.05rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .position-fretboard {
      margin: 2.1rem auto 0;
      width: min(1100px, 100%);
      padding: 1rem 1rem 1.9rem;
      border-radius: 16px;
      border: 1px solid rgba(246, 194, 74, 0.25);
      background:
        linear-gradient(180deg, rgba(28, 20, 14, 0.96), rgba(10, 8, 6, 0.98)),
        linear-gradient(90deg, rgba(88, 62, 34, 0.4), rgba(20, 12, 6, 0.9));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.08), 0 16px 30px rgba(0, 0, 0, 0.35);
    }

    .position-fretboard__grid {
      position: relative;
      display: grid;
      grid-template-columns: repeat(var(--frets, 7), minmax(48px, 1fr));
      grid-template-rows: repeat(6, minmax(34px, 1fr));
      gap: 0;
      padding: 0.6rem 0.3rem;
      border-left: 2px solid rgba(232, 200, 140, 0.4);
      border-right: 2px solid rgba(232, 200, 140, 0.4);
      --row-size: calc(100% / 6);
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.32) 2px, transparent 2px);
      background-size: calc(100% / var(--frets, 7)) 100%, 100% var(--row-size);
      background-position: 0 0, 0 calc(var(--row-size) / 2);
      background-origin: content-box;
      background-clip: content-box;
    }

    .position-note {
      grid-column: var(--col);
      grid-row: var(--row);
      align-self: center;
      justify-self: center;
      min-width: 38px;
      height: 26px;
      padding: 0 0.55rem;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.35);
      background: rgba(14, 16, 20, 0.92);
      color: #f4f4f4;
      font-weight: 700;
      font-size: 0.9rem;
      letter-spacing: 0.02em;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-transform: uppercase;
      box-shadow: 0 6px 10px rgba(0, 0, 0, 0.45);
    }

    .position-note--root {
      background: linear-gradient(180deg, #c53a3a 0%, #8d1e1e 100%);
      border-color: rgba(255, 170, 170, 0.8);
      box-shadow: 0 0 10px rgba(207, 60, 60, 0.6);
      color: #fff;
    }

    .position-fretboard__frets {
      display: grid;
      grid-template-columns: repeat(var(--frets, 7), minmax(48px, 1fr));
      gap: 0;
      margin-top: 0.7rem;
      color: rgba(220, 220, 220, 0.6);
      font-weight: 600;
      font-size: 0.85rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .position-fretboard__frets span {
      text-align: center;
    }

    .position-fretboard__legend {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      margin: 1rem auto 0;
      color: rgba(226, 211, 177, 0.92);
      font-size: 0.92rem;
      width: 100%;
    }

    .position-fretboard + h2 {
      margin-top: 2.4rem;
    }

    .position-fretboard + h3 {
      margin-top: 2.1rem;
    }

    .theory-foundations-actions {
      margin-top: 1.8rem;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0.75rem;
    }

    .position-fretboard__key {
      width: 18px;
      height: 12px;
      border-radius: 999px;
      border: 1px solid rgba(255, 170, 170, 0.8);
      background: linear-gradient(180deg, #c53a3a 0%, #8d1e1e 100%);
      box-shadow: 0 0 8px rgba(207, 60, 60, 0.6);
    }

    @media (max-width: 720px) {
      .position-fretboard__grid {
        grid-template-columns: repeat(7, minmax(36px, 1fr));
        grid-template-rows: repeat(6, minmax(26px, 1fr));
        padding: 0.5rem 0.2rem;
      }

      .position-note {
        min-width: 30px;
        height: 22px;
        font-size: 0.78rem;
      }
    }

    .lesson-section p + h2,
    .lesson-section ul + h2,
    .lesson-diagram-grid + h2 {
      margin-top: clamp(1.7rem, 2.7vw, 2.45rem);
    }

    .lesson-def-link {
      color: #f6c24a;
      font-weight: 700;
      text-decoration: none;


    }

    .lesson-def-link:hover,
    .lesson-def-link:focus-visible {
      color: #ffe29a;
    }
    .lesson-section strong {
      color: #f8d788;
      font-weight: 600;
    }
    .lesson-bottom-divider {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      margin: 0;
      height: clamp(8px, 1.1vw, 12px);
      background: var(--amp-gold-gradient);
      z-index: 6;
      pointer-events: none;
    }
    body.has-scroll-reveal .lesson-bottom-divider {
      opacity: 1 !important;
      transform: none !important;
      filter: none !important;
    }

    .lesson-diagram-grid {
      margin: 0.9rem auto 0;
      display: grid;
      gap: 0.7rem;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      width: min(1160px, 100%);
    }

    .lesson-diagram-card {
      padding: 0.74rem 0.8rem;
      border-radius: 11px;
      border: 1px solid rgba(246, 194, 74, 0.24);
      background:
        radial-gradient(420px 220px at 12% 8%, rgba(246, 194, 74, 0.14), rgba(246, 194, 74, 0) 72%),
        linear-gradient(165deg, rgba(38, 30, 15, 0.62), rgba(12, 15, 26, 0.84));
      box-shadow: inset 0 1px 0 rgba(255, 239, 197, 0.12), 0 10px 20px rgba(0, 0, 0, 0.24);
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 0.55rem;
    }

    .lesson-diagram-card__title {
      margin: 0;
      color: #ffe9b9;
      font-weight: 700;
      font-size: 0.95rem;
      letter-spacing: 0.01em;
    }

    .lesson-diagram-card__body {
      margin: 0.3rem 0 0;
      color: #dce3ef;
      font-size: 0.92rem;
      line-height: 1.45;
      max-width: none;
    }

    @media (max-width: 980px) {
      .lesson-diagram-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    .lesson-pitch-flow {
      margin: 0.45rem 0 0;
      padding: 0.46rem 0.55rem;
      border-radius: 9px;
      border: 0;
      background: rgba(16, 18, 28, 0.72);
      color: #f7d88f;
      font-size: 0.92rem;
      line-height: 1.42;
      letter-spacing: 0.01em;
      max-width: none;
    }
    .lesson-interval-number-highlight {
      color: #f8cf72;
      font-weight: 700;
    }
    .lesson-interval-table {
      margin: 1.2rem auto 0;
      width: min(980px, 100%);
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(246, 194, 74, 0.24);
      background: linear-gradient(165deg, rgba(17, 20, 30, 0.74), rgba(10, 12, 18, 0.88));
      box-shadow: inset 0 1px 0 rgba(255, 242, 206, 0.1);
    }
    .lesson-interval-table + p {
      margin-top: 0.95rem;
    }
    .lesson-interval-table__row {
      display: grid;
      grid-template-columns: 1.1fr 1.9fr 1fr;
      gap: 0.55rem;
      align-items: center;
      padding: 0.62rem 0.78rem;
    }
    .lesson-interval-table__row + .lesson-interval-table__row {
      border-top: 1px solid rgba(246, 194, 74, 0.16);
    }
    .lesson-interval-table__row p {
      margin: 0;
      text-align: left;
      line-height: 1.4;
      max-width: none;
    }
    .lesson-interval-table__row--head {
      background: linear-gradient(180deg, rgba(255, 227, 156, 0.08), rgba(255, 227, 156, 0));
    }
    .lesson-interval-table__row--head p {
      color: #f8cf72;
      font-weight: 700;
      letter-spacing: 0.01em;
    }
    .lesson-interval-table--accidentals .lesson-interval-table__row {
      grid-template-columns: 1fr;
    }
    .lesson-interval-sentence {
      color: #e7ecf3;
      font-weight: 600;
    }
    .lesson-interval-rule {
      margin: 0.9rem auto 0;
      width: min(980px, 100%);
      border-radius: 11px;
      border: 1px solid rgba(246, 194, 74, 0.22);
      background: linear-gradient(160deg, rgba(23, 25, 34, 0.78), rgba(12, 14, 20, 0.92));
      padding: 0.66rem 0.8rem;
    }
    .lesson-interval-rule p {
      margin: 0;
      max-width: none;
      text-align: left;
      line-height: 1.46;
    }
    .lesson-quality-compare {
      margin: 1.15rem auto 0;
      width: min(980px, 100%);
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.72rem;
    }
    .lesson-quality-compare__item {
      border-radius: 12px;
      border: 1px solid rgba(246, 194, 74, 0.24);
      background:
        radial-gradient(340px 180px at 16% 10%, rgba(246, 194, 74, 0.12), rgba(246, 194, 74, 0) 74%),
        linear-gradient(160deg, rgba(22, 18, 11, 0.6), rgba(11, 14, 22, 0.88));
      padding: 0.75rem 0.82rem;
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.1), 0 8px 18px rgba(0, 0, 0, 0.2);
    }
    .lesson-quality-compare__label {
      margin: 0;
      color: #f8cf72;
      font-weight: 700;
      font-size: 0.95rem;
      text-align: left;
      max-width: none;
    }
    .lesson-quality-compare__item p {
      margin: 0.26rem 0 0;
      max-width: none;
      text-align: left;
      line-height: 1.5;
    }
    .lesson-quality-example-card {
      margin: 0.95rem auto 0;
      width: min(980px, 100%);
      border-radius: 12px;
      border: 1px solid rgba(246, 194, 74, 0.26);
      background: linear-gradient(165deg, rgba(18, 20, 30, 0.78), rgba(11, 13, 20, 0.92));
      padding: 0.75rem 0.85rem;
      box-shadow: inset 0 1px 0 rgba(255, 242, 206, 0.1);
    }
    .lesson-quality-example-card p {
      margin: 0;
      max-width: none;
      text-align: left;
    }
    .lesson-quality-example-card p + p {
      margin-top: 0.5rem;
    }
    .lesson-quality-list {
      margin: 0.62rem auto 0;
      display: flex;
      gap: 0.44rem;
      flex-wrap: wrap;
      justify-content: center;
      width: min(980px, 100%);
    }
    .lesson-quality-grid {
      margin: 1.2rem auto 0;
      width: min(980px, 100%);
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.8rem;
    }
    .lesson-quality-card {
      border-radius: 12px;
      border: 1px solid rgba(246, 194, 74, 0.24);
      background:
        radial-gradient(460px 220px at 12% 10%, rgba(246, 194, 74, 0.1), rgba(246, 194, 74, 0) 74%),
        linear-gradient(165deg, rgba(16, 19, 28, 0.84), rgba(9, 12, 20, 0.96));
      padding: 0.78rem 0.84rem;
      box-shadow: inset 0 1px 0 rgba(255, 239, 197, 0.09), 0 10px 18px rgba(0, 0, 0, 0.2);
    }
    #interval-quality .lesson-quality-card h3 {
      margin: 0;
      text-align: left;
    }
    .lesson-quality-card p {
      margin: 0.44rem 0 0;
      max-width: none;
      text-align: left;
      line-height: 1.52;
    }
    .lesson-quality-card .lesson-half-step-badges {
      margin: 0.5rem 0 0.24rem;
    }
    .lesson-quality-example-grid {
      margin: 0.62rem 0 0;
      display: grid;
      gap: 0.42rem;
    }
    .lesson-quality-example-grid--two-col {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #interval-quality > .lesson-quality-example-grid--two-col {
      width: min(980px, 100%);
      margin: 1rem auto 0;
      gap: 0.55rem;
    }
    .lesson-quality-example-grid p {
      margin: 0;
      border-radius: 10px;
      border: 1px solid rgba(246, 194, 74, 0.2);
      background: rgba(12, 15, 24, 0.74);
      padding: 0.5rem 0.56rem;
    }
    .lesson-quality-note {
      margin-top: 1rem;
    }
    .lesson-chromatic-table-wrap {
      margin: 1.45rem auto 1.25rem;
      width: min(1120px, 100%);
      overflow-x: auto;
      border-radius: 12px;
      border: 1px solid rgba(246, 194, 74, 0.28);
      background: linear-gradient(165deg, rgba(14, 17, 25, 0.86), rgba(9, 12, 18, 0.95));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.1), 0 12px 20px rgba(0, 0, 0, 0.24);
      scrollbar-width: thin;
    }
    .lesson-chromatic-table {
      width: 100%;
      min-width: 960px;
      border-collapse: separate;
      border-spacing: 0;
      table-layout: fixed;
    }
    .lesson-chromatic-table th,
    .lesson-chromatic-table td {
      padding: 0.62rem 0.45rem;
      border-right: 1px solid rgba(246, 194, 74, 0.16);
      border-bottom: 1px solid rgba(246, 194, 74, 0.16);
      text-align: center;
      font-size: 0.92rem;
      line-height: 1.25;
      white-space: nowrap;
    }
    .lesson-chromatic-table th:first-child {
      width: 116px;
      text-align: left;
      padding-left: 0.7rem;
      color: #f8cf72;
      font-weight: 700;
      background: rgba(21, 18, 11, 0.66);
      letter-spacing: 0.01em;
    }
    .lesson-chromatic-table td:last-child,
    .lesson-chromatic-table th:last-child {
      border-right: 0;
    }
    .lesson-chromatic-table tr:last-child th,
    .lesson-chromatic-table tr:last-child td {
      border-bottom: 0;
    }
    .lesson-chromatic-table__interval td {
      color: #211708;
      font-weight: 700;
      background: linear-gradient(180deg, #f8cf72 0%, #efb83b 100%);
      box-shadow: inset 0 0 0 1px rgba(52, 37, 12, 0.2);
    }
    .lesson-chromatic-table__semitones td {
      color: #dbe3ef;
      font-weight: 700;
      background: rgba(34, 40, 54, 0.76);
    }
    .lesson-chromatic-table__notes td {
      color: #d8f0df;
      font-weight: 700;
      background: linear-gradient(165deg, rgba(30, 61, 44, 0.78), rgba(19, 41, 30, 0.9));
    }
    #introduction-to-scales p + .lesson-chromatic-table-wrap {
      margin-top: 1.7rem;
    }
    #introduction-to-scales .lesson-chromatic-table-wrap {
      margin-bottom: 1.55rem;
    }
    #introduction-to-scales .lesson-chromatic-table-wrap + p {
      margin-top: 1.35rem;
    }
    #keys .theory-foundations-actions {
      width: min(980px, 100%);
      margin: 1.8rem auto 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.62rem;
      justify-content: center;
    }
    #keys .theory-foundations-actions .theory-hero__button {
      text-align: center;
      justify-content: center;
    }
    #minor-scale .theory-foundations-actions {
      width: min(980px, 100%);
      margin: 2.1rem auto 0;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.62rem;
      justify-content: center;
    }
    #minor-scale .theory-foundations-actions .theory-hero__button {
      text-align: center;
      justify-content: center;
    }
    #minor-scale .lesson-bottom-divider {
      margin-top: 1.6rem;
    }
    .lesson-major-scale-diagram {
      margin: 1.2rem auto 1rem;
      width: min(1120px, 100%);
      padding: 0;
      border-radius: 0;
      border: 0;
      background: none;
      box-shadow: none;
    }
    .lesson-major-scale-diagram svg {
      display: block;
      width: 100%;
      height: auto;
    }
    .lesson-major-scale-diagram__arc {
      fill: none;
      stroke: #f8cf72;
      color: #f8cf72;
      stroke-width: 3;
      stroke-linecap: round;
      opacity: 0.94;
    }
    .lesson-major-scale-diagram__arc--half {
      stroke: #7bc2ff;
      color: #7bc2ff;
    }
    .lesson-major-scale-diagram__step-label {
      fill: #f6ecd6;
      font-weight: 700;
      font-size: 21px;
      letter-spacing: 0.08em;
      text-anchor: middle;
    }
    .lesson-major-scale-diagram__step-label--half {
      fill: #a7daff;
    }
    .lesson-major-scale-diagram__note-node {
      fill: #e2ad3f;
      stroke: #f6d381;
      stroke-width: 2;
    }
    .lesson-major-scale-diagram__note-label {
      fill: #ffffff;
      font-weight: 700;
      font-size: 24px;
      text-anchor: middle;
      dominant-baseline: middle;
    }
    .lesson-major-scale-diagram__chromatic-node {
      fill: #0d111b;
      stroke: rgba(183, 206, 236, 0.62);
      stroke-width: 1.8;
      opacity: 0.95;
    }
    .lesson-major-scale-diagram__chromatic-label {
      fill: #c5d8f3;
      font-weight: 600;
      font-size: 12px;
      text-anchor: middle;
      dominant-baseline: middle;
      letter-spacing: 0.01em;
    }
    .lesson-major-scale-diagram figcaption {
      margin-top: 0.55rem;
      color: #d7e0ed;
      text-align: center;
      font-size: 0.95rem;
      line-height: 1.45;
    }
    .lesson-scale-map {
      margin: 1.1rem auto 1rem;
      width: min(1120px, 100%);
      display: grid;
      gap: 0.58rem;
    }
    .lesson-scale-map__title {
      margin: 0.25rem 0 0;
      width: min(1120px, 100%);
      color: #f8cf72;
      font-size: 1.03rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      text-align: left;
    }
    .lesson-section .lesson-scale-grid-title {
      margin: 1.35rem auto 0.62rem;
      width: min(1120px, 100%);
      color: #f8cf72;
      font-size: 1.02rem;
      font-weight: 700;
      letter-spacing: 0.01em;
      text-align: left;
      max-width: none;
    }
    .lesson-scale-grid-card {
      margin: 0 auto 1.45rem;
      width: min(1120px, 100%);
      border: 1px solid rgba(246, 194, 74, 0.24);
      border-radius: 10px;
      background: linear-gradient(165deg, rgba(13, 18, 28, 0.88), rgba(8, 11, 18, 0.94));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.06), 0 6px 14px rgba(0, 0, 0, 0.14);
      overflow-x: auto;
    }
    #building-major-scale p + .lesson-scale-grid-title {
      margin-top: 1.6rem;
    }
    #building-major-scale .lesson-scale-grid-card + p {
      margin-top: 0.95rem;
    }
    .lesson-scale-grid {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
      table-layout: fixed;
    }
    .lesson-scale-grid th,
    .lesson-scale-grid td {
      padding: 0.62rem 0.52rem;
      border-right: 1px solid rgba(246, 194, 74, 0.12);
      border-bottom: 1px solid rgba(246, 194, 74, 0.12);
      text-align: center;
      font-size: 0.92rem;
      line-height: 1.2;
      color: #dde4ef;
      font-family: Consolas, "Courier New", monospace;
      font-weight: 600;
    }
    .lesson-scale-grid th[scope="row"] {
      width: 130px;
      text-align: left;
      font-family: "Cal Sans", sans-serif;
      font-size: 1rem;
      font-weight: 700;
      color: #d5ddea;
      background: rgba(17, 22, 33, 0.82);
      padding-left: 0.72rem;
      letter-spacing: 0.01em;
    }
    .lesson-scale-grid td:last-child,
    .lesson-scale-grid th:last-child {
      border-right: 0;
    }
    .lesson-scale-grid tr:last-child th,
    .lesson-scale-grid tr:last-child td {
      border-bottom: 0;
    }
    .lesson-scale-grid__row--degree td {
      color: #aeb7c8;
      background: rgba(15, 20, 30, 0.68);
    }
    .lesson-scale-grid__row--notes td {
      color: #e6ebf3;
      background: rgba(13, 18, 27, 0.74);
    }
    .lesson-scale-grid__row--interval td {
      color: #241807;
      background: linear-gradient(180deg, #f8cf72 0%, #efb83b 100%);
      font-weight: 700;
      box-shadow: inset 0 0 0 1px rgba(53, 37, 11, 0.2);
    }
    .lesson-scale-grid__row--interval th[scope="row"] {
      color: #f8cf72;
      background: rgba(24, 18, 11, 0.86);
    }
    .lesson-triad-grid-card {
      margin: 0 auto 1.45rem;
      width: min(1120px, 100%);
      border: 1px solid rgba(246, 194, 74, 0.24);
      border-radius: 10px;
      background: linear-gradient(165deg, rgba(13, 18, 28, 0.88), rgba(8, 11, 18, 0.94));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.06), 0 6px 14px rgba(0, 0, 0, 0.14);
      overflow-x: auto;
    }
    .lesson-triad-grid {
      width: 100%;
      min-width: 760px;
      border-collapse: collapse;
      table-layout: fixed;
    }
    .lesson-triad-grid th,
    .lesson-triad-grid td {
      padding: 0.64rem 0.6rem;
      border-right: 1px solid rgba(246, 194, 74, 0.12);
      border-bottom: 1px solid rgba(246, 194, 74, 0.12);
      text-align: center;
      font-size: 0.92rem;
      line-height: 1.2;
      color: #dde4ef;
      font-weight: 600;
      font-family: Consolas, "Courier New", monospace;
    }
    .lesson-triad-grid thead th {
      color: #f8cf72;
      background: rgba(24, 18, 11, 0.86);
      font-family: "Cal Sans", sans-serif;
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: 0.01em;
    }
    .lesson-triad-grid td:first-child {
      width: 86px;
      color: #aeb7c8;
      background: rgba(15, 20, 30, 0.68);
      font-weight: 700;
    }
    .lesson-triad-grid td:nth-child(2) {
      color: #e6ebf3;
      background: rgba(13, 18, 27, 0.74);
    }
    .lesson-triad-grid td.lesson-triad-grid__quality {
      color: #241807;
      background: linear-gradient(180deg, #f8cf72 0%, #efb83b 100%);
      font-weight: 700;
      box-shadow: inset 0 0 0 1px rgba(53, 37, 11, 0.2);
      font-family: "Cal Sans", sans-serif;
      letter-spacing: 0.01em;
    }
    .lesson-triad-grid td:last-child,
    .lesson-triad-grid th:last-child {
      border-right: 0;
    }
    .lesson-triad-grid tr:last-child td {
      border-bottom: 0;
    }
    .lesson-scale-map__row {
      display: grid;
      grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
      gap: 0.7rem;
      align-items: center;
      border: 1px solid rgba(246, 194, 74, 0.38);
      border-radius: 10px;
      padding: 0.64rem 0.78rem;
      background: linear-gradient(165deg, rgba(15, 19, 29, 0.9), rgba(8, 11, 18, 0.95));
      box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.08), 0 6px 14px rgba(0, 0, 0, 0.18);
    }
    .lesson-scale-map__label {
      margin: 0;
      width: 100%;
      max-width: none;
      color: #f8cf72;
      font-weight: 700;
      font-size: 1.06rem;
      line-height: 1.3;
      letter-spacing: 0.01em;
      text-align: left;
    }
    .lesson-scale-map__values {
      margin: 0;
      width: 100%;
      max-width: none;
      display: grid;
      grid-template-columns: repeat(8, minmax(2.4rem, max-content));
      gap: 0.38rem;
      align-items: center;
      justify-content: start;
      text-align: left;
    }
    .lesson-scale-map__values span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 2.4rem;
      min-height: 2rem;
      padding: 0.18rem 0.48rem;
      border-radius: 10px;
      border: 1px solid rgba(246, 194, 74, 0.62);
      background: linear-gradient(180deg, #f8cf72 0%, #efb83b 100%);
      color: #1b1408;
      font-family: Consolas, "Courier New", monospace;
      font-size: 0.94rem;
      font-weight: 700;
      line-height: 1.1;
      box-shadow: inset 0 0 0 1px rgba(48, 34, 10, 0.2);
    }
    .lesson-section p + .lesson-interval-table,
    .lesson-section ul + .lesson-interval-table,
    .lesson-section p + .lesson-quality-compare,
    .lesson-section p + .lesson-quality-example-card,
    .lesson-section p + .lesson-quality-grid,
    .lesson-section ul + .lesson-quality-grid,
    .lesson-section p + .lesson-image-figure,
    .lesson-section ul + .lesson-image-figure {
      margin-top: 1.45rem;
    }
    .lesson-section .lesson-interval-table + p,
    .lesson-section .lesson-interval-table + ul,
    .lesson-section .lesson-quality-compare + p,
    .lesson-section .lesson-quality-example-card + p,
    .lesson-section .lesson-quality-grid + p,
    .lesson-section .lesson-quality-grid + h3,
    .lesson-section .lesson-image-figure + p,
    .lesson-section .lesson-image-figure + ul {
      margin-top: 1.25rem;
    }
    #interval-number p + .lesson-interval-table,
    #interval-number ul + .lesson-interval-table {
      margin-top: 1.55rem;
    }
    #interval-number .lesson-interval-table {
      margin-bottom: 1.35rem;
    }
    #interval-number .lesson-interval-table + p,
    #interval-number .lesson-interval-table + ul {
      margin-top: 1.3rem;
    }

    .lesson-half-step-badges {
      margin: 0.46rem 0 0;
      display: flex;
      gap: 0.44rem;
      flex-wrap: wrap;
    }

    .lesson-half-step-badges span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      border: 1px solid rgba(246, 194, 74, 0.48);
      padding: 0.18rem 0.54rem;
      font-size: 0.84rem;
      color: #1a130a;
      background: linear-gradient(180deg, #f8cf72 0%, #f0b93d 100%);
      box-shadow: inset 0 0 0 1px rgba(41, 29, 9, 0.18);
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .lesson-string-map {
      margin: 0.45rem 0 0;
      display: grid;
      gap: 0.33rem;
    }

    .lesson-string-map__row {
      display: grid;
      grid-template-columns: auto auto 1fr;
      gap: 0.55rem;
      align-items: center;
      border: 1px solid rgba(246, 194, 74, 0.2);
      border-radius: 9px;
      padding: 0.36rem 0.45rem;
      background: rgba(14, 16, 26, 0.72);
    }

    .lesson-string-map__row strong {
      color: #ffe1a1;
    }

    .lesson-string-map__row span {
      color: #d4dcea;
      font-size: 0.9rem;
    }

    .lesson-image-figure {
      margin: 0.75rem auto 0;
      width: min(1180px, 100%);
      border-radius: 0;
      border: 0;
      background: transparent;
      padding: 0;
      box-shadow: none;
    }

    .lesson-image {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 0;
    }

    .lesson-pill-row {
      margin: 0.48rem auto 0;
      display: flex;
      gap: 0.42rem;
      width: fit-content;
      max-width: 100%;
      justify-content: center;
      flex-wrap: wrap;
      overflow-x: auto;
      padding: 0.1rem 0.05rem 0.2rem;
      scrollbar-width: thin;
    }

    .lesson-pill-row--chromatic {
      width: min(1160px, 100%);
      justify-content: center;
    }

    .lesson-pill {
      flex: 0 0 auto;
      min-width: clamp(2.15rem, 4.8vw, 3.45rem);
      padding: 0.26rem 0.55rem;
      border-radius: 9px;
      border: 1px solid rgba(246, 194, 74, 0.45);
      background: linear-gradient(180deg, #f8cf72 0%, #f0b93d 100%);
      color: #1a1309;
      text-align: center;
      font-weight: 700;
      font-size: 0.9rem;
      line-height: 1.2;
      white-space: nowrap;
      box-shadow: inset 0 0 0 1px rgba(40, 28, 9, 0.2);
    }

    .lesson-pill-row--chromatic .lesson-pill {
      min-width: clamp(3.1rem, 8vw, 4.6rem);
    }

    .lesson-pill-row--compact .lesson-pill {
      min-width: clamp(2rem, 4.2vw, 3rem);
    }

    .lesson-pill--muted {
      background: rgba(19, 22, 32, 0.8);
      border-color: rgba(246, 194, 74, 0.34);
      color: #ecd9ad;
      box-shadow: none;
    }    .lesson-hero-media {
      position: relative;
      width: 100%;
      min-height: clamp(380px, 47vw, 660px);
      border-radius: 0;
      border-top: 1px solid rgba(246, 194, 74, 0.46);
      border-bottom: 1px solid rgba(246, 194, 74, 0.46);
      border-left: 0;
      border-right: 0;
      overflow: hidden;
      display: flex;
      align-items: stretch;
      margin-top: 0;
      margin-bottom: 0;
      box-shadow: 0 18px 34px rgba(0, 0, 0, 0.38);
      isolation: isolate;
    }

    .lesson-hero-media__bg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      z-index: 0;
      transform: scale(1.04);
      filter: contrast(1.07) saturate(0.92);
      animation: hero-bg-settle 1700ms ease-out both;
    }

    .lesson-hero-media::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background:
        radial-gradient(1200px 420px at 50% 46%, rgba(208, 165, 78, 0.22), rgba(8, 10, 15, 0) 62%),
        radial-gradient(900px 380px at 78% 15%, rgba(76, 123, 190, 0.14), rgba(8, 10, 15, 0) 65%),
        linear-gradient(165deg, rgba(4, 7, 12, 0.28), rgba(6, 8, 12, 0.64));
      pointer-events: none;
    }

    .lesson-hero-media::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 2;
      background:
        radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0) 18%, rgba(0, 0, 0, 0.64) 92%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
      pointer-events: none;
    }

    .lesson-hero-overlay {
      position: absolute;
      inset: 0;
      z-index: 4;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: clamp(0.95rem, 2.5vw, 1.8rem);
    }

    .lesson-hero-overlay::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 0;
      background: linear-gradient(180deg, rgba(8, 10, 14, 0.14), rgba(8, 10, 14, 0.24));
      pointer-events: none;
    }

    .lesson-hero-overlay::after {
      content: none;
    }

    .lesson-hero-overlay__content {
      position: relative;
      z-index: 2;
      width: min(1120px, 100%);
      padding: clamp(0.35rem, 1.5vw, 0.85rem);
    }
.lesson-hero-overlay__kicker {
      margin: 0 0 0.35rem;
      color: rgba(47, 118, 166, 0.72);
      -webkit-text-fill-color: transparent;
      -webkit-text-stroke: 1px rgba(47, 118, 166, 0.9);
      font-size: clamp(1rem, 3.1vw, 2.35rem);
      letter-spacing: 0.14em;
      text-transform: uppercase;
      font-weight: 700;
      line-height: 1;
      text-shadow: 0 8px 20px rgba(0, 0, 0, 0.48), 0 0 24px rgba(47, 118, 166, 0.35);
      --hero-reveal-delay: 80ms;
    }

    .lesson-hero-overlay__content h1 {
      margin: 0.25rem 0 0.38rem;
      color: #f8cf72;
      font-size: clamp(1.78rem, 4vw, 3.25rem);
      line-height: 1.08;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.68), 0 0 26px rgba(248, 207, 114, 0.16);
      position: relative;
      z-index: 1;
      --hero-reveal-delay: 180ms;
    }

    .lesson-hero-overlay__content > p:not(.lesson-hero-overlay__kicker) {
      margin: 0.3rem auto 0;
      color: #ecf1f9;
      line-height: 1.5;
      font-size: clamp(1rem, 1.35vw, 1.22rem);
      max-width: 88ch;
      text-shadow: 0 2px 8px rgba(0, 0, 0, 0.66);
      position: relative;
      z-index: 1;
      --hero-reveal-delay: 300ms;
    }

    body.has-scroll-reveal .lesson-hero-overlay__kicker,
    body.has-scroll-reveal .lesson-hero-overlay__content h1,
    body.has-scroll-reveal .lesson-hero-overlay__content > p:not(.lesson-hero-overlay__kicker) {
      opacity: 0;
      transform: translate3d(0, 18px, 0) scale(0.985);
      filter: blur(1.6px);
      transition:
        opacity 760ms var(--hero-enter-ease, cubic-bezier(0.2, 0.74, 0.22, 1)),
        transform 760ms var(--hero-enter-ease, cubic-bezier(0.2, 0.74, 0.22, 1)),
        filter 760ms var(--hero-enter-ease, cubic-bezier(0.2, 0.74, 0.22, 1));
      transition-delay: var(--hero-reveal-delay, 0ms);
      will-change: opacity, transform, filter;
    }

    body.has-scroll-reveal .lesson-hero-overlay__kicker.is-revealed,
    body.has-scroll-reveal .lesson-hero-overlay__content h1.is-revealed,
    body.has-scroll-reveal .lesson-hero-overlay__content > p:not(.lesson-hero-overlay__kicker).is-revealed {
      opacity: 1;
      transform: none;
      filter: blur(0);
    }

    body.has-scroll-reveal .lesson-section > * {
      opacity: 0;
      transform: translate3d(0, 22px, 0);
      transition:
        opacity 640ms var(--section-enter-ease),
        transform 640ms var(--section-enter-ease);
      transition-delay: calc(24ms + (var(--reveal-index, 0) * 58ms));
      will-change: transform, opacity;
    }

    body.has-scroll-reveal .lesson-section > *.is-revealed {
      opacity: 1;
      transform: none;
    }
.lesson-nav-list a {
      color: #f1d68e;
      text-decoration: none;
    }

    .lesson-nav-list a:hover {
      text-decoration: none;
    }
  

    .lesson-sticky-nav {
      position: sticky;
      top: 0.45rem;
      z-index: 7;
      margin: 0 0 0.75rem;
      border-radius: 0;
      border: 1px solid rgba(204, 174, 90, 0.28);
      background: linear-gradient(145deg, rgba(22, 24, 31, 0.95), rgba(10, 11, 14, 0.98));
      padding: 0.6rem;
      display: grid;
      gap: 0.55rem;
      box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
    }

    .lesson-sticky-nav__links {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .lesson-sticky-nav__links a {
      padding: 0.35rem 0.58rem;
      border-radius: 999px;
      border: 1px solid rgba(204, 174, 90, 0.24);
      color: #d9dfeb;
      text-decoration: none;
      font-size: 0.86rem;
      line-height: 1.2;
    }

    .lesson-sticky-nav__links a:hover {
      border-color: rgba(246, 209, 121, 0.7);
      color: #fff4d3;
    }

    .lesson-sticky-nav__links a.is-active {
      background: linear-gradient(180deg, #f8cf72 0%, #f0b93d 100%);
      border-color: rgba(246, 194, 74, 0.95);
      color: #17120a;
      font-weight: 700;
    }

    .lesson-sticky-nav__search {
      display: grid;
      grid-template-columns: auto minmax(140px, 1fr) auto;
      gap: 0.45rem;
      align-items: center;
    }

    .lesson-sticky-nav__search label {
      color: #d3d9e5;
      font-size: 0.86rem;
      margin: 0;
    }

    .lesson-sticky-nav__search input {
      border-radius: 0;
      border: 1px solid rgba(204, 174, 90, 0.3);
      background: rgba(12, 14, 18, 0.95);
      color: #f0f3f8;
      padding: 0.42rem 0.52rem;
      min-height: 36px;
    }

    .lesson-sticky-nav__search button {
      border-radius: 0;
      border: 1px solid rgba(204, 174, 90, 0.35);
      background: rgba(24, 20, 12, 0.8);
      color: #f1d68e;
      min-height: 36px;
      padding: 0.38rem 0.6rem;
      font-size: 0.82rem;
    }

    .lesson-sticky-nav__hint {
      margin: 0;
      color: #bec5d2;
      font-size: 0.82rem;
      grid-column: 1 / -1;
    }

    .lesson-section h3.is-search-match {
      color: #ffdf94;
      text-shadow: 0 0 10px rgba(246, 194, 74, 0.28);
    }

    .lesson-section.is-filter-empty {
      opacity: 0.68;
    }

    .back-to-top {
      position: fixed;
      right: clamp(0.7rem, 1.8vw, 1.25rem);
      bottom: clamp(0.75rem, 1.8vw, 1.25rem);
      width: 46px;
      height: 46px;
      border-radius: 999px;
      border: 1px solid rgba(246, 194, 74, 0.78);
      background: linear-gradient(180deg, #f8cf72 0%, #f0b93d 100%);
      color: #151008;
      font-size: 1.35rem;
      font-weight: 700;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 246, 219, 0.55);
      cursor: pointer;
      z-index: 50;
      opacity: 0;
      transform: translate3d(0, 14px, 0) scale(0.96);
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;
      animation: back-to-top-float 2.2s ease-in-out infinite;
    }

    .back-to-top.is-visible {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
      pointer-events: auto;
    }

    .back-to-top:hover {
      filter: brightness(1.06);
      transform: translate3d(0, -2px, 0) scale(1.03);
    }

    .back-to-top:focus-visible {
      outline: 2px solid #fff6dd;
      outline-offset: 2px;
    }
    @keyframes back-to-top-float {
      0%,
      100% { transform: translate3d(0, 0, 0) scale(1); }
      50% { transform: translate3d(0, -4px, 0) scale(1); }
    }

    @media (prefers-reduced-motion: reduce) {
      .lesson-hero-media__bg,
      .lesson-hero-overlay__kicker,
      .lesson-hero-overlay__content h1,
      .lesson-hero-overlay__content p,
      .lesson-section > *,
      .lesson-section::after,
      .back-to-top {
        animation: none !important;
        transition: none !important;
      }

      .lesson-hero-overlay__kicker,
      .lesson-hero-overlay__content h1,
      .lesson-hero-overlay__content p,
      .lesson-section > * {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
      }
    }

        @media (max-width: 900px) {
      .lesson-hero-media {
        min-height: clamp(320px, 62vw, 520px);
      }

      .lesson-hero-overlay__content {
        width: min(980px, 100%);
        padding: clamp(0.3rem, 1.9vw, 0.6rem);
      }
      .lesson-hero-overlay__kicker {
        margin-bottom: 0.22rem;
        font-size: clamp(0.92rem, 4.1vw, 1.35rem);
        letter-spacing: 0.09em;
      }

.lesson-hero-overlay__content h1 {
        font-size: clamp(1.45rem, 5.1vw, 2.1rem);
      }

      .lesson-hero-overlay__content > p:not(.lesson-hero-overlay__kicker) {
        font-size: clamp(0.94rem, 3.1vw, 1.05rem);
        max-width: 60ch;
      }

      .lesson-content-wrap {
      position: relative;
        --section-pad-top: clamp(1.45rem, 5vw, 2rem);
        --section-pad-x: clamp(0.88rem, 4vw, 1.35rem);
        --section-pad-bottom: clamp(1.55rem, 5.2vw, 2.15rem);
      }

      .lesson-section + .lesson-section {
      position: relative;
      padding-top: calc(var(--section-pad-top) + clamp(0.9rem, 1.6vw, 1.2rem));
    }

      .lesson-section + .lesson-section::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      height: clamp(8px, 1.1vw, 12px);
      background: var(--amp-gold-gradient);
      pointer-events: none;
      z-index: 3;
    }

      .lesson-section h2 {
        font-size: clamp(1.14rem, 5vw, 1.45rem);
      }

      .lesson-diagram-grid {
        grid-template-columns: 1fr;
      }
      .lesson-quality-compare,
      .lesson-quality-grid {
        grid-template-columns: 1fr;
      }
      .lesson-quality-example-grid--two-col {
        grid-template-columns: 1fr;
      }
      .lesson-major-scale-diagram {
        padding: 0;
      }
      .lesson-major-scale-diagram__step-label {
        font-size: 19px;
      }
      .lesson-major-scale-diagram__note-label {
        font-size: 22px;
      }
      .lesson-major-scale-diagram__chromatic-label {
        font-size: 11px;
      }
      .lesson-scale-map__row {
        grid-template-columns: 1fr;
        gap: 0.34rem;
      }
      .lesson-scale-map__values {
        grid-template-columns: repeat(auto-fit, minmax(2.35rem, max-content));
      }
      .lesson-scale-grid {
        min-width: 680px;
      }
      .lesson-scale-grid th,
      .lesson-scale-grid td {
        font-size: 0.85rem;
        padding: 0.55rem 0.4rem;
      }
      .lesson-scale-grid th[scope="row"] {
        width: 108px;
        font-size: 0.9rem;
      }
      .lesson-triad-grid {
        min-width: 680px;
      }
      .lesson-triad-grid th,
      .lesson-triad-grid td {
        font-size: 0.85rem;
        padding: 0.55rem 0.44rem;
      }
      .lesson-triad-grid thead th {
        font-size: 0.9rem;
      }
      #keys .theory-foundations-actions {
        grid-template-columns: 1fr;
      }
      .lesson-chromatic-table th,
      .lesson-chromatic-table td {
        font-size: 0.86rem;
      }
      .lesson-interval-table__row {
        grid-template-columns: 1fr;
        gap: 0.28rem;
      }
      .lesson-interval-table__row p,
      .lesson-interval-rule p {
        text-align: center;
      }

      .lesson-pill-row {
        gap: 0.34rem;
      }

      .lesson-pill {
        font-size: 0.84rem;
        padding: 0.22rem 0.48rem;
      }

      .lesson-sticky-nav {
        top: 0.25rem;
      }

      .lesson-sticky-nav__search {
        grid-template-columns: 1fr;
      }

      .lesson-sticky-nav__search button {
        width: max-content;
      }

      .back-to-top {
        width: 42px;
        height: 42px;
        right: 0.62rem;
        bottom: 0.72rem;
      }
    }
    .lesson-keys-copy {
      display: grid;
      gap: 0.78rem;
      margin: 0.85rem 0 1rem;
      text-align: center;
    }

    .lesson-keys-definition,
    .lesson-keys-components,
    .lesson-keys-next-step {
      border: 1px solid rgba(246, 194, 74, 0.18);
      border-radius: 0.9rem;
      background: linear-gradient(180deg, rgba(246, 194, 74, 0.06), rgba(0, 0, 0, 0.04));
      padding: 0.95rem 1rem;
      margin: 0.55rem 0 1.05rem;
      text-align: center;
      max-width: 100%;
    }

    .lesson-keys-definition p,
    .lesson-keys-next-step p,
    .lesson-keys-components p,
    .lesson-keys-copy p {
      margin: 0;
      line-height: 1.58;
      color: #f5f4f2;
      letter-spacing: 0.01em;
      text-align: center;
    }

    .lesson-keys-components ul {
      margin: 0.55rem auto 0.1rem;
      padding: 0;
      list-style: none;
      display: inline-grid;
      gap: 0.45rem;
      justify-items: center;
    }

    .lesson-keys-components li {
      text-align: center;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.35rem 0.85rem;
      border-radius: 999px;
      border: 1px solid rgba(246, 194, 74, 0.22);
      background: rgba(246, 194, 74, 0.08);
    }

    .lesson-keys-example-grid {
      display: grid;
      gap: 0.75rem;
      margin: 0.6rem 0 1.05rem;
    }

    .lesson-keys-example-card {
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 0.8rem;
      background: rgba(6, 8, 12, 0.66);
      padding: 0.8rem 1rem;
    }

    .lesson-keys-example-label {
      margin: 0 0 0.4rem;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      font-weight: 600;
      font-size: 0.82rem;
      color: #d9b36c;
      text-align: center;
    }

    .lesson-keys-note-line {
      margin: 0;
      text-align: center;
      font-size: 1.1rem;
      font-weight: 600;
      letter-spacing: 0.05em;
    }

    .lesson-keys-divider {
      border: 0;
      height: 1px;
      margin: 1.3rem 0;
      background: linear-gradient(90deg, transparent, #b98b3c, transparent);
    }

    .lesson-keys-mode-list {
      list-style: none;
      padding: 0;
      margin: 0 0 0.95rem;
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1rem;
      justify-content: center;
    }

    .lesson-keys-mode-list li {
      margin: 0;
      color: #f5f4f2;
      background: rgba(246, 194, 74, 0.1);
      border: 1px solid rgba(246, 194, 74, 0.22);
      border-radius: 999px;
      padding: 0.35rem 0.85rem;
      font-size: 0.95rem;
      line-height: 1;
    }

    .lesson-keys-next-step h3 {
      margin-top: 0;
      margin-bottom: 0.5rem;
      color: #f5e2b0;
    }

    .lesson-keys-next-step {
      margin-bottom: 1.2rem;
      text-align: center;
    }

    #keys .lesson-keys-flow {
      max-width: 900px;
      margin: 0 auto 1rem;
      text-align: center;
    }

    #keys .lesson-keys-flow > * {
      margin-left: auto;
      margin-right: auto;
    }

    /* core2.webp on every other section (2,4,6...) */
    .lesson-section:nth-of-type(even) {
      background:
        radial-gradient(900px 420px at 16% 12%, rgba(46, 86, 138, 0.22), rgba(6, 7, 11, 0) 72%),
        radial-gradient(820px 420px at 86% 86%, rgba(22, 50, 92, 0.22), rgba(6, 7, 11, 0) 72%),
        linear-gradient(180deg, rgba(5, 6, 10, 0.97) 0%, rgba(10, 17, 27, 0.975) 100%),
        url("../images/backgrounds/core2.webp");
      background-repeat: no-repeat;
      background-position: center, center, center, center;
      background-size: cover, cover, cover, cover;
    }

    /* Practice accordion */
    #practice-notes .practice-accordion {
      width: min(1120px, 100%);
      margin: 1rem auto 0;
      display: grid;
      gap: 0.65rem;
    }

    #practice-notes .practice-accordion__item {
      border: 1px solid rgba(246, 194, 74, 0.38);
      border-radius: 14px;
      background: linear-gradient(160deg, rgba(12, 17, 26, 0.92), rgba(8, 11, 18, 0.96));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 20px rgba(0, 0, 0, 0.2);
      padding: 0.2rem 0.85rem;
    }

    #practice-notes .practice-accordion__item summary {
      cursor: pointer;
      list-style: none;
      color: #f8cf72;
      font-weight: 700;
      letter-spacing: 0.02em;
      padding: 0.8rem 0.2rem;
      text-align: left;
      position: relative;
    }

    #practice-notes .practice-accordion__item summary::-webkit-details-marker {
      display: none;
    }

    #practice-notes .practice-accordion__item summary::after {
      content: "+";
      position: absolute;
      right: 0.2rem;
      top: 50%;
      transform: translateY(-50%);
      color: #f8cf72;
      font-weight: 700;
    }

    #practice-notes .practice-accordion__item[open] summary::after {
      content: "–";
    }

    #practice-notes .practice-accordion__body {
      padding: 0 0.2rem 0.85rem;
    }

    #practice-notes .practice-accordion__body p {
      margin: 0;
      text-align: left;
      max-width: none;
    }


    #tab-player-overview .lesson-mid-divider {
      width: min(520px, 60%);
      height: 2px;
      margin: 1.1rem auto 1.2rem;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, rgba(246, 194, 74, 0.75), transparent);
      box-shadow: 0 0 10px rgba(246, 194, 74, 0.22);
    }

    .lesson-mid-divider {
      width: min(520px, 60%);
      height: 2px;
      margin: 1.5rem auto 1.6rem;
      border-radius: 999px;
      background: linear-gradient(90deg, transparent, rgba(246, 194, 74, 0.75), transparent);
      box-shadow: 0 0 10px rgba(246, 194, 74, 0.22);
    }

    .lesson-note-diagram {
      width: min(980px, 100%);
      margin: 1.2rem auto 1.6rem;
      padding: 0.85rem 0.9rem;
      border-radius: 14px;
      border: 1px solid rgba(246, 194, 74, 0.24);
      background: linear-gradient(160deg, rgba(12, 17, 26, 0.92), rgba(8, 11, 18, 0.96));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .lesson-note-diagram__title {
      margin: 0 0 0.6rem;
      color: #f8cf72;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      font-size: 0.78rem;
      text-align: center;
    }

    .lesson-note-diagram__row {
      display: grid;
      gap: 0.45rem;
      margin-top: 0.65rem;
      text-align: center;
    }

    .lesson-note-diagram__label {
      margin: 0;
      color: #e9e1c6;
      font-weight: 600;
      letter-spacing: 0.04em;
      font-size: 0.82rem;
    }

    .lesson-image-figure--half {
      width: min(520px, 80%);
      margin-left: auto;
      margin-right: auto;
    }

    .lesson-image-figure--staff {
      overflow: hidden;
    }

    .lesson-image-figure--staff .lesson-image {
      width: 100%;
      height: clamp(200px, 28vw, 260px);
      object-fit: cover;
      object-position: center top;
    }

    .lesson-section p + p {
      margin-top: 0.7rem;
    }

    .lesson-section p + .lesson-note-diagram,
    .lesson-section p + .lesson-image-figure {
      margin-top: 1.4rem;
    }



    .lesson-staff-diagram figcaption {
      margin-top: 0.6rem;
      color: #d6deea;
      text-align: center;
      font-size: 0.95rem;
    }

    .lesson-staff-diagram .lesson-image {
      width: 100%;
      height: clamp(120px, 18vw, 165px);
      object-fit: contain;
      object-position: center;
      margin: 0;
    }

    .lesson-section .lesson-diagram-grid,
    .lesson-section .lesson-triad-grid-card,
    .lesson-section .lesson-note-diagram,
    .lesson-section .lesson-image-figure,
    .lesson-section .lesson-quality-compare {
      margin-top: clamp(0.9rem, 2vw, 1.3rem);
      margin-bottom: clamp(0.9rem, 2vw, 1.3rem);
    }

/* Circle of Fifths page centrepiece */
.circle-of-fifths-page .circle-page-title {
  display: grid;
  place-items: center;
  gap: .7rem;
  padding: clamp(2.25rem, 4.5vw, 4rem) 1rem clamp(1rem, 2vw, 1.75rem);
  background: #000;
  text-align: center;
}

.circle-of-fifths-page .circle-page-title h1 {
  margin: 0;
  color: #d6a441;
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(2.15rem, 4.8vw, 4.15rem);
  font-weight: 500;
  line-height: .98;
}

.circle-of-fifths-page .circle-page-title p {
  max-width: 720px;
  margin: 0;
  color: #fff;
  font-size: clamp(.95rem, 1.35vw, 1.08rem);
  line-height: 1.55;
  text-align: center;
}

.circle-of-fifths-page .circle-visual {
  display: grid;
  place-items: center;
  gap: .5rem;
  width: 100%;
  min-height: 0;
  padding: clamp(.75rem, 1.5vw, 1.25rem) 1rem clamp(2rem, 4vw, 3.5rem);
  background: #000;
  overflow: hidden;
}

.circle-of-fifths-page .music-theory-main {
  background: #000 !important;
}

.circle-of-fifths-page .circle-visual__diagram {
  display: block;
  width: min(740px, 82vw);
  max-width: 100%;
  height: min(592px, 65.6vw);
  max-height: 592px;
  aspect-ratio: 5 / 4;
  pointer-events: auto;
}

.circle-of-fifths-page .circle-visual__diagram-fallback {
  display: block;
  width: 100%;
  max-width: 740px;
  height: auto;
  aspect-ratio: 5 / 4;
}

.circle-key-info {
  width: min(740px, 82vw);
  padding: 1rem clamp(.85rem, 2vw, 1.5rem);
  border-top: 1px solid rgba(214, 164, 65, .48);
  border-bottom: 1px solid rgba(214, 164, 65, .48);
  background: #000;
}

.circle-key-info[hidden] { display: none; }

.circle-key-info h2 {
  margin: 0 0 .7rem;
  color: #d6a441;
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(1.55rem, 3.3vw, 2.5rem);
  font-weight: 500;
  text-align: center;
}

.circle-key-info__variants {
  display: grid;
  gap: 1rem;
}

.circle-key-info__variant {
  display: grid;
  grid-template-columns: minmax(150px, .65fr) minmax(0, 1.35fr);
  gap: .45rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(214, 164, 65, .22);
}

.circle-key-info__variant:first-child { padding-top: 0; border-top: 0; }
.circle-key-info__variant h3 { grid-row: 1 / span 2; margin: 0; color: #edc66f; font-size: 1.15rem; }
.circle-key-info__variant p { margin: 0; color: #fff; line-height: 1.55; }
.circle-key-info__variant strong { color: #edc66f; }
.circle-key-info__variant--single { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.circle-key-info__variant--single p { text-align: center; }

@media (max-width: 600px) {
  .circle-key-info__variant { grid-template-columns: 1fr; }
  .circle-key-info__variant h3 { grid-row: auto; }
  .circle-key-info__variant--single { grid-template-columns: 1fr; }
}

.circle-of-fifths-page .site-footer .audio-visualizer--footer {
  margin: 0;
  padding-top: 0;
  border-radius: 0;
  background: #050505 !important;
}


/* 2026 editorial lesson refresh */
.theory-lesson-page .lesson-content-wrap {
  width: 100%;
  max-width: none;
  padding: 0;
  color: #f7f3ea;
  background: #050505;
}

.theory-lesson-page .lesson-section,
.theory-lesson-page .lesson-section:nth-of-type(even) {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6.5rem) 0;
  border: 0;
  border-bottom: 1px solid rgba(214, 164, 65, .32);
  color: #f7f3ea;
  background: transparent !important;
  box-shadow: none;
  text-align: left;
}

.theory-lesson-page .lesson-section::before,
.theory-lesson-page .lesson-section::after {
  content: none !important;
}

.theory-lesson-page .lesson-section h2 {
  max-width: 900px;
  margin: 0 auto 1.35rem;
  color: #d6a441;
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.03;
  text-align: center;
}

.theory-lesson-page .lesson-section h3 {
  max-width: 900px;
  margin: clamp(3rem, 5vw, 4.5rem) auto 1rem;
  color: #edc66f;
  font-size: clamp(1.4rem, 2.8vw, 2.15rem);
  text-align: center;
}

.theory-lesson-page .lesson-section p,
.theory-lesson-page .lesson-section li {
  color: #fff;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.72;
}

.theory-lesson-page .lesson-section > p {
  max-width: 820px;
  text-align: left;
}

.lesson-mid-divider,
.lesson-bottom-divider {
  height: 1px;
  width: 100%;
  margin: 2.2rem 0;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, rgba(214, 164, 65, .5), transparent);
  box-shadow: none;
}

.lesson-note-diagram {
  width: 100%;
  margin: 1.8rem 0 2.2rem;
  padding: 1.35rem 0;
  border: 0;
  border-top: 1px solid rgba(214, 164, 65, .28);
  border-bottom: 1px solid rgba(214, 164, 65, .28);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lesson-note-diagram__title,
.lesson-note-diagram__label {
  color: #edc66f !important;
  text-align: center !important;
}

.lesson-pill-row { justify-content: center; }
.lesson-pill {
  min-width: 2.5rem;
  padding: .42rem .68rem;
  border: 1px solid #a77d2f;
  border-radius: 4px;
  color: #171109;
  background: #d6a441;
  box-shadow: none;
  font-weight: 800;
}

.lesson-scale-grid-title {
  max-width: none !important;
  margin: 2.5rem 0 1rem !important;
  color: #edc66f !important;
  font-size: clamp(1.1rem, 2vw, 1.4rem) !important;
  font-weight: 800;
  text-align: center !important;
}

.lesson-triad-grid-card {
  width: 100%;
  margin: 1.25rem 0 2.2rem;
  border: 1px solid rgba(214, 164, 65, .38);
  border-radius: 0;
  background: #090909;
  box-shadow: none;
  overflow: hidden;
}

.lesson-triad-grid {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
  background: #090909;
}

.lesson-triad-grid th,
.lesson-triad-grid td {
  padding: .78rem clamp(.2rem, 1vw, .75rem);
  border: 0;
  border-right: 1px solid rgba(214, 164, 65, .2);
  border-bottom: 1px solid rgba(214, 164, 65, .2);
  color: #fff;
  background: #090909;
  font-size: clamp(.72rem, 1.15vw, .98rem);
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}

.lesson-triad-grid thead th,
.lesson-triad-grid th[scope="row"] {
  color: #171109;
  background: #d6a441;
  font-weight: 800;
}

.lesson-triad-grid tr:last-child > * { border-bottom: 0; }
.lesson-triad-grid tr > *:last-child { border-right: 0; }
.lesson-triad-grid__quality { color: #edc66f !important; }

/* Override legacy row fills so chord labels retain strong contrast. */
.theory-lesson-page .lesson-triad-grid tbody td,
.theory-lesson-page .lesson-triad-grid tbody tr:nth-child(even) td,
.theory-lesson-page .lesson-triad-grid tbody tr:nth-child(odd) td {
  color: #fff !important;
  background: #090909 !important;
}

.theory-lesson-page .lesson-triad-grid tbody td.lesson-triad-grid__quality {
  color: #edc66f !important;
}

/* Circle of Fifths editorial lesson content */
.lesson-content-wrap {
  width: 100%;
  background: #050505;
}

.theory-lesson-page .lesson-content-wrap .lesson-section,
.theory-lesson-page .lesson-content-wrap .lesson-section:nth-of-type(even) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #050505;
}

.theory-lesson-page .lesson-content-wrap .lesson-section::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url("../images/backgrounds/blackhex.png") center / cover no-repeat !important;
  opacity: .055 !important;
  pointer-events: none;
}

.theory-lesson-page .lesson-content-wrap .lesson-section > * {
  position: relative;
  z-index: 1;
}

.lesson-formula {
  max-width: 100% !important;
  margin: 1.6rem 0 2rem !important;
  padding: 1.15rem clamp(.6rem, 3vw, 2rem);
  border-top: 1px solid rgba(214, 164, 65, .42);
  border-bottom: 1px solid rgba(214, 164, 65, .42);
  color: #edc66f !important;
  font-size: clamp(1rem, 2vw, 1.35rem) !important;
  font-weight: 800;
  line-height: 1.55 !important;
  text-align: center !important;
}

.lesson-comparison-lines,
.lesson-progression-lines,
.lesson-exercise-list {
  margin: 1.4rem 0 2.2rem;
  border-top: 1px solid rgba(214, 164, 65, .34);
}

.lesson-comparison-lines > div,
.lesson-progression-lines > p,
.lesson-exercise-list > section {
  margin: 0 !important;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(214, 164, 65, .34);
  background: transparent;
}

.lesson-comparison-lines h3,
.lesson-exercise-list h3 {
  margin: 0 0 .35rem;
  color: #edc66f;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
}

.lesson-comparison-lines p,
.lesson-exercise-list p {
  margin: 0 !important;
}

.lesson-progression-lines > p {
  display: grid;
  grid-template-columns: minmax(120px, .35fr) 1fr;
  gap: 1rem;
  max-width: none !important;
}

.lesson-progression-lines strong { color: #edc66f; }

.lesson-quick-test {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(214, 164, 65, .45);
}

.lesson-quick-test > h2 { margin-top: 0 !important; }
.lesson-quick-test__questions { margin-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .18); }

.lesson-quick-test details {
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
}

.lesson-quick-test summary {
  position: relative;
  padding: 1rem 3rem 1rem 0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.lesson-quick-test summary::-webkit-details-marker { display: none; }
.lesson-quick-test summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: 50%;
  color: #d6a441;
  font-size: 1.6rem;
  font-weight: 400;
  transform: translateY(-50%);
}

.lesson-quick-test details[open] summary::after { content: "\2212"; }
.lesson-quick-test details > p {
  max-width: 820px;
  margin: 0;
  padding: 0 2.5rem 1rem 0;
  color: #fff;
}

/* Keep each editorial subsection visually separate from the preceding copy. */
.theory-lesson-page .lesson-section > h2:not(:first-child) {
  margin-top: clamp(3.25rem, 6vw, 5.25rem);
}

.theory-lesson-page .lesson-section > h2 + p,
.theory-lesson-page .lesson-section > h2 + .lesson-formula {
  margin-top: 0;
}

.theory-lesson-page .lesson-section > p,
.theory-lesson-page .lesson-section > ul {
  margin-bottom: 1.2rem;
}

.lesson-image-figure,
.lesson-image-figure--half {
  width: min(760px, 100%);
  margin: 2rem auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lesson-image-figure .lesson-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.lesson-image-figure--staff {
  width: min(760px, 100%);
  height: auto;
  aspect-ratio: 488 / 174;
  position: relative;
  overflow: hidden;
}

.lesson-image-figure--staff .lesson-image {
  position: absolute;
  left: -11.48%;
  top: -35.63%;
  width: 122.95%;
  max-width: none;
  height: auto;
  object-fit: initial;
}

.theory-lesson-page .lesson-diagram-card,
.theory-lesson-page .lesson-staff-diagram {
  background: #0b0b0b !important;
  box-shadow: none;
}

.theory-foundations-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(680px, 100%);
  margin: 4rem auto 0;
  gap: .8rem;
}

.theory-foundations-actions .theory-hero__button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.25rem;
  border: 1px solid #9f792e;
  border-radius: 8px;
  color: #f7f3ea;
  background: rgba(5, 5, 5, .82);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.theory-foundations-actions .theory-hero__button--primary {
  color: #171109;
  border-color: #efd58c;
  background: #d6a441;
}

.theory-foundations-actions .theory-hero__button:hover,
.theory-foundations-actions .theory-hero__button:focus-visible {
  color: #171109;
  border-color: #f5dda0;
  background: #e0b65d;
  outline: none;
  transform: translateY(-3px);
}

.theory-lesson-page .site-footer .audio-visualizer--footer {
  margin: 0;
  padding-top: 0;
  border-radius: 0;
  background: #050505 !important;
}

@media (max-width: 700px) {
  .theory-lesson-page .lesson-section { width: min(100% - 1.25rem, 1080px); padding: 3.5rem 0; }
  .lesson-triad-grid th,
  .lesson-triad-grid td { padding: .55rem .14rem; font-size: .62rem; }
  .lesson-pill { min-width: 2.15rem; padding: .35rem .45rem; font-size: .82rem; }
  .theory-foundations-actions { grid-template-columns: 1fr; width: min(440px, 100%); }
  .lesson-progression-lines > p { grid-template-columns: 1fr; gap: .2rem; }
  .theory-lesson-page .lesson-section > h2:not(:first-child) { margin-top: 3rem; }
}

