/* ==========================================================================
   FHIR R4 Prep — Unified Minimalist Study & Daily Quiz Stylesheet
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--page);
  color: var(--text);
  font-size: 15px;
  line-height: 1.62;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.18s ease, color 0.18s ease;
}

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

/* Focus rings */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Underlined Links & Secondary Text Actions */
a,
.link-btn {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  transition: color 0.15s ease;
}

a:hover,
.link-btn:hover {
  color: var(--primary-hover);
}

.link-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-danger {
  color: var(--incorrect);
}

.link-danger:hover {
  color: var(--incorrect);
  opacity: 0.85;
}

/* Thin Outline SVG Icons */
svg.ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.65;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

svg.ico-sm {
  width: 14px;
  height: 14px;
}

svg.ico-lg {
  width: 18px;
  height: 18px;
}

/* Single Primary CTA Button */
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-btn-text);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  color: var(--primary-btn-text);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Neutral Subtle Utility Button (Top-bar controls, filters only) */
.btn-neutral {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-neutral:hover:not(:disabled) {
  background-color: var(--surface-subtle);
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-neutral:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   Consistent Site-Wide Header (visible on all pages, including quiz focus)
   ========================================================================== */
.site-header {
  height: 58px;
  width: 100%;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 45;
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  min-width: 0;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  font-size: 13.5px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.header-nav-link {
  height: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 2px;
  font-family: inherit;
  font-size: 13.8px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.header-nav-link:hover {
  color: var(--text);
}

.header-nav-link.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* ==========================================================================
   App Shell Layout
   ========================================================================== */
#app-shell {
  display: flex;
  min-height: calc(100vh - 58px);
}

/* Left Navigation Sidebar */
#sidebar {
  width: 268px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  z-index: 40;
  transition: transform 0.22s ease;
}

body.focus-mode #sidebar {
  display: none;
}

.sidebar-mobile-header {
  display: none;
  height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: space-between;
}

.brand-wordmark {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand-wordmark:hover {
  color: var(--text);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 24px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  padding: 16px 10px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-group-label:first-child {
  padding-top: 4px;
}

.nav-group-toggle {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 10px 10px 6px;
  margin-top: 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-group-toggle:hover {
  color: var(--text);
  background-color: var(--surface-subtle);
}

.nav-group-toggle .chevron-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-group-toggle .chevron-ico {
  transition: transform 0.18s ease;
}

.nav-group-toggle[aria-expanded="true"] .chevron-ico {
  transform: rotate(90deg);
}

.nav-item {
  width: 100%;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 0 6px 6px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  margin-bottom: 2px;
}

.nav-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-item-meta {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.nav-item:hover {
  background-color: var(--surface-subtle);
  color: var(--text);
}

.nav-item.active {
  background-color: var(--primary-tint);
  color: var(--text);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* Curriculum Domain Accordion inside Sidebar */
.domain-group {
  margin-top: 4px;
}

.domain-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 7px 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: background-color 0.14s ease;
}

.domain-toggle:hover {
  background-color: var(--surface-subtle);
}

.domain-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.domain-toggle-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.domain-weight {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.domain-group.open .domain-chevron {
  transform: rotate(90deg);
}

.domain-chevron {
  transition: transform 0.16s ease;
  color: var(--text-secondary);
}

.topic-list {
  padding: 2px 0 6px 14px;
}

.topic-link {
  width: 100%;
  background: none;
  border: none;
  border-left: 1.5px solid var(--border-subtle);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: color 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.topic-link:hover {
  color: var(--text);
  background-color: var(--surface-subtle);
}

.topic-link.active {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--primary);
  background-color: var(--primary-tint);
}

.topic-link-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topic-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-right: 4px;
}

/* ==========================================================================
   Main Viewport
   ========================================================================== */
#main-viewport {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 58px);
}

.mobile-menu-btn {
  display: none;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-num-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
}

.page-num-btn:hover {
  border-color: var(--text-secondary);
  background: var(--surface-subtle);
}

.page-num-btn.active {
  background: var(--primary);
  color: var(--primary-btn-text);
  border-color: var(--primary);
  font-weight: 600;
}

/* Coverage Matrix Spec Links */
.spec-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 6px;
  font-size: 13px;
}

.spec-links-row a {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* Content Columns */
.content-wrap {
  flex: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.content-wrap.wide {
  max-width: 860px;
}

/* Focus Mode Quiz Column (Strict 560-640px centered) */
.quiz-focus-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding-top: 8px;
}

/* ==========================================================================
   Typography & Neutral Surfaces
   ========================================================================== */
.eyebrow {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-heading {
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 8px;
}

.page-lead {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin: 32px 0 12px;
}

.surface-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.surface-card.compact {
  padding: 20px 24px;
}

.list-surface {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.list-row {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.list-row:last-child {
  border-bottom: none;
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-title {
  font-size: 14.5px;
  font-weight: 550;
  color: var(--text);
  line-height: 1.4;
}

.row-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.row-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   Monospace FHIR Code & Path Blocks (#F0F3F6 light, #111A24 dark)
   ========================================================================== */
.fhir-code-block {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
  background-color: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 14px 0 20px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

code,
.inline-code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background-color: var(--code-bg);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 4px;
}

.fhir-code-block code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

/* ==========================================================================
   One-Question-Per-Screen Quiz Experience
   ========================================================================== */
.quiz-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.quiz-progress-track {
  width: 100%;
  height: 4px;
  background-color: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.quiz-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.question-stem {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}

.options-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.option-row {
  width: 100%;
  text-align: left;
  background-color: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 14.8px;
  line-height: 1.5;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.option-row:hover:not(:disabled) {
  border-color: var(--text-secondary);
  background-color: var(--surface-subtle);
}

.option-row:disabled {
  cursor: default;
}

.option-row.selected {
  border-color: var(--primary);
  background-color: var(--primary-tint);
}

.option-row.correct {
  border-color: var(--correct-border);
  background-color: var(--correct-tint);
}

.option-row.incorrect {
  border-color: var(--incorrect-border);
  background-color: var(--incorrect-tint);
}

.option-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.option-key {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 18px;
  padding-top: 2px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}

.status-tag.correct {
  color: var(--correct);
}

.status-tag.incorrect {
  color: var(--incorrect);
}

/* Concise Explanation + Read More Disclosure */
.feedback-block {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-bottom: 24px;
}

.feedback-summary {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 10px;
}

.read-more-panel {
  margin-top: 12px;
  padding: 14px 16px;
  background-color: var(--page);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.read-more-panel ul {
  padding-left: 18px;
  margin: 8px 0 12px;
}

.read-more-panel li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.secondary-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  flex-wrap: wrap;
}

.kbd-hint {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-align: center;
}

/* Collapsible Question Map Drawer (for 100-Q Mock Exam) */
.question-map-panel {
  margin-bottom: 20px;
  padding: 16px 18px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.question-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.map-cell {
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.map-cell:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.map-cell.answered {
  background: var(--primary-tint);
  border-color: var(--primary);
  color: var(--text);
  font-weight: 600;
}

.map-cell.saved {
  text-decoration: underline;
  font-weight: 700;
}

.map-cell.current {
  background: var(--primary);
  color: var(--primary-btn-text);
  border-color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   Tabs, Tables, Progress Bars & Flashcards
   ========================================================================== */
.tab-bar {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 2px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.mini-bar {
  width: 110px;
  height: 5px;
  background-color: var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.mini-bar-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 999px;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.clean-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clean-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
  vertical-align: top;
}

.clean-table tr:last-child td {
  border-bottom: none;
}

/* Calm Flashcard */
.flashcard-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 28px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  margin-bottom: 18px;
}

.flashcard-side-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.flashcard-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
  max-width: 520px;
}

/* Inputs & Filters */
.input-field,
.select-field {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
}

.input-field {
  width: 100%;
}

.input-field::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}

/* Conformance Rule Item */
.rule-item {
  padding: 12px 14px;
  background-color: var(--page);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.rule-level {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background-color: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
}

/* ==========================================================================
   Slide-Over Reference Cheatsheet Drawer & Modals
   ========================================================================== */
.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: var(--modal-overlay);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.open,
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.slide-drawer {
  position: fixed;
  top: 0;
  right: -520px;
  width: 480px;
  max-width: 94vw;
  height: 100vh;
  background-color: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-drawer);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-drawer.open {
  right: 0;
}

.drawer-header,
.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-title,
.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 32px;
}

.cs-section {
  margin-bottom: 24px;
}

.cs-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

/* Auth Modal */
.modal-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  width: 100%;
  max-width: 420px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.modal-body {
  padding: 22px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.auth-error {
  display: none;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  background-color: var(--incorrect-tint);
  border: 1px solid var(--incorrect-border);
  color: var(--incorrect);
  font-size: 13.5px;
}

/* Footer (HL7 Trademark Safeguard) */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 18px 24px;
  font-size: 12.5px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: auto;
}

/* Mobile Sidebar Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--modal-overlay);
  z-index: 35;
}

@media (max-width: 880px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .header-nav {
    display: none;
  }

  .site-header {
    padding: 0 14px;
  }

  .site-header-left {
    gap: 10px;
  }

  .site-header-right {
    gap: 12px;
  }

  #header-ref-btn {
    display: none;
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 55;
  }

  #sidebar.open {
    transform: translateX(0);
  }

  .sidebar-mobile-header {
    display: flex;
  }

  .sidebar-backdrop.open {
    display: block;
    z-index: 50;
  }

  .content-wrap {
    padding: 24px 16px 48px;
  }

  .surface-card {
    padding: 22px 18px;
  }

  .kbd-hint {
    display: none;
  }
}
