:root {
  --v5-focus: #1565d8;
  --v5-surface: #ffffff;
  --v5-soft: #f7f8fa;
  --v5-ink: #18212f;
  --v5-muted: #667483;
  --v5-radius: 10px;

  /* Semantic palette */
  --v5-color-brand: #ff6a00;
  --v5-color-brand-soft: #fff3ea;
  --v5-color-commerce: #1d2734;
  --v5-color-teach: #0f766e;
  --v5-color-teach-soft: #e6f7f3;
  --v5-color-risk: #e94b4b;
  --v5-color-risk-soft: #fff0f0;
  --v5-color-warn: #c56a00;
  --v5-color-warn-soft: #fff4e8;
  --v5-color-good: #087a50;
  --v5-color-good-soft: #e9f8f2;
  --v5-color-info: #246bfd;
  --v5-color-info-soft: #edf4ff;

  /* Typography */
  --v5-font-body: Inter, "Microsoft YaHei", Arial, sans-serif;
  --v5-text-xs: max(11px, 0.72rem);
  --v5-text-sm: max(12px, 0.78rem);
  --v5-text-md: max(13px, 0.85rem);
  --v5-text-lg: max(15px, 0.95rem);
  --v5-text-xl: max(19px, 1.15rem);
  --v5-leading: 1.55;

  /* Spacing */
  --v5-space-1: 4px;
  --v5-space-2: 8px;
  --v5-space-3: 12px;
  --v5-space-4: 16px;
  --v5-space-5: 24px;
  --v5-space-6: 32px;

  /* Radius / shadow / motion */
  --v5-radius-sm: 7px;
  --v5-radius-md: 10px;
  --v5-radius-lg: 14px;
  --v5-shadow-sm: 0 4px 14px #1018280f;
  --v5-shadow-md: 0 12px 32px #10182818;
  --v5-motion-fast: 150ms ease;
  --v5-motion-base: 220ms ease;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--v5-ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--v5-focus) 60%, transparent);
  outline-offset: 2px;
}

.content {
  max-width: 1520px;
}

.content small,
.content .eyebrow,
.content .muted {
  font-size: max(11px, .72rem);
  line-height: 1.55;
}

.content :is(button, input, select, textarea, a.primary-btn, a.secondary-btn) {
  min-height: 36px;
}

.sidebar nav a,
.nav-cluster summary {
  min-height: 40px;
}

.sidebar nav em {
  min-width: 28px;
  text-align: center;
  font-size: 9px;
  border-radius: 999px;
}

.v5-context-center {
  position: sticky;
  top: 68px;
  z-index: 3;
  min-height: 48px;
  padding: 7px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, #fff 94%, transparent);
  backdrop-filter: blur(14px);
}

.v5-context-summary,
.v5-context-center > .v5-context-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.v5-context-summary {
  flex: 0 1 auto;
}

.v5-context-center > .v5-context-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.v5-context-kicker {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.v5-context-summary strong {
  font-size: 12px;
}

.v5-context-summary > span:not(.v5-context-kicker) {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--v5-muted);
  font-size: 10px;
}

.v5-context-summary .is-ready {
  background: #e9f8f2;
  color: #087a50;
}

.v5-context-summary .is-warning {
  background: #fff4e8;
  color: #a34b00;
}

.v5-context-actions a,
.v5-context-actions button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 6px 9px;
  background: transparent;
  color: var(--v5-muted);
  font-size: 11px;
  text-decoration: none;
}

.v5-context-actions a:hover {
  background: #fff3ea;
  color: var(--orange);
}

.v5-context-actions button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--v5-ink);
  color: #fff;
  font-weight: 700;
}

.v5-context-recovery {
  flex: 0 0 auto;
  width: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-bottom: 0;
  border-radius: 0;
  background: transparent;
  color: #7a3b00;
  font-size: 11px;
}

.v5-context-center:has(.v5-context-recovery) {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  gap: 12px;
}

.v5-context-center:has(.v5-context-recovery) .v5-context-summary {
  display: none;
}

.v5-context-center:has(.v5-context-recovery) > .v5-context-actions {
  margin-left: 0;
  flex: 1 1 auto;
}

.v5-context-recovery strong {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff4e8;
  color: #a34b00;
  font-size: max(12px, 0.78rem);
  font-weight: 700;
  line-height: 1.35;
}

.v5-context-recovery .v5-context-actions {
  display: none;
}

.v5-context-center:has(.v5-context-recovery) .v9-context-recovery {
  display: none;
}

.v5-context-switcher select {
  min-height: 30px;
  min-width: 140px;
  border: 1px solid #d9dee5;
  border-radius: 7px;
  padding: 4px 8px;
  background: #fff;
  color: var(--v5-ink);
  font-size: 11px;
}

.v5-recent-contexts {
  position: relative;
}

.v5-recent-contexts summary {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--v5-muted);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}

.v5-recent-contexts summary::-webkit-details-marker {
  display: none;
}

.v5-recent-contexts[open] summary {
  background: #f2f4f7;
}

.v5-recent-contexts a {
  display: block;
  padding: 6px 10px;
  white-space: nowrap;
}

.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;
}

kbd {
  border: 1px solid #d7dce2;
  border-radius: 4px;
  padding: 2px 5px;
  background: #fff;
  color: #697586;
  font: 10px/1.2 Inter, Arial, sans-serif;
  box-shadow: 0 1px 0 #d7dce2;
}

.v5-command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 10vh 20px 20px;
  background: #10182880;
  backdrop-filter: blur(5px);
}

.v5-command-backdrop[hidden] {
  display: none;
}

.v5-command-dialog {
  width: min(760px, 100%);
  max-height: 78vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #dfe4ea;
  border-radius: 16px;
  background: var(--v5-surface);
  box-shadow: 0 30px 80px #10182850;
}

.v5-command-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
}

.v5-command-dialog h2 {
  margin: 5px 0 0;
  font-size: 19px;
}

.v5-command-dialog header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #667085;
  font-size: 20px;
}

.v5-command-search {
  margin: 0 22px 10px;
  min-height: 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #d9dee5;
  border-radius: 10px;
  background: #fbfcfd;
}

.v5-command-search:focus-within {
  border-color: var(--v5-focus);
  box-shadow: 0 0 0 3px #1565d81c;
}

.v5-command-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.v5-command-results {
  padding: 6px 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  overflow: auto;
}

.v5-command-results section {
  align-content: start;
  padding: 5px 8px;
}

.v5-command-results h3 {
  margin: 7px 6px;
  color: #98a2b3;
  font-size: 10px;
  letter-spacing: .08em;
}

.v5-command-results a {
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--v5-ink);
  text-decoration: none;
}

.v5-command-results a:hover,
.v5-command-results a.is-active {
  background: #fff3ea;
  color: #b94d00;
}

.v5-command-results b {
  font-size: 12px;
}

.v5-command-results small {
  color: #7d8996;
  font-size: 10px;
}

.v5-command-dialog footer {
  display: flex;
  gap: 14px;
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  background: var(--v5-soft);
  color: #98a2b3;
  font-size: 10px;
}

body.v5-command-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .v5-context-center {
    padding-inline: 20px;
  }
  .v5-context-summary > span:not(.v5-context-kicker, .is-warning, .is-ready) {
    display: none;
  }
}

@media (max-width: 750px) {
  .v5-context-center {
    position: sticky;
    top: 68px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 7px 18px;
    overflow-x: visible;
  }

  .v5-context-summary,
  .v5-context-actions {
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .v9-context-select-bar,
  .v9-inline-select-wrap {
    flex-wrap: wrap;
  }
  .v5-context-summary .v5-context-kicker,
  .v5-context-actions a {
    display: none;
  }
  .v5-context-actions button {
    font-size: 0;
  }
  .v5-context-actions button:before {
    content: "导航";
    font-size: 11px;
  }
  .v5-context-actions kbd {
    display: none;
  }
  .v5-command-backdrop {
    padding: 12px;
  }
  .v5-command-dialog {
    max-height: calc(100vh - 24px);
  }
  .v5-command-results {
    grid-template-columns: 1fr;
  }
}

/* V5-02 design system components */
.content {
  font-size: var(--v5-text-sm);
  line-height: var(--v5-leading);
}

.v5-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 700;
  color: var(--v5-color-brand);
}

.v5-nav-icon {
  font-style: normal;
}

.v5-page-state {
  display: grid;
  justify-items: center;
  gap: var(--v5-space-2);
  padding: var(--v5-space-5);
  border: 1px dashed #d9dee5;
  border-radius: var(--v5-radius-lg);
  background: var(--v5-soft);
  color: var(--v5-muted);
  text-align: center;
}

.v5-page-state .v5-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--v5-shadow-sm);
}

.v5-page-state b {
  font-size: var(--v5-text-md);
  color: var(--v5-ink);
}

.v5-page-state p {
  margin: 0;
  max-width: 36rem;
  font-size: var(--v5-text-sm);
}

.v5-page-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v5-space-2);
  justify-content: center;
  margin-top: var(--v5-space-2);
}

