.skip-link{position:absolute;left:-9999px;top:0;z-index:10000;padding:.5rem 1rem;background:#fff;color:#0f172a}
.skip-link:focus{left:.5rem;top:.5rem}
.visually-hidden,.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
.provenance-panel { margin: 0.75rem 0 1rem; padding: 0.75rem 1rem; background: var(--info-bg); border: 1px solid var(--border); }
.provenance-title { margin: 0 0 0.35rem; font-size: var(--atlas-type-md); }
.provenance-list { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: var(--atlas-type-sm); }
.provenance-excerpt { color: var(--muted); font-size: var(--atlas-type-sm); }
.sources-block {
  margin: 0.65rem 0 1rem;
  padding: 0.7rem 0.85rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--brand-blue-soft-border);
  background: linear-gradient(180deg, var(--brand-blue-soft) 0%, #f8fafc 100%);
}
.sources-block--lesson {
  margin-top: 0.35rem;
}
.sources-block--card {
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.65rem 0.6rem;
}
.sources-block__title {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue-hover);
}
.sources-block__line {
  margin: 0;
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.sources-block__line a {
  font-weight: 700;
  color: var(--brand-blue-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sources-block__note {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-xs);
}
.ubd-field-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-inline-start: 0;
  padding: 0.04rem 0.38rem 0.04rem 0.3rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.ubd-field-source-badge__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 0.8rem;
  height: 0.8rem;
  line-height: 0;
}
.ubd-field-source-badge__icon svg {
  width: 11px;
  height: 11px;
}
.ubd-field-source-badge__label {
  min-width: 0;
}
.ubd-field-source-badge--extracted {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.35);
}
.ubd-field-source-badge--ai_suggested {
  color: var(--brand-violet);
  background: var(--brand-violet-soft);
  border-color: var(--brand-violet-soft-border);
}
.ubd-field-source-badge--teacher_provided {
  color: var(--brand-blue-hover);
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
}
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.prompt-entry { margin: 0.5rem 0; border: 1px solid var(--border); border-radius: var(--radius-surface); padding: 0.75rem 0.9rem; background: #fafbfc; }
.prompt-entry .field { margin: 0.5rem 0; }
.prompt-entry textarea { min-height: 4rem; font-family: ui-monospace, monospace; font-size: var(--atlas-type-xs); }
.prompt-save-btn { margin-top: 0.35rem; }
.usage-table-wide td { vertical-align: top; }
.usage-feedback-cell details { max-width: 42rem; }
.usage-feedback-cell .code-block { max-height: 14rem; overflow: auto; white-space: pre-wrap; }

#import-wait:not(.hidden),
#lesson-rebuild-wait:not(.hidden),
#job-list .job-progress-panel {
  margin-top: 1rem;
  border-width: 2px;
}
#job-list .job-progress-panel {
  margin-bottom: 0.75rem;
}
.job-progress-lead {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-sm);
}
.job-progress-title {
  display: block;
  font-size: var(--atlas-type-md);
}
#job-list .job-card-compact {
  margin-bottom: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-surface);
}
#job-list .job-card-compact .job-card-actions {
  margin-top: 0.5rem;
}
.import-progress-bar {
  height: 10px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 0.65rem 0;
  overflow: hidden;
}
.import-progress-bar span {
  display: block;
  height: 100%;
  background: var(--primary, var(--brand-blue));
  transition: width 0.4s ease;
}
.import-wait-detail { margin: 0.25rem 0 0; font-weight: 500; }
.import-wait-slide { margin: 0.35rem 0 0; font-size: var(--atlas-type-lg); font-weight: 600; }
.import-wait-tech { margin: 0.2rem 0 0; font-size: var(--atlas-type-2xs); color: var(--muted); font-family: ui-monospace, monospace; }
.code-block { white-space: pre-wrap; font-size: var(--atlas-type-xs); max-height: 12rem; overflow: auto; background: #fff; border: 1px solid var(--border); padding: 0.5rem; border-radius: var(--radius-surface); }
.usage-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.usage-table { width: 100%; border-collapse: collapse; font-size: var(--atlas-type-sm); }
.usage-table th, .usage-table td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }

:root {
  /* Brand hues: views/partials/brand-tokens.php */
  --bg: var(--brand-bg, #e7ecef);
  --card: #fff;
  --text: var(--brand-navy, #102D54);
  --muted: #5c667a;
  --accent: var(--brand-blue, #0D95F5);
  --accent-hover: var(--brand-blue-hover, #0B84DC);
  --brand-gold: var(--brand-orange, #FF9D24);
  --brand-green: var(--brand-green, #31BA70);
  --brand-red: var(--brand-red, #d64545);
  --border: #d8dee9;
  --success: var(--success, #207A4C);
  --success-bg: var(--success-bg, #E8F8EF);
  --warn: var(--warn, #BF7A1A);
  --warn-bg: var(--warn-bg, #FFF4E8);
  --info-bg: var(--brand-blue-soft, #E8F5FE);
  --radius-surface: 4px;
  --radius-btn: 8px;
  --radius-pill: 999px;
  --radius: var(--radius-surface);
}
* { box-sizing: border-box; }
html {
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: var(--atlas-leading-normal);
  font-size: var(--atlas-type-md);
  overflow-x: clip;
  max-width: 100%;
}
#app,
main {
  max-width: 100%;
  min-width: 0;
}
.app-toolbar,
.workflow-bar {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.topbar-site-shell {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}
.staff-preview-banner {
  box-sizing: border-box;
  width: 100%;
  background: #f3f0ff;
  border-bottom: 1px solid #d4c9f5;
  color: #3b2f7a;
  padding: 0.85rem 1.25rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 250;
}
.staff-preview-banner__title {
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: var(--atlas-type-md);
  color: #2a1f63;
}
.staff-preview-banner__line {
  margin: 0;
  max-width: 52rem;
}
.staff-preview-banner__line strong {
  font-weight: 600;
}
.staff-preview-banner__exit {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  cursor: pointer;
  background: #4c3d99;
  color: #fff;
}
.staff-preview-banner__exit:hover {
  background: #3b2f7a;
}
.staff-preview-banner__exit:disabled {
  opacity: 0.6;
  cursor: wait;
}
.topbar-app {
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  gap: 0.75rem 1.25rem;
}
:root {
  --mkt-spectrum-h: 3px;
  --app-chrome-sticky-top: env(safe-area-inset-top, 0px);
  --app-chrome-brand-bar-h: 4rem;
  --app-chrome-toolbar-h: 3.4rem;
  --app-chrome-workflow-h: 4.35rem;
}
/* Brand spectrum — fixed on every page (marketing + app + ops) */
.mkt-brand-spectrum {
  position: fixed;
  top: var(--app-chrome-sticky-top, env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  width: 100%;
  height: var(--mkt-spectrum-h);
  z-index: 10001;
  background: linear-gradient(
    90deg,
    var(--brand-navy) 0% 20%,
    var(--brand-blue) 20% 40%,
    var(--brand-orange) 40% 60%,
    var(--brand-green) 60% 80%,
    var(--brand-violet) 80% 100%
  );
  pointer-events: none;
}
body:has(.staff-preview-banner) {
  --app-chrome-sticky-top: calc(
    env(safe-area-inset-top, 0px) + var(--atlas-staff-preview-sticky-offset, 4.25rem)
  );
}
@media (max-width: 720px) {
  :root {
    --app-chrome-brand-bar-h: 3.72rem;
    --app-chrome-toolbar-h: 3.05rem;
    --app-chrome-workflow-h: 3.35rem;
  }
}
.app-site-chrome {
  position: relative;
  z-index: 320;
  background: transparent;
  box-shadow: none;
  padding-top: calc(var(--app-chrome-brand-bar-h) + var(--mkt-spectrum-h));
  box-sizing: border-box;
}
#app-site-chrome > header.topbar-app.topbar-site-shell {
  position: fixed;
  top: calc(var(--app-chrome-sticky-top) + var(--mkt-spectrum-h));
  left: 0;
  right: 0;
  z-index: 326;
  width: 100%;
  background: #fff;
  box-sizing: border-box;
}
.topbar-site-shell {
  display: block;
  padding: 0;
  background: #fff;
  box-shadow: none;
  position: relative;
  z-index: 1;
}
.topbar-site-shell .mkt-header {
  max-width: none;
  margin: 0;
  width: 100%;
  overflow: visible;
  position: relative;
  top: auto;
  z-index: 1;
  background: #fff;
  box-shadow: none;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.topbar-site-shell .mkt-header-bar {
  overflow: visible;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.65rem 1.25rem;
  box-sizing: border-box;
  background: #fff;
}
#app-site-chrome > .app-chrome-below-header {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
/* App: mobile nav drawer — only the header becomes the drawer; toolbar/workflow stay behind overlay */
@media (max-width: 900px) {
  body.mkt-nav-js.mkt-nav-drawer-open #app-site-chrome {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
    max-height: none;
    overflow: visible;
    display: block;
    flex-direction: unset;
  }
  body.mkt-nav-js.mkt-nav-drawer-open #app-site-chrome > header.topbar-app.topbar-site-shell {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: calc(var(--app-chrome-sticky-top) + var(--mkt-spectrum-h));
    bottom: 0;
    max-height: calc(100dvh - var(--app-chrome-sticky-top) - var(--mkt-spectrum-h));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 332;
  }
  body.mkt-nav-js.mkt-nav-drawer-open #app-site-chrome > header.topbar-app.topbar-site-shell .mkt-header {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: none;
    width: 100%;
  }
  body.mkt-nav-js.mkt-nav-drawer-open #app-site-chrome > .app-chrome-below-header,
  body.mkt-nav-js.mkt-nav-drawer-open #app-site-chrome > main#app {
    position: relative;
    z-index: 40;
  }
}
.topbar-site-shell .mkt-brand-lockup--split {
  max-width: none;
}
.topbar-site-shell .site-nav a.site-nav-active {
  color: var(--brand-blue);
  font-weight: 700;
}
.topbar-app .brand { flex: 1 1 12rem; min-width: 0; }
.topbar-app .tagline {
  margin: 0.15rem 0 0;
  font-size: var(--atlas-type-xs);
  max-width: 22rem;
}
@media (max-width: 720px) {
  .topbar-app .tagline { display: none; }
}
.brand h1 { font-size: var(--atlas-type-xl); margin: 0; font-weight: 700; }
.brand-link { color: inherit; text-decoration: none; }
.brand-link:hover h1 { color: var(--accent); }
.user-bar-links { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.user-bar-nav { font: inherit; cursor: pointer; }
.linkish {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.tagline { margin: 0.25rem 0 0; font-size: var(--atlas-type-sm); color: var(--muted); max-width: 28rem; }
.user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: var(--atlas-type-sm);
  color: var(--muted);
  margin-left: auto;
}
.topbar-app .user-bar {
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 0.65rem 0.85rem;
}
.topbar-site-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.35rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: #f8fafc;
}
.topbar-site-nav a {
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 2px;
}
.topbar-site-nav a:hover {
  color: var(--accent);
  background: #fff;
}
.topbar-site-nav.site-nav a.site-nav-active {
  color: var(--accent);
  font-weight: 600;
  background: var(--brand-blue-soft);
}
/* App shell: same marketing footer (styles in marketing.css) */
body:not(.mkt-body) .site-footer--marketing {
  margin-top: 2rem;
}
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-blue) 0%, var(--brand-blue-hover) 100%);
  color: #fff;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.35);
}
.user-avatar-lg {
  width: 2.65rem;
  height: 2.65rem;
  font-size: var(--atlas-type-md);
}
.user-menu {
  position: relative;
}
.user-menu-trigger {
  position: relative;
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}
.user-menu-trigger::-webkit-details-marker { display: none; }
.user-menu-trigger::after {
  content: "▾";
  font-size: var(--atlas-type-2xs);
  color: var(--muted);
  margin-right: 0.15rem;
}
.user-menu-trigger-label {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--muted);
}
@media (max-width: 520px) {
  .user-menu-trigger-label { display: none; }
}
.user-menu[open] .user-menu-trigger {
  border-color: var(--brand-blue-soft-border);
  box-shadow: 0 0 0 1px var(--brand-blue-soft-border);
}
.user-menu-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.4rem 0.5rem;
}
.user-menu-name {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.user-menu-context {
  margin: 0.15rem 0 0;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  line-height: 1.35;
}
.user-menu {
  position: relative;
  max-width: 100%;
}
.user-menu-panel {
  /* Closed: no layout footprint; portaled to body when open (see wireUserMenuSheet) */
  position: fixed;
  z-index: 1300;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
  width: min(21rem, calc(100vw - 1.5rem));
  min-width: 0;
  max-width: calc(100vw - 1.5rem);
  padding: 0.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(85vh, 36rem);
}
.user-menu-section {
  border-radius: calc(var(--radius-surface) - 2px);
}
.user-menu-section-identity {
  padding: 0.15rem 0.25rem 0.25rem;
}
.user-menu-section-plan {
  padding: 0.55rem 0.6rem 0.65rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.user-menu-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
}
.user-menu-section-head .user-menu-heading {
  flex: 1 1 8rem;
  min-width: 0;
  line-height: 1.25;
}
.user-menu-section-head .user-menu-heading {
  margin: 0;
}
.user-menu-staff-billing-note {
  margin: 0;
  padding: 0.5rem 0.55rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  text-align: left;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: pretty;
}
.user-menu-plan-pill {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-blue-hover);
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.user-menu-allowances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.user-menu-allowances li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0.35rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
  min-width: 0;
  overflow: hidden;
}
.user-menu-allowance-value {
  font-size: clamp(0.8rem, 2.8vw, 0.95rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 100%;
}
.user-menu-allowance-label {
  margin-top: 0.25rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  line-height: 1.25;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.user-menu-section-nav {
  padding: 0.15rem 0.1rem 0.1rem;
  border-top: 1px solid #f1f5f9;
}
.user-menu-section-nav .user-menu-heading {
  padding-left: 0.35rem;
}
.user-menu-section-footer {
  padding: 0.1rem;
  border-top: 1px solid #f1f5f9;
}
.user-menu-heading {
  margin: 0.25rem 0.5rem 0.35rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 2px;
  background: transparent;
  font: inherit;
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.user-menu-link {
  text-decoration: none;
  box-sizing: border-box;
}
.user-menu-item:hover {
  background: #f1f5f9;
}
.user-menu-signout { color: #a32020; }
.user-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1299;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.45);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
body.user-menu-open {
  overflow: hidden;
  width: 100%;
}
html {
  scrollbar-gutter: stable;
}
body.user-menu-open .user-menu-backdrop {
  display: block;
}
body.user-menu-open .user-menu-panel {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  top: var(--user-menu-panel-top, max(3.35rem, calc(env(safe-area-inset-top) + 2.5rem)));
  inset-inline-end: var(--user-menu-panel-inset-end, max(0.75rem, env(safe-area-inset-right)));
  inset-inline-start: var(--user-menu-panel-inset-start, auto);
  bottom: auto;
  width: min(21rem, calc(100vw - 1.5rem));
  max-height: var(
    --user-menu-panel-max-height,
    min(85vh, 36rem)
  );
  animation: user-menu-drop-in 0.18s ease-out;
}
@media (max-width: 720px) {
  body.user-menu-open .user-menu-panel {
    inset-inline-end: max(0.5rem, env(safe-area-inset-right));
    max-height: min(78vh, 36rem);
  }
}
@keyframes user-menu-drop-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.user-bar-name { font-weight: 600; color: var(--text); }
.user-bar-meta,
.user-bar-role {
  text-transform: capitalize;
  background: var(--info-bg);
  border: 1px solid var(--border);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-surface);
  font-size: var(--atlas-type-xs);
}
.workflow-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
  border-bottom: 2px solid #e2e8f0;
  padding: 0.55rem 1.25rem 0.85rem;
}
.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  max-width: 1100px;
  margin: 0;
}
.workflow-step {
  flex: 1 1 10rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  background: #fff;
  cursor: pointer;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.workflow-step[data-step="import"]:hover {
  border-color: var(--brand-orange);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-orange) 28%, transparent);
}
.workflow-step[data-step="lessons"]:hover {
  border-color: var(--accent, var(--brand-blue));
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.workflow-step[data-step="lessons"]:hover .step-num {
  border-color: var(--accent, var(--brand-blue));
  color: var(--brand-blue-hover);
}
.workflow-step[data-step="atlas"]:hover {
  border-color: var(--brand-green);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-green) 28%, transparent);
}
.workflow-step[data-step="atlas"]:hover .step-num {
  border-color: var(--brand-green);
  color: var(--brand-green);
}
.workflow-step:hover:not([data-step]) {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.workflow-step .step-text--short {
  display: none;
}
.workflow-step .step-num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  flex-shrink: 0;
  background: #fff;
}
.workflow-step.done {
  color: var(--success);
  border-color: var(--brand-green-soft-border);
  background: var(--success-bg);
}
.workflow-step.done .step-num {
  border-color: var(--brand-green-soft-border);
  color: var(--success);
  background: #fff;
}
/* Step ① — one orange treatment (Home done, Files/Studio context, suggested) */
.workflow-step[data-step="import"].done:not(.active),
.workflow-step[data-step="import"].suggested:not(.active),
.workflow-step[data-step="import"].workflow-step--context:not(.active) {
  color: var(--brand-orange);
  border-color: var(--brand-orange);
  background: var(--brand-orange-soft);
  box-shadow: 0 0 0 1px var(--brand-orange-soft-border);
}
.workflow-step[data-step="import"].done:not(.active) .step-num,
.workflow-step[data-step="import"].suggested:not(.active) .step-num,
.workflow-step[data-step="import"].workflow-step--context:not(.active) .step-num {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background: #fff;
}
/* Step ② — always blue when not on Review */
.workflow-step[data-step="lessons"]:not(.active) {
  color: var(--brand-blue-hover);
  border-color: var(--accent, var(--brand-blue));
  background: var(--brand-blue-soft);
  box-shadow: 0 0 0 1px var(--brand-blue-soft-border);
}
.workflow-step[data-step="lessons"]:not(.active) .step-num {
  border-color: var(--accent, var(--brand-blue));
  color: var(--brand-blue-hover);
  background: #fff;
}
/* Step ③ — always green when not on this step (planner / Atlas) */
.workflow-step[data-step="atlas"]:not(.active) {
  color: var(--brand-green);
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
  box-shadow: 0 0 0 1px var(--brand-green-soft-border);
}
.workflow-step[data-step="atlas"]:not(.active) .step-num {
  border-color: var(--brand-green);
  color: var(--brand-green);
  background: #fff;
}
.workflow-step.active[data-step="import"] {
  border-color: var(--brand-orange);
  background: var(--brand-orange);
  color: #fff;
}
.workflow-step.active[data-step="lessons"] {
  border-color: var(--accent, var(--brand-blue));
  background: var(--accent, var(--brand-blue));
  color: #fff;
}
.workflow-step.active[data-step="atlas"] {
  border-color: var(--brand-green);
  background: var(--brand-green);
  color: #fff;
}
.workflow-step.active {
  color: #fff;
}
.workflow-step.active .step-num {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.app-toolbar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0.45rem 1.25rem;
  min-height: 3rem;
  box-sizing: border-box;
}
.app-toolbar-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  align-items: center;
}
.nav-lbl-short {
  display: none;
}
.nav-lbl-text {
  display: none;
}
.user-bar-credits {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--brand-blue-hover);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-surface);
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue-soft-border);
}
.user-bar-credits:hover { background: var(--brand-blue-soft-border); }
.app-toolbar .nav-utility {
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin: 0;
  background: transparent;
  padding: 0.55rem 1.05rem;
  cursor: pointer;
  font-size: var(--atlas-type-sm);
  color: var(--muted);
  font-weight: 500;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: center;
  min-height: 2.5rem;
  box-sizing: border-box;
}
.app-toolbar .nav-lbl-short {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  order: -1;
}
@media (min-width: 721px) {
  .app-toolbar-nav {
    align-items: center;
  }
  .app-toolbar .nav-utility .nav-lbl-short {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    order: -1;
  }
  .app-toolbar .nav-lbl-short .nav-lbl-text {
    display: none;
  }
  .app-toolbar .nav-lbl-full {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
  }
  .app-toolbar .nav-utility .nav-lbl-short .nav-lbl-icon {
    color: var(--muted);
  }
  .app-toolbar .nav-utility:hover .nav-lbl-short .nav-lbl-icon {
    color: var(--text);
  }
}
.app-toolbar .nav-lbl-short .nav-lbl-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--atlas-type-lg);
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}
.app-toolbar .nav-lbl-full {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}
.app-toolbar .nav-utility.active .nav-lbl-short .nav-lbl-icon {
  font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
}
.app-toolbar .nav-utility[data-view="dashboard"].active .nav-lbl-icon {
  color: var(--accent, var(--brand-blue));
}
.app-toolbar .nav-utility.nav-featured.active .nav-lbl-icon,
.app-toolbar .nav-utility[data-view="generator"].active .nav-lbl-icon {
  color: var(--brand-violet);
}
.app-toolbar .nav-utility[data-view="files"].active .nav-lbl-icon {
  color: var(--brand-orange);
}
.app-toolbar .nav-utility[data-view="teaching"].active .nav-lbl-icon {
  color: var(--brand-blue-hover);
}
.app-toolbar .nav-utility[data-view="settings"].active .nav-lbl-icon {
  color: var(--brand-green);
}
.app-toolbar .nav-lbl-full {
  font-size: var(--atlas-type-md);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.app-toolbar .nav-utility:hover {
  color: var(--text);
  background: transparent;
}
.app-toolbar .nav-utility:hover .nav-lbl-full {
  font-weight: 700;
}
/* App nav — active tab colour per section (brand palette) */
.app-toolbar .nav-utility.active {
  background: transparent;
  font-weight: 600;
}
.app-toolbar .nav-utility.active .nav-lbl-full {
  font-weight: 700;
}
.app-toolbar .nav-utility[data-view="dashboard"].active,
.app-toolbar .nav-utility[data-view="dashboard"].active .nav-lbl-full {
  color: var(--accent, var(--brand-blue));
  border-bottom-color: var(--accent, var(--brand-blue));
}
.app-toolbar .nav-utility.nav-featured:hover,
.app-toolbar .nav-utility.nav-featured:hover .nav-lbl-full,
.app-toolbar .nav-utility[data-view="generator"]:hover,
.app-toolbar .nav-utility[data-view="generator"]:hover .nav-lbl-full {
  color: var(--brand-violet);
}
.app-toolbar .nav-utility.nav-featured.active,
.app-toolbar .nav-utility[data-view="generator"].active,
.app-toolbar .nav-utility.nav-featured.active .nav-lbl-full,
.app-toolbar .nav-utility[data-view="generator"].active .nav-lbl-full {
  color: var(--brand-violet);
  border-bottom-color: var(--brand-violet);
}
.app-toolbar .nav-utility[data-view="files"]:hover,
.app-toolbar .nav-utility[data-view="files"]:hover .nav-lbl-full {
  color: var(--brand-orange);
}
.app-toolbar .nav-utility[data-view="files"].active,
.app-toolbar .nav-utility[data-view="files"].active .nav-lbl-full {
  color: var(--brand-orange);
  border-bottom-color: var(--brand-orange);
}
.app-toolbar .nav-utility[data-view="queue"]:hover,
.app-toolbar .nav-utility[data-view="queue"]:hover .nav-lbl-full {
  color: var(--brand-blue-hover);
}
.app-toolbar .nav-utility[data-view="queue"].active,
.app-toolbar .nav-utility[data-view="queue"].active .nav-lbl-full {
  color: var(--brand-blue-hover);
  border-bottom-color: var(--brand-blue-hover);
}
.app-toolbar .nav-utility[data-view="settings"]:hover,
.app-toolbar .nav-utility[data-view="settings"]:hover .nav-lbl-full {
  color: var(--brand-green);
}
.app-toolbar .nav-utility[data-view="settings"].active,
.app-toolbar .nav-utility[data-view="settings"].active .nav-lbl-full {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
}
.app-toolbar .nav-utility[data-view="teaching"]:hover,
.app-toolbar .nav-utility[data-view="teaching"]:hover .nav-lbl-full {
  color: var(--brand-blue-hover);
}
.app-toolbar .nav-utility[data-view="teaching"].active,
.app-toolbar .nav-utility[data-view="teaching"].active .nav-lbl-full {
  color: var(--brand-blue-hover);
  border-bottom-color: var(--brand-blue-hover);
}
.app-toolbar .nav-utility[data-view="study-history"]:hover,
.app-toolbar .nav-utility[data-view="study-history"]:hover .nav-lbl-full {
  color: var(--brand-green);
}
.app-toolbar .nav-utility[data-view="study-history"].active,
.app-toolbar .nav-utility[data-view="study-history"].active .nav-lbl-full {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
}
.app-toolbar .nav-utility[data-view="study-history"].active .nav-lbl-icon {
  color: var(--brand-green);
}
.view-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.25rem;
}
.plan-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  background: var(--brand-blue-soft);
  color: var(--brand-blue-hover);
  border: 1px solid var(--brand-blue-soft-border);
  white-space: nowrap;
}
.plan-badge-trial { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.plan-badge-individual { background: var(--brand-blue-soft); color: var(--brand-blue-hover); border-color: var(--brand-blue-soft-border); }
.plan-badge-department { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
.account-cards {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 0.75rem;
}
.account-stat strong { font-size: var(--atlas-type-2xl); font-variant-numeric: tabular-nums; }
.account-stat .account-stat-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: var(--muted);
}
.account-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
}
.account-ledger-panel .panel-heading { margin: 0 0 0.25rem; font-size: var(--atlas-type-lg); }
.account-ledger-panel .panel-hint { margin-top: 0; }
.account-orders-panel { margin-bottom: 1rem; }
.account-plan-change-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0;
  max-width: min(26rem, calc(100vw - 2rem));
  width: 100%;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}
.account-plan-change-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.account-plan-change-dialog__form {
  padding: 1.15rem 1.25rem 1rem;
  margin: 0;
}
.account-plan-change-dialog__title {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-lg);
}
.account-plan-change-dialog__current {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-weight: 600;
}
.account-plan-change-dialog__lead {
  margin: 0 0 1rem;
}
.account-plan-change-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.account-plan-change-action {
  width: 100%;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
a.account-plan-change-action {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.account-plan-change-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.account-orders-panel .panel-heading { margin: 0 0 0.25rem; font-size: var(--atlas-type-lg); }
.account-orders-panel .panel-hint { margin-top: 0; }
main { padding: 1.25rem 1.25rem 2rem; max-width: 1100px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
/* Content studio: hidden format tabs must not widen the page (A4 preview uses 210mm). */
#view-generator {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}
#view-generator > .content-studio-tab-panel.hidden {
  display: none !important;
}
.view-title { margin: 0 0 0.35rem; font-size: var(--atlas-type-2xl); }
.view-lead { margin: 0 0 1.25rem; color: var(--muted); max-width: 40rem; }
.import-options-hint {
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.import-options-hint__item {
  margin: 0;
  line-height: var(--app-leading, 1.45);
}
.import-options-hint__q {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.12rem;
}
.import-options-hint__a {
  display: block;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.panel-heading { margin: 0 0 0.75rem; font-size: var(--atlas-type-md); }
.instruct { background: var(--info-bg); border-color: #c5d8f0; }
.plain-steps { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.plain-steps li { margin-bottom: 0.5rem; }
.numbered-instruct { margin: 0; padding-left: 1.35rem; }
.numbered-instruct li { margin-bottom: 0.65rem; }

/* Step 3 — Atlas workflow */
.atlas-wf-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
}
.atlas-wf-pill {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}
.atlas-wf-pill:hover { border-color: #94a3b8; color: var(--text); }
.atlas-wf-pill.done { border-color: #6ee7b7; background: #ecfdf5; color: #047857; }
.atlas-wf-pill.active { border-color: var(--accent); background: var(--brand-blue-soft); color: var(--accent); }
.atlas-wf-pill.optional { font-weight: 500; }
.atlas-wf-next { margin: 0 0 1rem; font-weight: 500; color: var(--text); }
.atlas-step { scroll-margin-top: 1rem; }
.atlas-step-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.atlas-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-surface);
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: var(--atlas-type-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.atlas-step.done .atlas-step-num { background: #a7f3d0; color: #065f46; }
.atlas-step.active { border-color: var(--brand-blue-soft-border); box-shadow: 0 0 0 1px var(--brand-blue-soft-border); }
.atlas-step.active .atlas-step-num { background: var(--accent); color: #fff; }
.atlas-step-titles { flex: 1; min-width: 0; }
.atlas-step-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}
.atlas-step-title-row .atlas-step-title {
  flex: 1 1 auto;
  min-width: min(10rem, 100%);
  margin: 0;
}
.atlas-step-title-row .atlas-step-badge {
  flex-shrink: 0;
  margin: 0.05rem 0 0;
}
.atlas-step-title { margin: 0; font-size: var(--atlas-type-lg); }
.atlas-step-lead { margin: 0.25rem 0 0; }
.atlas-step-lead__line {
  display: block;
}
.atlas-step-lead__line + .atlas-step-lead__line {
  margin-top: 0.15rem;
}
.atlas-step-lead-drag {
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
}
.atlas-step-badge {
  flex-shrink: 0;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-surface);
  background: #f1f5f9;
  color: #64748b;
}
.atlas-step-badge.done { background: #d1fae5; color: #047857; }
.atlas-step-badge.warn { background: #fef3c7; color: #b45309; }
.atlas-step-badge.optional { background: #f8fafc; color: #94a3b8; font-weight: 500; text-transform: none; letter-spacing: 0; }
.atlas-step-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--atlas-type-md);
}
.atlas-step-summary::-webkit-details-marker { display: none; }
.atlas-step-summary-text { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.atlas-step-summary-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.atlas-step-summary-title-row .atlas-step-badge {
  margin: 0;
}
.atlas-step-body { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.atlas-step-connect .atlas-step-head,
.atlas-step-bridge .atlas-step-head,
.atlas-step-fill .atlas-step-head { margin-bottom: 0; }
.atlas-step-connect .atlas-step-connect-field {
  margin: 0.65rem 0 0;
  max-width: 100%;
}
.atlas-step-connect .atlas-step-connect-field input {
  width: 100%;
  max-width: 28rem;
  box-sizing: border-box;
}
.atlas-step-connect .atlas-step-connect-actions {
  margin: 0.65rem 0 0;
}
.atlas-step-fill .atlas-fill-steps {
  margin: 0.65rem 0 0;
  padding-left: 1.15rem;
  font-size: inherit;
  line-height: var(--app-leading, 1.45);
}
.atlas-step-fill .atlas-fill-steps > li + li { margin-top: 0.55rem; }
.atlas-step-fill .atlas-fill-steps .atlas-send-compare {
  margin: 0.4rem 0 0;
  padding-left: 0;
  list-style: none;
}
.atlas-step-fill .atlas-fill-steps .atlas-send-compare li {
  margin-top: 0.2rem;
  padding-left: 0.65rem;
  border-left: 2px solid #e2e8f0;
}
.atlas-step-fill .atlas-fill-verify {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.atlas-step-fill .atlas-fill-verify .atlas-fill-check-hint {
  margin: 0 0 0.5rem;
  max-width: 36rem;
}
.atlas-step-fill .atlas-fill-check-actions {
  margin: 0;
}
.atlas-step-fill .atlas-fill-check-actions .primary {
  width: auto;
  min-width: 9.5rem;
}
.atlas-step-connect .atlas-step-connect-actions .primary {
  width: auto;
  min-width: 9.5rem;
}
.atlas-bookmarklet-wrap {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.atlas-bookmarklet-intro {
  margin-top: 0.65rem;
}
.atlas-bookmarklet-intro .atlas-bookmarklet-hint {
  margin: 0.35rem 0 0;
}
.atlas-bookmarklet-hint {
  margin: 0.45rem 0 1rem;
}
.plain-steps > li > .atlas-send-compare {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  list-style: disc;
}
.plain-steps > li > .atlas-send-compare > li {
  margin: 0.2rem 0;
}
.atlas-bridge-src-code { display: block; margin-top: 0.35rem; word-break: break-all; font-size: 0.85em; }
.atlas-bridge-src-warn { color: #b91c1c; }
.atlas-bookmarklet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-btn);
  background: #0f172a;
  color: #f8fafc !important;
  font-weight: 600;
  text-decoration: none;
  border: none;
  outline: 2px dashed #334155;
  outline-offset: 3px;
  box-sizing: border-box;
  max-width: 100%;
}
.atlas-bookmarklet__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.atlas-bookmarklet__label {
  line-height: 1.25;
}
.atlas-bookmarklet--drag-only {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.atlas-bookmarklet--drag-only:active {
  cursor: grabbing;
}
.atlas-bookmarklet--drag-only:hover {
  background: #1e293b;
}
.atlas-bookmarklet:hover { background: #1e293b; }
.atlas-step-send .atlas-send-actions { gap: 0.65rem; }
.hint.inline-hint { display: inline; margin: 0 0 0 0.5rem; }
.callout {
  border-radius: var(--radius-surface);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.callout-primary {
  background: linear-gradient(180deg, #fffbf7 0%, #fff 55%);
  border-color: #fed7aa;
  box-shadow: 0 2px 14px rgba(180, 83, 9, 0.07);
}
.view-dashboard .view-title {
  font-size: var(--atlas-type-2xl);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.view-dashboard .view-lead {
  font-size: var(--atlas-type-md);
  line-height: 1.55;
  color: #475569;
  margin-bottom: 1.25rem;
}
.dashboard-head { margin-bottom: 0.25rem; }
.view-dashboard--learner .dashboard-greeting {
  margin-top: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-surface, 0.65rem);
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 55%, #eff6ff 100%);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  font-weight: 500;
  color: #334155;
  gap: 0.2rem;
}
.view-dashboard--learner .dashboard-greeting .profile-greeting-line:first-child {
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: #0f172a;
}
.view-dashboard--learner #dashboard-cards.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 720px) {
  .view-dashboard--learner #dashboard-cards.cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.dashboard-hero--learner {
  background: linear-gradient(165deg, #eff6ff 0%, #fff 42%, #f8fafc 100%);
  border-color: #bfdbfe;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.08);
}
.dashboard-hero--learner .dashboard-hero-eyebrow {
  color: #2563eb;
}
.dashboard-hero--student .dashboard-hero-title {
  color: #0f172a;
}
.dashboard-study-timer-btn {
  font-weight: 600;
}
.dashboard-hero {
  padding: 1.35rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.dashboard-hero-urgent {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.15);
}
.dashboard-hero-eyebrow {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-orange);
}
.dashboard-hero-urgent .dashboard-hero-eyebrow { color: var(--warn); }
.dashboard-hero-title {
  margin: 0 0 0.5rem;
  font-size: var(--atlas-type-xl);
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}
.dashboard-hero-text {
  margin: 0 0 1.1rem;
  font-size: var(--atlas-type-lg);
  line-height: 1.55;
  color: #334155;
  max-width: 42rem;
}
.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}
.dashboard-hero .primary-lg {
  font-size: var(--atlas-type-md);
  padding: 0.7rem 1.35rem;
}
.hero-secondary-btn {
  font-size: var(--atlas-type-md);
  font-weight: 600;
  color: #9a3412;
  border: 1px solid #fdba74;
  background: #fffbeb;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.hero-secondary-btn:hover {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
}
/* Generator uses the same inactive look as other tabs; .active styles apply when selected. */
.generator-form-grid-compact { margin-bottom: 0.5rem; }
.callout strong { display: block; font-size: var(--atlas-type-lg); margin-bottom: 0.35rem; color: #0f172a; }
.callout p { margin: 0 0 0.75rem; color: #334155; line-height: 1.5; }
.view-dashboard .card .label {
  font-size: var(--atlas-type-sm);
  color: #64748b;
  line-height: 1.35;
}
.view-dashboard .card strong {
  font-size: var(--atlas-type-2xl);
  color: #0f172a;
}
.dashboard-stat-card__metric {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}
.view-dashboard .dashboard-stat-card__value {
  display: block;
  width: auto;
  margin: 0;
  font-size: var(--atlas-type-2xl);
  font-weight: 700;
  line-height: 1.1;
  color: #0f172a;
}
.view-dashboard .dashboard-stat-card > .label {
  display: block;
  width: 100%;
  margin: 0.12rem 0 0;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}
.dashboard-stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  margin: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dashboard-stat-card:not(.dashboard-stat-card--import):not(.dashboard-stat-card--lessons):not(.dashboard-stat-card--atlas):not(.card-warn):hover {
  border-color: var(--brand-blue-soft-border);
  background: var(--brand-blue-soft);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.08);
}
.dashboard-stat-card--import .dashboard-stat-card__icon {
  color: var(--brand-orange);
}
.dashboard-stat-card--import:hover {
  border-color: var(--brand-orange);
  background: var(--brand-orange-soft);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--brand-orange) 22%, transparent);
}
.dashboard-stat-card--lessons .dashboard-stat-card__icon {
  color: var(--brand-blue-hover);
}
.dashboard-stat-card--lessons:hover {
  border-color: var(--accent, var(--brand-blue));
  background: var(--brand-blue-soft);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}
.dashboard-stat-card--atlas .dashboard-stat-card__icon {
  color: var(--brand-green);
}
.dashboard-stat-card--atlas:hover {
  border-color: var(--brand-green);
  background: var(--brand-green-soft);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--brand-green) 22%, transparent);
}
.dashboard-stat-card:focus-visible {
  outline: 2px solid var(--accent, var(--brand-blue));
  outline-offset: 2px;
}
.dashboard-stat-card__icon {
  flex: 0 0 auto;
  font-size: var(--atlas-type-xl);
  color: var(--brand-blue-hover);
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}
.dashboard-stat-card.card-warn .dashboard-stat-card__icon {
  color: var(--warn);
}
.dashboard-stat-card.card-warn:hover {
  border-color: #e8a86a;
  background: #fff7ed;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.12);
}
.dashboard-stat-card__hint {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  line-height: 1.3;
  color: var(--warn);
  text-align: start;
}
.dashboard-stat-card.card-warn .dashboard-stat-card__hint {
  color: #b45309;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 1rem;
}
.card .label { display: block; font-size: var(--atlas-type-xs); color: var(--muted); margin-bottom: 0.25rem; }
.card strong { display: block; font-size: var(--atlas-type-2xl); font-weight: 700; }
.card-warn { border: 1px solid #e8c4a0; background: var(--warn-bg); }
.card-warn .label { color: var(--warn); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1rem; }
.muted { color: var(--muted); }
.hint { font-size: var(--atlas-type-sm); color: var(--muted); margin: 0.35rem 0 0; display: block; }
.field {
  display: block;
  margin-bottom: 1rem;
}
.field > .field-label,
.field > span.field-label {
  display: block;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  margin-bottom: 0.35rem;
}
.field > .field-label .hint,
.field > span.field-label .hint {
  display: inline;
  font-weight: 400;
  font-size: var(--atlas-type-sm);
}
.field small { font-weight: 400; color: var(--muted); }
.field input[type="text"],
.field input[type="search"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="number"],
.field select,
.field textarea,
textarea#lesson-json {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  font-family: inherit;
  font-size: var(--atlas-type-md);
}
textarea#lesson-json { font-family: ui-monospace, monospace; font-size: var(--atlas-type-xs); }
.form-stack .actions { margin-top: 0.25rem; }
.import-upload-panel { border-color: #b8cce8; background: linear-gradient(180deg, #fff 0%, var(--info-bg) 100%); }
.import-steps-hint { margin: 0 0 1rem; font-size: var(--atlas-type-sm); color: var(--text); }
.import-feedback { margin: 0.85rem 0 0; min-height: 0; }
.import-feedback .message-box { margin-top: 0; }
.import-feedback .message-box + .message-box { margin-top: 0.5rem; }
.import-done-actions {
  margin: 0.65rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.import-done-actions .hint { font-size: var(--atlas-type-sm); }

.assets-upload-row { margin-top: 0.5rem; }
.asset-list { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.5rem; }
.asset-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.asset-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  width: 100%;
}
.asset-card-title,
.asset-card-main strong {
  display: block;
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: break-word;
  word-break: normal;
  color: var(--text);
}
.asset-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.5rem;
  margin: 0;
}
@media (min-width: 720px) {
  .asset-card-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.asset-card-meta__item {
  min-width: 0;
}
.asset-card-meta dt {
  margin: 0;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}
.asset-card-meta dd {
  margin: 0.1rem 0 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}
.asset-card-main .hint {
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
}
.asset-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, max-content));
  gap: 0.45rem;
  width: 100%;
  max-width: none;
  flex-shrink: 0;
  margin-top: 0.1rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  justify-content: flex-start;
}
.asset-card-actions .asset-card-btn,
.asset-card-actions .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  padding: 0.5rem 0.55rem;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
  min-height: 2.35rem;
}
.asset-card-actions .primary.asset-card-btn {
  grid-column: span 1;
}
.asset-card-actions--upload,
.asset-card-actions--row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  width: 100%;
  max-width: none;
  flex-shrink: 0;
  margin-left: 0;
  grid-template-columns: unset;
}
.asset-card-actions a.asset-card-btn {
  text-decoration: none;
  color: inherit;
}
.asset-card-actions--upload .asset-card-btn,
.asset-card-actions--upload .button-link,
.asset-card-actions--row .asset-card-btn,
.asset-card-actions--row .button-link {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
.asset-card-actions--upload .asset-card-btn--step2 {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 11rem;
  min-height: 2.45rem;
  height: 2.45rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  align-self: center;
}
.asset-card-actions--row .asset-card-btn:not(.asset-card-btn--icon),
.asset-card-actions--row .button-link {
  min-height: 2.45rem;
  height: 2.45rem;
  align-self: center;
}
.asset-card-actions--row .asset-card-btn--retheme {
  height: auto;
  min-height: 2.45rem;
}
.asset-card-actions--upload .asset-card-btn--icon,
.asset-card-actions--row .asset-card-btn--icon {
  align-self: center;
}
.asset-card-actions__icons {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
}
.asset-card-actions .asset-card-btn--icon {
  width: 2.45rem;
  max-width: 2.45rem;
  height: 2.45rem;
  min-height: 0;
  padding: 0;
  flex: 0 0 auto;
}
.asset-btn-lbl-short {
  display: none;
}
.asset-card-btn--icon {
  width: 2.45rem;
  height: 2.45rem;
  min-height: 0;
  padding: 0;
  flex-shrink: 0;
}
.asset-card-btn--icon svg {
  display: block;
  width: 1.2rem;
  height: 1.2rem;
}
.asset-card-btn--danger {
  color: #fff;
  border-color: #b91c1c;
  background: #b91c1c;
}
.asset-card-btn--danger:hover {
  color: #fff;
  background: #991b1b;
  border-color: #991b1b;
}
.asset-card-btn--download {
  color: var(--brand-blue-hover);
  border-color: var(--brand-blue-soft-border);
  background: var(--brand-blue-soft);
}
.asset-card-btn--download:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
}
.asset-card-btn--retheme {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: normal;
  text-align: left;
  max-width: 12.5rem;
  line-height: 1.15;
  padding-left: 0.5rem;
  padding-right: 0.65rem;
}
.asset-retheme-btn__swatch {
  display: grid;
  grid-template-columns: repeat(2, 0.72rem);
  gap: 2px;
  flex: 0 0 auto;
  align-content: center;
}
.asset-retheme-btn__chip {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 3px;
  background: var(--chip, #e4e4e7);
  border: 1px solid rgb(0 0 0 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.35);
}
.asset-retheme-btn__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
}
.deck-preview-foot .asset-card-btn--retheme {
  max-width: none;
}
/* My files — collapsible colour-coded panels (default closed) */
#view-files .files-view-panel {
  margin-bottom: 0.85rem;
  border-radius: var(--radius-surface);
  overflow: hidden;
  box-shadow: 0 1px 0 rgb(15 23 42 / 0.04);
  transition: box-shadow 0.18s ease;
}
#view-files .files-view-panel[open] {
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.07);
}
#view-files .files-view-panel__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0.75rem;
  margin: 0;
  user-select: none;
}
#view-files .files-view-panel__summary::-webkit-details-marker {
  display: none;
}
#view-files .files-view-panel__summary::before {
  content: "▸";
  flex-shrink: 0;
  width: 1.1rem;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  transition: transform 0.15s ease;
}
#view-files .files-view-panel[open] > .files-view-panel__summary::before {
  transform: rotate(90deg);
}
#view-files .files-view-panel__head {
  flex: 1 1 12rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
