:root {
  --zc-brand-800: #073653;
  --zc-brand-700: #084568;
  --zc-brand-600: #0a527f;
  --zc-brand-100: #d8e9f1;
  --zc-brand-050: #ebf4f7;
  --zc-canvas: #f4f4f1;
  --zc-surface: #fcfdfd;
  --zc-surface-muted: #e9edee;
  --zc-ink: #17242c;
  --zc-muted: #55656f;
  --zc-line: #ced7da;
  --zc-line-strong: #aebdc3;
  --zc-focus: #087ca5;
  --zc-positive: #176b49;
  --zc-positive-bg: #e4f2eb;
  --zc-warning: #825c08;
  --zc-warning-bg: #f8efd7;
  --zc-danger: #a43b30;
  --zc-danger-bg: #f8e9e6;
  --zc-radius-control: 10px;
  --zc-radius-panel: 16px;
  --zc-shadow-panel: 0 18px 42px -30px rgba(7, 54, 83, .38);
  --zc-shadow-menu: 0 20px 50px -24px rgba(7, 54, 83, .42);
  --zc-header-height: 64px;
  --zc-student-nav: 236px;
  --zc-instructor-nav: 252px;
  /* BUG-2302 (owner, 2026-10-02): every sidebar page and every tab takes its
     page width from these two values and nothing else -- one for staff, one
     for students. 1240px is the Plan tab's page (the owner's "normal",
     A-plan-and-publish.html:9 `.wrap{max-width:1240px}`); it does not bind on
     the owner's 1536px laptop, where every staff page fills the column as
     Plan, Arcane Crest and Coin Economy already did. Do not add a per-page
     max-width on top of it; narrow reading measures inside a page are fine. */
  --zc-content-max: 1240px;
  --zc-student-content-max: 1080px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--zc-ink);
  background: var(--zc-canvas);
  font-family:
    "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body * {
  box-sizing: border-box;
}

body button,
body input,
body select {
  font: inherit;
}

body button,
body a,
body select {
  -webkit-tap-highlight-color: transparent;
}

body :focus-visible {
  outline: 3px solid var(--zc-focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--zc-radius-control);
  color: var(--zc-surface);
  background: var(--zc-brand-800);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.terminal-frame:not(.terminal-frame--auth) {
  --zc-nav-width: var(--zc-student-nav);
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--zc-nav-width) minmax(0, 1fr);
  grid-template-rows: var(--zc-header-height) minmax(0, 1fr);
}

body[data-density="instructor"] .terminal-frame {
  --zc-nav-width: var(--zc-instructor-nav);
}

body[data-shell-mode="gate"] .terminal-frame:not(.terminal-frame--auth) {
  grid-template-columns: minmax(0, 1fr);
}

.terminal-frame--auth {
  min-height: 100dvh;
}

.terminal-header {
  grid-column: 1 / -1;
  position: sticky;
  top: 0;
  z-index: 40;
  min-width: 0;
  height: var(--zc-header-height);
  display: grid;
  grid-template-columns:
    var(--zc-nav-width) minmax(230px, 1fr) minmax(260px, 520px) auto;
  align-items: center;
  border-bottom: 1px solid var(--zc-line);
  background: rgba(252, 253, 253, .98);
}

body[data-shell-mode="gate"] .terminal-header {
  grid-template-columns: 236px minmax(0, 1fr) auto;
}

.terminal-brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-right: 1px solid var(--zc-line);
  color: var(--zc-ink);
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.terminal-brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.terminal-brand small {
  display: block;
  color: var(--zc-muted);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.terminal-course {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.terminal-course-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--zc-surface);
  background: var(--zc-brand-700);
  font-size: 0.75rem;
  font-weight: 800;
}

.terminal-course-copy {
  min-width: 0;
  flex: 0 1 auto;
}

.terminal-course-copy strong,
.terminal-course-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-course-copy strong {
  font-size: 0.8125rem;
}

.terminal-course-copy span {
  color: var(--zc-muted);
  font-size: 0.6875rem;
}

.terminal-course form {
  flex: 0 0 auto;
}

.terminal-course-switch {
  min-width: 44px;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--zc-radius-control);
  color: var(--zc-brand-700);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.terminal-course-switch:hover {
  background: var(--zc-brand-050);
}

.terminal-search {
  min-width: 0;
  padding: 0 18px;
}

.terminal-search input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  color: var(--zc-muted);
  background: var(--zc-surface-muted);
}

.terminal-search input::placeholder {
  color: var(--zc-muted);
  opacity: 1;
}

.terminal-search input:disabled {
  cursor: not-allowed;
}

.terminal-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 16px;
}

.terminal-notifications {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: var(--zc-radius-control);
  color: var(--zc-muted);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
}

.terminal-notifications span {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--zc-danger);
  font-size: 0.625rem;
}

.terminal-notifications:hover,
.terminal-account-trigger:hover {
  color: var(--zc-ink);
  background: var(--zc-canvas);
}

.terminal-account-trigger {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--zc-radius-control);
  color: var(--zc-muted);
  background: transparent;
  cursor: pointer;
}

/* W8-11 / BUG-501: keep arbitrary account names within the header row. */
.terminal-account-trigger .terminal-avatar { flex: 0 0 auto; }
.terminal-account-label {
  max-width: 12ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.terminal-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--zc-surface);
  background: var(--zc-brand-700);
  font-size: 0.6875rem;
  font-weight: 800;
}

.terminal-role-nav {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: var(--zc-header-height);
  min-width: 0;
  height: calc(100dvh - var(--zc-header-height));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 14px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--zc-line);
  background: var(--zc-surface);
}

.terminal-role-caption {
  padding: 0 11px;
  color: var(--zc-muted);
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.terminal-role-nav nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* BUG-2321 (owner, 2026-10-04, "divider line"): a group label (Teach,
   Engage; Learn, Play) is a section divider, not a row. Small muted caps, then
   a hairline that runs to the list's inner edge, more space above than below.
   It is a plain span, so it is never focusable; it has no hover state and
   takes no text selection. Each label names its `.terminal-nav-group`
   (role="group") for assistive technology. Links keep their hover and
   current-page pills below. Applies to the sidebar and the phone More sheet. */
.terminal-nav-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terminal-role-nav nav .terminal-role-caption,
.terminal-more-panel nav .terminal-role-caption {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  padding: 0 0 0 11px;
  line-height: 1.5;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.terminal-role-nav nav .terminal-role-caption::after,
.terminal-more-panel nav .terminal-role-caption::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  height: 0;
  border-top: 1px solid var(--zc-line);
}

.terminal-role-nav nav .terminal-role-caption--group {
  margin-top: 18px;
}

.terminal-more-panel nav .terminal-nav-group + .terminal-nav-group {
  margin-top: 10px;
}

.terminal-nav-link {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--zc-radius-control);
  color: var(--zc-muted);
  font-size: 0.8125rem;
  font-weight: 720;
  text-decoration: none;
}

.terminal-nav-link:hover {
  color: var(--zc-ink);
  background: var(--zc-canvas);
}

.terminal-nav-link[aria-current="page"] {
  color: var(--zc-brand-700);
  background: var(--zc-brand-050);
  box-shadow: inset 3px 0 0 var(--zc-brand-600);
}

.terminal-nav-link small {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--zc-brand-700);
  background: var(--zc-brand-100);
  font-size: 0.625rem;
}

.terminal-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 32px clamp(24px, 3vw, 48px) 56px;
  overflow: visible;
  background: var(--zc-canvas);
}

body[data-shell-mode="gate"] .terminal-main,
.terminal-frame--auth .terminal-main {
  grid-column: 1;
}

.terminal-content {
  width: min(100%, var(--zc-content-max));
  margin: 0 auto;
}

body[data-density="student"] .terminal-content {
  max-width: var(--zc-student-content-max);
}

.terminal-messages {
  width: min(100%, var(--zc-content-max));
  display: grid;
  gap: 8px;
  margin: 0 auto 22px;
}

body[data-density="student"] .terminal-messages {
  max-width: var(--zc-student-content-max);
}

.terminal-message {
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--zc-brand-100);
  border-inline-start: 4px solid var(--zc-brand-600);
  border-radius: var(--zc-radius-control);
  color: var(--zc-brand-800);
  background: var(--zc-brand-050);
  overflow-wrap: anywhere;
}

.terminal-message.success {
  border-color: #abd1bd;
  border-inline-start-color: var(--zc-positive);
  color: var(--zc-positive);
  background: var(--zc-positive-bg);
}

.terminal-message.warning {
  border-color: #d8bb74;
  border-inline-start-color: var(--zc-warning);
  color: var(--zc-warning);
  background: var(--zc-warning-bg);
}

.terminal-message.error {
  border-color: #dfb2ab;
  border-inline-start-color: var(--zc-danger);
  color: var(--zc-danger);
  background: var(--zc-danger-bg);
}

.terminal-preview-banner {
  width: min(100%, var(--zc-content-max));
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 auto 22px;
  padding: 12px 14px;
  border: 1px solid #d8bb74;
  border-radius: var(--zc-radius-control);
  color: #5d4308;
  background: var(--zc-warning-bg);
}

body[data-density="student"] .terminal-preview-banner {
  max-width: var(--zc-student-content-max);
}

/* TB-341 / DS-070: progressive floating notes on the material reader. */
.reading-notes-toggle { display: none; }
.reading-notes-widget.is-enhanced {
  position: fixed;
  inset: calc(var(--zc-header-height) + 20px) 20px 20px auto;
  z-index: 46;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  pointer-events: none;
}
body[data-reader-view="true"] .reading-notes-widget.is-enhanced {
  inset-block-start: 20px;
}
.reading-notes-widget.is-enhanced > * { pointer-events: auto; }
.reading-notes-widget.is-enhanced .reading-notes-panel {
  position: static;
  width: clamp(320px, 26vw, 380px);
  max-height: 100%;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-menu);
}
.reading-notes-widget.is-enhanced .reading-notes-panel[hidden] { display: none; }
.reading-notes-toggle {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  place-items: center;
  padding: 5px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--zc-brand-700);
  box-shadow: 0 8px 24px rgba(7, 54, 83, .34);
  cursor: pointer;
}
.reading-notes-widget.is-enhanced .reading-notes-toggle { display: grid; }
.reading-notes-toggle img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}
.reading-notes-toggle:focus-visible {
  outline: 3px solid var(--zc-focus);
  outline-offset: 3px;
}
.reading-notes-widget.is-enhanced textarea[data-note-autosave] {
  width: 100%;
  min-height: 260px;
}

@media screen and (max-width: 899px) {
  html:has(.reading-notes-widget.is-enhanced) {
    scrollbar-width: none;
  }
  html:has(.reading-notes-widget.is-enhanced)::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
  .reading-notes-widget.is-enhanced {
    inset: auto 20px calc(76px + env(safe-area-inset-bottom)) 20px;
    max-height: calc(100dvh - var(--zc-header-height) - 96px - env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  body[data-reader-view="true"] .reading-notes-widget.is-enhanced {
    inset-block-end: calc(12px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
  }
  .reading-notes-widget.is-enhanced .reading-notes-panel {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: calc(100% - 68px);
  }
  .reading-notes-widget.is-enhanced textarea[data-note-autosave] {
    min-height: 180px;
    max-height: 34dvh;
  }
}

.terminal-preview-banner div {
  min-width: 0;
  flex: 1;
}

.terminal-preview-banner strong,
.terminal-preview-banner span,
.terminal-preview-banner small {
  display: block;
}

.terminal-preview-banner strong {
  font-size: 0.8125rem;
}

.terminal-preview-banner span {
  margin-top: 2px;
  font-size: 0.75rem;
  font-weight: 700;
}

.terminal-preview-banner small {
  margin-top: 2px;
  color: #6c5114;
  font-size: 0.6875rem;
}

.terminal-preview-banner form {
  flex: 0 0 auto;
}

.terminal-preview-banner button,
.terminal-account-panel button,
.terminal-more-panel button {
  min-height: 44px;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  color: var(--zc-brand-700);
  background: var(--zc-surface);
  font-weight: 750;
  cursor: pointer;
}

.terminal-preview-banner button {
  padding: 0 14px;
}

.terminal-account-panel {
  position: fixed;
  top: calc(var(--zc-header-height) + 8px);
  right: 14px;
  z-index: 70;
  width: min(360px, calc(100% - 28px));
  max-height: calc(100dvh - var(--zc-header-height) - 24px);
  padding: 12px;
  overflow-y: auto;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-menu);
}

.terminal-account-panel[hidden],
.terminal-more-panel[hidden] {
  display: none;
}

[data-terminal-modal-background][aria-hidden="true"] {
  pointer-events: none;
  user-select: none;
}

.terminal-account-identity {
  padding: 5px 7px 12px;
  border-bottom: 1px solid var(--zc-line);
}

.terminal-account-identity strong,
.terminal-account-identity span {
  display: block;
}

.terminal-account-identity span {
  color: var(--zc-muted);
  font-size: 0.6875rem;
}

.terminal-account-panel form {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px 0 0;
}

.terminal-account-panel form + form {
  margin-top: 8px;
  border-top: 1px solid var(--zc-line);
}

.terminal-account-panel label {
  color: var(--zc-muted);
  font-size: 0.6875rem;
  font-weight: 700;
}

.terminal-account-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  color: var(--zc-ink);
  background: var(--zc-surface);
}

.terminal-account-panel button {
  width: 100%;
  padding: 0 12px;
  text-align: left;
}

.terminal-account-panel button:hover,
.terminal-more-panel button:hover {
  border-color: var(--zc-brand-600);
  background: var(--zc-brand-050);
}

.terminal-mobile-nav,
.terminal-more-panel,
.terminal-scrim {
  display: none;
}

.terminal-state {
  max-width: 680px;
  padding: 22px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  color: var(--zc-ink);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}

.terminal-state h2 {
  margin: 0;
  font-size: 1.1875rem;
}

.terminal-state p {
  margin: 7px 0 0;
  color: var(--zc-muted);
}

.terminal-state--loading {
  min-height: 120px;
  color: var(--zc-muted);
  background:
    linear-gradient(
      100deg,
      var(--zc-surface-muted) 20%,
      var(--zc-surface) 35%,
      var(--zc-surface-muted) 50%
    );
  background-size: 240% 100%;
}

.terminal-state--error,
.terminal-state--unavailable {
  border-color: #ddb2ab;
  color: var(--zc-danger);
  background: var(--zc-danger-bg);
}

.terminal-state--success {
  border-color: #a7cfba;
  color: var(--zc-positive);
  background: var(--zc-positive-bg);
}

.terminal-state [disabled],
.terminal-state--disabled {
  color: var(--zc-muted);
  background: var(--zc-surface-muted);
  cursor: not-allowed;
}

/* TB-273: controlled student Course Home. */
.course-home {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 28px;
  overflow-wrap: anywhere;
}

.course-home > *,
.course-home-hero-grid > *,
.course-home-details-grid > *,
.course-home-moment-list > * {
  min-width: 0;
}

.course-home-hero {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(8, 69, 104, .32);
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(
      circle at 92% 18%,
      rgba(216, 233, 241, .2) 0 12%,
      transparent 12.5%
    ),
    linear-gradient(135deg, var(--zc-brand-800), var(--zc-brand-600));
  box-shadow: 0 24px 58px -38px rgba(7, 54, 83, .72);
}

.course-home-hero-media,
.course-home-hero-media img,
.course-home-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.course-home-hero-media {
  z-index: -2;
}

.course-home-hero-media img {
  object-fit: cover;
  object-position: center;
}

.course-home-hero-overlay {
  z-index: 1;
  background:
    linear-gradient(
      105deg,
      rgba(7, 42, 63, .92) 0%,
      rgba(7, 54, 83, .79) 55%,
      rgba(7, 54, 83, .62) 100%
    );
}

.course-home-hero-overlay--strong {
  background:
    linear-gradient(
      105deg,
      rgba(5, 34, 52, .95) 0%,
      rgba(7, 54, 83, .86) 58%,
      rgba(7, 54, 83, .7) 100%
    );
}

.course-home-hero-grid {
  position: relative;
  z-index: 1;
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(30px, 5vw, 58px);
}

.course-home-hero-copy {
  max-width: 68ch;
}

.course-home-kicker {
  margin: 0 0 8px;
  color: inherit;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.course-home-hero h1 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.125rem, 4.2vw, 3.625rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.04;
}

.course-home-welcome {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
}

.course-home-orientation {
  max-width: 58ch;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.course-home-next {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: var(--zc-radius-panel);
  background: rgba(4, 35, 53, .48);
  box-shadow: 0 18px 42px -30px rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
}

.course-home-primary-action,
.course-home-preview-edit button {
  min-height: 44px;
  border-radius: var(--zc-radius-control);
  font-weight: 800;
}

.course-home-primary-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 2px solid #fff;
  color: var(--zc-brand-800);
  background: #fff;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.course-home-primary-action:hover {
  color: var(--zc-brand-800);
  background: var(--zc-brand-050);
}

.course-home-primary-action--disabled,
.course-home-primary-action--disabled:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .14);
  cursor: not-allowed;
}

