/* ==========================================================================
   CrackIt.me — Main stylesheet
   Ported from the Next.js globals.css theme system + Tailwind component styles
   ========================================================================== */

/* ── Theme variables ───────────────────────────────────────────────────────── */
:root {
  /* Dark theme (default) */
  --color-bg: #0a0a0a;
  --color-text: #ededed;
  --color-text-muted: #a1a1aa;
  --color-text-dim: #71717a;
  --color-border: #27272a;
  --color-border-strong: #3f3f46;
  --color-surface: #111113;
  --color-accent: #4f8ef7;
  --color-accent-2: #7c5af7;
  --color-accent-soft: rgba(79, 142, 247, 0.12);
  --color-success: #2ecc71;
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-overlay: rgba(10, 10, 10, 0.7);
  --radius-card: 0.75rem;
  --card-shadow: none;
  --card-shadow-lg: none;
}

/* Light theme overrides */
:root[data-theme="light"] {
  --color-bg: #ffffff;
  --color-text: #09090b;
  --color-text-muted: #3f3f46;
  --color-text-dim: #52525b;
  --color-border: #e4e4e7;
  --color-border-strong: #d4d4d8;
  --color-surface: #f9fafb;
  --color-accent: #2563eb;
  --color-accent-2: #7c3aed;
  --color-accent-soft: rgba(37, 99, 235, 0.08);
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --color-overlay: rgba(255, 255, 255, 0.85);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

/* Theme icon visibility: sun shown in dark mode, moon in light mode */
.theme-icon-sun { display: block !important; }
.theme-icon-moon { display: none !important; }
:root[data-theme="light"] .theme-icon-sun { display: none !important; }
:root[data-theme="light"] .theme-icon-moon { display: block !important; }

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Geist", "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: #3d7bea; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
code, pre, .mono, .font-mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container-prose {
  margin: 0 auto;
  width: 100%;
  max-width: 72rem;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container-prose {
    padding: 0 1.5rem;
  }
}

.container {
  margin: 0 auto;
  width: 100%;
  max-width: 72rem;   /* 6xl */
  padding: 0 1rem;
}
@media (min-width: 640px) { .container-prose {
  margin: 0 auto;
  width: 100%;
  max-width: 72rem;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .container-prose {
    padding: 0 1.5rem;
  }
}

.container { padding: 0 1.5rem; } }

.section { padding: 3.5rem 0; }
.section-sm { padding: 2rem 0; }

.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.relative { position: relative; }
.absolute { position: absolute; }
.hidden { display: none; }

/* Responsive grid helpers */
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Background grid pattern ──────────────────────────────────────────────── */
.bg-grid {
  background-image:
    linear-gradient(to right, var(--color-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
}
.navbar-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.navbar-links {
  display: none;
  align-items: center;
  gap: 1.25rem;
}
.navbar-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.15s;
}
.navbar-link:hover { color: var(--color-text); }
.navbar-actions { display: flex; align-items: center; gap: 0.75rem; }
@media (min-width: 768px) { .navbar-links { display: flex; } }

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--color-accent); }
.theme-toggle svg { width: 18px; height: 18px; }

/* Mobile menu */
.mobile-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 0.75rem 1rem 1.25rem;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu form.mobile-menu-logout button {
  width: 100%;
  display: block;
  padding: 0.65rem 0;
  border: none;
  border-bottom: 1px solid var(--color-border);
  background: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.mobile-menu form.mobile-menu-logout:last-child button { border-bottom: none; }
@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}
/* Very small screens: auth buttons live in the mobile menu instead of the navbar */
@media (max-width: 400px) {
  .navbar-actions .btn { display: none; }
}
/* Touch-friendly tap targets on mobile */
@media (max-width: 767px) {
  .theme-toggle, .mobile-menu-btn { width: 44px; height: 44px; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn,
.btn-primary,
.btn-ghost,
.btn-danger,
.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: #3d7bea; color: #fff; }
.btn-ghost {
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { color: #3d7bea; }
.btn-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--color-danger);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--color-danger); }
.btn-success {
  background: var(--color-success);
  color: #fff;
}
.btn-success:hover { filter: brightness(0.95); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.8rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  border-radius: var(--radius-card);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--card-shadow);
}
.card-interactive {
  border-radius: var(--radius-card);
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: var(--card-shadow);
  transition: all 0.2s;
  display: block;
  color: var(--color-text);
}
.card-interactive:hover {
  border-color: var(--color-accent);
  box-shadow: var(--card-shadow-lg);
  color: var(--color-text);
}
/* Upcoming-exam glow (mockers.in style: soft section gradient + card glow) */
/* UPCOMING EXAMS badge glow — gradient + luminous halo matching the badge gradient */
.exam-badge-glow {
  background-image: linear-gradient(to right, var(--color-accent), var(--color-accent-2)) !important;
  box-shadow: 0 0 10px rgba(79, 142, 247, 0.55), 0 0 28px rgba(124, 90, 247, 0.4);
}
:root[data-theme="light"] .exam-badge-glow {
  background-image: linear-gradient(to right, var(--color-accent), var(--color-accent-2)) !important;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.45), 0 0 22px rgba(124, 90, 247, 0.3);
}
.exam-glow-section {
  background: radial-gradient(70% 90% at 50% 100%, rgba(79, 142, 247, 0.16), transparent 72%);
}
.exam-card-glow {
  border-color: rgba(79, 142, 247, 0.35) !important;
  box-shadow: 0 0 14px rgba(79, 142, 247, 0.28), 0 0 40px rgba(79, 142, 247, 0.18);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.exam-card-glow:hover {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 18px rgba(79, 142, 247, 0.42), 0 0 55px rgba(124, 90, 247, 0.28);
}
:root[data-theme="light"] .exam-glow-section {
  background: radial-gradient(70% 90% at 50% 100%, rgba(37, 99, 235, 0.1), transparent 72%);
}
:root[data-theme="light"] .exam-card-glow {
  border-color: rgba(37, 99, 235, 0.3) !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18), 0 8px 30px rgba(37, 99, 235, 0.12);
}
:root[data-theme="light"] .exam-card-glow:hover {
  border-color: var(--color-accent) !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3), 0 12px 44px rgba(124, 90, 247, 0.18);
}
.card-elevated {
  border-radius: var(--radius-card);
  padding: 2rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: var(--card-shadow-lg);
}

