/* Two restrained content tones; mobile visuals retain width and grow independently of copy. */
:root{--zone-base:#f7f3ed;--zone-contrast:#eae3d9;--zone-support:#eae3d9;--zone-callout:#eae3d9;--zone-card:#f7f3ed;--zone-footer:#f7f3ed;--zone-ink:#251411;--zone-muted:#594c43;--zone-accent:#8d3014;}
:root[data-website-theme="light"]{--zone-base:#f7f3ed;--zone-contrast:#eae3d9;--zone-support:#eae3d9;--zone-callout:#eae3d9;--zone-card:#f7f3ed;--zone-footer:#f7f3ed;--zone-ink:#251411;--zone-muted:#594c43;--zone-accent:#8d3014;}
:root[data-website-theme="dark"]{--zone-base:#151019;--zone-contrast:#27202e;--zone-support:#27202e;--zone-callout:#27202e;--zone-card:#151019;--zone-footer:#151019;--zone-ink:#f8f1e9;--zone-muted:#cdbfbb;--zone-accent:#ffb596;}
:root[data-theme="light"]{--zone-base:#faf8fd;--zone-contrast:#eae4f3;--zone-support:#eae4f3;--zone-callout:#eae4f3;--zone-card:#faf8fd;--zone-footer:#faf8fd;--zone-ink:#101b3d;--zone-muted:#43506a;--zone-accent:#663b99;}
:root[data-theme="dark"]{--zone-base:#100d23;--zone-contrast:#241c38;--zone-support:#241c38;--zone-callout:#241c38;--zone-card:#100d23;--zone-footer:#100d23;--zone-ink:#f4f0ff;--zone-muted:#c4c3d5;--zone-accent:#d1aff5;}
body.is-immersive-home{--zone-base:#151019;--zone-contrast:#27202e;--zone-support:#27202e;--zone-callout:#27202e;--zone-card:#151019;--zone-footer:#151019;--zone-ink:#f8f1e9;--zone-muted:#cdbfbb;--zone-accent:#ffb596;}
[data-website-theme="light"] body.is-immersive-home{--zone-base:#f7f3ed;--zone-contrast:#eae3d9;--zone-support:#eae3d9;--zone-callout:#eae3d9;--zone-card:#f7f3ed;--zone-footer:#f7f3ed;--zone-ink:#251411;--zone-muted:#594c43;--zone-accent:#8d3014;}
.public-brand{--zone-base:#100d23;--zone-contrast:#241c38;--zone-support:#241c38;--zone-callout:#241c38;--zone-card:#100d23;--zone-footer:#100d23;--zone-ink:#f4f0ff;--zone-muted:#c4c3d5;--zone-accent:#d1aff5;}
.public-brand[data-theme="light"]{--zone-base:#faf8fd;--zone-contrast:#eae4f3;--zone-support:#eae4f3;--zone-callout:#eae4f3;--zone-card:#faf8fd;--zone-footer:#faf8fd;--zone-ink:#101b3d;--zone-muted:#43506a;--zone-accent:#663b99;}
body{background:var(--zone-base);}
.public-brand{background:var(--zone-base);}
.public-brand .public-models{--section-surface:var(--zone-base);}
.public-brand .public-footer{--section-surface:var(--zone-contrast);}
body>.site-header~#main>.course-list+.section{--section-surface:var(--zone-base);}
@media (max-width:760px), (max-width:980px) and (max-height:600px) {
  .public-brand #main>.public-section {padding-top:36px;padding-bottom:36px;}
  .topic-stage {
    --mobile-caption-budget:calc(28px + var(--reading-body) * 1.4 + var(--reading-label) * 3);
    --mobile-gallery-height:clamp(320px,calc(52.875vw + var(--mobile-caption-budget) + 56px),700px);
    --mobile-cube-height:clamp(320px,94vw,560px);
    height:auto;
    min-height:0;
    max-height:none;
  }
  .topic-stage .ps-frames {height:auto;min-height:0;}
  .topic-stage .topic-carousel {height:100%;gap:0;}
  /* The heading keeps its source order for reading; only the helper paragraph follows media visually. */
  .topic-stage .tc-heading {display:contents;}
  .topic-stage .tc-heading>div {order:0;margin:0 0 12px;}
  .topic-stage .tc-viewport {
    order:1;
    flex:0 0 var(--mobile-gallery-height);
    height:var(--mobile-gallery-height);
    min-height:var(--mobile-gallery-height);
    margin-bottom:12px;
  }
  .topic-stage .tc-space {height:100%;min-height:var(--mobile-gallery-height);}
  .topic-stage .tc-card {width:94%;}
  .topic-stage .tc-intro {order:2;margin:0 0 12px;}
  .topic-stage .tc-intro br {display:none;}
  .topic-stage .tc-progress {order:3;}
  .topic-stage .tc-controls {order:4;}
  .topic-stage .tc-theme-list {order:5;}
  .topic-stage .tc-source-note {order:6;}
  .topic-stage .product-topic-section {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-content:start;
    height:100%;
    min-height:0;
    gap:12px;
  }
  .topic-stage .product-cube-copy {display:contents;}
  .topic-stage .product-cube-copy>h2 {grid-row:1;}
  .topic-stage .product-cube-copy>.public-eyebrow {grid-row:2;margin:0;}
  .topic-stage .product-cube-stage {grid-row:3;min-width:0;height:auto;align-self:start;}
  .topic-stage .product-cube-stage .cube-canvas-host {
    height:var(--mobile-cube-height);
    min-height:320px;
    max-height:none;
    flex:none;
  }
  .topic-stage .product-cube-copy>.public-material {grid-row:4;margin:0;}
  .topic-stage .topic-selection {grid-row:5;margin:0;padding-top:12px;}
  .topic-stage .product-hero-note {grid-row:6;margin:0;}
  .topic-stage .topic-selection>p,
  .topic-stage .tc-intro,
  .topic-stage .product-hero-note {min-width:0;overflow-wrap:anywhere;}
}
