:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --success: #059669;
  --success-hover: #047857;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

.hidden {
  display: none !important;
}

/* ================= BUTTONS & BADGES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

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

.btn-sm {
  padding: 7px 13px;
  font-size: 0.84rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
}

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

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover:not(:disabled) {
  background: var(--success-hover);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.btn-outline.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-danger {
  background: transparent;
  border-color: #fca5a5;
  color: #ef4444;
}
.btn-outline-danger:hover:not(:disabled) {
  background: var(--danger-soft);
}

.btn-warning-outline {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}
.btn-warning-outline.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}

.btn-light {
  background: #ffffff;
  color: var(--primary);
}
.btn-light:hover {
  background: #f1f5f9;
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 999px;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-blue {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ================= TOAST ================= */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.2s ease;
}
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }

@keyframes slideIn {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ================= AUTH SCREEN ================= */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 20px 60px;
}

.auth-container {
  max-width: 1120px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.auth-hero {
  color: #fff;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #93c5fd;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.auth-hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 16px;
}

.auth-hero h1 span {
  color: #60a5fa;
}

.auth-hero > p {
  color: #cbd5e1;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-feat-item {
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.feat-icon {
  font-size: 1.5rem;
}

.hero-feat-item strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 2px;
}

.hero-feat-item p {
  color: #94a3b8;
  font-size: 0.86rem;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
}

.auth-tab {
  background: transparent;
  border: none;
  padding: 9px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form h2 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.auth-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  color: var(--text);
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 16px;
}
.alert-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.demo-account-box {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
}

.demo-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
}

.demo-credentials {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text-muted);
}

/* ================= PORTAL LAYOUT ================= */
.portal-layout {
  display: grid;
  grid-template-columns: 265px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
}

.user-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.user-mini-info {
  overflow: hidden;
}