.course-home-action-detail {
  margin: 11px 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: 0.8125rem;
  line-height: 1.55;
}

.course-home-preview-tools {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 0 clamp(30px, 5vw, 58px) 24px;
}

.course-home-preview-edit {
  margin: 0;
}

.course-home-preview-edit button {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, .54);
  color: #fff;
  background: rgba(4, 35, 53, .58);
  cursor: pointer;
}

.course-home-region {
  min-width: 0;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}

.course-home-region-heading {
  margin-bottom: 18px;
}

.course-home-region-heading .course-home-kicker {
  color: var(--zc-brand-600);
}

.course-home-region h2 {
  margin: 0;
  color: var(--zc-ink);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  letter-spacing: -.02em;
  line-height: 1.2;
}

.course-home-region h3 {
  margin: 0;
  color: var(--zc-ink);
  font-size: 1.0625rem;
  line-height: 1.35;
}

.course-home-moment-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-home-moment {
  min-width: 0;
  margin: 0;
  padding: 2px 22px;
}

.course-home-moment:first-child {
  padding-left: 0;
}

.course-home-moment + .course-home-moment {
  border-left: 1px solid var(--zc-line);
}

.course-home-moment:last-child {
  padding-right: 0;
}

.course-home-moment-label {
  margin: 0 0 7px;
  color: var(--zc-brand-600);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.course-home-moment-value,
.course-home-instructor-email {
  margin: 0;
}

.course-home-moment-value {
  color: var(--zc-ink);
  font-weight: 650;
  line-height: 1.55;
}

.course-home-moment-value time {
  display: block;
  margin-top: 4px;
  color: var(--zc-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.course-home-moment .course-home-richtext {
  margin-top: 8px;
}

/* TB-359: the viewer's own section's meeting facts. */
.course-home-meeting-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.course-home-meeting-fact > dt {
  margin: 0 0 7px;
  color: var(--zc-brand-600);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.course-home-meeting-fact > dd {
  margin: 0;
  color: var(--zc-ink);
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.course-home-meeting-timezone {
  display: block;
  margin-top: 4px;
  color: var(--zc-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.course-home-meeting-fact--exceptions {
  grid-column: 1 / -1;
}

.course-home-meeting-fact--exceptions > dd {
  max-width: 68ch;
  font-weight: 500;
}

.course-home-details-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}

.course-home-instructor > h3 {
  font-size: 1.1875rem;
}

.course-home-instructor-email {
  margin-top: 7px;
}

.course-home-instructor-email a,
.course-home-richtext a {
  color: var(--zc-brand-600);
  font-weight: 700;
  text-underline-offset: 3px;
}

.course-home-richtext {
  max-width: 68ch;
  margin-top: 16px;
  color: var(--zc-ink);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.course-home-richtext > :first-child {
  margin-top: 0;
}

.course-home-richtext > :last-child {
  margin-bottom: 0;
}

.course-home-richtext img,
.course-home-richtext iframe,
.course-home-richtext table {
  max-width: 100%;
}

.course-home-richtext table {
  display: block;
  overflow-x: auto;
}

.course-home-link-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-home-link-list a {
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  color: var(--zc-brand-700);
  background: var(--zc-brand-050);
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
}

.course-home-link-list a:hover {
  border-color: var(--zc-brand-600);
  background: #fff;
}

.course-home-link-list small {
  color: var(--zc-muted);
  font-size: 0.6875rem;
  font-weight: 600;
}

.course-home-optional {
  max-width: 100%;
}

/* BUG-494 REDESIGN MARKER -- see the block at `.terminal-help-link,
   .terminal-notifications, .terminal-search-link` further down for the whole
   argument. Two rules used to live here and both are deleted rather than
   layered over:

     .terminal-notifications { width: 44px; overflow: hidden;
                               color: transparent; }
     .terminal-notifications span { color: #fff; }

   The first was written to collapse the control to a badge-only square. It
   never rendered: the later, unconditional `.terminal-help-link,
   .terminal-notifications, .terminal-search-link` block re-colours the label
   `var(--zc-brand-800)` at equal specificity, so from 1120px to 391px the word
   "Notifications" stayed painted inside a box sized for no label and
   `overflow-wrap: anywhere` -- inherited from `body` -- broke it one character
   at a time. Measured on this file before the change, student /course-home/
   with 7 unread: 44 x 180, ten lines, mid-word, on every width from 1120 down
   to 391. Four sessions have re-derived that this block is dead; deleting it
   is what stops a fifth.

   The second only existed to undo the first: `.terminal-notifications span`
   is already `color: #fff` unconditionally at the base rule near the top of
   this file, so removing it changes nothing. Verified by measurement, not by
   reading -- the badge computes rgb(255, 255, 255) at every sampled width
   before and after.

   The search track's floor moves 190px -> 110px in the same breath, and that
   is the declaration that keeps the page from scrolling sideways. This grid
   applies from 1120px down to 881px and its four floors have to fit inside
   881px. Giving the label its width back takes the action row from 197.6px to
   279.6px with an unread badge (measured, all three roles), and 82px is more
   slack than this grid had. The third track holds one "Search" text link that
   renders 71px inside 18px of side padding -- 107px of content in a column
   reserved for 190px to 320px. It now asks for what its control needs; the
   surplus pays for the label and the remainder goes to the course name. */
@media (max-width: 1120px) {
  .terminal-header {
    grid-template-columns:
      var(--zc-nav-width) minmax(200px, 1fr) minmax(110px, 320px) auto;
  }

  /* W8-11 / BUG-501: hide the bounded label visually, retaining the full
     link name for assistive technology and the avatar as its visible control. */
  .terminal-account-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 880px) {
  :root {
    --zc-header-height: 56px;
  }

  .terminal-frame:not(.terminal-frame--auth) {
    display: block;
    min-width: 0;
    padding-top: var(--zc-header-height);
  }

  .terminal-header,
  body[data-shell-mode="gate"] .terminal-header {
    position: fixed;
    inset: 0 0 auto;
    display: flex;
    height: var(--zc-header-height);
    padding: 0 10px;
  }

  .terminal-brand {
    flex: 0 0 auto;
    min-width: 44px;
    padding: 0 8px 0 2px;
    border-right: 0;
  }

  .terminal-brand img {
    width: 30px;
    height: 30px;
  }

  .terminal-brand span {
    display: none;
  }

  .terminal-course {
    min-width: 0;
    flex: 1;
    padding: 0 6px;
  }

  /* BUG-494: `.terminal-notifications` was the fourth selector here and is
     gone. It never took effect -- `.terminal-help-link,
     .terminal-notifications, .terminal-search-link { display: inline-flex; }`
     is later in this file at equal specificity -- so the control has been
     present below 881px for as long as that rule has existed, and this line
     said the opposite. Removing it changes no pixel (verified: the control's
     computed display is `inline-flex` at 880, 760, 600, 500, 430, 412 and 391
     both before and after); what it changes is that the file no longer claims
     a state the product has never been in. The control is meant to be here:
     it is the only route to the notification panel between 391px and 880px,
     and at 390px and below the two-row header hands over to
     `.terminal-notifications-mobile` further down. */
  .terminal-course-mark,
  .terminal-course-switch {
    display: none;
  }

  /* W8-11 / BUG-2168: retain a reachable Search link in the narrow header. */
  .terminal-search {
    display: block;
    flex: 0 0 auto;
    padding: 0;
  }
  .terminal-search .terminal-search-link { padding-inline: 8px; }

  .terminal-course-copy {
    min-width: 0;
    max-width: 100%;
  }

  .terminal-course-copy strong {
    font-size: 0.75rem;
  }

  .terminal-course-copy span {
    font-size: 0.625rem;
  }

  .terminal-header-actions {
    flex: 0 0 auto;
    padding: 0;
  }

  .terminal-role-nav {
    display: none;
  }

  .terminal-main {
    min-width: 0;
    padding:
      22px 16px
      calc(88px + env(safe-area-inset-bottom));
  }

  .terminal-content {
    min-width: 0;
  }

  .terminal-preview-banner {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .terminal-preview-banner button {
    white-space: nowrap;
  }

  .terminal-mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 45;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 6px env(safe-area-inset-bottom);
    border-top: 1px solid var(--zc-line);
    background: rgba(252, 253, 253, .98);
    box-shadow: 0 -12px 30px -26px rgba(7, 54, 83, .7);
  }

  .terminal-mobile-nav a,
  .terminal-mobile-nav button {
    min-width: 0;
    min-height: 52px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 4px 2px;
    overflow: hidden;
    border: 0;
    border-radius: var(--zc-radius-control);
    color: var(--zc-muted);
    background: transparent;
    font-size: 0.625rem;
    font-weight: 720;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .terminal-mobile-nav button {
    cursor: pointer;
  }

  .terminal-mobile-nav [aria-current="page"] {
    color: var(--zc-brand-700);
    background: var(--zc-brand-050);
  }

  .terminal-mobile-mark {
    font-size: 0.875rem;
    font-weight: 850;
    line-height: 1;
  }

  .terminal-more-panel {
    position: fixed;
    inset: auto 10px calc(70px + env(safe-area-inset-bottom));
    z-index: 70;
    max-height: min(68dvh, 560px);
    padding: 15px;
    overflow-y: auto;
    border: 1px solid var(--zc-line);
    border-radius: var(--zc-radius-panel);
    background: var(--zc-surface);
    box-shadow: var(--zc-shadow-menu);
  }

  .terminal-more-panel:not([hidden]) {
    display: block;
  }

  .terminal-more-panel header {
    margin-bottom: 8px;
    padding: 0 2px 10px;
    border-bottom: 1px solid var(--zc-line);
  }

  .terminal-more-panel h2 {
    margin: 0;
    font-size: 1.125rem;
  }

  .terminal-more-panel nav,
  .terminal-more-account {
    display: grid;
    gap: 4px;
  }

  .terminal-more-panel a,
  .terminal-more-panel button {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border-radius: var(--zc-radius-control);
    color: var(--zc-muted);
    font-size: 0.8125rem;
    font-weight: 720;
    text-decoration: none;
  }

  .terminal-more-panel a:hover,
  .terminal-more-panel a[aria-current="page"] {
    color: var(--zc-brand-700);
    background: var(--zc-brand-050);
  }

  .terminal-more-account {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--zc-line);
  }

  .terminal-more-account form {
    margin: 0;
  }

  .terminal-more-panel button {
    width: 100%;
  }

  .terminal-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(7, 54, 83, .28);
  }

  body.terminal-panel-open .terminal-scrim {
    display: block;
  }

  body.terminal-panel-open {
    overflow: hidden;
  }
}

@media (max-width: 430px) {
  .terminal-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .terminal-preview-banner {
    display: block;
  }

  .terminal-preview-banner form {
    margin-top: 10px;
  }

  .terminal-preview-banner button {
    width: 100%;
  }

  .terminal-account-panel {
    right: 10px;
    width: calc(100% - 20px);
  }
}

@media (max-width: 880px) {
  .course-home {
    gap: 20px;
  }

  .course-home-hero {
    min-height: 0;
    border-radius: var(--zc-radius-panel);
  }

  .course-home-hero-grid {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 22px;
  }

  .course-home-hero h1 {
    font-size: clamp(1.9375rem, 10vw, 2.625rem);
  }

  .course-home-next {
    padding: 20px;
  }

  .course-home-primary-action {
    width: 100%;
  }

  .course-home-preview-tools {
    justify-content: stretch;
    padding: 0 22px 22px;
  }

  .course-home-preview-edit,
  .course-home-preview-edit button {
    width: 100%;
  }

  .course-home-region {
    padding: 22px 18px;
  }

  .course-home-moment-list,
  .course-home-details-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .course-home-details-grid {
    gap: 20px;
  }

  .course-home-moment {
    padding: 18px 0;
  }

  .course-home-moment:first-child {
    padding-top: 0;
  }

  .course-home-moment:last-child {
    padding-bottom: 0;
  }

  .course-home-moment + .course-home-moment {
    border-top: 1px solid var(--zc-line);
    border-left: 0;
  }

  .course-home-link-list a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .skip-link,
  .terminal-course-switch,
  .terminal-notifications,
  .terminal-account-trigger,
  .terminal-nav-link,
  .terminal-preview-banner button,
  .terminal-account-panel,
  .terminal-account-panel button,
  .course-home-primary-action,
  .course-home-preview-edit button,
  .course-home-link-list a,
  .terminal-mobile-nav a,
  .terminal-mobile-nav button,
  .terminal-more-panel,
  .terminal-more-panel a,
  .terminal-more-panel button {
    transition:
      color 140ms ease,
      background-color 140ms ease,
      border-color 140ms ease,
      opacity 140ms ease,
      transform 100ms ease;
  }

  .terminal-state--loading {
    animation: terminal-loading 1.4s linear infinite;
  }

  .terminal-preview-banner button:active,
  .terminal-account-panel button:active,
  .terminal-mobile-nav a:active,
  .terminal-mobile-nav button:active,
  .terminal-more-panel button:active {
    transform: translateY(1px);
  }
}

@keyframes terminal-loading {
  to {
    background-position-x: -240%;
  }
}

/* TB-274 Plan & Publish: dense operations workspace, native Terminal tokens. */
.plan-publish { display: grid; gap: 20px; min-width: 0; }
.plan-publish-header { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; padding: 18px 20px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-panel); background: var(--zc-surface); }
.plan-publish-header-meta { min-width: 0; }
.plan-publish-header h1 { margin: 4px 0; }
.plan-publish-kicker, .plan-publish-row small, .plan-publish-entry small, .plan-publish-eyebrow { display: block; color: var(--zc-muted); }
.plan-publish-draft-badge { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 3px 10px; border: 1px solid var(--zc-brand-100); border-radius: 999px; color: var(--zc-brand-800); background: var(--zc-brand-050); font-size: .82rem; }
.plan-publish-draft-badge > span { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--zc-brand-600); }
.plan-publish-draft-badge.is-published { color: var(--zc-muted); background: var(--zc-surface-muted); border-color: var(--zc-line); }
.plan-publish-draft-badge.is-published > span { background: var(--zc-muted); }
.plan-publish-save-state { min-height: 18px; margin: 6px 0 0; color: var(--zc-muted); font-size: .75rem; }
.plan-publish-header-actions { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; justify-items: end; gap: 8px 10px; }
.plan-publish-header-preview { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); background: var(--zc-surface); }
.plan-publish-header-preview label { flex: 0 0 auto; color: var(--zc-muted); font-size: .82rem; font-weight: 700; }
.plan-publish-header-preview button { flex: 0 0 auto; min-width: 44px; min-height: 36px; }
.plan-publish-header-actions > .btn { white-space: nowrap; }
.plan-publish-header-note { grid-column: 1 / -1; margin: 0; color: var(--zc-muted); font-size: .75rem; text-align: right; }
.plan-publish-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.plan-publish-nav a { min-height: 44px; display: grid; place-items: center; padding: 8px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); text-align: center; }
.plan-publish-nav a[aria-current="page"] { border-color: var(--zc-brand-500); background: var(--zc-brand-050); font-weight: 700; }
.plan-publish-conflict-recovery { min-width: 0; margin-block: 18px; padding: 16px; scroll-margin-top: calc(var(--zc-header-height) + 16px); border: 1px solid var(--zc-warning); border-inline-start: 5px solid var(--zc-warning); border-radius: var(--zc-radius-control); background: var(--zc-warning-bg); font-size: .88rem; }
.plan-publish-conflict-recovery > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-publish-conflict-recovery h3, .plan-publish-conflict-recovery .plan-publish-eyebrow { margin: 0; }
.plan-publish-conflict-recovery > header > span { color: var(--zc-muted); font-variant-numeric: tabular-nums; }
.plan-publish-conflict-recovery > p, .plan-publish-plan-recovery > p, .plan-publish-assessment-recovery > p { color: var(--zc-muted); }
.plan-publish-plan-recovery { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--zc-line-strong); }
.plan-publish-assessment-recovery { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--zc-line); }
.plan-publish-assessment-recovery > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.plan-publish-assessment-recovery h3 { margin: 0; }
.plan-publish-assessment-recovery > header > span { color: var(--zc-muted); font-variant-numeric: tabular-nums; }
.plan-publish-recovery-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.plan-publish-recovery-actions > form, .plan-publish-discard { min-width: 0; padding: 14px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); background: var(--zc-surface-muted); }
.plan-publish-recovery-actions > form { display: grid; align-content: start; gap: 8px; }
.plan-publish-recovery-actions p { margin: 0; color: var(--zc-muted); }
.plan-publish-recovery-actions button { justify-self: start; min-height: 44px; }
.plan-publish-discard > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--zc-danger); font-weight: 700; }
.plan-publish-discard > form { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--zc-line); }
.plan-publish-discard label { display: flex; align-items: flex-start; gap: 8px; }
.plan-publish-discard input[type="checkbox"] { flex: 0 0 22px; width: 22px; min-height: 22px; margin-top: 1px; }
.plan-publish-discard button { border-color: var(--zc-danger); color: #fff; background: var(--zc-danger); }
.plan-publish-visibility-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--zc-warning); border-inline-start: 5px solid var(--zc-warning); border-radius: var(--zc-radius-control); background: var(--zc-warning-bg); }
.plan-publish-visibility-alert p { margin: 4px 0 0; }
.plan-publish-visibility-alert .btn { flex: 0 0 auto; }
.plan-publish-visibility-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 7px; margin-top: 4px; font-size: .85rem; }
.plan-publish-visibility-status.is-live { color: var(--zc-positive); font-weight: 700; }
.plan-publish-visibility-status.is-gated { color: var(--zc-muted); }
.plan-publish-visibility-status.is-gated > strong { color: var(--zc-ink); }
.plan-publish-status-glyph { font-size: .78rem; }
.plan-publish-status-gate { color: var(--zc-warning); font-weight: 600; }
.plan-publish-status-separator { color: var(--zc-muted); }
.plan-publish-status-remedy { display: inline-flex !important; margin: 0 !important; }
.plan-publish-status-fix { min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; color: var(--zc-brand-600) !important; background: none !important; box-shadow: none !important; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.plan-publish-issue-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.plan-publish-issue-list > li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-inline-start: 4px solid var(--zc-danger); background: var(--zc-danger-bg); }
.plan-publish-issue-list.is-warning > li { border-inline-start-color: var(--zc-warning); background: var(--zc-warning-bg); }
.plan-publish-issue-list > li.is-clear { border-inline-start-color: var(--zc-brand-500); background: var(--zc-brand-050); }
.plan-publish-issue-list p { margin: 4px 0 0; }
.plan-publish-issue-code { display: block; margin-bottom: 3px; color: var(--zc-muted); font: 700 .75rem/1.2 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.plan-publish-issue-list .btn { flex: 0 0 auto; }
.plan-publish-semester { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.plan-publish-pane, .plan-publish-single { min-width: 0; padding: 20px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-panel); background: var(--zc-surface); }
.plan-publish-reading { width: 100%; max-width: 680px; margin-inline: auto; }
.plan-publish-row, .plan-publish-entry { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--zc-line); }
.plan-publish-map { padding: 14px; }
.plan-publish-map-header, .plan-publish-workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.plan-publish-map-header h2, .plan-publish-workspace-header h2 { margin: 0; }
.plan-publish-map-header > span { color: var(--zc-muted); font-variant-numeric: tabular-nums; }
/* DS-077 — the folded week picker. The strip this replaces was a horizontal
   rail of 112px cells, so its width was O(n) in course length (2,047px at 15
   weeks, 3,983px at 30) and it scrolled sideways forever. This control is the
   same size at any course length: the list scrolls vertically inside a bounded
   panel instead. Sizes are in rem per BUG-193 so the reader's font setting is
   honoured. */