#view-files .files-view-panel__head .panel-heading {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text, #0f172a);
}
#view-files .files-view-panel__teaser {
  margin: 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
  opacity: 0.92;
}
#view-files .files-view-panel__pill {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgb(255 255 255 / 0.55);
  border: 1px solid rgb(0 0 0 / 0.08);
}
#view-files .files-view-panel__body {
  padding: 0 0.75rem 0.85rem;
  border-top: 1px solid rgb(0 0 0 / 0.06);
}
/* Uploads — Step ① Add lesson file (orange) */
#view-files .files-view-panel--uploads {
  border: 1px solid var(--brand-orange-soft-border);
  border-left: 4px solid var(--brand-orange);
  background: linear-gradient(135deg, var(--brand-orange-soft) 0%, #fff 58%);
}
#view-files .files-view-panel--uploads .files-view-panel__summary {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-orange) 18%, transparent) 0%, transparent 70%);
}
#view-files .files-view-panel--uploads .files-view-panel__pill {
  color: #9a3412;
  border-color: var(--brand-orange-soft-border);
}
/* Content Studio saves (violet) */
#view-files .files-view-panel--library {
  border: 1px solid var(--brand-violet-soft-border);
  border-left: 4px solid var(--brand-violet);
  background: linear-gradient(135deg, var(--brand-violet-soft) 0%, #fff 58%);
}
#view-files .files-view-panel--library .files-view-panel__summary {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-violet) 14%, transparent) 0%, transparent 70%);
}
#view-files .files-view-panel--library .files-view-panel__pill {
  color: var(--brand-violet);
  border-color: var(--brand-violet-soft-border);
}
/* Save deck only — Step ② / PPTX stash (blue) */
#view-files .files-view-panel--stash,
#view-files .asset-save-deck-only.files-view-panel {
  border: 1px solid var(--brand-blue-soft-border);
  border-left: 4px solid var(--brand-blue);
  background: linear-gradient(135deg, var(--brand-blue-soft) 0%, #fff 58%);
}
#view-files .files-view-panel--stash .files-view-panel__summary {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-blue) 14%, transparent) 0%, transparent 70%);
}
.asset-save-deck-only__body {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.assets-generator-panel { margin-bottom: 1rem; }
.generator-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.generator-form-grid > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.generator-form-grid > .field,
.generator-form-grid > .field-wide,
.generator-form-grid > label.field {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .generator-form-grid { grid-template-columns: 1fr; }
}
.generator-studio__brief .content-brief-chip-row {
  margin-bottom: 0.65rem;
}
.generator-studio__brief .content-brief-expand {
  margin-bottom: 0.85rem;
}
.generator-studio__brief .content-studio-lesson-anchor {
  margin: 0;
  padding: 0;
  border-radius: 0;
}
.generator-form-grid .field-wide { grid-column: 1 / -1; }
.generator-form-grid .generator-form-grid__full { grid-column: 1 / -1; }
.lesson-split-panel {
  margin-top: 1rem;
  max-width: 100%;
  box-sizing: border-box;
}
.lesson-split-panel--callout {
  border: 1px solid var(--brand-blue-soft-border);
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--brand-blue-soft) 0%, #f8fafc 55%, #fff 100%);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  padding: 1rem 1.15rem 1.2rem;
}
.lesson-split-callout-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-lg);
  color: #0f172a;
}
.lesson-split-callout-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #dbeafe;
  color: var(--brand-blue-hover);
}
.lesson-split-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem 0.75rem;
  margin: 0.5rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-surface);
  background: rgba(255, 255, 255, 0.75);
  max-width: 22rem;
}
.lesson-split-fields .field {
  min-width: 0;
  margin: 0;
}
.lesson-split-fields .text-input {
  width: 100%;
  box-sizing: border-box;
}
.lesson-split-panel #split-lesson-btn {
  width: 100%;
  max-width: 22rem;
}
.import-multi-lesson-hint { margin-top: 0.75rem; }
.textbook-permission-hint { margin: 0.35rem 0 0; font-size: var(--atlas-type-sm); }
.textbook-page-arrange { margin-top: 1rem; padding: 1rem; border: 1px solid #b8cce8; border-radius: 8px; background: #fff; }
.textbook-page-arrange h3 { margin: 0 0 0.35rem; font-size: var(--atlas-type-lg); }
.textbook-page-list { list-style: none; margin: 0.75rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.textbook-page-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  cursor: grab;
}
.textbook-page-item.drag-over { border-color: var(--accent); background: var(--brand-blue-soft); }
.textbook-page-item.dragging { opacity: 0.55; }
.textbook-page-num { font-weight: 600; min-width: 1.5rem; text-align: center; }
.textbook-page-thumb { object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.textbook-page-name { flex: 1; font-size: var(--atlas-type-sm); word-break: break-word; }
.textbook-page-arrange-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.75rem; }
.planning-export-panel {
  margin: 0 0 1.25rem;
  border: 1px solid var(--brand-blue-soft-border);
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, var(--brand-blue-soft) 0%, #fff 70%);
}
.planning-export-steps { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }
.planning-export-panel .button-link.disabled {
  pointer-events: none;
  opacity: 0.5;
}
.asset-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
}
.asset-library-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.asset-library-facet {
  font-size: var(--atlas-type-xs);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: #f8fafc;
  cursor: pointer;
}
.asset-library-facet--active {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
  font-weight: 600;
}
.asset-library-facet__count {
  opacity: 0.75;
  font-weight: 500;
}
.asset-library-section {
  margin-top: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.asset-library-section--decks { border-left: 3px solid #6366f1; }
.asset-library-section--worksheets { border-left: 3px solid #0ea5e9; }
.asset-library-section--quizzes { border-left: 3px solid #8b5cf6; }
.asset-library-section--videos { border-left: 3px solid #f43f5e; }
.asset-library-section--packs { border-left: 3px solid #10b981; }
.asset-library-section--figures { border-left: 3px solid #f59e0b; }
.asset-library-section--other { border-left: 3px solid #94a3b8; }
.asset-library-section__title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--atlas-type-sm);
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #f8fafc;
  border-bottom: 1px solid transparent;
}
.asset-library-section--decks > .asset-library-section__title { background: #eef2ff; }
.asset-library-section--worksheets > .asset-library-section__title { background: #f0f9ff; }
.asset-library-section--quizzes > .asset-library-section__title { background: #f5f3ff; }
.asset-library-section--videos > .asset-library-section__title { background: #fff1f2; }
.asset-library-section--packs > .asset-library-section__title { background: #ecfdf5; }
.asset-library-section--figures > .asset-library-section__title { background: #fffbeb; }
.asset-library-section--other > .asset-library-section__title { background: #f8fafc; }
.asset-library-section__title::-webkit-details-marker {
  display: none;
}
.asset-library-section__title::before {
  content: "▸";
  display: inline-block;
  width: 1rem;
  flex-shrink: 0;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  transition: transform 0.15s ease;
}
.asset-library-section[open] > .asset-library-section__title::before {
  transform: rotate(90deg);
}
.asset-library-section[open] > .asset-library-section__title {
  border-bottom-color: var(--border);
}
.asset-library-section__label {
  flex: 1 1 auto;
  min-width: 0;
}
.asset-library-section__count {
  font-weight: 600;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  flex-shrink: 0;
}
.asset-library-section .asset-list {
  margin-top: 0;
  padding: 0.55rem 0.65rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.asset-library-body > .asset-list {
  margin-top: 0;
}
.asset-card-highlight {
  border-color: var(--brand-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.deck-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.deck-preview-modal.hidden { display: none; }
body.deck-preview-open { overflow: hidden; }

.lesson-pdf-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.lesson-pdf-preview-modal.hidden { display: none; }
body.lesson-pdf-preview-open { overflow: hidden; }
.lesson-pdf-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}
.lesson-pdf-preview-panel {
  position: relative;
  z-index: 1;
  width: min(52rem, 100%);
  height: min(92vh, 56rem);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.lesson-pdf-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lesson-pdf-preview-head-main {
  flex: 1 1 auto;
  min-width: 0;
}
.lesson-pdf-preview-head h3 { margin: 0; font-size: var(--atlas-type-lg); line-height: 1.25; }
.lesson-pdf-preview-lead {
  margin: 0.15rem 0 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.lesson-pdf-preview-loading {
  margin: 0;
  flex-shrink: 0;
  font-size: var(--atlas-type-xs);
  white-space: nowrap;
}
.lesson-pdf-preview-loading.hidden { display: none; }
.lesson-pdf-preview-frame-wrap {
  flex: 1 1 auto;
  min-height: 12rem;
  margin: 0.45rem 0.75rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #e8edf2;
  padding: 0.65rem;
}
.lesson-pdf-preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-height: 100%;
}
.lesson-pdf-preview-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  border-radius: 2px;
}
.lesson-pdf-preview-stage--iframe {
  display: block;
  width: 100%;
  min-height: 100%;
  padding: 0;
  background: #fff;
}
.lesson-pdf-preview-frame {
  display: block;
  width: 100%;
  min-height: min(70vh, 40rem);
  height: 100%;
  border: 0;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}
.lesson-pdf-preview-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 0.4rem 1rem 0;
  flex-shrink: 0;
  font-size: var(--atlas-type-sm);
}
.lesson-pdf-preview-pager.hidden { display: none; }
.lesson-pdf-preview-pager button:disabled { opacity: 0.45; cursor: not-allowed; }
.lesson-pdf-preview-foot {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.45rem 0.75rem;
  padding: 0.55rem 0.75rem 0.65rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.lesson-pdf-preview-foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.lesson-pdf-preview-foot-nav .ghost {
  font-size: var(--atlas-type-sm);
  padding: 0.35rem 0.65rem;
}
.lesson-pdf-download-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}
.lesson-pdf-dl-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.45rem 0.55rem 0.5rem;
  transition: border-color 0.12s, box-shadow 0.12s, background 0.12s;
}
.lesson-pdf-dl-card:hover {
  border-color: var(--brand-blue-soft-border);
  background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.08);
}
.lesson-pdf-dl-card .label {
  display: block;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}
.lesson-pdf-dl-card strong {
  display: block;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.lesson-pdf-dl-card-sub {
  display: block;
  margin-top: 0.12rem;
  font-size: var(--atlas-type-2xs);
  color: var(--muted);
  line-height: 1.3;
}
.lesson-pdf-dl-card--primary {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
}
.lesson-pdf-dl-card--primary .label { color: var(--brand-blue-hover); }
.lesson-pdf-dl-card--primary strong { color: #1e3a8a; }
@media (max-width: 640px) {
  .lesson-pdf-preview-foot {
    grid-template-columns: 1fr;
  }
  .lesson-pdf-download-cards {
    grid-template-columns: 1fr;
  }
}
.planning-export-panel #planning-export-pdf:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.deck-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.deck-preview-panel {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  max-height: min(88vh, 52rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.deck-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.deck-preview-head h3 { margin: 0; font-size: var(--atlas-type-lg); }
.deck-preview-lead { margin: 0.65rem 1rem 0; }
.deck-preview-slides {
  flex: 1;
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.deck-preview-slide {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
}
.deck-preview-slide-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}
.deck-preview-slide-head strong { font-size: var(--atlas-type-md); }
.deck-preview-slide .slide-num {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.deck-preview-slide ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}
.deck-preview-image-suggestion {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-surface);
  border: 1px dashed #94a3b8;
  background: #fff;
  font-size: var(--atlas-type-sm);
  color: #334155;
}
.deck-preview-image-suggestion strong { color: #1e40af; }
.deck-preview-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

/* Slide preview mode — app-wide (profile: auto | classic | theater) */
[data-slide-preview="theater"] .deck-preview-slide {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
[data-slide-preview="theater"] .deck-preview-slide-head strong,
[data-slide-preview="theater"] .deck-preview-body {
  color: #f8fafc;
}
[data-slide-preview="theater"] .deck-preview-slide .slide-num,
[data-slide-preview="theater"] .deck-preview-notes {
  color: #94a3b8;
}
[data-slide-preview="theater"] .generator-deck-stage {
  background: linear-gradient(165deg, #0b1c30 0%, #162544 55%, #1e3a5f 100%);
  color: #eaf1ff;
  border-color: #334155;
}
[data-slide-preview="theater"] .generator-slide-canvas__title {
  color: #fff;
}
[data-slide-preview="theater"] .generator-slide-canvas__kicker {
  color: #ffb77d;
}
[data-slide-preview="classic"] .generator-deck-stage,
[data-slide-preview="theater"] .generator-deck-stage--fallback-classic {
  background: #f8fafc;
  color: #1e293b;
}

.generator-studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .generator-studio-grid {
    grid-template-columns: minmax(280px, 5fr) minmax(320px, 7fr);
  }
}
.field--slide-count .field-slide-count-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
@media (min-width: 721px) {
  .field--slide-count .field-slide-count-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem 1rem;
  }
  .field--slide-count #gen-slide-count {
    width: 5.25rem;
    max-width: 5.25rem;
  }
  .field--slide-count #gen-slide-count-hint {
    margin: 0;
    min-width: 0;
    line-height: 1.45;
    max-width: none;
  }
}
.generator-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
  max-width: 100%;
}
.gen-bridge-short,
.gen-step-lbl-short,
.gen-view-lbl-short {
  display: none;
}
.generator-stepper__copy {
  min-width: 0;
}
.generator-stepper__copy strong {
  display: block;
  overflow-wrap: anywhere;
}
.generator-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 100%;
}
.generator-workflow-bridge {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue-soft-border);
}
.generator-workflow-bridge.hint {
  margin-top: 0;
}
.generator-stepper__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-elevated, #fff);
  font-size: var(--atlas-type-sm);
  font-family: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
  color: inherit;
}
.generator-stepper__item:disabled {
  cursor: default;
  opacity: 0.72;
}
.generator-stepper__item:not(:disabled):hover {
  border-color: var(--brand-blue-soft-border);
}
.generator-stepper__item--ready:not(.generator-stepper__item--active) {
  border-color: var(--brand-violet-soft-border);
}
.generator-stepper__item--active {
  border: 2px solid var(--brand-violet);
  padding: calc(0.55rem - 1px) calc(0.65rem - 1px);
  background: var(--brand-violet-soft);
}
.generator-stepper__item--done {
  opacity: 0.85;
}
.generator-stepper__num {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
}
.generator-stepper__item--active .generator-stepper__num {
  background: var(--brand-blue);
  color: #fff;
}
.generator-submit-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: center;
}
.generator-submit-btn__main {
  font-size: var(--atlas-type-md);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}
.generator-submit-btn__sub {
  font-size: var(--atlas-type-xs);
  font-weight: 500;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
}
.generator-deck-wait {
  margin-top: 0.75rem;
}
.generator-deck-wait__step {
  margin: 0.5rem 0 0;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  color: #0f172a;
}
.generator-deck-wait__slide {
  margin: 0.35rem 0 0;
  font-weight: 600;
}
.generator-deck-wait__tech {
  margin: 0.25rem 0 0;
  font-size: var(--atlas-type-2xs);
  opacity: 0.75;
}

/* WYSIWYG slide canvas — matches generated .pptx cream + orange accents */
#generator-deck-empty[hidden] {
  display: none !important;
}
.generator-slide-canvas {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem 2.75rem;
  box-sizing: border-box;
  border-radius: var(--radius);
  border: 1px solid var(--deck-canvas-border, #e7e0d8);
  background: var(--deck-canvas-bg, #fffbf7);
  color: var(--deck-canvas-title, #292524);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--deck-canvas-accent, #c2410c) 6%, transparent);
}
.generator-slide-canvas__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--deck-canvas-accent, #c2410c);
}
.generator-slide-canvas__head {
  margin-top: 0.35rem;
}
.generator-slide-canvas__title {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.28;
  color: var(--deck-canvas-title, #292524);
  max-width: 100%;
  word-wrap: break-word;
}
.generator-slide-canvas__rule {
  margin-top: 0.45rem;
  height: 3px;
  width: min(11rem, 42%);
  background: var(--deck-canvas-accent, #c2410c);
  border-radius: 2px;
}
.generator-slide-canvas--title .generator-slide-canvas__rule {
  width: 5rem;
  margin: 0.75rem auto 0;
}
.generator-slide-canvas--title .generator-slide-canvas__title {
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
}
.generator-slide-canvas__layout {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.55rem;
  align-items: stretch;
  min-height: 0;
  flex: 1;
  max-height: calc(100% - 5.5rem);
  overflow: auto;
  padding-bottom: 0.35rem;
}
.generator-slide-canvas__copy {
  flex: 1 1 52%;
  min-width: 0;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  padding-bottom: 1.75rem;
}
.generator-slide-canvas--title .generator-slide-canvas__layout {
  display: block;
  text-align: center;
  margin-top: 1rem;
}
.generator-slide-canvas--title .generator-slide-canvas__copy {
  text-align: center;
}
.generator-slide-canvas__kicker {
  margin: 0 0 0.25rem;
  font-size: var(--atlas-type-2xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--deck-canvas-muted, #78716c);
}
.generator-slide-canvas__body {
  margin: 0.25rem 0;
  color: var(--deck-canvas-body, #44403c);
}
.generator-slide-canvas__cfu {
  margin: 0.35rem 0 0.15rem;
  font-style: italic;
  color: #9a3412;
  font-size: var(--atlas-type-xs);
}
.generator-slide-canvas__bullets {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.generator-slide-canvas__bullets li::marker {
  color: var(--deck-canvas-accent, #c2410c);
}
.generator-slide-canvas__media {
  flex: 0 0 42%;
  max-width: 46%;
  min-height: 7.5rem;
  border-radius: 10px;
  border: 1px dashed var(--deck-canvas-border, #d6d3d1);
  background: var(--deck-canvas-placeholder, #f5f5f4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  text-align: center;
  font-size: var(--atlas-type-xs);
  color: #57534e;
}
.generator-slide-canvas__media:not(.generator-slide-canvas__media--filled) .generator-slide-canvas__img {
  display: none !important;
}
.generator-slide-canvas__media-placeholder--box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  padding: 0.65rem 0.5rem;
  line-height: 1.35;
}
.generator-slide-canvas__ph-title {
  display: block;
  font-size: var(--atlas-type-xs);
  color: var(--deck-canvas-accent-dark, #9a3412);
}
.generator-slide-canvas__ph-body {
  display: block;
  font-size: var(--atlas-type-xs);
  color: var(--deck-canvas-body, #44403c);
}
.generator-slide-canvas__media--filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--deck-canvas-accent, #c2410c) 35%, #fff);
  background: var(--deck-canvas-placeholder-bg, #ffedd5);
  padding: 0;
  overflow: hidden;
}
.generator-slide-canvas__img {
  width: 100%;
  height: 100%;
  max-height: 11rem;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}
.deck-preview-figure {
  margin: 0.5rem 0 0;
}
.deck-preview-slide-img {
  max-width: 100%;
  max-height: 12rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  object-fit: contain;
}
.generator-slide-canvas__foot {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  font-size: var(--atlas-type-2xs);
  color: #78716c;
  border-top: 1px solid #e7e5e4;
  padding-top: 0.35rem;
}
.generator-slide-canvas__notes {
  margin-top: 0.45rem;
  font-size: var(--atlas-type-xs);
}
.generator-deck-viewer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.75rem;
  isolation: isolate;
}
.generator-deck-carousel__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.generator-deck-viewer[hidden] {
  display: none !important;
}
.generator-deck-carousel__btn {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-btn, 8px);
  border: 1px solid var(--border);
  background: #fff;
  font-size: var(--atlas-type-lg);
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}
.generator-deck-carousel__btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.generator-deck-viewer .generator-slide-canvas,
.generator-deck-viewer #generator-deck-stage {
  flex: none;
  width: 100%;
  min-width: 0;
  margin-top: 0;
}
.generator-deck-notes {
  margin-top: 0.5rem;
  font-size: var(--atlas-type-sm);
}
.generator-slide-canvas--vl-landscape .generator-slide-canvas__layout,
.generator-slide-canvas--vl-landscape-cap .generator-slide-canvas__layout {
  flex-direction: column;
}
.generator-slide-canvas--vl-landscape .generator-slide-canvas__media,
.generator-slide-canvas--vl-landscape-cap .generator-slide-canvas__media {
  flex: 0 0 auto;
  max-width: 100%;
  width: 100%;
  min-height: 5.25rem;
  order: -1;
}
.generator-slide-canvas--vl-portrait .generator-slide-canvas__media {
  flex: 0 0 36%;
  max-width: 40%;
}
.generator-slide-canvas--vl-grid .generator-slide-canvas__layout {
  flex-direction: column;
}
.generator-slide-canvas--vl-grid .generator-slide-canvas__media {
  min-height: 4.5rem;
  flex: 0 0 auto;
  max-width: 100%;
  width: 100%;
  order: 1;
}
.generator-slide-canvas--vl-grid .generator-slide-canvas__copy {
  flex: 1 1 auto;
  order: 0;
}
.generator-slide-canvas--vl-2up .generator-slide-canvas__layout {
  flex-wrap: wrap;
}
.generator-slide-canvas--vl-2up .generator-slide-canvas__media {
  flex: 1 1 45%;
  max-width: 48%;
}
.generator-slide-canvas--vl-image-forward .generator-slide-canvas__media {
  flex: 0 0 54%;
  max-width: 58%;
}
.generator-slide-canvas--vl-text-forward .generator-slide-canvas__media,
.generator-slide-canvas--vl-classroom-clear .generator-slide-canvas__media {
  flex: 0 0 28%;
  max-width: 32%;
  min-height: 5.5rem;
}
.generator-slide-canvas--vl-balanced .generator-slide-canvas__media {
  flex: 0 0 38%;
  max-width: 42%;
  min-height: 5.25rem;
}
.generator-slide-canvas--vl-album .generator-slide-canvas__layout {
  flex-direction: column;
  gap: 0.5rem;
}
.generator-slide-canvas--vl-bold .generator-slide-canvas__accent {
  height: 9px;
}
.generator-slide-canvas--vl-bold .generator-slide-canvas__rule {
  height: 4px;
  width: min(14rem, 55%);
}
[data-slide-preview="theater"] .generator-slide-canvas {
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--deck-canvas-accent, #c2410c) 18%, #0b1c30) 0%,
    #162544 55%,
    #1e3a5f 100%
  );
  border-color: color-mix(in srgb, var(--deck-canvas-accent, #c2410c) 22%, #334155);
  color: #eaf1ff;
}
[data-slide-preview="theater"] .generator-slide-canvas__accent,
[data-slide-preview="theater"] .generator-slide-canvas__rule {
  background: var(--deck-canvas-accent, #c2410c);
}
[data-slide-preview="theater"] .generator-slide-canvas__title,
[data-slide-preview="theater"] .generator-slide-canvas__body {
  color: #f8fafc;
}
.generator-deck-stage {
  display: flex;
  flex-direction: column;
}
.generator-deck-stage__bullets {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
}
.generator-deck-stage__nav {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.generator-deck-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.generator-deck-thumb {
  font-size: var(--atlas-type-2xs);
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #f1f5f9;
  cursor: pointer;
  max-width: 100%;
  text-align: left;
}
.generator-deck-thumb--active {
  border-color: var(--brand-blue);
  background: var(--brand-blue-soft);
}
.lesson-video-search-status:empty {
  display: none;
}

.lesson-video-pipeline {
  margin: 0.75rem 0 0;
}

.lesson-video-pipeline__steps {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
}

.lesson-video-pipeline__step {
  margin: 0.2rem 0;
  color: var(--muted, #64748b);
}

.lesson-video-pipeline__step.is-active {
  color: var(--text, #0f172a);
  font-weight: 600;
}

.lesson-video-pipeline__step.is-done {
  color: var(--text, #334155);
}

.lesson-video-search-status > .hint {
  margin: 0.75rem 0 0;
}

.lesson-video-results__heading {
  margin: 1rem 0 0.5rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
}
.lesson-video-results__heading:first-child {
  margin-top: 0;
}

.generator-video-picks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.generator-video-pick {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.75rem;
}
.generator-video-pick__thumb-link {
  display: block;
  flex: 0 0 200px;
  width: 200px;
  max-width: min(200px, 42vw);
}
.generator-video-pick__thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-surface);
}
.generator-video-pick__title {
  margin: 0 0 0.25rem;
  font-size: var(--atlas-type-md);
}
.generator-video-pick__badge {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: var(--color-accent, #c2410c);
}
.generator-video-pick__why {
  margin: 0.35rem 0;
  font-size: var(--atlas-type-sm);
}

.lesson-video-results-host {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.lesson-video-results__footer {
  margin: 0.75rem 0 0;
}
.lesson-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.85rem 1rem;
}
.lesson-video-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-surface, 8px);
  background: #fff;
}
.lesson-video-card__play {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
}
.lesson-video-card__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.lesson-video-card__thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e293b, #334155);
}
.lesson-video-card__play:hover .lesson-video-card__thumb-img,
.lesson-video-card__play:focus-visible .lesson-video-card__thumb-img {
  transform: scale(1.03);
  filter: brightness(0.82);
}
.lesson-video-card__play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.lesson-video-card__play-icon::after {
  content: "";
  position: absolute;
  left: 1.28rem;
  top: 0.92rem;
  border-style: solid;
  border-width: 0.7rem 0 0.7rem 1.15rem;
  border-color: transparent transparent transparent #fff;
}
.lesson-video-card__duration {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  padding: 0.12rem 0.4rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 4px;
  pointer-events: none;
}
.lesson-video-card__body {
  padding: 0.55rem 0.65rem 0.65rem;
}
.lesson-video-card__title {
  margin: 0 0 0.2rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.35;
  font-weight: 600;
}
.lesson-video-card__meta {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.lesson-video-card__why {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
  color: var(--text-muted, #64748b);
}
.lesson-video-card__badge {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: var(--color-accent, #c2410c);
}
.lesson-video-card__actions {
  margin-top: 0.15rem;
}
.lesson-video-card__save {
  font-size: var(--atlas-type-xs);
  padding: 0.2rem 0.45rem;
}

.lesson-video-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.lesson-video-preview-modal.hidden {
  display: none;
}
body.lesson-video-preview-open {
  overflow: hidden;
}
.lesson-video-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
}
.lesson-video-preview-panel {
  position: relative;
  z-index: 1;
  width: min(56rem, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius, 10px);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.lesson-video-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lesson-video-preview-head-main {
  flex: 1 1 auto;
  min-width: 0;
}
.lesson-video-preview-head h3 {
  margin: 0;
  font-size: var(--atlas-type-md);
  line-height: 1.3;
}
.lesson-video-preview-head .hint {
  margin: 0.2rem 0 0;
  font-size: var(--atlas-type-xs);
}
.lesson-video-preview-stage {
  flex-shrink: 0;
  padding: 0.55rem 0.75rem 0;
}
.lesson-video-preview-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-surface);
  overflow: hidden;
}
.lesson-video-preview-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lesson-video-preview-transport {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem 0;
}
.lesson-video-preview-transport button {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  min-width: 4.5rem;
}
.lesson-video-preview-why {
  margin: 0.35rem 0.75rem 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.4;
}
.lesson-video-preview-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.65rem 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.45rem;
}
.lesson-video-preview-foot .button-link {
  margin-right: auto;
}

.generator-deck-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.generator-deck-panel__subhead {
  margin: 0 0 0.35rem;
}
.generator-deck-panel__kicker {
  margin: 0;
  flex: 1 1 12rem;
  font-size: var(--atlas-type-xs);
}
.generator-view-toggle__btn {
  font-size: var(--atlas-type-xs);
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fff;
}
.generator-view-toggle__btn--active {
  border-color: var(--brand-blue);
  font-weight: 600;
}
.generator-action-dock {
  position: sticky;
  bottom: 0.5rem;
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.4rem;
  justify-content: stretch;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.55rem;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  overflow-x: clip;
}
.generator-action-dock[hidden] {
  display: none !important;
}
.generator-action-dock > .button-link,
.generator-action-dock > button {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: var(--atlas-type-xs);
  line-height: 1.2;
  padding: 0.45rem 0.4rem;
  white-space: normal;
}
.generator-action-dock .dock-lbl-short {
  display: none;
}
@media (max-width: 720px) {
  .generator-action-dock {
    gap: 0.35rem;
    padding: 0.45rem 0.4rem;
  }
  .generator-action-dock > .button-link,
  .generator-action-dock > button {
    font-size: var(--atlas-type-2xs);
    padding: 0.4rem 0.25rem;
    min-height: 2.5rem;
  }
  .generator-action-dock .dock-lbl-full {
    display: none;
  }
  .generator-action-dock .dock-lbl-short {
    display: inline;
  }
}
@media (min-width: 721px) {
  .generator-action-dock {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
  }
  .generator-action-dock > .button-link,
  .generator-action-dock > button {
    flex: 0 1 auto;
    white-space: nowrap;
  }
}
.deck-preview-body { margin: 0.35rem 0 0; font-size: var(--atlas-type-sm); line-height: 1.45; }
.deck-preview-notes { margin-top: 0.45rem; font-size: var(--atlas-type-sm); }
.gen-status-msg a.button-link { margin: 0 0.25rem; }
.empty-state-inline { margin: 0.5rem 0; }
.import-merge { margin-bottom: 0; }
.import-merge-queue {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}
.import-merge-queue__title { margin: 0 0 0.35rem; font-size: var(--atlas-type-lg); }
.import-merge-queue__list {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}
.import-merge-queue__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #fdba74;
  font-size: var(--atlas-type-sm);
}
.import-merge-queue__item:last-child { border-bottom: none; }
.programme-picker-region { margin-bottom: 0.5rem; }
.programme-picker-sub {
  display: block;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  margin: 0.35rem 0 0.2rem;
  color: #57534e;
}
.import-merge-queue__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.import-upload-panel.dragover {
  outline: 2px dashed var(--accent, var(--brand-blue));
  outline-offset: 4px;
  background: var(--info-bg);
}
.import-upload-queue {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid #c5d8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.import-upload-queue__title { margin: 0 0 0.25rem; font-size: var(--atlas-type-md); font-weight: 700; }
.import-upload-queue__lead { margin: 0 0 0.5rem; }
.import-upload-queue__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.import-upload-queue__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: var(--atlas-type-sm);
}
.import-upload-queue__item:last-child { border-bottom: none; }
.import-upload-queue__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.import-upload-queue__status { font-size: var(--atlas-type-sm); color: var(--muted); white-space: nowrap; }
.import-upload-queue__detail { grid-column: 1 / -1; font-size: var(--atlas-type-xs); color: var(--muted); }
.lesson-multi-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0.5rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: var(--info-bg);
  border: 1px solid #c5d8f0;
}
.lesson-multi-toolbar__count { margin: 0 0 0.15rem; font-weight: 700; font-size: var(--atlas-type-md); }
.lesson-multi-toolbar__groups { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
.lesson-multi-toolbar__group { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; width: 100%; }
.lesson-multi-toolbar__group--create {
  padding-top: 0.7rem;
  border-top: 1px solid #b8cce8;
}
.lesson-multi-toolbar__label {
  margin: 0;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #475569;
}
.lesson-multi-toolbar__create-hint {
  margin: -0.15rem 0 0.1rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.lesson-multi-toolbar__buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lesson-multi-toolbar__create-btn {
  font-size: var(--atlas-type-sm);
  padding: 0.45rem 0.75rem;
}
#lesson-multi-toolbar-studio.hidden { display: none; }
.lesson-multi-fab-wrap {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.lesson-multi-fab-wrap:not(.hidden) { pointer-events: auto; }
.lesson-multi-fab-wrap.hidden { display: none; }
.lesson-multi-fab {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--brand-blue), var(--brand-blue-hover));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45);
  animation: lesson-multi-fab-pulse 2.2s ease-in-out infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lesson-multi-fab:hover { transform: scale(1.04); }
.lesson-multi-fab:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.55);
  outline-offset: 3px;
}
.lesson-multi-fab[aria-expanded="true"] {
  animation: none;
  background: linear-gradient(145deg, #1e40af, #1e3a8a);
}
.lesson-multi-fab[aria-expanded="true"] .lesson-multi-fab__icon {
  transform: rotate(45deg);
}
.lesson-multi-fab__icon {
  display: block;
  font-size: var(--atlas-type-2xl);
  font-weight: 300;
  line-height: 1;
  transform-origin: center;
  transition: transform 0.2s ease;
}
.lesson-multi-fab__badge {
  position: absolute;
  top: -0.15rem;
  right: -0.15rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-blue-hover);
  font-size: var(--atlas-type-2xs);
  font-weight: 800;
  line-height: 1.35rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}
@keyframes lesson-multi-fab-pulse {
  0%, 100% { box-shadow: 0 6px 22px rgba(37, 99, 235, 0.45), 0 0 0 0 rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 8px 26px rgba(37, 99, 235, 0.5), 0 0 0 14px rgba(37, 99, 235, 0); }
}
.lesson-multi-launcher {
  margin-bottom: 0.85rem;
  padding: 1rem 1.05rem;
  min-width: 15.5rem;
  max-width: min(92vw, 18rem);
  border-radius: 12px;
  background: #fff;
  border: 1px solid #c5d8f0;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
}
.lesson-multi-launcher.hidden { display: none; }
.lesson-multi-launcher__title {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: var(--text, #0f172a);
}
.lesson-multi-launcher__lead {
  margin: 0 0 0.85rem;
  font-size: var(--atlas-type-sm);
}
.lesson-multi-launcher__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.lesson-multi-launcher__action {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.lesson-multi-launcher__clear {
  margin-top: 0.65rem;
  width: 100%;
  font-size: var(--atlas-type-sm);
}
.lesson-entry-select {
  flex-shrink: 0;
  margin-right: 0.35rem;
  display: flex;
  align-items: center;
}
.content-studio-lesson-chips {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.content-studio-lesson-chips__item {
  font-size: var(--atlas-type-xs);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-surface);
  background: #e0f2fe;
  color: #0c4a6e;
  font-weight: 600;
}
.content-brief-lesson-pick {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
}
.content-brief-lesson-pick__row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  cursor: pointer;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 6px;
  margin: 0.15rem 0;
}
.content-brief-lesson-pick__row:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}
.content-brief-lesson-pick__row:hover {
  background: #fff;
}
.content-brief-lesson-pick__row input {
  margin-top: 0.25rem;
  flex-shrink: 0;
}
.content-brief-lesson-pick__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.content-brief-lesson-pick__title {
  display: block;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  line-height: 1.35;
  color: var(--text);
}
.content-brief-lesson-pick__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.3;
  color: var(--muted);
}
.content-brief-lesson-pick__status {
  display: inline-block;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  line-height: 1.25;
}
.content-brief-lesson-pick__status--draft {
  background: #f1f5f9;
  color: #475569;
}
.content-brief-lesson-pick__status--approved {
  background: #dcfce7;
  color: #166534;
}
.content-brief-lesson-pick__tags {
  color: var(--muted);
}
.content-brief-lesson-pick-wrap > .field-label {
  font-weight: 700;
  font-size: var(--atlas-type-md);
}
.content-brief-lesson-pick__derived {
  margin: 0.35rem 0 0;
  font-weight: 600;
  color: var(--accent, var(--brand-blue));
}
.content-brief-lesson-pick__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #e2e8f0;
}
.import-folder-panel { margin-top: 0; }
.import-folder-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: var(--atlas-type-md);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.import-folder-summary::-webkit-details-marker { display: none; }
.import-folder-summary::before {
  content: "▸";
  color: var(--accent);
  font-size: var(--atlas-type-sm);
}
.import-folder-panel[open] .import-folder-summary::before { content: "▾"; }
.import-folder-panel .hint:first-of-type { margin-top: 0.75rem; }
.sr-only-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-choose-btn { margin-top: 0.85rem; }
.file-drop.is-busy .file-choose-btn { opacity: 0.55; pointer-events: none; }
.file-drop {
  display: block;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-surface);
  padding: 2rem 1.5rem;
  text-align: center;
  background: #fff;
  cursor: default;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.file-drop:hover, .file-drop.dragover { background: var(--info-bg); }
.file-drop.is-busy {
  border-style: solid;
  border-color: var(--accent);
  background: var(--info-bg);
  cursor: wait;
}
.file-drop.is-busy .file-drop-title,
.file-drop.is-busy .file-drop-hint { opacity: 0.35; }
.file-drop-busy {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  font-size: var(--atlas-type-md);
}
.file-drop-busy.hidden { display: none; }
.file-drop.is-busy .file-drop-busy { display: block; }
.file-drop-title { display: block; font-weight: 700; font-size: var(--atlas-type-lg); color: var(--accent); }
.file-drop-hint { display: block; margin-top: 0.35rem; color: var(--muted); font-size: var(--atlas-type-sm); }
.message-box {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  font-size: var(--atlas-type-md);
}
.message-box.ok { background: var(--success-bg); border-color: #b7dfc3; }
.message-box.err { background: #fdecea; border-color: #f5c2c0; }
.message-box.info { background: var(--info-bg); border-color: #c5d8f0; }
.message-box p { margin: 0.35rem 0 0; font-size: var(--atlas-type-sm); }
.actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
button {
  padding: 0.55rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: var(--accent-hover); }
button.primary.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
button.primary.danger:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
button.ghost { background: transparent; font-weight: 500; }
button.danger:not(.primary) { color: #a32020; }
button.danger:not(.primary):hover { background: #fce8e8; }
/* Forward-facing buttons: green=refresh, blue=action, orange=files, red=delete */
:is(button, a.button-link).btn-tone-refresh {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-refresh:hover {
  background: color-mix(in srgb, var(--brand-green) 86%, #000);
  border-color: color-mix(in srgb, var(--brand-green) 86%, #000);
  color: #fff;
}
:is(button, a.button-link).btn-tone-action {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-action:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
:is(button, a.button-link).btn-tone-files {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-files:hover {
  background: color-mix(in srgb, var(--brand-orange) 86%, #000);
  border-color: color-mix(in srgb, var(--brand-orange) 86%, #000);
  color: #fff;
}
/* Step ② — matches workflow Review (soft when idle, solid blue when ready) */
:is(button, a.button-link).btn-tone-step2 {
  background: var(--brand-blue-soft);
  border: 2px solid var(--accent, var(--brand-blue));
  color: var(--brand-blue-hover);
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-step2:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
:is(button, a.button-link).btn-tone-step2:not(:disabled) {
  background: var(--accent, var(--brand-blue));
  border-color: var(--accent, var(--brand-blue));
  color: #fff;
}
:is(button, a.button-link).btn-tone-step2:disabled {
  opacity: 1;
  cursor: not-allowed;
}
:is(button, a.button-link).btn-tone-danger,
button.primary.danger,
button.btn-tone-danger.primary {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-danger:hover,
button.primary.danger:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
:is(button, a.button-link).btn-tone-action-soft {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
  color: var(--brand-blue-hover);
  font-weight: 600;
  text-decoration: none;
}
:is(button, a.button-link).btn-tone-action-soft:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
}
:is(button, a.button-link).btn-tone-danger-soft {
  background: #fce8e8;
  border-color: #e8b4b4;
  color: #b91c1c;
  font-weight: 600;
}
:is(button, a.button-link).btn-tone-danger-soft:hover {
  background: #f9d4d4;
  border-color: #dc2626;
  color: #991b1b;
}
a.button-link.btn-tone-action,
a.button-link.btn-tone-files,
a.button-link.btn-tone-refresh,
a.button-link.btn-tone-danger,
a.button-link.btn-tone-action-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid;
  font-size: var(--atlas-type-sm);
}
button:disabled { opacity: 0.6; cursor: not-allowed; }
#lesson-form-host { display: none; }
.lesson-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  margin-bottom: 0.5rem;
  background: #fff;
  overflow: hidden;
}
.lesson-entry[open] { border-color: #b8cce8; box-shadow: 0 1px 4px rgba(37, 99, 168, 0.08); }
.lesson-entry[open] > .lesson-entry-summary { align-items: flex-start; }
.lesson-entry[open] .lesson-entry-title-wrap {
  flex: 1 1 auto;
  max-width: calc(100% - 11rem);
}
.lesson-entry[open] .lesson-entry-summary-end { padding-top: 0.12rem; }
.lesson-entry.confirm-delete { border-color: #e8b4b4; background: #fff8f8; }
.lesson-entry-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  background: #f7f9fc;
}
.lesson-entry-summary::-webkit-details-marker { display: none; }
.lesson-entry-drag-handle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.5rem;
  margin: -0.15rem 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}
.lesson-entry-drag-handle:active { cursor: grabbing; }
.lesson-entry-drag-handle--idle {
  cursor: default;
  opacity: 0.35;
  pointer-events: none;
}
.lesson-entry-drag-handle .ui-icon { width: 0.85rem; height: 0.85rem; }
.lesson-entry.lesson-entry--dragging { opacity: 0.55; }
.lesson-entry.lesson-entry--drag-over {
  box-shadow: inset 0 2px 0 0 var(--atlas-blue, #2563a8);
}
.lesson-entry-title-wrap {
  flex: 1;
  min-width: 0;
  max-width: 26rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.lesson-entry-title {
  font-size: var(--atlas-type-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-entry[open] .lesson-entry-title-display {
  font-size: var(--atlas-type-xl);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text, #0f172a);
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  cursor: text;
  padding: 0.1rem 0;
  border: none;
  background: transparent;
}
.lesson-entry[open] .lesson-entry-title-display:hover,
.lesson-entry[open] .lesson-entry-title-display:focus-visible {
  outline: none;
  box-decoration-color: rgba(37, 99, 235, 0.35);
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 3px;
}
.lesson-entry-title-slot {
  display: block;
  width: 100%;
  min-width: 0;
}
.lesson-entry-title-slot .lesson-entry-title-input {
  width: 100%;
  max-width: 100%;
  font-size: var(--atlas-type-md);
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  margin: 0;
  border-radius: 6px;
}
.lesson-title-field-anchor {
  display: none;
}
.lesson-profile-mismatch {
  margin: 0 0 0.75rem;
  font-size: var(--atlas-type-sm);
}
.lesson-profile-mismatch.warn {
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
.lesson-profile-mismatch.err {
  background: #fdecea;
  border: 1px solid #f5c2c0;
}
.lesson-profile-mismatch p { margin: 0.35rem 0 0; }
.lesson-profile-mismatch strong { display: block; margin-bottom: 0.15rem; }
.import-profile-mismatch { margin-top: 0.65rem; }

.lesson-form-meta {
  margin: 0 0 0.75rem;
}
.lesson-form-meta-grid {
  display: grid;
  gap: 0.35rem 1.25rem;
  margin: 0;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  font-size: var(--atlas-type-sm);
  line-height: 1.4;
}
@media (min-width: 640px) {
  .lesson-form-meta-grid {
    grid-template-columns: repeat(2, minmax(5.5rem, auto) 1fr);
    column-gap: 2rem;
  }
}
.lesson-form-meta-row {
  display: contents;
}
.lesson-form-meta-row dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.lesson-form-meta-row dd {
  margin: 0;
  color: var(--text, inherit);
  word-break: break-word;
}
.lesson-status-msg.lesson-save-toast {
  position: fixed;
  bottom: 1.15rem;
  right: 1.15rem;
  z-index: 9200;
  max-width: min(20rem, 92vw);
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16);
  font-weight: 600;
  animation: lesson-save-toast-in 0.2s ease-out;
}
@keyframes lesson-save-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.lesson-build-label {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: var(--accent, var(--brand-blue));
  letter-spacing: 0.02em;
  text-transform: none;
}
.lesson-source-scope {
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.lesson-entry .status-pill { margin: 0; }
.lesson-entry-summary-end {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .lesson-browser.panel {
    padding: 0.65rem 0.42rem;
  }
  .lesson-browser .panel-heading {
    margin-bottom: 0.45rem;
  }
  .lesson-entry {
    margin-bottom: 0.35rem;
  }
  .lesson-entry-summary {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.12rem 0.3rem;
    row-gap: 0.06rem;
    padding: 0.42rem 0.28rem 0.38rem 0.45rem;
  }
  .lesson-entry-drag-handle {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    margin-top: 0;
  }
  .lesson-entry-select {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin-right: 0;
  }
  .lesson-entry[open] > .lesson-entry-summary {
    align-items: center;
  }
  .lesson-entry[open] .lesson-entry-summary .lesson-entry-title-wrap {
    flex: none;
    max-width: none;
    width: 100%;
  }
  .lesson-entry-title-wrap {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    flex: none;
    max-width: none;
    gap: 0.04rem;
    min-width: 0;
    width: 100%;
  }
  .lesson-entry:not([open]) .lesson-entry-title {
    font-size: var(--atlas-type-sm);
    line-height: 1.2;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .lesson-source-scope,
  .lesson-build-label {
    font-size: var(--atlas-type-2xs);
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .lesson-build-label + .lesson-source-scope {
    margin-top: -0.04rem;
  }
  .lesson-entry-title-slot:empty {
    display: none;
  }
  .lesson-entry-summary-end {
    display: contents;
  }
  .lesson-entry-actions {
    grid-column: 4;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    gap: 0;
    margin-inline-end: -0.12rem;
  }
  .lesson-entry-actions .icon-btn {
    width: 1.8rem;
    height: 1.8rem;
  }
  .lesson-entry-actions .icon-btn svg {
    width: 1rem;
    height: 1rem;
  }
  .lesson-entry .status-pill {
    grid-column: 4;
    grid-row: 2;
    justify-self: end;
    align-self: start;
    margin-inline-end: -0.08rem;
    font-size: var(--atlas-type-2xs);
    padding: 0.06rem 0.38rem;
    line-height: 1.25;
    white-space: nowrap;
    margin: 0;
  }
  .lesson-entry[open] .lesson-entry-summary .lesson-entry-title-display {
    font-size: var(--atlas-type-md);
    line-height: 1.22;
    padding: 0;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    display: block;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
  .lesson-entry[open] .lesson-entry-summary-end {
    padding-top: 0;
  }
}
.lesson-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.lesson-entry-body {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: #fff;
  min-width: 0;
}
.lesson-entry-body .lesson-split-panel {
  width: 100%;
}
.panel-heading .count-badge { font-size: var(--atlas-type-sm); font-weight: 600; color: var(--muted); }
.lesson-split {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 1rem 1.15rem 1.15rem;
  margin: 1rem 0;
  background: linear-gradient(180deg, #fafbfd 0%, #fff 28%);
}
.atlas-split { border-left: 4px solid var(--accent); }
.slides-split { border-left: 4px solid #0d9488; margin-top: 1.25rem; }
.slides-split-details {
  padding: 0.65rem 1rem 0.85rem;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.slides-split-details:not([open]) {
  padding-bottom: 0.65rem;
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12);
}
.slides-split-details:not([open]):hover {
  border-color: #99f6e4;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.28), 0 2px 8px rgba(13, 148, 136, 0.08);
}
.slides-split-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.15rem;
  user-select: none;
  border-radius: 8px;
}
.slides-split-summary:hover .slides-split-expand-hint { background: #ccfbf1; border-color: #5eead4; color: #0f766e; }
.slides-split-summary:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}
.slides-split-summary::-webkit-details-marker { display: none; }
.slides-split-summary-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
}
.slides-split-summary .split-title {
  display: block;
  margin: 0;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
}
.slides-split-summary .split-lead {
  margin: 0;
  font-size: var(--atlas-type-sm);
}
.slides-split-expand-hint {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.slides-split-details[open] .slides-split-expand-hint { display: none; }
.slides-split-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #99f6e4;
  flex-shrink: 0;
}
.slides-split-details[open] .slides-split-chevron-wrap { display: none; }
.slides-split-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #0d9488;
  border-bottom: 2px solid #0d9488;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  transition: transform 0.15s ease;
}
.slides-split-details[open] .slides-split-chevron {
  transform: rotate(-135deg);
}
.slides-split-body .lesson-source-text-meta {
  margin: 0.85rem 0 0;
}
.slides-split-body .lesson-source-text-meta.hidden {
  display: none;
}
.slides-split-body {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.split-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: start;
  gap: 0.2rem 0.65rem;
  column-gap: 0.65rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.split-head > div {
  display: contents;
}
.split-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-surface);
  background: var(--info-bg);
  color: var(--accent);
  flex-shrink: 0;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: start;
}
.split-icon-slides { background: #e6f6f3; color: #0d9488; }
.split-head .split-title {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
}
.split-head .split-lead,
.split-head .planning-layout-hint {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}
.split-head .planning-layout-hint {
  grid-row: 3;
  margin: 0;
}
.split-head .planning-layout-hint[hidden] {
  display: none;
}
.split-title { margin: 0; font-size: var(--atlas-type-lg); font-weight: 700; letter-spacing: -0.02em; }
.split-lead { margin: 0.2rem 0 0; font-size: var(--atlas-type-sm); }
.split-head .split-pdf {
  grid-column: 3;
  grid-row: 1;
  margin-left: 0;
  align-self: start;
  justify-self: end;
}
.ubd-form-fields { margin-top: 0.5rem; }
.ubd-stage-details {
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
}
.ubd-stage-details:not(:first-child) {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 2px solid #c5d0de;
}
.stage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: var(--info-bg);
  border-radius: var(--radius-surface);
  border: 1px solid #c5d0de;
  border-left-width: 4px;
  border-left-color: var(--accent);
  font-size: var(--atlas-type-lg);
}
.stage-heading::-webkit-details-marker { display: none; }
.ubd-stage-details[open] > .stage-heading {
  margin-bottom: 1rem;
}
.stage-heading-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
}
.stage-heading-chevron-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #c5d0de;
}
.stage-heading-chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  margin-top: -0.12rem;
  transition: transform 0.15s ease;
}
.ubd-stage-details[open] > .stage-heading .stage-heading-chevron {
  transform: rotate(-135deg);
  margin-top: 0.08rem;
}
.ubd-stage-body {
  min-width: 0;
}
.stage-en { font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.stage-ar {
  font-family: "Dubai", "Noto Naskh Arabic", "Inter", sans-serif;
  color: var(--text);
  font-weight: 700;
  font-size: var(--atlas-type-md);
  margin-left: auto;
  text-align: right;
}
/* Bilingual labels: EN left, AR right on one row (.field span { display:block } overrides generic flex) */
.field > .field-label-bilingual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content auto auto;
  grid-template-areas: "label meta ar edit";
  align-items: center;
  column-gap: 0.55rem;
  row-gap: 0.25rem;
  width: 100%;
  margin-bottom: 0.4rem;
  padding-bottom: 0.45rem;
  font-weight: 600;
  border-bottom: 1px solid #dce3ec;
}
.field > .field-label-bilingual > .field-label-primary {
  grid-area: label;
  display: block;
  min-width: 0;
}
.field > .field-label-bilingual > .field-label-primary > .field-en {
  display: inline;
  margin-bottom: 0;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.field > .field-label-bilingual > .ubd-field-meta-actions {
  grid-area: meta;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  min-width: 0;
}
.field > .field-label-bilingual > .ubd-field-meta-actions .ubd-field-source-badge {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}
.field.ubd-field .ubd-field-revert-btn {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  color: var(--accent);
}
.field.ubd-field .ubd-field-revert-btn:hover:not(:disabled) {
  background: var(--info-bg, #e8f2fc);
  color: var(--accent);
}
.field.ubd-field .ubd-field-revert-btn:disabled {
  opacity: 0.45;
}
.field.ubd-field .ubd-field-revert-btn svg {
  width: 1rem;
  height: 1rem;
}
.field > .field-label-bilingual > .field-ar {
  grid-area: ar;
}
.field.ubd-field > .field-label-bilingual .ubd-edit-btn {
  grid-area: edit;
  justify-self: end;
}
.field > .field-label-bilingual:not(:has(> .field-ar)) {
  grid-template-columns: minmax(0, 1fr) max-content auto;
  grid-template-areas: "label meta edit";
}
.field > .field-label-bilingual:has(.ubd-field-meta-actions .ubd-field-source-badge.hidden):not(:has(.ubd-field-revert-btn:not(.hidden))) {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "label ar edit";
}
.field > .field-label-bilingual:has(.ubd-field-meta-actions .ubd-field-source-badge.hidden):not(:has(.ubd-field-revert-btn:not(.hidden))):not(:has(> .field-ar)) {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label edit";
}
.field.ubd-field {
  margin-bottom: 1.15rem;
}
.field > .field-label-bilingual > .field-en,
.field > .field-label-bilingual > .field-ar {
  display: inline;
  margin-bottom: 0;
  width: auto;
  max-width: 48%;
}
.field > .field-label-bilingual > .field-en {
  flex: 1 1 auto;
  text-align: left;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.field > .field-label-bilingual > .field-ar {
  flex: 0 1 auto;
  text-align: right;
  font-family: "Dubai", "Noto Naskh Arabic", "Inter", sans-serif;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  color: #334155;
  line-height: 1.35;
}
.field.ubd-field > .field-label-bilingual .ubd-edit-btn {
  margin-left: 0;
  padding: 0.15rem 0.5rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.field.ubd-field > .field-label-bilingual .ubd-edit-btn:hover {
  color: var(--accent);
  background: var(--info-bg);
  text-decoration: none;
}
.field.ubd-field.is-editing > .field-label-bilingual .ubd-edit-btn {
  visibility: hidden;
}
.ubd-field-body {
  margin-top: 0.15rem;
}
@media (max-width: 640px) {
  .lesson-entry-body {
    padding: 0.55rem 0.55rem 0.75rem;
  }
  .lesson-entry-body #lesson-form {
    --lm-title: var(--app-title, 0.9375rem);
    --lm-body: var(--app-body, 0.8125rem);
    --lm-caption: var(--app-caption, var(--atlas-type-xs));
    --lm-leading: var(--app-leading, 1.45);
  }
  .lesson-entry-body #lesson-form .split-head .split-title {
    font-size: var(--lm-title);
    line-height: 1.25;
  }
  .lesson-entry-body #lesson-form .split-head .split-lead,
  .lesson-entry-body #lesson-form .split-head .planning-layout-hint {
    font-size: var(--lm-caption);
    line-height: var(--lm-leading);
  }
  .lesson-form-meta {
    margin-bottom: 0.55rem;
  }
  .lesson-form-meta-grid {
    font-size: var(--lm-body);
    line-height: var(--lm-leading);
    gap: 0.28rem 0.9rem;
  }
  .lesson-form-meta-row dt {
    font-size: var(--lm-caption);
  }
  .lesson-form-meta-row dd {
    font-size: var(--lm-body);
  }
  .lesson-entry-body #lesson-form #lesson-source-text-meta {
    margin-top: 0.55rem;
    padding: 0.5rem 0.6rem;
    font-size: var(--lm-body);
    line-height: var(--lm-leading);
  }
  .lesson-entry-body #lesson-form #lesson-source-text-meta strong {
    font-size: inherit;
    font-weight: 700;
  }
  .lesson-entry-body #lesson-form #lesson-source-text-meta .button-link {
    font-size: var(--lm-caption);
    display: inline-block;
    margin-top: 0.35rem;
  }
  .lesson-entry-body .lesson-split {
    padding: 0.65rem 0.55rem 0.75rem;
    margin: 0.55rem 0;
  }
  .lesson-entry-body #lesson-form .ubd-stage-details .stage-heading {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    padding: 0.45rem 0.55rem;
    font-size: var(--lm-title);
    line-height: 1.25;
  }
  .lesson-entry-body #lesson-form .ubd-stage-details[open] > .stage-heading {
    margin-bottom: 0.55rem;
  }
  .lesson-entry-body #lesson-form .ubd-stage-details .stage-heading-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
  }
  .lesson-entry-body #lesson-form .ubd-stage-details .stage-heading-chevron-wrap {
    width: 1.65rem;
    height: 1.65rem;
  }
  .stage-ar {
    margin-left: 0;
    text-align: start;
    width: 100%;
  }
  .field.ubd-field {
    margin-bottom: 0.85rem;
  }
  .lesson-entry-body #lesson-form .field > .field-label-bilingual,
  .lesson-entry-body #lesson-form .field > .field-label-bilingual:not(:has(> .field-ar)),
  .lesson-entry-body #lesson-form .field > .field-label-bilingual:has(.ubd-field-meta-actions .ubd-field-source-badge.hidden):not(:has(.ubd-field-revert-btn:not(.hidden))),
  .lesson-entry-body #lesson-form .field > .field-label-bilingual:has(.ubd-field-meta-actions .ubd-field-source-badge.hidden):not(:has(.ubd-field-revert-btn:not(.hidden))):not(:has(> .field-ar)) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "badge"
      "ar";
    align-items: center;
    column-gap: 0.4rem;
    row-gap: 0.22rem;
    margin-bottom: 0;
    padding-bottom: 0.18rem;
    border-bottom: none;
  }
  .field > .field-label-bilingual > .field-label-primary {
    grid-area: title;
    width: 100%;
    min-width: 0;
  }
  .lesson-entry-body #lesson-form .field > .field-label-bilingual > .field-label-primary > .field-en,
  .lesson-entry-body #lesson-form .field > .field-label-bilingual > .field-en {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: var(--lm-title);
    line-height: 1.25;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .lesson-entry-body #lesson-form .field > .field-label-bilingual > .field-ar {
    grid-area: ar;
    display: block;
    width: 100%;
    max-width: none;
    margin-top: 0;
    font-size: var(--lm-body);
    line-height: var(--lm-leading);
    text-align: start;
  }
  .field > .field-label-bilingual > .ubd-field-meta-actions {
    grid-area: badge;
    justify-self: start;
    width: 100%;
    max-width: 100%;
  }
  .field > .field-label-bilingual > .ubd-field-meta-actions .ubd-field-source-badge:not(.hidden) {
    justify-self: start;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    width: auto;
    height: auto;
    padding: 0.1rem 0.38rem 0.1rem 0.28rem;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    border-radius: 999px;
    font-size: var(--lm-caption);
    font-weight: 600;
    line-height: 1.2;
    vertical-align: middle;
  }
  .field > .field-label-bilingual > .ubd-field-meta-actions .ubd-field-source-badge:not(.hidden) .ubd-field-source-badge__label {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .field > .field-label-bilingual > .ubd-field-meta-actions .ubd-field-source-badge:not(.hidden) .ubd-field-source-badge__icon {
    display: inline-flex;
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    align-items: center;
    justify-content: center;
  }
  .field > .field-label-bilingual > .ubd-field-meta-actions .ubd-field-source-badge:not(.hidden) .ubd-field-source-badge__icon svg {
    width: 11px;
    height: 11px;
  }
  .lesson-entry-body #lesson-form .field.ubd-field > .field-label-bilingual .ubd-edit-btn {
    display: none;
  }
  .lesson-entry-body #lesson-form .field.ubd-field > .ubd-field-body {
    margin-top: 0;
    padding: 0.28rem 0 0.35rem;
    border-top: 1px solid #dce3ec;
    font-size: var(--lm-body);
    line-height: var(--lm-leading);
    color: var(--text);
  }
  .lesson-entry-body #lesson-form .ubd-read {
    font-size: inherit;
    line-height: inherit;
    padding: 0.05rem 0 0.15rem;
  }
  .lesson-entry-body #lesson-form .ubd-read-text,
  .lesson-entry-body #lesson-form .ubd-read-list,
  .lesson-entry-body #lesson-form .ubd-read-list li,
  .lesson-entry-body #lesson-form .ubd-read .ubd-prefixed-label,
  .lesson-entry-body #lesson-form .ubd-read-list .ubd-prefixed-label,
  .lesson-entry-body #lesson-form .ubd-activity-heading,
  .lesson-entry-body #lesson-form .ubd-activity-heading-main,
  .lesson-entry-body #lesson-form .ubd-activity-num,
  .lesson-entry-body #lesson-form .ubd-activity-type-line,
  .lesson-entry-body #lesson-form .ubd-activity-type,
  .lesson-entry-body #lesson-form .ubd-activity-subtitle,
  .lesson-entry-body #lesson-form .ubd-activity-narrative,
  .lesson-entry-body #lesson-form .ubd-activity-bullets,
  .lesson-entry-body #lesson-form .ubd-activity-bullets li,
  .lesson-entry-body #lesson-form .ubd-literacy-strand-list li,
  .lesson-entry-body #lesson-form .ubd-vocab-table,
  .lesson-entry-body #lesson-form .ubd-empty,
  .lesson-entry-body #lesson-form .ubd-standard-code {
    font-size: inherit;
    line-height: inherit;
  }
  .lesson-entry-body #lesson-form .ubd-read-list {
    padding-left: 1rem;
  }
  .lesson-entry-body #lesson-form .ubd-read-list li {
    margin-bottom: 0.32rem;
    line-height: 1.55;
  }
  .lesson-entry-body #lesson-form .ubd-read-text {
    line-height: 1.55;
  }
  .lesson-entry-body #lesson-form .ubd-activities-read {
    gap: 0.55rem;
  }
  .lesson-entry-body #lesson-form .ubd-activity-heading {
    margin-bottom: 0.25rem;
  }
  .lesson-entry-body #lesson-form .ubd-activity-narrative {
    margin-bottom: 0.22rem;
  }
  .lesson-entry-body #lesson-form .ubd-activity-bullets {
    padding-left: 1rem;
  }
  .lesson-entry-body #lesson-form .ubd-activity-bullets li {
    margin-bottom: 0.18rem;
  }
  .lesson-entry-body #lesson-form .ubd-literacy-read {
    gap: 0.55rem;
  }
  .lesson-entry-body #lesson-form .ubd-literacy-strand {
    font-size: var(--lm-caption);
    line-height: var(--lm-leading);
    margin-bottom: 0.22rem;
  }
  .lesson-entry-body #lesson-form .ubd-literacy-vocab-title {
    font-size: var(--lm-body);
    line-height: var(--lm-leading);
  }
  .lesson-entry-body #lesson-form .ubd-vocab-table th {
    font-size: var(--lm-caption);
  }
  .lesson-entry-body #lesson-form details.advanced {
    margin-top: 0.45rem;
    font-size: var(--lm-caption);
    line-height: var(--lm-leading);
  }
  .lesson-entry-body #lesson-form details.advanced summary {
    font-size: var(--lm-caption);
    font-weight: 600;
    padding: 0.2rem 0;
  }
  .lesson-entry-body #lesson-form #lesson-json {
    font-size: var(--lm-caption);
    margin-top: 0.25rem;
  }
  .lesson-entry-body #lesson-form .lesson-form-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.35rem;
    margin-top: 0.5rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
    align-items: stretch;
  }
  .lesson-entry-body #lesson-form .lesson-form-actions-primary,
  .lesson-entry-body #lesson-form .lesson-form-delete-idle {
    display: contents;
  }
  .lesson-entry-body #lesson-form .lesson-form-actions-row .lesson-form-tool-btn,
  .lesson-entry-body #lesson-form .lesson-form-actions-row .lesson-form-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.45rem;
    font-size: var(--lm-body);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    border-radius: var(--radius-btn);
  }
  .lesson-entry-body #lesson-form .lesson-form-actions-row .lesson-form-tool-btn {
    font-size: var(--lm-caption);
    font-weight: 600;
    padding: 0.36rem 0.4rem;
  }
  .lesson-entry-body #lesson-form #refresh-ubd {
    grid-column: 1;
    grid-row: 1;
  }
  .lesson-entry-body #lesson-form #normalize-lesson-format {
    grid-column: 2;
    grid-row: 1;
  }
  .lesson-entry-body #lesson-form [data-action="lesson-delete-start"] {
    grid-column: 1;
    grid-row: 2;
  }
  .lesson-entry-body #lesson-form #lesson-form-approve-slot,
  .lesson-entry-body #lesson-form #approve-lesson,
  .lesson-entry-body #lesson-form #lesson-form-approved-next {
    grid-column: 2;
    grid-row: 2;
  }
  .lesson-entry-body #lesson-form #approve-lesson {
    font-weight: 700;
  }
  .lesson-entry-body #lesson-form .lesson-form-delete-confirm {
    margin-top: 0.45rem;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius-surface);
    border: 1px solid #e8b4b4;
    background: #fff8f8;
    font-size: var(--lm-body);
  }
  .lesson-entry-body #lesson-form .lesson-form-delete-confirm .actions {
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.35rem;
  }
  .lesson-entry-body #lesson-form .lesson-form-delete-confirm .actions button {
    min-height: 0;
    padding: 0.34rem 0.65rem;
    font-size: var(--lm-caption);
  }
  .lesson-entry-body #lesson-form .lesson-status-msg {
    font-size: var(--lm-caption);
    margin-top: 0.3rem;
  }
}
.ubd-read {
  font-size: var(--atlas-type-md);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  padding: 0.35rem 0.15rem 0.5rem;
  border-radius: var(--radius-surface);
  cursor: pointer;
}
.ubd-read:hover,
.ubd-read:focus-visible {
  background: #f8fafc;
  outline: 2px solid var(--border);
  outline-offset: 2px;
}
.ubd-read-text {
  margin: 0;
  white-space: pre-wrap;
}
.ubd-read-list {
  margin: 0;
  padding-left: 1.2rem;
}
.ubd-read-list li {
  margin: 0 0 0.4rem;
  line-height: 1.5;
}
.ubd-read .ubd-prefixed-label,
.ubd-read-list .ubd-prefixed-label {
  font-weight: 700;
  color: #0f172a;
}
.ubd-literacy-read {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.ubd-literacy-strand-block {
  margin: 0;
}
.ubd-literacy-strand {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand, #1e3a8a);
}
.ubd-literacy-strand-list {
  margin: 0;
  padding-left: 1.15rem;
  list-style: disc;
}
.ubd-literacy-strand-list li {
  margin: 0 0 0.35rem;
  line-height: 1.5;
}
.ubd-literacy-vocab-block {
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.ubd-literacy-vocab-title {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: var(--atlas-type-md);
}
.ubd-vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--atlas-type-md);
  margin-top: 0.25rem;
}
.ubd-vocab-table th,
.ubd-vocab-table td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}
.ubd-vocab-table th {
  font-weight: 600;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
}
.ubd-vocab-term {
  font-weight: 700;
}
.ubd-activities-read {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ubd-activity-block {
  margin: 0;
}
.ubd-activity-heading {
  display: block;
  margin: 0 0 0.45rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.ubd-activity-heading-main {
  display: inline;
  max-width: 100%;
}
.ubd-activity-num {
  font-size: var(--atlas-type-xl);
  font-weight: 800;
  color: var(--brand, #1e3a8a);
  flex-shrink: 0;
}
.ubd-activity-type-line {
  display: inline;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand, #1e3a8a);
}
.ubd-activity-type-line .ubd-activity-type {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.ubd-activity-subtitle {
  display: inline;
  margin: 0 0 0 0.2rem;
  padding: 0;
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  line-height: inherit;
  color: var(--muted);
  white-space: normal;
}
.ubd-activity-type {
  font-weight: 700;
  color: var(--brand, #1e3a8a);
}
.ubd-activity-title-sep {
  margin-right: 0.35rem;
  font-weight: 500;
  color: var(--muted);
}
.ubd-activity-narrative {
  margin: 0 0 0.35rem;
  line-height: 1.55;
  color: var(--text);
}
.ubd-activity-bullets {
  margin: 0.15rem 0 0;
  padding-left: 1.15rem;
  list-style: disc;
}
.ubd-activity-bullets li {
  margin: 0 0 0.3rem;
  line-height: 1.5;
}
.ubd-standard-code {
  font-weight: 700;
  color: var(--brand, #1e3a8a);
}
.ubd-empty {
  margin: 0;
  font-size: var(--atlas-type-sm);
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
.ubd-empty-hint {
  font-style: normal;
  font-weight: 500;
}
.ubd-field .ubd-edit.hidden {
  display: none;
}
.ubd-field.is-editing .ubd-edit {
  display: block;
}
.ubd-edit-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0.2rem 0 0.25rem;
}
.ubd-edit-toolbar.hidden {
  display: none;
}
.ubd-done-btn {
  font-size: var(--atlas-type-xs);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.ubd-done-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.field-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}
.field-icon { width: 1rem; height: 1rem; color: var(--muted); flex-shrink: 0; }
.field-atlas.is-editing textarea { border-left: 3px solid var(--accent); }
.field-outcome.is-editing textarea { border-left: 3px solid #0d9488; }
.field-criteria.is-editing textarea { border-left: 3px solid #7c3aed; }
.slide-assets-panel {
  margin: 0.65rem 0 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fafbfc;
}
.slide-assets-title {
  margin: 0 0 0.25rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
}
.slide-assets-hint { margin: 0 0 0.5rem; }
.slide-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}
.slide-thumb-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.slide-thumb-cell img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.slide-thumb-num {
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-align: center;
  padding: 0.2rem;
  background: #f1f5f9;
}
.slide-thumb-btn {
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  display: block;
  width: 100%;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.lightbox.hidden { display: none; }
body.lightbox-open { overflow: hidden; }
.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(96vw, 1100px);
  max-height: 78vh;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-surface);
  background: #f4f4f5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.lightbox-stage--svg,
.lightbox-stage--png {
  background: #f8f9fa;
}
.lightbox-img {
  max-width: min(92vw, 1060px);
  max-height: calc(78vh - 2.5rem);
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.lightbox-stage--svg .lightbox-img,
.lightbox-stage--png .lightbox-img {
  padding: 0.35rem 0.5rem;
}
.lightbox-caption {
  margin: 0.75rem 0 0;
  color: #e2e8f0;
  font-size: var(--atlas-type-md);
  text-align: center;
  max-width: 40rem;
}
.lightbox-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  max-width: min(96vw, 640px);
}
.lightbox-actions.hidden {
  display: none;
}
.lightbox-source-link {
  color: #e2e8f0;
  text-decoration: underline;
  font-size: var(--atlas-type-sm);
}
.lightbox-source-link:hover {
  color: #fff;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  line-height: 1;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.lightbox-close svg {
  width: 1.75rem;
  height: 1.75rem;
}
.ai-media-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
}
.ai-media-thumb {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 6.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
}
.ai-media-thumb img {
  width: 100%;
  height: 4.2rem;
  object-fit: cover;
}
.ai-media-label {
  font-size: var(--atlas-type-2xs);
  padding: 0.2rem 0.25rem;
  line-height: 1.2;
  text-align: left;
  color: var(--muted);
}
.job-ai-media {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}
.job-ai-media-title { margin: 0 0 0.35rem; font-size: var(--atlas-type-sm); }
#ubd-template-settings .settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  width: 100%;
}
#ubd-template-settings .settings-card-head .ubd-template-heading {
  flex: 1 1 auto;
  min-width: 0;
}
#ubd-template-settings .settings-card-head #ubd-schema-refresh {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0.1rem;
  white-space: nowrap;
}
#ubd-template-settings .ubd-schema-editor {
  margin: 0.75rem 0 0;
  max-height: min(28rem, 52vh);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fff;
  padding: 0;
  min-height: 12rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table {
  table-layout: fixed;
  margin: 0;
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-drag { width: 1.85rem; }
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-req { width: 2.1rem; }
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-section { width: auto; min-width: 11rem; }
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-toggle { width: 3.5rem; }
#ubd-template-settings .ubd-schema-editor .schema-editor-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  font-weight: 600;
  font-size: var(--atlas-type-2xs);
  line-height: 1.2;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  box-shadow: 0 1px 0 var(--border), 0 4px 10px -6px rgba(15, 23, 42, 0.2);
}
.schema-editor-table th.schema-bulk-th {
  padding: 0.35rem 0.2rem 0.45rem;
}
.schema-editor-table .schema-th-label {
  display: block;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  margin-bottom: 0.08rem;
  line-height: 1.15;
}
.schema-editor-table .schema-th-hint {
  display: block;
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  line-height: 1.2;
  color: var(--muted);
  margin-bottom: 0.22rem;
  max-width: 4.5rem;
  margin-left: auto;
  margin-right: auto;
}
.schema-editor-table .schema-th-legend-link {
  display: block;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.22rem;
  max-width: 4.5rem;
  margin-left: auto;
  margin-right: auto;
}
.schema-editor-table .schema-th-legend-link:hover {
  text-decoration: underline;
}
.ubd-column-legend {
  margin: 0.35rem 0 0.65rem;
  font-size: var(--atlas-type-xs);
  color: var(--text);
}
.ubd-column-legend summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.ubd-column-legend-list {
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.45rem 1rem;
}
@media (min-width: 640px) {
  .ubd-column-legend-list {
    grid-template-columns: 1fr 1fr;
  }
}
.ubd-column-legend-list > div {
  margin: 0;
}
.ubd-column-legend-list dt {
  font-weight: 700;
  font-size: var(--atlas-type-xs);
  margin: 0 0 0.12rem;
}
.ubd-column-legend-list dd {
  margin: 0;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  line-height: 1.4;
}
.schema-editor-table .schema-bulk-check {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  accent-color: var(--accent);
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-drag,
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-required,
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-toggle,
#ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-drag,
#ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-required,
#ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-toggle {
  text-align: center;
  vertical-align: middle;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-section,
#ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-section {
  text-align: left;
  vertical-align: middle;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tbody td {
  padding: 0.42rem 0.12rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tbody tr.schema-field-row:hover td {
  background: #f8fafc;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .col-section {
  padding: 0.42rem 0.5rem 0.42rem 0.1rem;
  overflow-wrap: normal;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table thead th.col-section {
  padding-left: 0.1rem;
  padding-right: 0.5rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table thead th.col-drag,
#ubd-template-settings .ubd-schema-editor .schema-editor-table thead th.col-required {
  padding-left: 0.06rem;
  padding-right: 0.06rem;
}
.schema-field-label {
  display: block;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  color: var(--text);
  line-height: 1.35;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-field-label,
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-field-label--child {
  white-space: nowrap;
}
.schema-field-ar {
  display: block;
  margin-top: 0.12rem;
  line-height: 1.3;
}
.schema-editor-table .col-toggle {
  text-align: center;
  padding: 0.42rem 0.08rem;
}
.schema-editor-table .col-required {
  width: 2.1rem;
  text-align: center;
  padding: 0.42rem 0.04rem;
}
.schema-editor-table .col-required input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  accent-color: var(--accent);
}
.schema-editor-table .col-drag {
  width: 1.85rem;
  text-align: center;
  padding: 0.35rem 0.02rem;
  vertical-align: middle;
}
.schema-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0.15rem 0.1rem;
  font-size: var(--atlas-type-sm);
  font-weight: var(--atlas-weight-bold);
  letter-spacing: -0.04em;
  line-height: 1;
  color: #64748b;
  cursor: grab;
  user-select: none;
  border-radius: 4px;
}
.schema-drag-handle:hover {
  color: var(--accent);
  background: rgba(15, 23, 42, 0.04);
}
.schema-field-row.schema-row-dragging {
  opacity: 0.92;
  background: rgba(59, 130, 246, 0.08);
}
.schema-field-row.schema-row-drag-over td {
  box-shadow: inset 0 2px 0 var(--accent);
}
.schema-field-row--off .schema-field-label {
  color: var(--muted);
  font-weight: 500;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-field-row--child .col-section {
  padding-left: 0.55rem;
  padding-right: 0.5rem;
  border-left: 3px solid rgba(24, 88, 168, 0.18);
}
.schema-field-label--child {
  display: block;
  font-weight: 600;
  font-size: var(--atlas-type-xs);
  color: var(--text);
}
.schema-field-sub {
  display: block;
  font-size: var(--atlas-type-2xs);
  margin-top: 0.08rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td {
  position: sticky;
  top: 2.85rem;
  z-index: 4;
  padding: 0.4rem 0.25rem;
  border-bottom: 1px solid var(--border);
  background: #eef2f7;
  box-shadow: 0 1px 0 var(--border);
  vertical-align: middle;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-section {
  padding-left: 0.1rem;
  padding-right: 0.5rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header .schema-bulk-check {
  opacity: 0.92;
}
.schema-stage-title {
  font-size: var(--atlas-type-sm);
  font-weight: 700;
  color: var(--text);
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-stage-title {
  white-space: nowrap;
}
.schema-stage-ar {
  display: inline-block;
  margin-left: 0.5rem;
  font-weight: 400;
}
.schema-drag-hint {
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.06em;
}
.schema-editor-table .col-toggle input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
  accent-color: var(--accent);
}

/* Must fill header — centered like output columns */
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-required {
  text-align: center;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-required .schema-th-label,
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-required .schema-th-hint {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 4.5rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-required .schema-bulk-check {
  margin-left: auto;
  margin-right: auto;
}
/* In app / PDF / Skip fill headers — centered labels over checkboxes */
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-toggle {
  text-align: center;
  padding-left: 0.05rem;
  padding-right: 0.05rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-toggle .schema-th-label,
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-toggle .schema-th-hint,
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-toggle .schema-th-legend-link {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 4.5rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.schema-bulk-th.col-toggle .schema-bulk-check {
  margin-left: auto;
  margin-right: auto;
}

#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-required,
#ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-required {
  text-align: center;
  padding-left: 0.04rem;
  padding-right: 0.04rem;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table .col-required input[type="checkbox"],
#ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-required .schema-bulk-check {
  margin-left: auto;
  margin-right: auto;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-required,
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-toggle {
  text-align: center;
}
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-required .schema-bulk-check,
#ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-toggle .schema-bulk-check {
  margin-left: auto;
  margin-right: auto;
}
/* Desktop — section absorbs spare width; checkbox columns stay compact as a group */
@media (min-width: 721px) {
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-drag {
    width: 1.85rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-toggle {
    width: 3.5rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-req {
    width: 2.1rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-section {
    min-width: 14rem;
  }
}

/* Field layout editor — mobile: keep table UI, scroll inside panel (no page bleed) */
@media (max-width: 720px) {
  #ubd-template-settings {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 0.85rem 0.7rem;
  }
  #ubd-template-settings #ubd-template-lead {
    font-size: var(--atlas-type-xs);
    line-height: 1.42;
    margin: 0.3rem 0 0.45rem;
  }
  #ubd-template-settings .ubd-column-legend {
    margin: 0.2rem 0 0.4rem;
    font-size: var(--atlas-type-xs);
  }
  #ubd-template-settings .settings-card-head .ubd-template-heading {
    font-size: var(--atlas-type-md);
    line-height: 1.3;
  }
  #ubd-template-settings .settings-card-head #ubd-schema-refresh {
    font-size: var(--atlas-type-xs);
    padding: 0.28rem 0.55rem;
  }
  #ubd-template-settings .ubd-schema-editor {
    max-height: min(50vh, 26rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius-surface);
    background: #fff;
    width: 100%;
    max-width: 100%;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table {
    min-width: 26.5rem;
    width: 100%;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-drag { width: 1.65rem; }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-req { width: 2rem; }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-toggle { width: 3.1rem; }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table thead th {
    padding: 0.38rem 0.12rem;
    font-size: var(--atlas-type-2xs);
    top: 0;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td {
    top: 2.15rem;
    padding: 0.35rem 0.12rem;
  }
  .schema-editor-table .schema-th-hint {
    display: none;
  }
  .schema-editor-table .schema-th-label {
    font-size: var(--atlas-type-2xs);
    margin-bottom: 0.18rem;
    max-width: none;
  }
  .schema-editor-table th.schema-bulk-th {
    padding: 0.28rem 0.1rem 0.35rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table th.col-section,
  #ubd-template-settings .ubd-schema-editor .schema-editor-table td.col-section {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 2px 0 6px -4px rgba(15, 23, 42, 0.35);
    min-width: 5.25rem;
    max-width: 7.5rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-col-section {
    width: 7.5rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table thead th.col-section {
    z-index: 7;
    background: #f8fafc;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table tr.schema-stage-header td.col-section {
    z-index: 6;
    background: #eef2f7;
    box-shadow: 2px 0 6px -4px rgba(15, 23, 42, 0.2), 0 1px 0 var(--border);
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table tbody tr.schema-field-row:hover td.col-section {
    background: #f8fafc;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table tbody td {
    padding: 0.4rem 0.12rem;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-field-label,
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .schema-field-label--child {
    white-space: normal;
  }
  #ubd-template-settings .ubd-schema-editor .schema-editor-table .col-section {
    padding-left: 0.3rem;
    padding-right: 0.35rem;
  }
  .schema-field-label {
    font-size: var(--atlas-type-xs);
    line-height: 1.3;
  }
  .schema-field-label--child {
    font-size: var(--atlas-type-xs);
  }
  .schema-stage-title {
    font-size: var(--atlas-type-sm);
  }
  .schema-field-row--child .col-section {
    padding-left: 0.65rem;
  }
  .schema-editor-table .col-toggle input[type="checkbox"],
  .schema-editor-table .col-required input[type="checkbox"],
  .schema-editor-table .schema-bulk-check {
    width: 1.12rem;
    height: 1.12rem;
  }
  .schema-drag-handle {
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0.2rem 0.1rem;
    font-size: var(--atlas-type-sm);
    touch-action: none;
  }
}

#ubd-template-settings .ubd-template-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
}
#ubd-template-settings .ubd-template-status {
  flex: 1 1 auto;
  margin: 0.35rem 0 0;
  min-width: 0;
  line-height: 1.35;
}
#ubd-template-settings .ubd-template-status:empty {
  display: none;
  margin: 0;
}
@media (max-width: 720px) {
  #ubd-template-settings .ubd-template-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.45rem;
    margin-bottom: 0;
  }
  #ubd-template-settings .ubd-template-actions button {
    width: 100%;
    justify-content: center;
  }
  #ubd-template-settings .ubd-template-status {
    flex: none;
    width: 100%;
    margin: 0.15rem 0 0;
    text-align: left;
    font-size: var(--atlas-type-xs);
  }
}
#ubd-template-settings .ubd-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
#ubd-template-settings .ubd-preset-row .field {
  flex: 1 1 14rem;
  margin: 0;
}
.ubd-template-builder { margin-top: 1.25rem; border-top: 1px solid var(--border, #e5e7eb); padding-top: 0.75rem; }
.ubd-template-builder-body { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ubd-template-list { list-style: none; margin: 0; padding: 0; }
.ubd-template-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.ubd-template-list-actions { display: flex; gap: 0.75rem; }
.checkbox-field { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-field input { width: auto; }
.slide-report { margin-top: 0.25rem; }
.slide-report-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.slide-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.5rem 0.65rem 0.55rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.slide-card-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.slide-card-body {
  display: flow-root;
  min-height: 0;
}
.slide-card-media {
  float: left;
  width: clamp(6.75rem, 26%, 8.75rem);
  margin: 0 0.6rem 0.25rem 0;
}
.slide-card-media .slide-thumb-btn {
  width: 100%;
}
.slide-card-media .slide-thumb {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}
.slide-card-copy {
  font-size: var(--atlas-type-sm);
  line-height: 1.42;
  min-width: 0;
}
.slide-card-no-media .slide-card-copy {
  margin-left: 0;
}
.slide-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
}
.slide-card-title { margin: 0; font-size: var(--atlas-type-sm); font-weight: 600; color: var(--text); }
.vision-tag {
  display: inline-block;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 0.3rem;
}
.slide-preview-bullets {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  font-size: var(--atlas-type-xs);
  color: var(--text);
}
.slide-preview-bullets li { margin: 0.08rem 0; }
.slide-num { color: var(--accent); margin-right: 0.25rem; }
.slide-thumb {
  border: 1px solid var(--border);
  background: #f8fafc;
}
@media (max-width: 520px) {
  .slide-card-media {
    width: 5.25rem;
    margin-right: 0.45rem;
  }
}
.slide-extract {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: var(--atlas-type-sm);
  margin: 0;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 14rem;
  overflow: auto;
}
.slide-source-details {
  margin: 0.35rem 0 0.15rem;
}
.slide-source-summary {
  cursor: pointer;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.slide-source-summary::-webkit-details-marker { display: none; }
.lesson-source-text-meta .lesson-source-text-lead { margin: 0 0 0.35rem; }
.lesson-source-preview-details { margin: 0.35rem 0 0; }
.lesson-source-preview-summary {
  cursor: pointer;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
}
.lesson-source-text-actions { margin: 0.5rem 0 0; }
.slide-transcript-warn { margin: 0.25rem 0 0.35rem; font-size: var(--atlas-type-xs); }
.slide-extract--warn { border-color: #f59e0b; background: #fffbeb; }
.slide-notes { font-size: var(--atlas-type-sm); margin: 0.5rem 0 0; }
.slide-summary {
  margin: 0 0 0.2rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.4;
  color: var(--text);
  font-weight: 500;
}
.slide-vision {
  margin: 0.3rem 0 0;
  padding: 0.35rem 0.45rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.38;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 6px;
  border-left: 2px solid #cbd5e1;
}
.vision-tag {
  display: inline-block;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background: #e2e8f0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: 0.05em;
}
a.button-link {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
a.button-link.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
a.button-link:hover { filter: brightness(1.05); }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  color: var(--muted);
}
.icon-btn:hover { background: #e8eef5; color: var(--text); }
.icon-btn.danger:hover { background: #fce8e8; color: #a32020; }
.icon-btn svg { width: 1.15rem; height: 1.15rem; pointer-events: none; }
.lesson-entry-actions .icon-btn:disabled,
.lesson-entry-actions .icon-btn.is-busy {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
.lesson-status-msg.message-box {
  margin-top: 0.75rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
}
.lesson-list-msg {
  margin: 0.35rem 0 0.5rem;
  font-weight: 600;
}
.lesson-list-msg:empty,
.lesson-list-msg[hidden] {
  display: none;
}
.lesson-list-msg.err { color: #a32020; }
.lesson-list-msg.ok { color: var(--success); }
.lesson-list-msg.info,
.lesson-list-msg.busy {
  color: var(--brand-blue-hover);
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue-soft-border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.lesson-list-msg.busy + .lesson-entry.lesson-entry--rebuilding {
  margin-top: 0;
  border-color: var(--brand-blue-soft-border);
  border-radius: 0;
  box-shadow: 0 0 0 1px var(--brand-blue-soft-border);
}
.lesson-entry.lesson-entry--rebuilding > .lesson-entry-summary {
  background: #f8fafc;
}
.lesson-entry.lesson-entry--rebuilding + .lesson-rebuild-wait--stacked:not(.hidden) {
  margin-top: 0;
  margin-bottom: 0.85rem;
  border-radius: 0 0 10px 10px;
  border-top: none;
  position: static;
  box-shadow: none;
  padding-top: 0.65rem;
}
.lesson-list-msg.busy:has(+ .lesson-entry--rebuilding) {
  margin-bottom: 0;
  border-radius: 10px 10px 0 0;
  border-bottom-color: #dbeafe;
}
.lesson-rebuild-wait--stacked .lesson-rebuild-wait-lead {
  margin-top: 0;
}
.lesson-rebuild-ui-home {
  display: none;
}
.lesson-rebuild-activity__host:not(.hidden) {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dbeafe;
}
.lesson-rebuild-activity__host .import-wait-detail,
.lesson-rebuild-activity__host .import-wait-tech {
  margin: 0.35rem 0 0;
}
body.lesson-rebuild-active #lesson-form {
  opacity: 0.72;
  pointer-events: none;
}
body.lesson-rebuild-active #lesson-form::before {
  content: "Rebuild running — fields refresh when finished";
  display: block;
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue-soft-border);
  color: #1e3a8a;
  font-weight: 700;
  font-size: var(--atlas-type-sm);
}
.lesson-entry-actions .inline-del-label { font-size: var(--atlas-type-xs); font-weight: 600; color: #a32020; margin-right: 0.15rem; }
.lesson-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.panel-accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  overflow: hidden;
}
.panel-accordion-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: var(--atlas-type-md);
  padding: 0.85rem 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #f7f9fc;
  border-bottom: 1px solid transparent;
}
.panel-accordion[open] > .panel-accordion-summary { border-bottom-color: var(--border); }
.panel-accordion-summary::-webkit-details-marker { display: none; }
.panel-accordion-summary::before {
  content: "▸";
  color: var(--muted);
  font-size: var(--atlas-type-xs);
  margin-right: 0.4rem;
  transition: transform 0.15s;
}
.panel-accordion[open] > .panel-accordion-summary::before { transform: rotate(90deg); }
.panel-accordion-summary > span:first-child { flex: 1; display: flex; align-items: center; }
.count-badge {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.35rem;
}
.panel-accordion-meta {
  font-size: var(--atlas-type-xs);
  font-weight: 500;
  color: var(--muted);
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-accordion-body { padding: 0.85rem 1rem 1rem; }
.lesson-form-delete-confirm .actions { margin-top: 0.35rem; }
.lesson-form-actions-row {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 1rem;
}
.lesson-form-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}
.lesson-form-delete-idle {
  margin: 0;
  flex: 0 0 auto;
  order: -1;
}
.lesson-form-actions-row .lesson-form-tool-btn,
.lesson-form-actions-row .lesson-form-main-btn {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  line-height: 1.25;
  padding: 0.5rem 0.85rem;
}
.lesson-form-actions-row .lesson-form-tool-btn {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
}
.lesson-form-approve-slot {
  display: contents;
}
.lesson-form-approved-next {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
}
.lesson-form-approved-label {
  margin: 0;
  padding: 0.15rem 0.1rem 0;
  font-size: var(--atlas-type-sm);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--brand-green);
}
body.persona-non-teacher .lesson-form-approved-next .atlas-export-only {
  display: none;
}
@media (max-width: 720px) {
  .lesson-form-actions-row { flex-wrap: wrap; }
  .slides-split-expand-hint { display: none; }
  .slides-split-chevron-wrap { margin-left: auto; }
}
.status-pill {
  display: inline-block;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.status-pill.needs_review { background: var(--warn-bg); color: var(--warn); }
.status-pill.approved { background: var(--success-bg); color: var(--success); }
.status-pill.pending { background: #f0f0f0; color: var(--muted); }
.status-pill.rejected { background: #fdecea; color: #a32020; }
.empty-state { color: var(--muted); padding: 1rem 0; }
.advanced, .advanced-block { margin-top: 0.75rem; font-size: var(--atlas-type-sm); }
.advanced summary, .advanced-block summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  display: grid;
  gap: 0.25rem;
}
.job-card .job-title { font-weight: 600; }
.job-card .job-meta { font-size: var(--atlas-type-sm); color: var(--muted); }
.job-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.35rem; }
.job-list-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; margin-bottom: 0.35rem; }
.job-list-toolbar button.primary {
  background: var(--accent, var(--brand-blue));
  border-color: var(--accent, var(--brand-blue));
  color: #fff;
  font-weight: 600;
  min-height: 44px;
}
.job-list-toolbar button.primary:hover {
  background: var(--accent-hover, var(--brand-blue-hover));
  border-color: var(--accent-hover, var(--brand-blue-hover));
}
.activity-table-host { margin-top: 0.25rem; }
.activity-table-wrap { overflow-x: auto; }
.activity-table th {
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.activity-table .col-expand { width: 2.25rem; }
.activity-table thead .col-expand { padding-left: 0.25rem; padding-right: 0.25rem; }
.activity-table .col-actions { width: 5.75rem; text-align: right; }
.activity-row:hover td { background: #f8fafc; }
.activity-detail td {
  background: #f8fafc;
  padding: 0.35rem 0.55rem 0.45rem !important;
  border-bottom: 1px solid var(--border);
}
.activity-detail-inner { max-width: 100%; }
.activity-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 64rem;
}
.activity-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem 0.4rem;
  align-items: center;
}
.activity-detail-chip {
  display: inline-block;
  font-size: var(--atlas-type-xs);
  line-height: 1.3;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  max-width: 100%;
}
.activity-detail-fold {
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 0.2rem 0.45rem 0.3rem;
}
.activity-detail-fold > summary {
  cursor: pointer;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  padding: 0.2rem 0.1rem;
  list-style-position: outside;
}
.activity-detail-fold[open] > summary {
  margin-bottom: 0.25rem;
}
.activity-detail-fold-body {
  padding: 0 0.05rem 0.15rem;
}
.activity-detail-fold-body .hint {
  margin: 0.15rem 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.activity-detail-section--compact {
  margin-top: 0.15rem !important;
}
.activity-detail-section--compact .activity-detail-heading {
  font-size: var(--atlas-type-xs);
}
.activity-detail-issue {
  margin: 0.15rem 0 0;
  color: #a32020;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.activity-ai-calls--compact {
  font-size: var(--atlas-type-xs);
}
.activity-ai-calls--compact th,
.activity-ai-calls--compact td {
  padding: 0.22rem 0.35rem;
  vertical-align: top;
}
.activity-detail-prompt-details > summary {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
}
.activity-detail-prompt-label {
  margin: 0.35rem 0 0.1rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
}
.code-block--compact {
  max-height: 7rem;
  padding: 0.35rem 0.45rem;
  font-size: var(--atlas-type-2xs);
  margin: 0 0 0.25rem;
}
.activity-detail-progress { margin: 0; padding: 0.45rem 0.55rem; }
.activity-detail-progress .job-progress-lead,
.activity-detail-progress .import-wait-detail,
.activity-detail-progress .import-wait-slide,
.activity-detail-progress .import-wait-tech {
  margin: 0.2rem 0 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.activity-detail-progress strong {
  font-size: var(--atlas-type-sm);
}
.activity-detail-heading { margin: 0 0 0.2rem; font-size: var(--atlas-type-xs); font-weight: 700; }
.activity-detail-section { margin-top: 0.35rem; }
.activity-detail-section:first-of-type { margin-top: 0; }
@media (min-width: 900px) {
  .activity-detail-panel--folds {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.55rem;
    align-items: start;
  }
  .activity-detail-panel--folds > .activity-detail-chips,
  .activity-detail-panel--folds > .activity-detail-issue,
  .activity-detail-panel--folds > .activity-detail-section {
    grid-column: 1 / -1;
  }
}
.activity-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  line-height: 1;
  color: var(--muted);
}
.activity-expand svg {
  width: 1rem;
  height: 1rem;
}
.activity-expand:hover { background: #eef3fa; color: var(--text); }
.activity-row-actions { display: flex; flex-wrap: nowrap; gap: 0.15rem; justify-content: flex-end; align-items: center; }
.activity-token-summary { font-size: var(--atlas-type-xs); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.activity-col-when { text-align: right; white-space: nowrap; }
.activity-col-tokens { min-width: 0; }
.activity-col-task { min-width: 10rem; max-width: 18rem; }
.activity-row-compact,
.activity-row-compact__tokens {
  display: none;
}
.activity-row-task-title {
  font-weight: inherit;
}
.activity-col-status .status-pill { font-size: var(--atlas-type-xs); }
@media (min-width: 641px) {
  #view-queue .activity-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
  }
  #view-queue .activity-table thead {
    display: table-header-group;
  }
  #view-queue .activity-table tbody {
    display: table-row-group;
  }
  #view-queue tr.activity-row,
  #view-queue tr.activity-detail {
    display: table-row;
  }
  #view-queue tr.activity-row > td,
  #view-queue tr.activity-detail > td {
    display: table-cell;
    width: auto;
    max-width: none;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }
}
.progress-bar {
  height: 6px;
  background: #e8ecf2;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.progress-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
#view-settings .settings-admin-stack:has(> .panel:not(.hidden)) {
  margin-bottom: 1.15rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}
#view-settings .settings-admin-stack > .panel:last-child {
  margin-bottom: 0;
}
.services-status-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.services-status-card__lead {
  margin: 0.25rem 0 0.5rem;
  max-width: 42rem;
}
.services-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
}
.services-status-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.services-status-overall {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: var(--atlas-type-md);
}
.services-status-overall--ok { color: var(--success, #15803d); }
.services-status-overall--degraded { color: var(--warn, #b45309); }
.services-status-overall--down { color: var(--danger, #b91c1c); }
.services-status-summary {
  margin: 0 0 0.75rem;
  font-size: var(--atlas-type-sm);
}
.services-status-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 0.85rem 1rem;
}
.services-status-updated {
  margin: 0.75rem 0 0;
  font-size: var(--atlas-type-xs);
  text-align: right;
}
.svc-group {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 10px);
  padding: 0.65rem 0.75rem 0.55rem;
  border-left-width: 3px;
  border-left-color: var(--border, #e2e8f0);
}
.svc-group--ok { border-left-color: #16a34a; }
.svc-group--warn { border-left-color: #d97706; }
.svc-group--off { border-left-color: #94a3b8; }
.svc-group--err { border-left-color: #dc2626; }
.svc-group__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.svc-group__count {
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
.svc-group__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.svc-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.svc-row:last-child { border-bottom: none; padding-bottom: 0.15rem; }
.svc-row__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}
.svc-row__label {
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  flex: 1 1 auto;
  min-width: 6rem;
}
.svc-row__state {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  white-space: nowrap;
}
.svc-row__state--ok { background: #dcfce7; color: #15803d; }
.svc-row__state--warn { background: #fef3c7; color: #b45309; }
.svc-row__state--off { background: #f1f5f9; color: #64748b; }
.svc-row__state--err { background: #fee2e2; color: #b91c1c; }
.svc-row__detail {
  margin: 0.2rem 0 0 1.15rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.svc-row__detail--path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--atlas-type-2xs);
  line-height: 1.35;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.svc-row {
  min-width: 0;
}
.svc-group {
  min-width: 0;
  overflow-wrap: anywhere;
}
.services-status-card {
  min-width: 0;
  overflow-x: clip;
}
.svc-pill {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.svc-pill--ok { background: #16a34a; box-shadow: 0 0 0 2px #bbf7d0; }
.svc-pill--warn { background: #d97706; box-shadow: 0 0 0 2px #fde68a; }
.svc-pill--off { background: #94a3b8; box-shadow: 0 0 0 2px #e2e8f0; }
.svc-pill--err { background: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.account-services-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.5rem 0 0;
}
.status-line { margin: 0; font-size: var(--atlas-type-md); font-weight: 500; }
#profile-greeting,
#dashboard-greeting {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}
#dashboard-greeting {
  margin-top: 0.35rem;
  font-weight: 600;
  color: var(--text-muted, #4b5563);
}
#profile-greeting .profile-greeting-line,
#dashboard-greeting .profile-greeting-line {
  display: block;
}
.profile-grades-multi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.35rem;
  margin-top: 0.35rem;
  width: 100%;
}
.profile-grade-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.35rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: var(--atlas-type-xs);
  font-weight: 500;
  min-height: 2.1rem;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.profile-grade-chip.is-checked {
  border-color: var(--accent, #0284c7);
  background: #f0f9ff;
  box-shadow: 0 0 0 1px rgb(2 132 199 / 0.15);
}
.profile-grade-chip__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.profile-grade-chip__label {
  pointer-events: none;
  line-height: 1.2;
}
.profile-grade-default-field {
  margin-top: 1rem;
  margin-bottom: 0;
}
#profile-grade-default-wrap[hidden],
#profile-grade-default-wrap.hidden,
#profile-grades-multi-hint[hidden],
#profile-grades-multi-hint.hidden {
  display: none !important;
}
.profile-grade-single.hidden {
  display: none;
}
#ubd-template-heading.ubd-template-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
}
.ubd-template-heading-title {
  font-size: inherit;
  font-weight: inherit;
}
.ubd-template-heading-system {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}
.status-line.ok { color: var(--success); }
.status-line.warn { color: var(--warn); }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0; }
.badge {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.badge-ok { background: var(--success-bg); border-color: #b7dfc3; color: var(--success); }
.badge-warn { background: var(--warn-bg); border-color: #f0d4a8; color: var(--warn); }
.badge-muted { color: var(--muted); }
.meta-list { margin: 0; display: grid; gap: 0.65rem; }
.meta-list div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.5rem; font-size: var(--atlas-type-sm); }
.meta-list dt { margin: 0; color: var(--muted); font-weight: 500; }
.meta-list dd { margin: 0; word-break: break-word; font-size: var(--atlas-type-sm); }
.tool-chips { list-style: none; margin: 0.5rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tool-chips li {
  font-size: var(--atlas-type-2xs);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: #f0f0f0;
}
.status-banner { margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-surface); font-size: var(--atlas-type-sm); border: 1px solid var(--border); }
.status-banner.ok { background: var(--success-bg); }
.status-banner.err { background: #fdecea; }
.hidden { display: none !important; }
.ops-main { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.ops-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.ops-topbar .hint { margin-left: 0.5rem; font-weight: 400; font-size: var(--atlas-type-sm); }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: var(--atlas-type-sm);
}
.checkbox-field input { margin-top: 0.2rem; flex-shrink: 0; }
#profile-bloom-wrap .checkbox-field.profile-bloom-enable {
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 0.85rem;
  max-width: 42rem;
}
#profile-bloom-wrap .profile-bloom-enable input {
  margin-top: 0.2rem;
}
.profile-bloom-checkbox-copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
  line-height: 1.45;
  font-size: var(--atlas-type-sm);
  color: var(--text);
}
.profile-bloom-checkbox-copy__lead {
  font-size: var(--atlas-type-md);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.profile-bloom-checkbox-copy__where {
  color: var(--muted);
  font-size: var(--atlas-type-sm);
}
.profile-bloom-checkbox-copy__where strong {
  font-weight: 600;
  color: var(--text);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  font-size: var(--atlas-type-md);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(37, 99, 168, 0.25);
  border-color: var(--accent);
}
/* Sign-in page — matches main app chrome */
body.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.admin-user-form .primary {
  margin-top: 0.25rem;
}
.admin-user-form .field > .field-label {
  font-weight: 600;
  font-size: var(--atlas-type-sm);
}

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
body.login-page main.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  max-width: none;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
body.login-page main.login-shell.login-shell-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  justify-content: center;
  max-width: 1040px;
  margin: 0 auto;
}
.login-aside {
  padding: 0.5rem 0 0;
}
.login-eyebrow {
  margin: 0 0 0.5rem;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.login-aside-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text, #0f172a);
}
.login-aside-lead {
  margin: 0 0 1.35rem;
  font-size: var(--atlas-type-md);
  line-height: 1.5;
  color: var(--muted);
  max-width: 34ch;
}
.login-steps {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.login-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.login-step-num {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent);
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.login-step-text {
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  color: var(--text, #334155);
}
.login-trust {
  margin: 0 0 0.85rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.5;
  color: var(--muted);
  max-width: 38ch;
}
.login-browser-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: var(--atlas-type-xs);
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
@media (max-width: 820px) {
  body.login-page main.login-shell.login-shell-split {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-aside {
    order: -1;
    text-align: left;
    padding-bottom: 0.25rem;
  }
  .login-aside-lead,
  .login-trust {
    max-width: none;
  }
}
.login-card {
  width: 100%;
  max-width: 420px;
  margin: 0;
  box-shadow: 0 4px 24px rgba(26, 35, 50, 0.06);
}
.login-brand h1 {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xl);
  font-weight: 700;
}
.login-lead {
  margin: 0;
  font-size: var(--atlas-type-sm);
  color: var(--muted);
  line-height: 1.45;
}
.login-lead a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.login-lead a:hover { text-decoration: underline; }
.login-form {
  margin-top: 1.25rem;
}
.login-form .field:last-of-type {
  margin-bottom: 0.25rem;
}
.login-actions {
  margin-top: 1rem;
  flex-direction: column;
  align-items: stretch;
}
.login-submit {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: var(--atlas-type-md);
}
a.ghost {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a.ghost:hover {
  text-decoration: underline;
}
.user-bar a.ghost,
.user-bar button.ghost.user-bar-nav {
  font-size: var(--atlas-type-sm);
}
.user-bar button.ghost.user-bar-nav {
  border: none;
  padding: 0.12rem 0.35rem;
  color: var(--accent);
  font-weight: 500;
}
.user-bar button.ghost.user-bar-nav:hover {
  text-decoration: underline;
}
.footer {
  /* legacy class — use .site-footer--app */
}
@media (max-width: 800px) {
  .split, .settings-grid { grid-template-columns: 1fr; }
  .meta-list div { grid-template-columns: 1fr; }
  .workflow-step { font-size: var(--atlas-type-xs); padding: 0.55rem 0.65rem; }
  .lesson-split-fields,
  .lesson-split-panel #split-lesson-btn {
    max-width: 100%;
  }
}

/* Mobile — phones & small tablets */
@media (max-width: 640px) {
  main { padding: 1rem 0.85rem 1.75rem; }
  main#app {
    padding-left: 0.42rem;
    padding-right: 0.42rem;
  }
  main#app .view-title {
    font-size: var(--atlas-type-xl);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.28rem;
  }
  main#app .view-lead {
    font-size: var(--app-body);
    line-height: var(--app-leading);
    max-width: none;
    margin-bottom: 0.85rem;
    color: var(--muted);
  }
  main#app .hint:not(.inline-hint) {
    font-size: var(--app-caption);
    line-height: var(--app-leading);
    max-width: none;
    overflow-wrap: anywhere;
  }
  main#app .panel-heading {
    font-size: var(--app-title);
    line-height: 1.25;
  }
  main#app .field > span:first-child:not(.hint),
  main#app .field > .field-label {
    font-size: var(--app-title);
    line-height: 1.25;
  }
  main#app .field input,
  main#app .field select,
  main#app .field textarea {
    font-size: var(--app-body);
  }
  main#app .plain-steps,
  main#app .numbered-instruct {
    font-size: var(--app-body);
    line-height: var(--app-leading);
    padding-left: 1.1rem;
  }
  main#app .plain-steps li,
  main#app .numbered-instruct li {
    margin-bottom: 0.45rem;
  }
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > button,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > a.primary,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .primary,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .ghost,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-action,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-action-soft,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-refresh,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-files,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-danger,
  main#app .panel .actions:not(.lesson-form-delete-confirm .actions):not(.lesson-form-actions-row) > .btn-tone-danger-soft {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  main#app .hint.inline-hint {
    display: block;
    margin: 0.35rem 0 0;
  }
  /* App views — compact copy on small screens (Content Studio pattern) */
  #view-files,
  #view-queue,
  #view-settings,
  #view-account,
  #view-profile,
  #view-import {
    font-size: var(--app-body);
    line-height: var(--app-leading);
  }
  main#app #view-files > .view-lead,
  main#app #view-queue > .view-lead,
  main#app #view-settings > .view-lead,
  main#app #view-import > .view-lead,
  main#app #view-account > .view-lead,
  main#app #view-profile > .view-lead {
    font-size: var(--app-body);
    line-height: var(--app-leading);
  }
  main#app #view-files .files-view-panel__body > p.hint,
  main#app #view-files .panel > p.hint,
  main#app #view-queue .panel > p.hint,
  main#app #view-settings .panel > p.hint,
  main#app #view-settings .panel.instruct,
  main#app #view-settings .panel.instruct p,
  main#app #view-settings .plain-steps li {
    font-size: var(--app-body);
    line-height: var(--app-leading);
  }
  /* Help & setup — service status paths wrap on narrow screens */
  #view-settings .services-status-board {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
  }
  #view-settings .svc-row__head {
    width: 100%;
    min-width: 0;
  }
  #view-settings .svc-row__label {
    min-width: 0;
    flex: 1 1 5rem;
    overflow-wrap: anywhere;
  }
  #view-settings .svc-row__detail {
    margin-left: 0;
    padding-left: 1.1rem;
    box-sizing: border-box;
    width: 100%;
  }
  main#app #view-files .asset-card-title,
  main#app #view-files .asset-card-main strong,
  main#app #view-import .asset-card-title,
  main#app #view-import .asset-card-main strong {
    font-size: var(--app-title);
    font-weight: 700;
    line-height: 1.25;
  }
  main#app #view-files .asset-card-meta dt {
    font-size: var(--atlas-type-2xs);
  }
  main#app #view-files .asset-card-meta dd,
  main#app #view-import .asset-card-meta dd {
    font-size: var(--app-caption);
    line-height: var(--app-leading);
  }
  main#app #view-files .asset-card-meta {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  main#app #view-files .asset-card-main .hint,
  main#app #view-import .asset-card-main .hint {
    display: block;
    font-size: var(--app-caption);
    line-height: var(--app-leading);
    margin: 0.12rem 0 0;
  }
  main#app #view-queue .job-card .job-title {
    font-size: var(--app-title);
    line-height: 1.25;
  }
  main#app #view-queue .job-card .job-meta,
  main#app #view-queue .job-progress-lead,
  main#app #view-queue .job-progress-title,
  main#app #view-queue .usage-table,
  main#app #view-queue .usage-table th,
  main#app #view-queue .usage-table td {
    font-size: var(--app-caption);
    line-height: var(--app-leading);
  }
  main#app #view-settings .message-box,
  main#app #view-settings .message-box p {
    font-size: var(--app-body);
    line-height: var(--app-leading);
  }
  /* Usage & activity — compact cards (no horizontal scroll) */
  #view-queue .activity-table-wrap {
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
  }
  #view-queue .activity-table {
    display: block;
    width: 100%;
  }
  #view-queue .activity-table thead {
    display: none;
  }
  #view-queue .activity-table tbody {
    display: block;
    width: 100%;
  }
  #view-queue tr.activity-row {
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr) auto;
    grid-template-areas: "expand task actions";
    align-items: start;
    gap: 0.22rem 0.35rem;
    width: 100%;
    padding: 0.38rem 0.3rem 0.4rem 0.32rem;
    border-bottom: 1px solid var(--border);
    box-sizing: border-box;
  }
  #view-queue tr.activity-row > td {
    display: block;
    width: auto;
    max-width: 100%;
    border-bottom: none;
    padding: 0;
    min-width: 0;
  }
  #view-queue tr.activity-row:hover td {
    background: transparent;
  }
  #view-queue tr.activity-row > td.col-expand {
    grid-area: expand;
    width: 1.65rem;
    max-width: 1.65rem;
    justify-self: start;
    padding-top: 0.1rem;
  }
  #view-queue .activity-expand {
    width: 1.5rem;
    height: 1.5rem;
    min-width: 1.5rem;
  }
  #view-queue .activity-expand svg {
    width: 0.85rem;
    height: 0.85rem;
  }
  #view-queue tr.activity-row > td.activity-col-id,
  #view-queue tr.activity-row > td.activity-col-status,
  #view-queue tr.activity-row > td.activity-col-tokens,
  #view-queue tr.activity-row > td.activity-col-when {
    display: none !important;
  }
  #view-queue tr.activity-row > td.activity-col-task {
    grid-area: task;
    min-width: 0;
    max-width: none;
    line-height: 1.25;
  }
  #view-queue .activity-row-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.28rem;
    margin-bottom: 0.1rem;
    min-height: 1.25rem;
  }
  #view-queue .activity-row-compact__id,
  #view-queue .activity-row-compact__status,
  #view-queue .activity-row-compact__when {
    display: inline-flex;
    align-items: center;
    line-height: 1;
  }
  #view-queue .activity-row-compact__id {
    font-size: var(--atlas-type-2xs);
    font-weight: 700;
    color: var(--accent, #2563eb);
    font-variant-numeric: tabular-nums;
  }
  #view-queue .activity-row-compact__status .status-pill {
    margin: 0;
    font-size: var(--atlas-type-2xs);
    padding: 0.12rem 0.38rem;
    line-height: 1.15;
    white-space: nowrap;
    vertical-align: middle;
  }
  #view-queue .activity-row-compact__when {
    margin-left: auto;
    font-size: var(--atlas-type-2xs);
    white-space: nowrap;
    color: var(--muted);
  }
  #view-queue .activity-row-task-title {
    display: block;
    font-size: var(--atlas-type-xs);
    font-weight: 600;
    line-height: 1.28;
    overflow-wrap: anywhere;
  }
  #view-queue .activity-row-compact__tokens {
    display: block;
    margin-top: 0.1rem;
    font-size: var(--atlas-type-2xs);
    line-height: 1.25;
    color: var(--muted);
    overflow-wrap: anywhere;
  }
  #view-queue .activity-row-compact__tokens .activity-token-summary {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: var(--atlas-type-2xs);
  }
  #view-queue tr.activity-row > td.activity-col-actions {
    grid-area: actions;
    justify-self: end;
    align-self: start;
    padding-top: 0.05rem;
  }
  #view-queue .activity-row-actions {
    gap: 0.12rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  #view-queue .activity-row-actions .icon-btn {
    width: 1.85rem;
    height: 1.85rem;
    min-width: 1.85rem;
  }
  #view-queue .activity-row-actions .icon-btn svg {
    width: 0.9rem;
    height: 0.9rem;
  }
  #view-queue tr.activity-detail {
    display: block;
    width: 100%;
  }
  #view-queue tr.activity-detail > td {
    display: block;
    width: 100%;
    padding: 0.35rem 0.35rem 0.65rem !important;
    box-sizing: border-box;
  }
  #view-queue .activity-detail-inner {
    max-width: none;
  }
  #view-queue .activity-detail-panel--folds {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }
  #view-queue .activity-detail td {
    padding: 0.3rem 0.35rem 0.4rem !important;
  }
  /* Dashboard — match Step 2 lesson-browser density */
  .view-dashboard .view-lead {
    margin-bottom: 0.65rem;
  }
  .dashboard-hero {
    padding: 0.65rem 0.42rem 0.75rem;
    margin-bottom: 0.65rem;
  }
  .dashboard-hero-title {
    font-size: var(--atlas-type-lg);
    line-height: 1.28;
    margin-bottom: 0.35rem;
  }
  .dashboard-hero-text,
  .dashboard-hero-eyebrow {
    font-size: var(--app-body);
    line-height: var(--app-leading);
    max-width: none;
  }
  .dashboard-hero-text {
    margin-bottom: 0.65rem;
  }
  .dashboard-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .dashboard-hero-actions .primary,
  .dashboard-hero-actions .hero-secondary-btn {
    width: 100%;
    min-height: 44px;
    font-size: var(--app-body);
  }
  #view-dashboard .cards {
    gap: 0.45rem;
    margin-bottom: 0.65rem;
  }
  #view-dashboard .card {
    padding: 0.65rem 0.42rem;
  }
  .dashboard-stat-card__icon {
    font-size: var(--atlas-type-lg);
  }
  #view-dashboard .panel {
    padding: 0.65rem 0.42rem;
    margin-bottom: 0.65rem;
  }
  #view-dashboard .panel-heading,
  #view-dashboard .panel > h3:first-child {
    margin-bottom: 0.45rem;
  }
  .view-dashboard .card strong {
    font-size: var(--atlas-type-2xl);
  }
  .view-dashboard .card .label {
    font-size: var(--app-caption);
  }
  /* Step 3 — Atlas export workflow */
  #view-atlas .atlas-wf-progress {
    gap: 0.32rem;
    margin-bottom: 0.55rem;
  }
  #view-atlas .atlas-wf-pill {
    flex: 1 1 calc(50% - 0.2rem);
    min-width: 0;
    font-size: var(--app-caption);
    padding: 0.38rem 0.4rem;
    text-align: center;
    line-height: 1.2;
  }
  #view-atlas .atlas-wf-next {
    font-size: var(--app-body);
    line-height: var(--app-leading);
    margin-bottom: 0.65rem;
  }
  .atlas-step-head {
    --atlas-step-outdent: calc(2.15rem + 0.55rem);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "num titles";
    column-gap: 0.55rem;
    row-gap: 0.28rem;
    align-items: start;
    margin-bottom: 0.75rem;
  }
  .atlas-step-head .atlas-step-num {
    grid-area: num;
    width: 2.15rem;
    height: 2.15rem;
    font-size: var(--app-body);
  }
  .atlas-step-head .atlas-step-titles {
    grid-area: titles;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .atlas-step-head .atlas-step-title {
    font-size: var(--app-title);
    line-height: 1.25;
    font-weight: 700;
  }
  .atlas-step-head .atlas-step-lead {
    margin-top: 0.22rem;
    font-size: var(--app-body);
    line-height: var(--app-leading);
    max-width: none;
    width: 100%;
  }
  /* Steps 1 & 3 — form actions full panel width (not indented beside step num) */
  .atlas-step-connect .atlas-step-connect-field,
  .atlas-step-connect .atlas-step-connect-actions,
  .atlas-step-fill .atlas-fill-verify {
    margin-left: calc(-1 * var(--atlas-step-outdent));
    width: calc(100% + var(--atlas-step-outdent));
    max-width: none;
    box-sizing: border-box;
  }
  .atlas-step-connect .atlas-step-connect-field input {
    width: 100%;
    max-width: none;
  }
  .atlas-step-connect .atlas-step-connect-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .atlas-step-connect .atlas-step-connect-actions .primary {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
  }
  .atlas-step-fill .atlas-fill-verify .atlas-fill-check-hint {
    max-width: none;
  }
  .atlas-step-fill .atlas-fill-check-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .atlas-step-fill .atlas-fill-check-actions .primary {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
  }
  .atlas-step-title-row .atlas-step-badge {
    font-size: var(--app-caption);
    padding: 0.18rem 0.45rem;
    max-width: 11rem;
    overflow-wrap: anywhere;
    text-align: right;
  }
  .atlas-step-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "num text";
    column-gap: 0.55rem;
    row-gap: 0.28rem;
    align-items: start;
  }
  .atlas-step-summary > .atlas-step-num {
    grid-area: num;
    width: 2.15rem;
    height: 2.15rem;
    font-size: var(--app-body);
  }
  .atlas-step-summary-text {
    grid-area: text;
    min-width: 0;
    max-width: 100%;
    font-size: var(--app-title);
    line-height: 1.25;
  }
  .atlas-step-summary-text .hint {
    font-size: var(--app-caption);
    margin-top: 0.12rem;
  }
  .atlas-step-summary-title-row .atlas-step-badge {
    font-size: var(--app-caption);
  }
  .atlas-step .atlas-bookmarklet {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: var(--app-body);
    padding: 0.6rem 0.85rem;
  }
  .atlas-bridge-src-code {
    font-size: var(--app-caption);
    line-height: 1.35;
  }
  .import-steps-hint {
    font-size: var(--app-body);
    line-height: var(--app-leading);
  }
  .topbar-app:not(.topbar-site-shell) {
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.85rem;
  }
  .topbar-app .user-bar {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .workflow-bar {
    padding: 0.5rem 0.85rem 0.75rem;
    gap: 0.3rem;
  }
  .workflow-steps {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: clip;
    gap: 0.35rem;
    width: 100%;
  }
  .workflow-step {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0.45rem 0.35rem;
    font-size: var(--atlas-type-2xs);
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
  }
  .workflow-step .step-text {
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .workflow-step .step-text--full {
    display: none;
  }
  .workflow-step .step-text--short {
    display: inline;
  }
  .app-toolbar {
    padding: 0.12rem 0 0.02rem;
    min-height: 0;
  }
  .app-toolbar-nav {
    padding: 0 0.75rem 0;
    max-width: none;
  }
  .app-toolbar .nav-utility {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.28rem 0.15rem 0.38rem;
    min-height: 44px;
    font-size: var(--atlas-type-sm);
    font-weight: 600;
    text-align: center;
  }
  .app-toolbar .nav-lbl-full {
    display: none;
  }
  .app-toolbar .nav-lbl-short {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    line-height: 1.1;
    max-width: 100%;
    min-width: 0;
    order: 0;
  }
  .app-toolbar .nav-lbl-short--icon-only {
    gap: 0;
  }
  .app-toolbar .nav-lbl-text {
    display: block;
    font-size: var(--atlas-type-2xs);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .app-toolbar .nav-lbl-short .nav-lbl-icon {
    font-size: var(--atlas-type-xl);
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  }
  .app-toolbar .nav-utility.active .nav-lbl-text {
    font-weight: 700;
  }
  .app-toolbar .nav-utility.active .nav-lbl-short .nav-lbl-icon {
    font-variation-settings: "FILL" 1, "wght" 600, "GRAD" 0, "opsz" 24;
  }
  .app-toolbar .nav-utility[data-view="dashboard"].active .nav-lbl-icon {
    color: var(--accent, var(--brand-blue));
  }
  .app-toolbar .nav-utility.nav-featured.active .nav-lbl-icon,
  .app-toolbar .nav-utility[data-view="generator"].active .nav-lbl-icon {
    color: var(--brand-violet);
  }
  .app-toolbar .nav-utility[data-view="files"].active .nav-lbl-icon {
    color: var(--brand-orange);
  }
  .app-toolbar .nav-utility[data-view="teaching"].active .nav-lbl-icon {
    color: var(--brand-blue-hover);
  }
  .app-toolbar .nav-utility[data-view="settings"].active .nav-lbl-icon {
    color: var(--brand-green);
  }
  .app-toolbar .nav-utility[data-view="study-history"].active .nav-lbl-icon {
    color: var(--brand-green);
  }
  #view-generator,
  #content-tab-deck,
  .generator-studio-grid,
  .generator-studio__brief,
  .generator-studio__output,
  .generator-deck-panel {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  #view-generator .text-input,
  #view-generator select,
  #view-generator textarea {
    max-width: 100%;
    min-width: 0;
  }
  .gen-bridge-full {
    display: none;
  }
  .gen-bridge-short {
    display: inline;
  }
  .generator-workflow-bridge {
    font-size: var(--atlas-type-xs);
    overflow-wrap: anywhere;
  }
  .generator-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
  }
  .generator-stepper__item {
    padding: 0.4rem 0.3rem;
    font-size: var(--atlas-type-2xs);
    gap: 0.35rem;
    align-items: flex-start;
    min-width: 0;
  }
  .generator-stepper__item--active {
    padding: calc(0.4rem - 1px) calc(0.3rem - 1px);
  }
  .generator-stepper__item .hint {
    display: none;
  }
  .gen-step-lbl-full {
    display: none;
  }
  .gen-step-lbl-short {
    display: inline;
  }
  .generator-deck-panel__head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .generator-deck-panel__head .panel-heading {
    margin: 0;
    font-size: var(--atlas-type-md);
  }
  .generator-view-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .generator-view-toggle__btn {
    font-size: var(--atlas-type-2xs);
    padding: 0.35rem 0.2rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    min-width: 0;
  }
  .gen-view-lbl-full {
    display: none;
  }
  .gen-view-lbl-short {
    display: inline;
  }
  .generator-deck-panel .generator-deck-viewer {
    gap: 0.55rem;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    align-self: stretch;
  }
  .generator-deck-viewer #generator-deck-stage {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    min-height: min(52vw, 14rem);
    max-height: min(58vh, 22rem);
    box-sizing: border-box;
  }
  .generator-deck-carousel__nav {
    width: 100%;
    max-width: 100%;
    gap: 0.5rem;
    padding: 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
  }
  .generator-deck-carousel__nav .generator-deck-carousel__btn {
    min-height: 44px;
    width: 100%;
    font-size: var(--atlas-type-md);
  }
  .generator-deck-viewer .generator-slide-canvas {
    padding: 0.5rem 0.55rem 2rem;
    height: 100%;
  }
  .generator-slide-canvas__layout {
    flex-direction: column;
    gap: 0.45rem;
  }
  .generator-slide-canvas__media {
    max-width: 100%;
  }
  .generator-submit-btn__sub {
    font-size: var(--atlas-type-2xs);
    line-height: 1.2;
  }
  #content-tab-deck {
    padding-bottom: 4.25rem;
  }
  #content-tab-deck .generator-action-dock:not([hidden]) {
    position: fixed;
    left: 0.85rem;
    right: 0.85rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    width: auto;
    margin: 0;
    z-index: 45;
  }
  .asset-card-main,
  .asset-card-title,
  .asset-card-main strong {
    min-width: 0;
    max-width: 100%;
  }
  .asset-card-actions--row,
  .asset-card-actions--upload {
    max-width: 100%;
    justify-content: flex-start;
  }
  .asset-card-actions:not(.asset-card-actions--upload):not(.asset-card-actions--row) {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .asset-card-actions--upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.5rem 2.5rem;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    align-self: stretch;
    overflow: visible;
    padding-top: 0.15rem;
  }
  .asset-card-actions--row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    align-self: stretch;
    overflow: visible;
    padding-top: 0.15rem;
  }
  .asset-card-actions .asset-card-btn,
  .asset-card-actions .button-link {
    min-height: 2.5rem;
    height: auto;
    font-size: var(--atlas-type-2xs);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.35rem 0.4rem;
    white-space: normal;
    line-height: 1.15;
  }
  .asset-card-actions--upload .asset-card-btn--step2 {
    white-space: nowrap;
  }
  .asset-card-actions--upload .asset-card-btn--icon,
  .asset-card-actions--row .asset-card-btn--icon {
    width: 2.5rem;
    max-width: 2.5rem;
    min-width: 2.5rem;
    justify-self: end;
  }
  .asset-card-actions .asset-btn-lbl-full {
    display: none;
  }
  .asset-card-actions .asset-btn-lbl-short {
    display: inline;
  }
  .deck-preview-panel {
    width: 100%;
    max-width: 100%;
    margin: 0;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .deck-preview-modal {
    padding: 0;
    align-items: stretch;
  }
  .deck-preview-slides {
    max-height: calc(100dvh - 10rem);
  }
  .file-drop { padding: 1.25rem 1rem; }
  .file-choose-btn,
  .callout .primary,
  .callout-generator .primary-lg {
    width: 100%;
    min-height: 48px;
  }
  .callout-generator { padding: 1.1rem 1rem; }
  .panel {
    padding: 0.75rem 0.5rem;
    margin-bottom: 0.75rem;
  }
  .view-header-row { flex-direction: column; }
  .atlas-send-actions { flex-direction: column; }
  .atlas-send-actions button { width: 100%; min-height: 44px; }
  .usage-table-wrap { margin-left: -0.25rem; margin-right: -0.25rem; }
  .lightbox-img {
    max-width: 96vw;
    max-height: 70dvh;
  }
  .lightbox-close {
    min-width: 44px;
    min-height: 44px;
    top: 0.5rem;
    right: 0.5rem;
  }
  .split-head {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 0.55rem;
    row-gap: 0.15rem;
  }
  .split-head .split-icon {
    grid-row: 1;
    align-self: center;
    width: 2.15rem;
    height: 2.15rem;
  }
  .split-head .split-icon svg {
    width: 1.15rem;
    height: 1.15rem;
  }
  .split-head .split-title {
    align-self: center;
  }
  .split-head .split-lead,
  .split-head .planning-layout-hint {
    grid-column: 1 / -1;
  }
  .split-head .split-lead {
    grid-row: 2;
    margin-top: 0.1rem;
  }
  .split-head .planning-layout-hint {
    grid-row: 3;
  }
  .split-head .split-pdf {
    grid-column: 1 / -1;
    grid-row: 4;
    width: 100%;
    justify-self: stretch;
  }
  .lesson-entry-body #lesson-form .slides-split-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "icon title hint chevron"
      "lead lead lead lead";
    align-items: center;
    column-gap: 0.55rem;
    row-gap: 0.12rem;
    padding: 0.35rem 0.28rem 0.35rem 0.35rem;
  }
  .lesson-entry-body #lesson-form .slides-split-summary .split-icon-slides {
    grid-area: icon;
    width: 2.15rem;
    height: 2.15rem;
    align-self: center;
    flex-shrink: 0;
  }
  .lesson-entry-body #lesson-form .slides-split-summary .split-icon-slides svg {
    width: 1.15rem;
    height: 1.15rem;
  }
  .lesson-entry-body #lesson-form .slides-split-summary-text {
    display: contents;
  }
  .lesson-entry-body #lesson-form .slides-split-summary .split-title {
    grid-area: title;
    align-self: center;
    font-size: var(--lm-title, var(--atlas-type-lg));
    line-height: 1.25;
  }
  .lesson-entry-body #lesson-form .slides-split-summary .split-lead {
    grid-area: lead;
    margin: 0;
    font-size: var(--lm-caption, var(--atlas-type-xs));
    line-height: 1.35;
  }
  .lesson-entry-body #lesson-form .slides-split-expand-hint {
    grid-area: hint;
    margin-left: 0;
    flex-shrink: 0;
    font-size: var(--atlas-type-2xs);
    padding: 0.18rem 0.42rem;
  }
  .lesson-entry-body #lesson-form .slides-split-chevron-wrap {
    grid-area: chevron;
    margin-left: 0;
    width: 1.65rem;
    height: 1.65rem;
    flex-shrink: 0;
  }
}