/* ── Exam detail page (mockers.in style) ──────────────────────────────────── */

/* Horizontal tab bar below the exam header */
.exam-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.exam-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
  background: #1e293b;
  border: 1px solid #334155;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.exam-tab:hover {
  color: #fff;
  background: #334155;
  border-color: #475569;
}
.exam-tab.is-active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
:root[data-theme="light"] .exam-tab {
  color: #374957;
  background: #c9e6fd;
  border-color: transparent;
}
:root[data-theme="light"] .exam-tab:hover {
  color: #374957;
  background: #b0d8f7;
  border-color: transparent;
}
:root[data-theme="light"] .exam-tab.is-active {
  color: #fff;
  background: #1273eb;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(18, 115, 235, 0.3);
}

/* Featured test card — mockers.in slide-box adapted to theme */
.featured-test-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid rgba(79, 142, 247, 0.28);
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.14), transparent 55%),
              var(--color-surface);
  box-shadow: 0 4px 24px rgba(79, 142, 247, 0.14), 0 0 44px rgba(79, 142, 247, 0.08);
}
:root[data-theme="light"] .featured-test-card {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 55%),
              #ffffff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1), 0 0 40px rgba(37, 99, 235, 0.06);
}
.featured-test-card .ftc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.featured-test-card .ftc-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.featured-test-card .ftc-features {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.7;
}
.featured-test-card .ftc-features li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.featured-test-card .ftc-features li::before {
  content: "-";
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}
.badge-new {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 0.375rem;
  background: linear-gradient(to right, #f06377, #bf43f9);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 0 10px rgba(240, 99, 119, 0.45);
}

/* ── Mock test listing (mockers.in mcq-qp style) ────────────────────────── */
.mock-listing {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mock-listing-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 1.125rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mock-listing-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}
:root[data-theme="light"] .mock-listing-item:hover {
  box-shadow: 0 0 0 1px rgba(18, 115, 235, 0.12);
}
.mock-listing-item.is-current {
  border-color: rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), transparent 50%);
}
:root[data-theme="light"] .mock-listing-item.is-current {
  border-color: rgba(18, 115, 235, 0.25);
  background: linear-gradient(135deg, rgba(18, 115, 235, 0.05), transparent 50%);
}
.mock-listing-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.mock-listing-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.mock-listing-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.badge-free {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
:root[data-theme="light"] .badge-free {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.2);
}
.badge-current {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.25);
}
:root[data-theme="light"] .badge-current {
  background: rgba(18, 115, 235, 0.12);
  color: #1273eb;
  border-color: rgba(18, 115, 235, 0.2);
}

/* ── Exam page SEO blog article (mockers.in style) ────────────────────────── */
/* Default = dark theme (site default). Light-theme overrides below. */
.exam-blog {
  margin-top: 3rem;
  padding: 2.25rem 2.5rem 0.5rem;
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  font-family: 'Lora', 'Georgia', serif;   /* beautiful editorial serif */
}
.exam-blog h1,
.exam-blog h2,
.exam-blog h3,
.exam-blog h4,
.exam-blog .h1,
.exam-blog .h2 {
  font-family: 'Fraunces', 'Georgia', serif;  /* display serif for headings */
}
.exam-blog h1,
.exam-blog .h1 {
  color: #6aa1ff;                    /* readable accent-blue on dark */
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.exam-blog h2,
.exam-blog .h2 {
  color: var(--color-text);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.35;
  margin: 2rem 0 0.6rem;
}
.exam-blog h2:first-child,
.exam-blog .h2:first-child {
  margin-top: 0;
}
.exam-blog h3 {
  color: var(--color-text);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  margin: 1.5rem 0 0.4rem;
}
.exam-blog h4 {
  color: var(--color-text);
  font-size: 24px;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
}
.exam-blog p {
  font-family: 'Lora', 'Georgia', serif;
  font-size: 17px;
  line-height: 1.7;
  color: #d4d4d8;
  margin: 0.6rem 0;
}
.exam-blog h1 strong,
.exam-blog h2 strong,
.exam-blog h3 strong,
.exam-blog h4 strong {
  color: inherit;
}
.exam-blog ul,
.exam-blog ol {
  margin: 15px;
  padding-left: 0.5rem;
}
.exam-blog li {
  font-family: 'Lora', 'Georgia', serif;
  font-size: 17px;
  line-height: 1.7;
  color: #d4d4d8;
  margin-bottom: 15px;
}
.exam-blog li::marker {
  color: #6aa1ff;
}
.exam-blog strong {
  color: var(--color-text);
}

/* Real-data tables — blue header + dark body */
.exam-blog-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.9rem 0 30px;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
}
.exam-blog-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Lora', 'Georgia', serif;
  font-size: 17px;
  margin: 0;
}
.exam-blog-table th,
.exam-blog-table td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--color-border);
  vertical-align: top;
  white-space: nowrap;
}
.exam-blog-table th {
  background: #206CFF;               /* mockers tr:first-child td */
  color: #fff;
  font-family: 'Geist', sans-serif;  /* site sans — crisp header contrast */
  font-weight: 700;
}
.exam-blog-table th p {
  color: #fff;
  margin-bottom: 0;
}
.exam-blog-table td {
  background: var(--color-bg);
  color: var(--color-text);
}
.exam-blog-table tr:nth-child(even) td {
  background: #1b1b1f;
}

