/* Release acceptance: readable typography and document-owned vertical scrolling.
   Keep this after every theme and reading stylesheet. Colour remains theme-owned.
   A viewport-height lock cannot accommodate the required type and target sizes. */
@media screen {
  html:has(body.app-shell) {height:auto;min-height:100%;overflow-x:clip;overflow-y:auto;scroll-padding:16px}
  html body.app-shell {
    height:auto;min-height:100vh;min-height:100dvh;overflow:visible;
    grid-template-columns:164px minmax(0,1fr);
    grid-template-rows:auto minmax(0,1fr) auto;
    font-size:14px;
  }
  .app-shell .app-topbar {min-height:68px;padding:8px 16px;gap:16px;position:relative}
  .app-shell .app-brand {min-height:44px;min-width:0}
  .app-shell .skip-link {min-height:44px;min-width:44px}
  .app-shell .app-topnav {gap:16px}
  .app-shell .app-topnav a {min-height:44px;min-width:44px;white-space:normal;line-height:1.35;font-size:12px}
  .app-brand-text small,.app-sidebar-label,.app-sidebar-bottom {font-size:12px}
  .app-theme-switch button {min-height:44px;min-width:44px;font-size:12px;padding:8px}
  .app-shell .app-menu-toggle {min-height:44px;min-width:44px}
  .app-shell .app-sidebar {height:auto;max-height:none;overflow:visible;padding:24px 10px}
  .app-mobile-sections {display:none}
  .app-shell .app-sidenav a {min-height:44px;min-width:44px}
  .app-sidebar-bottom {margin-top:32px;padding-top:16px}
  .app-sidebar-bottom a {min-height:44px;align-items:center;font-size:12px}
  .app-shell .app-footer {min-height:60px;padding:8px 16px;font-size:12px;flex-wrap:wrap}
  .app-copyright {font-size:12px;line-height:1.5}
  .app-shell .app-footer nav {gap:8px 16px;flex-wrap:wrap}
  .app-shell .app-footer a {min-height:44px;min-width:44px;font-size:12px}
  html body.app-shell>main.app-workspace {
    height:auto;min-height:0;overflow:visible;padding:16px!important;gap:16px;
  }
  .app-shell .app-content {height:auto;min-height:0;max-height:none;overflow:visible;overscroll-behavior:auto;scrollbar-gutter:auto;padding:24px}
  .app-shell .workspace-heading {flex:0 0 auto;min-height:104px;gap:24px;align-items:center;display:flex;flex-direction:row}
  .app-home .workspace-heading .workspace-eyebrow {font-size:12px!important;line-height:1.5!important;letter-spacing:.08em}
  .app-home .workspace-heading h1 {font-size:30px!important;line-height:1.2!important}
  .app-home .workspace-heading .workspace-heading-caption {font-size:14px!important;line-height:1.5!important}
  .workspace-release {min-width:0;max-width:100%;flex:0 1 520px;padding:12px 16px;gap:4px}
  .release-primary {flex-wrap:wrap;white-space:normal;gap:8px}
  .release-primary>strong {font-size:14px}
  .release-version,.release-state {font-size:12px}
  .release-meta-row {grid-template-columns:60px minmax(0,1fr);gap:8px}
  .release-meta-row,.release-meta-row>strong,.release-meta-row code {font-size:12px;line-height:1.5}
  .workspace-view-tabs {display:none!important}
  .app-shell .workspace-grid {
    display:grid;flex:0 0 auto;height:auto;min-height:0;overflow:visible;overscroll-behavior:auto;
    grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);
    grid-template-rows:auto auto auto;gap:16px;
    grid-template-areas:'markets chart sectors' 'markets drivers calendar' 'markets perspective perspective';
    align-items:stretch;
  }
  .app-shell .workspace-panel,.app-shell .workspace-panel.is-active {
    display:flex;height:auto;min-height:0;max-height:none;overflow:visible;padding:16px;margin:0;
  }
  .workspace-panel-heading {gap:12px;margin-bottom:16px;min-height:44px;align-items:center;flex-wrap:wrap}
  .app-home .workspace-panel h2 {font-size:16px!important;line-height:1.35!important;letter-spacing:0}
  .workspace-panel-heading>a {display:inline-flex;align-items:center;min-height:44px;min-width:44px;font-size:12px;line-height:1.4;padding:4px 0}
  .app-home .workspace-subtitle,.app-home .workspace-footnote {font-size:12px!important;line-height:1.5!important}
  .app-home .workspace-subtitle {margin-bottom:16px!important}
  .app-home .workspace-footnote {margin-top:16px!important}
  .workspace-footnote a {display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  .workspace-market-tabs {flex-wrap:wrap;gap:4px;padding:4px;margin-bottom:16px}
  .workspace-market-tabs button {min-height:44px;min-width:44px;font-size:12px;padding:8px;flex:1 1 auto}
  .workspace-readings,.workspace-readings.is-filtered {flex:1 0 auto;min-height:0}
  .reading-group .workspace-market-list,.workspace-readings.is-filtered .reading-group .workspace-market-list {
    grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(16,minmax(56px,1fr));
    grid-auto-flow:column;grid-auto-rows:minmax(56px,auto);gap:0 16px;min-height:0;
  }
  .workspace-readings.is-filtered {flex:0 0 auto;width:100%}
  .workspace-readings.is-filtered .reading-group .workspace-market-list {grid-template-rows:repeat(9,minmax(68px,max-content));align-content:start}
  .app-home .workspace-reading {min-height:56px;gap:4px 8px;line-height:1.3;padding:8px 0}
  .workspace-reading .reading-name,.workspace-readings.is-filtered .reading-name {font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;letter-spacing:0}
  .workspace-reading strong,.workspace-readings.is-filtered .workspace-reading strong {font-size:14px;line-height:1.4;letter-spacing:0}
  .workspace-reading .reading-change {font-size:14px;line-height:1.4}
  .workspace-reading .reading-meta {flex-wrap:wrap;gap:0 4px;white-space:normal;font-size:12px;line-height:1.4}
  .workspace-reading .reading-meta>span,.workspace-reading time {font-size:12px;line-height:1.4;letter-spacing:0}
  .benchmark-chart {min-height:352px;grid-template-rows:repeat(8,minmax(44px,1fr))}
  .benchmark-row {min-height:44px;grid-template-columns:minmax(66px,.9fr) minmax(32px,1fr) 52px;gap:8px}
  .benchmark-row>span:first-child {font-size:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
  .benchmark-row>strong {font-size:14px;line-height:1.4}
  .benchmark-axis {font-size:12px;padding:12px 0 0}
  .workspace-heatmap {min-height:0;grid-template-rows:repeat(7,minmax(56px,1fr));gap:8px}
  .workspace-sector {min-height:56px;padding:8px;gap:8px}
  .workspace-sector span {flex-wrap:wrap;gap:4px 8px;font-size:14px;line-height:1.4}
  .app-home .workspace-sector small {font-size:12px;line-height:1.4;white-space:normal}
  .workspace-sector strong {font-size:14px;line-height:1.4}
  .workspace-driver-list {min-height:0;grid-template-rows:repeat(6,minmax(68px,1fr))}
  .workspace-driver {min-height:68px;padding:12px 0;gap:8px}
  .driver-number {font-size:12px}
  .app-home .workspace-driver small {font-size:12px;line-height:1.5;margin-bottom:4px}
  .app-home .workspace-driver h3 {font-size:16px!important;line-height:1.4!important;letter-spacing:0}
  .workspace-calendar-list {min-height:0;grid-template-rows:repeat(5,minmax(76px,1fr))}
  .workspace-calendar-day {min-height:76px;grid-template-columns:30px minmax(0,1fr) 40px;padding:12px 0;gap:8px}
  .app-home .workspace-calendar-day time small,.app-home .workspace-calendar-day>b>small {font-size:12px;line-height:1.4}
  .workspace-calendar-day time strong {font-size:22px;line-height:1.25}
  .workspace-calendar-day>span>strong {font-size:14px;line-height:1.45}
  .app-home .workspace-calendar-day>span>small {font-size:12px;line-height:1.5;white-space:normal;overflow:visible}
  .workspace-calendar-day>b {font-size:18px;line-height:1.4}
  .app-shell .workspace-perspective {min-height:148px;padding:16px;gap:16px;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap}
  .workspace-perspective>div {flex:1 1 240px}
  .app-home .workspace-perspective h2 {font-size:16px!important}
  .app-home .workspace-perspective p {font-size:14px!important;line-height:1.6!important;margin-top:8px!important}
  .workspace-perspective>a {display:inline-flex;align-items:center;min-height:44px;min-width:44px;font-size:12px;line-height:1.5}
  .app-page .app-content .phoenix-contents nav {height:auto;max-height:none;overflow:visible}
  .app-page .app-content :is(.phoenix-scroll-region,.phoenix-table,.table-wrap,.table-scroll) {
    height:auto;max-height:none!important;overflow-x:auto;overflow-y:visible;overscroll-behavior:auto;touch-action:pan-x pan-y;
  }
  .app-page .app-content :is(button,input,select,summary,.primary-action,.secondary-action,.text-action,.reading-link,.calendar-day-links a,.dataset-overview-item a,.phoenix-contents a,.share-tools a) {
    min-height:44px;min-width:44px;
  }
  .app-page .app-content :is(summary,.primary-action,.secondary-action,.text-action,.reading-link,.calendar-day-links a,.dataset-overview-item a,.phoenix-contents a,.share-tools a) {align-content:center}
  .app-page .app-content :is(.news-card,.tile-driver,.policy-hero,dd)>a {display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  /* Standalone source and disclosure actions in the 28 August archive. */
  .app-page .app-content :is(.top-story-card>div,.fx-module-intro,.macro-event-card,.disclosure-links,.disclosure-contact)>a {display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  .app-page .app-content :is(h2,h3,h4) a {display:inline-flex;align-items:center;min-height:44px;min-width:44px}
  .app-page .app-content :is(.release-identification p,.release-identification code) {font-size:12px!important}
}
@media screen and (max-width:1199px) {
  html body.app-shell {grid-template-columns:64px minmax(0,1fr)}
  .app-shell .app-sidebar {padding:24px 8px}
  .app-sidebar-label,.app-nav-label,.app-sidebar-bottom {display:none}
  .app-shell .app-sidenav a {justify-content:center;padding:10px}
  .app-shell .app-topnav {gap:12px}
  .app-shell .workspace-heading {flex-wrap:wrap}
  .workspace-release {flex:1 1 400px}
}
@media screen and (max-width:999px) {
  html body.app-shell {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;grid-template-areas:'top' 'side' 'main' 'foot'}
  .app-shell .app-topbar {display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto;gap:8px;padding:8px 16px}
  .app-shell .app-brand {grid-column:1;grid-row:1;height:auto;gap:8px}
  .app-shell .app-brand img {width:72px;height:40px}
  .app-brand-text strong {font-size:14px}
  .app-brand-text small {display:block;font-size:10px}
  .app-theme-switch {grid-column:2;grid-row:1;padding:2px;gap:0}
  .app-shell .app-menu-toggle {grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin:0;padding:10px}
  .app-menu-toggle span {display:none}
  .app-shell .app-topnav {display:none}
  .app-shell .app-sidebar {position:static;inset:auto;width:auto;display:none;padding:16px;box-shadow:none;border-bottom:1px solid var(--app-border)}
  .app-shell.is-sidebar-open .app-sidebar {display:flex}
  .app-shell.is-sidebar-open :is(.app-nav-label,.app-sidebar-label,.app-sidebar-bottom) {display:block}
  .app-shell.is-sidebar-open .app-sidenav {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .app-shell.is-sidebar-open .app-sidenav a {justify-content:flex-start}
  .app-shell.is-sidebar-open .app-mobile-sections {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px;padding-top:16px;border-top:1px solid #42536c}
  .app-mobile-sections a {display:flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:6px;color:#e2efff;font-size:12px;line-height:1.35}
  .app-mobile-sections a:hover,.app-mobile-sections a:focus-visible {background:#29435f;color:#fff}
  html[data-app-theme=light] .app-mobile-sections {border-color:#d5e1ed}
  html[data-app-theme=light] .app-mobile-sections a {color:#274964}
  html[data-app-theme=light] .app-mobile-sections a:hover,html[data-app-theme=light] .app-mobile-sections a:focus-visible {background:#e0eef7;color:#164e6e}
  .app-sidebar-bottom {margin-top:16px}
  .app-shell .workspace-heading {min-height:0;gap:16px;align-items:stretch;flex-direction:column;flex-wrap:nowrap}
  .workspace-release {flex:0 0 auto;width:100%}
  .app-shell .workspace-grid {grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;grid-template-areas:'markets markets' 'chart sectors' 'drivers calendar' 'perspective perspective';gap:16px}
  .app-shell .workspace-panel {min-height:0}
  .reading-group .workspace-market-list,.workspace-readings.is-filtered .reading-group .workspace-market-list {grid-template-rows:none;grid-auto-flow:row;grid-auto-rows:minmax(56px,auto)}
  .workspace-readings,.workspace-readings.is-filtered {min-height:0;flex:0 0 auto}
  .app-shell .app-footer {flex-direction:column;align-items:flex-start;gap:4px}
  .app-shell .app-content {padding:16px}
  /* Archived chart cards must expand with their source details on touch screens. */
  .app-page .app-content .market-chart-card {height:auto;max-height:none;aspect-ratio:auto;overflow:visible}
}
@media screen and (max-width:600px) {
  .app-shell .app-topbar {padding:8px;gap:8px 4px}
  .app-shell .app-brand {gap:6px}
  .app-shell .app-brand img {width:48px;height:36px;padding:3px}
  .app-brand-text {padding-left:6px}
  .app-brand-text strong {font-size:12px;line-height:1.4}
  .app-brand-text small {display:none}
  .app-shell .app-topnav {display:none}
  html body.app-shell>main.app-workspace {padding:16px!important}
  .app-home .workspace-heading h1 {font-size:26px!important}
  .app-home .workspace-heading .workspace-heading-caption {font-size:14px!important}
  .app-shell .workspace-grid {display:flex;flex-direction:column;gap:16px}
  .app-shell .workspace-panel {width:100%;padding:16px}
  .workspace-panel-heading {gap:4px 12px;margin-bottom:12px}
  .workspace-release {padding:12px}
  .release-primary>strong {flex-basis:100%}
  .reading-group .workspace-market-list,.workspace-readings.is-filtered .reading-group .workspace-market-list {grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-flow:row}
  .workspace-market-tabs {gap:4px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .workspace-market-tabs button {padding:8px 2px;font-size:12px}
  .workspace-reading .reading-name,.workspace-readings.is-filtered .reading-name {font-size:14px}
  .app-home .workspace-reading {min-height:60px;padding:10px 0}
  .benchmark-row {grid-template-columns:96px minmax(24px,1fr) 52px}
  .app-shell .workspace-perspective {align-items:flex-start}
  .workspace-perspective>div {flex-basis:100%}
  .perspective-mark {font-size:32px}
  .workspace-perspective>a {margin:0}
  .app-shell .app-footer {padding:16px}
  .app-shell .app-footer nav {gap:8px 16px}
  .app-shell .app-content {padding:16px}
  .app-page .app-content :is(.reading-card,.news-card,.insight-card,.search-result-card) {padding:16px}
  .app-shell.is-sidebar-open .app-sidenav {grid-template-columns:minmax(0,1fr)}
  .app-shell.is-sidebar-open .app-mobile-sections {grid-template-columns:minmax(0,1fr)}
}
@media screen {
  .app-theme-switch .app-theme-toggle {width:76px;min-width:76px;height:44px;min-height:44px;padding:3px}
}
/* Desktop chrome stays in the viewport while the document content scrolls. */
@media screen and (min-width:1000px) {
  html body.app-shell {grid-template-rows:68px minmax(0,1fr) auto}
  .app-shell .app-topbar {position:fixed;inset:0 0 auto 0;width:100%;height:68px;min-height:68px;z-index:50}
  .app-shell .app-sidebar {position:fixed;inset:68px auto 0 0;width:164px;height:auto;min-height:0;max-height:none;overflow:visible;z-index:40}
  .app-shell main.app-workspace [id] {scroll-margin-top:84px!important}
  .app-shell .app-footer {grid-column:2 / -1}
}
@media screen and (min-width:1000px) and (max-width:1199px) {
  .app-shell .app-sidebar {width:64px}
}

/* Desktop density: retain the six-panel map and document scrolling. */
@media screen and (min-width:1000px) {
  html body.app-shell>main.app-workspace {padding:10px!important;gap:8px}
  .app-shell .workspace-heading {min-height:78px;gap:12px}
  .workspace-release {padding:6px 10px;gap:2px}
  .release-meta-row,.release-meta-row>strong,.release-meta-row code {line-height:1.3}
  .app-shell .workspace-grid {gap:8px;grid-template-columns:minmax(0,1.3fr) minmax(0,1.1fr) minmax(0,1.1fr)}
  .app-shell .workspace-panel,.app-shell .workspace-panel.is-active {padding:10px}
  .workspace-panel-heading {min-height:44px;gap:8px;margin-bottom:6px}
  .app-home .workspace-subtitle {margin-bottom:6px!important}
  .app-home .workspace-footnote {margin-top:6px!important}
  .workspace-market-tabs {margin-bottom:6px;padding:3px}
  .reading-group .workspace-market-list {
    grid-template-rows:repeat(16,minmax(42px,max-content));
    grid-auto-rows:minmax(42px,max-content);align-content:start;
  }
  .workspace-readings.is-filtered .reading-group .workspace-market-list {
    grid-template-rows:none;grid-auto-flow:row;
    grid-auto-rows:minmax(42px,max-content);align-content:start;
  }
  .app-home .workspace-reading {min-height:42px;padding:3px 0;gap:1px 8px}
  .workspace-reading .reading-name,.workspace-readings.is-filtered .reading-name,
  .workspace-reading strong,.workspace-readings.is-filtered .workspace-reading strong,
  .workspace-reading .reading-change,.workspace-reading .reading-meta,
  .workspace-reading .reading-meta>span,.workspace-reading time {line-height:1.25}
  .benchmark-chart {min-height:0;grid-template-rows:repeat(8,minmax(36px,max-content))}
  .benchmark-row {min-height:36px}
  .benchmark-axis {padding-top:4px}
  .workspace-heatmap {grid-template-rows:repeat(7,minmax(42px,max-content));gap:4px}
  .workspace-sector {min-height:42px;padding:4px 6px;gap:4px}
  .workspace-driver-list {grid-template-rows:repeat(6,minmax(52px,max-content))}
  .workspace-driver {min-height:52px;padding:5px 0;gap:6px}
  .app-home .workspace-driver small {margin-bottom:0}
  .workspace-calendar-list {grid-template-rows:repeat(5,minmax(52px,max-content))}
  .workspace-calendar-day {min-height:52px;padding:5px 0;gap:6px}
  .app-shell .workspace-perspective {min-height:84px;padding:10px;gap:10px}
  .app-home .workspace-perspective p {margin-top:3px!important;line-height:1.4!important}
}

/* The archived 28 August presentation used thumbnail-scale labels. */
@media screen {
  .app-page .app-content :is(.eyebrow,.policy-hero__eyebrow,.story-kicker) {font-size:12px!important}
  html body.app-shell.app-page .app-content p.eyebrow {font-size:12px!important}
  .app-page .app-content :is(.fact-stack>div>span,.top-story-card>div>span,.disclosure-label) {font-size:12px!important}
  html[data-ticker-size="30"] .app-page .app-content :is(.tile-name,.tile-move,.tile-move em,.heatmap-cell span,.heatmap-cell .company-symbol,.heatmap-cell small,.fx-highlight,.board-row-heading span,.heatmap-band-heading span,.source-register-card span,.fx-driver-card>span,.decision-card span) {
    font-size:12px!important;line-height:1.35!important;
  }
  html[data-ticker-size="30"] .app-page .app-content .glance-tile:not([open]) {
    width:auto;height:auto;min-height:120px;aspect-ratio:auto;overflow:visible;
  }
  html[data-ticker-size="30"] .app-page .app-content .glance-tile:not([open]) summary {
    height:auto;min-height:120px;overflow:visible;padding:8px;
  }
  html[data-ticker-size="30"] .app-page .app-content :is(.glance-grid,.glance-grid-compact) {
    grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;overflow:visible;
  }
  html[data-ticker-size="30"] .app-page .app-content :is(.heatmap-grid,.heatmap-sectors,.heatmap-companies) {
    grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:5px;
  }
  html[data-ticker-size="30"] .app-page .app-content .heatmap-cell {
    width:auto;height:auto;min-height:120px;aspect-ratio:auto;overflow:visible;padding:8px;
  }
}
@media screen and (max-width:720px) {
  html[data-ticker-size="30"] .app-page .app-content :is(.glance-grid,.glance-grid-compact,.heatmap-grid,.heatmap-sectors,.heatmap-companies) {
    grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-columns:auto;
    grid-auto-flow:row;grid-template-rows:none;overflow:visible;
  }
}