@media (pointer: coarse) {
  button,
  .button-link,
  .workflow-step,
  .file-choose-btn,
  .user-menu-item {
    min-height: 44px;
  }
  input[type="file"] + label,
  select.text-input,
  input.text-input,
  textarea.text-input {
    font-size: 16px;
  }
}

.admin-user-history {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.admin-user-history.hidden {
  display: none;
}
.admin-history-subhead {
  margin: 1rem 0 0.5rem;
  font-size: var(--atlas-type-md);
  font-weight: 600;
}
.admin-user-history-account {
  margin: 0.5rem 0 0.85rem;
}
.admin-user-history-account .account-stat {
  min-width: 0;
}
.mono-hint {
  font-family: ui-monospace, monospace;
  font-size: var(--atlas-type-xs);
  word-break: break-all;
}

.content-studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  overflow-x: clip;
  max-width: 100%;
}
.content-studio-tabs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.38rem 0.82rem;
  border: 2px solid #cbd5e1;
  background: #fff;
  border-radius: var(--radius-btn);
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
  box-sizing: border-box;
}
.content-studio-tabs__lbl-full,
.content-studio-tabs__lbl-short {
  font-weight: 600;
}
.content-studio-tabs__lbl-short {
  display: none;
}
/* Content studio: icon + short label grid (phones & narrow tablets) */
@media (max-width: 768px) {
  .content-studio-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    overflow-x: visible;
  }
  .content-studio-tabs__lbl-full {
    display: none;
  }
  .content-studio-tabs__lbl-short {
    display: inline;
    font-size: var(--atlas-type-xs);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .content-studio-tabs__btn {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.85rem;
    padding: 0.55rem 0.5rem;
    white-space: nowrap;
    text-align: center;
    border-radius: var(--radius-btn);
    flex: 1 1 auto;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }
  .content-studio-tabs__btn--active .content-studio-tabs__lbl-short {
    color: var(--brand-violet-hover);
  }
  .content-studio-tabs__btn--active {
    border: 2px solid var(--brand-violet);
    box-shadow: 0 1px 4px var(--brand-violet-soft);
  }
  .content-studio-tabs__icon {
    margin-right: 0;
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    color: #475569;
  }
  .content-studio-tabs__btn--active .content-studio-tabs__icon {
    color: var(--brand-violet);
  }
  .content-studio-tabs__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.25;
  }
}
@media (min-width: 721px) {
  .content-studio-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}