/* Note box — mockers .note-area adapted to dark */
.exam-note {
  padding: 25px 30px;
  border-radius: 4px;
  color: #cfe0ff;
  font-family: 'Lora', 'Georgia', serif;
  font-size: 17px;
  background: rgba(32, 108, 255, 0.14);
  border: 1px solid rgba(32, 108, 255, 0.35);
  margin: 1rem 0 1.25rem;
}

/* FAQ accordion — mockers accordion style adapted to dark (native <details>) */
.exam-faq {
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
  background: var(--color-bg);
  padding: 20px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  margin-top: 1rem;
}
.exam-faq details {
  border: 0;
  border-bottom: 1px solid #333;
  border-radius: 0;
}
.exam-faq details:last-child {
  border-bottom: 0;
}
.exam-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 24px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.exam-faq summary::-webkit-details-marker {
  display: none;
}
.exam-faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5F7D95
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    center / 0.8rem no-repeat;
  transition: transform 0.2s ease;
}
.exam-faq details[open] summary::after {
  transform: rotate(180deg);
}
.exam-faq .faq-answer {
  display: block;
  padding: 0 0 20px;
  font-family: 'Lora', 'Georgia', serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* Related exams chips (dark) */
.related-exams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-bottom: 1.75rem;
}
.related-exams a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.related-exams a:hover {
  border-color: #206CFF;
  color: #6aa1ff;
  box-shadow: 0 0 12px rgba(32, 108, 255, 0.25);
}

/* ── Light theme: exact mockers.in palette ───────────────────────────────── */
:root[data-theme="light"] .exam-blog {
  background: #F8F9FA;               /* mockers .bg-light */
  color: #374957;                    /* mockers .page-content */
  border: 1px solid rgba(95, 125, 149, 0.18);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
:root[data-theme="light"] .exam-blog h1,
:root[data-theme="light"] .exam-blog .h1 {
  color: #1273EB;                    /* mockers h1 blue */
}
:root[data-theme="light"] .exam-blog h2,
:root[data-theme="light"] .exam-blog .h2,
:root[data-theme="light"] .exam-blog h3,
:root[data-theme="light"] .exam-blog h4 {
  color: #374957;
}
:root[data-theme="light"] .exam-blog p,
:root[data-theme="light"] .exam-blog li {
  color: #374957;
}
:root[data-theme="light"] .exam-blog strong {
  color: #374957;
}
:root[data-theme="light"] .exam-blog li::marker {
  color: #206CFF;
}
:root[data-theme="light"] .exam-blog-scroll {
  border: 1px solid #d9e1e8;
}
:root[data-theme="light"] .exam-blog-table th,
:root[data-theme="light"] .exam-blog-table td {
  border: 1px solid #d9e1e8;
}
:root[data-theme="light"] .exam-blog-table td {
  background: #fff;
  color: #374957;
}
:root[data-theme="light"] .exam-blog-table tr:nth-child(even) td {
  background: #f4f7fa;
}
:root[data-theme="light"] .exam-note {
  color: #374957;
  background: #D4ECFD;
  border: 0;
}
:root[data-theme="light"] .exam-faq {
  box-shadow: 0px 4px 8px rgba(95, 125, 149, 0.16);
  background: #fff;
  border: 0;
}
:root[data-theme="light"] .exam-faq details {
  border-bottom: 1px solid #5F7D95;
}
:root[data-theme="light"] .exam-faq summary {
  color: #374957;
}
:root[data-theme="light"] .exam-faq .faq-answer {
  color: #5F7D95;
}
:root[data-theme="light"] .related-exams a {
  border: 1px solid #d9e1e8;
  background: #fff;
  color: #374957;
}
:root[data-theme="light"] .related-exams a:hover {
  color: #1273EB;
}

/* ── Mobile responsive ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .exam-blog {
    padding: 1.25rem 1.1rem 0.25rem;
    border-radius: 0.5rem;
  }
  .exam-blog h1,
  .exam-blog .h1 {
    font-size: 23px;
    line-height: 1.3;
  }
  .exam-blog h2,
  .exam-blog .h2 {
    font-size: 22px;
    margin-top: 1.75rem;
  }
  .exam-blog h3 {
    font-size: 19px;
  }
  .exam-blog h4 {
    font-size: 20px;
  }
  .exam-blog p,
  .exam-blog li {
    font-size: 16px;
    line-height: 1.65;
  }
  .exam-blog ul,
  .exam-blog ol {
    margin: 12px 8px;
    padding-left: 0.4rem;
  }
  .exam-blog-table {
    font-size: 15px;
  }
  .exam-blog-table th,
  .exam-blog-table td {
    padding: 0.5rem 0.65rem;
  }
  .exam-note {
    padding: 18px 20px;
    font-size: 16px;
  }
  .exam-faq {
    padding: 14px;
  }
  .exam-faq summary {
    padding: 18px 0;
    font-size: 15px;
    gap: 0.75rem;
  }
  .exam-faq .faq-answer {
    font-size: 15px;
  }
  .related-exams a {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* ── Badges / chips ────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.6;
  border: 1px solid transparent;
}
.badge-blue   { background: rgba(79,142,247,0.13); color: #4f8ef7; border-color: rgba(79,142,247,0.3); }
.badge-green  { background: rgba(46,204,113,0.13); color: #2ecc71; border-color: rgba(46,204,113,0.3); }
.badge-purple { background: rgba(124,90,247,0.13); color: #7c5af7; border-color: rgba(124,90,247,0.3); }
.badge-amber  { background: rgba(245,158,11,0.13); color: #f59e0b; border-color: rgba(245,158,11,0.3); }
.badge-red    { background: rgba(239,68,68,0.13); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.badge-gray   { background: rgba(161,161,170,0.12); color: var(--color-text-muted); border-color: var(--color-border-strong); }
.badge-pro    { background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); color: #fff; }

/* Home-card badges (from DB) keep their color via inline style classes */
.badge-card {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Typography helpers ────────────────────────────────────────────────────── */
.text-muted { color: var(--color-text-muted); }
.text-dim { color: var(--color-text-dim); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 640px;
  margin: 2.5rem auto 0;
}
@media (min-width: 768px) { .stats-bar { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: center; }
.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
}
.stat-label { font-size: 0.75rem; color: var(--color-text-dim); }

/* ── Steps (how it works) ─────────────────────────────────────────────────── */
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* ── FAQ accordion ────────────────────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.1rem 0;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.faq-icon { transition: transform 0.2s; color: var(--color-text-dim); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1.1rem; color: var(--color-text-muted); }
.faq-item.open .faq-answer { display: block; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.5rem;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.75rem; color: var(--color-text-dim); margin-top: 0.25rem; }

/* Auth cards */
.auth-card { max-width: 420px; margin: 3rem auto; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-subtitle { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Alerts / flash ───────────────────────────────────────────────────────── */
.alert {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid;
}
.alert-error,
.alert-danger { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.35); color: var(--color-danger); }
.alert-success { background: rgba(46,204,113,0.1); border-color: rgba(46,204,113,0.35); color: var(--color-success); }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.35); color: var(--color-warning); }
.alert-info { background: rgba(79,142,247,0.1); border-color: rgba(79,142,247,0.35); color: var(--color-accent); }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border-strong);
  color: var(--color-text-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--color-surface); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  margin-top: 6rem;
  background: var(--color-surface);
}
.footer-logo {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-text);
  color: var(--color-bg);
}
.footer-logo svg { width: 1rem; height: 1rem; }
.footer a {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer a:hover { color: var(--color-text); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  color: var(--color-text-dim);
  font-size: 0.75rem;
}

/* ── Page header (interior pages) ─────────────────────────────────────────── */
.page-header { padding: 2.5rem 0 1.5rem; }
.page-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.25rem; }
.page-subtitle { color: var(--color-text-muted); font-size: 0.95rem; }

