@layer tokens, base, layouts, components;
@import url('./design-system/tokens.css');
@import url('./design-system/base.css');
@import url('./tenant-users.css') layer(layouts);
@import url('./design-system/components.css');
@import url('./design-system/branding.css');
@layer layouts {

.tenant-layout.page-layout { grid-template-columns: var(--shell-sidebar) minmax(0, 1fr); }
.tenant-layout > .page-outline { display: none; }
/* Signed-in workspaces identify the page in their heading, so they omit the reading breadcrumb. */
:is(.tenant-layout, .account-layout) .breadcrumb { display: none; }
.tenant-sidebar-heading { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; }
.tenant-monogram { display: grid; place-items: center; width: 28px; height: 28px; }
.tenant-sidebar-heading strong, .tenant-sidebar-heading div > span { display: block; }
.tenant-navigation { display: grid; gap: 2px; }
.tenant-navigation a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-2); }
.tenant-navigation svg, .tenant-workspace-card > svg, .tenant-empty-icon svg { width: var(--icon-nav); height: var(--icon-nav); flex-shrink: 0; }
/* Workspaces span the page, but explanatory prose keeps a readable line length. */
.tenant-page p { max-width: 100ch; }
.tenant-detail-card { overflow: hidden; }
.tenant-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 16px; padding: 16px; margin: 0; }
.tenant-detail-grid dt { margin-bottom: 2px; }
.tenant-detail-grid dd { margin: 0; overflow-wrap: anywhere; }
.tenant-id-field { grid-column: 1 / -1; }
.tenant-id-field dd { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.tenant-detail-note { padding: 10px 16px; margin: 0; }
.tenant-page .tenant-section-heading { margin: 24px 0 12px; }
.tenant-workspace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 12px; }
.tenant-workspace-card { display: block; }
.tenant-workspace-card h3 { margin: 8px 0 2px; }
.tenant-workspace-card p { margin: 0 0 10px; }
.tenant-empty { text-align: center; }
.tenant-empty-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; }
.tenant-empty .tenant-kicker { margin: 14px 0 6px; }
.tenant-empty h2 { margin: 0 0 8px; }
.tenant-empty > p:last-child { max-width: 480px; margin: 0 auto; }
.tenant-info-note { margin: 16px 0; }
.tenant-info-note p { margin: 4px 0 0; }
.tenant-audit-event { padding: 12px 0; }
.tenant-audit-event > p { margin: 0; }
.tenant-audit-event .tenant-event-reference { overflow-wrap: anywhere; margin-top: 6px; }
.tenant-history-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; }
.tenant-history-filter label { display: grid; gap: 4px; }
.tenant-history-filter input, .tenant-history-filter select { width: 100%; min-width: 0; }
.tenant-history-filter .history-search, .history-search-help, .history-actions, .tenant-history-filter .history-routine { grid-column: 1 / -1; }
.tenant-history-filter .history-routine { display: flex; align-items: center; gap: 8px; }
.tenant-history-filter input[type="checkbox"] { width: var(--choice-box); }
.history-search-help, #tenant-history-summary { margin: 0; }
#tenant-history-summary { margin: 16px 0 8px; }
.history-actions, .history-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.history-pagination { justify-content: space-between; margin-block: 16px; }
.tenant-page .history-event-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin: 0 0 8px; }
.tenant-audit-event details, .history-group > details { margin-top: 8px; }
.tenant-audit-event summary, .history-group summary { padding-block: 4px; }
.history-detail { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 16px; padding: 12px; }
.history-detail dd { margin: 0; overflow-wrap: anywhere; }
.history-group { margin-block: 12px; }
@media (max-width: 1023px) {
  .tenant-history-filter { grid-template-columns: 1fr; }
  .history-detail { grid-template-columns: 1fr; gap: 4px; }
  .history-detail dd { margin-bottom: 10px; }
}
@media (max-width: 639px) {
  .tenant-detail-grid, .tenant-workspace-grid { grid-template-columns: 1fr; }
  .tenant-detail-grid { padding: 12px; }
}
.page-layout.account-layout { display: block; }
.account-layout > .sidebar, .account-layout > .page-outline { display: none; }
.account-card { margin: 20px 0 16px; }
/* Support-only filters join the activity toolbar row when the support view is selected. */
.activity-support-filters { display: contents; }
.account-form { display: grid; gap: 14px; }
.account-form label { display: grid; gap: 4px; }
.account-form input:not([type="checkbox"]), .account-form select {
  width: 100%; min-width: 0;
}
.account-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-form .password-toggle { display: flex; align-items: center; gap: 8px; }
.account-form .password-toggle input { width: var(--choice-box); }
.account-page .field-hint, .account-page .account-legal { margin: 0; }
.account-page .account-legal { margin-top: 14px; }
.account-button { display: inline-block; text-align: center; }
#resend-email { margin-top: 14px; }
.account-message { overflow-wrap: anywhere; }
.account-message:empty { display: none; }
.profile-list { margin: 0 0 20px; }
.profile-list > div { padding: 10px 0; }
.profile-list dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.verified-badge { display: inline-block; margin-left: 6px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-nav-link { white-space: nowrap; padding: 5px 8px; }
@media (max-width: 1439px) { .account-nav-register { display: none; }
}
@media (max-width: 639px) {
  .account-name-row { grid-template-columns: 1fr; }
  .account-nav-link { padding: 5px; }
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
}
.skip-link:focus {
  top: 8px;
}
.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  position: sticky;
  top: 0;

  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.brand-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.beta-badge {
  display: inline-block;
}
.brand-caption {
  display: block;
  margin-top: 5px;
  white-space: normal;
}
.top-nav {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-left: auto;
}
.top-nav a {
  padding: 4px 12px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-actions > a { white-space: nowrap; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--control-h);
}
svg {
  width: 18px;
  height: 18px;
}
.menu-toggle {
  display: none;
}
/* Every page shares the workspace shell: navigation pinned to the left edge and content across the rest of the window. */
.page-layout {
  display: grid;
  grid-template-columns: var(--shell-sidebar) minmax(0, 1fr);
}
/* Lessons, docs and other reading pages center their prose at a readable measure; workspaces use the full width. */
.page-layout:not(.tenant-layout, .account-layout) .page-body {
  width: 100%;
  max-width: var(--reading-measure);
  margin-inline: auto;
}
.sidebar {
  position: sticky;
  top: var(--site-header-height, 56px);
  height: calc(100dvh - var(--site-header-height, 56px));
  overflow-y: auto;
  padding: 24px 12px 20px;
}
.sidebar-label {
  margin: 0 0 8px;
  padding-left: var(--space-2);
}
.overview-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
}
.curriculum-label {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chapter {
  margin: 8px 0;
}
.chapter summary {
  list-style: none;
  padding: 4px var(--space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chapter summary::-webkit-details-marker {
  display: none;
}
.chapter summary:after {
  content: "›";
  transform: rotate(0deg);
}
.chapter[open] > summary:after {
  transform: rotate(90deg);
}
.chapter ul {
  display: grid;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 4px 0 12px var(--space-3);
}
.chapter li {
  padding: 0;
}
/* Each row's highlight stays inside its own list item, so hover and current states never overlap a neighbor. */
.chapter li a {
  padding: var(--space-1) var(--space-2);
}
.curriculum-tree summary::after {
  flex-shrink: 0;
}
/* Each nesting level steps in from its parent's guide line so the hierarchy stays readable. */
.curriculum-tree ul {
  margin: 4px 0 8px var(--space-3);
  padding-left: var(--space-1);
}
.curriculum-subgroup {
  margin: 0;
}
.curriculum-subgroup > summary {
  padding: var(--space-1) var(--space-2);
}
.curriculum-tree .curriculum-subgroup ul {
  margin-bottom: 2px;
}
.planned-topic {
  display: block;
  padding: var(--space-1) var(--space-2);
  overflow-wrap: anywhere;
}
.topic-meta {
  display: block;
  margin-top: 2px;
}
main {
  min-width: 0;
  padding: var(--space-6) var(--space-8) 0;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
h1 {
  margin: 0 0 16px;
}
h2 {
  margin: 0 0 12px;
}
h3 {
  margin: 0 0 8px;
}
p {
  margin: 0 0 14px;
}
.lesson-figure {
  margin: 28px 0;
  max-width: 100%;
}
.lesson-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.lesson-figure figcaption {
  padding: 12px 2px 0;
}
.lesson-figure figcaption a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  margin-top: 4px;
}
.lesson-diagram {
  margin: 28px 0;
}
.diagram-viewport {
  overflow-x: auto;
}
.diagram-viewport img {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
}
.diagram-viewport .diagram-dark,
:root[data-theme="dark"] .diagram-viewport .diagram-light {
  display: none;
}
:root[data-theme="dark"] .diagram-viewport .diagram-dark {
  display: block;
}
.lesson-diagram figcaption {
  margin-top: 12px;
}
.diagram-expand,
.diagram-close {
  margin-top: 8px;
}
.diagram-dialog {
  width: min(1280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
}
.diagram-dialog .diagram-viewport img {
  min-width: 720px;
}
@media (max-width: 1023px) {
  .diagram-viewport img {
    min-width: 720px;
  }
}
.diagram-close {
  display: block;
  margin: 0 0 12px auto;
}
/* Lesson tables sit in the shared scroll wrapper, which carries the spacing so wide tables scroll inside it on phones. */
.ds-table-wrap:has(> .lesson-table) {
  margin: 24px 0;
}
.lesson-table th[scope="row"] {
  width: 32%;
}
article code {
  overflow-wrap: anywhere;
}
article :not(pre) > code {
  padding: 2px 5px;
}
article pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 18px 20px;
  margin: 20px 0;
  tab-size: 2;
}
article pre code {
  overflow-wrap: normal;
}
.lead {
  margin-bottom: 30px;
}
.intro-box {
  margin: 24px 0 32px;
}
.box-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}
.intro-box ul {
  margin: 12px 0 0;
  padding-left: 23px;
}
.intro-box li {
  padding: 3px 0;
}
section {
  margin: 32px 0;
  scroll-margin-top: calc(var(--site-header-height, 56px) + var(--space-6));
}
.heading-link {
  margin-left: 10px;
}
.concept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.concept h3 {
  margin: 12px 0;
}
.concept-footer {
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
}
.learning-path {
  list-style: none;
  padding: 0;
  margin: 26px 0;
}
.learning-path li {
  display: flex;
  gap: 20px;
  padding: 21px 0;
}
.learning-path li:first-child {
  padding-top: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
}
.learning-path h3 {
  margin: 1px 0 5px;
}
.learning-path p {
  margin: 0;
}
.progress-note {
  display: flex;
  gap: 15px;
}
.progress-note p {
  margin: 0;
}
.info-icon {
  display: flex;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
}
.next-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 48px;
}
.next-page div span {
  display: block;
  margin-bottom: 5px;
}
.page-outline {
  position: sticky;
  top: var(--site-header-height, 56px);
  height: fit-content;
  padding: 28px 16px 20px 8px;
}
.page-outline .sidebar-label {
  padding-left: 14px;
}
.page-outline nav {
  display: grid;
}
.page-outline nav a {
  padding: 5px 12px;
  margin-left: -1px;
}
.curriculum-pagination {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 40px 0 48px;
}
.lesson-quiz {
  padding-top: 36px;
}
.lesson-quiz > .eyebrow {
  margin-bottom: 12px;
}
.quiz-progress {
  display: inline-block;
  margin-bottom: 10px;
}
.quiz-question {
  margin: 24px 0;
}
.quiz-question fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
}
.quiz-question legend {
  width: 100%;
  padding: 0;
  overflow-wrap: anywhere;
}
.quiz-number {
  display: block;
  margin-bottom: 10px;
}
.quiz-options {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
/* Long unbroken answers, such as URLs, wrap instead of widening the page. */
.quiz-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.quiz-option input {
  flex-shrink: 0;
  width: 18px;
  margin: 3px 0 0;
}
.quiz-feedback {
  margin: 18px 0 0;
}
.quiz-feedback:empty {
  display: none;
}
.curriculum-pagination .next-page {
  margin: 0;
  gap: 12px;
}
.curriculum-prev {
  grid-column: 1;
}
.curriculum-next {
  grid-column: 2;
}
@media (max-width: 639px) {
  .curriculum-pagination {
    grid-template-columns: 1fr;
  }
  .curriculum-pagination .next-page {
    grid-column: 1;
  }
}
.page-footer {
  padding: 16px 0 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}
.privacy-banner {
  position: fixed;
  z-index: 20;
  bottom: 20px;
  right: 20px;
  width: min(480px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.privacy-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
.privacy-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.privacy-heading h2 { margin: 0; }
.privacy-dialog h3 { margin: 24px 0 8px; }
.privacy-banner p,
.privacy-dialog p { margin: 12px 0; }
.privacy-option { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.privacy-option input { width: var(--choice-box); }
.privacy-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.app-version {
  white-space: nowrap;
}
.archive-month { margin-left: 14px; }
.changelog-year { margin-top: 48px; }
.changelog-month > h3 { margin-top: 28px; }
.changelog-day { margin-top: 20px; padding-top: 20px; }
.changelog-day > h4 { margin: 0 0 16px; }
.changelog-entry > h5 { margin: 0 0 16px; }
.changelog-entry + .changelog-entry { margin-top: 32px; }
.changelog-entry li { margin-bottom: 14px; }
.author-placeholder p {
  margin: 10px 0 0;
}
.mobile-navigation {
  margin: 0;
  max-height: 100dvh;
  height: 100dvh;
  max-width: 90vw;
  width: 300px;
  padding: 16px;
}
.mobile-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.not-found {
  max-width: 700px;
  margin: 12vh auto;
  padding: 30px;
}
@media (min-width: 1440px) {
  /* Reading pages keep the outline column even when a page has no outline, so prose sits in the same place on every page. */
  .page-layout:not(.tenant-layout, .account-layout) {
    grid-template-columns: var(--shell-sidebar) minmax(0, 1fr) var(--shell-outline);
  }
}
@media (max-width: 1439px) {
  .page-outline {
    display: none;
  }
  .header {
    padding: 0 20px;
    gap: 20px;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (max-width: 1023px) {
  .header {
    height: auto;
    min-height: var(--header-h);
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .stage {
    display: none;
  }
  .header-actions {
    gap: 4px;
    margin-left: auto;
  }
  .top-nav {
    gap: 0;
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .top-nav a {
    padding: 6px 10px;
  }
  .page-layout, .tenant-layout.page-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  main {
    padding: var(--space-5) var(--space-5) 0;
  }
  .breadcrumb {
    margin-bottom: 14px;
  }
}
@media (max-width: 639px) {
  .header {
    height: auto;
    min-height: var(--header-h);
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand {
    flex: 1 0 100%;
    min-width: 0;
    gap: 8px;
  }
  .header-actions {
    order: 2;
  }
  .top-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 10px;
    margin-top: 4px;
    gap: 18px;
  }
  .top-nav a {
    padding: 5px 16px;
  }
  .page-layout main {
    padding: var(--space-5) var(--space-4) 0;
  }
  .intro-box {
    margin-bottom: 34px;
  }
  .concept-grid {
    grid-template-columns: 1fr;
  }
  .page-footer {
    flex-direction: column;
    gap: 16px;
  }
  .learning-path li {
    gap: 14px;
  }
  html {
    scroll-padding-top: 150px;
  }
  section {
    scroll-margin-top: calc(var(--site-header-height, 131px) + var(--space-6));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}}

@layer layouts {
  /* The tenant switcher sits in the open space before the main navigation. Its column stays empty while it is hidden. */
  .header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: var(--space-4); }
  .brand { grid-column: 1; grid-row: 1; }
  .tenant-switcher { grid-column: 2; grid-row: 1; justify-self: end; }
  .top-nav { grid-column: 3; grid-row: 1; }
  .header-actions { grid-column: 4; grid-row: 1; }
  .header-tools { grid-column: 5; grid-row: 1; display: flex; align-items: center; gap: var(--space-1); }
  @media (max-width: 1199px) {
    .header { height: auto; padding-block: var(--space-2); grid-template-columns: minmax(0, 1fr) auto; }
    .brand { grid-column: 1; grid-row: 1; }
    .header-tools { grid-column: 2; grid-row: 1; justify-self: end; }
    .top-nav { grid-column: 1; grid-row: 2; width: auto; margin: 0; justify-content: flex-start; padding: 0; gap: 0; }
    .header-actions { grid-column: 2; grid-row: 2; justify-self: end; }
    .tenant-switcher { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  }
  @media (max-width: 639px) {
    .header { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); }
    .brand { grid-column: 1 / -1; }
    .header-tools { grid-column: 2; grid-row: 2; align-self: start; }
    .header-actions { grid-column: 1; grid-row: 2; justify-self: start; flex-wrap: wrap; min-width: 0; margin: 0; }
    .top-nav { grid-column: 1 / -1; grid-row: 3; justify-content: center; }
    .tenant-switcher { grid-column: 1 / -1; grid-row: 4; justify-self: stretch; }
    .tenant-switcher .ds-nav-menu-button { max-width: none; width: 100%; }
  }
}

@layer layouts {
  /* Short pages keep the site footer at the bottom of the window; longer pages push it below their content. */
  :is(.page-layout > main, main.not-found):has(> .page-footer) { display: flex; flex-direction: column; min-height: calc(100dvh - var(--site-header-height, 56px)); }
  main.not-found:has(> .page-footer) { margin-block: 0; padding-block: 12vh 0; }
  :is(.page-layout > main, main.not-found) > .page-body { flex: 1 0 auto; min-width: 0; }
  /* The navigation scrolls on its own so the sidebar footer stays pinned to the bottom. */
  .sidebar > .sidebar-inner { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .sidebar > .ds-sidebar-footer { flex-shrink: 0; margin-top: var(--space-3); }
  /* The mobile menu scrolls its navigation copy and keeps the footer copy in view. */
  .mobile-navigation[open] { display: flex; flex-direction: column; overflow: hidden; }
  .mobile-content { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
  .mobile-content > .sidebar-inner { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .mobile-content > .ds-sidebar-footer { flex-shrink: 0; margin-top: var(--space-3); }
  /* Sign-in pages keep their sidebar only as the source of the mobile menu, so it never shows in the page. */
  .auth-layout > .sidebar { display: none; }
  .ds-sidebar-floating { position: fixed; left: var(--space-3); bottom: var(--space-3); top: auto; z-index: 20; width: var(--shell-sidebar); height: auto; }
  @media (min-width: 1024px) {
    .sidebar { display: flex; flex-direction: column; overflow: visible; }
    /* Account pages keep an empty navigation column that holds only the footer. */
    .page-layout.account-layout:not(.auth-layout) { display: grid; grid-template-columns: var(--shell-sidebar) minmax(0, 1fr); max-width: none; }
    .account-layout:not(.auth-layout) > .sidebar { display: flex; }
    .account-layout > .sidebar > .sidebar-inner { display: none; }
    .account-layout > .sidebar > .ds-sidebar-footer { margin-top: auto; }
    .page-layout.account-layout:not(.auth-layout) main { width: 100%; }
  }
  @media (max-width: 1023px) {
    /* The not-found page has no menu, so its floating footer stays visible. */
    body > .ds-sidebar-floating { display: flex; flex-direction: column; }
  }
}

@layer layouts {
  /* The ideas board shows one column per stage on desktop and stacks them below 1024px. */
  .ideas-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
  .ideas-board > section, .ideas-board h2 { margin: 0; }
  @media (max-width: 1023px) { .ideas-board { grid-template-columns: minmax(0, 1fr); } }
}

@layer layouts {
  /* The Lab catalogue stacks its collapsible tracks under In progress and Completed labels. */
  .lab-group-label { margin: var(--space-8) 0 var(--space-1); }
  .lab-tracks { display: grid; }
  .lab-tracks:empty { display: none; }
  .lab-tracks > .lab-track { margin: 0; }
  .lab-page > section, .lab-catalogue > section { margin-top: var(--space-8); }
  .lab-lesson-card { margin-top: var(--space-8); }
}