@media (min-width: 769px) {
  .content-studio-tabs {
    display: flex;
  }
}
.content-studio-tabs__btn:hover:not(.content-studio-tabs__btn--active) {
  border-color: #94a3b8;
}
.content-studio-tabs__btn--active {
  border: 2px solid var(--brand-violet);
  background: var(--brand-violet-soft);
  color: var(--brand-violet-hover);
}
.content-studio-tab-panel.hidden {
  display: none;
}
.figure-search-outcome .figure-search-results,
.lesson-video-outcome .lesson-video-results-host {
  margin-top: 0.35rem;
}
.figure-search-outcome:has(#figure-search-results-commercial:not(:empty)) .figure-search-empty-state,
.figure-search-outcome:has(#figure-search-results-nc:not(:empty)) .figure-search-empty-state {
  display: none;
}
.lesson-video-outcome:has(#lesson-video-search-results:not(:empty)) .lesson-video-empty-state,
.lesson-video-outcome:has(#videos-content-library .content-studio-library__item) .lesson-video-empty-state {
  display: none;
}
.content-studio-library__head--videos {
  margin-top: 0;
}
.figure-search-empty-state,
.lesson-video-empty-state {
  margin: 0 0 0.75rem;
}
.figure-search-context {
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: var(--atlas-type-sm);
}
.figure-search-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.45rem;
  min-height: 0.25rem;
}
.figure-search-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius-btn);
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: var(--atlas-type-xs);
}
.figure-search-keyword-chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: var(--atlas-type-md);
  line-height: 1;
  padding: 0;
  color: #64748b;
}
.figure-search-keyword-chip--context {
  border-style: dashed;
  background: #f1f5f9;
  color: #475569;
  font-weight: 500;
  padding-right: 0.35rem;
}
.figure-search-keyword-chip__label {
  margin-right: 0.15rem;
}
.figure-search-keyword-chip__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0 0 0.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: #64748b;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}
.figure-search-keyword-chip__close:hover,
.figure-search-keyword-chip__close:focus-visible {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}
.figure-search-keyword-chip__close {
  font-size: var(--atlas-type-lg);
  line-height: 1;
  font-weight: 400;
}
.figure-search-presets__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  width: 100%;
}
.figure-search-preset-btn {
  font-size: var(--atlas-type-xs);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-btn);
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}
.figure-search-preset-btn:hover {
  border-color: var(--accent, #c2410c);
  background: var(--accent-soft, #ffedd5);
}
.figure-search-keywords-clear {
  font-size: var(--atlas-type-xs);
  margin-left: 0.5rem;
  font-weight: 500;
}
.figure-search-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.5rem;
}
.figure-search-saved {
  margin: 0 0 1rem;
  font-size: var(--atlas-type-sm);
}
.figure-search-saved-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.figure-saved-gallery {
  margin: 0 0 1rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid #e2e8f0;
}
.figure-saved-gallery__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.figure-saved-gallery__title {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 600;
}
.figure-saved-gallery__lead {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-xs);
}
.figure-saved-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 0.65rem;
}
.figure-saved-gallery__item--editing .figure-saved-gallery__thumb {
  border-color: var(--accent, #0d95f5);
  box-shadow:
    0 0 0 2px rgba(13, 149, 245, 0.35),
    0 0 14px rgba(13, 149, 245, 0.55);
  background: #fff;
}
.figure-saved-gallery__item--editing .figure-saved-gallery__edit {
  color: var(--accent, #0d95f5);
  font-weight: 600;
}
.figure-saved-gallery__thumb {
  display: block;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.25rem;
  background: #f8fafc;
  cursor: zoom-in;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.figure-saved-gallery__thumb img {
  display: block;
  width: 100%;
  height: 68px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
}
.figure-saved-gallery__label {
  margin: 0.2rem 0 0;
  font-size: var(--atlas-type-2xs);
  line-height: 1.25;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.figure-saved-gallery__nc {
  display: block;
  font-size: var(--atlas-type-2xs);
  color: #b45309;
  font-weight: 600;
}
.figure-saved-gallery__edit {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  font-size: var(--atlas-type-2xs);
  padding: 0.2rem 0.35rem;
}
.figure-saved-edit {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.figure-saved-edit__title {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
}
.figure-saved-edit__lead {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-xs);
}
.figure-saved-edit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  margin-top: 0.65rem;
}
.figure-search-saved-item {
  font-size: var(--atlas-type-xs);
  padding: 0.35rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  max-width: 12rem;
}
.figure-search-card__actions {
  margin-top: 0.4rem;
}
.figure-search-card__actions button {
  font-size: var(--atlas-type-2xs);
  padding: 0.25rem 0.5rem;
}
.figure-search-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.85rem;
}
.figure-search-presets__label {
  width: 100%;
  margin: 0 0 0.15rem;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #475569;
}
.figure-search-preset {
  font-size: var(--atlas-type-xs);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}
.figure-search-preset:hover {
  border-color: var(--accent, #c2410c);
  background: var(--accent-soft, #ffedd5);
}
.figure-search-snippets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}
.figure-search-snippet-card {
  border: 1px solid var(--brand-blue-soft-border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  background: var(--brand-blue-soft);
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  cursor: pointer;
}
.figure-search-snippet-card:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}
.figure-search-snippet-card__thumb {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  flex-shrink: 0;
}
.figure-search-snippet-card img {
  width: 5.5rem;
  height: 4rem;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  pointer-events: none;
}
.figure-search-snippet-card__body {
  flex: 1;
  min-width: 0;
}
.figure-search-snippet-card__hint {
  margin: 0.25rem 0 0.35rem;
}
.figure-search-snippet-card__save {
  font-size: var(--atlas-type-xs);
  padding: 0.2rem 0.45rem;
}
.figure-search-form__grid {
  margin-bottom: 0.5rem;
  row-gap: 0.45rem;
}
.figure-search-form__grid .figure-search-source-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: start;
}
.figure-search-form__grid .figure-search-source-field__control {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}
.figure-search-form__grid .figure-search-visual-field {
  align-self: start;
}
.figure-search-form__grid > .figure-search-source-hint.field-wide {
  grid-column: 1 / -1;
  margin: -0.15rem 0 0;
  padding: 0;
  font-size: var(--atlas-type-2xs);
  line-height: 1.32;
  color: var(--muted);
  max-width: none;
}
.figure-search-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0;
}
.figure-search-nc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  cursor: pointer;
}
.figure-search-queries {
  font-size: var(--atlas-type-xs);
  color: #64748b;
  word-break: break-word;
}
.figure-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.figure-search-results--nc {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #cbd5e1;
}
.figure-search-results__heading {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #475569;
}
.lesson-topic-figures {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 8px;
  background: var(--panel-muted, #f8fafc);
}
.lesson-topic-figures__title {
  margin: 0 0 0.25rem;
  font-size: var(--atlas-type-md);
  font-weight: 600;
}
.lesson-topic-figures__lead {
  margin: 0 0 0.75rem;
}
.lesson-topic-figures__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.lesson-topic-figures__card {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  max-width: 280px;
  padding: 0.5rem;
  border-radius: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--border-subtle, #e2e8f0);
}
.lesson-topic-figures__thumb {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}
.lesson-topic-figures__thumb img {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
}
.lesson-topic-figures__body {
  flex: 1;
  min-width: 0;
}
.lesson-topic-figures__title {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.3;
}
.lesson-topic-figures__remove {
  font-size: var(--atlas-type-xs);
  padding: 0.15rem 0.35rem;
}

.figure-search-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.figure-search-card--best {
  border-color: #86efac;
  box-shadow: 0 0 0 1px #bbf7d0;
}
.figure-search-card__badge {
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-transform: uppercase;
  color: #047857;
  margin-left: 0.35rem;
}
.figure-search-card--nc {
  opacity: 0.72;
}
.figure-search-card__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  overflow: hidden;
  cursor: zoom-in;
}
.figure-search-card__thumb img {
  background: #fff;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.figure-search-card__body {
  padding: 0.5rem 0.65rem 0.65rem;
  font-size: var(--atlas-type-xs);
}
.figure-search-card__title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  line-height: 1.25;
}
.figure-search-card__meta {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-2xs);
  color: #64748b;
}
.figure-search-card__license--nc {
  color: #b45309;
}
.figure-search-card__license--ok {
  color: #047857;
}
.figure-search-card__attr {
  margin: 0;
  font-size: var(--atlas-type-2xs);
  color: #475569;
  line-height: 1.35;
}
.content-figure-enrich-hint {
  margin-top: 0.35rem;
  color: #b45309;
}
.content-qtypes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  border: none;
  padding: 0;
  margin: 0 0 0.75rem;
}
.content-qtype {
  font-size: var(--atlas-type-sm);
}
.content-editor-list {
  margin-top: 1rem;
}
.content-editor-item {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.content-quiz-preview {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}
.content-quiz-preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.content-quiz-preview__pager {
  font-size: var(--atlas-type-xs);
  color: var(--muted);
  font-weight: 600;
}
.content-quiz-preview__opts {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
.content-quiz-preview__opt--correct {
  font-weight: 700;
  color: #047857;
}
.content-quiz-preview__answer .content-quiz-preview__opt--correct {
  display: inline;
}
.content-quiz-edit-mcq {
  border: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.content-quiz-edit-mcq legend {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.content-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  color: #94a3b8;
  cursor: grab;
  border-radius: 6px;
  touch-action: none;
}
.content-drag-handle:active {
  cursor: grabbing;
}
.content-drag-handle--option {
  width: 1.5rem;
  height: 1.5rem;
}
.content-drag-handle .ui-icon--grip {
  width: 1.1rem;
  height: 1.1rem;
}
.content-editor-item--quiz.content-dragging,
.content-quiz-edit-option.content-dragging {
  opacity: 0.55;
}
.content-editor-item--quiz.content-drag-over .content-item-card__summary,
.content-quiz-edit-option.content-drag-over {
  outline: 2px dashed var(--accent, #c2410c);
  outline-offset: 2px;
  border-radius: 8px;
}
.content-item-card__summary-top .content-drag-handle {
  margin-right: 0.15rem;
}
.content-qtype-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.25rem;
  width: 100%;
}
.content-qtype-picker__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 4.5rem;
  padding: 0.45rem 0.35rem;
  font-size: var(--atlas-type-2xs);
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
}
.content-qtype-picker__opt:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.content-qtype-picker__opt--active {
  border-color: var(--accent, #c2410c);
  background: var(--accent-soft, #ffedd5);
  color: #9a3412;
}
.content-qtype-picker__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}
.content-qtype-picker__lbl {
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
@media (max-width: 520px) {
  .content-qtype-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .content-qtype-picker__opt {
    min-height: 5rem;
    font-size: var(--atlas-type-xs);
  }
}
.content-item-card__meta-field--type {
  grid-column: 1 / -1;
}
.content-quiz-type-select--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.content-quiz-item-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0.35rem;
}
.content-quiz-item-btn--icon svg {
  width: 1.15rem;
  height: 1.15rem;
}
.content-quiz-edit-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: 8px;
}
.content-quiz-edit-option:focus-within {
  background: #fff;
  border-color: #d1d9e3;
}
.content-quiz-edit-option .text-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.35rem 0.25rem;
  font-size: var(--atlas-type-md);
}
.content-quiz-edit-tf {
  display: flex;
  gap: 1rem;
  margin-top: 0.35rem;
  font-size: var(--atlas-type-sm);
}
.content-quiz-edit-tf label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.content-quiz-edit-lead {
  margin: 0.35rem 0 0.5rem;
  font-size: var(--atlas-type-xs);
}
.content-quiz-item-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.content-quiz-item-toolbar__label {
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  color: var(--muted);
  min-width: 1.75rem;
}
.content-quiz-type-select {
  max-width: 11rem;
  font-size: var(--atlas-type-sm);
}
.content-quiz-item-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: auto;
}
.content-quiz-item-btn {
  min-width: 2.25rem;
  padding: 0.25rem 0.45rem;
  font-size: var(--atlas-type-xs);
}
.content-quiz-item-btn--danger:not(:disabled) {
  color: #b91c1c;
}
.content-quiz-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #e2e8f0);
}
.content-quiz-add-row__type {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--muted);
}
.content-quiz-pair-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}
.content-quiz-pair-row .text-input {
  flex: 1;
  min-width: 0;
}
.content-quiz-pair-arrow {
  color: var(--muted);
  font-size: var(--atlas-type-sm);
}
.content-item-card {
  margin-bottom: 0.55rem;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  background: #f9fafb;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.content-item-card:hover {
  border-color: #dce3ec;
}
.content-item-card[open] {
  background: #fff;
  border-color: #c7d2e0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.content-item-card__summary {
  display: block;
  padding: 0.6rem 0.85rem 0.65rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--atlas-type-sm);
}
.content-item-card__summary::-webkit-details-marker {
  display: none;
}
.content-item-card__head,
.content-item-card__summary-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}
.content-item-card__chev {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  flex-shrink: 0;
  transition: transform 0.15s;
  margin-right: 0.15rem;
}
.content-item-card[open] .content-item-card__chev {
  transform: rotate(45deg);
}
.content-item-card__title {
  font-weight: 700;
  color: var(--text, #0f172a);
}
.content-item-card__type {
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: #475569;
  padding: 0.12rem 0.5rem;
  background: #eef2f6;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  white-space: nowrap;
}
.content-item-card__marks-hint {
  margin-left: auto;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  padding: 0.12rem 0.45rem;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 999px;
}
.content-item-card__peek {
  display: block;
  width: 100%;
  margin: 0.55rem 0 0;
  padding: 0.55rem 0.65rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  color: #334155;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
}
.content-item-card__peek:empty {
  display: none;
}
.content-item-card[open] .content-item-card__peek {
  display: none;
}
.content-item-card__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.content-item-card__meta {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1.35fr) minmax(4.5rem, 5.5rem) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
}
.content-item-card__meta-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  margin: 0;
}
.content-item-card__meta-field .field-label {
  margin: 0;
}
.content-item-card__meta-field .content-quiz-type-select {
  width: 100%;
  max-width: none;
  font-size: var(--atlas-type-xs);
}
.content-item-card__meta-field.content-quiz-marks-field {
  flex-direction: column;
  align-items: stretch;
}
.content-item-card__meta-field .content-quiz-marks-input {
  width: 100%;
  min-width: 0;
  padding: 0.4rem 0.45rem;
}
.content-item-card__meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  justify-content: flex-end;
  align-self: end;
}
@media (max-width: 520px) {
  .content-item-card__meta {
    grid-template-columns: 1fr 1fr;
  }
  .content-item-card__meta-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
.content-item-card__body {
  padding: 0.25rem 0.85rem 0.9rem;
  border-top: 1px solid #eef1f5;
}
.content-item-card__body .field {
  margin-bottom: 0.65rem;
}
.content-item-card__body .field-label {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.01em;
}
.content-prompt-field .content-prompt-tap-hint {
  margin: 0.15rem 0 0.35rem;
  font-size: var(--atlas-type-2xs);
}
.content-prompt-field.is-editing .content-prompt-tap-hint {
  display: none;
}
.content-prompt-field .content-prompt-body {
  margin-top: 0.15rem;
}
.content-prompt-field .content-prompt-read {
  font-size: var(--atlas-type-md);
  padding: 0.35rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.content-prompt-field .content-prompt-read-text {
  margin: 0;
  line-height: 1.45;
  color: #0f172a;
}
.content-prompt-field .content-prompt-read-strong {
  font-weight: 700;
  font-size: var(--atlas-type-lg);
  line-height: 1.4;
  color: #0f172a;
}
.content-prompt-field .content-prompt-read:hover .content-prompt-read-strong,
.content-prompt-field .content-prompt-read:focus-visible .content-prompt-read-strong {
  color: #1e3a5f;
}
.content-prompt-field.is-editing .content-prompt-read {
  display: none;
}
.content-prompt-field textarea.content-prompt-input.hidden {
  display: none;
}
.content-prompt-field.is-editing textarea.content-prompt-input {
  display: block;
}
.content-editor-list .content-prompt-input--soft,
.content-editor-list .content-field--soft textarea {
  border: 1px solid #e8ecf1 !important;
  background: #f8fafc !important;
  border-radius: 10px;
  padding: 0.65rem 0.75rem !important;
  font-size: var(--atlas-type-md);
  line-height: 1.5;
  color: #1e293b;
  box-shadow: none;
}
.content-editor-list .content-prompt-input--soft:focus,
.content-editor-list .content-field--soft textarea:focus {
  border-color: #c7d2e0 !important;
  background: #fff !important;
  outline: 2px solid rgba(59, 130, 246, 0.12);
  outline-offset: 0;
}
.content-editor-list select.text-input,
.content-editor-list input.text-input:not(.content-quiz-option-input):not(.content-prompt-input--soft) {
  border: 1px solid #e2e8f0;
  background: #fafbfc;
  border-radius: 8px;
  box-shadow: none;
  color: #334155;
}
.content-editor-list .content-quiz-blanks-input,
.content-editor-list .content-quiz-sample-input,
.content-editor-list .content-quiz-steps-input {
  border: 1px solid #e8ecf1 !important;
  background: #f8fafc !important;
  border-radius: 10px;
  box-shadow: none;
}
.content-editor-jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.65rem;
  background: #f1f5f9;
  border-radius: 10px;
  font-size: var(--atlas-type-xs);
}
.content-editor-jump__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  text-align: center;
  min-width: 0;
}
.content-editor-jump__label {
  font-weight: 600;
  color: #475569;
}
.content-editor-jump__marks {
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  color: #0f4c81;
  letter-spacing: 0.01em;
}
.content-editor-marks-summary {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.65rem;
  background: #f1f5f9;
  border-radius: 10px;
  font-size: var(--atlas-type-xs);
  color: #475569;
}
.content-editor-marks-summary strong,
.content-editor-marks-summary--solo {
  color: #0f4c81;
  font-weight: 700;
}
.content-editor-marks-summary__sub {
  display: block;
  margin-top: 0.2rem;
  font-size: var(--atlas-type-xs);
  font-weight: 500;
  color: #64748b;
}
.content-editor-jump__btn {
  font-size: var(--atlas-type-xs);
  padding: 0.3rem 0.55rem;
}
.content-quiz-edit-mcq legend {
  color: #64748b;
  font-weight: 500;
}
.content-item-card--prose .content-item-card__body {
  border-top: none;
  padding-top: 0;
}
.content-editor-item.content-item-card {
  border-bottom: none;
  padding-bottom: 0;
}
.content-editor-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 0.75rem 0 0.25rem;
  background: linear-gradient(transparent, #fff 35%);
}
.content-item-preview-hint {
  margin: 0.5rem 0 0;
  font-size: var(--atlas-type-xs);
}
.content-pack-edit-note {
  margin: 0.75rem 0 0;
}
.content-marks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.content-marks-hint {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-xs);
}
.content-marks-hint.hint--warn {
  color: var(--danger, #b42318);
}
.field-label-optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85em;
}
.content-quiz-marks-field:not(.content-item-card__meta-field) {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--atlas-type-xs);
  color: var(--muted);
}
.content-quiz-marks-field:not(.content-item-card__meta-field) .text-input {
  width: 3.5rem;
  padding: 0.25rem 0.35rem;
  font-size: var(--atlas-type-sm);
}
.item-marks {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92em;
}
.content-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.content-studio-tabs__icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.content-studio-tabs__icon svg {
  width: 100%;
  height: 100%;
}
.ui-icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.15em;
}
.ui-icon--pill {
  width: 1.2rem;
  height: 1.2rem;
}
.ui-icon--inline {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  margin-left: 0.2rem;
}
.mkt-contact-proof .ui-icon,
.mkt-premium-enterprise-chips .ui-icon {
  width: 1em;
  height: 1em;
  color: inherit;
}
.content-qtype-chip__icon {
  display: inline-flex;
  align-items: center;
  width: 1.1rem;
  height: 1.1rem;
}
.content-qtype-chip__icon svg {
  width: 100%;
  height: 100%;
}
.content-empty-state__icon {
  display: flex;
  justify-content: center;
  margin: 0 0 0.5rem;
}
.content-empty-state__icon svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--muted, #78716c);
}
.content-quiz-preview-actions button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.content-studio-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 960px) {
  .content-studio-layout {
    grid-template-columns: minmax(340px, 44%) minmax(0, 56%);
    align-items: start;
  }
  .content-studio-build {
    min-width: 0;
  }
  .content-studio-outcome {
    min-width: 0;
  }
}
@media (min-width: 1280px) {
  .content-studio-layout {
    grid-template-columns: minmax(380px, 40%) minmax(520px, 60%);
  }
}
.content-studio-outcome:has(.content-pdf-preview:not(.hidden)) {
  min-width: 0;
}
.content-studio-outcome:has(.content-pdf-preview:not(.hidden)) .content-pdf-preview__layout {
  min-height: 18rem;
}
.content-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
  font-size: var(--atlas-type-sm);
}
.content-flow-steps__item {
  appearance: none;
  font: inherit;
  cursor: pointer;
  color: var(--muted, #78716c);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-btn);
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  line-height: 1.2;
}
.content-flow-steps__item:hover:not(.content-flow-steps__item--active) {
  border-color: #cbd5e1;
  color: var(--text, #1e293b);
}
.content-flow-anchor {
  scroll-margin-top: 4.5rem;
}
.content-flow-anchor--pulse {
  animation: content-flow-anchor-pulse 1.2s ease;
}
@keyframes content-flow-anchor-pulse {
  0%,
  100% {
    box-shadow: none;
  }
  35% {
    box-shadow: 0 0 0 3px var(--accent-soft, #ffedd5);
  }
}
.content-flow-steps__item--active {
  border-color: var(--accent, #c2410c);
  background: var(--accent-soft, #ffedd5);
  color: var(--accent-dark, #9a3412);
  font-weight: 600;
}
.content-flow-steps__item--done {
  opacity: 0.75;
  text-decoration: line-through;
  text-decoration-color: rgba(0, 0, 0, 0.2);
}
#view-generator .content-studio-build > .panel-heading {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-md);
  line-height: 1.25;
}
#view-generator .content-studio-build > .hint.content-studio-tagline {
  margin: 0 0 0.85rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  max-width: 38rem;
}
.content-studio-tagline--figure-search,
.content-studio-tagline--lesson-video {
  margin-bottom: 0.85rem;
}
.lesson-video-search-topic-field {
  margin: 0 0 0.5rem;
}
.lesson-video-search-search-hint {
  margin: 0 0 0.75rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
}
.lesson-video-search-form > .figure-search-context {
  margin: 0 0 0.85rem;
}
.figure-search-keywords-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 0.85rem;
}
.figure-search-keywords-field > .field-label {
  margin-bottom: 0;
}
.figure-search-keywords-field .figure-search-keywords--search {
  margin: 0 0 0.25rem;
}
.figure-search-keywords-field .figure-search-keywords--context {
  margin: 0.35rem 0 0;
}
.figure-search-keywords-field .figure-search-keywords--search:empty,
.figure-search-keywords-field .figure-search-keywords--context:empty {
  display: none;
  margin: 0;
}
.figure-search-keywords-field__suggestions.figure-search-presets {
  margin: 0.35rem 0 0;
  gap: 0.35rem 0.45rem;
}
.figure-search-keywords-field__suggestions.figure-search-presets:empty,
.figure-search-keywords-field__suggestions.figure-search-presets.hidden {
  display: none;
  margin: 0;
}
.figure-search-form > .figure-search-context {
  margin: 0 0 0.85rem;
}
.content-brief-chip-row {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%);
  border: 1px solid #fed7aa;
  border-radius: 10px;
}
.content-brief-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.content-brief-chip {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: #fff;
  border-radius: 999px;
  font-size: var(--atlas-type-sm);
  border: 1px solid #e7e5e4;
}
.content-brief-chip--dismissible {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.15rem 0.15rem 0.15rem 0.65rem;
  max-width: 100%;
}
.content-brief-chip__label {
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.content-brief-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #57534e;
  font-size: var(--atlas-type-lg);
  line-height: 1;
  cursor: pointer;
}
.content-brief-chip__remove:hover,
.content-brief-chip__remove:focus-visible {
  background: #fde8e8;
  color: #b91c1c;
  outline: none;
}
.content-brief-chip--topic {
  font-weight: 600;
  border-color: var(--accent, #c2410c);
}
.item-bloom {
  font-size: 0.8em;
  color: #57534e;
  font-weight: 600;
}
.content-brief-expand {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border: 1px dashed #d6d3d1;
}
.content-build-section {
  margin-bottom: 1.25rem;
}
.content-build-section__title {
  margin: 0 0 0.5rem;
  font-size: var(--atlas-type-md);
}
.content-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.content-preset-btn {
  font-size: var(--atlas-type-xs);
  border-radius: var(--radius-btn);
}
.content-qtype-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.content-qtype-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-btn);
  border: 1px solid #e7e5e4;
  background: #fafaf9;
  font-size: var(--atlas-type-xs);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.content-qtype-chip:hover {
  transform: translateY(-1px);
  border-color: #fdba74;
}
.content-qtype-chip--on {
  background: var(--accent-soft, #ffedd5);
  border-color: var(--accent, #c2410c);
  font-weight: 600;
}
.content-generate-btn {
  width: 100%;
  margin-top: 0.5rem;
}
.content-studio-outcome {
  min-height: 12rem;
}
.content-pdf-preview {
  margin: 0 0 0.75rem;
}
.content-pdf-preview__shell {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.content-pdf-preview__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.7rem 0.85rem;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 60%);
  border-bottom: 1px solid #e2e8f0;
}
.content-pdf-preview__toolbar-text {
  flex: 1 1 100%;
  min-width: 0;
}
.content-pdf-preview__title {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
.content-pdf-preview__hint {
  margin: 0.2rem 0 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.content-pdf-preview__layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}
@media (min-width: 540px) {
  .content-pdf-preview__layout {
    flex-direction: row;
    align-items: stretch;
  }
  .content-pdf-preview__fonts {
    flex: 0 0 min(42%, 13.5rem);
    max-width: 13.75rem;
    border-right: 1px solid #f1f5f9;
  }
  .content-pdf-preview__paper {
    flex: 1 1 auto;
    min-width: 0;
  }
}
.content-pdf-preview__fonts {
  padding: 0.65rem 0.7rem 0.75rem;
  background: linear-gradient(180deg, #fafaf9 0%, #fff 40%);
}
.content-pdf-preview__fonts-lead {
  margin: 0 0 0.45rem;
  font-size: var(--atlas-type-2xs);
  line-height: 1.35;
}
.content-pdf-preview__fonts .content-typography-editor {
  border: none;
  padding: 0;
  background: transparent;
}
.content-pdf-preview__paper {
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.65rem 0.75rem;
  background: #e8eaed;
  background: linear-gradient(165deg, #d6d3d1 0%, #e7e5e4 35%, #f5f5f4 100%);
}
.content-pdf-preview__paper-label {
  margin: 0 0 0.4rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #57534e;
  text-align: center;
}
.content-pdf-preview__download {
  font-size: var(--atlas-type-xs);
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
}
.content-typography-editor {
  margin-top: 0;
  padding: 0.5rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.content-typography-editor__intro {
  margin-bottom: 0.5rem;
}
.content-typography-editor__title {
  margin: 0;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.content-typography-editor__lead {
  margin: 0.25rem 0 0;
  font-size: var(--atlas-type-xs);
}
.content-typography-editor__roles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.content-font-role {
  min-width: 0;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.content-font-role__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  list-style: none;
  font-size: var(--atlas-type-xs);
}
.content-font-role__summary::-webkit-details-marker {
  display: none;
}
.content-font-role__summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.15rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  transition: transform 0.15s;
}
.content-font-role[open] > .content-font-role__summary::before {
  transform: rotate(45deg);
}
.content-font-role__label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--atlas-type-2xs);
  color: #94a3b8;
  flex: 0 0 auto;
}
.content-font-role__current {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #9a3412;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-font-role__panel {
  padding: 0 0.55rem 0.5rem;
  border-top: 1px solid #f1f5f9;
}
.content-font-current__sample {
  margin: 0.4rem 0 0.45rem;
  padding: 0.35rem 0.45rem;
  font-size: var(--atlas-type-sm);
  line-height: 1.3;
  color: #0f172a;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 6px;
}
.content-font-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 10.5rem;
  overflow-y: auto;
  padding-right: 0.1rem;
}
.content-pdf-preview__fonts .content-font-list {
  max-height: 11.5rem;
}
.content-font-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  background: #fafaf9;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.content-font-pick__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.content-font-pick__name {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-font-pick__line {
  font-size: var(--atlas-type-2xs);
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-font-pick__ag {
  flex: 0 0 auto;
  width: 2.1rem;
  font-size: var(--atlas-type-xl);
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}
.content-font-pick:hover {
  border-color: #fdba74;
  background: #fff;
}
.content-font-pick--on {
  border-color: #c2410c;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #fdba74;
}
.content-pdf-preview__frame--pdf {
  min-height: 297mm;
}
.content-pdf-preview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.content-pdf-preview__viewport {
  width: 100%;
  height: min(58vh, 560px);
  min-height: 14rem;
  overflow: hidden;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  border: 1px solid rgba(120, 113, 108, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
@media (min-width: 960px) {
  .content-pdf-preview__viewport {
    height: min(62vh, 600px);
  }
}
.content-pdf-preview__stage {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  flex: 0 0 auto;
}
.content-pdf-preview__pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.content-pdf-preview__pages--single {
  gap: 0;
}
.content-pdf-preview__pages--single .content-pdf-preview__page {
  max-width: none;
  width: auto;
  height: auto;
  vertical-align: top;
}
.content-pdf-preview__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.45rem;
  padding: 0.25rem 0.35rem;
}
.content-pdf-preview__pager-btn {
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  font-size: var(--atlas-type-xl);
  line-height: 1;
  font-weight: 600;
}
.content-pdf-preview__pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.content-pdf-preview__pager-status {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #334155;
  min-width: 6.5rem;
  text-align: center;
}
.content-pdf-preview__page {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}
.content-pdf-preview__loading {
  margin: 1rem 0;
  text-align: center;
}
.content-pdf-preview__pages-cap-outside {
  margin: 0.45rem 0 0;
  padding: 0 0.25rem;
  text-align: center;
  font-size: var(--atlas-type-2xs);
  color: #57534e;
}
.content-pdf-preview__frame {
  display: block;
  width: min(100%, 210mm);
  max-width: 100%;
  box-sizing: border-box;
  min-height: 297mm;
  border: 0;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}
.content-pdf-preview__stage--iframe {
  width: 100%;
  max-width: 100%;
  transform: none !important;
  height: auto !important;
  margin: 0;
}
.content-pdf-preview__frame--embed {
  width: 100%;
  max-width: 100%;
  min-height: min(52vh, 480px);
  height: min(52vh, 480px);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}
.content-edit-panel {
  margin-top: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.35rem 0.65rem 0.65rem;
  background: #fafaf9;
}
.content-edit-panel summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  color: #334155;
  padding: 0.35rem 0;
}
.content-edit-panel[open] summary {
  margin-bottom: 0.5rem;
}
.content-studio-library {
  margin-bottom: 0.75rem;
}
.content-studio-library--in-panel {
  margin: 0 0 0.75rem;
}
.content-studio-outcome .content-studio-library--in-panel,
.generator-deck-panel .content-studio-library--in-panel {
  padding-top: 0.15rem;
}
.content-studio-library__item--modal {
  margin-bottom: 0;
}
.content-library-modal__list.content-studio-library__list {
  max-height: min(52vh, 420px);
}
.content-studio-library__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.content-studio-library__title {
  margin: 0;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.content-studio-library__count {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.content-studio-library__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.content-studio-library__toggle-label--expand {
  display: none;
}
.content-studio-library--collapsed .content-studio-library__toggle-label--minimize {
  display: none;
}
.content-studio-library--collapsed .content-studio-library__toggle-label--expand {
  display: inline;
}
.content-studio-library__collapsed-hint {
  display: none;
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
}
.content-studio-library--collapsed .content-studio-library__collapsed-hint {
  display: block;
}
.content-studio-library--collapsed .content-studio-library__body {
  display: none;
}
.content-studio-library--collapsed {
  margin-bottom: 0.35rem;
}
.content-studio-library--single-open .content-studio-library__list--tall {
  max-height: none;
  overflow: visible;
}
.content-studio-library--single-open .content-studio-library__focus-hint {
  margin-bottom: 0.5rem;
}
.content-studio-library__lead {
  margin: 0 0 0.45rem;
  font-size: var(--atlas-type-xs);
}
.content-studio-library__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 9.5rem;
  overflow-y: auto;
  padding: 0.35rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.content-studio-library__list--tall {
  max-height: min(42vh, 320px);
}
.content-studio-library__facets {
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.content-studio-library__empty {
  margin: 0.5rem 0;
  font-size: var(--atlas-type-xs);
}
.content-studio-library__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0.5rem 0.6rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  text-align: left;
}
.content-studio-library__item--active {
  border-color: var(--accent, #c2410c);
  box-shadow: 0 0 0 1px rgba(194, 65, 12, 0.15);
}
.content-studio-library__open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.content-studio-library__types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.2rem;
}
.content-studio-library__badge {
  display: inline-block;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  line-height: 1.25;
}
.content-studio-library__badge--section {
  color: #57534e;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
}
.content-studio-library__badge--kind {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.content-studio-library__open strong {
  display: block;
  font-size: var(--atlas-type-sm);
}
.content-studio-library__meta {
  margin: 0;
  font-size: var(--atlas-type-2xs);
  color: #78716c;
  grid-column: 1 / -1;
}
.content-studio-library__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid #e7e5e4;
  width: 100%;
}
.content-studio-library__actions :is(.btn-tone-action, .btn-tone-action-soft, .btn-tone-files, .btn-tone-refresh, .btn-tone-danger, .primary, .button-link) {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  min-height: 2.25rem;
  line-height: 1.2;
}
.content-studio-library__delete {
  margin-left: auto;
  flex-shrink: 0;
}
.asset-card-btn--danger svg {
  color: #fff;
  stroke: #fff;
}
.profile-welcome-modal {
  border: 0;
  border-radius: 14px;
  padding: 0;
  max-width: min(28rem, 92vw);
  width: 100%;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}
.profile-welcome-modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
}
.profile-welcome-modal__inner {
  padding: 1.35rem 1.35rem 1.25rem;
}
.profile-welcome-modal__eyebrow {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent, var(--brand-blue));
}
.profile-welcome-modal__title {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-xl);
  line-height: 1.25;
}
.profile-welcome-modal__lead {
  margin: 0 0 0.85rem;
  font-size: var(--atlas-type-md);
  line-height: 1.5;
  color: #334155;
}
.profile-welcome-modal__list {
  margin: 0 0 0.85rem 1.1rem;
  padding: 0;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
  color: #475569;
}
.profile-welcome-modal__hint {
  margin: 0 0 1rem;
}
.profile-welcome-missing-em {
  color: var(--accent, #2563eb);
  font-weight: 700;
}
.profile-field-highlight {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 3px;
  border-radius: 10px;
  animation: profile-field-highlight-pulse 1.1s ease-in-out 2;
}
@keyframes profile-field-highlight-pulse {
  0%,
  100% {
    outline-color: var(--accent, #2563eb);
  }
  50% {
    outline-color: #d97706;
  }
}
.profile-welcome-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}
.sign-out-modal button.primary.user-menu-signout {
  background: #b91c1c;
  border-color: #b91c1c;
}
.sign-out-modal button.primary.user-menu-signout:hover {
  background: #991b1b;
  border-color: #991b1b;
}

.profile-persona-choices {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.profile-persona-choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: var(--atlas-type-md);
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
}
.profile-persona-choice:hover {
  border-color: var(--accent, var(--brand-blue));
  background: #f8fafc;
}
.profile-teacher-only.hidden {
  display: none !important;
}

#teacher-profile-panel .profile-field-group {
  margin: 0 0 1.35rem;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
#teacher-profile-panel .profile-field-group:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.5rem;
}
#teacher-profile-panel .profile-field-group__title {
  margin: 0 0 0.85rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  color: #0f172a;
}
#teacher-profile-panel #ubd-template-settings.profile-field-group {
  margin-top: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}

body.persona-non-teacher .atlas-export-only {
  display: none !important;
}
.learner-only,
.learner-lesson-step3 {
  display: none;
}
/* Do not force .view.learner-only visible — only the active app view should show */
body.persona-non-teacher .learner-only:not(.view):not(.nav-utility) {
  display: block;
}
body.persona-student .app-toolbar .nav-utility.learner-only:not([hidden]) {
  display: inline-flex;
}
body.persona-student .app-toolbar .nav-utility.learner-only[hidden] {
  display: none !important;
}
body.persona-non-teacher li.learner-only {
  display: list-item;
}
body:not(.persona-student) #view-study-history {
  display: none !important;
}
body.persona-student #view-study-history.active {
  display: block !important;
}
body.persona-non-teacher .view.learner-only:not(.active) {
  display: none !important;
}
#view-profile {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
#view-profile #teacher-profile-panel {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
#view-profile #teacher-profile-panel .generator-form-grid .field,
#view-profile #teacher-profile-panel .generator-form-grid .field-wide {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
#view-profile #teacher-profile-panel .generator-form-grid > .field > .field-label:first-child,
#view-profile #teacher-profile-panel .generator-form-grid > .field-wide > .field-label:first-child,
#view-profile #teacher-profile-panel .generator-form-grid > label.field > .field-label:first-child {
  margin-top: 0;
  margin-bottom: 0.35rem;
}
#view-profile #teacher-profile-panel #profile-grade-wrap > .field-label:first-child {
  margin-top: 0;
  margin-bottom: 0.35rem;
}
#view-profile #teacher-profile-panel #profile-bloom-wrap > .profile-bloom-section-label {
  display: block;
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
}
#view-profile #teacher-profile-panel #profile-bloom-wrap > .profile-bloom-section-label:first-child {
  margin-top: 0;
}
#view-profile #teacher-profile-panel #profile-bloom-wrap .profile-cognitive-framework-field {
  margin-top: 0;
  margin-bottom: 0;
}
#view-profile #teacher-profile-panel #profile-bloom-wrap .profile-cognitive-framework-field + .profile-bloom-section-label {
  margin-top: 0.65rem;
}
#view-profile #teacher-profile-panel #profile-bloom-wrap .checkbox-field.profile-bloom-enable {
  margin: 0 0 1rem;
}
#view-profile #teacher-profile-panel .generator-form-grid .hint:last-child {
  margin-bottom: 0;
}
.profile-visual-defaults {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.profile-visual-accordion.panel-accordion {
  margin: 0;
}
.profile-visual-accordion .panel-accordion-body.field {
  margin: 0;
  border: 0;
  padding-top: 0.75rem;
}
.profile-visual-accordion .panel-accordion-body .hint {
  margin-bottom: 0;
}
#view-profile #teacher-profile-panel .text-input,
#view-profile #teacher-profile-panel select.text-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#view-profile #ubd-template-settings {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
#view-profile #ubd-template-settings .ubd-schema-editor {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#view-profile #teacher-profile-panel .profile-template-card {
  margin-top: 0.25rem;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
#view-profile #ubd-template-settings .ubd-schema-editor .schema-editor-table {
  /* Wide table scrolls inside editor on desktop — must not widen the profile form grid */
  min-width: min(36rem, 100%);
}
body.persona-non-teacher .teacher-planner-only {
  display: none !important;
}
body.persona-non-teacher .lesson-entry-summary .status-pill {
  display: none;
}
body.persona-non-teacher .learner-lesson-step3 {
  display: list-item;
}