.v5-page-state--loading .v5-icon { animation: v5-spin 1s linear infinite; }
.v5-page-state--empty { background: #fbfcfd; }
.v5-page-state--blocked,
.v5-page-state--degraded { background: var(--v5-color-warn-soft); border-color: #ffd3b3; }
.v5-page-state--forbidden { background: var(--v5-color-risk-soft); border-color: #fecaca; }
.v5-page-state--ready { background: var(--v5-color-good-soft); border-color: #9edfc8; }

.v5-tone-good .v5-icon { color: var(--v5-color-good); }
.v5-tone-warn .v5-icon { color: var(--v5-color-warn); }
.v5-tone-risk .v5-icon { color: var(--v5-color-risk); }

@keyframes v5-spin {
  to { transform: rotate(360deg); }
}

.v5-btn,
.content .primary-btn,
.content .secondary-btn,
.content .text-btn {
  min-height: 36px;
  min-width: 36px;
  border-radius: var(--v5-radius-sm);
  font-size: var(--v5-text-sm);
  transition: background var(--v5-motion-fast), color var(--v5-motion-fast), border-color var(--v5-motion-fast);
}

.v5-btn-primary,
.content .primary-btn {
  background: var(--v5-color-brand);
  color: #fff;
}

.v5-btn-secondary,
.content .secondary-btn {
  background: #fff;
  border: 1px solid #d9dee5;
  color: var(--v5-ink);
}

.v5-btn-ghost,
.content .text-btn {
  background: transparent;
  color: var(--v5-color-brand);
}

.v5-field,
.content input:not([type="checkbox"]):not([type="radio"]),
.content select,
.content textarea {
  min-height: 36px;
  border: 1px solid #d9dee5;
  border-radius: var(--v5-radius-sm);
  padding: 8px 10px;
  font-size: var(--v5-text-sm);
  background: #fff;
}

.v5-field:focus,
.content input:focus,
.content select:focus,
.content textarea:focus {
  border-color: var(--v5-focus);
  box-shadow: 0 0 0 3px #1565d81c;
  outline: 0;
}

.v5-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: var(--v5-text-xs);
  background: #f2f4f7;
  color: var(--v5-muted);
}

.v5-chip.is-good { background: var(--v5-color-good-soft); color: var(--v5-color-good); }
.v5-chip.is-warn { background: var(--v5-color-warn-soft); color: var(--v5-color-warn); }
.v5-chip.is-risk { background: var(--v5-color-risk-soft); color: var(--v5-color-risk); }

.v5-card,
.content .panel,
.content .stat-card {
  border-radius: var(--v5-radius-md);
  box-shadow: var(--v5-shadow-sm);
}

.content table {
  font-size: var(--v5-text-sm);
}

.content th {
  font-size: var(--v5-text-xs);
  font-weight: 700;
  color: var(--v5-muted);
}

.content td {
  font-size: var(--v5-text-sm);
}

.v5-toast {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 35;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--v5-radius-md);
  background: var(--v5-commerce);
  color: #fff;
  box-shadow: var(--v5-shadow-md);
  font-size: var(--v5-text-sm);
}

.v5-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 36;
  background: #10182866;
}

.v5-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 37;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  box-shadow: var(--v5-shadow-md);
  padding: var(--v5-space-5);
}

/* Density modes */
body.v5-density-desktop .content {
  padding-block: 28px;
}

body.v5-density-guided .nav-cluster,
body.v5-density-guided .sidebar-foot,
body.v5-density-guided .v5-context-actions a:not(#v5-command-trigger):not([href*="cockpit"]):not([href*="classroom"]) {
  display: none;
}

body.v5-density-guided .content .panel:not(:first-of-type),
body.v5-density-guided .two-col > :nth-child(n+2) {
  display: none;
}

body.v5-density-projection .content {
  max-width: none;
  font-size: max(14px, 0.95rem);
}

body.v5-density-projection .content .stat-card,
body.v5-density-projection .content .panel {
  font-size: max(14px, 0.95rem);
}

body.v5-density-projection .v5-context-center {
  display: none;
}

body.v5-density-narrow .v5-context-center {
  flex-direction: column;
  align-items: stretch;
}

body.v5-density-narrow .content {
  padding-inline: 18px;
}

/* Bridge legacy journey-state to V5 tokens */
.journey-state {
  padding: var(--v5-space-5);
  border-radius: var(--v5-radius-md);
  font-size: var(--v5-text-sm);
}

.journey-state b {
  font-size: var(--v5-text-md);
}

.journey-state p {
  font-size: var(--v5-text-sm);
}

.journey-state.loading,
.journey-state.empty {
  background: var(--v5-soft);
}

.journey-state.forbidden,
.journey-state.error {
  background: var(--v5-color-risk-soft);
  border-color: #fecaca;
  color: #9a3412;
}

.journey-state.blocked,
.journey-state.degraded,
.journey-state.warn {
  background: var(--v5-color-warn-soft);
  border-color: #ffd3b3;
}

.page-recovery-gate {
  margin-bottom: var(--v5-space-5);
}

.page-recovery-gate .recovery-gate-lead {
  margin: 0.5rem 0 1rem;
  max-width: 42rem;
  line-height: 1.55;
}

.recovery-gate-picker {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--v5-radius-md);
  border: 1px solid var(--line, #e5e7eb);
  background: #fff;
}

.recovery-gate-picker .eyebrow {
  display: block;
  margin-bottom: 0.5rem;
}

.recovery-context-select .v9-context-select-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.recovery-gate-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 42rem;
  line-height: 1.55;
  font-size: var(--v5-text-sm);
}

.recovery-gate-steps li + li {
  margin-top: 0.35rem;
}

.page-recovery-gate .journey-recovery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.journey-banner {
  font-size: var(--v5-text-sm);
}

@media (prefers-reduced-motion: reduce) {
  .v5-page-state--loading .v5-icon {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* V5-03 student today workspace */
.today-hero {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  margin-bottom: 14px;
  border-radius: var(--v5-radius-lg);
  color: #fff;
  background: radial-gradient(circle at 82% 30%, #ff7a1a55, transparent 25%), linear-gradient(120deg, var(--v5-color-commerce), #3c4c57);
}

.today-hero h1 {
  margin: 8px 0;
  font-size: var(--v5-text-xl);
}

.today-hero p {
  margin: 0;
  font-size: var(--v5-text-sm);
  color: #c4ced7;
}

.today-hero-aside {
  padding: 14px;
  border: 1px solid #ffffff1c;
  border-radius: var(--v5-radius-md);
  background: #ffffff0c;
  text-align: center;
}

.today-hero-aside small,
.today-hero-aside strong,
.today-hero-aside span {
  display: block;
}

.today-hero-aside strong {
  font-size: 2rem;
  color: #ff9a4c;
  margin: 6px 0;
}

.today-role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.today-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.today-mode-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: #f2f4f7;
}

.today-mode-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--v5-muted);
  font-size: var(--v5-text-sm);
  font-weight: 700;
}

.today-mode-toggle button.is-active {
  background: #fff;
  color: var(--v5-color-brand);
  box-shadow: var(--v5-shadow-sm);
}

.today-primary-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  border-left: 4px solid var(--v5-color-brand);
}

.today-primary-action h2 {
  margin: 6px 0;
  font-size: var(--v5-text-lg);
}

.today-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.today-action-list {
  display: grid;
  gap: 10px;
}

.today-action-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: var(--v5-radius-md);
  background: #fff;
}

.today-action-card.priority-1,
.today-action-card.priority-2 {
  border-color: #ffd3b3;
  background: #fffaf5;
}

.today-action-card small {
  display: block;
  color: var(--v5-muted);
  font-size: var(--v5-text-xs);
}

.today-action-card b {
  display: block;
  margin: 6px 0;
  font-size: var(--v5-text-md);
}

.today-action-card p {
  margin: 0;
  color: var(--v5-muted);
  font-size: var(--v5-text-sm);
}

.today-completion summary {
  cursor: pointer;
  color: var(--v5-color-brand);
  font-size: var(--v5-text-xs);
  margin-top: 8px;
}

.today-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.today-module-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: var(--v5-radius-md);
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.today-module-card:hover {
  border-color: #ffc49b;
  background: #fff9f5;
}

.today-module-card b {
  font-size: var(--v5-text-sm);
}

.today-module-card small {
  color: var(--v5-muted);
  font-size: var(--v5-text-xs);
}

.today-feedback-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.today-feedback-grid article {
  padding: 12px 14px;
  border-radius: var(--v5-radius-md);
  background: var(--v5-soft);
}

.today-feedback-grid b {
  display: block;
  margin-bottom: 6px;
  font-size: var(--v5-text-sm);
}

.today-feedback-grid p {
  margin: 0;
  font-size: var(--v5-text-sm);
  color: var(--v5-muted);
}

@media (max-width: 900px) {
  .today-hero {
    grid-template-columns: 1fr;
  }
  .today-hero-aside {
    display: none;
  }
  .today-primary-action,
  .today-action-card {
    grid-template-columns: 1fr;
  }
  .today-feedback-grid {
    grid-template-columns: 1fr;
  }
}

.teacher-phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.teacher-phase-card {
  padding: 16px 18px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #fff;
}

.teacher-phase-card.is-primary {
  border-color: #ffc49b;
  background: #fff9f5;
}

.teacher-phase-card h3 {
  margin: 6px 0 10px;
  font-size: var(--v5-text-sm);
  font-weight: 600;
}

.teacher-ops-note {
  margin-top: 1rem;
  font-size: var(--v5-text-sm);
}

.tower-more-analysis {
  margin-top: 1rem;
  border: 1px dashed var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #f8fafc;
}

.tower-more-analysis > summary {
  cursor: pointer;
  padding: 14px 16px;
  font-size: var(--v5-text-sm);
  font-weight: 600;
  color: var(--v5-muted);
}

.tower-intervention-preview-card {
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid #bbf7d0;
  border-radius: var(--v5-radius-md);
  background: #f0fdf4;
}

.tower-intervention-preview-card small {
  display: block;
  margin-top: 4px;
  color: var(--v5-muted);
  font-size: var(--v5-text-xs);
}

body.projection-mode .tower-ops-note,
body.projection-mode #tower-more-analysis {
  display: none;
}

.v5-business-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Merchant workspace: nested <main> must not inherit app-shell column placement */
.v5-business-workspace > main.v5-business-main {
  grid-column: 1 / -1;
  width: 100%;
}

.v5-business-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #fff;
}

.v5-business-toolbar:not(:has([data-bw-status-tabs] button, [data-bw-filters] label, [data-bw-bulk]:not([hidden]))) {
  justify-content: flex-end;
  padding-block: 8px;
}

