@import url('/css/card-system.css');
@import url('/css/shell.css');
@import url('/css/components.css');
@import url('/css/section-art.css');
@import url('/css/skins.css');
@import url('/css/icon-styles.css');
@import url('/css/card-styles.css');
/* Final token layer, loaded after each module. Content and printed documents retain their own layout. */
html[data-appearance-shape] body {
  background-color: var(--parchment);
  background-image: none;
  color: var(--ink);
}
html[data-appearance-shape] .sidebar {
  background: linear-gradient(165deg, var(--sidebar-ink), var(--sidebar-ink-light));
  border: 0;
}
html[data-appearance-shape] .nav-item {
  border-radius: var(--radius-control);
  color: var(--sidebar-muted);
}
html[data-appearance-shape] .nav-item.active {
  background: var(--primary);
  color: var(--primary-text);
  box-shadow: 0 4px 18px #0002;
}
html[data-appearance-shape] .nav-item.active .app-icon {
  color: inherit;
  background: #ffffff20;
}
html[data-appearance-shape] .nav-item:hover {
  color: var(--sidebar-text);
}
html[data-appearance-shape] .brand .glyph {
  color: var(--sidebar-text);
  border-color: #ffffff55;
  background: #ffffff12;
}
html[data-appearance-shape] :is(.btn-primary, .btn-gold, .btn-login, .appearance-save) {
  background: var(--primary);
  color: var(--primary-text);
  border-color: transparent;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 18%, transparent);
}
html[data-appearance-shape] :is(.btn-outline, .btn-secondary, .icon-btn) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}
html[data-appearance-shape] :is(.btn, .icon-btn, .tab-btn, .portal-nav a) {
  border-radius: var(--radius-control);
}
html[data-appearance-shape]
  :is(
    .table-wrap,
    .modal-box,
    .security-card,
    .category-card,
    .item-card,
    .stat-card,
    .portal-card,
    .sa-card,
    .sa-hero,
    .sa-sticky,
    .ac-card,
    .ac-panel,
    .ei-card,
    .ei-panel,
    .form-card,
    .forgot-box
  ) {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-theme);
}
html[data-appearance-shape] :is(.category-card, .item-card) {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
html[data-appearance-shape] :is(.category-card, .item-card):hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}
html[data-appearance-shape] :is(.category-card-icon, .item-icon, .stat-icon) {
  color: var(--accent-text);
}
html[data-appearance-shape]
  :is(input:not([type='checkbox']):not([type='radio']):not([type='color']), select, textarea) {
  background-color: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius-control);
}
html[data-appearance-shape] :is(input[type='checkbox'], input[type='radio']) {
  accent-color: var(--primary);
}
html[data-appearance-shape] :where(select:not([multiple]):not([size])) {
  background-image: var(--select-chevron);
  background-position: left 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-inline-end: 40px;
}
/* The chevron sits at the end of the line: on the left in Arabic and Hebrew, on the right in English. */
html[dir='ltr'][data-appearance-shape] :where(select:not([multiple]):not([size])) {
  background-position: right 12px center;
}
html[data-appearance-shape]
  :is(
    .app-select-chevron,
    .second-lang-toggle .chevron,
    .feature-year-chevron,
    .grade-level-head .chevron,
    .job-card-head .chevron,
    .ta-scope-btn .chevron,
    .asc-plan-caret
  ) {
  background-image: var(--select-chevron);
}
html[data-appearance-shape] :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}
html[data-appearance-shape] thead th {
  background: var(--table-header);
  color: var(--slate);
}
html[data-appearance-shape] tbody tr:hover {
  background: var(--panel-alt);
}
html[data-appearance-shape] .tab-btn.active,
html[data-appearance-shape] .portal-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-text);
}
html[data-appearance-shape] .identity-panel {
  background: linear-gradient(145deg, var(--sidebar-ink), var(--sidebar-ink-light));
  color: #ffffff;
}
html[data-appearance-shape] .identity-panel :is(.eyebrow, .brand-mark .glyph) {
  color: #cbd5ff;
}
html[data-appearance-shape] .form-card {
  padding: 32px;
}
html[data-appearance-shape] .ac-page {
  --ac-accent: var(--primary);
  --ac-border: var(--line);
  --ac-muted: var(--slate);
  --ac-card: var(--panel);
}
html[data-appearance-shape] :is(.sa-main, .sa-player) {
  --sa-accent: var(--accent-text);
}
html[data-appearance-shape] .ei-hero {
  background: linear-gradient(125deg, var(--sidebar-ink), var(--primary));
  color: #ffffff;
  border-radius: var(--radius-card);
}
html[data-appearance-shape] :is(.ac-terms, .ei-target, .ei-stats > div) {
  background: var(--panel-alt);
  color: var(--ink);
  border-color: var(--line);
}
html[data-appearance-shape] :is(.ei-badge, .ac-alert, .ei-alert) {
  background: var(--accent-soft);
  color: var(--accent-text);
}
html[data-appearance-shape] :is(.ac-error, .ei-error, .sa-error) {
  background: var(--error-soft);
  color: var(--error);
}
html[data-appearance-shape] :is(.ac-warn, .ei-badge.warn) {
  background: var(--warning-soft);
  color: var(--warning);
}
html[data-appearance-shape] .ei-main button {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius-control);
}
html[data-appearance-shape] .ei-main button.primary,
html[data-appearance-shape] .ei-main button[aria-selected='true'] {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
html[data-appearance-shape] :is(.ac-page, .ei-main) dialog {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
  border-radius: var(--radius-card);
}
html[data-appearance-shape] .ei-main a {
  color: var(--accent-text);
}
html[data-appearance-shape] .app-icon {
  --theme-icon-stroke: 1.8;
}
html[data-icon-style='glass'] .app-icon {
  color: var(--accent-text);
  background: linear-gradient(
    140deg,
    color-mix(in srgb, var(--accent) 12%, var(--panel)),
    color-mix(in srgb, var(--accent) 4%, var(--panel))
  );
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--panel));
  box-shadow: inset 0 1px 0 #ffffff60;
  border-radius: 10px;
}
html[data-icon-style='pill'] .app-icon {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 999px;
  width: 34px;
}
html[data-icon-style='sharp'] .app-icon {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 3px;
  border-inline-start: 3px solid currentColor;
}
/* Clear line weight and consistent semantic shapes. */
html[data-appearance-shape] .app-icon[data-icon-preview] {
  width: 40px;
  height: 40px;
  --theme-icon-size: 23px;
  box-shadow: none;
  border: 0;
  color: var(--accent-text);
  background: transparent;
  border-radius: 0;
}
html[data-appearance-shape] .app-icon[data-icon-preview='outline'] {
  border: 1px solid var(--line);
  border-radius: 8px;
  --theme-icon-stroke: 1.6;
}
html[data-appearance-shape] .app-icon[data-icon-preview='framed'] {
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='soft'] {
  background: var(--accent-soft);
  border-radius: 13px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='duotone'] {
  background: linear-gradient(145deg, var(--accent-soft), var(--panel-alt));
  border: 1px solid var(--line);
  border-radius: 11px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='tile'] {
  background: var(--accent-soft);
  border-radius: 7px 15px 7px 15px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='minimal'] {
  --theme-icon-stroke: 1.5;
}
html[data-appearance-shape] .app-icon[data-icon-preview='solid'] {
  background: var(--primary);
  color: #fff;
  border-radius: 7px;
  --theme-icon-stroke: 2.2;
}
html[data-appearance-shape] .app-icon[data-icon-preview='badge'] {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
}
html[data-appearance-shape] .app-icon[data-icon-preview='neon'] {
  background: var(--panel);
  border: 1px solid var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 8px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='glass'] {
  background: linear-gradient(145deg, var(--accent-soft), var(--panel));
  border: 1px solid var(--line);
  box-shadow: inset 0 2px 3px #ffffff40;
  border-radius: 11px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='pill'] {
  background: var(--accent-soft);
  border-radius: 999px;
  width: 48px;
}
html[data-appearance-shape] .app-icon[data-icon-preview='sharp'] {
  background: var(--accent-soft);
  border-inline-start: 3px solid var(--accent);
  border-radius: 2px;
}
.appearance-editor {
  font-family: inherit;
  line-height: 1.65;
  color: var(--ink);
  min-width: 0;
}
.appearance-editor * {
  box-sizing: border-box;
}
.appearance-heading {
  display: flex;
  gap: 14px;
  align-items: start;
  margin-bottom: 22px;
}
.appearance-heading > .app-icon {
  width: 48px;
  height: 48px;
  --theme-icon-size: 26px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 15px;
}
.appearance-heading > div {
  flex: 1;
  min-width: 0;
}
.appearance-heading h2 {
  font-size: 26px;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  font-weight: 800;
}
.appearance-heading p {
  margin: 0;
  color: var(--slate);
  font-size: 13px;
}
.appearance-eyebrow {
  display: block;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.appearance-editor button {
  cursor: pointer;
  font: inherit;
}
.appearance-close {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  background: var(--panel-alt);
  color: var(--ink);
  font-size: 12px;
  min-height: 38px;
}
.appearance-sample {
  display: flex;
  min-height: 150px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 26px;
}
.appearance-sample-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 16px;
  background: var(--sidebar-ink);
  color: #e0e7ff;
}
.appearance-sample-body {
  flex: 1;
  padding: 18px;
  min-width: 0;
}
.appearance-sample-body > small {
  color: var(--slate);
  font-size: 11px;
  display: block;
}
.appearance-sample-body > strong {
  display: block;
  margin: 2px 0 12px;
  font-size: 18px;
}
.appearance-sample-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.appearance-sample-cards > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font-size: 12px;
}
.appearance-section {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 20px 0 18px;
  margin: 0;
  min-width: 0;
}
.appearance-section legend {
  padding: 0 0 0 12px;
  font-size: 15px;
  font-weight: 750;
}
.appearance-hint {
  color: var(--slate);
  font-size: 12px;
  margin: -5px 0 13px;
}
.appearance-segments {
  display: flex;
  gap: 8px;
}
.appearance-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 18px;
  min-height: 44px;
  font-size: 13px;
}
.appearance-editor button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: 0 0 0 1px var(--accent);
}
.appearance-palettes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.appearance-palette {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font-size: 11px;
  min-height: 83px;
}
.appearance-palette-colors {
  display: flex;
  direction: ltr;
  align-items: center;
  justify-content: center;
}
.appearance-palette-colors i {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--panel);
  margin-left: -5px;
  box-shadow: 0 0 0 1px #0000000d;
}
.appearance-palette-colors i:first-child {
  margin-left: 0;
}
.appearance-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.appearance-icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 13px 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font-size: 11px;
}
.appearance-shapes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.appearance-shape-sample {
  width: 24px;
  height: 24px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: 7px;
}
.appearance-shape-sample[data-shape-preview='soft'] {
  border-radius: 10px;
}
.appearance-shape-sample[data-shape-preview='sharp'] {
  border-radius: 2px;
}
.appearance-shape-sample[data-shape-preview='airy'] {
  border-radius: 13px;
}
.appearance-custom {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.appearance-color-label {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 12px;
}
.appearance-color-label input[type='color'] {
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  cursor: pointer;
}
.appearance-link {
  border: 0;
  background: transparent;
  color: var(--accent-text);
  padding: 10px;
  font-size: 12px;
  min-height: 40px;
}
.appearance-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.appearance-status {
  color: var(--slate);
  font-size: 12px;
  margin: 0 0 12px;
}
.appearance-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.appearance-save,
.appearance-cancel {
  border: 1px solid var(--line);
  padding: 11px 22px;
  border-radius: var(--radius-control);
  font-weight: 700;
  min-height: 44px;
}
.appearance-cancel {
  background: var(--panel);
  color: var(--ink);
}
.appearance-cancel:disabled {
  opacity: 0.45;
  cursor: default;
}
.appearance-dialog {
  width: min(840px, calc(100vw - 28px));
  max-height: 90dvh;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-theme-strong);
  overflow: auto;
  overscroll-behavior: contain;
}
.appearance-dialog::backdrop {
  background: var(--modal-overlay);
  backdrop-filter: blur(4px);
}
.appearance-launcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 12px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  min-height: 44px;
  box-shadow: var(--shadow-theme);
}
.appearance-launcher .app-icon {
  width: 24px;
  height: 24px;
  --theme-icon-size: 18px;
  color: var(--accent-text);
}
@media (max-width: 600px) {
  .appearance-dialog {
    padding: 18px 14px;
    border-radius: 18px;
  }
  .appearance-palettes,
  .appearance-icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .appearance-shapes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .appearance-heading {
    gap: 10px;
  }
  .appearance-heading h2 {
    font-size: 23px;
  }
  .appearance-heading > .app-icon {
    display: none;
  }
  .appearance-close {
    padding: 6px 8px;
  }
  .appearance-sample-nav {
    padding: 12px 8px;
  }
  .appearance-sample-body {
    padding: 14px 10px;
  }
  .appearance-sample-cards {
    gap: 5px;
  }
  .appearance-sample-cards > div {
    padding: 8px 4px;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }
  .appearance-segments > * {
    flex: 1;
  }
  .appearance-choice {
    padding: 10px;
  }
  html[data-appearance-shape] .form-card {
    padding: 22px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-appearance-shape] :is(.category-card, .item-card, .app-icon) {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
@media print {
  .appearance-launcher,
  .appearance-dialog,
  .appearance-editor {
    display: none !important;
  }
  html[data-appearance-shape] body {
    background: #fff !important;
    color: #111 !important;
  }
  html[data-appearance-shape] :is(.main, .portal-main, .table-wrap, .sa-card, .ac-panel, .ei-card) {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
  }
}
html[data-appearance-shape] .appearance-editor button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: 0 0 0 1px var(--accent);
}
html[data-appearance-shape] dialog.appearance-dialog {
  width: min(840px, calc(100vw - 28px));
  max-height: 90dvh;
  padding: 28px;
  border-radius: 24px;
}
html[data-appearance-shape] :is(.category-item-row, .portal-program-card) {
  border-radius: var(--radius-card);
}
html[data-icon-style='neon'] .app-icon {
  color: var(--accent-text);
  border-color: var(--accent);
}
html[data-icon-style='framed'] .app-icon,
html[data-icon-style='soft'] .app-icon,
html[data-icon-style='badge'] .app-icon {
  color: var(--accent-text);
}
@media (max-width: 600px) {
  html[data-appearance-shape] dialog.appearance-dialog {
    padding: 18px 14px;
    border-radius: 18px;
  }
}
@media print {
  html[data-appearance-shape] {
    --ink: #111827 !important;
    --ink-light: #111827 !important;
    --slate: #475569 !important;
    --panel: #ffffff !important;
    --panel-alt: #f8fafc !important;
    --parchment: #ffffff !important;
    --input-bg: #ffffff !important;
    --table-header: #f1f5f9 !important;
    --line: #cbd5e1 !important;
    --success: #237750 !important;
    --error: #b42335 !important;
    --warning: #946000 !important;
  }
}
/* Center native dialogs despite the legacy universal margin reset. */
html[data-appearance-shape] dialog.appearance-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
}
html[data-appearance-shape] .appearance-editor .appearance-save {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
.appearance-dialog .appearance-footer {
  position: sticky;
  bottom: -28px;
  padding: 16px 0 4px;
  background: var(--panel);
  z-index: 3;
  box-shadow: 0 -10px 18px var(--panel);
}
html[data-appearance-shape] .category-card-icon {
  background: transparent;
  color: var(--accent-text);
  width: 52px;
  height: 52px;
}
html[data-appearance-shape] .category-card-icon > .app-icon {
  width: 52px;
  height: 52px;
  --theme-icon-size: 27px;
  border-radius: var(--radius-control);
}
html[data-appearance-shape] .category-card::before {
  background: none;
}
@media (max-width: 600px) {
  .appearance-dialog .appearance-footer {
    bottom: -18px;
  }
  .appearance-dialog .appearance-actions {
    gap: 7px;
  }
  .appearance-dialog .appearance-actions > .appearance-link {
    font-size: 11px;
    padding: 8px 4px;
  }
  .appearance-dialog .appearance-save,
  .appearance-dialog .appearance-cancel {
    padding: 10px 14px;
  }
}
/* Academic planning formerly redefined the legacy theme on body. Inherit the shared tokens. */
html[data-appearance-shape] body.academic-workspace {
  --ink: inherit;
  --ink-light: inherit;
  --gold: inherit;
  --gold-bright: inherit;
  --parchment: inherit;
  --panel: inherit;
  --panel-alt: inherit;
  --slate: inherit;
  --line: inherit;
  --input-bg: inherit;
  --table-header: inherit;
  --success: inherit;
  --error: inherit;
  --warning: inherit;
  --aw-bg: var(--parchment);
  --aw-surface: var(--panel);
  --aw-soft: var(--panel-alt);
  --aw-text: var(--ink);
  --aw-muted: var(--slate);
  --aw-primary: var(--primary);
  --aw-primary-hover: var(--primary);
  --aw-tint: var(--accent-soft);
  --aw-line: var(--line);
  --aw-success: var(--success);
  --aw-success-bg: var(--success-soft);
  --aw-warning: var(--warning);
  --aw-warning-bg: var(--warning-soft);
  --aw-danger: var(--error);
  --aw-danger-bg: var(--error-soft);
  --aw-shadow: var(--shadow-theme);
}
html[data-appearance-shape] body.academic-workspace .btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
html[data-appearance-shape]
  body.academic-workspace
  :is(.aw-panel, .aw-toolbar, .aw-metric, .modal-box, .dropdown-menu, .app-select-trigger) {
  border-radius: var(--radius-card);
}
html[data-appearance-shape] body.academic-workspace :is(input, select, textarea, .btn) {
  border-radius: var(--radius-control);
}
html[data-appearance-shape] .gm-page {
  --gm-done: var(--success);
  --gm-part: var(--warning);
  --gm-zero: var(--error);
  --gm-issue: var(--accent-text);
  --gm-na: var(--slate);
}
html[data-appearance-shape] .rc-page {
  --rc-done: var(--success);
  --rc-miss: var(--error);
  --rc-issue: var(--accent-text);
}
html[data-appearance-shape] .gt-page {
  --gt-new: var(--success);
  --gt-changed: var(--warning);
  --gt-kept: var(--slate);
  --gt-error: var(--error);
  --gt-locked: var(--slate);
}
/* Navigation and viewport correction, with natural content overflow preserved. */
html[data-appearance-shape] .sidebar {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.app-sidebar-links {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
}
.app-sidebar-links .nav-item {
  flex-shrink: 0;
}
.app-shell-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid #ffffff20;
}
.app-shell-footer .nav-item {
  margin: 0 !important;
  width: 100%;
  text-align: start;
  justify-content: flex-start;
}
html[data-appearance-shape] .sidebar .appearance-launcher {
  background: transparent;
  color: var(--sidebar-muted);
  border-color: transparent;
  box-shadow: none;
  font-size: inherit;
}
html[data-appearance-shape] .sidebar .appearance-launcher:hover {
  background: #ffffff12;
  color: #fff;
}
html[data-appearance-shape] .sidebar .appearance-launcher .app-icon {
  color: inherit;
}
body.app-card-hub .sidebar .app-shell-footer {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
body.app-card-hub .sidebar .app-shell-footer .nav-item {
  width: auto;
  white-space: nowrap;
}
html[data-appearance-shape] .app-display-tools {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  max-width: 100%;
  margin: 0;
}
html[data-appearance-shape] .app-display-tools button {
  box-shadow: none;
  min-height: 40px;
  font-size: 12px;
}
html[data-appearance-shape] .main > .app-display-tools {
  justify-content: flex-end;
  margin-block: 0 12px;
}
html[data-appearance-shape] .auth-page {
  min-height: 100dvh;
  line-height: 1.6;
}
html[data-appearance-shape] .auth-page .identity-panel {
  min-width: 0;
  padding: clamp(24px, 4vw, 52px);
  gap: 24px;
}
html[data-appearance-shape] .auth-page .identity-copy h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.35;
}
html[data-appearance-shape] .auth-page .identity-copy p {
  font-size: 14px;
  line-height: 1.8;
}
html[data-appearance-shape] .auth-page .form-panel {
  min-width: 0;
  padding: clamp(14px, 3vh, 28px) clamp(16px, 3vw, 40px);
}
html[data-appearance-shape] .auth-page .form-card {
  max-width: 440px;
  padding: 24px;
}
.auth-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.auth-card-heading > h1,
.auth-card-heading > h2 {
  margin: 0;
  min-width: 0;
}
.auth-card-heading .appearance-launcher {
  flex-shrink: 0;
  min-height: 36px;
  padding: 5px 9px;
  box-shadow: none;
  font-size: 11px;
}
html[data-appearance-shape] .auth-page .form-card h2 {
  font-size: 26px;
  line-height: 1.4;
}
html[data-appearance-shape] .auth-page .form-card .sub {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 18px;
}
html[data-appearance-shape] .auth-page .field {
  margin-bottom: 14px;
}
html[data-appearance-shape] .auth-page .field label:not([class]) {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 6px;
}
html[data-appearance-shape] .auth-page .field :is(input, select) {
  min-height: 44px;
  padding-block: 9px;
  font-size: 14px;
  line-height: 1.5;
}
html[data-appearance-shape] .auth-page .field-hint {
  font-size: 11.5px;
  line-height: 1.6;
  margin-top: 6px;
}
html[data-appearance-shape] .auth-page .row-between {
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
html[data-appearance-shape] .auth-page .remember input {
  min-height: 0;
  width: 17px;
  height: 17px;
}
html[data-appearance-shape] .auth-page .btn-login {
  min-height: 44px;
  padding-block: 10px;
  font-size: 14px;
  line-height: 1.5;
}
html[data-appearance-shape] .auth-page .footnote {
  font-size: 11.5px;
  line-height: 1.7;
  margin-top: 16px;
}
html[data-appearance-shape] .auth-page .error-msg {
  padding: 10px 12px;
  font-size: 12px;
  margin-bottom: 12px;
}
@media (max-height: 700px) {
  html[data-appearance-shape] .auth-page .form-panel {
    padding-block: 12px;
  }
  html[data-appearance-shape] .auth-page .form-card {
    padding: 18px 22px;
  }
  html[data-appearance-shape] .auth-page .form-card .sub {
    margin-bottom: 12px;
  }
  html[data-appearance-shape] .auth-page .field {
    margin-bottom: 10px;
  }
  html[data-appearance-shape] .auth-page .row-between {
    margin-bottom: 12px;
  }
  html[data-appearance-shape] .auth-page .footnote {
    margin-top: 12px;
  }
  html[data-appearance-shape] .auth-page .identity-panel {
    padding-block: 24px;
    gap: 16px;
  }
  html[data-appearance-shape] .auth-page .role-chip {
    padding-block: 5px;
  }
}
@media (max-width: 860px) {
  html[data-appearance-shape] .auth-page {
    display: block;
  }
  html[data-appearance-shape] .auth-page .form-panel {
    min-height: 100dvh;
    width: 100%;
  }
  html[data-appearance-shape] .auth-page .identity-panel {
    display: none;
  }
  body.app-card-hub .sidebar .app-shell-footer {
    flex-wrap: wrap;
    max-width: 100%;
  }
}
@media print {
  .app-shell-footer,
  .auth-card-heading .appearance-launcher {
    display: none !important;
  }
}

/* Short viewports: reduce decorative spacing without constraining real data height. */
@media screen and (max-height: 760px) {
  html[data-appearance-shape] .main {
    padding-block: 24px;
  }
  html[data-appearance-shape] .main .empty-state {
    padding-block: 12px;
  }
  html[data-appearance-shape] .main > .loading {
    padding-block: 24px;
  }
  html[data-appearance-shape] .am-view {
    min-height: 120px;
  }
  html[data-appearance-shape] .sr-main > .sr-notice {
    margin-bottom: 0;
  }
}
@media screen and (max-width: 820px) {
  html[data-appearance-shape] .main .empty-state {
    padding-block: 24px;
  }
  html[data-appearance-shape] body:not(.aw-teaching) .main {
    padding-bottom: 12px !important;
  }
}

@media screen {
  .forgot-box {
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* Remove the footer reserve for display controls that are now inline. */
  html[data-appearance-shape] body.academic-workspace:not(.aw-teaching) .main {
    padding-bottom: 24px !important;
  }
  html[data-appearance-shape] .tg-main {
    padding-bottom: 24px;
  }
  .tg-summary:empty {
    padding: 0;
  }
  .tg-actions:empty {
    margin-top: 0;
  }
  .tg-notice:empty {
    min-height: 0;
    padding: 0;
  }
  .pt-timings-view {
    margin-bottom: 0;
  }
}
@media screen and (max-width: 820px) {
  html[data-appearance-shape] body.academic-workspace:not(.aw-teaching) .main {
    padding-bottom: 12px !important;
  }
}

/* An editor toolbar may wrap; its canvas retains its own pan/zoom scrolling. */
@media screen and (min-width: 821px) {
  body.studio-page .st-app {
    width: 100%;
    min-width: 0;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
  }
  body.studio-page .st-top {
    min-width: 0;
    min-height: 54px;
    height: auto;
    flex-wrap: wrap;
    padding-block: 6px;
  }
  body.studio-page .st-top > * {
    flex-shrink: 0;
  }
  body.studio-page .st-main {
    min-width: 0;
    grid-template-columns: 300px minmax(0, 1fr) 320px;
  }
}
@media screen and (min-width: 821px) and (max-height: 760px) {
  html[data-appearance-shape] body:not(.aw-teaching) .main {
    padding-bottom: 16px;
  }
  html[data-appearance-shape] body.academic-workspace:not(.aw-teaching) .main {
    padding-bottom: 16px !important;
  }
}

/* Local artwork and actual icon drawings; all existing frames remain available. */
html .app-icon svg[data-icon-pack],
html .app-icon svg[data-icon-pack] path {
  fill: currentColor !important;
  stroke: none !important;
}
.appearance-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.appearance-pack-option,
.appearance-background-option {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: start;
  min-width: 0;
}
.appearance-pack-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.appearance-pack-samples .app-icon {
  width: 30px;
  height: 30px;
}
.appearance-pack-option[aria-pressed='true'],
.appearance-background-option[aria-pressed='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: var(--accent-soft);
}
.appearance-background-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.appearance-background-cover {
  display: block;
  aspect-ratio: 1.7;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(130deg, var(--sidebar-ink), var(--accent));
  margin-bottom: 8px;
}
.appearance-background-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Module-page consistency — module pages that still ship a decorative "hero" banner render it as the shared page header
   (title, short description, actions), so every module page opens the same way. Screen only; print keeps
   each module's own rules. */
@media screen {
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero) {
    display: block !important;
    background: none !important;
    background-image: none !important;
    color: var(--ink) !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: relative;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero):has(> div) {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
  }
  /* Text placed directly in the hero (eyebrow, title, description) stacks on its own lines; only
     blocks (a heading group, the actions) sit side by side. */
  :root
    :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero):has(> div)
    > :is(span, h1, h2, p, small, .category-hero-row) {
    flex: 1 0 100%;
    margin-block: 0 !important;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero)::before,
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero)::after {
    content: none !important;
    display: none !important;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero) h1 {
    font-family: var(--ui-font-heading, 'Zain', sans-serif);
    font-weight: 800;
    font-size: var(--font-size-6xl);
    line-height: 1.25;
    color: var(--ink) !important;
    background: none !important;
    -webkit-text-fill-color: currentColor;
    margin: 2px 0 4px !important;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero) :is(p, small) {
    color: var(--slate) !important;
    font-size: var(--font-size-md);
    line-height: 1.8;
    max-width: 760px;
    margin: 4px 0 0 !important;
    background: none !important;
    padding: 0 !important;
    border: 0 !important;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero) small {
    display: block;
    font-size: var(--font-size-sm);
  }
  :root
    :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero)
    :is(.at-eyebrow, .dq-eyebrow, .sr-eyebrow, .tp-kicker, .sa-eyebrow),
  :root :is(.audit-hero, .ei-hero, .ob-hero) :is(> span, > div > span:first-child) {
    display: inline-block;
    color: var(--primary, var(--gold)) !important;
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0;
    background: none !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 1;
  }
  :root
    :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero)
    > div:not(:first-child) {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
  }
  :root :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero) .btn-outline {
    color: var(--ink) !important;
    border-color: var(--line) !important;
    background: var(--panel) !important;
  }
  :root
    :is(.at-hero, .audit-hero, .ei-hero, .dq-hero, .sr-hero, .tp-hero, .tg-hero, .ob-hero, .sa-hero)
    :is(input, select) {
    color: var(--ink) !important;
    background: var(--panel) !important;
    border: 1.5px solid var(--line) !important;
  }
}