.plan-publish-week-nav { min-width: 0; margin-top: 12px; }
.ppw-bar { display: flex; align-items: stretch; gap: 6px; }
.ppw-step { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; padding: 0 0.5rem; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); text-decoration: none; font-size: 1.125rem; line-height: 1; }
/* Disabled at the ends rather than hidden, so the control never resizes as you
   move through the course (DS-077 §3.1). */
.ppw-step.is-disabled { opacity: .38; pointer-events: none; }
.ppw { position: relative; flex: 1 1 auto; min-width: 0; }
.ppw-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 2.5rem; padding: 0.375rem 0.75rem; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); cursor: pointer; list-style: none; font-weight: 600; }
.ppw-trigger::-webkit-details-marker { display: none; }
.ppw-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppw[open] .ppw-caret { transform: rotate(180deg); }
.ppw-caret { transition: transform .12s ease; }
.ppw-panel { position: absolute; z-index: 40; inset-inline: 0; margin-top: 4px; background: var(--zc-surface, #fff); border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ppw-panel-head { display: flex; align-items: center; gap: 8px; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--zc-line); }
.ppw-panel-title { flex: 0 0 auto; white-space: nowrap; font-size: 0.8125rem; font-weight: 600; color: var(--zc-muted); }
.ppw-search { flex: 1 1 auto; min-width: 0; padding: 0.25rem 0.5rem; font-size: 0.875rem; }
/* Bounded height: 30 weeks scrolls, 5 weeks does not grow a scrollbar. */
.ppw-list { max-height: 22rem; overflow-y: auto; overscroll-behavior: contain; }
.ppw-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--zc-line); text-decoration: none; }
.ppw-row:last-child { border-bottom: 0; }
.ppw-row-ordinal { font-variant-numeric: tabular-nums; font-size: 0.8125rem; color: var(--zc-muted); white-space: nowrap; }
.ppw-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppw-row-state { font-size: 0.75rem; white-space: nowrap; }
/* Course Home is the map's most-used destination (BUG-177). It stays first and
   one click away — it must not become harder to reach than it was. */
.ppw-row.is-home { font-weight: 600; grid-template-columns: 1fr; }
.ppw-row.is-selected { background: var(--zc-brand-050); box-shadow: inset 3px 0 0 var(--zc-brand-500); }
.ppw-row:hover, .ppw-row:focus-visible { background: var(--zc-brand-050); }
.ppw-empty { padding: 0.75rem; margin: 0; font-size: 0.875rem; }
/* BUG-177: Course Home carries no ordinal, so it needs no badge column and
   must not be truncated to "Cou..." - it is the map's most-used cell. It
   sizes to its own content while the numbered weeks keep the shared basis. */
