:root {
  --bg: #05070d;
  --bg-panel: #0b0f1c;
  --bg-card: #121729;
  --bg-card-soft: #171d33;
  --border: #232a42;
  --text: #f3f4f8;
  --text-muted: #9aa1b8;
  --accent: #f26622;
  --accent-hover: #552810;
  --accent-soft: rgba(242, 102, 34, 0.16);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.14);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.14);
  --bg-translucent: rgba(5, 7, 13, 0.85);
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.28);
  --sidebar-w: 264px;
  --font-sans: 'Inter', sans-serif;
}

/* ---------- Yorug' (light) rejim ---------- */
[data-theme='light'] {
  --bg: #f4f5fa;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-card-soft: #f1f2f8;
  --border: #e3e5f0;
  --text: #171a2e;
  --text-muted: #666c85;
  --accent-soft: rgba(242, 102, 34, 0.1);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.08);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.08);
  --bg-translucent: rgba(255, 255, 255, 0.85);
  --shadow-card: 0 10px 24px rgba(20, 24, 50, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Rejim almashganda asosiy bloklar silliq o'tsin */
.sidebar,
.topbar,
.content-card,
.hero-card,
.quiz-card,
.dashboard-card,
.tariff-card,
.accordion-item,
.chat-bubble.assistant,
input,
select {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme='light'] .theme-toggle .icon-sun {
  display: none;
}

[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}

button, input, select {
  font-family: inherit;
}

/* ---------- Layout shell ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  overflow-y: auto;
  transition: transform 0.2s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 6px 10px;
}

.sidebar-logo svg {
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-logo .logo-accent {
  color: var(--accent);
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.nav-item:hover {
  background: var(--bg-card-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
}

.sidebar-overlay {
  display: none;
}

/* ---------- Main column ---------- */

.main-col {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-translucent);
  backdrop-filter: blur(8px);
  z-index: 20;
}

.sidebar-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.search-box {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  color: var(--text-muted);
}

.search-box svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.page-content {
  padding: 28px;
  max-width: 1080px;
}

/* ---------- Pages ---------- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeInUp 0.35s ease;
}

/* ---------- Hero ---------- */

.hero-card {
  position: relative;
  background: radial-gradient(circle at 15% 20%, rgba(242, 102, 34, 0.35), transparent 55%), var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  margin-bottom: 28px;
  overflow: hidden;
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 620px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn-primary {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(242, 102, 34, 0.35);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-light {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-light:hover {
  opacity: 0.9;
}

.btn-light:active,
.option-btn:active:not(:disabled),
.subject-tab:active {
  transform: scale(0.97);
}

/* ---------- Cards (generic content card) ---------- */

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

h1, h2 {
  margin-top: 0;
  font-weight: 700;
}

.stage-hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* ---------- Form ---------- */

.field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

input, select {
  font-size: 1rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card-soft);
  color: var(--text);
}

input:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------- Stages (quiz flow) ---------- */

.stage {
  display: none;
}

.stage.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

#loading-stage {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 8px auto 20px;
  animation: spin 0.9s linear infinite;
}

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

.error-box {
  margin-top: 20px;
  border: 1px solid var(--red);
  background: var(--red-soft);
  border-radius: 10px;
  padding: 16px;
  color: var(--red);
}

.error-box.hidden,
.hidden {
  display: none !important;
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quiz-toolbar-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-right: 2px;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.btn-small svg {
  width: 16px;
  height: 16px;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.question-text {
  font-size: 1.2rem;
  line-height: 1.5;
  margin-bottom: 22px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  text-align: left;
  font-size: 1rem;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card-soft);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-btn:hover:not(:disabled) {
  border-color: var(--accent);
}

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

.option-btn.correct {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.option-btn.wrong {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
  font-weight: 600;
}

.explanation-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--red);
  color: var(--red);
  font-size: 0.9rem;
  line-height: 1.55;
  background: var(--red-soft);
  border-radius: 0 10px 10px 0;
}

.explanation-box.correct-note {
  border-left-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
}

#next-btn {
  margin-top: 22px;
}

.result-score {
  font-size: 3.2rem;
  font-weight: 800;
  text-align: center;
  color: var(--accent);
  margin: 20px 0;
}

#result-stage h2 {
  text-align: center;
}

/* ---------- Subject tabs (tutorials) ---------- */

.subject-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.subject-tab {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card-soft);
  color: var(--text-muted);
  cursor: pointer;
}

.subject-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Accordion (tutorials) ---------- */

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card-soft);
  padding: 4px 18px;
}

.accordion-item summary {
  font-weight: 600;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary::before {
  content: '▸ ';
  color: var(--accent);
}

.accordion-item p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- Card grid (free tests / quizzes) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.quiz-card {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quiz-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--accent);
}