/* ── Test cards on exam detail / tests pages ─────────────────────────────── */
.test-card { display: flex; flex-direction: column; gap: 0.75rem; }
.test-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
}

/* ── Exam detail — subject/syllabus list ──────────────────────────────────── */
.subject-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-surface);
}
.subject-chip:hover { border-color: var(--color-accent); }

/* ── Test engine ──────────────────────────────────────────────────────────── */
.engine-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .engine-layout { grid-template-columns: 1fr 300px; }
}
.engine-question-area { min-height: 420px; }
.engine-question-text { font-size: 1.125rem; font-weight: 500; margin-bottom: 1.5rem; line-height: 1.7; }

/* Options */
.option-button {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 0.75rem;
}
.option-button:hover { border-color: var(--color-accent); }
.option-button.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-text);
}
.option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.15s;
}
.option-button.selected .option-letter {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Practice reveal states */
.option-button.correct {
  border-color: var(--color-success);
  background: rgba(46, 204, 113, 0.08);
}
.option-button.correct .option-letter {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}
.option-button.wrong {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
}
.option-button.wrong .option-letter {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}
.option-button.dim { opacity: 0.55; }

/* Timer */
.timer-badge {
  font-size: 0.875rem;
  font-weight: 700;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.timer-badge.warning,
.timer-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--color-danger);
  animation: pulse 1s infinite;
}
@keyframes pulse { 50% { opacity: 0.6; } }