.plan-publish-journey { width: 100%; }
.plan-publish-workspace-header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--zc-line); }
.plan-publish-workspace-header .plan-publish-eyebrow { margin: 0 0 4px; }
.plan-publish-week + .plan-publish-week { margin-top: 24px; }
.plan-publish-week header { display: flex; justify-content: space-between; gap: 12px; }
.plan-publish-week-tools, .plan-publish-entry-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-publish-week-tools form, .plan-publish-entry-actions form { margin: 0; }
.plan-publish-entry-actions button, .plan-publish-week-tools button, .plan-publish-filters button, .plan-publish-header-preview button, .plan-publish-library-actions button { min-width: 44px; min-height: 44px; }
.plan-publish-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.plan-publish-rename, .plan-publish-home-form, .plan-publish-new-week, .plan-publish-library-actions, .plan-publish-entry-detail form { display: grid; gap: 10px; }
.plan-publish-row > .plan-publish-home-form { flex: 1 1 0; }
.plan-publish-rename, .plan-publish-new-week, .plan-publish-entry-detail { margin-block: 14px; }
.plan-publish-journey-settings { margin-block: 18px; border-block: 1px solid var(--zc-line); }
.plan-publish-journey-settings > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; color: var(--zc-brand-800); font-weight: 700; }
.plan-publish-journey-config { display: grid; gap: 14px; padding-block: 0 16px; }
.plan-publish-journey-block-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.plan-publish-journey-block { min-width: 0; display: grid; align-content: start; gap: 10px; margin: 0; padding: 16px; border: 1px solid var(--zc-line-strong); border-radius: var(--zc-radius-control); background: var(--zc-surface-muted); }
.plan-publish-journey-block > legend { padding-inline: 6px; color: var(--zc-brand-800); font-weight: 700; }
.plan-publish-journey-block .plan-publish-help { margin: 0; }
.plan-publish-journey-save { grid-column: 1 / -1; justify-self: start; }
.plan-publish-field-row { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-publish input:not([type="hidden"]), .plan-publish select, .plan-publish textarea { width: 100%; min-height: 44px; }
.plan-publish input[type="checkbox"] { flex: 0 0 22px; width: 22px; min-height: 22px; }
.plan-publish .plan-publish-header-preview select { width: auto; min-width: 150px; min-height: 36px; }
.plan-publish-audience { display: grid; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); }
.plan-publish-audience > legend { padding-inline: 6px; font-weight: 700; }
.plan-publish-audience > label { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.plan-publish-audience input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; }
.plan-publish-audience > p { margin: 0; color: var(--zc-muted); }
.plan-publish textarea { min-height: 92px; resize: vertical; }
.plan-publish-row > *, .plan-publish-entry > *, .plan-publish-status { min-width: 0; overflow-wrap: anywhere; }
.plan-publish-destructive { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--zc-line); }
.plan-publish :focus-visible { outline: 3px solid var(--zc-focus); outline-offset: 2px; }
.plan-publish-library-grid { min-width: 0; }
.plan-publish-library-form { min-width: 0; }
.plan-publish-library-details-layer { position: fixed; z-index: 90; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: inherit; background: transparent; }
.plan-publish-library-details-layer::backdrop { background: transparent; }
.plan-publish-library-details-scrim { position: absolute; inset: 0; width: 100%; min-height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(6, 38, 58, .32); cursor: default; }
.plan-publish-library-details { position: absolute; top: calc(var(--zc-header-height) + 12px); right: 12px; bottom: 12px; width: min(520px, calc(100vw - 24px)); min-width: 0; padding: 20px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--zc-line-strong); border-radius: var(--zc-radius-panel); background: var(--zc-surface); box-shadow: var(--zc-shadow-panel); }
.plan-publish-library-inspector-header { position: sticky; z-index: 2; top: -20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -20px -20px 18px; padding: 14px 20px; border-bottom: 1px solid var(--zc-line); background: var(--zc-surface); }
.plan-publish-library-inspector h3, .plan-publish-item-inspector h2 { margin: 0; }
.plan-publish-library-inspector form, .plan-publish-item-inspector form { display: grid; gap: 10px; }
.plan-publish-library-actionbar { position: static; display: grid; grid-template-columns: minmax(150px, .7fr) minmax(180px, 1fr) max-content; gap: 10px; align-items: end; margin-bottom: 14px; padding: 12px; border: 1px solid var(--zc-line-strong); border-radius: var(--zc-radius-panel); background: var(--zc-surface); box-shadow: var(--zc-shadow-panel); }
.plan-publish-library-actionbar > div { display: grid; gap: 6px; }
.plan-publish-library-actionbar button { min-height: 44px; }
.plan-publish-library-actionbar > button { white-space: nowrap; }
.plan-publish-library-row { align-items: center; }
.plan-publish-library-row.is-placed { background: var(--zc-surface-muted); }
.plan-publish-library-main { min-width: 0; flex: 1; display: grid; gap: 2px; }
.plan-publish-library-select { display: flex; flex: 1; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.plan-publish-library-select > span { min-width: 0; }
/* BUG-132: the type statement is the primary label and must never truncate,
   even when the (near-identical) titles beside it do. */
.plan-publish-library-kind { display: block; margin: 0; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; font-weight: 700; }
.plan-publish-library-select .plan-publish-library-title { display: block; min-width: 0; }
.plan-publish-library-inspector-kind { color: var(--zc-brand-800); }
.plan-publish-library-select input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; min-height: 22px; margin: 0; }
.plan-publish-library-select input[type="checkbox"]:disabled { cursor: not-allowed; }
.plan-publish-library-select:has(input:disabled) { cursor: not-allowed; }
.plan-publish-library-actions { align-items: end; }
.plan-publish-filters [aria-pressed="true"] { border-color: var(--zc-brand-600); color: var(--zc-brand-700); background: var(--zc-brand-050); font-weight: 700; }
.plan-publish-library-groups { display: grid; gap: 14px; }
.plan-publish-library-group { min-width: 0; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); background: var(--zc-surface); }
.plan-publish-library-group > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; cursor: pointer; color: var(--zc-brand-800); background: var(--zc-brand-050); border-radius: var(--zc-radius-control); }
.plan-publish-library-group[open] > summary { border-bottom: 1px solid var(--zc-line); border-radius: var(--zc-radius-control) var(--zc-radius-control) 0 0; }
.plan-publish-library-group > summary span { color: var(--zc-muted); font-variant-numeric: tabular-nums; }
.plan-publish-library-group-items { min-width: 0; padding-inline: 14px; }
.plan-publish-library-preview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-block: 12px; }
.plan-publish-library-preview-actions p { margin: 0; }
.plan-publish-preview-unavailable { width: 100%; padding: 10px 12px; border-inline-start: 4px solid var(--zc-warning); color: var(--zc-warning); background: var(--zc-warning-bg); }
.plan-publish-material-notice { padding: 10px 12px; border-inline-start: 4px solid var(--zc-warning); color: var(--zc-warning); background: var(--zc-warning-bg); }
.plan-publish-material-manage { margin: 0 0 18px; padding: 14px; border: 1px solid var(--zc-line-strong); border-radius: var(--zc-radius-control); background: var(--zc-brand-050); }
.plan-publish-material-manage h4 { margin: 0; }
.plan-publish-material-rename-submit { justify-self: start; }
.plan-publish-material-advanced { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--zc-line); }
.plan-publish-material-advanced > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.plan-publish-material-advanced[open] { display: grid; gap: 10px; }
.plan-publish-library-item-summary { padding-top: 4px; border-top: 1px solid var(--zc-line); }
.plan-publish-material-source { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 12px; }
.plan-publish-material-source > label:has(input[type="radio"]) { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.plan-publish-material-source input[type="radio"] { width: 20px; min-height: 20px; }

/* DS-077: the map pane used to break out of its 932px container with a
   full-bleed hack (position/left/transform + 100vw width) so the horizontal
   week strip had somewhere to go. That is what pushed `.plan-publish-semester`
   to a 1,156px scrollWidth inside a 932px column — a 224px overflow at 1712,
   reported by ui_sweep on this screen before this change.

   The picker is a fixed-size control that fits the container, so the escape
   hatch is removed rather than inherited. Deleting it is the point: a full-bleed
   pane is a workaround for content that was the wrong shape. */

@media screen and (min-width: 2200px) {
  .plan-publish-library-group-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .plan-publish-journey-block-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .plan-publish-entry-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .plan-publish-entry { align-content: start; }
}

@media screen and (min-width: 3400px) {
  .plan-publish-library-group-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media screen and (max-width: 1180px) {
  .plan-publish-library-details { top: 12px; }
}

@media screen and (max-width: 880px) {
  .plan-publish-header { grid-template-columns: minmax(0, 1fr); }
  .plan-publish-header-actions { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .plan-publish-header-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 10px; }
  .plan-publish-header-preview label { grid-column: 1 / -1; }
  .plan-publish .plan-publish-header-preview select { width: 100%; min-width: 0; }
  .plan-publish-header-actions > .btn { width: 100%; }
  .plan-publish-header-note { grid-column: 1; text-align: left; }
  .plan-publish-conflict-recovery > header { display: grid; }
  .plan-publish-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-publish-semester, .plan-publish-journey-block-grid, .plan-publish-field-row, .plan-publish-recovery-actions { grid-template-columns: minmax(0, 1fr); }
  .plan-publish-map-header, .plan-publish-workspace-header { align-items: flex-start; }
  .plan-publish-row, .plan-publish-entry { flex-wrap: wrap; }
  .plan-publish button, .plan-publish a, .plan-publish input, .plan-publish select, .plan-publish summary { min-height: 44px; }
  .plan-publish-row > *, .plan-publish-entry > * { width: 100%; }
  .plan-publish-library-form { padding-bottom: 0; }
  .plan-publish-library-actionbar { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 0 0 14px; padding: 10px; }
  .plan-publish-library-actionbar > div { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .plan-publish-library-actionbar > div button { width: auto; }
  .plan-publish-library-actionbar label { min-width: 0; }
  .plan-publish-library-actionbar select, .plan-publish-library-actionbar > button { width: 100%; }
  .plan-publish-library-actionbar > button { white-space: normal; }
  .plan-publish-library-select { width: 100%; }
  .plan-publish-issue-list > li, .plan-publish-visibility-alert { align-items: stretch; flex-direction: column; }
  .plan-publish-issue-list .btn, .plan-publish-visibility-alert .btn { width: 100%; }
  .plan-publish-library-actions { display: flex; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
}

/* TB-275: semester roadmap and designed weekly learning journey. */
.journey-roadmap,
.weekly-journey {
  --journey-ink: #173f38;
  --journey-moss: #356d5d;
  --journey-sage: #dfe9dc;
  --journey-sand: #f4eee2;
  --journey-sun: #e7b657;
  --journey-coral: #c96c54;
  min-width: 0;
  display: grid;
  gap: 28px;
  color: #1e3430;
}

.journey-roadmap-hero,
.weekly-journey-hero {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr);
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  border: 1px solid rgba(53, 109, 93, .22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 12%, rgba(231, 182, 87, .3), transparent 28%),
    linear-gradient(135deg, #f8f5ec 0%, #edf3e8 58%, #dfe9dc 100%);
  box-shadow: 0 22px 60px -42px rgba(23, 63, 56, .72);
}

.journey-roadmap-hero::after,
.weekly-journey-hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -78px;
  bottom: -78px;
  border: 28px solid rgba(53, 109, 93, .12);
  border-radius: 50%;
  pointer-events: none;
}

.journey-roadmap-hero {
  grid-template-columns: minmax(0, 1fr);
}

.journey-roadmap-hero h1,
.weekly-journey-hero h1 {
  max-width: 16ch;
  margin: 6px 0 14px;
  color: var(--journey-ink);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.journey-roadmap-hero > div > p:last-child,
.journey-intro {
  max-width: 62ch;
  color: #4d625d;
  font-size: clamp(1rem, 2vw, 1.1875rem);
  line-height: 1.65;
}

.journey-kicker,
.journey-date-range,
.journey-type,
.journey-requirement {
  margin: 0;
  color: var(--journey-moss);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.journey-primary-action,
.journey-secondary-action,
.journey-card-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--journey-ink);
  border-radius: 999px;
  color: #fff;
  background: var(--journey-ink);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.journey-secondary-action {
  color: var(--journey-ink);
  background: #fff;
}

.journey-primary-action:hover,
.journey-card-action:hover {
  color: #fff;
  background: #245a4e;
}

.journey-secondary-action:hover {
  color: #fff;
  background: var(--journey-ink);
}

.journey-roadmap-hero > a {
  position: relative;
  z-index: 1;
  justify-self: end;
}

.journey-dispatch {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: clamp(18px, 3vw, 32px);
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid rgba(53, 109, 93, .24);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #f7f3e9 100%);
  box-shadow: 0 18px 46px -38px rgba(23, 63, 56, .72);
}

.journey-dispatch > div {
  min-width: 0;
}

.journey-dispatch-deadline {
  padding-inline-start: clamp(18px, 3vw, 32px);
  border-inline-start: 1px solid rgba(53, 109, 93, .22);
}

.journey-dispatch h2 {
  margin: 7px 0 10px;
  color: var(--journey-ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.journey-dispatch p:not(.journey-kicker) {
  margin: 0 0 16px;
  color: #4d625d;
  line-height: 1.55;
}

.journey-dispatch time {
  display: block;
  color: #4d625d;
  font-weight: 750;
}

.journey-dispatch time small {
  white-space: nowrap;
}

.journey-dispatch .journey-primary-action:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.journey-roadmap-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(220px, .65fr) minmax(0, 1.6fr);
  gap: clamp(24px, 5vw, 58px);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #e2e8e5;
  border-radius: 24px;
  background: #fff;
}

.journey-roadmap-summary {
  align-self: start;
  padding: 22px;
  border-radius: 18px;
  background: var(--journey-sand);
}

.journey-roadmap-summary h2,
.journey-section-heading h2,
.journey-spotlight h2,
.journey-pacing h2,
.journey-completion h2,
.journey-empty h2 {
  margin: 7px 0 12px;
  color: var(--journey-ink);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.journey-roadmap-list {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-roadmap-list::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 18px;
  width: 2px;
  background: #ccd9d4;
}

.journey-roadmap-week {
  position: relative;
}

.journey-roadmap-week a {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title state"
    "date progress";
  align-items: center;
  gap: 4px 16px;
  margin-left: 0;
  padding: 18px 18px 18px 48px;
  border: 1px solid #e0e7e4;
  border-radius: 16px;
  color: #29423d;
  background: #fff;
  text-decoration: none;
}

.journey-roadmap-week a::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #9db5ac;
  box-shadow: 0 0 0 2px #9db5ac;
}

.journey-roadmap-week.is-current a {
  border-color: var(--journey-moss);
  background: #f3f7f1;
  box-shadow: 0 14px 34px -28px rgba(23, 63, 56, .8);
}

.journey-roadmap-week.is-current a::before {
  background: var(--journey-sun);
  box-shadow: 0 0 0 2px var(--journey-moss);
}

.journey-roadmap-title { grid-area: title; color: var(--journey-ink); font-size: 1.0625rem; font-weight: 800; }
.journey-roadmap-state { grid-area: state; color: var(--journey-moss); font-weight: 800; }
.journey-roadmap-date { grid-area: date; color: #60736f; font-size: 0.8125rem; }
.journey-roadmap-progress { grid-area: progress; color: #60736f; font-size: 0.8125rem; text-align: right; }

.journey-empty,
.journey-spotlight,
.journey-pacing,
.journey-completion {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #e0e7e4;
  border-radius: 22px;
  background: #fff;
}

.journey-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  background: var(--journey-sand);
}

.journey-breadcrumb {
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #60736f;
  font-size: 0.875rem;
}

.journey-breadcrumb a {
  color: var(--journey-moss);
  font-weight: 800;
}

.weekly-journey-hero-copy {
  position: relative;
  z-index: 1;
}

.journey-progress {
  margin: 22px 0 3px;
  color: var(--journey-ink);
  font-size: 1rem;
  font-weight: 800;
}

.weekly-journey-hero-copy .journey-primary-action {
  margin-top: 12px;
}

.weekly-journey-visual {
  position: relative;
  z-index: 1;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 18px 48px -34px rgba(23, 63, 56, .8);
}

.weekly-journey-visual img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.journey-brand-surface {
  width: min(76%, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(53, 109, 93, .22);
  border-radius: 43% 57% 55% 45%;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, .85), rgba(223, 233, 220, .5)),
    var(--journey-sage);
  transform: rotate(-5deg);
}

.journey-brand-surface span {
  color: var(--journey-ink);
  font-size: clamp(4.875rem, 11vw, 8.25rem);
  font-weight: 900;
  line-height: 1;
  transform: rotate(5deg);
}

.journey-path {
  min-width: 0;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #e0e7e4;
  border-radius: 24px;
  background: #fff;
}

.journey-section-heading {
  margin-bottom: 30px;
}

.journey-phase {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 20px;
  padding-bottom: 32px;
}

.journey-phase:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 23px;
  width: 2px;
  background: #cfdbd6;
}

.journey-phase-marker {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--journey-moss);
  font-weight: 900;
}

.journey-phase-content {
  min-width: 0;
}

.journey-phase-content h3 {
  margin: 8px 0 16px;
  color: var(--journey-ink);
  font-size: 1.375rem;
}

.journey-card-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.journey-activity {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 20px;
  border: 1px solid #dfe6e3;
  border-top: 5px solid var(--journey-moss);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 32px -30px rgba(23, 63, 56, .85);
}

.journey-activity--material { border-top-color: var(--journey-moss); }
.journey-activity--quiz { border-top-color: var(--journey-coral); }
.journey-activity--module { border-top-color: #506f95; }
.journey-activity--engagement { border-top-color: var(--journey-sun); }
.journey-activity.is-complete { background: #f3f8f3; }
.journey-activity.is-optional { border-style: dashed; border-top-style: solid; }

.journey-activity > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.journey-activity h4 {
  margin: 0;
  color: var(--journey-ink);
  font-size: 1.1875rem;
  line-height: 1.25;
}

.journey-requirement { color: #6e7774; }

.journey-activity-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.journey-activity-meta div {
  display: grid;
  grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.journey-activity-meta dt {
  color: #687a75;
  font-size: 0.75rem;
  font-weight: 700;
}

.journey-activity-meta dd {
  margin: 0;
  color: #2e4540;
  font-size: 0.8125rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.journey-card-action {
  justify-self: start;
  margin-top: auto;
  color: var(--journey-ink);
  background: #fff;
}

.journey-unavailable {
  min-height: 44px;
  display: flex;
  align-items: center;
  margin: auto 0 0;
  color: #6e514a;
  font-weight: 750;
}

.journey-spotlight {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .94), rgba(244, 238, 226, .94)),
    var(--journey-sand);
}

.journey-spotlight dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 0;
}

.journey-spotlight dl div {
  padding: 17px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.journey-spotlight dt {
  color: var(--journey-moss);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.journey-spotlight dd {
  margin: 7px 0 0;
  line-height: 1.55;
}

.journey-pacing,
.journey-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.journey-preview-banner {
  padding: 11px 16px;
  border: 1px solid #cf9f3e;
  border-radius: 12px;
  color: #4f3b15;
  background: #fff2c9;
  font-weight: 800;
}

.journey-union-notice {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #8fb8aa;
  border-inline-start: 5px solid var(--journey-moss);
  border-radius: 12px;
  color: var(--journey-ink);
  background: #edf7f3;
}

.journey-union-notice strong,
.journey-union-notice span {
  overflow-wrap: anywhere;
}

.journey-audience-marker {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  color: #31594f;
  background: #edf7f3;
  font-size: .8125rem;
  line-height: 1.4;
}

.journey-audience-marker strong {
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.journey-roadmap :focus-visible,
.weekly-journey :focus-visible {
  outline: 3px solid var(--zc-focus);
  outline-offset: 3px;
}

@media screen and (max-width: 760px) {
  .journey-roadmap,
  .weekly-journey { gap: 20px; }
  .journey-roadmap-hero,
  .weekly-journey-hero,
  .journey-roadmap-layout,
  .journey-dispatch { grid-template-columns: minmax(0, 1fr); }
  .journey-roadmap-hero,
  .weekly-journey-hero { padding: 26px 20px; }
  .journey-roadmap-hero > a { width: 100%; justify-self: stretch; }
  .journey-dispatch-deadline {
    padding: 18px 0 0;
    border-inline-start: 0;
    border-top: 1px solid rgba(53, 109, 93, .22);
  }
  .weekly-journey-visual { min-height: 220px; order: -1; }
  .weekly-journey-visual img { min-height: 220px; max-height: 300px; }
  .journey-card-grid,
  .journey-spotlight dl { grid-template-columns: minmax(0, 1fr); }
  .journey-roadmap-week a {
    min-height: 96px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title state"
      "date progress";
  }
  .journey-pacing,
  .journey-completion { align-items: flex-start; flex-direction: column; }
  .journey-pacing .journey-secondary-action,
  .journey-completion .journey-secondary-action { width: 100%; }
}

@media screen and (max-width: 430px) {
  .journey-roadmap-hero h1,
  .weekly-journey-hero h1 { font-size: 2.375rem; }
  .journey-roadmap-layout,
  .journey-dispatch,
  .journey-path,
  .journey-empty,
  .journey-spotlight,
  .journey-pacing,
  .journey-completion { padding: 20px 16px; border-radius: 18px; }
  .journey-roadmap-summary { padding: 18px; }
  .journey-roadmap-week a {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "state" "date" "progress";
    padding-left: 44px;
  }
  .journey-roadmap-progress { text-align: left; }
  .journey-phase { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .journey-phase-marker { width: 38px; height: 38px; }
  .journey-phase:not(:last-child)::before { top: 38px; left: 18px; }
  .journey-activity > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .journey-type,
  .journey-requirement { overflow-wrap: normal; word-break: normal; }
  .journey-activity-meta div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .journey-activity-meta dd { text-align: left; }
  .journey-card-action { width: 100%; }
}

.focused-learning-frame {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
  padding: 10px 14px;
  border: 1px solid #cad9d3;
  border-radius: 14px;
  color: #29423d;
  background: #f3f7f1;
}

.focused-learning-context,
.focused-learning-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.focused-learning-context strong {
  color: #173f38;
}

.focused-learning-context span {
  color: #60736f;
  font-size: 0.8125rem;
}

.focused-learning-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid #9db5ac;
  border-radius: 999px;
  color: #173f38;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  text-decoration: none;
}

.focused-learning-actions .focused-learning-return {
  color: #fff;
  border-color: #173f38;
  background: #173f38;
}

.focused-learning-frame :focus-visible {
  outline: 3px solid var(--zc-focus, #c96c54);
  outline-offset: 2px;
}

@media screen and (max-width: 620px) {
  .focused-learning-frame {
    display: grid;
    gap: 8px;
  }
  .focused-learning-context {
    font-size: 0.8125rem;
  }
  .focused-learning-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focused-learning-actions .focused-learning-return {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}
/* TB-278 Assess & Respond: dense, light Terminal workspace. */
.ar-workspace,
.ar-editor,
.ar-student-contract,
.ar-response-context,
.ar-confirmation {
  width: min(100%, 1320px);
  margin-inline: auto;
  color: var(--zc-ink);
  overflow-wrap: anywhere;
}

.ar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.ar-header > :first-child { min-width: 0; }

.ar-header h1,
.ar-student-contract h1,
.ar-response-context h1,
.ar-confirmation h1 {
  margin: 2px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.ar-course {
  margin: 0;
  color: var(--zc-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ar-banner {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--zc-border);
  border-left: 4px solid var(--zc-warning);
  border-radius: 10px;
  background: var(--zc-surface);
}

.ar-editor-notices {
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--zc-positive);
  border-left: 4px solid var(--zc-positive);
  border-radius: 10px;
  background: var(--zc-surface);
}
.ar-editor-notices p { margin: 0; font-weight: 750; }
.ar-access-code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--zc-page);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.ar-switch {
  display: grid;
  /* BUG-2296 r1: equal columns, but never narrower than a tab's whole label and badge. */
  grid-template-columns: repeat(4, minmax(min-content, 1fr));
  max-width: 680px;
  margin-bottom: 14px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
  /* If the labels ever outgrow the strip, it scrolls instead of hiding a tab or badge. */
  overflow-x: auto;
}

.ar-switch a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--zc-ink);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  /* body's overflow-wrap: anywhere broke "Accommodation" mid-word; a tab label never wraps. */
  white-space: nowrap;
  overflow-wrap: normal;
}

.ar-switch a + a { border-left: 1px solid var(--zc-border); }
.ar-switch a[aria-current="page"] {
  color: var(--zc-brand-700);
  background: var(--zc-brand-050);
  box-shadow: inset 0 -3px 0 var(--zc-brand-700);
}
@media (max-width: 600px) {
  .ar-switch a { gap: 3px; padding: 6px 2px; font-size: .76rem; white-space: nowrap; }
  .ar-switch a span { margin-left: 1px; }
}

/* TB-1011: one filter bar for the Activities list. Values are the Arcane
   Crest tokens from crest-area.css / crest-tokens.css, scoped here because
   the Terminal page does not load the Crest stylesheets. */
.ar-workspace {
  --ar-crest-ink: #18352e;
  --ar-crest-evergreen: #16483b;
  --ar-crest-deep: #0d332b;
  --ar-crest-moss: #42745c;
  --ar-crest-gold: #b88935;
  --ar-crest-gold-ink: #8a6a1f;
  --ar-crest-paper: #fffdf5;
  --ar-crest-line: #d8d1bc;
  --ar-crest-soft: #e7efe9;
  --ar-crest-muted: #5c6b65;
}

.ar-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
}

.ar-segments {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: 1px solid #cbd3cd;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}

.ar-seg {
  position: relative;
  display: flex;
  min-width: 0;
  text-decoration: none;
}
.ar-seg + .ar-seg { border-left: 1px solid #e3e7e3; }
.ar-seg > span {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  color: #3d4f48;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.ar-seg-count { color: var(--ar-crest-muted); font-weight: 600; }
.ar-seg-needs_attention .ar-seg-count { color: #8e4a1c; font-weight: 800; }
.ar-seg > span:hover { background: var(--ar-crest-paper); }
.ar-seg[aria-current="page"] > span {
  background: var(--ar-crest-evergreen);
  color: #fff;
}
.ar-seg[aria-current="page"] > span .ar-seg-count { color: #e7c780; }
.ar-seg:focus-visible { outline: 0; }
.ar-seg:focus-visible > span {
  outline: 3px solid var(--zc-focus);
  outline-offset: -3px;
}

.ar-filter-field,
.ar-filter-search { display: flex; min-width: 0; }
.ar-filter-search { flex: 1 1 180px; }
.ar-filterbar select,
.ar-filterbar input[type="search"],
.ar-filter-submit {
  min-height: 44px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #bcc6c0;
  border-radius: 9px;
  background: #fff;
  color: var(--ar-crest-ink);
  font: inherit;
  font-size: .85rem;
}
.ar-filterbar input[type="search"] { width: 100%; min-width: 0; }
.ar-filter-submit {
  border-color: var(--ar-crest-evergreen);
  color: var(--ar-crest-evergreen);
  font-weight: 800;
  cursor: pointer;
}
.ar-bank-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 0 4px;
  color: var(--ar-crest-evergreen);
  font-size: .85rem;
  font-weight: 800;
}

/* TB-1011: the Activities list, stacked by status. */
.ar-list.ar-activity-list {
  border: 1px solid var(--ar-crest-line);
  border-radius: 16px;
  background: var(--ar-crest-paper);
  box-shadow: 0 10px 32px rgba(24, 53, 46, .06);
  overflow: clip;
}
.ar-group + .ar-group { border-top: 1px solid var(--ar-crest-line); }
.ar-group-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 18px 6px;
  color: var(--ar-crest-gold-ink);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ar-group-heading-count { color: var(--ar-crest-muted); letter-spacing: 0; }

.ar-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) 128px minmax(0, 1.1fr) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 18px;
  border-top: 1px solid #eee7d6;
  font-size: .85rem;
}
.ar-row:hover { background: #fffaf0; }
.ar-row-link {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.ar-row-link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.ar-row-link:focus-visible { outline: 0; }
.ar-row-link:focus-visible::after {
  outline: 3px solid var(--zc-focus);
  outline-offset: -3px;
}
.ar-row-type {
  color: var(--ar-crest-moss);
  font-size: .76rem;
  font-weight: 750;
}
.ar-row-title {
  min-width: 0;
  color: #1f2a25;
  line-height: 1.3;
}
.ar-row-title strong { font-weight: 750; }
.ar-row-title small {
  display: block;
  color: var(--ar-crest-muted);
  font-size: .74rem;
  font-weight: 400;
}
.ar-chip {
  justify-self: start;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .74rem;
  font-weight: 750;
  white-space: nowrap;
}
.ar-chip-needs_attention { border-color: #b88935; background: #fff5db; color: #704b0e; }
.ar-chip-open { border-color: #27755d; background: #e7f5ee; color: #0b543e; }
.ar-chip-upcoming { background: #e6eef6; color: #2d5577; }
.ar-chip-drafts { background: #f2ede4; color: #5c5446; }
.ar-chip-closed { background: #eef1ef; color: #31453d; }
.ar-row-window {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: #4d5b54;
  font-size: .78rem;
}
.ar-row-secondary {
  position: relative;
  z-index: 1;
  justify-self: end;
}
.ar-row-secondary a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ar-crest-evergreen);
  font-weight: 800;
}
.ar-row-limited { grid-template-columns: minmax(0, 1fr); }

.ar-editor-form label,
.ar-student-contract label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--zc-ink);
  font-size: .82rem;
  font-weight: 750;
}

.ar-editor input,
.ar-editor textarea,
.ar-editor select,
.ar-editor button,
.ar-student-contract input,
.ar-student-contract textarea,
.ar-student-contract button {
  min-height: 44px;
  max-width: 100%;
}

.ar-list,
.ar-queue {
  min-width: 0;
  border-right: 1px solid var(--zc-border);
}

.ar-list > h2,
.ar-queue > h2,
.ar-work-pane > h2,
.ar-context > h2 {
  margin: 0;
  padding: 16px 18px;
  font-size: 1rem;
}

.ar-list-row {
  min-height: 64px;
  border-top: 1px solid var(--zc-border);
}

.ar-list-row > a,
.ar-list-row > div {
  min-height: 64px;
  display: grid;
  gap: 3px;
  padding: 12px 18px;
  color: var(--zc-ink);
  text-decoration: none;
}

.ar-list-row a:hover,
.ar-list-row a:focus-visible {
  background: var(--zc-brand-050);
  box-shadow: inset 4px 0 0 var(--zc-brand-700);
}

.ar-list-row small { color: var(--zc-brand-700); font-weight: 800; }
.ar-list-row strong { line-height: 1.3; }
.ar-list-row span { color: var(--zc-muted); font-size: .8rem; }
.ar-work-pane,
.ar-context { min-width: 0; padding: 22px; }

.ar-empty { padding: 32px 20px; }
.ar-empty h3 { margin-top: 0; }

.ar-respond-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  min-height: 500px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
  overflow: clip;
}

.ar-work-pane { border-right: 1px solid var(--zc-border); }
.ar-context details { padding: 12px 0; border-top: 1px solid var(--zc-border); }
.ar-context summary { min-height: 44px; cursor: pointer; font-weight: 750; }

.ar-create { position: relative; }
.ar-create > summary,
.ar-primary,
.ar-secondary,
.ar-back {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.ar-create > summary,
.ar-primary { color: #f8fbfd; background: var(--zc-brand-700); }
.ar-secondary,
.ar-back { color: var(--zc-brand-700); border: 1px solid var(--zc-border); background: var(--zc-surface); }
.ar-create-menu {
  position: absolute;
  right: 0;
  z-index: 5;
  width: min(360px, calc(100vw - 32px));
  padding: 8px;
  margin-top: 6px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
  box-shadow: 0 18px 50px rgb(8 69 104 / .16);
}
.ar-create-menu a {
  min-height: 54px;
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--zc-ink);
  text-decoration: none;
}
.ar-create-menu a:hover { background: var(--zc-brand-050); }
.ar-create-menu small { color: var(--zc-muted); }
/* TB-1013: the text-only Battle hint lines up with the menu entries. */
.ar-create-hint { margin: 4px 0 2px; padding: 0 10px; }
.ar-create-sheet-header { display: none; }
.ar-create-close-label { display: none; }

.ar-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.ar-editor-nav {
  grid-column: 1;
  position: static;
  min-width: 0;
}
.ar-editor-nav > form { display: none; }
.ar-editor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ar-editor-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--zc-ink);
  text-decoration: none;
}
.ar-editor-links a:hover { background: var(--zc-brand-050); }
.ar-editor-form {
  min-width: 0;
  padding-bottom: 88px;
}
.ar-editor-section {
  scroll-margin-top: calc(var(--zc-header-height) + 18px);
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-editor-section h2 { margin-top: 0; }
.ar-editor-section textarea { min-height: 132px; resize: vertical; }
.ar-schedule-panel {
  grid-column: 1;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-schedule-panel h2 { margin-top: 0; }
.ar-schedule-panel form { display: grid; gap: 10px; margin-block: 14px; }
.ar-schedule-panel article {
  padding-block: 14px;
  border-top: 1px solid var(--zc-border);
}
.ar-schedule-panel #current-section-windows {
  margin-top: 24px;
}
.ar-schedule-panel #current-section-windows h3 {
  margin-bottom: 8px;
}
.ar-lifecycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.ar-lifecycle h2,
.ar-lifecycle p {
  flex-basis: 100%;
  margin-block: 0;
}
.ar-lifecycle form { margin: 0; }
.ar-schedule-confirmation {
  max-width: 720px;
  padding: 22px;
  margin-block: 18px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-rubric { display: grid; gap: 10px; padding-left: 28px; }
.ar-rubric li { padding: 12px; border: 1px solid var(--zc-border); border-radius: 10px; }
.ar-rubric li > span { float: right; font-variant-numeric: tabular-nums; }
.ar-sticky-actions {
  position: sticky;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
  box-shadow: 0 12px 36px rgb(8 69 104 / .14);
}
.ar-sticky-actions span { margin-right: auto; color: var(--zc-muted); }

/* TB-369 two-pane editor: header actions, group cards, inline picker */
.ar-editor-pane { min-width: 0; }
.ar-editor-layout > .ar-editor-pane { grid-column: 1; }
.ar-header-actions {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  justify-items: end;
  align-content: start;
}
.ar-header-actions .ar-primary {
  overflow-wrap: normal;
  white-space: nowrap;
}
.ar-pub-badge {
  margin: 0;
  padding: 4px 12px;
  border: 1px solid var(--zc-border);
  border-radius: 999px;
  font-weight: 800;
  font-size: .82rem;
  color: var(--zc-muted);
  background: var(--zc-surface);
}
.ar-preview-control summary { cursor: pointer; font-weight: 800; }
.ar-preview-control form { display: grid; gap: 8px; margin-top: 8px; }
.ar-question-groups,
.ar-quiz-picker {
  grid-column: 1;
  min-width: 0;
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-question-groups h2,
.ar-quiz-picker h2 { margin-top: 0; }
.ar-group-card {
  scroll-margin-top: calc(var(--zc-header-height) + 18px);
  margin-bottom: 12px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
}
.ar-group-editor { min-width: 0; }
.ar-group-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  scroll-margin-top: calc(var(--zc-header-height) + 18px);
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.ar-group-summary::-webkit-details-marker { display: none; }
.ar-group-summary:focus-visible { outline: 3px solid var(--zc-brand-500); outline-offset: -3px; }
.ar-group-summary:hover { background: var(--zc-brand-050); }
.ar-group-editor[open] > .ar-group-summary { border-bottom: 1px solid var(--zc-border); }
.ar-group-name { display: block; margin-bottom: 4px; font-weight: 800; }
.ar-group-kind { display: block; color: var(--zc-muted); }
.ar-group-edit-cue {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--zc-border);
  border-radius: 8px;
  color: var(--zc-brand-700);
  font-size: .82rem;
  font-weight: 750;
  white-space: nowrap;
}
.ar-group-editor-body { padding: 0 18px 18px; }
.ar-group-add {
  display: grid;
  gap: 8px;
  justify-items: start;
  scroll-margin-top: calc(var(--zc-header-height) + 18px);
}
.ar-group-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.ar-group-header > span,
.ar-group-count,
.ar-picker-match-count {
  flex: 0 0 auto;
  color: var(--zc-muted);
  font-size: .82rem;
  font-weight: 750;
}
.ar-group-draw {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin-block: 14px;
  padding: 14px;
  border-radius: 10px;
  background: var(--zc-brand-050);
}
.ar-group-draw > label { min-width: 0; }
.ar-group-draw input,
.ar-group-draw select { width: 100%; min-width: 0; }
.ar-group-draw button { justify-self: start; }
.ar-draw-topics { min-width: 0; margin: 0; border: 0; padding: 0; }
.ar-draw-topics legend { font-weight: 700; }
.ar-draw-topics-help { margin: 0 0 6px; color: var(--zc-muted); font-size: .88rem; }
.ar-draw-topic-count { margin: 0 0 6px; font-size: .88rem; font-weight: 750; }
.ar-draw-topic-list {
  display: grid;
  gap: 6px;
  max-height: 12rem;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--zc-border);
  border-radius: 8px;
  background: var(--zc-surface);
}
.ar-draw-topic-list label { display: flex; align-items: center; gap: 7px; min-height: 28px; cursor: pointer; }
.ar-draw-topic-list input { width: auto; flex: 0 0 auto; }
.ar-draw-topic-list span { overflow-wrap: anywhere; }
.ar-draw-topic-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.ar-group-empty { color: var(--zc-muted); }
.ar-group-empty-state {
  padding: 18px;
  margin-bottom: 14px;
  border: 1px dashed var(--zc-border);
  border-radius: 10px;
}
.ar-group-empty-state h3 { margin-top: 0; }
.ar-legacy-fallback summary,
.ar-bank-filter summary { cursor: pointer; font-weight: 750; }
.ar-group-delete { margin-top: 14px; }
.ar-group-delete > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--zc-border);
  border-radius: 8px;
  color: var(--zc-danger);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.ar-group-delete > summary::-webkit-details-marker { display: none; }
.ar-group-delete form { margin-top: 10px; }
.ar-picker-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.ar-picker-filters fieldset {
  display: grid;
  gap: 4px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
}
.ar-bank-filter {
  padding: 12px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
}
.ar-bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 8px 14px;
  max-height: 18rem;
  overflow-y: auto;
  margin-top: 12px;
}
.ar-checkbox-label,
.ar-editor-form label.ar-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}
.ar-checkbox-label input,
.ar-table-checkbox input {
  flex: 0 0 auto;
  width: 1.1rem;
  min-height: 1.1rem;
  margin: 0;
}
.ar-choice-fieldset {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--zc-border);
  border-radius: 12px;
}
.ar-choice-fieldset legend { padding-inline: 5px; font-weight: 800; }
.ar-choice-fieldset > p { margin: 0 0 2px; color: var(--zc-muted); }
.ar-radio-label,
.ar-editor-form label.ar-radio-label {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 40px;
  padding: 8px;
  border-radius: 9px;
}
.ar-radio-label:has(input:checked) { background: var(--zc-brand-050); }
.ar-radio-label input { width: 1.1rem; min-height: 1.1rem; margin: 2px 0 0; }
.ar-picker-filter-row {
  display: grid;
  grid-template-columns: minmax(9rem, .7fr) minmax(9rem, .7fr) minmax(14rem, 1.4fr) auto;
  align-items: end;
  gap: 10px;
}
.ar-picker-scroll { overflow-x: auto; }
.ar-picker-table { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; }
.ar-picker-table .ar-col-add { width: 4rem; }
.ar-picker-table .ar-col-id { width: 8.5rem; }
.ar-picker-table .ar-col-question { width: auto; }
.ar-picker-table .ar-col-bank { width: 12rem; }
.ar-picker-table .ar-col-topic { width: 6.5rem; }
.ar-picker-table .ar-col-difficulty { width: 7.5rem; }
.ar-picker-table th,
.ar-picker-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--zc-border);
  text-align: left;
  overflow-wrap: normal;
}
.ar-picker-table th,
.ar-question-id,
.ar-bank-short { white-space: nowrap; }
.ar-picker-table td:nth-child(3) { overflow-wrap: anywhere; }
.ar-table-checkbox { display: inline-flex; align-items: center; }
.ar-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-quiz-total { font-weight: 700; }

.ar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 14px 0;
  margin: 0 0 18px;
  border-block: 1px solid var(--zc-border);
}
.ar-summary div { min-width: 170px; flex: 1 1 170px; padding: 8px 14px; }
.ar-summary dt { font-weight: 800; }
.ar-summary dd { margin: 4px 0 0; color: var(--zc-muted); font-size: .82rem; }
.ar-summary a { color: var(--zc-brand-700); font-weight: 800; }
.ar-summary a[aria-current="true"] { text-decoration-thickness: 3px; }
.ar-results-filters,
.ar-response-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-results-filters label,
.ar-response-filters label {
  display: grid;
  gap: 6px;
  font-size: .82rem;
  font-weight: 750;
}
.ar-results-filters select,
.ar-results-filters button,
.ar-response-filters input,
.ar-response-filters select,
.ar-response-filters button { min-height: 44px; max-width: 100%; }
.ar-response-filters label:first-of-type { grid-column: span 2; }
.ar-response-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.ar-response-categories a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
  color: var(--zc-ink);
  text-decoration: none;
}
.ar-results details { padding: 14px 0; border-bottom: 1px solid var(--zc-border); }
.ar-results summary { min-height: 44px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.ar-results dl > div,
.ar-confirmation dl > div { display: grid; grid-template-columns: minmax(150px, .35fr) 1fr; gap: 12px; padding: 8px 0; }
.ar-results dd,
.ar-confirmation dd { margin: 0; }
.ar-quiz-results { margin-top: 18px; }
.ar-quiz-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ar-quiz-results-heading h3 { margin: 0; }
.ar-quiz-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--zc-border);
  border-radius: 12px;
  background: var(--zc-surface);
}
.ar-quiz-section h4,
.ar-quiz-section p { margin-top: 0; }
.ar-result-students {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.ar-result-students li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(100px, .5fr) minmax(110px, .5fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--zc-border);
}
.ar-result-students li:first-child { border-top: 0; }
.ar-score-distribution { margin-top: 18px; }
.ar-score-distribution dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.ar-score-distribution dl > div {
  display: block;
  padding: 10px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
  text-align: center;
}
.ar-score-distribution dt { font-weight: 750; }
.ar-score-distribution dd { margin-top: 4px; font-size: 1.15rem; font-weight: 800; }
.ar-results-limit {
  padding: 12px 14px;
  border-left: 4px solid var(--zc-warning);
  background: var(--zc-surface);
}

.ar-student-contract { max-width: 760px; }
.ar-student-contract section { margin-block: 24px; }
.ar-student-text,
.ar-response-context pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ar-response-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr) minmax(320px, .8fr);
  align-items: start;
  gap: 16px;
}
.ar-response-context > .ar-back,
.ar-response-context > .ar-course,
.ar-response-context > h1,
.ar-response-context > .ar-response-switch { grid-column: 1 / -1; }
.ar-response-switch {
  display: flex;
  gap: 6px;
}
.ar-response-switch a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
  color: var(--zc-brand-700);
}
.ar-response-work,
.ar-response-detail-context,
.ar-response-outcome {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.ar-response-work h2,
.ar-response-detail-context h2,
.ar-response-outcome h2 { margin-top: 0; }
.ar-response-outcome form { display: grid; gap: 10px; margin-block: 12px; }
.ar-response-outcome label { display: grid; gap: 5px; }
.ar-error-summary {
  padding: 16px;
  border: 2px solid var(--zc-danger);
  border-radius: 10px;
}

@media (max-width: 1100px) {
  .ar-schedule-panel { grid-column: 1; }
  .ar-editor-layout > .ar-editor-pane { grid-column: 1; }
  .ar-question-groups,
  .ar-quiz-picker { grid-column: 1; }
  .ar-group-draw { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-picker-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-picker-filter-row button { grid-column: 1 / -1; }
  .ar-respond-layout { grid-template-columns: 280px minmax(0, 1fr); }
  .ar-context { grid-column: 1 / -1; border-top: 1px solid var(--zc-border); }
}

@media screen and (max-width: 880px) {
  .ar-workspace,
  .ar-editor,
  .ar-student-contract,
  .ar-response-context,
  .ar-confirmation { width: 100%; }
  .ar-header { gap: 12px; }
  .ar-header h1 { font-size: 1.55rem; }
  .ar-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .ar-seg + .ar-seg { border-left: 0; }
  .ar-seg { border-right: 1px solid #e3e7e3; border-bottom: 1px solid #e3e7e3; }
  .ar-seg > span { flex: 1 1 auto; flex-wrap: wrap; padding: 4px 6px; }
  .ar-filter-field { flex: 1 1 40%; }
  .ar-filter-field select { width: 100%; }
  .ar-filter-search { flex: 1 1 100%; }
  .ar-filter-submit { flex: 1 1 auto; }
  .ar-bank-link { margin-left: 0; }
  .ar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 12px 14px;
  }
  .ar-row-link {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .ar-chip { grid-column: 1; }
  .ar-row-secondary { grid-column: 2; grid-row: 2; }
  .ar-row-window { grid-column: 1 / -1; }
  .ar-editor-nav > form { display: none; }
  .ar-editor-links {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .ar-respond-layout { grid-template-columns: 1fr; min-height: 0; }
  .ar-list,
  .ar-queue,
  .ar-work-pane { border-right: 0; }
  .ar-work-pane,
  .ar-context { display: none; }
  .ar-sticky-actions {
    bottom: calc(68px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .ar-sticky-actions span { flex-basis: 100%; }
  .ar-sticky-actions button,
  .ar-sticky-actions a { flex: 1 1 44%; min-height: 44px; }
  .ar-group-draw,
  .ar-picker-filter-row { grid-template-columns: minmax(0, 1fr); }
  .ar-group-header { display: grid; }
  .ar-group-summary { grid-template-columns: minmax(0, 1fr); }
  .ar-group-edit-cue { justify-self: start; }
  .ar-summary { display: grid; }
  .ar-results-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-response-filters { grid-template-columns: minmax(0, 1fr); }
  .ar-results-filters label,
  .ar-response-filters label,
  .ar-response-filters label:first-of-type { grid-column: auto; }
  .ar-response-filters label { min-width: 0; overflow-wrap: anywhere; }
  .ar-response-filters input,
  .ar-response-filters select { width: 100%; min-width: 0; }
  .ar-results-filters button,
  .ar-response-filters button { grid-column: 1 / -1; }
  .ar-results summary { align-items: flex-start; gap: 8px; }
  .ar-result-students li {
    grid-template-columns: minmax(0, 1fr) minmax(100px, .5fr);
  }
  .ar-score-distribution dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ar-response-context { grid-template-columns: 1fr; }
  .ar-response-context > * { grid-column: 1; }
  .ar-response-switch {
    position: sticky;
    top: var(--zc-header-height);
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--zc-page);
  }
  .ar-create-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    margin: 0;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    z-index: 100;
  }
  .ar-create-sheet-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: env(safe-area-inset-top) 88px 8px 0;
    background: var(--zc-surface);
  }
  .ar-create-sheet-header h2 { margin: 0; }
  .ar-create[open] > summary {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    right: 16px;
    z-index: 101;
  }
  .ar-create[open] .ar-create-open-label { display: none; }
  .ar-create[open] .ar-create-close-label { display: inline; }
  .ar-create-menu > a {
    min-height: 64px;
  }
}

@media screen and (max-width: 480px) {
  .ar-filter-field { flex-basis: 100%; }
  .ar-quiz-results-heading,
  .ar-result-students li { display: grid; grid-template-columns: minmax(0, 1fr); }
  .ar-quiz-results-heading .ar-secondary { justify-self: start; }
}

@media (max-width: 320px) {
  .ar-segments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ar-filter-field { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-workspace *,
  .ar-editor * {
    scroll-behavior: auto;
    transition-duration: .01ms;
    animation-duration: .01ms;
  }
}

/* TB-279: factual student Progress -------------------------------------- */
.contextual-coach {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  gap: 20px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--zc-line);
  border-inline-start: 4px solid var(--zc-brand-600);
  border-radius: 16px;
  background: var(--zc-surface);
  color: var(--zc-ink);
}
.contextual-coach-copy,
.contextual-coach-secondary,
.contextual-coach-secondary li { min-width: 0; }
.contextual-coach-kicker {
  margin: 0 0 5px;
  color: var(--zc-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.contextual-coach h2 { margin: 0 0 10px; font-size: 1.15rem; }
.contextual-coach-fact {
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.contextual-coach-recommendation {
  margin: 6px 0 0;
  color: var(--zc-muted);
  overflow-wrap: anywhere;
}
.contextual-coach-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 10px;
}
.contextual-coach-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 750;
}
.contextual-coach-action {
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--zc-brand-600);
  color: #fff;
  text-decoration: none;
}
.contextual-coach-secondary { align-self: start; }
.contextual-coach-secondary > summary {
  min-height: 44px;
  padding-block: 10px;
  cursor: pointer;
  font-weight: 750;
}
.contextual-coach-secondary ol {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.contextual-coach-secondary li {
  padding: 14px;
  border: 1px solid var(--zc-line);
  border-radius: 10px;
}
[data-progress-focus="coach"] .contextual-coach {
  outline: 3px solid var(--zc-focus);
  outline-offset: 3px;
}

.progress-workspace {
  --zc-border: var(--zc-line);
  --zc-accent: var(--zc-brand-600);
  display: grid;
  gap: 24px;
  min-width: 0;
  color: var(--zc-ink);
}
.progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.progress-heading h1 { margin: 0 0 4px; }
.progress-heading p { margin: 0; color: var(--zc-muted); overflow-wrap: anywhere; }
.progress-read-only {
  padding: 8px 12px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
}
.progress-summary-region,
.progress-panel,
.progress-provider-status {
  min-width: 0;
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  background: var(--zc-surface);
}
.progress-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.progress-summary > div {
  min-width: 0;
  padding: 18px 20px;
  border-inline-end: 1px solid var(--zc-border);
}
.progress-summary > div:last-child { border-inline-end: 0; }
.progress-summary dt,
.progress-eyebrow,
.progress-item-state,
.progress-week-heading span {
  color: var(--zc-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.progress-summary dd {
  margin: 6px 0 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.progress-definitions { border-top: 1px solid var(--zc-border); }
.progress-definitions > summary {
  min-height: 44px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 700;
}
.progress-definitions dl {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 20px 20px;
}
.progress-definitions dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; }
.progress-definitions dt { font-weight: 750; }
.progress-definitions dd { margin: 0; color: var(--zc-muted); }
.progress-primary-grid,
.progress-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  min-width: 0;
}
.progress-panel,
.progress-provider-status { padding: 22px; }
.progress-panel h2,
.progress-provider-status h2 { margin: 0 0 18px; font-size: 1.05rem; }
.progress-panel h3 { margin: 6px 0 8px; font-size: 1rem; overflow-wrap: anywhere; }
.progress-panel p { overflow-wrap: anywhere; }
.progress-primary-action,
.progress-action,
.progress-item-links a,
.progress-feedback-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 750;
}
.progress-primary-action,
.progress-action {
  justify-content: center;
  margin-top: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--zc-accent);
  color: #fff;
  text-decoration: none;
}
.progress-action-list,
.progress-feedback-list,
.progress-path > ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.progress-action-list > li,
.progress-feedback-list > li,
.progress-week {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
}
.progress-item-state { margin: 0; }
.progress-item-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.progress-week { position: relative; }
.progress-week::before {
  content: "";
  position: absolute;
  inset-block: -13px;
  inset-inline-start: -1px;
  width: 3px;
  background: var(--zc-border);
}
.progress-week:first-child::before { inset-block-start: 18px; }
.progress-week:last-child::before { inset-block-end: 18px; }
.progress-week--current::before { background: var(--zc-accent); }
.progress-week-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.progress-week-heading p { margin: 0; text-align: end; }
.progress-week details { margin-top: 12px; }
.progress-week summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 700; }
.progress-week ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.progress-week ul li,
.progress-feedback-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  overflow-wrap: anywhere;
}
.progress-focused-item { outline: 3px solid var(--zc-focus); outline-offset: 2px; }
.progress-provider-status p:last-child { margin-bottom: 0; }

@media (max-width: 700px) {
  .contextual-coach { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .contextual-coach-action { width: 100%; }
  .progress-workspace { gap: 16px; }
  .progress-heading,
  .progress-week-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .progress-summary { grid-template-columns: 1fr; }
  .progress-summary > div {
    display: grid;
    grid-template-columns: minmax(110px, .75fr) minmax(0, 1.25fr);
    gap: 12px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--zc-border);
  }
  .progress-summary > div:last-child { border-bottom: 0; }
  .progress-summary dd { margin: 0; }
  .progress-definitions dl > div { grid-template-columns: 1fr; gap: 2px; }
  .progress-primary-grid,
  .progress-secondary-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .progress-primary-action,
  .progress-action { width: 100%; }
  .progress-panel,
  .progress-provider-status { padding: 18px 16px; }
  .progress-week-heading p { text-align: start; }
  .progress-week ul li,
  .progress-feedback-list li { flex-direction: column; gap: 4px; }
}

@media (max-width: 240px) {
  .progress-summary > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .progress-summary dd { margin: 6px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .contextual-coach *,
  .progress-workspace * {
    scroll-behavior: auto;
    transition-duration: .01ms;
    animation-duration: .01ms;
  }
}

/* TB-279: factual instructor Insights ----------------------------------- */
.insights-workspace {
  --zc-border: var(--zc-line);
  --zc-accent: var(--zc-brand-600);
  display: grid;
  gap: 20px;
  min-width: 0;
  color: var(--zc-ink);
}
.insights-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.insights-heading h1 { margin: 0 0 4px; }
.insights-heading p { margin: 0; color: var(--zc-muted); overflow-wrap: anywhere; }
.insights-read-only,
.insights-filter-notice {
  padding: 10px 14px;
  border: 1px solid var(--zc-border);
  border-radius: 10px;
  background: var(--zc-surface);
}
.insights-filter-notice { border-inline-start: 4px solid var(--zc-accent); }
.insights-switch {
  display: flex;
  min-width: 0;
  border-bottom: 1px solid var(--zc-border);
  overflow-x: auto;
}
.insights-switch a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border-bottom: 3px solid transparent;
  color: var(--zc-muted);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.insights-switch a[aria-current="page"] {
  border-bottom-color: var(--zc-accent);
  color: var(--zc-ink);
}
.insights-switch a span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  padding-inline: 6px;
  border-radius: 999px;
  background: var(--zc-surface-2);
  font-size: .78rem;
}
.insights-mobile-switch { display: none; }
.insights-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--zc-border);
  border-radius: 14px;
  background: var(--zc-surface);
}
.insights-filters label,
.insights-mobile-switch label,
.insights-owned-scope {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--zc-muted);
  font-size: .8rem;
  font-weight: 750;
}
.insights-filters select,
.insights-filters input,
.insights-mobile-switch select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--zc-border);
  border-radius: 8px;
  background: var(--zc-bg);
  color: var(--zc-ink);
}
.insights-filters button,
.insights-mobile-switch button,
.insights-export-actions a,
.insights-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 0;
  border-radius: 9px;
  background: var(--zc-accent);
  color: #fff;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
}
.insights-owned-scope strong {
  min-height: 44px;
  padding: 11px 0;
  color: var(--zc-ink);
  overflow-wrap: anywhere;
}
.insights-summary-region,
.insights-region,
.insights-history {
  min-width: 0;
  border: 1px solid var(--zc-border);
  border-radius: 15px;
  background: var(--zc-surface);
}
.insights-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.insights-summary > div {
  min-width: 0;
  padding: 18px;
  border-inline-end: 1px solid var(--zc-border);
}
.insights-summary > div:last-child { border-inline-end: 0; }
.insights-summary dt,
.insights-eyebrow {
  color: var(--zc-muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.insights-summary dd { margin: 6px 0 0; font-weight: 760; overflow-wrap: anywhere; }
.insights-definitions { border-top: 1px solid var(--zc-border); }
.insights-definitions > summary,
.insights-history > summary {
  min-height: 44px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 750;
}
.insights-definitions dl,
.insights-provider-list,
.insights-provider dl {
  display: grid;
  gap: 10px;
  margin: 0;
}
.insights-definitions dl { padding: 0 18px 14px; }
.insights-definitions dl > div,
.insights-provider-list > div,
.insights-provider dl > div {
  display: grid;
  grid-template-columns: minmax(150px, .4fr) minmax(0, 1fr);
  gap: 16px;
}
.insights-definitions dt,
.insights-provider-list dt,
.insights-provider dt { font-weight: 750; }
.insights-definitions dd,
.insights-provider-list dd,
.insights-provider dd { margin: 0; color: var(--zc-muted); overflow-wrap: anywhere; }
.insights-definitions > a { display: inline-flex; min-height: 44px; align-items: center; margin: 0 18px 10px; }
.insights-region { padding: 20px; }
.insights-region-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.insights-region-heading h2 { margin: 2px 0 0; font-size: 1.08rem; }
.insights-region-heading a { display: inline-flex; align-items: center; min-height: 44px; }
.insights-eyebrow { margin: 0; }
.insights-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.insights-table-wrap { min-width: 0; overflow-x: auto; }
.insights-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.insights-table th,
.insights-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--zc-border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.insights-table th { color: var(--zc-muted); font-size: .78rem; text-transform: uppercase; }
.insights-table td:first-child { width: 26%; }
.insights-table td span { display: block; margin-top: 5px; color: var(--zc-muted); }
.insights-table a { overflow-wrap: anywhere; }
.insights-items-table td:first-child { width: 22%; }
.insights-empty {
  padding: 18px;
  border: 1px dashed var(--zc-border);
  border-radius: 10px;
}
.insights-empty p { margin-top: 0; }
.insights-empty a { display: inline-flex; min-height: 44px; align-items: center; }
.insights-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 14px;
}
.insights-pagination a,
.insights-pagination > span:first-child,
.insights-pagination > span:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.insights-provider { border-top: 1px solid var(--zc-border); }
.insights-provider > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 750; }
.insights-provider dl { padding-bottom: 16px; }
.insights-provider-list { padding: 0; }
.insights-export-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.insights-history { padding-bottom: 12px; }
.insights-history p { margin: 4px 18px 10px; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .insights-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights-filters button { width: 100%; }
}