.user-mini-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini-role {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

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

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-wrapper {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mob-only-logout {
  display: none;
}

.mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  gap: 6px;
  overflow-x: auto;
}

.mob-nav-btn {
  padding: 7px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mob-nav-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.content-area {
  padding: 28px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* ================= DASHBOARD & CARDS ================= */
.welcome-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.welcome-text h1,
.welcome-text h2 {
  font-size: 1.75rem;
  margin: 10px 0 8px;
}

.welcome-text p {
  color: #dbeafe;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

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

.pg-reference-card {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 18px;
}

.pg-ref-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
  margin-bottom: 12px;
}

.pg-ref-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.pg-ref-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.pg-ref-item span {
  display: block;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.pg-ref-item strong {
  font-size: 1rem;
  color: #fff;
}

.pg-ref-note {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: #eff6ff; }
.stat-icon.green { background: #f0fdf4; }
.stat-icon.emerald { background: #ecfdf5; }
.stat-icon.amber { background: #fffbeb; }

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-light);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.section-header p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.quick-practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.qp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.qp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #93c5fd;
}

.qp-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.qp-badge.twk, .q-cat-badge.twk { background: #fee2e2; color: #b91c1c; }
.qp-badge.tiu, .q-cat-badge.tiu { background: #dbeafe; color: #1d4ed8; }
.qp-badge.tkp, .q-cat-badge.tkp { background: #fef3c7; color: #b45309; }

.qp-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.qp-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.qp-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 14px;
}

.exam-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.exam-card-top {
  margin-bottom: 16px;
}

.exam-card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.exam-code-pill {
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.exam-type-pill {
  background: #f0fdf4;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.exam-card h4 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.exam-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.exam-specs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ================= TABLES, BOOKMARKS, HISTORY ================= */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--surface-alt);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.empty-cell {
  text-align: center !important;
  color: var(--text-light);
  padding: 28px !important;
}

.bookmarks-list,
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bookmark-item,
.history-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.history-info h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.history-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.history-score-box {
  text-align: right;
}

.history-score-box strong {
  display: block;
  font-size: 1.25rem;
  color: var(--primary);
}

.info-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ================= FULL-SCREEN CAT EXAM ENGINE ================= */
.cat-exam-screen {
  min-height: 100vh;
  background: #e2e8f0;
  display: flex;
  flex-direction: column;
}

.cat-topbar {
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.cat-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cat-badge {
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.cat-topbar-left h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.cat-exam-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
}

.cat-topbar-center {
  display: flex;
  gap: 10px;
}

.cat-stat-pill {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
}
.cat-stat-pill.answered strong { color: #34d399; }
.cat-stat-pill.doubt strong { color: #fbbf24; }
.cat-stat-pill.remaining strong { color: #94a3b8; }

.cat-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cat-timer-box {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 6px 14px;
  border-radius: 8px;
  text-align: center;
}

.cat-timer-box.urgent {
  background: #7f1d1d;
  border-color: #ef4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.timer-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

.timer-digits {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
}

.cat-workspace {
  flex: 1;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.cat-question-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.cat-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.cat-q-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.q-num-badge {
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 6px;
}

.q-cat-badge {
  font-weight: 800;
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 6px;
}

.q-sub-badge {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
}

.q-diff-badge {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
}

.cat-q-stem {
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 22px;
  white-space: pre-line;
}

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

.cat-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
  font-size: 0.96rem;
  color: var(--text);
}

.cat-option-btn:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.cat-option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.opt-key-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  flex-shrink: 0;
  color: var(--text);
}

.cat-option-btn.selected .opt-key-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.opt-label-text {
  padding-top: 3px;
  line-height: 1.5;
}

.instant-explain-wrap {
  margin-bottom: 20px;
}

.instant-explain-box {
  margin-top: 12px;
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.cat-q-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  gap: 10px;
}

/* RIGHT NAVIGATOR */
.cat-nav-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
}

.cat-nav-header h4 {
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.cat-nav-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.cat-nav-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
}
.dot.active { background: var(--primary); }
.dot.answered { background: var(--success); }
.dot.doubt { background: #f59e0b; }
.dot.empty { background: #cbd5e1; }

.cat-number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 18px;
}

.num-chip {
  height: 40px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.num-chip.answered {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.num-chip.doubt {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}

.num-chip.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.25);
}

.num-chip.active:not(.answered):not(.doubt) {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ================= RESULT & REVIEW SCREEN ================= */
.result-screen {
  min-height: 100vh;
  background: var(--bg);
  padding: 28px 20px;
}

.result-container {
  max-width: 1140px;
  margin: 0 auto;
}

.result-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.result-hero-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}

.result-score-circle {
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 4px solid #60a5fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #93c5fd;
}

.result-score-circle strong {
  font-size: 3rem;
  line-height: 1.1;
  font-weight: 900;
}

.score-max {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.pass-status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.pass-status-badge.pass {
  background: #10b981;
  color: #fff;
}
.pass-status-badge.fail {
  background: #ef4444;
  color: #fff;
}

.result-summary-info h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.result-summary-info p {
  color: #cbd5e1;
  font-size: 0.94rem;
  margin-bottom: 16px;
}

.res-meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.res-meta-pills span {
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
}

.res-sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sec-score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.sec-score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sec-score-val {
  font-size: 1.5rem;
  font-weight: 800;
}

.sec-progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.sec-progress-fill {
  height: 100%;
  background: var(--primary);
}
.sec-progress-fill.pass { background: var(--success); }
.sec-progress-fill.fail { background: var(--danger); }

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

.review-item-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  background: var(--surface-alt);
}

.review-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
}

.review-opt-row {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.review-opt-row.correct-opt {
  background: #ecfdf5;
  border-color: #10b981;
  font-weight: 600;
}

.review-opt-row.user-wrong-opt {
  background: #fef2f2;
  border-color: #ef4444;
}

.review-opt-row.user-picked-locked {
  background: #eff6ff;
  border-color: #3b82f6;
  font-weight: 600;
}

.review-explanation-box {
  background: #eff6ff;
  border-left: 4px solid var(--primary);
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #1e3a8a;
}

/* ================= MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: var(--surface);
  max-width: 480px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-dialog h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.modal-dialog p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.modal-stats-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ================= ACTIVE EXAM AUTO-RESUME BANNER ================= */
.alert-resume-box {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
  animation: bannerPulse 3s infinite;
}

@keyframes bannerPulse {
  0%, 100% { border-color: #f59e0b; }
  50% { border-color: #d97706; }
}

.resume-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resume-icon {
  font-size: 2rem;
  width: 44px;
  height: 44px;
  background: #fde68a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resume-banner-content h4 {
  font-size: 1.05rem;
  color: #92400e;
  margin-bottom: 4px;
}

.resume-banner-content p {
  font-size: 0.88rem;
  color: #78350f;
  margin: 0;
}

/* ================= FIGURAL QUESTION IMAGES ================= */
.cat-figure-wrap {
  margin: 14px 0 20px 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.cat-figure-wrap img {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid #e2e8f0;
}

.cat-figure-wrap img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.cat-figure-hint {
  margin-top: 8px;
  font-size: 0.76rem;
  color: var(--text-light);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

.opt-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.opt-img-box {
  margin: 4px 0;
}

.opt-figural-img {
  max-width: 220px;
  max-height: 110px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px;
  cursor: zoom-in;
  display: block;
}

.opt-figural-img:hover {
  border-color: var(--primary);
}

/* ================= COMPREHENSIVE RESPONSIVE SYSTEM (TABLETS & MOBILE) ================= */

/* --- TABLETS & SMALL LAPTOPS (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .mob-only-logout {
    display: inline-flex;
  }

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

  .auth-container {
    grid-template-columns: 1fr;
    max-width: 540px;
    margin: 0 auto;
    gap: 24px;
  }

  .auth-hero {
    text-align: center;
  }

  .auth-hero h1 {
    font-size: 2rem;
  }

  .auth-card {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .welcome-banner {
    grid-template-columns: 1fr;
    padding: 22px 20px;
    gap: 18px;
  }

  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .quick-practice-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .exam-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 16px;
  }

  .res-sections-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cat-workspace {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 16px;
  }

  .cat-nav-card {
    position: static;
  }
}

/* --- MOBILE DEVICES (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Auth Screen: Clean, centered, compact, no huge marketing clutter */
  .auth-wrapper {
    padding: 16px 12px;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
  }

  .auth-container {
    max-width: 100%;
    gap: 14px;
  }

  .auth-hero {
    text-align: center;
    padding: 4px 4px 0;
  }

  .brand-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin: 0 auto 8px;
    display: inline-block;
  }

  .auth-hero h1 {
    font-size: 1.45rem;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .auth-hero > p {
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  /* Hide bulky 3-feature marketing list on mobile so login form is immediately visible without scrolling */
  .hero-features {
    display: none;
  }

  .auth-card {
    padding: 20px 16px;
    border-radius: 14px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
  }

  .auth-tabs {
    margin-bottom: 16px;
    gap: 4px;
    padding: 3px;
    grid-template-columns: repeat(3, 1fr);
  }

  .auth-tab {
    padding: 8px 4px;
    font-size: 0.78rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auth-form h2 {
    font-size: 1.18rem;
    margin-bottom: 4px;
  }

  .auth-sub {
    font-size: 0.82rem;
    margin-bottom: 14px;
  }

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

  .form-group label {
    font-size: 0.82rem;
    margin-bottom: 4px;
  }

  .form-group input,
  .form-group select {
    font-size: 16px !important; /* Prevents mobile browser auto-zoom upon input tap */
    padding: 10px 12px;
    border-radius: 8px;
  }

  .demo-account-box {
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  /* Portal Topbar & Mobile Nav */
  .topbar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .topbar-left {
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-left h2 {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #sync-badge {
    font-size: 0.68rem;
    padding: 3px 6px;
  }

  .topbar-right .btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .mobile-nav {
    padding: 8px 10px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .mob-nav-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  /* Content Area */
  .content-area {
    padding: 14px 10px;
    width: 100%;
    max-width: 100%;
  }

  /* Dashboard Cards & Banners */
  .welcome-banner {
    padding: 16px 14px;
    border-radius: 14px;
    gap: 14px;
    margin-bottom: 16px;
  }

  .welcome-text h1,
  .welcome-text h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 6px 0;
  }

  .welcome-text p {
    font-size: 0.84rem;
    margin-bottom: 14px;
  }

  .welcome-actions {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .welcome-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.84rem;
    padding: 10px 14px;
  }

  .pg-reference-card {
    padding: 12px 10px;
    border-radius: 10px;
  }

  .pg-ref-title {
    font-size: 0.72rem;
    margin-bottom: 8px;
    text-align: center;
  }

  .pg-ref-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .pg-ref-item {
    padding: 6px 2px;
    text-align: center;
  }

  .pg-ref-item span {
    font-size: 0.65rem;
    display: block;
  }

  .pg-ref-item strong {
    font-size: 0.8rem;
    display: block;
  }

  /* Stats Grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 12px 10px;
    border-radius: 10px;
  }

  .stat-val {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .quick-practice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .qp-card {
    padding: 16px 14px;
  }

  .exam-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

  .exam-card-title {
    font-size: 1.05rem;
  }

  /* Tables & Lists */
  .card {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .table-responsive {
    border-radius: 8px;
    margin: 0 -4px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 0.82rem;
  }

  .bookmark-item,
  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 10px;
  }

  .bookmark-item > div:last-child,
  .history-item > div:last-child {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .history-item .btn,
  .bookmark-item .btn {
    width: 100%;
    justify-content: center;
  }

  /* Full-Screen CAT Exam Engine on Mobile */
  .cat-topbar {
    padding: 8px 10px;
    gap: 6px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .cat-topbar-left {
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .cat-badge {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .cat-topbar-left h2 {
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
  }

  .cat-exam-subtitle {
    display: none;
  }

  .cat-topbar-right {
    gap: 6px;
    flex-shrink: 0;
  }

  .cat-timer-box {
    padding: 4px 8px;
    border-radius: 6px;
  }

  .timer-label {
    font-size: 0.55rem;
  }

  .timer-digits {
    font-size: 1rem;
  }

  #btn-cat-finish-top {
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  .cat-topbar-center {
    width: 100%;
    order: 3;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .cat-stat-pill {
    flex: 1;
    text-align: center;
    padding: 4px 4px;
    font-size: 0.72rem;
    white-space: nowrap;
    border-radius: 6px;
  }

  .cat-workspace {
    padding: 10px 8px;
    gap: 12px;
  }

  .cat-question-card {
    padding: 14px 12px;
    border-radius: 12px;
  }

  .cat-q-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }

  .cat-q-badges {
    gap: 5px;
  }

  .q-num-badge,
  .q-cat-badge,
  .q-sub-badge,
  .q-diff-badge {
    font-size: 0.7rem;
    padding: 4px 7px;
  }

  #btn-cat-bookmark {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .cat-q-stem {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 16px;
  }

  .cat-options-list {
    gap: 8px;
    margin-bottom: 16px;
  }

  .cat-option-btn {
    padding: 10px 12px;
    gap: 10px;
    font-size: 0.88rem;
    border-radius: 8px;
  }

  .opt-key-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .opt-label-text {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  /* Clean 2-column + 1-full-width navigation buttons on mobile */
  .cat-q-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 12px;
  }

  #btn-cat-prev {
    grid-column: 1 / 2;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  #btn-cat-next {
    grid-column: 2 / 3;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  #btn-cat-doubt {
    grid-column: 1 / -1;
    justify-content: center;
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  /* Question Number Palette on Mobile */
  .cat-nav-card {
    position: static;
    padding: 14px 10px;
    border-radius: 12px;
  }

  .cat-nav-header h4 {
    font-size: 0.9rem;
  }

  .cat-nav-legend {
    gap: 8px;
    font-size: 0.7rem;
    margin-bottom: 10px;
  }

  .cat-number-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    max-height: 220px;
    margin-bottom: 14px;
  }

  .num-chip {
    height: 36px;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  /* Result & Review Screen on Mobile */
  .result-screen {
    padding: 12px 8px;
  }

  .result-header-bar {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
  }

  .result-header-bar .btn,
  .result-header-actions,
  .result-header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .result-hero-card {
    padding: 18px 12px;
    gap: 14px;
    flex-direction: column;
    text-align: center;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .result-score-circle {
    width: 125px;
    height: 125px;
    border-width: 3px;
  }

  .result-score-circle strong {
    font-size: 2.2rem;
  }

  .result-summary-info h2 {
    font-size: 1.3rem;
  }

  .result-summary-info p {
    font-size: 0.86rem;
    margin-bottom: 12px;
  }

  .res-meta-pills {
    justify-content: center;
    gap: 5px;
  }

  .res-meta-pills span {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
  }

  .sec-score-card {
    padding: 12px 10px;
    border-radius: 10px;
  }

  .sec-score-val {
    font-size: 1.3rem;
  }

  .review-item-card {
    padding: 14px 10px;
    border-radius: 10px;
    gap: 12px;
  }

  .review-opt-row {
    padding: 8px 10px;
    font-size: 0.82rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .review-explanation-box {
    padding: 10px 12px;
    font-size: 0.84rem;
  }

  /* Modals on Mobile */
  .modal-backdrop {
    padding: 10px;
  }

  .modal-dialog {
    padding: 18px 14px;
    border-radius: 12px;
    max-width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
    width: 100%;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Auto-Resume Banner on Mobile */
  .alert-resume-box {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 10px;
    gap: 10px;
    text-align: center;
  }

  .resume-banner-content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  #btn-resume-active-exam {
    width: 100%;
    font-size: 0.85rem;
    padding: 9px 12px;
  }
}

/* --- SMALL MOBILE SCREENS (max-width: 380px) --- */
@media (max-width: 380px) {
  .auth-hero h1 {
    font-size: 1.25rem;
  }

  .auth-tab {
    font-size: 0.72rem;
    padding: 6px 2px;
  }

  .cat-number-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .pg-ref-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* KEYBOARD SHORTCUTS HINT */
.cat-shortcut-hint {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-light);
  background: #f8fafc;
  border: 1px dashed var(--border);
  padding: 8px 14px;
  border-radius: 8px;
  text-align: center;
}

.cat-shortcut-hint code {
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* ANALYTICS & STUDY RECOMMENDATIONS */
.analytics-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.analytics-card-item {
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.analytics-card-strength {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.analytics-card-weakness {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.analytics-card-item h4 {
  margin: 0;
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-card-strength h4 {
  color: #166534;
}

.analytics-card-weakness h4 {
  color: #92400e;
}

.analytics-recommendation-box {
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px;
}

.analytics-recommendation-box h4 {
  margin: 0 0 8px 0;
  color: #1e293b;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analytics-recommendation-box ul {
  margin: 0;
  padding-left: 20px;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 768px) {
  .analytics-content-grid {
    grid-template-columns: 1fr;
  }
}

/* PRINT & CERTIFICATE EXPORT MEDIA STYLES */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .app-header,
  .app-footer,
  .result-header-bar,
  .review-questions-list,
  .card:has(#review-questions-list),
  #submit-modal,
  #image-zoom-modal {
    display: none !important;
  }

  .result-screen {
    display: block !important;
    padding: 0 !important;
  }

  .result-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .result-hero-card {
    background: #1e3a8a !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border-radius: 8px;
    padding: 24px !important;
  }

  .res-sections-grid {
    gap: 12px;
    margin-top: 16px;
  }

  .sec-score-card {
    border: 1px solid #94a3b8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #res-analytics-card {
    border: 1px solid #94a3b8 !important;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ================= LANDING AEO / SEO KNOWLEDGE & FAQ STYLES ================= */
.landing-faq-wrapper {
  width: 100%;
  margin-top: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 48px;
}

.landing-faq-container {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.landing-faq-header {
  text-align: center;
  margin-bottom: 32px;
}

.landing-faq-header .badge {
  background: rgba(59, 130, 246, 0.25);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #93c5fd;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 12px;
}

.landing-faq-header h2 {
  color: #ffffff;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.landing-faq-header p {
  color: #cbd5e1;
  font-size: 0.98rem;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

/* 3-Column Passing Grade Summary Grid */
.pg-official-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.pg-official-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md, 14px);
  padding: 22px;
  backdrop-filter: blur(8px);
  color: #fff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.pg-official-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.pg-official-box.twk { border-left: 5px solid #3b82f6; }
.pg-official-box.tiu { border-left: 5px solid #10b981; }
.pg-official-box.tkp { border-left: 5px solid #f59e0b; }

.pg-box-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.pg-official-box h3,
.pg-official-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
  line-height: 1.3;
}

.pg-box-score {
  font-size: 0.95rem;
  color: #60a5fa;
  margin-bottom: 6px;
}

.pg-box-score strong {
  font-size: 1.25rem;
  color: #ffffff;
  font-weight: 800;
}

.pg-official-box.tiu .pg-box-score { color: #34d399; }
.pg-official-box.tkp .pg-box-score { color: #fbbf24; }

.pg-box-sub,
.pg-official-box > p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 12px;
  line-height: 1.45;
}

.pg-box-materi {
  font-size: 0.8rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.45;
  margin-top: auto;
}

/* Accordion FAQ Items (Clean Light Default, Ultra-Legible) */
.landing-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.landing-faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.landing-faq-item[open] {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
}

.landing-faq-q {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  color: #0f172a; /* Solid crisp charcoal - highly legible on light bg */
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  transition: color 0.15s ease;
}

.landing-faq-q:hover {
  color: #2563eb;
}

.landing-faq-q::-webkit-details-marker {
  display: none;
}

.faq-toggle-icon {
  font-size: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
  color: #64748b;
  flex-shrink: 0;
}

.landing-faq-item[open] .faq-toggle-icon {
  transform: rotate(180deg);
  color: #2563eb;
}

.landing-faq-a {
  padding: 0 22px 22px;
  color: #334155; /* Solid legible dark slate */
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.landing-faq-a p {
  margin-bottom: 12px;
  color: #334155;
}

.landing-faq-a p:last-child {
  margin-bottom: 0;
}

.landing-faq-a ul,
.landing-faq-a ol {
  margin-left: 20px;
  margin-bottom: 12px;
  color: #334155;
}

.landing-faq-a li {
  margin-bottom: 6px;
  color: #334155;
}

.landing-faq-a strong {
  color: #0f172a;
  font-weight: 700;
}

/* DARK ACCORDION VARIANT (ONLY INSIDE DARK AUTH-WRAPPER HERO) */
.auth-wrapper .landing-faq-item {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.auth-wrapper .landing-faq-item:hover {
  border-color: rgba(96, 165, 250, 0.35);
}

.auth-wrapper .landing-faq-item[open] {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: none;
}

.auth-wrapper .landing-faq-q {
  color: #f8fafc;
}

.auth-wrapper .landing-faq-q:hover {
  color: #93c5fd;
}

.auth-wrapper .faq-toggle-icon {
  color: #94a3b8;
}

.auth-wrapper .landing-faq-item[open] .faq-toggle-icon {
  color: #60a5fa;
}

.auth-wrapper .landing-faq-a {
  color: #cbd5e1;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.auth-wrapper .landing-faq-a p,
.auth-wrapper .landing-faq-a ul,
.auth-wrapper .landing-faq-a li {
  color: #cbd5e1;
}

.auth-wrapper .landing-faq-a strong {
  color: #ffffff;
}

/* Landing Footer Credits */
.landing-footer-credits {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.landing-footer-credits p {
  margin-bottom: 8px;
  color: #cbd5e1;
}

.landing-footer-links a {
  color: #60a5fa;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.landing-footer-links a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

/* ================= PORTAL VIEW FAQ OVERRIDES (Light Background Inside Card) ================= */
.card .pg-official-summary-grid {
  margin-bottom: 0;
}

.card .pg-official-box {
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text, #0f172a);
}

.card .pg-official-box.twk { border-left: 5px solid #2563eb; }
.card .pg-official-box.tiu { border-left: 5px solid #059669; }
.card .pg-official-box.tkp { border-left: 5px solid #d97706; }

.card .pg-official-box:hover {
  box-shadow: var(--shadow-md, 0 4px 14px rgba(15, 23, 42, 0.08));
}

.card .pg-official-box h3,
.card .pg-official-box h4 {
  color: var(--text, #0f172a);
}

.card .pg-box-score {
  color: var(--primary, #1d4ed8);
}

.card .pg-box-score strong {
  color: var(--text, #0f172a);
}

.card .pg-official-box.tiu .pg-box-score { color: var(--success, #059669); }
.card .pg-official-box.tkp .pg-box-score { color: var(--warning, #d97706); }

.card .pg-box-sub,
.card .pg-official-box > p {
  color: var(--text-muted, #475569);
}

.card .pg-box-materi {
  background: #f1f5f9;
  color: var(--text-muted, #475569);
  border: 1px solid #e2e8f0;
}

.card .landing-accordion-list {
  margin-bottom: 0;
}

.card .landing-faq-item {
  background: var(--surface-alt, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}

.card .landing-faq-item[open] {
  background: #ffffff;
  border-color: var(--primary, #1d4ed8);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.06));
}

.card .landing-faq-q {
  color: var(--text, #0f172a);
}

.card .landing-faq-item[open] .faq-toggle-icon {
  color: var(--primary, #1d4ed8);
}

.card .landing-faq-a {
  color: var(--text-muted, #475569);
  border-top: 1px solid var(--border, #e2e8f0);
}

.card .landing-faq-a strong {
  color: var(--text, #0f172a);
}

/* Mobile Responsiveness for FAQ */
@media (max-width: 900px) {
  .pg-official-summary-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .landing-faq-header h2 {
    font-size: 1.45rem;
  }
}

/* ================= PUBLIC NAVBAR & SITE HEADER ================= */
.public-navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.public-nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.public-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.public-nav-brand .brand-logo-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 0.04em;
}

.public-nav-brand .brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.public-nav-brand .brand-name-group {
  display: flex;
  flex-direction: column;
}

.public-nav-brand .brand-main-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  line-height: 1.1;
  white-space: nowrap;
}

.public-nav-brand .brand-sub-title {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.public-nav-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.public-nav-links a:hover,
.public-nav-links a.active {
  color: #60a5fa;
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.public-nav-actions .btn {
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .public-nav-links {
    gap: 12px;
  }
  .public-nav-links a {
    font-size: 0.83rem;
  }
}

/* ================= BREADCRUMBS ================= */
.breadcrumb-nav {
  padding: 14px 0;
  font-size: 0.85rem;
  color: #64748b;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-list li a {
  color: #3b82f6;
  text-decoration: none;
}

.breadcrumb-list li a:hover {
  text-decoration: underline;
}

.breadcrumb-list li.separator {
  color: #94a3b8;
}

.breadcrumb-list li.current {
  color: #0f172a;
  font-weight: 600;
}

/* Dark variant of breadcrumb for dark headers */
.breadcrumb-dark .breadcrumb-list li a { color: #93c5fd; }
.breadcrumb-dark .breadcrumb-list li.separator { color: #64748b; }
.breadcrumb-dark .breadcrumb-list li.current { color: #f1f5f9; }

/* ================= MONEY HERO SECTION ================= */
.money-hero {
  background: linear-gradient(135deg, #090e1a 0%, #0f172a 45%, #1e3a8a 100%);
  color: #fff;
  padding: 56px 20px 64px;
  position: relative;
  overflow: hidden;
}

.money-hero-container {
  max-width: 1140px;
  margin: 0 auto;
}

.money-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #93c5fd;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.money-hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin-bottom: 18px;
  max-width: 920px;
}

.money-hero h1 span.highlight {
  background: linear-gradient(90deg, #60a5fa, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.money-hero-desc {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 780px;
  margin-bottom: 32px;
}

.money-hero-ctas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 36px;
}

.btn-cta-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.btn-cta-blue {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta-blue:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.money-hero-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #e2e8f0;
}

.proof-item strong {
  color: #fff;
  font-weight: 700;
}

/* ================= PRICING CARDS ================= */
.pricing-section {
  padding: 72px 20px;
  background: #f8fafc;
}

.section-head-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-head-center h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-head-center p {
  font-size: 1.05rem;
  color: #64748b;
  line-height: 1.55;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1140px;
  margin: 0 auto;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.pricing-card.featured {
  border: 2px solid #2563eb;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.12);
}

.featured-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.pricing-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.pricing-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.pricing-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 24px;
}

.pricing-price {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f1f5f9;
}

.price-currency {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  vertical-align: top;
}

.price-amount {
  font-size: 2.6rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.price-period {
  font-size: 0.85rem;
  color: #64748b;
}

.price-slash {
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-bottom: 4px;
}

.pricing-features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}

.pricing-features li {
  font-size: 0.92rem;
  color: #334155;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}

.pricing-features li .check-icon {
  color: #059669;
  font-weight: bold;
  flex-shrink: 0;
}

/* ================= FEATURE COMPARISON TABLE ================= */
.feature-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  margin-top: 32px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.feature-table th {
  background: #f8fafc;
  padding: 16px 20px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
}

.feature-table td {
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.feature-table tr:hover td {
  background: #f8fafc;
}

.feature-table .col-highlight {
  background: rgba(37, 99, 235, 0.03);
  font-weight: 600;
}

/* ================= ARTICLE & TOPIC CLUSTER STYLES ================= */
.article-page-wrap {
  background: #ffffff;
  padding: 40px 20px 80px;
}

.article-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
}

.article-main {
  min-width: 0;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.article-tag {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.article-header h1 {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}

.author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1e293b;
}

.article-body h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 40px 0 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  letter-spacing: -0.015em;
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin: 28px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 24px 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.callout-box {
  background: #f8fafc;
  border-left: 4px solid #2563eb;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
}

.callout-box.warning {
  border-left-color: #d97706;
  background: #fffbeb;
}

.callout-box.success {
  border-left-color: #059669;
  background: #ecfdf5;
}

.callout-title {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

/* Sidebar Widget */
.article-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.aside-widget {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
}

.aside-widget h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cluster-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cluster-nav-list li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #334155;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.cluster-nav-list li a:hover,
.cluster-nav-list li.active a {
  color: #2563eb;
  font-weight: 700;
}

/* Author Bio Card */
.author-bio-card {
  margin-top: 48px;
  padding: 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.author-bio-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.author-bio-info h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.author-bio-role {
  font-size: 0.85rem;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 8px;
}

.author-bio-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
}

/* LLM Snippet Inspector Box (AEO & AIEO Transparency) */
.llm-inspector-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 36px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.55;
}

.llm-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
  margin-bottom: 12px;
  color: #60a5fa;
  font-weight: bold;
}

/* ================= PUBLIC FOOTER ================= */
.public-site-footer,
.public-footer {
  background: #0b1120;
  color: #cbd5e1;
  padding: 64px 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 10px;
}

.footer-brand-logo img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
}

.footer-desc {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 10px;
  max-width: 320px;
}

.public-footer-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-col ul a:hover {
  color: #60a5fa;
}

.footer-brand-p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 320px;
}

.footer-bottom-bar {
  max-width: 1140px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-bottom-bar a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-bottom-bar a:hover {
  color: #fff;
}

/* Mobile Responsiveness for Articles & Money Pages */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .article-container {
    grid-template-columns: 1fr;
  }

  .public-footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .public-nav-links {
    display: none; /* simple mobile hide for minimal layout */
  }

  .money-hero h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 600px) {
  .public-footer-container {
    grid-template-columns: 1fr;
  }

  .money-hero h1 {
    font-size: 1.75rem;
  }
}

/* LANDING TRY-BEFORE-SIGNUP MINI QUIZ & MATERI SILO CARDS */
.landing-demo-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 28px auto 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 26px 28px;
  backdrop-filter: blur(8px);
}

.landing-demo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.landing-demo-head h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
  color: #ffffff;
}

.mini-quiz-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-quiz-tab {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.mini-quiz-tab.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #60a5fa;
}

.mini-quiz-card {
  background: #ffffff;
  color: #0f172a;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.32);
}

.mini-quiz-stem {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.55;
  color: #0f172a;
  margin-bottom: 14px;
}

.mini-quiz-opts {
  display: grid;
  gap: 9px;
}

.mini-quiz-opt {
  text-align: left;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.93rem;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-family: inherit;
}

.mini-quiz-opt:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.mini-quiz-opt.is-correct {
  border-color: #16a34a;
  background: #dcfce7;
  color: #14532d;
  font-weight: 600;
}

.mini-quiz-opt.is-wrong {
  border-color: #dc2626;
  background: #fef2f2;
  color: #7f1d1d;
}

.mini-quiz-opt-key {
  font-weight: 800;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.mini-quiz-explain {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
  font-size: 0.9rem;
  line-height: 1.55;
}

.mini-quiz-explain.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

.materi-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0 36px;
}

.materi-hub-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: #0f172a;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.materi-hub-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.materi-hub-card h3 {
  font-size: 1.05rem;
  margin: 8px 0 6px;
  color: #0f172a;
}

.materi-hub-card p {
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 640px) {
  .landing-demo-wrap {
    padding: 18px 14px;
  }
  .mini-quiz-card {
    padding: 16px;
  }
}