.quiz-thumb {
  position: relative;
  height: 110px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thumb-badge {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.thumb-count {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-gradient-math { background: linear-gradient(135deg, #4f46e5, #06b6d4); }
.thumb-gradient-english { background: linear-gradient(135deg, #db2777, #f97316); }
.thumb-gradient-quiz-1 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.thumb-gradient-quiz-2 { background: linear-gradient(135deg, #059669, #3b82f6); }

.quiz-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.quiz-card-body h3 {
  margin: 0;
  font-size: 1rem;
}

.quiz-card-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex: 1;
}

.quiz-card-body .btn-primary {
  align-self: flex-start;
  padding: 9px 18px;
  font-size: 0.88rem;
}

/* ---------- Qo'llanmalar: fan tanlash gridi ---------- */

.tutorial-subject-card {
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: inherit;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tutorial-subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--accent);
}

.tutorial-subject-card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.tutorial-subject-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.tutorial-back-btn {
  margin-bottom: 16px;
}

#tutorial-topics-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 20px 0;
}

/* ---------- Chat ---------- */

.chat-card {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}

.chat-bubble {
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 85%;
  /* AI javobidagi bo'sh qatorlar (abzas ajratgichlar) va qatorlar shu yerda
     saqlanib, vizual ravishda ko'rinishi uchun kerak — aks holda hammasi
     bitta uzun, tartibsiz matn blokiga aylanib qolardi. */
  white-space: pre-wrap;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-card-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-bubble.pending {
  opacity: 0.6;
  font-style: italic;
}

.chat-form {
  display: flex;
  gap: 10px;
}

.chat-form input {
  flex: 1;
}

.chat-form .btn-primary {
  margin-top: 0;
}

/* ---------- Generator lock message ---------- */

.lock-message {
  border: 1px solid var(--border);
  background: var(--bg-card-soft);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 4px;
}

.lock-message p {
  color: var(--text-muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Account / Kabinet ---------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 360px;
}

.auth-form.hidden {
  display: none;
}

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

.dashboard-card {
  border: 1px solid var(--border);
  background: var(--bg-card-soft);
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.dashboard-card h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.dashboard-card .dash-value {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.dashboard-card .muted {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 12px;
}

.dashboard-card .btn-light,
.dashboard-card .btn-primary {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.logout-btn {
  margin-top: 4px;
}

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

.tariff-card {
  position: relative;
  border: 1px solid var(--border);
  background: var(--bg-card-soft);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tariff-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.tariff-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.tariff-card.selected {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.tariff-badge {
  position: absolute;
  top: -11px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.tariff-card h3 {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

.tariff-card .tariff-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

.tariff-card p.tariff-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

/* ---------- Fan tanlash paneli (tarif bo'yicha fan cheklovi) ---------- */

.subject-picker {
  border: 1px solid var(--border);
  background: var(--bg-card-soft);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}

.subject-picker h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.subject-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.subject-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.subject-picker-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.subject-picker-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
  }

  .main-col {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .page-content {
    padding: 20px 16px;
  }

  .hero-card {
    padding: 28px 22px;
  }

  .content-card {
    padding: 22px;
  }

  .topbar {
    padding: 12px 16px;
    gap: 10px;
  }

  .dashboard-grid,
  .tariff-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* Kichik telefonlar (≤ 600px): bir ustunli, siqilgan interfeys */
@media (max-width: 600px) {
  .hero-card {
    padding: 22px 16px;
    border-radius: 16px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn-light,
  .hero-actions .btn-primary {
    width: 100%;
    text-align: center;
  }

  .content-card {
    padding: 16px;
    border-radius: 14px;
  }

  h1 {
    font-size: 1.35rem;
  }

  #setup-form .btn-primary,
  .auth-form .btn-primary {
    width: 100%;
  }

  .question-text {
    font-size: 1.05rem;
  }

  .result-score {
    font-size: 2.4rem;
  }

  .subject-tabs {
    flex-wrap: wrap;
  }

  .subject-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .search-box input::placeholder {
    font-size: 0.85rem;
  }

  .chat-messages {
    max-height: 60vh;
  }

  .chat-bubble {
    max-width: 92%;
  }

  .lock-message {
    padding: 20px 16px;
  }
}

/* Juda kichik ekranlar (≤ 380px, masalan eski/kichik telefonlar) */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.3rem;
  }

  .sidebar-logo {
    font-size: 1.1rem;
  }

  .content-card {
    padding: 14px;
  }

  .chat-form {
    flex-direction: column;
  }

  .chat-form .btn-primary {
    width: 100%;
  }
}

/* Harakatga sezgir foydalanuvchilar uchun animatsiyalarni kamaytirish */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Testni PDF sifatida chop etish ---------- */

#print-area {
  display: none;
}

.print-doc h1 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.print-doc .print-meta {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.print-doc ol.print-questions {
  padding-left: 20px;
}

.print-doc ol.print-questions > li {
  margin-bottom: 16px;
  break-inside: avoid;
}

.print-doc ol.print-options {
  list-style: upper-alpha;
  margin: 6px 0 0;
  padding-left: 20px;
}

.print-doc .print-answer-key {
  margin-top: 32px;
  break-before: page;
}

.print-doc .print-answer-key h2 {
  font-size: 1.1rem;
}

@media print {
  body * {
    visibility: hidden;
  }

  #print-area,
  #print-area * {
    visibility: visible;
  }

  #print-area {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: #000;
    background: #fff;
  }
}