@media (max-width: 700px) {
  .insights-workspace { gap: 16px; }
  .insights-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .insights-switch { display: none; }
  .insights-mobile-switch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
  }
  .insights-filters { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .insights-summary { grid-template-columns: minmax(0, 1fr); }
  .insights-summary > div {
    display: grid;
    grid-template-columns: minmax(110px, .75fr) minmax(0, 1.25fr);
    gap: 12px;
    border-inline-end: 0;
    border-bottom: 1px solid var(--zc-border);
  }
  .insights-summary > div:last-child { border-bottom: 0; }
  .insights-summary dd { margin: 0; }
  .insights-definitions dl > div,
  .insights-provider-list > div,
  .insights-provider dl > div { grid-template-columns: 1fr; gap: 3px; }
  .insights-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .insights-region { padding: 16px; }
  .insights-region-heading { flex-direction: column; gap: 6px; }
  .insights-table-wrap { overflow: visible; }
  .insights-table,
  .insights-table thead,
  .insights-table tbody,
  .insights-table tr,
  .insights-table th,
  .insights-table td { display: block; width: 100%; }
  .insights-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .insights-table tr { margin-bottom: 12px; padding: 10px; border: 1px solid var(--zc-border); border-radius: 10px; }
  .insights-table td,
  .insights-table td:first-child { display: grid; grid-template-columns: minmax(90px, .4fr) minmax(0, 1fr); gap: 10px; width: 100%; border-bottom: 1px solid var(--zc-border); }
  .insights-table td:last-child { border-bottom: 0; }
  .insights-table td::before { content: attr(data-label); color: var(--zc-muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
  .insights-pagination { justify-content: space-between; gap: 8px; }
  .insights-export-actions { display: grid; }
  .insights-export-actions a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .insights-workspace * {
    scroll-behavior: auto;
    transition-duration: .01ms;
    animation-duration: .01ms;
  }
}

/* TB-280: canonical Z-Change Experiences workspace. */
.zchange-workspace {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.zchange-workspace h1,
.zchange-workspace h2,
.zchange-workspace h3,
.zchange-workspace p { overflow-wrap: anywhere; }

.zchange-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.zchange-page-heading h1,
.zchange-reader h1,
.zchange-credential h1 { margin: 0; }
.zchange-page-heading p { max-width: 68ch; margin: 8px 0 0; color: var(--zc-muted); }
.zchange-page-heading > p { flex: 0 0 auto; margin-top: 7px; }

.zchange-local-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  background: var(--zc-surface);
  overflow: hidden;
}

.zchange-local-nav a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-inline-end: 1px solid var(--zc-line);
  color: var(--zc-muted);
  font-weight: 760;
  text-align: center;
  text-decoration: none;
}
.zchange-local-nav a:last-child { border-inline-end: 0; }
.zchange-local-nav a[aria-current="page"] {
  color: var(--zc-brand-800);
  background: var(--zc-brand-050);
  box-shadow: inset 0 -3px 0 var(--zc-brand-600);
}
.zchange-local-switch { display: none; }

.zchange-filters,
.zchange-company-filters {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(170px, .8fr) minmax(240px, 1.5fr) auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}
.zchange-company-filters { grid-template-columns: minmax(260px, 1.5fr) minmax(180px, .75fr) auto; }
.zchange-filters label,
.zchange-company-filters label,
.zchange-local-switch label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--zc-muted);
  font-size: .82rem;
  font-weight: 760;
}
.zchange-filters input,
.zchange-filters select,
.zchange-company-filters input,
.zchange-company-filters select,
.zchange-local-switch select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  color: var(--zc-ink);
  background: var(--zc-surface);
}
.zchange-filters button,
.zchange-company-filters button,
.zchange-local-switch button,
.zchange-credential button {
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--zc-brand-700);
  border-radius: var(--zc-radius-control);
  color: #fff;
  background: var(--zc-brand-700);
  cursor: pointer;
  font-weight: 760;
}