/* Question palette */
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.palette-btn {
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.palette-btn:hover { border-color: var(--color-accent); }
.palette-btn.answered { background: rgba(46, 204, 113, 0.25); border-color: var(--color-success); color: var(--color-success); }
.palette-btn.marked { background: rgba(124, 90, 247, 0.3); border-color: var(--color-accent-2); color: var(--color-accent-2); }
.palette-btn.marked-answered { background: rgba(124, 90, 247, 0.5); border-color: var(--color-accent-2); color: #fff; }
.palette-btn.visited { background: rgba(239, 68, 68, 0.25); border-color: var(--color-danger); color: var(--color-danger); }
.palette-btn.current { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* Palette legend */
.legend {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--color-border-strong); }

/* Action buttons: desktop inline bar (mobile uses the sticky bottom bar instead) */
.engine-actions { display: none; gap: 0.5rem; flex-wrap: wrap; margin-top: 2rem; }
@media (min-width: 1024px) {
  .engine-actions { display: flex; }
}
/* Lock page scroll while the full-screen test engine is mounted */
html:has(.engine-shell) { overflow: hidden; height: 100%; }
html:has(.engine-shell) body { overflow: hidden; height: 100%; }

/* ── Engine chrome (full-screen attempt UI) ──────────────────────────────── */
.engine-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}
.engine-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-overlay);
  backdrop-filter: blur(8px);
}
.engine-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .engine-main { flex-direction: row; }
}
.engine-question-col {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 7rem;
}
@media (min-width: 640px) {
  .engine-question-col { padding: 1.5rem 1.5rem 7rem; }
}
@media (min-width: 1024px) {
  .engine-question-col { padding: 1.5rem; }
}
.engine-inner { max-width: 48rem; margin-left: auto; margin-right: auto; }
.engine-qnum { color: var(--color-accent); font-size: 0.875rem; font-weight: 600; }
.engine-marked-tag {
  display: inline-flex;
  margin-top: 0.5rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid rgba(124, 90, 247, 0.4);
  background: rgba(124, 90, 247, 0.13);
  color: #7c5af7;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
}
.engine-marked-tag[hidden] { display: none; }
.engine-palette-side {
  display: none;
  flex-shrink: 0;
  overflow-y: auto;
  border-left: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 1rem;
}
@media (min-width: 1024px) {
  .engine-palette-side { display: block; width: 288px; }
  .engine-palette-side .palette { grid-template-columns: repeat(5, 1fr); }
}
.engine-mobile-bar { border-top: 1px solid var(--color-border); background: var(--color-surface); }
@media (min-width: 1024px) {
  .engine-mobile-bar { display: none; }
}
.engine-mobile-bar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
}
.engine-mobile-count {
  border-radius: 0.25rem;
  background: var(--color-accent-soft);
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
}
.engine-mobile-bar-toggle .chevron { width: 16px; height: 16px; color: var(--color-text-muted); transition: transform 0.2s; flex-shrink: 0; }
.engine-mobile-bar-toggle.open .chevron { transform: rotate(180deg); }
.engine-mobile-palette {
  max-height: 45vh;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--color-border);
}
.engine-mobile-palette[hidden] { display: none; }
.engine-mobile-palette .legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
}
.engine-mobile-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
@media (min-width: 1024px) {
  .engine-mobile-actions { display: none; }
}
.engine-skip-note { display: block; margin-top: 0.25rem; color: var(--color-danger); font-size: 0.875rem; }
.engine-skip-note[hidden] { display: none; }

/* Section dropdown (subject-wise switcher, custom — consistent on all devices) */
.engine-sections {
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.engine-sections-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  user-select: none;
}
.engine-section-dd { position: relative; flex: 1; min-width: 0; max-width: 30rem; }
.engine-section-dd-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5625rem 0.875rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.5rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.engine-section-dd-trigger:hover { border-color: var(--color-accent); }
.engine-section-dd-trigger[aria-expanded="true"],
.engine-section-dd-trigger:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.engine-section-dd-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.engine-section-dd-count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 0.0625rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.engine-section-dd-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-dim);
  transition: transform 0.2s;
}
.engine-section-dd-trigger[aria-expanded="true"] .engine-section-dd-chevron { transform: rotate(180deg); }
.engine-section-dd-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.5rem;
  background: var(--color-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 0.25rem;
}
.engine-section-dd-menu[hidden] { display: none; }
.engine-section-dd-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.engine-section-dd-option:hover { background: var(--color-accent-soft); }
.engine-section-dd-option.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-weight: 600;
}
.engine-section-dd-opt-name { min-width: 0; }
.engine-section-dd-opt-count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-dim);
  background: var(--color-border);
  border-radius: 999px;
  padding: 0.0625rem 0.5rem;
  font-variant-numeric: tabular-nums;
}
.engine-section-dd-option.active .engine-section-dd-opt-count {
  background: var(--color-accent);
  color: #fff;
}

/* Palette section headings */
.palette-section-head {
  grid-column: 1 / -1;
  margin: 0.875rem 0 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.25rem;
}
.palette-section-head:first-child { margin-top: 0; }

/* ── Result page ──────────────────────────────────────────────────────────── */
.result-stat {
  text-align: center;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface);
}
.result-stat-value { font-size: 1.75rem; font-weight: 800; }
.result-stat-label { font-size: 0.75rem; color: var(--color-text-dim); margin-top: 0.25rem; }

/* Solution reveal */
.solution-box {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--color-surface);
  margin-top: 0.75rem;
}

/* ── Plans / pricing ──────────────────────────────────────────────────────── */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}
.plan-card.best-value { border-color: var(--color-accent); }
.plan-price { font-size: 2.25rem; font-weight: 800; }
.plan-price-original { color: var(--color-text-dim); text-decoration: line-through; font-size: 1rem; font-weight: 400; }
.plan-feature { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--color-text-muted); }
.plan-feature svg { flex-shrink: 0; color: var(--color-success); margin-top: 0.2rem; }
.plan-cta { margin-top: auto; }