.atlas-app-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(420px, 92vw);
  width: 100%;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}
.atlas-app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.atlas-app-dialog__form {
  padding: 1.15rem 1.25rem 1.1rem;
}
.atlas-app-dialog__title {
  margin: 0 0 0.5rem;
  font-size: var(--atlas-type-lg);
  font-weight: 650;
  color: #0f172a;
}
.atlas-app-dialog__body {
  margin: 0 0 1rem;
  font-size: var(--atlas-type-md);
  line-height: 1.45;
  color: #334155;
  white-space: pre-wrap;
}
.atlas-app-dialog__input-wrap {
  margin: 0 0 1rem;
}
.atlas-app-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.content-library-modal {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(540px, 92vw);
  width: 100%;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.content-library-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.content-library-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.content-library-modal__head h3 {
  margin: 0;
  font-size: var(--atlas-type-lg);
}
.content-library-modal__lead {
  margin: 0;
  padding: 0.65rem 1.15rem 0;
}
.content-library-modal__list {
  padding: 0.75rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}
.content-library-modal__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.content-library-modal__row-title {
  margin: 0;
  font-weight: 600;
  font-size: var(--atlas-type-md);
}
.content-library-modal__row-meta {
  margin: 0;
  font-size: var(--atlas-type-xs);
  color: #64748b;
  grid-column: 1 / -1;
}
.content-empty-state__inner {
  text-align: center;
  padding: 2rem 1rem;
}
.content-empty-state__title {
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.content-studio-wait {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--brand-blue-soft);
  border: 1px solid var(--brand-blue-soft-border);
}
.content-studio-wait__status {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-2xs);
  line-height: 1.35;
  color: #1e3a5f;
}
.content-studio-wait__status:not([hidden]) {
  display: block;
}
.content-studio-wait--failed {
  background: #fef2f2;
  border-color: #fecaca;
}
.content-studio-wait--failed .content-studio-wait__status {
  color: #991b1b;
  font-size: var(--atlas-type-xs);
}
.content-studio-failure-msg {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #7f1d1d;
  font-size: var(--atlas-type-sm);
  line-height: 1.45;
}
.content-studio-wait #pack-wait-tech,
.content-studio-wait #quiz-wait-tech,
.content-studio-wait #worksheet-wait-tech {
  font-size: var(--atlas-type-2xs);
  opacity: 0.85;
  margin-top: 0.15rem;
}
.content-result-title {
  font-size: var(--atlas-type-lg);
  margin: 0 0 0.75rem;
}
.content-quiz-preview__badge {
  display: inline-block;
  background: var(--accent, #c2410c);
  color: #fff;
  font-size: var(--atlas-type-2xs);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}
.content-quiz-reveal {
  margin-top: 0.75rem;
  padding: 0.65rem;
  background: #ecfdf5;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
}
.content-topic-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.75rem;
}
.content-topic-suggest__chip {
  font-size: var(--atlas-type-xs);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed #d6d3d1;
  background: #fafaf9;
  cursor: pointer;
}
.content-topic-suggest__chip:hover {
  border-color: var(--accent, #c2410c);
  background: var(--accent-soft, #ffedd5);
}
.content-brief-chip--depth {
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
}
.content-brief-chip--focus {
  background: #f0fdf4;
  border-color: #86efac;
}

#profile-programme-wrap .profile-programme-staff-note {
  display: block;
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

#profile-programme-wrap .profile-programme-cambridge-track {
  width: 100%;
  margin: 0.65rem 0 0;
  padding: 0.65rem 0 0;
  border: 0;
  border-top: 1px solid var(--border, #e2e8f0);
  background: transparent;
  box-shadow: none;
}
#profile-programme-wrap .profile-programme-cambridge-track .field-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #0f172a;
}
#profile-programme-wrap .profile-programme-cambridge-track .profile-cambridge-track-hint {
  margin-top: 0.35rem;
}

