#teaching-data-host { flex: 1 1 300px; min-width: 0; }
.analysis-upload-row:has(#teaching-data-host) { align-items: flex-start; }
.teaching-data {
  min-width: 0;
  max-width: 760px;
  color: var(--ui-text, #242424);
  font: inherit;
  font-size: 13px;
}
.teaching-data *, .teaching-data *::before, .teaching-data *::after { box-sizing: border-box; }
.teaching-data-toolbar, .teaching-data-actions, .teaching-data-progress, .teaching-data-scenario-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.teaching-data button {
  min-height: 36px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--ui-border, #c8c8c8);
  border-radius: 3px;
  background: var(--ui-surface, #fff);
  color: inherit;
  font: inherit;
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.teaching-data [data-teaching-trigger] { display: inline-flex; align-items: center; gap: 8px; }
.teaching-data svg { width: 16px; height: 16px; flex: 0 0 auto; }
.teaching-data :focus-visible { outline: 2px solid var(--ui-focus, #0072b2); outline-offset: 2px; }
.teaching-data button:hover:not(:disabled) { border-color: var(--ui-text-muted, #666); }
.teaching-data button:disabled { opacity: .6; cursor: not-allowed; }
.teaching-data .teaching-data-primary {
  background: var(--ui-text, #242424);
  color: var(--ui-surface, #fff);
  border-color: var(--ui-text, #242424);
  margin-inline-start: auto;
}
.teaching-data-badge {
  display: inline-block;
  padding: 0 4px;
  border: 1px solid var(--ui-border, #c8c8c8);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
}
.teaching-data-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 60;
  min-width: 0;
  max-width: 100%;
  max-height: min(640px, calc(100vh - 128px));
  max-height: min(640px, calc(100dvh - 128px));
  overflow: hidden;
  overscroll-behavior: contain;
  margin-top: 8px;
  padding: 16px;
  scroll-padding-block: 16px 80px;
  border: 1px solid var(--ui-border, #c8c8c8);
  border-radius: 3px;
  background: var(--ui-surface, #fff);
  overflow-wrap: anywhere;
}
.teaching-data-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.teaching-data-heading, .teaching-data-panel > .teaching-data-actions { flex: 0 0 auto; }
.teaching-data h3, .teaching-data h4, .teaching-data p { margin: 0 0 12px; }
.teaching-data h3, .teaching-data h4 { font-size: 14px; }
.teaching-data-note, .teaching-data-scenario-meta { color: var(--ui-text-soft, #555); }
.teaching-data-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.teaching-data .teaching-data-scenario { display: grid; gap: 8px; width: 100%; padding: 12px; }
.teaching-data-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; }
.teaching-data-facts > div { margin-bottom: 8px; }
.teaching-data-facts dt { font-weight: 600; }
.teaching-data-facts dd { margin: 4px 0 0; }
.teaching-data-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; margin-bottom: 12px; }
.teaching-data table { width: 100%; border-collapse: collapse; font-size: inherit; }
.teaching-data caption { text-align: start; font-weight: 600; padding: 4px 0 8px; }
.teaching-data th, .teaching-data td {
  padding: 8px;
  border-bottom: 1px solid var(--ui-border, #c8c8c8);
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.teaching-data code, .teaching-data small { display: block; font-size: 11px; font-weight: 400; }
.teaching-data-actions {
  position: sticky;
  bottom: -16px;
  z-index: 1;
  margin-top: 12px;
  padding: 12px 0 max(16px, env(safe-area-inset-bottom));
  background: var(--ui-surface, #fff);
}
.teaching-data-request { margin-top: 12px; }
.teaching-data-progress { font-size: 11px; }
.teaching-data-progress button { min-height: 32px; padding: 4px 8px; }
@media (max-width: 480px), (pointer: coarse) {
  .teaching-data button, .teaching-data-progress button { min-height: 44px; }
  .teaching-data-panel { padding: 12px; }
  .teaching-data-actions { bottom: -12px; }
  .teaching-data .teaching-data-primary { margin-inline-start: 0; }
}
@media (max-width: 600px) {
  .teaching-data-scenarios, .teaching-data-facts { grid-template-columns: minmax(0, 1fr); }
}