.zchange-result-count { margin: -6px 0; color: var(--zc-muted); font-weight: 720; }
.zchange-workspace section > h2 { margin: 0 0 12px; font-size: 1.08rem; }
.zchange-card-grid,
.zchange-company-results,
.zchange-tool-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.zchange-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.zchange-card-grid > li { min-width: 0; display: flex; }
.zchange-experience-card {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}
.zchange-experience-card > header,
.zchange-experience-card > footer { padding: 18px; }
.zchange-experience-card > header { border-bottom: 1px solid var(--zc-line); }
.zchange-experience-card > header > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  color: var(--zc-muted);
  font-size: .8rem;
}
.zchange-experience-card h3 { margin: 12px 0 3px; font-size: 1.08rem; }
.zchange-experience-card header p { margin: 0; color: var(--zc-muted); }
.zchange-state {
  color: var(--zc-brand-800);
  font-size: .75rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.zchange-professional-facts { margin: 0; padding: 0 18px; }
.zchange-professional-facts > div {
  display: grid;
  grid-template-columns: minmax(126px, .38fr) minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--zc-line);
}
.zchange-professional-facts dt { font-weight: 760; }
.zchange-professional-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.zchange-professional-facts details summary { min-height: 32px; cursor: pointer; font-weight: 700; }
.zchange-professional-facts ul { margin: 8px 0 0; padding-inline-start: 20px; }
.zchange-professional-facts a { overflow-wrap: anywhere; }
.zchange-secondary-fact { display: block; margin-top: 5px; color: var(--zc-muted); }
.zchange-experience-card > footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: auto;
}
.zchange-experience-card footer a,
.zchange-primary-action,
.zchange-return-link,
.zchange-empty a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  overflow-wrap: anywhere;
}
.zchange-primary-action {
  padding: 9px 14px;
  border-radius: var(--zc-radius-control);
  color: #fff;
  background: var(--zc-brand-700);
  font-weight: 760;
  text-decoration: none;
}

