/* Atelier clair, every route and portal: no page/role allowlist.
 * Semantic status colors, hidden states, dialogs, permissions and exam layouts
 * are retained. Course-specific presentation remains in its existing files.
 */
@media screen {
  :root {
    --lms-color-brand: #7D9481;
    --lms-color-connector: #88A18F;
    --lms-color-frame: #A9B7AB;
    --lms-color-action: #242C44;
    --lms-color-text: #000000;
    --lms-color-surface: #FFFFFF;
    --lms-color-shade: #E6E9E6;
    --lms-color-reference: #A7B7A7;
    --lms-font-family: "Segoe UI", Arial, sans-serif;
    --lms-font-body: 16px;
    --lms-font-title: 30px;
    --lms-font-heading: 18px;
    --lms-font-meta: 13px;
    --lms-line-height: 1.5;
    --lms-weight-normal: 400;
    --lms-weight-emphasis: 600;
    --lms-space-1: 4px;
    --lms-space-2: 8px;
    --lms-space-3: 12px;
    --lms-space-4: 16px;
    --lms-space-6: 24px;
    --lms-space-7: 28px;
    --lms-border-width: 1px;
    --lms-radius-control: 8px;
    --lms-radius-card: 12px;
    --lms-control-size: 44px;
    --lms-focus-width: 3px;
    --lms-focus-offset: 3px;
    --lms-shadow: 0 2px 6px var(--lms-color-shade);
    --bg: var(--lms-color-surface);
    --surface: var(--lms-color-surface);
    --surface-soft: var(--lms-color-shade);
    --text: var(--lms-color-text);
    --muted: var(--lms-color-action);
    --muted-strong: var(--lms-color-action);
    --line: var(--lms-color-frame);
    --accent: var(--lms-color-reference);
    --accent-strong: var(--lms-color-action);
    --accent-soft: var(--lms-color-shade);
    --gold: var(--lms-color-action);
    --gold-soft: var(--lms-color-shade);
    --ink: var(--lms-color-action);
    --cream: var(--lms-color-surface);
    --border-soft: var(--lms-color-frame);
    --shadow: var(--lms-shadow);
    --document-border: var(--lms-color-frame);
    --document-border-hover: var(--lms-color-action);
    --document-bg-card: var(--lms-color-surface);
    --document-bg-hover: var(--lms-color-shade);
    --document-bg-selected: var(--lms-color-shade);
    --document-selected-border: var(--lms-color-action);
    --document-folder-fill: var(--lms-color-reference);
    --document-folder-stroke: var(--lms-color-action);
  }
  body { background: var(--lms-color-surface); font-family: var(--lms-font-family); }
  body::before { background-image: none; }
  body.lms-shared-shell { font-size: 16px; line-height: 1.5; }
  body.lms-shared-shell .shell { min-width: 0; }
  body.lms-shared-shell .main { padding: 24px 28px 40px; min-width: 0; }
  body.lms-shared-shell .topbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: nowrap; gap: 16px;
    padding: 0 0 16px; margin: 0 0 16px;
    border-bottom: 1px solid var(--lms-color-frame);
  }
  body.lms-shared-shell .topbar > div { min-width: 0; }
  body.lms-shared-shell .topbar > div:last-child { text-align: right; }
  body.lms-shared-shell #page-title { font-size: 18px; margin: 2px 0 0; line-height: 1.4; }
  body.lms-shared-shell .topbar .eyebrow { margin: 0; font-size: 13px; }
  .lms-shell-identity { display: flex; align-items: center; gap: 12px; color: var(--lms-color-action); font-weight: 600; }
  .lms-shell-identity img { width: 40px; height: 40px; object-fit: contain; }
  body.lms-shared-shell .main-panel {
    min-width: 0; padding: 0; border: 0; box-shadow: none;
    background: var(--lms-color-surface); backdrop-filter: none;
  }
  body.lms-shared-shell .main-panel > .panel-head { margin: 0 0 16px; padding: 0; }
  body.lms-shared-shell #section-title { font-size: 18px; color: var(--lms-color-action); }
  body.lms-shared-shell #mirai-navigation-core-bar {
    grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px;
    padding: 8px 0 16px; margin-bottom: 24px;
    border: 0; border-bottom: 1px solid var(--lms-color-frame);
    border-radius: 0; box-shadow: none;
  }
  body.lms-shared-shell .mirai-workspace-tab-strip { padding-bottom: 12px; border: 0; }
  body.lms-shared-shell .mirai-workspace-tab-item {
    height: auto; min-height: 44px; overflow: visible;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    border-color: var(--lms-color-frame); border-radius: 8px;
    background: var(--lms-color-surface);
  }
  body.lms-shared-shell .mirai-workspace-tab-item.active {
    border-color: var(--lms-color-action); box-shadow: inset 0 -3px 0 var(--lms-color-brand);
  }
  body.lms-shared-shell .mirai-workspace-tab-title { font-size: 13px; font-weight: 600; }
  body.lms-shared-shell .mirai-nav-address { grid-template-columns: minmax(0, 1fr) auto; }
  body.lms-shared-shell #mirai-navigation-core-bar .mirai-nav-crumb { padding: 6px 8px; border: 0; font-size: 13px; }
  body.lms-shared-shell .mirai-nav-breadcrumbs { padding: 4px; }
  .lms-shell-path { position: relative; min-width: 0; }
  .lms-shell-path > summary {
    min-height: 44px; padding: 10px 12px; cursor: pointer;
    border: 1px solid var(--lms-color-frame); border-radius: 8px;
    color: var(--lms-color-action); background: var(--lms-color-surface); font-weight: 600;
  }
  .lms-shell-path > summary:focus-visible { outline: 3px solid var(--lms-color-action); outline-offset: 3px; }
  .lms-shell-path > .mirai-nav-path-form {
    position: absolute; top: 100%; right: 0; z-index: 20;
    width: min(520px, 80vw); padding: 16px;
    border: 1px solid var(--lms-color-action); border-radius: 8px;
    background: var(--lms-color-surface); box-shadow: var(--lms-shadow);
  }
  body.lms-shared-shell #mxpuiMenu { scrollbar-gutter: stable; overscroll-behavior: contain; }
  body.lms-shared-shell #mxpuiMenu .nav-item { min-height: 44px; font-size: 13px; line-height: 1.4; padding: 8px; }
  body.lms-shared-shell #mxpuiMenu .brand-name { font-size: 15px; }
  body.lms-shared-shell .sidebar-account:not([hidden]) {
    display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px;
    background: var(--lms-color-surface); border-color: var(--lms-color-frame);
  }
  body.lms-shared-shell .profile-label {
    flex: 1 0 100%; width: 100%; max-width: 100%; white-space: normal;
    overflow-wrap: anywhere; font-size: 13px;
    background: var(--lms-color-shade); color: var(--lms-color-action);
  }
  body.lms-shared-shell #mxpuiToggle {
    color: var(--lms-color-action); background: var(--lms-color-surface);
    border-color: var(--lms-color-frame); box-shadow: var(--lms-shadow);
  }
  /* Existing department/help components retain all content and actions. */
  body.lms-shared-shell :is(.community-help-hero, .community-help-principle, .community-help-card, .pedagogy-template-library, .pedagogy-ai-specification) {
    color: var(--lms-color-action); background: var(--lms-color-surface);
    border-color: var(--lms-color-frame); border-radius: 12px; box-shadow: none; min-width: 0;
  }
  body.lms-shared-shell :is(.community-help-principle-icon, .community-help-card-icon) { color: var(--lms-color-action); background: var(--lms-color-reference); }
  body.lms-shared-shell :is(.community-help-center, .pedagogy-template-library) :is(h1,h2,h3,h4) { color: var(--lms-color-action); font-weight: 600; }
  body.lms-shared-shell :is(.community-help-hero, .pedagogy-template-library-head) { grid-template-columns: minmax(0, 1fr) minmax(260px, .5fr); }
  body.lms-shared-shell .community-help-hero h2 { font-size: clamp(24px, 2.5vw, 30px); line-height: 1.3; }
  body.lms-shared-shell .community-help-shortcuts { flex-wrap: wrap; }
  body.lms-shared-shell .simple-workflow-card {
    color: var(--lms-color-action); background: var(--lms-color-surface);
    border-color: var(--lms-color-frame); border-radius: 12px;
  }
  body.lms-shared-shell .simple-workflow-card p { color: var(--lms-color-action); }
  body.lms-shared-shell .simple-form-note {
    color: var(--lms-color-action); background: var(--lms-color-shade);
    border-color: var(--lms-color-frame);
  }
  body.lms-shared-shell :is(.settings-hero, .lms-philosophy-contract, .settings-branch-row) {
    background: var(--lms-color-surface); border-color: var(--lms-color-frame);
  }
  body.lms-shared-shell .lms-philosophy-pillars article { border-color: var(--lms-color-frame); }
  body.lms-shared-shell :is(.settings-card, .settings-field, .settings-branch-list) { min-width: 0; }
  body.lms-shared-shell .settings-branch-form {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  }
  @media (min-width: 1200px) {
    body.lms-shared-shell .shell { margin-left: 256px; }
    body.lms-shared-shell #MiraiXP-UI { inset: 0 auto 0 0; width: 256px; }
    body.lms-shared-shell .mxpui-menu-bar { display: block; height: 100%; }
    body.lms-shared-shell #mxpuiToggle { display: none; }
    body.lms-shared-shell #mxpuiMenu[data-shell-pinned="true"]:not([hidden]) {
      display: flex; position: absolute; inset: 0;
      width: 256px; max-width: 256px; height: 100%; max-height: 100%;
      padding: 20px 12px; border: 0; border-right: 1px solid var(--lms-color-frame);
      border-radius: 0; box-shadow: none; backdrop-filter: none;
    }
  }
  @media (max-width: 1199px) {
    body.lms-shared-shell .shell { margin-left: 0; }
    body.lms-shared-shell .topbar { padding-right: 60px; }
    body.lms-shared-shell #MiraiXP-UI { top: 18px; right: 18px; }
    body.lms-shared-shell #mirai-navigation-core-bar { grid-template-columns: minmax(0, 1fr); }
    body.lms-shared-shell .mirai-nav-actions { flex-wrap: wrap; justify-content: flex-start; }
  }
  /* Account for the sidebar's width when arranging old wide help grids. */
  @media (max-width: 1450px) {
    body.lms-shared-shell :is(.community-help-hero, .pedagogy-template-library-head, .pedagogy-ai-specification) { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 760px) {
    body.lms-shared-shell .main { padding: 16px 12px 32px; }
    body.lms-shared-shell .topbar { align-items: flex-start; flex-wrap: wrap; }
    body.lms-shared-shell .topbar > div:last-child { text-align: left; }
    .lms-shell-identity { font-size: 13px; flex-wrap: wrap; }
    body.lms-shared-shell #page-title { font-size: 15px; }
    body.lms-shared-shell .mirai-nav-address { grid-template-columns: minmax(0, 1fr); }
    .lms-shell-path > .mirai-nav-path-form { position: static; width: 100%; grid-template-columns: minmax(0, 1fr); }
    body.lms-shared-shell .community-help-hero { padding: 16px; }
    body.lms-shared-shell .community-help-summary { grid-template-columns: minmax(0, 1fr); }
  }
  @media (prefers-reduced-motion: reduce) {
    body.lms-shared-shell :is(#mxpuiToggle span, #mxpuiMenu, .lms-shell-path) { transition: none; animation: none; scroll-behavior: auto; }
  }
}
@media print {
  body.lms-shared-shell .shell { margin-left: 0; }
  body.lms-shared-shell #MiraiXP-UI, .lms-shell-identity, .lms-shell-path { display: none; }
}