/* Generator — collapsed colour / deck pickers (MD tonal expand buttons) */
.field > .generator-style-details {
  margin-bottom: 0;
}
.generator-style-details {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}
.generator-style-details__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem 0.45rem 0.55rem;
  margin: 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  text-align: left;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
  box-sizing: border-box;
}
.generator-style-details__summary::-webkit-details-marker {
  display: none;
}
.generator-style-details__summary-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  min-width: 0;
}
.generator-style-details__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.generator-style-details__icon .material-symbols-outlined {
  font-size: 1.2rem;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.generator-style-details--palette .generator-style-details__summary {
  color: var(--brand-orange);
  background: var(--brand-orange-soft);
  border-color: var(--brand-orange-soft-border);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-orange) 18%, transparent);
}
.generator-style-details--palette .generator-style-details__summary:hover {
  filter: brightness(0.98);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--brand-orange) 22%, transparent);
}
.generator-style-details--palette[open] > .generator-style-details__summary {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-orange) 35%, transparent);
}
.generator-style-details--template .generator-style-details__summary {
  color: var(--brand-blue-hover);
  background: var(--brand-blue-soft);
  border-color: var(--brand-blue-soft-border);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
}
.generator-style-details--template .generator-style-details__summary:hover {
  filter: brightness(0.98);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.16);
}
.generator-style-details--template[open] > .generator-style-details__summary {
  border-color: var(--accent, var(--brand-blue));
  box-shadow: 0 0 0 1px var(--brand-blue-soft-border);
}
.generator-style-details__summary-text {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.generator-style-details__current {
  margin: 0 0 0 auto;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: color-mix(in srgb, currentColor 68%, var(--muted));
  text-align: right;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.generator-style-details__chev {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  opacity: 0.85;
  transition: transform 0.2s ease;
}
.generator-style-details[open] > .generator-style-details__summary .generator-style-details__chev {
  transform: rotate(180deg);
}
.generator-style-details__body {
  margin-top: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: #fff;
}
.generator-style-details__body .visual-style-picker {
  margin-top: 0.35rem;
}

/* Profile + generator — visual colour / deck template pickers */
.visual-style-picker {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
  width: 100%;
}
/* Six deck templates — 3 columns × 2 rows */
.visual-style-picker--deck {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#profile-collateral-palette-picker.visual-style-picker,
#gen-collateral-palette-picker.visual-style-picker {
  grid-template-columns: repeat(auto-fill, minmax(11.25rem, 1fr));
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#view-profile #teacher-profile-panel .field-wide:has(#profile-collateral-palette-picker) {
  min-width: 0;
  max-width: 100%;
}
#profile-collateral-palette-picker .visual-pick-card-shell,
#gen-collateral-palette-picker .visual-pick-card-shell {
  height: auto;
  min-height: 10.5rem;
  max-width: 100%;
}
#profile-collateral-palette-picker .visual-pick-card--palette,
#gen-collateral-palette-picker .visual-pick-card--palette {
  height: auto;
  min-height: 10.5rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.visual-pick-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem 0.65rem;
  border: 1px solid var(--border, #e4e4e7);
  border-radius: 10px;
  background: var(--surface, #fff);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 400;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.visual-pick-card:hover {
  border-color: #a1a1aa;
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.06);
}
.visual-pick-card.is-selected,
.visual-pick-card[aria-checked="true"] {
  border-color: var(--primary, #0284c7);
  box-shadow: 0 0 0 2px rgb(2 132 199 / 0.2);
}
.visual-pick-card__swatches {
  display: flex;
  gap: 4px;
  min-height: 1.75rem;
}
.visual-pick-card__swatches--grid {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 7rem;
  min-width: 0;
  max-width: 100%;
}
.visual-pick-card--palette .visual-pick-card__footer {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.08rem;
  min-height: 3.35rem;
  margin-top: 0.1rem;
}
.visual-pick-card__title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.35rem;
  width: 100%;
}
.visual-pick-card__swatch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
}
.visual-pick-card__chip-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  min-width: 0;
}
.visual-pick-card__chip-label {
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  line-height: 1.2;
  color: #71717a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.visual-pick-card__swatch-grid .visual-pick-card__chip {
  flex: none;
  width: 100%;
  min-height: 1.65rem;
  max-width: 100%;
  aspect-ratio: 1.15;
  border-radius: 8px;
  cursor: pointer;
}
.visual-pick-card__chip[data-action="edit-swatch"]:hover,
.visual-pick-card__accent-dot[data-action="edit-swatch"]:hover {
  box-shadow: 0 0 0 2px rgb(2 132 199 / 0.45);
}
.visual-pick-card__accent-dot[data-action="edit-swatch"] {
  cursor: pointer;
}
.visual-pick-card__swatches-accents {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 2.15rem;
  box-sizing: border-box;
}
.visual-pick-card__accent-dot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  justify-self: stretch;
  background: var(--chip, #f4f4f5);
  border: 1px solid rgb(0 0 0 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.4);
}
/* .field span { display:block } must not break palette swatch layout */
.field .visual-style-picker .visual-pick-card__swatches,
.field .visual-style-picker .visual-pick-card__swatches--grid,
.field .visual-style-picker .visual-pick-card__swatch-grid,
.field .visual-style-picker .visual-pick-card__swatches-accents {
  display: flex;
  width: 100%;
  margin-bottom: 0;
  font-weight: inherit;
  font-size: inherit;
}
.field .visual-style-picker .visual-pick-card__swatch-grid,
.field .visual-style-picker .visual-pick-card__swatches-accents {
  display: grid;
}
.field .visual-style-picker .visual-pick-card__chip,
.field .visual-style-picker .visual-pick-card__accent-dot,
.field .visual-style-picker .visual-pick-card__chip-cell {
  margin-bottom: 0;
  font-weight: inherit;
  font-size: inherit;
}
.field .visual-style-picker .visual-pick-card__chip-cell {
  display: flex;
}
.field .visual-style-picker .visual-pick-card__chip-label {
  display: block;
  font-size: var(--atlas-type-2xs);
  font-weight: 500;
  margin-bottom: 0;
}
body.collateral-swatch-modal-open {
  overflow: hidden;
}
.collateral-swatch-color-popover {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) 0.85rem max(0.75rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.collateral-swatch-color-popover.hidden {
  display: none;
}
.collateral-swatch-color-popover__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}
.collateral-swatch-color-popover__card {
  position: relative;
  z-index: 1;
  width: min(20rem, 100%);
  padding: 1rem 1.05rem 1.05rem;
  border-radius: 12px;
  border: 1px solid #d4d4d8;
  background: #fff;
  box-shadow: 0 18px 48px rgb(15 23 42 / 0.22);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.collateral-swatch-color-popover__eyebrow {
  margin: 0;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
}
.collateral-swatch-color-popover__title {
  margin: 0;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  color: #18181b;
  line-height: 1.25;
}
.collateral-swatch-color-popover__swatch-wrap {
  display: block;
  margin: 0;
}
.collateral-swatch-color-popover__input {
  display: block;
  width: 100%;
  height: 4.5rem;
  padding: 0;
  border: 1px solid #d4d4d8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.collateral-swatch-color-popover__input::-webkit-color-swatch-wrapper {
  padding: 0.2rem;
}
.collateral-swatch-color-popover__input::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}
.collateral-swatch-color-popover__hex-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: #3f3f46;
}
.collateral-swatch-color-popover__hex {
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #fafafa;
}
.collateral-swatch-color-popover__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.15rem;
}
.collateral-swatch-color-popover__actions .primary {
  min-width: 5.5rem;
}
.visual-pick-card__chip {
  flex: 1;
  border-radius: 6px;
  background: var(--chip, #f4f4f5);
  border: 1px solid rgb(0 0 0 / 0.06);
  min-height: 1.75rem;
}
.visual-pick-card__chip--muted {
  background: linear-gradient(135deg, #f4f4f5, #e4e4e7);
}
.visual-pick-card__label {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  line-height: 1.25;
}
.visual-pick-card-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  position: relative;
}
.visual-pick-card-shell .visual-pick-card {
  width: 100%;
  grid-column: 1 / -1;
  grid-row: 1;
}
.visual-pick-card--palette {
  display: flex;
  flex-direction: column;
}
.visual-pick-card__reset-icon {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  z-index: 2;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 0.5rem 2.12rem 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgb(127 29 29 / 0.35);
  transition: background 0.15s, transform 0.12s;
}
.visual-pick-card__reset-icon:hover {
  background: #b91c1c;
  transform: scale(1.06);
}
.visual-pick-card__reset-icon:active {
  transform: scale(0.96);
}
.visual-pick-card-shell--tweaked .visual-pick-card__label {
  padding-right: 0.35rem;
}
.visual-pick-card-shell--tweaked .visual-pick-card__swatches,
.visual-pick-card-shell--tweaked .visual-pick-card__swatches--grid {
  outline: 1px solid rgb(2 132 199 / 0.35);
  outline-offset: 2px;
  border-radius: 6px;
  padding: 2px;
}
.visual-pick-card__desc {
  font-size: var(--atlas-type-2xs);
  font-weight: 400;
  line-height: 1.3;
  color: #71717a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(0.6875rem * 1.3 * 2);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.visual-pick-card__desc--placeholder {
  visibility: hidden;
}
.field .visual-style-picker .visual-pick-card__footer,
.field .visual-style-picker .visual-pick-card__title-row {
  display: flex;
  width: 100%;
  margin-bottom: 0;
  font-weight: inherit;
  font-size: inherit;
}
.field .visual-style-picker .visual-pick-card__label {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  margin-bottom: 0;
}
.field .visual-style-picker .visual-pick-card__desc {
  font-size: var(--atlas-type-2xs);
  font-weight: 400;
  margin-bottom: 0;
}
.visual-pick-card--deck .visual-pick-card__desc {
  -webkit-line-clamp: 3;
}
.deck-layout-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 6px;
  border: 1px solid #d4d4d8;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.deck-layout-thumb::before,
.deck-layout-thumb::after {
  content: "";
  position: absolute;
  background: #cbd5e1;
  border-radius: 2px;
}
.deck-layout-thumb--classic-balanced::before {
  left: 6%;
  top: 14%;
  width: 38%;
  height: 72%;
  background: #94a3b8;
}
.deck-layout-thumb--classic-balanced::after {
  right: 8%;
  top: 20%;
  width: 44%;
  height: 8%;
  box-shadow: 0 10px 0 #e2e8f0, 0 22px 0 #e2e8f0, 0 34px 0 #e2e8f0;
}
.deck-layout-thumb--image-forward::before {
  left: 5%;
  top: 10%;
  width: 90%;
  height: 58%;
  background: #94a3b8;
}
.deck-layout-thumb--image-forward::after {
  left: 8%;
  bottom: 12%;
  width: 55%;
  height: 7%;
  background: #e2e8f0;
}
.deck-layout-thumb--text-forward::before {
  left: 6%;
  top: 14%;
  width: 22%;
  height: 45%;
  background: #94a3b8;
}
.deck-layout-thumb--text-forward::after {
  right: 8%;
  top: 16%;
  width: 58%;
  height: 7%;
  box-shadow: 0 11px 0 #e2e8f0, 0 23px 0 #e2e8f0, 0 35px 0 #e2e8f0, 0 47px 0 #e2e8f0;
}
.deck-layout-thumb--classroom-clear::before {
  left: 6%;
  top: 16%;
  width: 28%;
  height: 38%;
  background: #94a3b8;
}
.deck-layout-thumb--classroom-clear::after {
  right: 7%;
  top: 14%;
  width: 54%;
  height: 7%;
  box-shadow: 0 10px 0 #e2e8f0, 0 22px 0 #e2e8f0, 0 34px 0 #e2e8f0, 0 46px 0 #e2e8f0, 0 58px 0 #e2e8f0;
}
.deck-layout-thumb--album-story {
  background: #f4f4f5;
}
.deck-layout-thumb--album-story::before {
  left: 6%;
  top: 10%;
  width: 40%;
  height: 36%;
  background: #94a3b8;
  box-shadow: 48% 0 0 #a8b4c4, 0 48% 0 #94a3b8, 48% 48% 0 #a8b4c4;
}
.deck-layout-thumb--bold-sections::before {
  left: 0;
  top: 0;
  width: 100%;
  height: 22%;
  border-radius: 0;
  background: #64748b;
}
.deck-layout-thumb--bold-sections::after {
  left: 8%;
  top: 34%;
  width: 84%;
  height: 52%;
  background: transparent;
  box-shadow: inset 0 0 0 1px #cbd5e1, 0 8px 0 #e2e8f0, 0 20px 0 #e2e8f0;
}
@media (max-width: 900px) {
  #profile-collateral-palette-picker.visual-style-picker,
  #gen-collateral-palette-picker.visual-style-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.4rem, 2.5vw, 0.65rem);
  }
  #profile-collateral-palette-picker .visual-pick-card-shell,
  #gen-collateral-palette-picker .visual-pick-card-shell {
    min-width: 0;
    max-width: 100%;
  }
  #profile-collateral-palette-picker .visual-pick-card-shell,
  #gen-collateral-palette-picker .visual-pick-card-shell,
  #profile-collateral-palette-picker .visual-pick-card--palette,
  #gen-collateral-palette-picker .visual-pick-card--palette {
    min-height: 0;
  }
  #profile-collateral-palette-picker .visual-pick-card--palette,
  #gen-collateral-palette-picker .visual-pick-card--palette {
    padding: 0.45rem 0.5rem 0.55rem;
    max-width: 100%;
  }
  #profile-collateral-palette-picker .visual-pick-card__swatches--grid,
  #gen-collateral-palette-picker .visual-pick-card__swatches--grid {
    min-height: 0;
    width: 100%;
    max-width: 100%;
  }
  #profile-collateral-palette-picker .visual-pick-card--palette .visual-pick-card__footer,
  #gen-collateral-palette-picker .visual-pick-card--palette .visual-pick-card__footer {
    min-height: 0;
  }
  #profile-collateral-palette-picker .visual-pick-card__swatch-grid,
  #gen-collateral-palette-picker .visual-pick-card__swatch-grid {
    gap: 4px;
  }
  #profile-collateral-palette-picker .visual-pick-card__swatches-accents,
  #gen-collateral-palette-picker .visual-pick-card__swatches-accents {
    gap: 4px;
    min-height: 0;
  }
  #profile-collateral-palette-picker .visual-pick-card__chip-label,
  #gen-collateral-palette-picker .visual-pick-card__chip-label {
    font-size: var(--atlas-type-2xs);
    line-height: 1.2;
  }
  .field .visual-style-picker .visual-pick-card__label {
    font-size: var(--atlas-type-xs);
    line-height: 1.25;
  }
  .field .visual-style-picker .visual-pick-card__desc {
    font-size: var(--atlas-type-2xs);
    line-height: 1.28;
    -webkit-line-clamp: 3;
  }
}
@media (max-width: 640px) {
  .visual-style-picker,
  .visual-style-picker--deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 400px) {
  #profile-collateral-palette-picker.visual-style-picker,
  #gen-collateral-palette-picker.visual-style-picker {
    gap: 0.35rem;
  }
  #profile-collateral-palette-picker .visual-pick-card--palette,
  #gen-collateral-palette-picker .visual-pick-card--palette {
    padding: 0.35rem 0.4rem 0.45rem;
  }
  #profile-collateral-palette-picker .visual-pick-card__swatch-grid .visual-pick-card__chip,
  #gen-collateral-palette-picker .visual-pick-card__swatch-grid .visual-pick-card__chip {
    min-height: 1.25rem;
    border-radius: 6px;
  }
  #profile-collateral-palette-picker .visual-pick-card__chip-label,
  #gen-collateral-palette-picker .visual-pick-card__chip-label {
    font-size: var(--atlas-type-2xs);
  }
  .field .visual-style-picker .visual-pick-card__label {
    font-size: var(--atlas-type-xs);
  }
  .field .visual-style-picker .visual-pick-card__desc {
    font-size: var(--atlas-type-2xs);
  }
  #profile-collateral-palette-picker .visual-pick-card__reset-icon,
  #gen-collateral-palette-picker .visual-pick-card__reset-icon {
    width: 1.15rem;
    height: 1.15rem;
    margin-bottom: 0.4rem;
  }
}