.zchange-empty,
.zchange-panel,
.zchange-reader > article,
.zchange-reader > aside {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}
.zchange-empty { border-style: dashed; }
.zchange-empty h2,
.zchange-empty p { margin-top: 0; }
.zchange-company-results { border-top: 1px solid var(--zc-line); }
.zchange-company-results li { border-bottom: 1px solid var(--zc-line); }
.zchange-company-results a {
  min-height: 64px;
  display: grid;
  gap: 4px;
  padding: 12px 10px;
  text-decoration: none;
}
.zchange-company-results a:hover { background: var(--zc-brand-050); }
.zchange-company-results span { color: var(--zc-muted); font-size: .85rem; }
.zchange-pagination { display: flex; justify-content: flex-end; color: var(--zc-muted); }
.zchange-pagination span { min-height: 44px; display: inline-flex; align-items: center; }

.zchange-reader { max-width: 920px; margin-inline: auto; }
.zchange-reader article > header { padding-bottom: 14px; border-bottom: 1px solid var(--zc-line); }
.zchange-reader article > header p { margin-bottom: 0; color: var(--zc-muted); }
.zchange-source-content { min-width: 0; padding-top: 10px; overflow-wrap: anywhere; }
/* Keep multi-digit inventory counts readable beside long scoped headings on
   the narrow instructor Materials route. */
.section-head .count {
  flex: 0 0 auto;
  white-space: nowrap;
}
.zchange-source-content table { width: 100%; border-collapse: collapse; }
.zchange-source-content th,
.zchange-source-content td { padding: 9px; border: 1px solid var(--zc-line); text-align: start; }
.zchange-reader details > summary { min-height: 44px; cursor: pointer; font-weight: 760; }
.zchange-reader dl { display: grid; gap: 10px; margin-bottom: 0; }
.zchange-reader dl > div { display: grid; grid-template-columns: minmax(120px, .3fr) minmax(0, 1fr); gap: 14px; }
.zchange-reader dt { font-weight: 760; }
.zchange-reader dd { margin: 0; overflow-wrap: anywhere; }

.zchange-tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  align-items: start;
}
.zchange-tool-list { display: grid; gap: 12px; }
.zchange-tool-list li { padding: 16px; border: 1px solid var(--zc-line); border-radius: var(--zc-radius-control); }
.zchange-tool-list h3 { margin: 0; }
.zchange-tool-list dl { display: grid; grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr); gap: 7px 12px; margin-bottom: 0; }
.zchange-tool-list dt { font-weight: 760; }
.zchange-tool-list dd { margin: 0; overflow-wrap: anywhere; }
.zchange-credential-state { color: var(--zc-muted); font-weight: 720; }
.zchange-key-warning,
.zchange-error {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #d8bb74;
  border-radius: var(--zc-radius-control);
  color: #5d4308;
  background: var(--zc-warning-bg);
}
.zchange-error { border-color: var(--zc-danger); color: var(--zc-danger); background: var(--zc-danger-bg); }
.zchange-revealed-key {
  min-width: 0;
  display: block;
  margin: 12px 0;
  padding: 13px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  background: var(--zc-canvas);
  overflow-wrap: anywhere;
  user-select: all;
}
.zchange-credential-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.zchange-confirmation { min-height: 44px; display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.zchange-confirmation input { width: 20px; height: 20px; flex: 0 0 auto; }
.zchange-credential pre {
  max-width: 100%;
  padding: 14px;
  border-radius: var(--zc-radius-control);
  background: var(--zc-canvas);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .zchange-filters,
  .zchange-company-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zchange-filters button,
  .zchange-company-filters button { width: 100%; }
  .zchange-tools-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .zchange-workspace { gap: 16px; }
  .zchange-page-heading { flex-direction: column; gap: 2px; }
  .zchange-page-heading > p { margin-top: 0; }
  .zchange-local-nav { display: none; }
  .zchange-local-switch { display: grid; gap: 6px; }
  .zchange-local-switch > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .zchange-filters,
  .zchange-company-filters { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .zchange-card-grid { grid-template-columns: minmax(0, 1fr); }
  .zchange-professional-facts > div,
  .zchange-reader dl > div,
  .zchange-tool-list dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .zchange-experience-card > footer,
  .zchange-credential-actions { display: grid; }
  .zchange-experience-card footer a,
  .zchange-primary-action,
  .zchange-credential-actions button { width: 100%; justify-content: center; }
  .zchange-empty,
  .zchange-panel,
  .zchange-reader > article,
  .zchange-reader > aside { padding: 16px; }
  .zchange-source-content { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 430px) {
  .zchange-workspace { margin-inline: 2px; }
}

@media (max-width: 240px) {
  .zchange-local-switch > div { grid-template-columns: minmax(0, 1fr); }
  .zchange-local-switch button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .zchange-workspace * {
    scroll-behavior: auto;
    transition-duration: .01ms;
    animation-duration: .01ms;
  }
}

/* TB-284: shared utility, strict-CSP, reflow, and preference contract. */
[hidden] { display: none !important; }

.terminal-native-progress {
  width: 100%;
  min-height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  accent-color: var(--zc-brand-600);
}

.terminal-help-link,
.terminal-notifications,
.terminal-account-trigger,
.terminal-search-link,
.terminal-utility-action,
.terminal-utility-page button,
.terminal-utility-page input,
.terminal-utility-page select,
.terminal-utility-page summary,
.terminal-notification-filters > *,
.qmapdot {
  min-height: 44px;
}

/* BUG-494. These three are the header's fixed chrome labels -- "Help",
   "Notifications", "Search". They are one-word buttons whose text is written
   in this repository and never grows, so a line break inside one of them is
   always a defect, never a fallback. `overflow-wrap: anywhere` is inherited
   from `body` (the group further down heads with `body`, so scoping that group
   is a no-op) and it is the right rule for the URLs, provider strings and
   notification titles it was written for. It is the wrong rule here, and
   `white-space: nowrap` is what says so: it forbids every soft wrap
   opportunity regardless of what `overflow-wrap` computes to, so the fix does
   not depend on winning a cascade argument with an inherited property.

   Seen failing, in Chromium, on this file with the line removed: at 881px
   /instructor/ renders "Hel" over "p", and /course-home/ renders
   "Notifications" as ten stacked lines. Both are guarded by
   `tests_bug494_browser.py`, which asserts on all three controls rather than
   on the notifications button alone -- dropping any one selector from this
   rule turns the suite red.

   `.terminal-account-trigger` is deliberately NOT in this list. Its label is
   the user's display name -- arbitrary data, not repository copy -- and a name
   with no space in it is exactly the unbreakable content `anywhere` exists
   for. Adding `nowrap` there would widen the action row by the length of a
   stranger's name and push the avatar off the right edge, which is the failure
   the search-track floor above exists to prevent. That control's own geometry
   is BUG-501. */
.terminal-help-link,
.terminal-notifications,
.terminal-search-link {
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
  border-radius: var(--zc-radius-control);
  color: var(--zc-brand-800);
  font-weight: 720;
  text-decoration: none;
  white-space: nowrap;
}

.terminal-notification-header { position: relative; }
.terminal-notifications {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.terminal-notifications-mobile { display: none; }
.terminal-notification-panel {
  position: absolute;
  z-index: 90;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(420px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 88px));
  padding: 16px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-menu);
  overflow-y: auto;
}
.terminal-notification-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.terminal-notification-panel h2,
.terminal-notification-panel p { margin-block: 0 10px; }
.terminal-notification-panel > header button,
.terminal-notification-panel form button,
.terminal-notification-panel li a,
.terminal-notification-panel > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 12px;
}
.terminal-notification-panel ol {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.terminal-notification-panel li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 11px 0;
  border-top: 1px solid var(--zc-line);
}
.terminal-notification-panel li.is-unread {
  background: var(--zc-brand-050);
  box-shadow: inset 3px 0 0 var(--zc-brand-600);
}
.terminal-notification-panel li > span {
  grid-column: 1 / -1;
  color: var(--zc-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.terminal-notification-panel-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.terminal-notification-panel-copy > strong {
  align-self: center;
  overflow-wrap: anywhere;
  font-weight: 650;
}
.terminal-notification-panel-copy > p {
  margin: 0;
  overflow-wrap: anywhere;
}
.terminal-notification-panel li.is-unread .terminal-notification-panel-copy > strong { font-weight: 820; }
.terminal-notification-unread-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-inline-end: 7px;
  border-radius: 50%;
  background: var(--zc-brand-600);
  vertical-align: .08em;
}
.terminal-notification-read-all { margin: 0 0 10px; }
.terminal-notification-panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.terminal-notification-panel-actions form { margin: 0; }
.terminal-notification-panel-actions a { text-decoration: none; }

/* BUG-2302 N3: the utility pages (Help is a sidebar row; Notifications,
   Account, Profile, Search, Accessibility are header pages) take the column's
   page width like every other page. The 920px reading measure stays, on the
   prose only. */
.terminal-utility-page {
  width: 100%;
  display: grid;
  gap: 20px;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
:where(.terminal-utility-page) p { max-width: 920px; }

.terminal-utility-heading,
.terminal-search-form,
.terminal-result-card,
.terminal-notification-card,
.terminal-neutral-state,
.terminal-form-error,
.terminal-utility-form,
.terminal-help-copy,
.terminal-utility-actions,
.terminal-notification-filters {
  min-width: 0;
  /* BUG-2302 N5: a panel that is itself a <p> (the empty states) is a card,
     not prose, so it spans the page like its sibling cards. */
  max-width: none;
  padding: 20px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-panel);
  background: var(--zc-surface);
  box-shadow: var(--zc-shadow-panel);
}

.terminal-utility-heading h1,
.terminal-utility-heading p { margin-block: 0; }
.terminal-utility-heading h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
.terminal-utility-heading > p:last-child { margin-top: 8px; color: var(--zc-muted); }
.terminal-eyebrow,
.terminal-result-kind {
  color: var(--zc-brand-700);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.terminal-search-form,
.terminal-utility-form { display: grid; gap: 12px; }
.terminal-search-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.terminal-search-fields input,
.terminal-utility-form input:not([type="hidden"]),
.terminal-utility-form select {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  background: var(--zc-surface);
  color: var(--zc-ink);
}
.terminal-search-form button,
.terminal-utility-form button,
.terminal-notifications-page > form button,
.terminal-result-card button,
.terminal-notification-actions button {
  padding: 9px 16px;
  border: 1px solid var(--zc-brand-700);
  border-radius: var(--zc-radius-control);
  color: #fff;
  background: var(--zc-brand-700);
  font-weight: 760;
  cursor: pointer;
}
.terminal-utility-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
}
.terminal-utility-form fieldset label { min-height: 44px; display: flex; align-items: center; gap: 10px; }
.terminal-utility-form input[type="radio"] { width: 20px; height: 20px; }
.terminal-feature-choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 44px;
  padding: 14px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  background: var(--zc-surface);
}
.terminal-feature-choice + .terminal-feature-choice { margin-top: 10px; }
.terminal-feature-choice.is-available { cursor: pointer; }
.terminal-feature-choice input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; }
.terminal-feature-choice:focus-within { outline: 3px solid var(--zc-focus); outline-offset: 2px; }
.terminal-utility-actions { display: grid; gap: 10px; }
.terminal-utility-actions form { margin: 0; }
.terminal-utility-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
  color: var(--zc-ink);
  background: var(--zc-surface);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