.v5-business-toolbar:not(:has([data-bw-status-tabs] button, [data-bw-filters] label)) .v5-business-toolbar-main {
  display: none;
}

.v5-business-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.v5-business-status-tabs,
.v5-business-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v5-business-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--v5-text-xs);
  color: var(--v5-muted);
}

.v5-business-main {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.v5-business-main .v5-business-content-pane,
.v5-business-main .two-col {
  width: 100%;
  min-width: 0;
}

.v5-business-main .two-col {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
}

.v5-business-side-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

.v5-business-content-pane {
  margin-top: 0 !important;
}

.v5-business-task-panel,
.v5-business-ai-panel {
  padding: 14px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: var(--v5-soft, #f8fafc);
}

.v5-business-task-panel h3,
.v5-business-ai-panel h3 {
  margin: 6px 0 8px;
  font-size: var(--v5-text-sm);
}

.v5-business-task-panel p {
  font-size: var(--v5-text-sm);
  color: var(--v5-muted);
}

.v5-business-entity-links {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.v5-business-ai-panel article {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: var(--v5-radius-sm, 8px);
  border: 1px dashed var(--v5-border, #e5e7eb);
  background: #fff;
  font-size: var(--v5-text-xs);
}

.v5-business-more summary {
  cursor: pointer;
  font-size: var(--v5-text-sm);
  color: var(--v5-muted);
}

.v5-business-more [data-bw-more-actions] {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .v5-business-main .two-col {
    grid-template-columns: 1fr;
  }
}

.v5-work-hero-classic {
  margin-top: 14px;
}

.v5-work-page {
  display: grid;
  gap: 0;
  background: var(--v5-surface, #fff);
  border: 1px solid var(--line, #e9edf2);
  border-radius: var(--v5-radius, 11px);
  box-shadow: var(--shadow, 0 8px 30px rgba(30, 42, 60, 0.07));
  overflow: hidden;
}

.v5-work-page-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line, #e9edf2);
  background: linear-gradient(180deg, #fffaf6 0%, #fff 100%);
}

.v5-work-page-head h1 {
  margin: 0 0 6px;
  font-size: var(--v5-text-xl, max(19px, 1.15rem));
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.v5-work-page-lead {
  margin: 0;
  max-width: 52rem;
  color: var(--v5-muted, #667483);
  font-size: var(--v5-text-md, max(13px, 0.85rem));
  line-height: var(--v5-leading, 1.55);
}

.v5-work-section {
  padding: 18px 22px;
  border-top: 1px solid var(--line, #e9edf2);
}

.v5-work-section:first-of-type {
  border-top: 0;
}

.v5-work-section-head h2,
.v5-work-exec-head h2,
.v5-work-classic-copy h2 {
  margin: 0;
  font-size: var(--v5-text-lg, max(15px, 0.95rem));
  line-height: 1.35;
}

.v5-work-section-head {
  margin-bottom: 12px;
}

.v5-work-classic-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.2fr) auto;
  gap: 14px 16px;
  align-items: end;
}

.v5-work-classic-copy p {
  margin: 6px 0 0;
  color: var(--v5-muted, #667483);
  font-size: var(--v5-text-sm, max(12px, 0.78rem));
  line-height: 1.5;
}

.v5-work-classic-goal {
  margin: 0;
}

.v5-work-classic-goal span {
  display: block;
  margin-bottom: 6px;
  font-size: var(--v5-text-sm, max(12px, 0.78rem));
  color: var(--v5-muted, #667483);
}

.v5-work-classic-start {
  align-self: end;
  white-space: nowrap;
}

.v5-work-exec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.v5-work-exec-head #v5-work-title {
  margin: 0;
}

.v5-work-page .v5-work-advanced {
  margin: 0;
  border-top: 1px solid var(--line, #e9edf2);
  border-radius: 0;
}

.v5-work-page .v5-work-advanced summary {
  padding: 14px 22px;
}

.v5-work-page .v5-work-advanced-body {
  padding: 0 22px 18px;
}

@media (max-width: 960px) {
  .v5-work-classic-bar {
    grid-template-columns: 1fr;
  }

  .v5-work-classic-start {
    justify-self: start;
  }
}

.v9-work-agent-panel {
  margin-bottom: 14px;
}

.v9-work-unified-panel {
  margin-bottom: 0;
}

.v9-work-unified-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
}

@media (max-width: 960px) {
  .v9-work-unified-grid {
    grid-template-columns: 1fr;
  }
}

.v9-work-unified-assist .v5-work-quick-assist {
  min-height: 280px;
}

.merchant-entity-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #f8fafc;
}

.merchant-entity-select-root {
  flex: 1;
  min-width: 220px;
}

.v9-gov-form label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.v9-audit-row {
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.v9-work-agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.v9-work-agent-messages {
  max-height: 360px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #fafafa;
}

.v9-work-msg-user .v9-work-msg-body {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.v9-work-msg-assistant .v9-work-msg-body {
  background: #fff;
  border: 1px solid var(--v5-border, #e5e7eb);
}

.v9-work-msg-body {
  padding: 10px 12px;
  border-radius: var(--v5-radius-md);
  font-size: var(--v5-text-sm);
}

.v9-work-msg-role {
  display: block;
  font-size: var(--v5-text-xs);
  color: #64748b;
  margin-bottom: 4px;
}

.v9-work-agent-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.v9-work-agent-compose textarea {
  min-height: 64px;
  resize: vertical;
}

.v9-work-deliverables,
.v9-work-actions-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.v9-work-deliverable {
  padding: 8px 10px;
  border-radius: var(--v5-radius-sm, 8px);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.v9-sim-label {
  margin-top: 8px;
  font-size: var(--v5-text-xs);
}

.v9-context-select-bar,
.v9-inline-select-wrap {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
}

.v9-context-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--v5-text-sm);
}

.v9-context-select > span {
  white-space: nowrap;
  flex-shrink: 0;
}

.v9-context-select-input {
  min-width: 9rem;
  max-width: 14rem;
  padding: 0.35rem 0.5rem;
}

.v9-context-recovery {
  color: #b45309;
  font-size: var(--v5-text-sm);
  margin-bottom: 8px;
}

.v5-work-hero {
  padding: 18px 20px;
  margin-bottom: 14px;
  border-radius: var(--v5-radius-md);
  background: linear-gradient(120deg, #fff9f5, #fff);
  border: 1px solid #ffc49b;
}

.v5-work-context-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: var(--v5-radius-md);
  background: #f8fafc;
  border: 1px solid var(--v5-border, #e5e7eb);
}

.v5-work-first-screen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.v5-work-card {
  padding: 12px 14px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: var(--v5-soft, #f7f8fa);
  min-height: 120px;
}

.v5-work-card article {
  margin-top: 6px;
  font-size: var(--v5-text-sm);
}

.v5-work-actions {
  display: grid;
  gap: 10px;
}

.v5-work-modify textarea {
  font-family: ui-monospace, monospace;
  font-size: var(--v5-text-xs);
}

.v5-work-advanced {
  margin-top: 12px;
  border: 1px dashed var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #f8fafc;
}

.v5-work-advanced > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: var(--v5-text-sm);
}

.v5-work-advanced-body {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.v5-business-work-status {
  padding: 10px 12px;
  margin: 10px 0;
  border-radius: var(--v5-radius-sm, 8px);
  border: 1px solid var(--v5-border, #e5e7eb);
  background: #fff;
}

.v5-business-work-status.status-warn {
  border-color: #fde68a;
  background: #fffbeb;
}

/* V5-07 growth report */
.v5-growth-first-screen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.v5-growth-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
  min-height: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.v5-growth-card .eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.35;
}

.v5-growth-card ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.55;
  flex: 1;
}

.v5-growth-card ul li {
  margin-bottom: 0.35rem;
}

.v5-growth-card ul li.v5-growth-empty,
.v5-growth-card ul li.muted {
  list-style: none;
  margin-left: -1.15rem;
  padding-left: 0;
  color: #8a97a7;
  font-size: 0.8125rem;
}

.v5-growth-remedial #v5-growth-next-remedial {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.v5-growth-remedial #v5-growth-next-remedial b {
  font-size: 0.92rem;
  line-height: 1.45;
}

.v5-growth-remedial #v5-growth-next-remedial p {
  font-size: 0.8125rem;
  color: #5d6878;
  margin: 0;
}

.v5-growth-remedial #v5-growth-next-remedial > p.muted {
  font-size: 0.8125rem;
  color: #8a97a7;
}

@media (max-width: 1100px) {
  .v5-growth-first-screen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.v5-growth-remedial .v5-priority-urgent {
  color: #c2410c;
  font-size: var(--v5-text-xs);
}

.v5-growth-narratives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.v5-growth-period-card {
  padding: 10px 12px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-sm, 8px);
  background: #f8fafc;
}

.v5-growth-period-card header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.v5-drill-participation {
  font-size: var(--v5-text-xs);
  color: #64748b;
}

.v5-period-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--v5-text-sm);
}

.v5-teacher-distribution {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.v5-dist-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: var(--v5-text-sm);
}

.v5-row-outlier {
  background: #fff7ed;
}

.v5-outlier-tag {
  color: #c2410c;
}

body.v5-presentation-mode .sidebar,
body.v5-presentation-mode .v5-context-bar,
body.v5-presentation-mode #evaluate-funnel-panel,
body.v5-presentation-mode #evaluate-crosslink-banner,
body.v5-presentation-mode .report-tab-bar,
body.v5-presentation-mode #v4-longitudinal-panel,
body.v5-presentation-mode #v4-validity-panel,
body.v5-presentation-mode #live-report-panel,
body.v5-presentation-mode #ai-decision-diff,
body.v5-presentation-mode #rule-hits-panel,
body.v5-presentation-mode #remedial-hub-panel {
  display: none !important;
}

body.v5-presentation-mode .report-hero,
body.v5-presentation-mode #v5-growth-first-screen,
body.v5-presentation-mode #v5-growth-narratives-wrap,
body.v5-presentation-mode #competency-drill-panel {
  font-size: 1.05rem;
}

@media print {
  .sidebar,
  .v5-context-bar,
  .report-actions,
  .report-tab-bar,
  .chain-crosslink-banner,
  #evaluate-funnel-panel {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .page-title,
  .report-hero,
  .v5-growth-first-screen,
  .v5-growth-narratives-panel,
  .panel {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .stat-card,
  .v5-growth-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .report-hero .score-block strong {
    font-size: 2.4rem;
  }
}

/* V5-08 layout overflow guards */
.v5-live-region {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.v5-panel-spaced {
  margin-top: var(--v5-space-4);
}

.v5-inline-gap {
  margin-left: var(--v5-space-3);
}

@media (max-width: 390px) {
  .app-shell,
  .content,
  main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .stat-grid,
  .report-grid,
  .v5-growth-first-screen,
  .tower-op-kpi {
    grid-template-columns: 1fr;
  }

  .page-title,
  .report-actions,
  .tower-toolbar {
    flex-wrap: wrap;
  }

  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (min-width: 1280px) {
  .content {
    overflow-x: hidden;
  }
}

.v5-work-quick-assist,
.daily-work-assist {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.work-assist-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.work-assist-head b {
  display: block;
  margin-top: 4px;
}

.work-assist-head small {
  display: block;
  opacity: 0.75;
  margin-top: 4px;
}

.work-assist-wallet {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange, #ff6a00);
  white-space: nowrap;
}

.work-assist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.work-assist-card {
  padding: 12px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #fff;
  display: grid;
  gap: 8px;
}

.work-assist-card.blocked {
  opacity: 0.72;
  border-color: #fecaca;
  background: #fff7f7;
}

.work-assist-card small {
  opacity: 0.75;
  line-height: 1.45;
}

.battle-preset-bar {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  background: #f8fafc;
}

.battle-preset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.battle-preset-btn.active {
  border-color: var(--orange, #ff6a00);
  background: #fff4ec;
  color: var(--orange, #ff6a00);
}

.battle-preset-desc {
  margin: 8px 0 0;
  font-size: 12px;
  opacity: 0.8;
}

.battle-config-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.battle-config-group {
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: var(--v5-radius-md);
  padding: 10px 12px;
  background: #fff;
}

.battle-config-group summary {
  cursor: pointer;
  list-style: none;
}

.battle-config-group summary b {
  display: block;
}

.battle-config-group summary small {
  display: block;
  opacity: 0.75;
  margin-top: 4px;
}

.battle-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.battle-config-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.battle-config-field b {
  font-size: 13px;
}

.battle-config-field small {
  opacity: 0.75;
  line-height: 1.4;
}

.battle-config-field input[type="number"] {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: 8px;
}

.battle-config-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
}

.battle-config-check input {
  margin-top: 4px;
}

.battle-config-note {
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.battle-config-note textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--v5-border, #e5e7eb);
  border-radius: 8px;
  resize: vertical;
}

.battle-config-actions {
  margin-top: 8px;
}

/* Product UI consistency layer: applied globally so dynamic student/teacher pages do not drift. */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  text-rendering: optimizeLegibility;
}

.page-title,
.welcome,
.panel-head {
  gap: var(--v5-space-3);
}

.page-title > div,
.welcome > div,
.panel-head > div {
  min-width: 0;
}

.page-title h1,
.welcome h1,
.panel-head h2,
.v6-ops-hero h1,
.agent-command-hero h1,
.merchant-page-title h1 {
  text-wrap: balance;
}

.content p,
.content small,
.content .muted,
.panel-head p,
.journey-state,
.merchant-audit-feedback,
.merchant-action-anchor {
  text-wrap: pretty;
}

.primary-btn,
.secondary-btn,
.text-btn,
.v5-action-control {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--v5-radius-md);
  line-height: 1.25;
  cursor: pointer;
  transition-property: transform, background-color, border-color, color, box-shadow, opacity;
  transition-duration: var(--v5-motion-fast);
  transition-timing-function: ease-out;
}

.text-btn {
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 999px;
}

.primary-btn:hover,
.secondary-btn:hover,
.text-btn:hover,
.v5-action-control:hover {
  box-shadow: var(--v5-shadow-sm);
}

.primary-btn:active,
.secondary-btn:active,
.text-btn:active,
.v5-action-control:active {
  transform: scale(0.98);
}

.primary-btn[disabled],
.secondary-btn[disabled],
.text-btn[disabled],
.v5-action-control[disabled],
.primary-btn[aria-disabled="true"],
.secondary-btn[aria-disabled="true"],
.text-btn[aria-disabled="true"],
.v5-action-control[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
  transform: none;
}

.v5-action-control[aria-busy="true"] {
  position: relative;
  color: color-mix(in srgb, currentColor 72%, transparent);
}

.v5-action-control[aria-busy="true"]::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: v5-spin 0.8s linear infinite;
}

@keyframes v5-spin {
  to {
    transform: rotate(360deg);
  }
}

.report-actions,
.btn-row,
.battle-preset-actions,
.tower-toolbar,
.handoff-actions,
.merchant-shell-work,
.action-row,
.filter-row,
.tab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.v5-context-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.v5-context-recovery .v5-context-actions {
  flex: 0 1 auto;
  margin-left: auto;
  overflow-x: visible;
}

.report-actions label,
.tower-toolbar label,
.v5-context-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.panel,
.stat-card,
.task,
.event,
.growth-card,
.battle-config-group,
.work-assist-card,
.v5-status-surface {
  border-color: #e6eaf0;
}

.panel,
.stat-card,
.v5-status-surface {
  box-shadow: var(--v5-shadow-sm);
}

.panel-head {
  align-items: flex-start;
}

.panel-head h2 {
  line-height: 1.35;
}

.panel-head p {
  max-width: 72ch;
  line-height: var(--v5-leading);
}

.stack-form label,
.battle-config-field,
.config-panel label,
.v5-field-label {
  color: #344054;
  font-weight: 700;
  line-height: 1.45;
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.battle-config-field input,
.battle-config-field select,
.battle-config-note textarea,
.config-panel input,
.config-panel select,
.config-panel textarea,
.v5-field-control {
  min-height: 40px;
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: var(--v5-radius-md);
  background: #fff;
  color: var(--v5-ink);
  line-height: 1.45;
  transition-property: border-color, box-shadow, background-color;
  transition-duration: var(--v5-motion-fast);
  transition-timing-function: ease-out;
}

.stack-form input,
.stack-form select,
.battle-config-field input,
.battle-config-field select,
.config-panel input,
.config-panel select,
.v5-field-control {
  padding: 9px 10px;
}

.stack-form textarea,
.battle-config-note textarea,
.config-panel textarea {
  padding: 10px;
}

.stack-form input::placeholder,
.stack-form textarea::placeholder,
.v5-field-control::placeholder {
  color: #98a2b3;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.battle-config-field input:focus,
.battle-config-field select:focus,
.battle-config-note textarea:focus,
.config-panel input:focus,
.config-panel select:focus,
.config-panel textarea:focus,
.v5-field-control:focus {
  border-color: var(--v5-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v5-focus) 16%, transparent);
  outline: none;
}

/* Form choice rows: keep checkbox/radio labels readable instead of collapsing Chinese text vertically. */
.content input[type="checkbox"],
.content input[type="radio"] {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  flex: 0 0 20px;
  accent-color: var(--v5-color-brand);
}

.stack-form label:has(> input[type="checkbox"]),
.stack-form label:has(> input[type="radio"]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #e6eaf0;
  border-radius: var(--v5-radius-md);
  background: #fbfcfd;
  color: var(--v5-ink);
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
  white-space: normal;
  word-break: keep-all;
  cursor: pointer;
}

.stack-form label:has(> input[type="checkbox"]):hover,
.stack-form label:has(> input[type="radio"]):hover {
  border-color: #ffd3b3;
  background: #fff9f5;
}

.stack-form label:has(> input[type="checkbox"]):focus-within,
.stack-form label:has(> input[type="radio"]):focus-within {
  border-color: var(--v5-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v5-focus) 14%, transparent);
}

table,
.v5-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.v5-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e6eaf0;
  border-radius: var(--v5-radius-lg);
  background: #fff;
  box-shadow: var(--v5-shadow-sm);
}

.v5-table-wrap > table {
  min-width: 720px;
  border: 0;
}

.v5-data-table th,
.v5-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: top;
}

.v5-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #667085;
  font-size: var(--v5-text-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.v5-data-table tbody tr {
  transition-property: background-color;
  transition-duration: var(--v5-motion-fast);
  transition-timing-function: ease-out;
}

.v5-data-table tbody tr:hover {
  background: #fff8f3;
}

.v5-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.v5-sort-button {
  min-height: 32px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.v5-sort-button:hover {
  color: var(--v5-color-brand);
}

.v5-sort-indicator {
  color: #98a2b3;
  font-size: 10px;
  line-height: 1;
}

th[aria-sort="ascending"] .v5-sort-indicator,
th[aria-sort="descending"] .v5-sort-indicator {
  color: var(--v5-color-brand);
}

.v5-status-surface,
.merchant-audit-feedback,
.merchant-action-anchor,
.journey-state {
  min-height: auto;
  padding: 14px 16px;
  border: 1px solid #e6eaf0;
  border-radius: var(--v5-radius-lg);
  background: #f8fafc;
  color: #475467;
  font-size: var(--v5-text-md);
  line-height: var(--v5-leading);
}

.v5-status-surface.warn,
.journey-state.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.v5-status-surface.risk,
.journey-state.risk,
.journey-state.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.v5-status-surface.good,
.journey-state.good,
.journey-state.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.stat-card strong,
.countdown b,
.team-score strong,
.ops-metrics b,
.score-block strong,
.v5-data-table td,
[id*="score"],
[id*="count"],
[id*="rank"] {
  font-variant-numeric: tabular-nums;
}

/* Daily training readability: classroom screens need readable body text, not decorative microcopy. */
.v5-context-kicker,
.v5-context-summary strong,
.v5-context-summary > span:not(.v5-context-kicker),
.v5-context-actions a,
.v5-context-actions button,
.v5-context-recovery,
.v5-context-recovery strong,
.v5-context-switcher select,
.v5-recent-contexts summary,
.v9-context-select,
.v9-context-select span,
.v9-context-empty,
.v9-paste-id-recovery summary {
  font-size: max(13px, 0.82rem);
  line-height: 1.45;
}

.v5-context-actions a,
.v5-context-actions button,
.v5-context-switcher select,
.v5-recent-contexts summary,
.v9-paste-id-recovery summary {
  min-height: 38px;
  padding: 8px 11px;
}

.v9-context-select {
  color: #344054;
  font-weight: 700;
}

.v9-context-select-bar,
.v9-inline-select-wrap {
  gap: 12px;
  align-items: center;
}

.v9-context-select-input {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d0d5dd;
  border-radius: var(--v5-radius-md);
  background: #fff;
  color: var(--v5-ink);
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.v9-context-select-input:focus {
  border-color: var(--v5-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--v5-focus) 14%, transparent);
  outline: none;
}

/* Global shell readability: left navigation is shared by students, teachers, and admins. */
.sidebar {
  width: 260px;
}

.app-shell {
  grid-template-columns: 260px 1fr;
}

.brand b {
  font-size: max(18px, 1.12rem);
  line-height: 1.25;
}

.brand small {
  font-size: max(12px, 0.78rem);
  line-height: 1.35;
}

.brand-mark {
  width: 44px;
  height: 44px;
  font-size: max(16px, 1rem);
}

.nav-terminal-badge {
  min-height: 38px;
  padding: 9px 12px;
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.nav-label {
  margin: 18px 10px 8px;
  color: #98a2b3;
  font-size: max(13px, 0.82rem);
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.sidebar nav a,
.nav-cluster summary {
  min-height: 44px;
  gap: 12px;
  padding: 12px 12px;
  font-size: max(15px, 0.95rem);
  line-height: 1.35;
}

.sidebar nav a i,
.nav-cluster summary i {
  width: 22px;
  font-size: max(17px, 1.05rem);
}

.sidebar nav .nav-cluster a {
  min-height: 40px;
  margin-left: 24px;
  padding: 9px 10px;
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.sidebar nav em,
.nav-inbox-badge {
  min-width: 22px;
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  font-size: max(11px, 0.72rem);
  line-height: 1;
}

/* Sidebar count badges: stay in flex row so trailing numbers share one right column */
.sidebar nav a .nav-inbox-badge {
  position: static;
  top: auto;
  right: auto;
  margin-left: auto;
  flex-shrink: 0;
  color: #fff;
  background: var(--orange);
  font-weight: 700;
}

.sidebar nav a .nav-inbox-badge.evaluate-badge {
  background: var(--green);
}

.top-actions .icon-btn .nav-inbox-badge,
.top-actions .nav-inbox-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  margin-left: 0;
}

.sidebar-foot {
  font-size: max(13px, 0.82rem);
  line-height: 1.45;
}

.sidebar-foot small {
  font-size: max(12px, 0.78rem);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .sidebar {
    width: 84px;
  }

  .app-shell {
    grid-template-columns: 84px 1fr;
  }

  .sidebar nav a,
  .nav-cluster summary {
    justify-content: center;
  }

  .sidebar nav a i,
  .nav-cluster summary i {
    font-size: max(18px, 1.12rem);
  }
}

/* Teacher orchestration readability: replace the legacy 7-10px mission UI with classroom-safe typography. */
.teacher-orchestration-page {
  display: grid;
  gap: 14px;
}

.teacher-orchestration-page .mission-hero {
  align-items: flex-start;
  gap: 24px;
  padding: 30px 32px;
  border-radius: var(--v5-radius-lg);
}

.teacher-orchestration-page .mission-hero .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.05em;
}

.teacher-orchestration-page .mission-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 2vw, 36px);
  line-height: 1.2;
  text-wrap: balance;
}

.teacher-orchestration-page .mission-hero p {
  max-width: 78ch;
  color: #d6dee7;
  font-size: max(15px, 0.95rem);
  line-height: 1.7;
  text-wrap: pretty;
}

.teacher-orchestration-page .mission-hero-actions {
  gap: 10px;
}

.teacher-orchestration-page .mission-hero-actions .primary-btn,
.teacher-orchestration-page .mission-hero-actions .secondary-btn,
.teacher-orchestration-page .mission-result-link {
  min-height: 44px;
  padding: 10px 16px;
  font-size: max(15px, 0.95rem);
  line-height: 1.35;
}

.teacher-orchestration-page .mission-status {
  min-height: auto;
  padding: 14px 16px;
  border-left-width: 4px;
  border-radius: var(--v5-radius-md);
  color: #344054;
  font-size: max(15px, 0.95rem);
  line-height: 1.6;
}

.teacher-orchestration-page .mission-layout {
  grid-template-columns: minmax(720px, 1fr) minmax(360px, 0.36fr);
  gap: 18px;
  align-items: start;
}

.teacher-orchestration-page .mission-main,
.teacher-orchestration-page .mission-check-panel {
  border-color: #e6eaf0;
  border-radius: var(--v5-radius-lg);
  box-shadow: var(--v5-shadow-sm);
}

.teacher-orchestration-page .mission-main {
  padding: 24px;
}

.teacher-orchestration-page .mission-side {
  gap: 14px;
}

.teacher-orchestration-page .mission-check-panel {
  padding: 20px;
}

.teacher-orchestration-page .mission-section-head {
  gap: 14px;
  margin-bottom: 18px;
}

.teacher-orchestration-page .mission-section-head > div {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 10px;
}

.teacher-orchestration-page .mission-section-head span {
  color: var(--v5-color-brand);
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.teacher-orchestration-page .mission-section-head h2 {
  font-size: max(22px, 1.4rem);
  line-height: 1.3;
  text-wrap: balance;
}

.teacher-orchestration-page .mission-section-head p {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.teacher-orchestration-page .mission-section-head.compact {
  margin: 26px 0 14px;
}

.teacher-orchestration-page .mission-check-panel .mission-section-head.compact {
  margin: 0 0 14px;
}

.teacher-orchestration-page .mission-badge {
  min-height: 32px;
  padding: 7px 10px;
  font-size: max(14px, 0.9rem);
  line-height: 1.2;
}

.teacher-orchestration-page .mission-form-grid {
  gap: 14px;
}

.teacher-orchestration-page .mission-form-grid label {
  gap: 8px;
  color: #344054;
  font-size: max(14px, 0.9rem);
  font-weight: 700;
  line-height: 1.45;
}

.teacher-orchestration-page .mission-form-grid input,
.teacher-orchestration-page .mission-form-grid select,
.teacher-orchestration-page .mission-form-grid textarea {
  min-height: 46px;
  padding: 11px 12px;
  border-color: #d0d5dd;
  border-radius: var(--v5-radius-md);
  background: #fff;
  color: var(--v5-ink);
  font-size: max(15px, 0.95rem);
  line-height: 1.45;
}

.teacher-orchestration-page .mission-form-grid textarea {
  min-height: 96px;
}

.teacher-orchestration-page .mission-form-grid input::placeholder,
.teacher-orchestration-page .mission-form-grid textarea::placeholder {
  color: #98a2b3;
}

.teacher-orchestration-page .mission-form-grid .v9-inline-select-wrap {
  width: 100%;
  display: grid;
  gap: 6px;
}

.teacher-orchestration-page .mission-form-grid .v9-context-select {
  display: grid;
  gap: 4px;
  align-items: stretch;
  width: 100%;
}

.teacher-orchestration-page .mission-form-grid .v9-context-select-input {
  width: 100%;
  min-height: 46px;
  font-size: max(15px, 0.95rem);
}

.teacher-orchestration-page .mission-flow {
  gap: 10px;
}

.teacher-orchestration-page .mission-flow article {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-color: #e6eaf0;
  border-radius: var(--v5-radius-md);
}

.teacher-orchestration-page .mission-flow i {
  width: 34px;
  height: 34px;
  font-size: max(14px, 0.9rem);
}

.teacher-orchestration-page .mission-flow small {
  color: var(--v5-color-brand);
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.teacher-orchestration-page .mission-flow b {
  margin: 5px 0 6px;
  color: var(--v5-ink);
  font-size: max(16px, 1rem);
  line-height: 1.35;
}

.teacher-orchestration-page .mission-flow p {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.6;
}

.teacher-orchestration-page .mission-flow em {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.2;
  white-space: nowrap;
}

.teacher-orchestration-page .readiness-list {
  gap: 10px;
}

.teacher-orchestration-page .readiness-list article {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-color: #e6eaf0;
  border-radius: var(--v5-radius-md);
}

.teacher-orchestration-page .readiness-list i {
  width: 28px;
  height: 28px;
  font-size: max(14px, 0.9rem);
}

.teacher-orchestration-page .readiness-list b,
.teacher-orchestration-page .mission-event-list b {
  color: var(--v5-ink);
  font-size: max(15px, 0.95rem);
  line-height: 1.35;
}

.teacher-orchestration-page .readiness-list small,
.teacher-orchestration-page .mission-event-list small,
.teacher-orchestration-page .empty-note {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.6;
}

.teacher-orchestration-page .mission-event-list {
  gap: 10px;
}

.teacher-orchestration-page .mission-event-list article {
  grid-template-columns: 64px minmax(0, 1fr) 52px;
  gap: 10px;
  padding: 12px;
  border-left-width: 4px;
  border-radius: var(--v5-radius-md);
}

.teacher-orchestration-page .mission-event-list span,
.teacher-orchestration-page .mission-event-list em {
  color: #9a5b00;
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.teacher-orchestration-page .mission-event-list .emergency span,
.teacher-orchestration-page .mission-event-list .emergency em {
  color: #b42318;
}

.teacher-orchestration-page .mission-ai-policy p {
  margin: 0 0 10px;
  padding-bottom: 10px;
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.teacher-orchestration-page .mission-ai-policy p:last-child {
  margin-bottom: 0;
}

.teacher-orchestration-page .mission-ai-policy b {
  color: var(--v5-ink);
  font-size: max(15px, 0.95rem);
}

@media (max-width: 1200px) {
  .teacher-orchestration-page .mission-layout {
    grid-template-columns: 1fr;
  }

  .teacher-orchestration-page .mission-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .teacher-orchestration-page .mission-hero {
    flex-direction: column;
  }

  .teacher-orchestration-page .mission-layout,
  .teacher-orchestration-page .mission-form-grid,
  .teacher-orchestration-page .mission-side {
    grid-template-columns: 1fr;
  }

  .teacher-orchestration-page .mission-flow article,
  .teacher-orchestration-page .mission-event-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .teacher-orchestration-page .mission-flow em,
  .teacher-orchestration-page .mission-event-list em {
    grid-column: 2;
    justify-self: start;
  }
}

.daily-training-page .page-title {
  align-items: center;
}

.daily-training-page .page-title h1 {
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.2;
}

.daily-training-page .page-title p {
  max-width: 78ch;
  color: #667085;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.daily-training-page .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.04em;
}

.daily-training-page .streak {
  min-width: 126px;
  padding: 12px 14px;
  font-size: max(14px, 0.9rem);
}

.daily-training-page .streak b,
.daily-training-page .streak span {
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
}

.daily-training-page .training-lanes {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.daily-training-page .lane {
  padding: 16px;
  border-radius: var(--v5-radius-lg);
}

.daily-training-page .lane span {
  font-size: max(13px, 0.82rem);
  line-height: 1.45;
}

.daily-training-page .lane b {
  margin: 8px 0 6px;
  font-size: max(18px, 1.15rem);
  line-height: 1.25;
}

.daily-training-page .lane small {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.daily-training-page .v2-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 18px;
}

.daily-training-page .panel {
  border-radius: var(--v5-radius-lg);
}

.daily-training-page .panel-head h2,
.daily-training-page aside.panel h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.daily-training-page .panel-head .text-btn {
  font-size: max(14px, 0.9rem);
}

.daily-training-page .drill-list {
  gap: 12px;
}

.daily-training-page .drill-card {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border-radius: var(--v5-radius-lg);
}

.daily-training-page .drill-icon {
  width: 42px;
  height: 42px;
  font-size: max(15px, 0.95rem);
}

.daily-training-page .drill-card h3 {
  margin: 8px 0 7px;
  font-size: max(18px, 1.12rem);
  line-height: 1.35;
}

.daily-training-page .drill-card p {
  margin: 0 0 9px;
  color: #475467;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.daily-training-page .drill-card small {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.daily-training-page .agent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.daily-training-page .agent-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: max(13px, 0.82rem);
  line-height: 1.3;
}

.daily-training-page .drill-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.daily-training-page .drill-actions .primary-btn,
.daily-training-page .drill-actions .secondary-btn {
  min-width: 108px;
  min-height: 46px;
  font-size: max(15px, 0.95rem);
}

.daily-training-page .coach-note {
  padding: 16px;
  border-radius: var(--v5-radius-lg);
}

.daily-training-page .coach-note b {
  display: block;
  margin-bottom: 8px;
  font-size: max(16px, 1rem);
  line-height: 1.4;
}

.daily-training-page .coach-note p,
.daily-training-page .coach-note small,
.daily-training-page #history-panel p,
.daily-training-page #training-compare-panel p,
.daily-training-page #training-compare-panel small {
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.daily-training-page .training-compare-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #e6eaf0;
  border-radius: var(--v5-radius-lg);
  background: #f8fafc;
}

/* Training hall readability: simulation status, stage labels, and module cards must be clear at classroom distance. */
.training-hall-page .page-title h1 {
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.2;
}

.training-hall-page .page-title p,
.training-hall-page .rule-disclaimer,
.training-hall-page .hall-free-group-copy,
.training-hall-page .battle-teacher-note,
.training-hall-page .battle-launched-hint {
  color: #475467;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.training-hall-page .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.04em;
}

.training-hall-page .countdown small,
.training-hall-page .live,
.training-hall-page .hall-policy span,
.training-hall-page .battle-ready-badge,
.training-hall-page .status-good {
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

.training-hall-page .countdown b {
  font-size: max(24px, 1.5rem);
}

.training-hall-page .simulation-banner {
  align-items: stretch;
  gap: 24px;
  padding: 26px 28px;
  border-radius: var(--v5-radius-lg);
}

.training-hall-page .simulation-banner h2 {
  font-size: max(24px, 1.55rem);
  line-height: 1.25;
}

.training-hall-page .simulation-banner p,
.training-hall-page .blocking-panel,
.training-hall-page .blocking-panel li,
.training-hall-page .cta-link,
.training-hall-page .crosslink-actions small {
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.training-hall-page .team-score {
  min-width: 220px;
}

.training-hall-page .team-score span,
.training-hall-page .team-score small {
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
}

.training-hall-page .team-score strong {
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.05;
}

.training-hall-page .stage-track.detailed {
  gap: 10px;
  margin: 28px 0 22px;
}

.training-hall-page .stage {
  padding: 18px 10px 14px;
  min-height: 92px;
}

.training-hall-page .stage span {
  width: 30px;
  height: 30px;
  font-size: max(13px, 0.82rem);
}

.training-hall-page .stage b {
  font-size: max(15px, 0.95rem);
  line-height: 1.35;
}

.training-hall-page .stage small {
  color: #667085;
  font-size: max(13px, 0.82rem);
  line-height: 1.45;
}

.training-hall-page .workspace-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.46fr);
  gap: 18px;
}

.training-hall-page .panel-head h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.training-hall-page .ops-metrics {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.training-hall-page .ops-metrics div {
  padding: 16px;
}

.training-hall-page .ops-metrics span,
.training-hall-page .ops-metrics small,
.training-hall-page .module-link small,
.training-hall-page .rule-item small,
.training-hall-page .battle-item-main small,
.training-hall-page .hall-free-group-head small,
.training-hall-page .hall-free-group-foot {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.training-hall-page .ops-metrics b {
  font-size: max(21px, 1.35rem);
  line-height: 1.25;
}

.training-hall-page .module-grid {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.training-hall-page .module-link {
  min-height: 116px;
  padding: 16px;
  border-radius: var(--v5-radius-lg);
}

.training-hall-page .module-link i {
  font-size: max(18px, 1.15rem);
}

.training-hall-page .module-link b,
.training-hall-page .rule-item b,
.training-hall-page .battle-item-main b {
  font-size: max(16px, 1rem);
  line-height: 1.35;
}

.training-hall-page .rule-item p {
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.training-hall-page .hall-battle-checklist,
.training-hall-page .hall-free-group {
  padding: 18px 20px;
}

.training-hall-page .hall-battle-head h2,
.training-hall-page .hall-free-group-head h2 {
  font-size: max(21px, 1.35rem);
}

.training-hall-page .battle-score-chip,
.training-hall-page .battle-item-action,
.training-hall-page .battle-item-status {
  font-size: max(14px, 0.9rem);
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .training-hall-page .workspace-grid {
    grid-template-columns: 1fr;
  }

  .training-hall-page .simulation-banner {
    flex-direction: column;
  }

  .training-hall-page .team-score {
    min-width: 0;
    text-align: left;
    border-left: 0;
    padding-left: 0;
  }
}

/* Learning surfaces readability: knowledge and agent pages must be legible in classroom use. */
.agent-center-page .eyebrow,
.knowledge-page .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.04em;
}

.agent-center-page .agent-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 28px;
  padding: 30px 32px;
  border-radius: var(--v5-radius-lg);
}

.agent-center-page .agent-command-hero h1,
.knowledge-page .page-title h1 {
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.2;
}

.agent-center-page .agent-command-hero p,
.knowledge-page .page-title p {
  max-width: 78ch;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.agent-center-page .agent-command-hero aside {
  padding: 18px;
}

.agent-center-page .agent-command-hero aside .live,
.agent-center-page .agent-command-hero aside small {
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
}

.agent-center-page .agent-command-kpis {
  gap: 12px;
}

.agent-center-page .agent-command-kpis article {
  padding: 16px;
  border-radius: var(--v5-radius-lg);
}

.agent-center-page .agent-command-kpis span,
.agent-center-page .agent-command-kpis small {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.5;
}

.agent-center-page .agent-command-kpis strong {
  font-size: max(26px, 1.65rem);
  line-height: 1.15;
}

.agent-center-page .panel-head h2,
.knowledge-page .panel-head h2,
.knowledge-page .citation-panel h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.agent-center-page .panel-head .text-btn,
.knowledge-page .panel-head .text-btn,
.knowledge-page .resource-card .text-btn {
  font-size: max(14px, 0.9rem);
}

.agent-center-page .agent-roster {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.agent-center-page .agent-command-card {
  padding: 18px;
  border-radius: var(--v5-radius-lg);
}

.agent-center-page .agent-card-head > span {
  width: 42px;
  height: 42px;
  font-size: max(15px, 0.95rem);
}

.agent-center-page .agent-card-head em {
  padding: 5px 8px;
  font-size: max(13px, 0.82rem);
  line-height: 1.25;
}

.agent-center-page .agent-command-card h3 {
  margin: 12px 0 8px;
  font-size: max(18px, 1.12rem);
  line-height: 1.35;
}

.agent-center-page .agent-command-card p {
  min-height: 48px;
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.agent-center-page .agent-card-metrics {
  gap: 8px;
  padding-top: 10px;
  margin-top: 10px;
}

.agent-center-page .agent-card-metrics span,
.agent-center-page .agent-command-card small,
.agent-center-page .agent-command-card a {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.agent-center-page .agent-card-metrics span {
  padding: 5px 8px;
}

.agent-center-page .agent-command-card a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: var(--v5-color-brand);
  font-weight: 700;
}

.agent-center-page .agent-command-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 18px;
}

.agent-center-page .agent-collaboration {
  gap: 10px;
}

.agent-center-page .agent-collaboration article {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 10px;
  padding: 12px;
  border-radius: var(--v5-radius-md);
}

.agent-center-page .agent-collaboration article > span {
  width: 34px;
  height: 34px;
  font-size: max(14px, 0.9rem);
}

.agent-center-page .agent-collaboration b,
.agent-center-page .agent-collaboration small,
.agent-center-page .agent-collaboration p,
.agent-center-page .agent-decision-panel p,
.agent-center-page .agent-boundary p {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.agent-center-page .agent-collaboration b {
  font-size: max(15px, 0.95rem);
}

.agent-center-page .agent-kpi-chip {
  min-width: 112px;
  padding: 10px 12px;
}

.agent-center-page .agent-kpi-chip small {
  font-size: max(13px, 0.82rem);
}

.agent-center-page .agent-kpi-chip b {
  font-size: max(16px, 1rem);
}

.agent-center-page .agent-boundary h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.knowledge-page .page-title {
  align-items: center;
}

.knowledge-page .page-title p {
  color: #667085;
}

/* Teacher agent director: v2.css uses 7–9px microcopy; classroom screens need readable layout. */
.teacher-agent-director-page .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.04em;
}

.teacher-agent-director-page .agent-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 28px;
  padding: 30px 32px;
  border-radius: var(--v5-radius-lg);
}

.teacher-agent-director-page .agent-command-hero h1 {
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.2;
}

.teacher-agent-director-page .agent-command-hero p {
  max-width: 78ch;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.teacher-agent-director-page .agent-command-hero aside {
  padding: 18px;
}

.teacher-agent-director-page .agent-command-hero aside span,
.teacher-agent-director-page .agent-command-hero aside small {
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
}

.teacher-agent-director-page .agent-command-hero aside strong {
  font-size: max(32px, 2rem);
}

.teacher-agent-director-page .director-run-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.teacher-agent-director-page .director-run-bar > div {
  flex: 0 0 auto;
}

.teacher-agent-director-page .director-run-bar h2 {
  font-size: max(18px, 1.12rem);
  line-height: 1.35;
}

.teacher-agent-director-page .director-run-bar input {
  flex: 1 1 16rem;
  min-height: 44px;
  padding: 10px 12px;
  font-size: max(14px, 0.9rem);
}

.teacher-agent-director-page .agent-command-kpis {
  gap: 12px;
  margin-bottom: 16px;
}

.teacher-agent-director-page .agent-command-kpis article {
  padding: 16px;
  border-radius: var(--v5-radius-lg);
}

.teacher-agent-director-page .agent-command-kpis span,
.teacher-agent-director-page .agent-command-kpis small {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.5;
}

.teacher-agent-director-page .agent-command-kpis strong {
  font-size: max(26px, 1.65rem);
  line-height: 1.15;
}

.teacher-agent-director-page .panel-head h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.teacher-agent-director-page .panel-head .status-good {
  font-size: max(13px, 0.82rem);
  padding: 6px 10px;
  white-space: nowrap;
}

.teacher-agent-director-page .director-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 18px;
  margin-bottom: 16px;
}

.teacher-agent-director-page .director-presets {
  gap: 12px;
}

.teacher-agent-director-page .director-presets article {
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--v5-radius-md);
}

.teacher-agent-director-page .director-presets span {
  font-size: max(13px, 0.82rem);
  margin-bottom: 4px;
}

.teacher-agent-director-page .director-presets b {
  font-size: max(16px, 1rem);
  line-height: 1.4;
  margin: 0 0 6px;
}

.teacher-agent-director-page .director-presets p {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
  color: #475467;
  margin: 0 0 8px;
}

.teacher-agent-director-page .director-presets small {
  font-size: max(13px, 0.82rem);
  line-height: 1.5;
  color: #667085;
}

.teacher-agent-director-page .director-presets button {
  min-height: 40px;
  padding: 10px 16px;
  font-size: max(14px, 0.9rem);
  border-radius: var(--v5-radius-md);
}

.teacher-agent-director-page .director-gates {
  gap: 10px;
}

.teacher-agent-director-page .director-gates article {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--v5-radius-md);
}

.teacher-agent-director-page .director-gates article > span {
  width: 28px;
  height: 28px;
  font-size: max(14px, 0.9rem);
}

.teacher-agent-director-page .director-gates b {
  font-size: max(15px, 0.95rem);
  line-height: 1.4;
}

.teacher-agent-director-page .director-gates small {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
  color: #667085;
  margin-top: 4px;
}

.teacher-agent-director-page .agent-collaboration {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.teacher-agent-director-page .agent-collaboration article {
  display: block;
  padding: 14px 16px;
  border-radius: var(--v5-radius-md);
}

.teacher-agent-director-page .agent-collaboration article > div + div {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.teacher-agent-director-page .agent-collaboration b,
.teacher-agent-director-page .agent-collaboration small,
.teacher-agent-director-page .agent-collaboration p,
.teacher-agent-director-page .agent-collaboration .muted {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.teacher-agent-director-page .agent-collaboration b {
  font-size: max(15px, 0.95rem);
}

.teacher-agent-director-page .agent-roster {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.teacher-agent-director-page .agent-command-card {
  padding: 18px;
  border-radius: var(--v5-radius-lg);
}

.teacher-agent-director-page .agent-card-head > span {
  width: 42px;
  height: 42px;
  font-size: max(15px, 0.95rem);
}

.teacher-agent-director-page .agent-card-head em {
  padding: 5px 8px;
  font-size: max(13px, 0.82rem);
  line-height: 1.25;
}

.teacher-agent-director-page .agent-command-card h3 {
  margin: 12px 0 8px;
  font-size: max(18px, 1.12rem);
  line-height: 1.35;
}

.teacher-agent-director-page .agent-command-card p {
  min-height: 48px;
  color: #475467;
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.teacher-agent-director-page .agent-card-metrics {
  gap: 8px;
  padding-top: 10px;
  margin-top: 10px;
}

.teacher-agent-director-page .agent-card-metrics span,
.teacher-agent-director-page .agent-command-card small {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.teacher-agent-director-page .agent-card-metrics span {
  padding: 5px 8px;
}

.teacher-agent-director-page .stack-form label,
.teacher-agent-director-page .stack-form input,
.teacher-agent-director-page .stack-form select {
  font-size: max(14px, 0.9rem);
}

.teacher-agent-director-page .code-block {
  font-size: max(13px, 0.82rem);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .teacher-agent-director-page .director-layout {
    grid-template-columns: 1fr;
  }

  .teacher-agent-director-page .agent-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 750px) {
  .teacher-agent-director-page .agent-command-hero {
    grid-template-columns: 1fr;
  }

  .teacher-agent-director-page .agent-command-hero aside {
    display: none;
  }

  .teacher-agent-director-page .agent-command-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-agent-director-page .agent-roster {
    grid-template-columns: 1fr;
  }
}

/* Report page: app.css uses 7–12px microcopy; classroom screens need readable growth evidence. */
.report-page .eyebrow {
  font-size: max(13px, 0.82rem);
  letter-spacing: 0.04em;
}

.report-page .page-title h1 {
  font-size: clamp(28px, 2.1vw, 36px);
  line-height: 1.2;
}

.report-page .page-title p {
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
  color: #667085;
}

.report-page .panel-head h2 {
  font-size: max(21px, 1.35rem);
  line-height: 1.3;
}

.report-page .panel-head small,
.report-page .panel-head .muted {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.report-page .chain-crosslink-banner,
.report-page .chain-crosslink-banner p,
.report-page .chain-crosslink-banner b {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.report-page .report-tab-bar .text-btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: max(14px, 0.9rem);
  font-weight: 600;
}

.report-page .v5-growth-first-screen {
  gap: 14px;
  margin-bottom: 18px;
}

.report-page .v5-growth-card {
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--v5-radius-lg);
}

.report-page .v5-growth-card .eyebrow {
  font-size: max(13px, 0.82rem);
}

.report-page .v5-growth-card ul {
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.report-page .v5-growth-card ul li.v5-growth-empty,
.report-page .v5-growth-card ul li.muted {
  font-size: max(14px, 0.9rem);
}

.report-page .v5-growth-remedial #v5-growth-next-remedial,
.report-page .v5-growth-remedial #v5-growth-next-remedial p,
.report-page .v5-growth-remedial #v5-growth-next-remedial > p.muted {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.report-page .v5-growth-remedial #v5-growth-next-remedial b {
  font-size: max(16px, 1rem);
}

.report-page .v5-growth-narratives {
  gap: 12px;
}

.report-page .v5-growth-period-card {
  padding: 14px 16px;
  border-radius: var(--v5-radius-md);
}

.report-page .v5-growth-period-card header b {
  font-size: max(16px, 1rem);
}

.report-page .v5-growth-period-card header span,
.report-page .v5-growth-period-card small,
.report-page .v5-growth-period-card p {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.report-page .report-hero {
  border-radius: var(--v5-radius-lg);
  margin-bottom: 18px;
}

.report-page .report-hero > div {
  padding: 28px 32px;
}

.report-page .score-block > span {
  font-size: max(14px, 0.9rem);
  letter-spacing: 0.02em;
}

.report-page .score-block strong {
  font-size: clamp(52px, 5vw, 64px);
}

.report-page .score-block small,
.report-page .score-block .grade {
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.report-page .grade {
  font-size: max(16px, 1rem);
}

.report-page .radar-wrap {
  display: grid;
  place-items: center;
  width: 100%;
}

.report-page .radar-wrap svg {
  width: min(100%, 300px);
  height: auto;
  overflow: visible;
}

.report-page .radar-grid-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.report-page .radar-axis {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.report-page .radar-data {
  fill: url(#report-radar-fill);
  stroke: #ff9e42;
  stroke-width: 1.5;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 138, 56, 0.22));
}

.report-page .radar-vertex {
  fill: #fff;
  stroke: #ff9e42;
  stroke-width: 1.25;
  opacity: 0.92;
}

.report-page .radar-vertex.is-active {
  fill: #ff9e42;
  stroke: #fff;
  stroke-width: 1.5;
  r: 4;
}

.report-page .radar-label {
  cursor: pointer;
  user-select: none;
}

.report-page .radar-label-name {
  font-size: 10px;
  fill: #94a3b8;
  font-weight: 500;
}

.report-page .radar-label-score {
  font-size: 11px;
  fill: #ff9e42;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.report-page .radar-label:hover .radar-label-name,
.report-page .radar-label.is-active .radar-label-name {
  fill: #e2e8f0;
}

.report-page .radar-label:hover .radar-label-score,
.report-page .radar-label.is-active .radar-label-score {
  fill: #ffb366;
}

.report-page .ai-summary .ai-label {
  font-size: max(13px, 0.82rem);
  padding: 6px 10px;
}

.report-page .ai-summary h2 {
  font-size: max(22px, 1.4rem);
  line-height: 1.45;
  margin: 12px 0;
}

.report-page .ai-summary p {
  font-size: max(15px, 0.95rem);
  line-height: 1.7;
  color: #cbd5e1;
}

.report-page .report-grid {
  gap: 18px;
  margin-bottom: 18px;
}

.report-page .ability-list {
  gap: 12px;
}

.report-page .ability-list > div {
  gap: 0.85rem 1.1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--v5-radius-md);
}

.report-page .ability-list > div span {
  font-size: max(14px, 0.9rem);
  font-weight: 700;
}

.report-page .ability-list > div b {
  font-size: max(16px, 1rem);
}

.report-page .ability-list > div small {
  font-size: max(13px, 0.82rem);
}

.report-page .ability-list > article.growth-card,
.report-page #evidence-timeline-list .growth-card,
.report-page #ai-decision-list .growth-card {
  padding: 14px 16px;
  border-radius: var(--v5-radius-md);
}

.report-page .growth-card span {
  font-size: max(13px, 0.82rem);
}

.report-page .growth-card b {
  font-size: max(16px, 1rem);
  margin: 8px 0;
}

.report-page .growth-card p,
.report-page .growth-card small {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.report-page .level-tag {
  font-size: max(13px, 0.82rem);
  padding: 5px 10px;
}

.report-page table th {
  font-size: max(14px, 0.9rem);
  padding: 12px 14px;
}

.report-page table td {
  font-size: max(15px, 0.95rem);
  padding: 12px 14px;
  line-height: 1.55;
}

.report-page .task:not(:has(.task-check)) {
  padding: 1rem 1.1rem;
}

.report-page .task:not(:has(.task-check)) b {
  font-size: max(15px, 0.95rem);
}

.report-page .task:not(:has(.task-check)) small,
.report-page .task:not(:has(.task-check)) p {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.report-page #competency-drill-body,
.report-page #competency-drill-body p,
.report-page #competency-drill-body li,
.report-page #live-report-summary,
.report-page #rule-hits-list p,
.report-page .muted {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.report-page #evidence-drawer span,
.report-page #evidence-drawer small,
.report-page #evidence-drawer p {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .report-page .report-hero {
    grid-template-columns: 1fr;
  }

  .report-page .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 750px) {
  .report-page .v5-growth-first-screen {
    grid-template-columns: 1fr;
  }

  .report-page .report-hero > div {
    padding: 20px;
  }

  .report-page .radar-wrap svg {
    width: min(100%, 260px);
  }
}

.knowledge-page .learning-path {
  gap: 8px;
  padding: 18px 22px;
  border-radius: var(--v5-radius-lg);
}

.knowledge-page .path-node {
  gap: 10px;
}

.knowledge-page .path-node > span {
  width: 38px;
  height: 38px;
  font-size: max(14px, 0.9rem);
}

.knowledge-page .path-node b {
  font-size: max(15px, 0.95rem);
  line-height: 1.35;
}

.knowledge-page .path-node small,
.knowledge-page #skill-knowledge-map small,
.knowledge-page #skill-knowledge-map p {
  color: #667085;
  font-size: max(14px, 0.9rem);
  line-height: 1.55;
}

.knowledge-page .filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-page .filter-pills button {
  min-height: 40px;
  padding: 8px 12px;
  font-size: max(14px, 0.9rem);
  line-height: 1.3;
}

.knowledge-page .resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}

.knowledge-page .resource-card {
  padding: 20px;
  border-radius: var(--v5-radius-lg);
}

.knowledge-page .resource-type {
  font-size: max(13px, 0.82rem);
  line-height: 1.45;
}

.knowledge-page .resource-card h3 {
  margin: 12px 0 9px;
  font-size: max(18px, 1.12rem);
  line-height: 1.35;
}

.knowledge-page .resource-card p {
  color: #475467;
  font-size: max(15px, 0.95rem);
  line-height: 1.65;
}

.knowledge-page .resource-card > div,
.knowledge-page .resource-card > div span,
.knowledge-page .resource-card > div b {
  font-size: max(14px, 0.9rem);
  line-height: 1.45;
}

.knowledge-page .knowledge-training-link,
.knowledge-page .resource-card > a.text-btn {
  min-height: 36px;
  margin-top: 8px;
}

.knowledge-page .qa-input input {
  min-height: 44px;
  font-size: max(15px, 0.95rem);
}

.knowledge-page .qa-bubble,
.knowledge-page .qa-answer p,
.knowledge-page .qa-answer small {
  font-size: max(14px, 0.9rem);
  line-height: 1.65;
}

.knowledge-page .qa-answer b {
  font-size: max(15px, 0.95rem);
}

@media (max-width: 1100px) {
  .agent-center-page .agent-command-grid,
  .knowledge-page .v2-grid {
    grid-template-columns: 1fr;
  }

  .agent-center-page .agent-command-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 750px) {
  .agent-center-page .agent-command-kpis,
  .agent-center-page .agent-collaboration,
  .knowledge-page .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .daily-training-page .v2-grid {
    grid-template-columns: 1fr;
  }

  .daily-training-page .drill-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .daily-training-page .drill-actions {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Pilot ops dashboard — flat first screen, grouped drills */
.pilot-ops-page {
  display: grid;
  gap: 1.25rem;
}

.pilot-ops-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px;
  background: var(--v5-surface, #fff);
  border: 1px solid var(--line, #e9edf2);
  border-radius: var(--v5-radius-lg, 12px);
}

.pilot-ops-copy h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: var(--v5-text-xl, max(19px, 1.15rem));
  line-height: 1.3;
}

.pilot-ops-copy p {
  margin: 0;
  max-width: 42rem;
  color: var(--v5-muted, #667483);
}

.pilot-ops-actions,
.pilot-ops-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}

.pilot-ops-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.pilot-ops-stat-drawer,
.pilot-ops-drill-drawer {
  border: 1px solid var(--line, #e9edf2);
  border-radius: var(--v5-radius-md, 10px);
  background: var(--v5-surface, #fff);
  padding: 0;
}

.pilot-ops-stat-drawer summary,
.pilot-ops-drill-drawer summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--v5-ink, #1a2332);
  list-style: none;
}

.pilot-ops-stat-drawer summary::-webkit-details-marker,
.pilot-ops-drill-drawer summary::-webkit-details-marker {
  display: none;
}

.pilot-ops-stat-drawer[open] summary,
.pilot-ops-drill-drawer[open] summary {
  border-bottom: 1px solid var(--line, #e9edf2);
}

.pilot-ops-stat-grid-compact {
  padding: 12px 14px 16px;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 0.65rem;
}

.pilot-ops-stat-grid-compact .stat-card {
  padding: 0.65rem 0.75rem;
}

.pilot-drill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.45rem 0.65rem;
  padding: 12px 14px 16px;
}

.pilot-drill-grid .text-btn {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
  padding: 0.45rem 0.5rem;
}

.pilot-ops-panel-head {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.pilot-ops-release-panel .panel-head {
  align-items: flex-start;
}

@media (max-width: 720px) {
  .pilot-ops-head {
    padding: 16px;
  }

  .pilot-ops-actions {
    width: 100%;
  }
}

/* Teacher pages — light page-title instead of dark .welcome hero */
.teacher-page-head {
  padding: 20px 22px;
  margin-bottom: 1.25rem;
  background: var(--v5-surface, #fff);
  border: 1px solid var(--line, #e9edf2);
  border-radius: var(--v5-radius-lg, 12px);
  align-items: flex-start;
}

.teacher-page-head h1 {
  font-size: var(--v5-text-xl, max(19px, 1.15rem));
  line-height: 1.3;
}

.teacher-page-head p {
  color: var(--v5-muted, #667483);
  font-size: var(--v5-text-sm, max(13px, 0.8125rem));
}

.teacher-page-head .tower-toolbar {
  margin-bottom: 0;
}

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