.collateral-custom-editor {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}
.collateral-custom-editor__lead {
  margin: 0 0 0.55rem;
}
.collateral-custom-editor__accents {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}
.collateral-custom-editor__accents-lead {
  margin: 0 0 0.45rem;
  font-size: var(--atlas-type-sm);
}
.collateral-custom-editor__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}
.collateral-custom-editor--extended .collateral-custom-editor__grid--accents {
  margin-top: 0.35rem;
}
.collateral-custom-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: var(--atlas-type-2xs);
  font-weight: 600;
  color: #3f3f46;
}
.collateral-custom-field input[type="color"] {
  width: 100%;
  height: 2.5rem;
  padding: 0.15rem;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.visual-pick-card--custom .visual-pick-card__swatches {
  background: repeating-linear-gradient(45deg, #f4f4f5, #f4f4f5 6px, #fff 6px, #fff 12px);
}
@media (max-width: 720px) {
  .collateral-custom-editor__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Locale + RTL --- */
html[lang="ar"] body,
body.locale-ar {
  font-family: "Dubai", "Inter", system-ui, sans-serif;
}
html[lang="ur"] body,
body.locale-ur {
  font-family: "Noto Naskh Urdu", "Gulzar", "Noto Naskh Arabic", "Inter", system-ui, sans-serif;
}
html[lang="ar"] body,
body.locale-ar {
  line-height: var(--atlas-rtl-lh, 1.62);
}
html[lang="ur"] body .panel,
html[lang="ur"] body .field,
html[lang="ur"] body .modal,
html[lang="ur"] body button,
html[lang="ur"] body input,
html[lang="ur"] body textarea,
html[lang="ur"] body select {
  font-family: inherit;
}
.locale-switcher-host--drawer {
  display: none;
}
.user-menu-section-locale {
  display: none;
}
.locale-switcher--menu {
  width: 100%;
}
.locale-switcher__modal-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  box-sizing: border-box;
}
.locale-switcher__modal-open-label {
  font-weight: 500;
}
.locale-switcher__modal-current {
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: var(--muted);
  text-align: end;
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.locale-modal {
  position: fixed;
  inset: 0;
  z-index: 1360;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
}
.locale-modal[hidden] {
  display: none !important;
}
.locale-modal__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.52);
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.locale-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(20.5rem, 100%);
  max-height: min(28rem, calc(100dvh - 2rem));
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 1rem 0.85rem 0.85rem;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}
.locale-modal__title {
  margin: 0 0 0.65rem;
  padding: 0 0.35rem;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text, #0f172a);
}
.locale-modal__section-title {
  margin: 0.55rem 0 0.35rem;
  padding: 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.locale-modal__section-title:first-of-type {
  margin-top: 0.15rem;
}
.locale-switcher__menu--locale {
  margin-bottom: 0.35rem;
}
.locale-switcher__menu--market {
  margin-bottom: 0;
}
.locale-switcher__option--market {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.locale-switcher__option-badge {
  flex-shrink: 0;
  min-width: 2.35rem;
  padding: 0.12rem 0.35rem;
  border-radius: 5px;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  text-align: center;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.locale-switcher__trigger-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.locale-switcher__market {
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  color: #475569;
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.locale-switcher__modal-current {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.locale-switcher__modal-current-sep {
  color: #94a3b8;
}
.locale-switcher__menu--modal {
  position: static;
  inset: auto;
  min-width: 0;
  max-height: none;
  overflow: visible;
  border: 0;
  box-shadow: none;
  padding: 0.15rem 0.1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.locale-switcher__menu--modal .locale-switcher__option {
  text-align: start;
  padding: 0.58rem 0.7rem;
  border-radius: 8px;
  font-size: var(--atlas-type-md);
  font-weight: 500;
}
body.locale-modal-open {
  overflow: hidden;
}
.mkt-nav-locale-inline {
  display: none;
  align-items: center;
  flex: 0 0 auto;
}
.mkt-nav .locale-switcher--nav {
  position: relative;
  z-index: 1;
}
@media (min-width: 901px) {
  .mkt-nav-locale-inline {
    display: none !important;
  }
  .mkt-header-bar > .locale-switcher--bar {
    display: inline-flex;
  }
}
@media (max-width: 900px) {
  .mkt-header-bar > .locale-switcher--bar {
    display: none !important;
  }
  .mkt-nav-locale-inline {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    padding: 0.4rem 1rem 0.55rem;
    box-sizing: border-box;
    border-bottom: 1px solid #e2e8f0;
  }
  .mkt-nav-locale-inline .locale-switcher--nav {
    display: block;
    width: 100%;
  }
  .mkt-nav-locale-inline .locale-switcher__trigger {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
  }
  .user-menu-section-locale {
    display: block;
    padding: 0.15rem 0.1rem 0.35rem;
    border-top: 1px solid #f1f5f9;
  }
}
.mkt-header-bar > .locale-switcher--bar {
  position: relative;
  flex: 0 0 auto;
  order: 90;
  margin-inline-start: auto;
  margin-inline-end: 0;
  z-index: 200;
}
html[dir="rtl"] .mkt-header-bar > .locale-switcher--bar {
  margin-inline-start: 0;
  margin-inline-end: 0;
}
.mkt-nav .locale-switcher {
  margin-inline: 0;
  order: unset;
}
.locale-switcher__details {
  position: relative;
  display: inline-block;
}
.locale-switcher__details[open] {
  z-index: 250;
}
.locale-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border, #d4d4d8);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: inherit;
  margin: 0;
  line-height: 1.2;
}
.locale-switcher__menu:not(.locale-switcher__menu--modal) {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  min-width: 9.5rem;
  max-height: min(18rem, calc(100vh - 5rem));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--border, #d4d4d8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 3000;
  padding: 0.25rem;
}
.locale-switcher__menu.is-fixed {
  position: fixed;
  top: 0;
  inset-inline-end: auto;
  inset-inline-start: auto;
  z-index: 3500;
}
.locale-switcher__option {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.locale-switcher__option:hover,
.locale-switcher__option.is-active {
  background: #f4f4f5;
}
.user-menu {
  order: 95;
}
[dir="rtl"] .app-toolbar-nav,
[dir="rtl"] .workflow-steps,
[dir="rtl"] .mkt-nav {
  direction: rtl;
}
[dir="rtl"] .figure-search-card__body,
[dir="rtl"] .panel,
[dir="rtl"] .field {
  text-align: start;
}
html[dir="rtl"] body {
  text-align: start;
}
html[dir="rtl"] .usage-table th,
html[dir="rtl"] .usage-table td,
html[dir="rtl"] .panel,
html[dir="rtl"] .field label,
html[dir="rtl"] .modal,
html[dir="rtl"] .drawer {
  text-align: start;
}
html[dir="rtl"] .workflow-steps,
html[dir="rtl"] .app-toolbar-nav {
  direction: rtl;
}

.teaching-tools-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  width: fit-content;
  max-width: 100%;
}
.teaching-tools-tab {
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 600;
  font-size: var(--atlas-type-sm);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}
.teaching-tools-tab.is-active {
  font-weight: 700;
}
.teaching-tools-tab[data-teaching-tab="question-bank"].is-active {
  background: var(--brand-blue-soft, #e8f5fe);
  color: var(--brand-blue-hover, var(--accent));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--accent, var(--brand-blue)) 22%, transparent);
}
.teaching-tools-tab[data-teaching-tab="curriculum"].is-active {
  background: var(--brand-green-soft, #e8f8ef);
  color: var(--brand-green);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-green) 22%, transparent);
}
.teaching-tools-tab[data-teaching-tab="question-bank"]:not(.is-active):hover {
  color: var(--brand-blue-hover, var(--accent));
}
.teaching-tools-tab[data-teaching-tab="curriculum"]:not(.is-active):hover {
  color: var(--brand-green);
}
.teaching-panel-lead {
  margin: 0 0 0.75rem;
}
.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* Question bank manager */
.question-bank-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.question-bank-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 900px) {
  .question-bank-main {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}
.question-bank-main > * {
  min-width: 0;
}
.question-bank-list {
  min-width: 0;
  max-width: 100%;
}
.question-bank-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
.question-bank-filters__row .field {
  flex: 1 1 7.5rem;
  min-width: 0;
  margin-bottom: 0;
}
.question-bank-filters__row .field.flex-1 {
  flex: 2 1 11rem;
}
.question-bank-filters__row #qb-refresh {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-bottom: 0;
}
@media (pointer: coarse) {
  .question-bank-filters__row #qb-refresh {
    min-height: 0;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }
}
.question-bank-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.question-bank-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.question-bank-topic-group {
  padding: 0.75rem 0.85rem 0.85rem;
  margin: 0;
}
.question-bank-topic-group__head {
  margin: 0 0 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8ecf1;
}
.question-bank-topic-group__title {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  color: #0f172a;
}
.question-bank-topic-group__sub {
  margin: 0.2rem 0 0;
}
.question-bank-topic-group__count {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-xs);
}
.question-bank-topic-group__lesson {
  font-size: inherit;
  margin-left: 0.15rem;
}
.question-bank-topic-group__cards {
  margin: 0;
}
.question-bank-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.question-bank-card.content-item-card {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
}
.question-bank-card .content-item-card__summary--static {
  cursor: default;
  padding: 0.6rem 0.85rem 0.65rem;
  min-width: 0;
}
.question-bank-card .content-item-card__summary-top {
  flex-wrap: wrap;
  row-gap: 0.35rem;
  align-items: center;
}
.question-bank-card .content-item-card__toolbar {
  margin-left: auto;
  flex-shrink: 0;
  gap: 0.35rem;
}
.question-bank-card__check {
  display: inline-flex;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}
.question-bank-card__check input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.question-bank-card__vis {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}
.question-bank-card__peek {
  margin-top: 0.45rem;
  font-weight: 600;
  color: #0f172a;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}
.question-bank-card__blank {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.05rem 0.35rem;
  font-weight: 700;
  color: #475569;
  vertical-align: baseline;
  border-bottom: 2px solid #94a3b8;
  background: #f1f5f9;
  border-radius: 3px;
}
.question-bank-card__extra {
  margin: 0.35rem 0 0;
  font-size: var(--atlas-type-xs);
}
.question-bank-results-meta {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-xs);
}
.question-bank-coll__list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}
.question-bank-coll__btn {
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
}
.question-bank-coll__item.is-active .question-bank-coll__btn {
  font-weight: 600;
}
.question-bank-dialog {
  max-width: 32rem;
  border: none;
  border-radius: 12px;
  padding: 0;
}
.question-bank-dialog__inner {
  padding: 1.25rem;
}
.question-bank-pager {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.curriculum-hub-toolbar.job-list-toolbar {
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: stretch;
}
.curriculum-hub-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  margin-bottom: 0.35rem;
}
.curriculum-hub-toolbar__filters,
.curriculum-hub-toolbar__actions {
  width: 100%;
}
.curriculum-hub-toolbar__filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem 0.65rem;
  align-items: flex-end;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}