a.terminal-utility-action { text-decoration: none; }
.terminal-result-list,
.terminal-notification-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.terminal-notification-group { display: grid; gap: 10px; }
.terminal-notification-group > h2 { margin: 0; font-size: 1.15rem; }
.terminal-notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.terminal-notification-card.is-unread {
  border-inline-start: 4px solid var(--zc-brand-600);
  background: var(--zc-brand-050);
}
.terminal-result-card h3,
.terminal-notification-card h3 { margin-block: 4px; }
.terminal-notification-card.is-unread h3 { font-weight: 820; }
.terminal-result-card p,
.terminal-notification-card p,
.terminal-notification-card time { margin-block: 5px; color: var(--zc-muted); }
.terminal-notification-card time { font-size: .82rem; }
.terminal-notification-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.terminal-notification-actions form { margin: 0; }
.terminal-notification-actions .terminal-utility-action { width: auto; }
.terminal-notification-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.terminal-notification-filters > * { display: inline-flex; align-items: center; padding-inline: 12px; }
.terminal-form-error { border-color: var(--zc-danger); color: var(--zc-danger); background: var(--zc-danger-bg); }

body[data-focus-emphasis="enhanced"] :focus-visible {
  outline-width: 4px;
  outline-offset: 4px;
}

body[data-user-motion="reduce"] *,
body[data-user-motion="reduce"] *::before,
body[data-user-motion="reduce"] *::after {
  scroll-behavior: auto !important;
  transition-duration: .01ms !important;
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
}

body,
.terminal-content,
.terminal-utility-page,
.terminal-result-card,
.terminal-header-actions { overflow-wrap: anywhere; }

/* TB-344: instructor feedback compose + complete triage dossiers. */
.feedback-triage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.feedback-triage-head > div { min-width: 0; }

.feedback-triage-head__action {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.feedback-message {
  border-left: 4px solid var(--zc-positive);
  background: var(--zc-positive-bg);
}

.feedback-message p { margin: 0; }

.feedback-compose > summary,
.feedback-dossier > summary {
  min-height: 44px;
  cursor: pointer;
  color: var(--zc-brand-700);
  font-weight: 700;
}

.feedback-compose > summary {
  display: flex;
  align-items: center;
  font-size: 1.0625rem;
}

.feedback-compose[open] > summary { margin-bottom: 18px; }
.feedback-compose__intro { margin-bottom: 18px; }
.feedback-compose__intro h2 { margin: 0 0 4px; font-size: 1.25rem; }
.feedback-compose__intro p { margin: 0; }

.feedback-compose-form {
  display: grid;
  gap: 16px;
}

.feedback-compose-form__selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(180px, .8fr);
  gap: 12px;
  align-items: end;
}

.feedback-compose-form label,
.feedback-compose-form__course {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--zc-ink);
  font-weight: 650;
}

.feedback-compose-form input:not([type="radio"]):not([type="file"]),
.feedback-compose-form textarea,
.feedback-compose-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  padding: 10px 12px;
  color: var(--zc-ink);
  background: var(--zc-surface);
}

.feedback-compose-form textarea {
  resize: vertical;
  min-height: 118px;
}

.feedback-compose-form input[type="file"] {
  max-width: 100%;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 400;
}

.feedback-compose-form__course {
  min-height: 44px;
  align-content: center;
  padding: 7px 12px;
  border-left: 3px solid var(--zc-brand-600);
  background: var(--zc-brand-050);
}

.feedback-compose-form__course span,
.feedback-report__number {
  color: var(--zc-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.feedback-compose-form__help { margin: -12px 0 0; }

.feedback-compose-form__visibility {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--zc-line);
  border-radius: var(--zc-radius-control);
}

.feedback-compose-form__visibility legend { padding: 0 6px; font-weight: 700; }
.feedback-compose-form__visibility label { display: block; font-weight: 650; }
.feedback-compose-form > .btn { justify-self: start; min-height: 44px; }
.feedback-compose-card h2,
.feedback-glance h2 { margin-top: 0; }

.feedback-cluster {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(150px, auto);
  gap: 16px;
  align-items: start;
  max-width: 100%;
}

.feedback-cluster--targeted {
  border-color: var(--zc-brand-600);
  box-shadow: inset 4px 0 0 var(--zc-brand-600), var(--zc-shadow-panel);
}

.feedback-cluster__report { min-width: 0; }
.feedback-cluster__report h3 { margin: 0 0 6px; font-size: 1.125rem; }
.feedback-cluster__signals { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.feedback-cluster__preview { margin: 12px 0; }
.feedback-cluster__actions,
.feedback-cluster__actions label { min-width: 0; }
.feedback-cluster__actions select { max-width: 100%; }

.feedback-dossier {
  margin-top: 12px;
  border-top: 1px solid var(--zc-line);
}

.feedback-dossier > summary {
  display: flex;
  align-items: center;
  padding: 10px 0 0;
}

.feedback-dossier__members {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.feedback-report {
  min-width: 0;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--zc-line);
  border-left: 4px solid var(--zc-line-strong);
  border-radius: var(--zc-radius-control);
  background: var(--zc-surface);
}

.feedback-report--targeted {
  border-left-color: var(--zc-focus);
  background: var(--zc-brand-050);
}

.feedback-report__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.feedback-report__head > div { min-width: 0; }
.feedback-report__head h4 { margin: 2px 0 0; font-size: 1.0625rem; }

.feedback-report__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 14px 0;
}

.feedback-report__meta div { min-width: 0; }
.feedback-report__meta dt { color: var(--zc-muted); font-size: 0.75rem; font-weight: 700; }
.feedback-report__meta dd { margin: 0; overflow-wrap: anywhere; }

.feedback-report__body {
  margin: 0;
  padding: 14px;
  border-radius: var(--zc-radius-control);
  color: var(--zc-ink);
  background: var(--zc-canvas);
  white-space: normal;
  overflow-wrap: anywhere;
}

.feedback-report__attachments,
.feedback-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.feedback-board-row { display: flex; gap: 14px; align-items: start; }
.feedback-board-row__vote,
.feedback-board-row__private { flex: 0 0 auto; }
.feedback-board-row__content { min-width: 0; flex: 1; }
.feedback-board-row__body { margin-top: 8px; }
.feedback-board-row__visibility { margin-top: 10px; }
.feedback-attachments img { width: 72px; height: 52px; object-fit: cover; border-radius: 6px; }

@media (max-width: 760px) {
  .feedback-triage-head { align-items: stretch; flex-direction: column; }
  .feedback-triage-head__action { align-self: start; }
  .feedback-compose-form__selectors,
  .feedback-cluster,
  .feedback-report__meta { grid-template-columns: minmax(0, 1fr); }
  .feedback-cluster__score { justify-self: start; }
  .feedback-cluster__actions,
  .feedback-cluster__actions label,
  .feedback-cluster__actions select { width: 100%; }
  .feedback-report__head { align-items: start; }
}

@media (max-width: 500px) {
  .terminal-notification-panel {
    position: fixed;
    inset-block-start: calc(var(--zc-header-height) + 8px);
    inset-inline: 12px;
    width: auto;
    max-height: calc(100dvh - var(--zc-header-height) - 20px);
  }
  .terminal-notification-panel li,
  .terminal-notification-card {
    grid-template-columns: minmax(0, 1fr);
  }
  .terminal-notification-panel-actions,
  .terminal-notification-actions { justify-content: flex-start; }
}

@media (max-width: 390px) {
  .feedback-compose-form__visibility { display: grid; grid-template-columns: minmax(0, 1fr); }
  .feedback-compose-form > .btn,
  .feedback-triage-head__action { width: 100%; justify-content: center; }
  .feedback-report { padding: 14px; }
  .feedback-report__head { flex-direction: column; gap: 8px; }
  .feedback-board-row { display: grid; grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 390px) {
  :root { --zc-header-height: 112px; }
  .terminal-header,
  body[data-shell-mode="gate"] .terminal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 64px 48px;
    padding-inline: 10px;
  }
  .terminal-brand { display: none; }
  .terminal-course {
    grid-column: 1 / 3;
    grid-row: 1;
    padding-inline: 2px 10px;
  }
  .terminal-header-actions { display: contents; }
  .terminal-account-trigger {
    grid-column: 3;
    grid-row: 1;
  }
  .terminal-search {
    grid-column: 1;
    grid-row: 2;
    display: block;
    padding: 0;
  }
  .terminal-search-link {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
  }
  .terminal-notification-header {
    grid-column: 2;
    grid-row: 2;
  }
  .terminal-help-link {
    grid-column: 3;
    grid-row: 2;
    white-space: nowrap;
  }
  .terminal-notifications-desktop { display: inline-flex; }
  .terminal-notifications-mobile { display: none; }
  .terminal-utility-page { gap: 14px; }
  .terminal-utility-heading,
  .terminal-search-form,
  .terminal-result-card,
  .terminal-notification-card,
  .terminal-neutral-state,
  .terminal-form-error,
  .terminal-utility-form,
  .terminal-help-copy,
  .terminal-utility-actions,
  .terminal-notification-filters { padding: 16px; }
  .terminal-search-fields { grid-template-columns: minmax(0, 1fr); }
  .terminal-search-fields button,
  .terminal-notifications-page > form button { width: 100%; }
  .terminal-notification-filters { display: grid; grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Course Home — self-hosted theme-song anthem band (media-src 'self'; no CSP change) */
.course-home-anthem {
  margin: 0 0 18px;
  border: 1px solid #d8d1bc;
  border-radius: 16px;
  overflow: hidden;
  background: #0f1a17;
  color: #eef5f0;
  box-shadow: 0 10px 32px rgba(24, 53, 46, .06);
}
.course-home-anthem-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
}
.course-home-anthem-head .k {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #e7c780;
}
.course-home-anthem-head h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.course-home-anthem video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}

/* TB-1089: the student's existing sections expose their visible pages. */
.terminal-nav-row { position: relative; }
.terminal-nav-row--has-children > a { padding-right: 40px; }
.terminal-nav-row--in > a { color: var(--zc-brand-700); }
.terminal-nav-row > .terminal-nav-fold {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; min-height: 32px; height: 32px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--zc-muted); cursor: pointer;
}
.terminal-nav-row > .terminal-nav-fold:hover { background: #e6eef1; color: var(--zc-ink); }
.terminal-nav-fold svg { width: 14px; height: 14px; transition: transform .15s; }
.terminal-nav-fold[aria-expanded="true"] svg { transform: rotate(90deg); }
.terminal-nav-children {
  display: flex; flex-direction: column; gap: 1px;
  margin: 0 0 4px 22px; padding-left: 9px; border-left: 1px solid var(--zc-line);
}
.terminal-nav-children[hidden] { display: none; }
.terminal-nav-children > a {
  display: flex; align-items: center; gap: 6px; min-height: 34px;
  padding: 5px 10px; border-radius: 8px; color: var(--zc-muted);
  font-size: .78rem; font-weight: 650; text-decoration: none;
}
.terminal-nav-children > a:hover { color: var(--zc-ink); background: #f1f5f6; }
.terminal-nav-children > a[aria-current] {
  color: var(--zc-brand-700); background: var(--zc-brand-050);
  font-weight: 750; box-shadow: inset 3px 0 0 var(--zc-brand-600);
}
.terminal-nav-new {
  font-size: .55rem; background: #c9992f; color: #2c2416; border-radius: 4px;
  padding: 1px 4px; font-weight: 800; letter-spacing: .02em;
}
.terminal-nav-footer { margin-top: 14px; border-top: 1px solid var(--zc-line); padding: 14px 11px 0; font-size: .72rem; }
.terminal-nav-footer > button {
  min-height: 0; width: auto; display: inline; border: 0; border-radius: 0;
  background: none; padding: 0; font: inherit; font-weight: 700; color: var(--zc-brand-600); cursor: pointer;
}
.terminal-nav-footer > button:hover { background: none; text-decoration: underline; }

.terminal-nav-section { display: flex; flex-direction: column; gap: 4px; }
