/* Shared course/lab presentation, inspired by desktop database tools. */
:root {
  --reading-width: 72ch;
  --surface-shadow: 0 2px 8px rgba(23, 53, 74, .05);
  --success-soft: #EAF6EE;
}
.main, .lab-standalone-main { min-width: 0; }
.hero p, .lab-promo p, .concept-box p { line-height: 1.7; }
.hero p, .lab-promo p { max-width: var(--reading-width); }
.hero h1, .lesson-header h1 { text-wrap: balance; }
.section-card, .right-card { box-shadow: var(--surface-shadow); }
.section-head { gap: 16px; flex-wrap: wrap; }
.module-card { min-width: 0; }
.module-card p { line-height: 1.6; }
.module-card:focus-visible, .search-item:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.progress-transfer-card {
  border-inline-start: 4px solid var(--green);
}
.progress-transfer-card > small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.search-shell input { min-width: 0; font: inherit; }
.search-results {
  max-height: min(420px, 65vh);
  overscroll-behavior: contain;
}
.search-item { align-items: flex-start; min-height: 48px; }
.search-item > span { min-width: 0; overflow-wrap: anywhere; }
.search-item em { flex-shrink: 0; }
.search-item:hover, .search-item:focus-visible { background: var(--green-soft); }
.search-item small { line-height: 1.5; }
.result-empty { padding: 18px 12px; color: var(--muted); line-height: 1.6; }
.search-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .hero .actions, .progress-transfer-card .actions { display: grid; grid-template-columns: 1fr; }
  .hero .actions .btn, .progress-transfer-card .btn { width: 100%; min-height: 44px; }
  .search-item { flex-direction: column; gap: 6px; }
  .global-search input::placeholder { color: var(--muted); }
  .section-head .tag { white-space: normal; }
}

/* Theme surfaces: navigation stays dark; learning content stays light. */
.header {
  background: var(--nav-bg);
  color: var(--card);
  backdrop-filter: none;
}
.header:after { background: var(--accent); height: 2px; }
.header .brand b, .header .brand b span, .header .brand small,
.header .lab-header-copy b, .header .lab-header-copy small,
.header .header-nav button { color: var(--card); }
.header .header-nav button:is(:hover, .active) {
  color: var(--nav-bg);
  background: var(--accent-soft);
}
.header .lab-back-link {
  color: var(--card);
  background: transparent;
  border: 1px solid var(--line);
}
.header .lab-back-link:hover { background: var(--accent); }
.header :focus-visible { outline-color: var(--card); }
.header .search-shell { background: var(--card); color: var(--text); }
.header .search-shell:focus-within {
  outline-color: var(--card);
  border-color: var(--accent);
  box-shadow: none;
}
.hero, .hero.database-hero, .assessment-hero, .splash {
  background: linear-gradient(135deg, var(--card), var(--accent-soft));
}
:is(.hero, .hero-visual, .section-card, .right-card, .module-card,
.lesson-header, .lesson-panel, .edu-card, .concept-box, .modal,
.lesson-tabs, .lab-promo, .resource-card, .help-step, .entity-card,
.search-results, .preview, .editor-shell, .modeler-controls) {
  border-radius: var(--radius);
  box-shadow: none;
}
:is(.btn, .lesson-tab, .tab, .quick-link, .module-btn, .lesson-btn, .search-shell) {
  border-radius: 6px;
}
:is(.module-icon, .lesson-status, .complete-badge) { border-radius: 6px; }
.module-card:hover, .btn:hover { transform: none; box-shadow: var(--surface-shadow); }
.lesson-tab.active { box-shadow: none; }
.module-card:hover, .quiz-option:has(input:checked) { border-color: var(--accent); }
:is(.lesson-btn.done .lesson-status, .complete-badge.done, .assessment-score.passed,
.criterion.ok > i, .exam-feedback.ok > span) {
  background: var(--success);
  border-color: var(--success);
  color: var(--card);
}
.review-feedback.ok { color: var(--success); }
.feedback.ok, .auto-tests article.pass, .lab-status.ok {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}
.concept-box.success { border-left-color: var(--success); }
.concept-box.simple { border-left-color: var(--accent); }

/* Optional introductory vocabulary: readable cards instead of a wide table. */
.intro-concepts { margin: 20px 0 28px; }
.intro-concepts > h3 { margin: 0 0 8px; color: var(--nav-bg); }
.intro-concepts > p { max-width: var(--reading-width); color: var(--muted); line-height: 1.7; }
.intro-concepts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.intro-concept-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.intro-concept-card h4 {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-soft);
  color: var(--nav-bg);
  overflow-wrap: anywhere;
}
.intro-concept-card h4 span { color: var(--accent); }
.intro-concept-card dl { margin: 0; }
.intro-concept-card dt { margin: 14px 0 5px; color: var(--nav-bg); font-weight: 750; font-size: .85rem; }
.intro-concept-card dd { margin: 0; color: var(--text); line-height: 1.7; overflow-wrap: anywhere; }
.intro-concept-card pre {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  border-inline-start: 3px solid var(--accent);
  border-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: .85rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 900px) {
  .intro-concepts-grid { grid-template-columns: minmax(0, 1fr); }
}

