.exam-shell {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  min-height: 700px;
  scroll-margin-top: 76px;
}

.exam-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  min-height: 112px;
  background: #f1f5f9;
  border-bottom: 1px solid #dbe3ee;
}

.track-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.track-tabs::-webkit-scrollbar {
  display: none;
}

.track-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.track-tab:hover {
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.track-tab.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.mode-group {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 9px;
  gap: 3px;
}

.mode-btn {
  min-height: 34px;
  padding: 5px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.exam-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 13px;
}

.status-left,
.status-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.status-progress {
  font-weight: 600;
  color: #0f172a;
}

.status-answered,
.status-best {
  color: #475569;
}

.status-best {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 2px 8px;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  border-radius: 6px;
}

.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.timer-box.is-low {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.timer-label {
  font-size: 12px;
  color: #475569;
}

.timer-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.util-btn {
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.util-btn:hover {
  background: #f1f5f9;
}

.exam-notice[hidden],
.status-best[hidden] {
  display: none;
}

.exam-notice {
  padding: 10px 16px;
  font-size: 13px;
  background: #fffbeb;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exam-stage {
  padding: 20px;
  min-height: 540px;
}

.exam-loading,
.exam-error {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  text-align: center;
  color: #475569;
}

.exam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 20px;
  align-items: start;
}

.q-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.q-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
}

.q-pill-diff {
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  font-size: 11px;
}

.q-pill-flag {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.q-stem {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  color: #0f172a;
  margin: 0 0 16px;
}

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

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  min-height: 48px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.option-btn:hover {
  border-color: #1d4ed8;
  background: #f8fafc;
}

.option-btn.is-selected {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.option-btn.is-correct {
  border-color: #0f766e;
  background: #f0fdfa;
}

.option-btn.is-wrong {
  border-color: #b91c1c;
  background: #fef2f2;
}

.option-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.option-btn.is-selected .option-key {
  background: #1d4ed8;
  color: #ffffff;
}

.option-btn.is-correct .option-key {
  background: #0f766e;
  color: #ffffff;
}

.option-btn.is-wrong .option-key {
  background: #b91c1c;
  color: #ffffff;
}

.study-feedback {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
}

.study-feedback.is-right {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.study-feedback.is-wrong {
  border-color: #fecaca;
  background: #fef2f2;
}

.study-verdict {
  font-weight: 700;
  margin: 0 0 6px;
}

.study-feedback.is-right .study-verdict {
  color: #0f766e;
}

.study-feedback.is-wrong .study-verdict {
  color: #b91c1c;
}

.study-exp {
  margin: 0 0 6px;
  color: #0f172a;
}

.study-topic {
  margin: 0;
  font-size: 12px;
  color: #475569;
  font-family: 'JetBrains Mono', monospace;
}

.q-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.q-actions-left,
.q-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.act-btn {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.act-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

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

.act-btn-flag.is-flagged {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.act-btn-primary {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.act-btn-primary:hover:not(:disabled) {
  background: #1e40af;
}

.act-btn-submit {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.act-btn-submit:hover:not(:disabled) {
  background: #115e59;
}

.kbd-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
}

/* Navigator Panel */
.nav-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.nav-panel-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.nav-cell {
  height: 36px;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.nav-cell.is-answered {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.nav-cell.is-flagged {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.nav-cell.is-current {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.25);
}

.nav-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #475569;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.legend-dot.is-answered {
  background: #eff6ff;
  border-color: #1d4ed8;
}

.legend-dot.is-flagged {
  background: #fffbeb;
  border-color: #f59e0b;
}

/* Inline submit confirmation */
.confirm-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1.5px solid #f59e0b;
  background: #fffbeb;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.confirm-box p {
  margin: 0;
  font-size: 14px;
  color: #78350f;
  font-weight: 500;
}

.confirm-actions {
  display: flex;
  gap: 8px;
}

/* Results Dashboard */
.result-summary {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.score-card {
  background: #f8fafc;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.score-status {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.score-status.is-pass {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.score-status.is-fail {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.score-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.05;
  color: #0f172a;
}

.score-scale-label {
  font-size: 13px;
  color: #475569;
  margin: 4px 0 12px;
}

.score-meter {
  position: relative;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  margin: 14px 0 8px;
}

.score-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: #1d4ed8;
}

.score-meter-fill.is-pass {
  background: #0f766e;
}

.score-meter-passline {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 68.89%;
  width: 2px;
  background: #0f172a;
}

.score-raw {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin: 6px 0 4px;
}

.score-note {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.domain-panel {
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 18px;
}

.domain-panel h3 {
  font-size: 16px;
  margin: 0 0 14px;
}

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.domain-row-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 5px;
}

.domain-name {
  font-weight: 600;
  color: #0f172a;
}

.domain-weak-tag {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
}

.domain-stat {
  font-family: 'JetBrains Mono', monospace;
  color: #475569;
  flex-shrink: 0;
}

.domain-bar-bg {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.domain-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #0f766e;
}

.domain-bar-fill.is-weak {
  background: #b91c1c;
}

.domain-bar-fill.is-mid {
  background: #b45309;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-card {
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
}

.review-card.is-right {
  border-left: 4px solid #0f766e;
}

.review-card.is-wrong {
  border-left: 4px solid #b91c1c;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.review-stem {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 15px;
  color: #0f172a;
}

.review-ans {
  margin: 0 0 6px;
  font-size: 14px;
  color: #334155;
}

.review-exp {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
  color: #334155;
}

.noscript-box {
  padding: 16px;
  background: #fffbeb;
  border-top: 1px solid #fde68a;
  font-size: 14px;
}

@media (max-width: 820px) {
  .exam-shell {
    min-height: 740px;
  }

  .exam-stage {
    min-height: 600px;
  }

  .exam-layout,
  .result-summary {
    grid-template-columns: 1fr;
  }

  .nav-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .exam-shell {
    min-height: 760px;
  }

  .exam-stage {
    padding: 14px;
    min-height: 580px;
  }

  .exam-loading,
  .exam-error {
    min-height: 540px;
  }

  .exam-toolbar {
    padding: 10px 12px;
    min-height: 108px;
  }

  .track-tabs {
    padding-bottom: 2px;
  }

  .exam-status-bar {
    padding: 10px 12px;
  }

  .mode-group {
    width: 100%;
  }

  .mode-btn {
    flex: 1;
  }

  .nav-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .q-actions-left,
  .q-actions-right {
    width: 100%;
  }

  .q-actions .act-btn {
    flex: 1;
  }
}


/* ===== V2 4-in-1 Workbench, Multi-Select, Learn, Domain Drill, Full Mocks & Modal ===== */
[hidden] {
  display: none !important;
}

.workbench-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
}

.step-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  min-height: 38px;
  max-width: 100%;
  scrollbar-width: none;
}

.step-tabs::-webkit-scrollbar {
  display: none;
}

.step-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.step-tab.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.status-sync {
  font-size: 12px;
  font-weight: 600;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 2px 8px;
  border-radius: 999px;
}

.q-pill-multi {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 700;
}

.option-key.is-box {
  border-radius: 5px;
}

.nav-grid.is-dense {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  max-height: 320px;
  overflow-y: auto;
  padding-right: 2px;
}

.study-doc-link {
  color: #1d4ed8;
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
}

/* Traffic light dots & domain drill trigger */
.traffic-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}

.traffic-dot.is-green { background: #10b981; }
.traffic-dot.is-amber { background: #f59e0b; }
.traffic-dot.is-red { background: #ef4444; }

.domain-stat-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.domain-drill-mini {
  appearance: none;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
}

.domain-drill-mini:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.post-diag-banner {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1.5px solid #93c5fd;
  background: #eff6ff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-diag-copy strong {
  display: block;
  font-size: 15px;
  color: #0f172a;
}

.post-diag-copy p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #334155;
}

.post-diag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Learn Subtabs & Notes */
.learn-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.learn-subtab {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 8px;
  cursor: pointer;
}

.learn-subtab.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.study-progress-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.study-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.study-domain-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.study-dom-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
}

.study-dom-card.is-studied {
  border-color: #10b981;
  background: #f0fdfa;
}

.study-dom-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.study-dom-head h4 {
  margin: 6px 0 0;
  font-size: 16px;
}

.study-dom-summary {
  margin: 8px 0 12px;
  font-size: 14px;
  color: #475569;
}

.study-dom-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.study-subhead {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
}

.study-subhead.is-trap {
  color: #b45309;
}

.study-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.study-dom-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* 1-Page Cheat Sheet */
.cs-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.cs-sub,
.cs-sec-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: #475569;
}

.cs-section {
  margin-top: 18px;
}

.cs-section h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #0f172a;
}

.cs-table-wrap {
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}

.cs-table th,
.cs-table td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.cs-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.cs-key-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
}

/* Flashcards */
.fc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.fc-stat {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.fc-select {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 13px;
  background: #ffffff;
  color: #0f172a;
  max-width: 100%;
}

.flashcard {
  width: 100%;
  min-height: 210px;
  text-align: left;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flashcard.is-flipped {
  border-color: #0f766e;
  background: #f0fdfa;
}

.flashcard.is-mastered {
  border-color: #10b981;
}

.fc-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.fc-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: #0f172a;
  font-weight: 500;
}

.fc-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Domain Drill & Full Mocks Pickers */
.picker-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.picker-head p {
  margin: 0 0 16px;
  font-size: 14px;
  color: #475569;
}

.drill-grid,
.mocks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.drill-card,
.mock-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-card.is-open {
  border-color: #10b981;
}

.drill-card-top,
.mock-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.drill-card h4,
.mock-card h4 {
  margin: 2px 0 0;
  font-size: 15px;
}

.drill-desc,
.mock-meta {
  margin: 0;
  font-size: 13px;
  color: #475569;
  flex: 1;
}

.drill-score-pill,
.mock-state-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.drill-score-pill.is-green,
.mock-state-pill.is-open {
  background: #ecfdf5;
  color: #065f46;
}

.drill-score-pill.is-amber {
  background: #fffbeb;
  color: #b45309;
}

.drill-score-pill.is-red {
  background: #fef2f2;
  color: #b91c1c;
}

.mock-state-pill.is-locked {
  background: #eff6ff;
  color: #1d4ed8;
}

.drill-card-actions,
.mock-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* Paywall Modal */
.paywall-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.paywall-dialog {
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.paywall-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.paywall-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f766e;
}

.paywall-head h2,
.paywall-head h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.paywall-close {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.paywall-desc {
  margin: 10px 0 16px;
  font-size: 14px;
  color: #475569;
}

.paywall-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pw-card {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.pw-card.is-best {
  border: 2px solid #1d4ed8;
  background: #ffffff;
}

.pw-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pw-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.pw-tag.is-accent {
  background: #eff6ff;
  color: #1d4ed8;
}

.pw-price {
  font-size: 20px;
  color: #0f172a;
}

.pw-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.pw-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.pw-sub-btns {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pw-action-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.paywall-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #475569;
}

@media (max-width: 720px) {
  .study-dom-cols,
  .drill-grid,
  .mocks-grid,
  .paywall-options {
    grid-template-columns: 1fr;
  }
}