/* User actions in progress (frontend-http.js): the control that started the action, a thin progress
   bar for anything slower than half a second, and a status message with the elapsed time. */
[data-ajyal-busy][aria-busy='true'] {
  position: relative;
  cursor: progress;
  opacity: 0.85;
}
[data-ajyal-busy][aria-busy='true']::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 0.55em;
  width: 0.9em;
  height: 0.9em;
  margin-block-start: -0.45em;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: ajyal-busy-spin 0.7s linear infinite;
  pointer-events: none;
}
button[data-ajyal-busy][aria-busy='true'],
input[data-ajyal-busy][aria-busy='true'],
a[data-ajyal-busy][aria-busy='true'] {
  padding-inline-end: calc(1.6em + 0.4em);
}
a[data-ajyal-busy] {
  pointer-events: none;
}
.ajyal-activity-bar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 12000;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.ajyal-activity-bar.is-visible {
  opacity: 1;
}
.ajyal-activity-bar::before {
  content: '';
  position: absolute;
  inset-block: 0;
  width: 40%;
  background: var(--primary, #1f4e79);
  animation: ajyal-activity-slide 1.1s ease-in-out infinite;
}
.ajyal-activity-status {
  position: fixed;
  inset-block-end: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 12000;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--ink, #1c2430);
  color: var(--parchment, #fff);
  font-size: 0.92rem;
  box-shadow: 0 8px 24px #0003;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
  pointer-events: none;
}
.ajyal-activity-status.is-visible {
  opacity: 1;
  visibility: visible;
}
@keyframes ajyal-busy-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ajyal-activity-slide {
  from {
    inset-inline-start: -40%;
  }
  to {
    inset-inline-start: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-ajyal-busy][aria-busy='true']::after,
  .ajyal-activity-bar::before {
    animation-duration: 2.4s;
  }
}
@media print {
  .ajyal-activity-bar,
  .ajyal-activity-status {
    display: none;
  }
}

/* Text for assistive technology only (column names of action columns, field names). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Native drop-downs draw their arrow on the left in every stylesheet, in both directions, so the
   room for it is reserved on the left as well: the selected text never runs under the arrow (it
   did in right-to-left pages, where "inline-start" is the right-hand side). */
html[dir] select:not([multiple]):not([size]) {
  padding-left: 40px;
  padding-right: 14px;
}

/* update-686: quick light / dark / device toggle in the toolbar (js/appearance.js). */
.appearance-mode-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control, 11px);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.appearance-mode-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--accent-text);
}
.appearance-mode-toggle:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.appearance-mode-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.appearance-mode-toggle[data-mode='auto'] svg path:last-child {
  fill: currentColor;
}
.appearance-launcher[aria-busy='true'] {
  cursor: progress;
  opacity: 0.75;
}
@media print {
  .appearance-mode-toggle {
    display: none !important;
  }
}