/* ── Blog ─────────────────────────────────────────────────────────────────── */
.blog-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.blog-post-content { line-height: 1.85; }
.blog-post-content h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; }
.blog-post-content h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.6rem; }
.blog-post-content h4 { font-size: 1.1rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.blog-post-content p { margin-bottom: 1rem; }
.blog-post-content ul, .blog-post-content ol { margin: 0 0 1rem 1.5rem; padding: 0; }
.blog-post-content li { margin-bottom: 0.35rem; }
.blog-post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
  color: var(--color-text-muted);
  margin: 1rem 0;
}
.blog-post-content code {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.85em;
}
.blog-post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.blog-post-content pre code { background: none; border: none; padding: 0; }
.blog-post-content table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; font-size: 0.9rem; }
.blog-post-content th, .blog-post-content td { border: 1px solid var(--color-border); padding: 0.5rem 0.75rem; }
.blog-post-content img { border-radius: 0.5rem; margin: 1rem 0; }
.blog-post-content a { text-decoration: underline; }

/* ── Modal ────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-overlay);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 448px;
  width: 100%;
  box-shadow: var(--card-shadow-lg);
}

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .admin-layout { grid-template-columns: 220px 1fr; } }
.admin-sidebar { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-side-link {
  display: block;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.admin-side-link:hover { background: var(--color-surface); color: var(--color-text); }
.admin-side-link.active { background: var(--color-accent-soft); color: var(--color-accent); }
.admin-tile {
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  padding: 1.25rem;
  background: var(--color-bg);
  display: block;
  color: var(--color-text);
  transition: all 0.15s;
}
.admin-tile:hover { border-color: var(--color-accent); color: var(--color-text); }
.admin-tile-value { font-size: 1.5rem; font-weight: 800; }
.admin-tile-label { font-size: 0.78rem; color: var(--color-text-dim); }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* Question form preview */
.math-preview {
  border: 1px dashed var(--color-border-strong);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--color-surface);
  min-height: 60px;
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--color-border); border: none; margin: 1.5rem 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-7 { margin-top: 1.75rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.py-2 { padding: 0.5rem 0; }
.py-3 { padding: 0.75rem 0; }
.p-4 { padding: 1rem; }
.w-full { width: 100%; }
.rounded { border-radius: 0.5rem; }
.no-underline { text-decoration: none; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  z-index: 200;
  opacity: 0;
  transition: all 0.3s;
  box-shadow: var(--card-shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--color-success); }
.toast.error { border-color: var(--color-danger); }

/* KaTeX sizing */
.katex { font-size: 1.1em; }

/* ═══════════════════════════════════════════════════════════════════════════
   Tailwind utility classes (ported from the Next.js JSX templates)

   The PHP markup was copied verbatim from the Tailwind/React components, so
   it uses these utility classes. They are required for the ported layout to
   render correctly. Ordering matters: utilities come last so they win.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Display ──────────────────────────────────────────────────────────────── */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.object-cover { object-fit: cover; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-all { word-break: break-all; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.place-items-center { place-items: center; }
.shrink-0 { flex-shrink: 0; }
.list-none { list-style: none; }
.list-disc { list-style: disc; }
.whitespace-pre-wrap { white-space: pre-wrap; }

/* ── Flex extras ──────────────────────────────────────────────────────────── */
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-end { justify-content: flex-end; }
.self-start { align-self: flex-start; }
.min-w-0 { min-width: 0; }
.w-fit { width: fit-content; }
.h-fit { height: fit-content; }
.h-full { height: 100%; }

/* ── Grid ─────────────────────────────────────────────────────────────────── */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ── Gap ──────────────────────────────────────────────────────────────────── */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-5 { gap: 1.25rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-px { gap: 1px; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: 0.25rem; }

/* ── Margin ───────────────────────────────────────────────────────────────── */
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-24 { margin-top: 6rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }

/* ── Padding ──────────────────────────────────────────────────────────────── */
.p-0 { padding: 0; }
.p-3 { padding: 0.75rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-7 { padding: 1.75rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-5 { padding-left: 1.25rem; }
.pr-4 { padding-right: 1rem; }

/* ── Stack spacing (space-y-*) ────────────────────────────────────────────── */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }

/* ── Sizing ───────────────────────────────────────────────────────────────── */
.w-1\.5 { width: 0.375rem; }
.w-2 { width: 0.5rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-7 { width: 1.75rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-32 { width: 8rem; }
.w-80 { width: 20rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-2\.5 { height: 0.625rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-7 { height: 1.75rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-none { max-width: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
.text-xl { font-size: 1.25rem; }
.text-7xl { font-size: 4.5rem; }
.text-base { font-size: 1rem; }
.text-\[10px\] { font-size: 10px; }
.text-white { color: #fff; }
.text-right { text-align: right; }
.font-normal { font-weight: 400; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.leading-relaxed { line-height: 1.625; }
.leading-\[1\.05\] { line-height: 1.05; }
.leading-\[1\.1\] { line-height: 1.1; }
.uppercase { text-transform: uppercase; }
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }

/* ── Borders ──────────────────────────────────────────────────────────────── */
.border { border-width: 1px; border-style: solid; border-color: var(--color-border); }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--color-border); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--color-border); }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; border-top-color: var(--color-border); border-bottom-color: var(--color-border); }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-collapse { border-collapse: collapse; }
.divide-x > * + * { border-left: 1px solid var(--color-border); }
.divide-y > * + * { border-top: 1px solid var(--color-border); }
.divide-\[var\(--color-border\)\] > * + * { border-color: var(--color-border); }

/* ── Border colours ───────────────────────────────────────────────────────── */
.border-\[var\(--color-accent\)\] { border-color: var(--color-accent); }
.border-\[var\(--color-border\)\] { border-color: var(--color-border); }
.border-\[var\(--color-border-strong\)\] { border-color: var(--color-border-strong); }
.border-\[var\(--color-success\)\] { border-color: var(--color-success); }
.border-\[rgba\(79\,142\,247\,0\.3\)\] { border-color: rgba(79, 142, 247, 0.3); }
.border-\[rgba\(124\,90\,247\,0\.3\)\] { border-color: rgba(124, 90, 247, 0.3); }
.border-\[rgba\(46\,204\,113\,0\.3\)\] { border-color: rgba(46, 204, 113, 0.3); }
.border-red-500\/50 { border-color: rgba(239, 68, 68, 0.5); }

/* Opacity-modified arbitrary colours */
.border-\[var\(--color-accent\)\]\/40 { border-color: color-mix(in srgb, var(--color-accent) 40%, transparent); }
.border-\[var\(--color-success\)\]\/40 { border-color: color-mix(in srgb, var(--color-success) 40%, transparent); }
.border-\[var\(--color-success\)\]\/50 { border-color: color-mix(in srgb, var(--color-success) 50%, transparent); }

/* ── Background colours ───────────────────────────────────────────────────── */
.bg-\[var\(--color-accent\)\] { background: var(--color-accent); }
.bg-\[var\(--color-accent-soft\)\] { background: var(--color-accent-soft); }
.bg-\[var\(--color-bg\)\] { background: var(--color-bg); }
.bg-\[var\(--color-border\)\] { background: var(--color-border); }
.bg-\[var\(--color-success\)\] { background: var(--color-success); }
.bg-\[var\(--color-surface\)\] { background: var(--color-surface); }
.bg-\[var\(--color-text-dim\)\] { background: var(--color-text-dim); }
.bg-\[rgba\(79\,142\,247\,0\.13\)\] { background: rgba(79, 142, 247, 0.13); }
.bg-\[rgba\(124\,90\,247\,0\.13\)\] { background: rgba(124, 90, 247, 0.13); }
.bg-\[rgba\(46\,204\,113\,0\.13\)\] { background: rgba(46, 204, 113, 0.13); }
.bg-red-500 { background: #ef4444; }
.bg-red-500\/10 { background: rgba(239, 68, 68, 0.1); }
.bg-red-500\/15 { background: rgba(239, 68, 68, 0.15); }
.bg-orange-400 { background: #fb923c; }
.bg-\[var\(--color-success\)\]\/10 { background: color-mix(in srgb, var(--color-success) 10%, transparent); }
.bg-\[var\(--color-success\)\]\/15 { background: color-mix(in srgb, var(--color-success) 15%, transparent); }

/* ── Text colours (arbitrary) ─────────────────────────────────────────────── */
.text-\[var\(--color-accent\)\] { color: var(--color-accent); }
.text-\[var\(--color-text\)\] { color: var(--color-text); }
.text-\[var\(--color-text-dim\)\] { color: var(--color-text-dim); }
.text-\[var\(--color-text-muted\)\] { color: var(--color-text-muted); }
.text-\[var\(--color-success\)\] { color: var(--color-success); }
.text-\[\#4f8ef7\] { color: #4f8ef7; }
.text-\[\#7c5af7\] { color: #7c5af7; }
.text-\[\#2ecc71\] { color: #2ecc71; }
.text-orange-400 { color: #fb923c; }
.text-red-400 { color: #f87171; }

/* ── Rings ────────────────────────────────────────────────────────────────── */
.ring-1 { box-shadow: 0 0 0 1px var(--color-border); }
.ring-\[var\(--color-accent\)\] { box-shadow: 0 0 0 1px var(--color-accent); }

/* ── Radii ────────────────────────────────────────────────────────────────── */
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ── Effects ──────────────────────────────────────────────────────────────── */
.transition { transition: color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s, opacity 0.15s; }
.transition-colors { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
.transition-transform { transition: transform 0.15s; }
.transition-all { transition: all 0.15s; }
.blur-2xl { filter: blur(40px); }
.opacity-30 { opacity: 0.3; }
.opacity-70 { opacity: 0.7; }
.-rotate-90 { transform: rotate(-90deg); }

/* ── Gradients (from-* / via-* / to-* + bg-gradient-to-br) ────────────────── */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--grad-from, transparent), var(--grad-via, transparent) 50%, var(--grad-to, transparent)); }
.from-\[var\(--color-accent\)\] { --grad-from: var(--color-accent); }
.from-\[var\(--color-accent-soft\)\] { --grad-from: var(--color-accent-soft); }
.via-transparent { --grad-via: transparent; }
.to-transparent { --grad-to: transparent; }
.to-\[var\(--color-accent-2\)\] { --grad-to: var(--color-accent-2); }

/* ── Hover states ─────────────────────────────────────────────────────────── */
.hover\:bg-\[var\(--color-surface\)\]:hover { background: var(--color-surface); }
.hover\:border-\[var\(--color-accent\)\]:hover { border-color: var(--color-accent); }
.hover\:text-\[var\(--color-text\)\]:hover { color: var(--color-text); }
.hover\:underline:hover { text-decoration: underline; }

/* ── Group hover / open states ────────────────────────────────────────────── */
.group:hover .group-hover\:text-\[var\(--color-accent\)\] { color: var(--color-accent); }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:translate-x-0\.5 { transform: translateX(0.125rem); }
.group:hover .group-hover\:scale-105.group-hover\:translate-x-0\.5 { transform: translateX(0.125rem) scale(1.05); }
.group[open] .group-open\:rotate-45 { transform: rotate(45deg); }
.group[open] .group-open\:border-\[var\(--color-accent\)\] { border-color: var(--color-accent); }
.group[open] .group-open\:text-\[var\(--color-accent\)\] { color: var(--color-accent); }

/* ── Responsive: sm (≥640px) ──────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .sm\:mt-6 { margin-top: 1.5rem; }
  .sm\:mt-10 { margin-top: 2.5rem; }
  .sm\:h-64 { height: 16rem; }
  .sm\:text-base { font-size: 1rem; }
  .sm\:text-lg { font-size: 1.125rem; }
  .sm\:text-2xl { font-size: 1.5rem; }
  .sm\:text-3xl { font-size: 1.875rem; }
  .sm\:text-4xl { font-size: 2.25rem; }
}

/* ── Responsive: md (≥768px) ──────────────────────────────────────────────── */
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:inline { display: inline; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-end { align-items: flex-end; }
  .md\:justify-between { justify-content: space-between; }
  .md\:self-auto { align-self: auto; }
  .md\:py-28 { padding-top: 7rem; padding-bottom: 7rem; }
  .md\:p-14 { padding: 3.5rem; }
  .md\:text-4xl { font-size: 2.25rem; }
  .md\:text-5xl { font-size: 3rem; }
  .md\:text-6xl { font-size: 3.75rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:grid-cols-\[1fr_auto\] { grid-template-columns: 1fr auto; }
  .md\:grid-cols-\[auto_1fr\] { grid-template-columns: auto 1fr; }
  .md\:border-b-0 { border-bottom-width: 0; }
  .md\:border-r { border-right-width: 1px; border-right-style: solid; border-right-color: var(--color-border); }
}

/* ── Responsive: lg (≥1024px) ─────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-\[1fr_340px\] { grid-template-columns: 1fr 340px; }
  .lg\:h-80 { height: 20rem; }
}

/* ── Important overrides (! prefix) ───────────────────────────────────────── */
.\!px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.\!py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.\!py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.\!py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.\!text-sm { font-size: 0.875rem !important; }
.\!ml-auto { margin-left: auto !important; }
.\!p-4 { padding: 1rem !important; }

/* ── Blog article typography (Parsedown output) ───────────────────────────── */
.blog-content h2 { font-size: 1.25rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.75rem; }
.blog-content h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.blog-content p { color: var(--color-text-muted); line-height: 1.7; margin-bottom: 1rem; }
.blog-content ul { color: var(--color-text-muted); margin-bottom: 1rem; list-style: disc; padding-left: 1.25rem; }
.blog-content ol { color: var(--color-text-muted); margin-bottom: 1rem; list-style: decimal; padding-left: 1.25rem; }
.blog-content li { margin-bottom: 0.375rem; }
.blog-content a { color: var(--color-accent); text-decoration: underline; }
.blog-content blockquote { border-left: 2px solid var(--color-accent); padding-left: 1rem; color: var(--color-text-muted); font-style: italic; margin: 1rem 0; }
.blog-content code { background: var(--color-surface); padding: 0.125rem 0.25rem; border-radius: 0.25rem; font-size: 0.875rem; }
.blog-content pre { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 0.5rem; padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.blog-content pre code { background: transparent; padding: 0; font-size: 0.875rem; }
.blog-content strong { color: var(--color-text); }
.blog-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.875rem; }
.blog-content th, .blog-content td { border: 1px solid var(--color-border); padding: 0.5rem 0.75rem; text-align: left; }
.blog-content th { background: var(--color-surface); font-weight: 600; }
.blog-content img { border-radius: 0.75rem; max-width: 100%; margin: 0.5rem 0; }

/* ── Ported utility classes (match original Tailwind) ─────────────────────── */
.accent-text { color: var(--color-accent); }

.-inset-2 { top: -0.5rem; right: -0.5rem; bottom: -0.5rem; left: -0.5rem; }

/* Auth pages */
.auth-icon {
  display: grid;
  place-items: center;
  margin: 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-text);
  color: var(--color-bg);
}
.auth-icon--rounded { border-radius: 0.75rem; }
.auth-icon svg { width: 1.25rem; height: 1.25rem; }
.auth-container { display: flex; flex-direction: column; align-items: center; padding: 2rem 1rem 3rem; }
.form { display: flex; flex-direction: column; gap: 1rem; }
.input {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: 0.5rem;
  background: var(--color-bg);
  color: var(--color-text);
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.input:focus { outline: none; border-color: var(--color-accent); }

/* Category badge colors (Tailwind arbitrary values used by templates) */
.text-\[\#94a3b8\] { color: #94a3b8; }
.text-\[\#ef4444\] { color: #ef4444; }
.text-\[\#f59e0b\] { color: #f59e0b; }
.bg-\[rgba\(239\,68\,68\,0\.13\)\] { background: rgba(239,68,68,0.13); }
.bg-\[rgba\(148\,163\,184\,0\.13\)\] { background: rgba(148,163,184,0.13); }
.bg-\[rgba\(245\,158\,11\,0\.13\)\] { background: rgba(245,158,11,0.13); }
.border-\[rgba\(239\,68\,68\,0\.3\)\] { border-color: rgba(239,68,68,0.3); }
.border-\[rgba\(148\,163\,184\,0\.3\)\] { border-color: rgba(148,163,184,0.3); }
.border-\[rgba\(245\,158\,11\,0\.3\)\] { border-color: rgba(245,158,11,0.3); }

/* Category dot colors */
.bg-blue-500 { background: #3b82f6; }
.bg-green-500 { background: #22c55e; }
.bg-purple-500 { background: #a855f7; }
.bg-slate-500 { background: #64748b; }
.bg-teal-500 { background: #14b8a6; }