.curriculum-hub-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.curriculum-hub-toolbar__actions button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.curriculum-hub-toolbar .field {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}
.curriculum-hub-toolbar__filters .field:nth-child(1) {
  flex: 1 1 11rem;
  max-width: 16rem;
}
.curriculum-hub-toolbar__filters .field:nth-child(2) {
  flex: 1 1 9.5rem;
  max-width: 14rem;
}
.curriculum-hub-toolbar__filters .field:nth-child(3) {
  flex: 0 0 8.75rem;
}
.curriculum-hub-toolbar__filters .field:nth-child(4) {
  flex: 0 0 10.75rem;
  min-width: 10.75rem;
}
.curriculum-hub-toolbar .field .text-input,
.curriculum-hub-toolbar select.text-input {
  width: 100%;
  min-width: 0;
}
/* Base ligature rules + @font-face — material-symbols-outlined.css (loaded in locale-ui-fonts) */
.subject-icon--sm {
  font-size: var(--atlas-type-lg);
  -webkit-font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
}
.subject-icon--md {
  font-size: var(--atlas-type-xl);
}
.subject-icon--lg {
  font-size: var(--atlas-type-2xl);
  -webkit-font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 28;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 28;
}
.subject-heading-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.subject-heading-with-icon .subject-heading-text {
  min-width: 0;
}
.subject-select-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.subject-select-wrap > .subject-select-icon {
  position: absolute;
  left: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.subject-select-wrap > select.text-input--with-subject-icon {
  padding-left: 2.35rem;
}
/* Safari/WebKit: native <select> paints above siblings — border/bg on wrap, transparent select */
.subject-select-wrap--with-icon {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
}
.subject-select-wrap--with-icon:focus-within {
  outline: 2px solid rgba(37, 99, 168, 0.25);
  border-color: var(--accent);
}
.subject-select-wrap--with-icon > select.text-input--with-subject-icon {
  position: relative;
  z-index: 1;
  background-color: transparent;
  border-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%235c667a'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.24 4.5a.75.75 0 01-1.08 0l-4.24-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 1rem auto;
}
.subject-select-wrap--with-icon > select.text-input--with-subject-icon:focus {
  outline: none;
  border-color: transparent;
}
.curriculum-hub-card__header .subject-heading-with-icon .panel-heading,
.curriculum-hub-card__header .subject-heading-text {
  margin: 0;
  font: inherit;
}
.curriculum-hub-prewarm-wait {
  margin: 0 0 0.75rem;
  max-width: 42rem;
}
.curriculum-hub-prewarm-wait .import-progress-bar {
  margin: 0.5rem 0;
}
.curriculum-hub-toolbar-hint {
  margin: 0 0 0.5rem;
}
.curriculum-hub-share {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  max-width: 44rem;
  border-radius: 0.65rem;
  border: 1px solid color-mix(in srgb, #1b4d8c 22%, #e2e8f0);
  background: linear-gradient(
    165deg,
    color-mix(in srgb, #1b4d8c 6%, #fff) 0%,
    #f8fafc 55%,
    #fff 100%
  );
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}
.curriculum-hub-share__title {
  margin: 0 0 0.25rem;
  font-size: var(--atlas-type-md, 1rem);
  font-weight: 600;
  color: #0f172a;
}
.curriculum-hub-share__lede {
  margin: 0 0 0.75rem;
}
.curriculum-hub-share__link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.curriculum-hub-share__input {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: var(--atlas-type-sm, 0.875rem);
  color: #334155;
  background: #fff;
}
.curriculum-hub-share__copy {
  flex: 0 0 auto;
  white-space: nowrap;
}
.curriculum-hub-share__copy--done {
  background: color-mix(in srgb, #15803d 18%, #fff);
  border-color: color-mix(in srgb, #15803d 40%, transparent);
}
.curriculum-hub-share__channels-label {
  display: block;
  font-size: var(--atlas-type-sm, 0.875rem);
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.45rem;
}
.curriculum-hub-share__channel-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.curriculum-hub-share__channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}
.curriculum-hub-share__channel-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.curriculum-hub-share__channel-label {
  line-height: 1.2;
}
.curriculum-hub-share__channel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--atlas-type-sm, 0.875rem);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.curriculum-hub-share__channel:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgb(15 23 42 / 12%);
}
.curriculum-hub-share__channel:focus-visible {
  outline: 2px solid #1b4d8c;
  outline-offset: 2px;
}
.curriculum-hub-share__channel--whatsapp {
  background: color-mix(in srgb, #25d366 14%, #fff);
  border-color: color-mix(in srgb, #25d366 35%, #e2e8f0);
}
.curriculum-hub-share__channel--email {
  background: color-mix(in srgb, #1b4d8c 10%, #fff);
  border-color: color-mix(in srgb, #1b4d8c 28%, #e2e8f0);
}
.curriculum-hub-share__channel--facebook {
  background: color-mix(in srgb, #1877f2 12%, #fff);
  border-color: color-mix(in srgb, #1877f2 30%, #e2e8f0);
}
.curriculum-hub-share__channel--instagram {
  background: color-mix(in srgb, #e1306c 10%, #fff);
  border-color: color-mix(in srgb, #e1306c 28%, #e2e8f0);
}
.curriculum-hub-share__channel--linkedin {
  background: color-mix(in srgb, #0a66c2 12%, #fff);
  border-color: color-mix(in srgb, #0a66c2 30%, #e2e8f0);
}
.curriculum-hub-share__channel--x {
  background: color-mix(in srgb, #0f172a 8%, #fff);
  border-color: color-mix(in srgb, #0f172a 22%, #e2e8f0);
}
.curriculum-hub-share__channel--native {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.syllabus-hub-public-body {
  background: #f4f7fb;
}
.syllabus-hub-public.login-shell {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  padding: 1rem 1rem 0.5rem;
}
.syllabus-hub-public__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, #1b4d8c 12%, #e2e8f0);
}
.syllabus-hub-public__brand .mkt-brand-lockup-stacked {
  flex: 0 0 auto;
}
.syllabus-hub-public__powered {
  margin: 0;
  font-size: var(--atlas-type-sm, 0.875rem);
}
.syllabus-hub-public__powered a {
  font-weight: 600;
  text-decoration: none;
  color: #1b4d8c;
}
.syllabus-hub-public__powered a:hover {
  text-decoration: underline;
}
.syllabus-hub-public__page-foot {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0.5rem;
  text-align: center;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
}
.syllabus-hub-public__foot-brand {
  font-weight: 600;
  color: #1b4d8c;
}
.syllabus-hub-public__hero {
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0.75rem;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, #1b4d8c 8%, #fff) 0%,
    #fff 70%
  );
}
.syllabus-hub-public__eyebrow {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.syllabus-hub-public__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.25;
  color: #0f172a;
}
.syllabus-hub-public__subtitle {
  margin: 0 0 0.65rem;
  font-size: var(--atlas-type-md, 1rem);
  font-weight: 500;
  color: #334155;
}
.syllabus-hub-public__note {
  margin: 0;
  max-width: 40rem;
}
.syllabus-hub-public__grid {
  display: grid;
  gap: 0.85rem;
}
.syllabus-hub-public__card {
  padding: 1.1rem 1.2rem;
}
.syllabus-hub-public__card-title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  color: #0f172a;
}
.syllabus-hub-public__section-label {
  margin: 0 0 0.35rem;
  font-size: var(--atlas-type-sm, 0.875rem);
  font-weight: 600;
  color: #475569;
}
.syllabus-hub-public__topics {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: #1e293b;
  font-size: var(--atlas-type-sm, 0.9rem);
}
.syllabus-hub-public__topics li {
  margin: 0.2rem 0;
}
.syllabus-hub-public__detail {
  margin: 0.5rem 0 0.75rem;
  font-size: var(--atlas-type-sm, 0.875rem);
}
.syllabus-hub-public__detail summary {
  cursor: pointer;
  font-weight: 600;
  color: #1b4d8c;
}
.syllabus-hub-public__pdf {
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.syllabus-hub-public__pdf-meta {
  margin: 0;
  max-width: 100%;
  word-break: break-word;
}
.syllabus-hub-public__empty {
  padding: 1.25rem;
}
@media (max-width: 520px) {
  .curriculum-hub-share__link-row {
    flex-direction: column;
  }
  .curriculum-hub-share__copy {
    width: 100%;
  }
}
.field-label--with-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.curriculum-hub-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
}
.curriculum-hub-info-btn:hover {
  color: #1b4d8c;
  background: color-mix(in srgb, #1b4d8c 10%, transparent);
}
.curriculum-hub-info-btn:focus-visible {
  outline: 2px solid #1b4d8c;
  outline-offset: 2px;
}
.curriculum-hub-info-btn .material-symbols-outlined {
  font-size: 1.125rem;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20;
}
.curriculum-hub-disclaimer-dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  max-width: min(36rem, 92vw);
  width: 100%;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}
.curriculum-hub-disclaimer-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.curriculum-hub-disclaimer-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.curriculum-hub-disclaimer-dialog__head h3 {
  margin: 0;
  font-size: var(--atlas-type-lg);
}
.curriculum-hub-disclaimer-dialog__body {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  border: none;
  border-radius: 0;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
  line-height: 1.45;
}
.curriculum-hub-disclaimer-dialog__body .curriculum-hub-source-seeds {
  margin-top: 0.65rem;
}
@media (max-width: 720px) {
  .curriculum-hub-toolbar__filters {
    flex-wrap: wrap;
  }
  .curriculum-hub-toolbar__filters .field:nth-child(1),
  .curriculum-hub-toolbar__filters .field:nth-child(2),
  .curriculum-hub-toolbar__filters .field:nth-child(3),
  .curriculum-hub-toolbar__filters .field:nth-child(4) {
    flex: 1 1 100%;
    max-width: none;
  }
}
.curriculum-hub-grid {
  width: 100%;
  min-width: 0;
}
.curriculum-hub-cards {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.curriculum-hub-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}
.curriculum-hub-card__header .panel-heading {
  margin: 0;
}
.curriculum-hub-card__code {
  font-size: var(--atlas-type-sm);
  font-weight: 500;
  color: var(--muted, #5a6a7a);
}
.curriculum-hub-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex: 1 1 100%;
  margin: 0.35rem 0 0;
}
.curriculum-hub-card__actions .curriculum-hub-card-build,
.curriculum-hub-card__actions .curriculum-hub-card-fetch,
.curriculum-hub-grade-band__fetch .curriculum-hub-card-fetch {
  font-size: var(--atlas-type-sm);
}
.curriculum-hub-grade-band__fetch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex: 1 1 100%;
  margin-top: 0.35rem;
}
.curriculum-hub-syllabus-locked-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: var(--atlas-type-2xs);
  font-weight: 700;
  vertical-align: middle;
  color: #1e3a5f;
  background: color-mix(in srgb, var(--brand-blue, #2563eb) 14%, #f1f5f9);
  border: 1px solid color-mix(in srgb, var(--brand-blue, #2563eb) 28%, #e2e8f0);
}
.curriculum-hub-card__years {
  margin: 0 0 0.5rem;
  width: 100%;
}
.curriculum-hub-grade-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent, #1b4d8c) 12%, transparent);
  color: var(--accent, #1b4d8c);
  white-space: nowrap;
}
.curriculum-hub-grade-chip--lg {
  font-size: var(--atlas-type-sm);
  padding: 0.2rem 0.65rem;
}
.curriculum-hub-card--grouped {
  grid-column: 1 / -1;
}
.curriculum-hub-grade-bands {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.curriculum-hub-grade-band {
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--surface-2, #f4f7fb) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--border, #d8e0ea) 90%, transparent);
}
.curriculum-hub-grade-band__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}
.curriculum-hub-grade-band__shared {
  display: block;
  margin: 0.25rem 0 0;
}
.curriculum-hub-activate__grade-block + .curriculum-hub-activate__grade-block {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--border, #d8e0ea) 90%, transparent);
}
.curriculum-hub-activate__grade-label {
  margin: 0 0 0.35rem;
}
.curriculum-hub-activate-grade-pick {
  margin: 0.5rem 0 0.65rem;
  max-width: 16rem;
}
.curriculum-hub-activate__actions {
  margin: 0.5rem 0 0;
}
.curriculum-hub-status-msg.message-box.err {
  margin: 0.65rem 0 0;
}
.curriculum-hub-status-msg.message-box.err p {
  margin: 0.35rem 0 0;
}
.curriculum-hub-status-msg.message-box.err p:first-child {
  margin-top: 0;
}
.curriculum-hub-activate-error {
  margin: 0.35rem 0 0;
}
.curriculum-hub-activate-idle {
  margin: 0.25rem 0 0;
  font-size: var(--atlas-type-xs);
}
.curriculum-hub-activate__parse-hint {
  margin: 0.35rem 0 0.5rem;
  font-size: var(--atlas-type-xs);
}
.curriculum-hub-activate__unit {
  margin: 0.75rem 0 0.35rem;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--text, #1a2836);
}
.curriculum-hub-activate__unit:first-of-type {
  margin-top: 0.25rem;
}
.curriculum-hub-activate__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.curriculum-hub-activate__row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--border, #d8e0ea) 88%, transparent);
  background: var(--surface-1, #fff);
}
.curriculum-hub-activate__code {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--atlas-type-xs);
  color: var(--accent, #1b4d8c);
  text-align: left;
}
.curriculum-hub-activate__code--muted {
  color: var(--muted, #5a6a7a);
  font-weight: 500;
}
.curriculum-hub-activate__title {
  font-size: var(--atlas-type-sm);
  line-height: 1.35;
  min-width: 0;
}
.curriculum-hub-activate__tier,
.curriculum-hub-activate__tier-pill {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: var(--accent, #1b4d8c);
  margin-left: 0.35rem;
  white-space: nowrap;
}
.curriculum-hub-activate__tier--both,
.curriculum-hub-activate__tier-pill {
  color: var(--muted, #5a6a7a);
  font-weight: 500;
}
.curriculum-hub-activate__objectives-item--supplement {
  color: var(--muted, #5a6a7a);
}
.curriculum-hub-activate__meta {
  margin: 0;
  font-size: var(--atlas-type-xs);
  color: var(--muted, #5a6a7a);
}
.curriculum-hub-activate__row-main {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.65rem;
  align-items: start;
  width: 100%;
}
.curriculum-hub-activate__row-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.35rem;
}
.curriculum-hub-activate__row-main .curriculum-hub-activate__code {
  grid-row: 1;
  padding-top: 0.1rem;
}
.curriculum-hub-activate__row-main .curriculum-hub-activate__row-copy {
  grid-column: 2;
  grid-row: 1;
}
.curriculum-hub-activate__row-main .curriculum-hub-activate__toggle {
  grid-column: 3;
  grid-row: 1;
  white-space: nowrap;
  justify-self: end;
  align-self: start;
  font-size: var(--atlas-type-xs);
  padding: 0.2rem 0.55rem;
}
.curriculum-hub-activate__row-main .curriculum-hub-activate__meta {
  grid-column: 2 / -1;
  grid-row: 2;
}
.curriculum-hub-activate__row-main .curriculum-hub-activate__tier {
  margin-left: 0;
}
@media (max-width: 520px) {
  .curriculum-hub-activate__row-main {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }
  .curriculum-hub-activate__row-main .curriculum-hub-activate__row-copy {
    grid-column: 2 / -1;
  }
  .curriculum-hub-activate__row-main .curriculum-hub-activate__toggle {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    text-align: center;
  }
  .curriculum-hub-activate__row-main .curriculum-hub-activate__meta {
    grid-row: 3;
  }
}
.curriculum-hub-source,
.curriculum-hub-source-seeds {
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.curriculum-hub-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  max-width: 100%;
}
.curriculum-hub-source__edit {
  font-size: var(--atlas-type-xs);
  padding: 0.12rem 0.45rem;
  flex-shrink: 0;
}
.curriculum-hub-pdf-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  max-width: 100%;
}
.curriculum-hub-pdf-stack .curriculum-hub-source {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.curriculum-hub-source__link {
  font-weight: 500;
  font-size: inherit;
  color: var(--muted);
  text-decoration: none;
  word-break: break-word;
}
.curriculum-hub-source__link:hover {
  color: var(--accent, #1b4d8c);
  text-decoration: underline;
}
.curriculum-hub-grade-band__head .curriculum-hub-pdf-stack {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 0.15rem;
}
.curriculum-hub-source-seeds a {
  font-weight: 600;
}
.curriculum-hub-card .curriculum-hub-topics {
  margin: 0.35rem 0 0;
  padding-left: 0;
  font-size: var(--atlas-type-sm);
}
.curriculum-hub-topics--numbered {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.curriculum-hub-topics__row {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  gap: 0.35rem;
  align-items: start;
  font-size: var(--atlas-type-xs);
  line-height: 1.35;
}
.curriculum-hub-topics__code {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent, #1b4d8c);
}
.curriculum-hub-topics__code--muted {
  font-weight: 500;
  color: var(--muted, #5a6a7a);
}
.curriculum-hub-topics__title {
  min-width: 0;
  word-break: break-word;
}
.curriculum-hub-topics__row--section,
.curriculum-hub-topics__row--unit {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}
.curriculum-hub-topics__detail,
.curriculum-hub-activate__detail {
  margin: 0.15rem 0 0 2.5rem;
  font-size: var(--atlas-type-sm);
}
.curriculum-hub-topics__objectives,
.curriculum-hub-activate__objectives,
.curriculum-hub-topics--objectives {
  margin: 0.35rem 0 0.5rem;
  padding-left: 0;
  list-style: none;
}
.curriculum-hub-topics--objectives .curriculum-hub-topics__objective-line {
  position: relative;
  padding: 0.2rem 0 0.2rem 0.85rem;
  font-size: var(--atlas-type-xs);
  line-height: 1.4;
  color: var(--text, #334155);
  border-bottom: 1px solid color-mix(in srgb, var(--border, #e2e8f0) 65%, transparent);
}
.curriculum-hub-topics--objectives .curriculum-hub-topics__objective-line::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.55rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--accent, #1b4d8c);
  opacity: 0.85;
}
.curriculum-hub-topics__objectives {
  padding-left: 1.15rem;
  list-style: disc;
}
.curriculum-hub-activate__objectives {
  margin: 0.35rem 0 0.5rem;
  padding-left: 1.15rem;
  list-style: disc;
}
.curriculum-hub-activate__detail {
  margin-left: 2.25rem;
  width: calc(100% - 2.25rem);
  max-width: 100%;
}
@media (max-width: 520px) {
  .curriculum-hub-activate__detail {
    margin-left: 0;
    width: 100%;
  }
}
.curriculum-hub-outline summary {
  font-size: var(--atlas-type-sm);
}
.curriculum-hub-toolbar__actions .curriculum-hub-btn--loading {
  min-width: 2.75rem;
  justify-content: center;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.curriculum-hub-btn-spinner-icon {
  font-size: 1.35rem;
  line-height: 1;
  animation: curriculum-hub-btn-spin 0.85s linear infinite;
}
@keyframes curriculum-hub-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.profile-school-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.profile-school-row .text-input {
  flex: 1 1 auto;
  min-width: 0;
}
.profile-school-lookup-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.profile-school-lookup-results {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  border: 1px solid var(--border, #d8e0ea);
  border-radius: 0.45rem;
  max-height: 14rem;
  overflow: auto;
  background: var(--surface, #fff);
}
.profile-school-lookup-results li {
  margin: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border, #d8e0ea) 70%, transparent);
}
.profile-school-lookup-results li:last-child {
  border-bottom: 0;
}
.profile-school-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.profile-school-pick:hover,
.profile-school-pick:focus-visible {
  background: color-mix(in srgb, var(--accent, #0d9488) 12%, transparent);
}
.profile-school-pick span.hint {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--atlas-type-sm);
}
.profile-school-manual-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: var(--atlas-type-sm);
}
.profile-school-address-fields {
  margin-top: 0.65rem;
}
.profile-school-address-summary {
  margin-top: 0.35rem;
  font-weight: 500;
}

.study-timer-dock {
  --study-timer-accent: var(--brand-blue, #2563eb);
  --study-timer-accent-deep: #1e3a5f;
  --study-timer-surface: #f8fafc;
  --study-timer-glow: rgba(37, 99, 235, 0.22);
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(4.5rem + env(safe-area-inset-bottom));
  left: auto;
  top: auto;
  z-index: 8500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
  touch-action: none;
}
.study-timer-portal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  pointer-events: none;
  overflow: visible;
}
body.study-timer-scrim-open #study-timer-dock {
  z-index: 1;
  position: fixed;
  pointer-events: auto;
}
body.study-timer-scrim-open #study-timer-dock * {
  pointer-events: auto;
}
.study-timer-portal .study-timer-dock--float {
  z-index: 1;
}
.study-timer-dock--float {
  --study-timer-pill-h: 2.75rem;
  position: fixed;
  z-index: 328;
  top: calc(
    var(--app-chrome-sticky-top, env(safe-area-inset-top, 0px))
    + var(--mkt-spectrum-h, 0px)
    + (var(--app-chrome-brand-bar-h, 4rem) - var(--study-timer-pill-h)) / 2
  );
  right: max(0.85rem, env(safe-area-inset-right));
  left: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  max-width: min(18rem, calc(100vw - 1.25rem));
  pointer-events: none;
  touch-action: manipulation;
}
.study-timer-dock--float.study-timer-dock--placed {
  right: auto;
  bottom: auto;
}
.study-timer-dock--float > * {
  pointer-events: auto;
}
.study-timer-dock--float.study-timer-dock--open {
  z-index: 1;
  touch-action: manipulation;
}
.study-timer-scrim {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  pointer-events: none;
  touch-action: none;
}
body.study-timer-scrim-open .study-timer-scrim {
  display: block;
  pointer-events: auto;
}
.study-timer-dock--float > .study-timer-pill,
.study-timer-dock--float > .study-timer-panel {
  pointer-events: auto;
  touch-action: manipulation;
}
.study-timer-dock--open #study-timer-pill-wrap {
  display: none !important;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-pill {
  position: relative;
  z-index: 1;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel {
  z-index: 1;
}
html.study-timer-scrim-open,
body.study-timer-scrim-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.study-timer-dock--float .study-timer-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  left: auto;
  width: min(22rem, calc(100vw - 1.25rem));
  max-height: none;
  overflow: visible;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-pill {
  border-color: color-mix(in srgb, var(--study-timer-accent) 45%, #cbd5e1);
  box-shadow:
    0 2px 6px rgba(37, 99, 235, 0.12),
    0 10px 28px rgba(15, 23, 42, 0.12);
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--study-timer-accent) 32%, #cbd5e1);
  border-radius: 1.15rem;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--study-timer-accent) 12%, transparent),
    0 16px 40px rgba(15, 23, 42, 0.16);
  max-height: none;
  overflow: hidden;
}
.study-timer-dock--open .study-timer-panel:not(.hidden) {
  border-width: 1px;
  border-color: color-mix(in srgb, var(--study-timer-accent) 38%, #cbd5e1);
  border-radius: 1.15rem;
}
.study-timer-panel--step-1 .study-timer-panel__section:not(.study-timer-panel__section--topic) {
  display: none !important;
}
.study-timer-panel--step-2 .study-timer-panel__section--topic {
  display: none !important;
}
.study-timer-panel--session-active .study-timer-panel__body {
  display: none !important;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel--session-active {
  min-height: var(--study-timer-panel-locked-h, auto);
}
.study-timer-panel__session-topic {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 0;
  padding: 0.5rem 0.95rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--study-timer-accent) 6%, #f8fafc) 100%);
}
.study-timer-panel__session-topic.hidden {
  display: none !important;
}
.study-timer-panel__session-topic-label {
  margin: 0 0 0.4rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  text-align: center;
}
.study-timer-panel__session-topic-text {
  margin: 0;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  text-align: center;
  word-break: break-word;
}
.study-timer-setup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}
.study-timer-panel--step-2 .study-timer-setup-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
.study-timer-panel--step-2 .study-timer-setup-actions__back {
  align-self: flex-start;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
}
.study-timer-panel--step-2 .study-timer-setup-actions__start {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.62rem 1rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  border-radius: 0.65rem;
}
.study-timer-panel--step-1 .study-timer-setup-actions__next {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.62rem 1rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
  border-radius: 0.65rem;
}
.study-timer-panel--session-active .study-timer-setup-actions {
  display: none !important;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__header {
  align-items: stretch;
  gap: 0.5rem;
  min-height: 0;
  padding: 0 0.75rem 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--study-timer-accent) 12%, #fff) 0%, transparent 100%);
  border-bottom-color: color-mix(in srgb, var(--study-timer-accent) 22%, #e2e8f0);
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__brand {
  flex: 1;
  align-items: center;
  align-self: center;
  min-width: 0;
  min-height: 0;
  padding: 0.55rem 0 0.55rem 0.5rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__close {
  align-self: center;
  margin: 0.55rem 0;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__brand-icon {
  font-size: 2.1rem;
  margin-top: 0;
  line-height: 1;
}
.study-timer-panel__header .study-timer-panel__drag {
  align-self: stretch;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid color-mix(in srgb, var(--study-timer-accent) 22%, #e2e8f0);
  border-radius: 1.15rem 0 0 0;
  background: color-mix(in srgb, var(--study-timer-accent) 10%, #f1f5f9);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.65);
  color: #64748b;
  touch-action: none;
  cursor: grab;
}
.study-timer-panel__header .study-timer-panel__drag:hover {
  background: color-mix(in srgb, var(--study-timer-accent) 14%, #f1f5f9);
  color: #0f172a;
}
.study-timer-panel__header .study-timer-panel__drag:active {
  cursor: grabbing;
}
.study-timer-panel__header .study-timer-pill__drag.study-timer-panel__drag {
  padding: 0;
}
.study-timer-panel__header .study-timer-panel__drag .material-symbols-outlined {
  font-size: 1.2rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__clock-card {
  padding: 0.65rem 0.85rem 0.6rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--study-timer-accent) 18%, #fff) 0%, transparent 75%);
  border-bottom-color: color-mix(in srgb, var(--study-timer-accent) 18%, #e2e8f0);
}
.study-timer-dock--float.study-timer-dock--open .study-timer-display {
  font-size: 3.15rem;
  line-height: 1.05;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__body {
  flex: 0 0 auto;
  overflow: visible;
  padding: 0.5rem 0.85rem 0.55rem;
  gap: 0.5rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__section-title {
  margin-bottom: 0.3rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-mode__btn {
  padding: 0.38rem 0.5rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-topic-kind {
  margin-bottom: 0.35rem;
  gap: 0.25rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-topic-kind__btn {
  padding: 0.38rem 0.3rem;
}
.study-timer-dock--float.study-timer-dock--open .study-timer-panel__footer {
  padding: 0.5rem 0.85rem 0.7rem;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--study-timer-accent) 8%, #f8fafc);
  border-top-color: color-mix(in srgb, var(--study-timer-accent) 20%, #e2e8f0);
}
.study-timer-dock--float.study-timer-dock--open .study-timer-actions__primary {
  padding: 0.52rem 0.85rem;
  font-size: var(--atlas-type-sm);
}
@media (min-width: 641px) {
  .study-timer-dock--float:not(.study-timer-dock--placed) {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    align-items: center;
    max-width: none;
    width: max-content;
  }
  .study-timer-dock--float:not(.study-timer-dock--placed):not(.study-timer-dock--open) .study-timer-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .study-timer-dock--float.study-timer-dock--placed,
  .study-timer-dock--float.study-timer-dock--open:not(.study-timer-dock--placed) {
    transform: none;
  }
  .study-timer-dock--float.study-timer-dock--open:not(.study-timer-dock--placed) .study-timer-panel {
    left: auto;
    right: auto;
    transform: none;
  }
}
.study-timer-dock.hidden {
  display: none !important;
}
.study-timer-dock:not(.study-timer-dock--float) > * {
  pointer-events: auto;
}
.study-timer-dock--dragging {
  user-select: none;
}
.study-timer-dock--dragging .study-timer-pill {
  box-shadow: 0 16px 40px var(--study-timer-glow);
}
.study-timer-dock--active .study-timer-pill {
  box-shadow: 0 8px 28px var(--study-timer-glow), 0 0 0 2px color-mix(in srgb, var(--study-timer-accent) 55%, transparent);
}
.study-timer-dock--paused .study-timer-pill__time {
  opacity: 0.72;
}
.study-timer-dock--focus .study-timer-pill__icon {
  color: #eab308;
}
.study-timer-pill {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 8px 24px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}
.study-timer-pill__drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.35rem;
  border: 0;
  border-right: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  cursor: grab;
  font: inherit;
  touch-action: none;
  flex-shrink: 0;
}
.study-timer-pill__drag:active {
  cursor: grabbing;
}
.study-timer-pill__drag .material-symbols-outlined {
  font-size: 1.15rem;
}
.study-timer-pill__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem 0.45rem 0.55rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: #0f172a;
  min-width: 0;
}
.study-timer-pill__toggle:hover {
  background: #f8fafc;
}
.study-timer-pill__main {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}
.study-timer-pill__icon {
  font-size: 1.4rem;
  color: var(--study-timer-accent);
  flex-shrink: 0;
}
.study-timer-pill__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
  font-weight: 700;
  font-size: var(--atlas-type-sm);
  color: #0f172a;
  white-space: nowrap;
}
.study-timer-pill__label-short {
  display: none;
}
.study-timer-dock--running .study-timer-pill__label {
  display: none;
}
.study-timer-pill__chev {
  font-size: 1.25rem;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.study-timer-dock--open .study-timer-pill__chev {
  transform: rotate(180deg);
}
.study-timer-pill__topic {
  font-size: var(--atlas-type-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(12rem, 38vw);
  flex: 0 1 auto;
  min-width: 0;
}
.study-timer-pill__topic.hidden,
.study-timer-pill__topic:empty {
  display: none !important;
}
.study-timer-dock--pill-topic .study-timer-pill {
  max-width: min(20rem, calc(100vw - 2rem));
}
.study-timer-pill__time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: var(--atlas-type-md);
  color: var(--study-timer-accent-deep);
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
  line-height: 1.2;
  min-width: 3.35rem;
  text-align: center;
}
.study-timer-dock--active .study-timer-pill__time {
  background: #dbeafe;
  border-color: #93c5fd;
}
.study-timer-dock--pill-today:not(.study-timer-dock--open) .study-timer-pill__time {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
.study-history-summary {
  margin-bottom: 0.65rem;
}
.study-history-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.study-history-range {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.study-history-range--active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.study-history-actions {
  margin-bottom: 0.85rem;
}
.study-history-duration,
.study-history-when {
  font-variant-numeric: tabular-nums;
}
.study-timer-panel {
  display: flex;
  flex-direction: column;
  width: min(20rem, calc(100vw - 1.25rem));
  max-height: min(82vh, 28rem);
  padding: 0;
  border-radius: 1rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.04),
    0 20px 50px rgba(15, 23, 42, 0.14);
  box-sizing: border-box;
  overflow: hidden;
}
.study-timer-panel.hidden {
  display: none;
}
.study-timer-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.study-timer-panel__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-width: 0;
}
.study-timer-panel__brand-icon {
  font-size: 1.65rem;
  color: var(--study-timer-accent);
  margin-top: 0.1rem;
}
.study-timer-panel__title {
  margin: 0;
  font-size: var(--atlas-type-lg);
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}
.study-timer-panel__subtitle {
  margin: 0.15rem 0 0;
  font-size: var(--atlas-type-sm);
  line-height: 1.35;
  color: #64748b;
}
.study-timer-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}
.study-timer-panel__close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.study-timer-panel__close .material-symbols-outlined {
  font-size: 1.2rem;
}
.study-timer-panel__clock-card {
  padding: 1rem 1rem 0.85rem;
  text-align: center;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 85%);
  border-bottom: 1px solid #e2e8f0;
}
.study-timer-display {
  font-size: 2.75rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.1;
}
.study-timer-panel__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.study-timer-panel__section {
  margin: 0;
}
.study-timer-panel__section-title {
  margin: 0 0 0.45rem;
  font-size: var(--atlas-type-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.study-timer-panel__section.hidden {
  display: none;
}
.study-timer-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 0.6rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.study-timer-mode__btn {
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #475569;
}
.study-timer-mode__btn--active {
  background: #fff;
  color: var(--study-timer-accent-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.study-timer-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.study-timer-presets.hidden {
  display: none;
}
.study-timer-presets__chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: var(--atlas-type-sm);
  font-weight: 700;
  color: #334155;
}
.study-timer-presets__unit {
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #64748b;
}
.study-timer-presets__chip--active {
  background: var(--study-timer-accent);
  color: #fff;
  border-color: var(--study-timer-accent);
}
.study-timer-presets__chip--active .study-timer-presets__unit {
  color: color-mix(in srgb, #fff 78%, var(--study-timer-accent));
}
.study-timer-presets__custom {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 5.5rem;
  min-width: 5.5rem;
}
.study-timer-presets__custom .text-input {
  width: 3.25rem;
  padding: 0.4rem 0.45rem;
  text-align: center;
  font-weight: 700;
}
.study-timer-topic-kind {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}
.study-timer-topic-kind__btn {
  padding: 0.45rem 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  background: #f8fafc;
  font: inherit;
  font-size: var(--atlas-type-xs);
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  line-height: 1.2;
}
.study-timer-topic-kind__btn--active {
  border-color: color-mix(in srgb, var(--study-timer-accent) 45%, #e2e8f0);
  background: #eff6ff;
  color: var(--study-timer-accent-deep);
}
.study-timer-topic-pick-wrap {
  margin: 0;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}
.study-timer-topic-pick-wrap:focus-within {
  border-color: color-mix(in srgb, var(--study-timer-accent) 38%, #e2e8f0);
  background: #fff;
  box-shadow:
    0 0 0 3px var(--study-timer-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.study-timer-topic-pick,
.study-timer-topic-free {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 2.15rem 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  font: inherit;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  line-height: 1.35;
  color: #334155;
  min-height: 2.35rem;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.study-timer-topic-pick {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.24 4.5a.75.75 0 01-1.08 0l-4.24-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1rem auto;
}
.study-timer-topic-free {
  padding-right: 0.7rem;
  cursor: text;
  background-image: none;
}
.study-timer-topic-pick:focus,
.study-timer-topic-free:focus {
  outline: none;
}
.study-timer-topic-pick:disabled,
.study-timer-topic-free:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}
.study-timer-panel__footer {
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.study-timer-panel__today {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.study-timer-panel__today-icon {
  font-size: 1.15rem;
  color: var(--study-timer-accent);
}
.study-timer-today {
  margin: 0;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  color: #334155;
}
.study-timer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.study-timer-actions__primary {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: var(--atlas-type-md);
  font-weight: 700;
}
.study-timer-actions__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.study-timer-actions__row > .primary,
.study-timer-actions__row > .btn-tone-action,
.study-timer-actions__row > .btn-tone-action-soft {
  flex: 1 1 calc(50% - 0.2rem);
  min-width: 0;
  justify-content: center;
}
.study-timer-focus-done {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border-radius: 0.45rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
  line-height: 1.4;
}
.study-timer-msg {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 0.45rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: var(--atlas-type-sm);
  font-weight: 600;
}
.study-timer-msg.hidden,
.study-timer-focus-done.hidden,
.study-timer-break.hidden {
  display: none;
}
.study-timer-dock .study-timer-actions .primary {
  background: var(--study-timer-accent);
  border-color: color-mix(in srgb, var(--study-timer-accent) 80%, #0f172a);
}
.study-timer-dock .study-timer-actions .primary:hover {
  background: var(--study-timer-accent-deep);
}
.study-timer-break {
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.study-timer-break__label {
  display: block;
  font-size: var(--atlas-type-sm);
  color: #92400e;
  font-weight: 600;
}
.study-timer-break__actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.45rem;
}
@media (max-width: 900px) and (min-width: 641px) {
  .study-timer-pill__label-long {
    display: none;
  }
  .study-timer-pill__label-short {
    display: inline;
  }
  .study-timer-dock--float .study-timer-pill__topic {
    max-width: min(9rem, 32vw);
  }
  .study-timer-dock--float .study-timer-panel {
    width: min(20rem, calc(100vw - 1rem));
  }
}
@media (max-width: 640px) {
  .study-timer-dock--float:not(.study-timer-dock--placed) {
    left: auto;
    transform: none;
    right: max(0.55rem, env(safe-area-inset-right));
    max-width: none;
    width: max-content;
    align-items: flex-end;
  }
  .study-timer-pill__label-long {
    display: none;
  }
  .study-timer-pill__label-short {
    display: inline;
  }
}
@media (max-width: 640px) {
  .study-timer-dock:not(.study-timer-dock--float):not(.study-timer-dock--placed) {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    align-items: stretch;
  }
  .study-timer-dock:not(.study-timer-dock--float):not(.study-timer-dock--placed) .study-timer-pill {
    width: 100%;
  }
  .study-timer-dock--placed:not(.study-timer-dock--float) {
    align-items: flex-end;
    max-width: calc(100vw - 1rem);
  }
  .study-timer-pill__toggle {
    flex: 1;
    justify-content: center;
  }
  .study-timer-pill__topic {
    max-width: 7rem;
  }
}
