/* FactBurst public styles migrated from the current website. */


/* ===== styles.css ===== */
:root {
  color-scheme: dark;
  --bg: #060d35;
  --panel: #0b174f;
  --panel-2: #111f68;
  --text: #ffffff;
  --muted: #b9ccef;
  --cyan: #00ccff;
  --green: #46eb73;
  --yellow: #ffd352;
  --purple: #a45cff;
  --pink: #ff5f9a;
  --border: rgba(120, 167, 255, 0.32);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 15%, rgba(164, 92, 255, 0.25), transparent 34rem),
    radial-gradient(circle at 10% 0%, rgba(0, 204, 255, 0.16), transparent 32rem),
    linear-gradient(145deg, #050a2a 0%, #0c1550 52%, #34176c 100%);
}

a { color: inherit; }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  padding: 0 max(18px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 10, 40, 0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--cyan), #4f71ff 60%, var(--purple));
  box-shadow: 0 0 28px rgba(0, 204, 255, 0.25);
}

.top-nav { display: flex; gap: 18px; }
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
}
.top-nav a:hover { color: white; }

.hero {
  min-height: 510px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 42px;
  padding-block: 72px 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.quiz-title,
.results-card h1,
.empty-state h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.96;
}

.hero-text {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.result-actions {
  margin: 30px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  max-width: 980px;
}
.result-actions .button {
  min-width: 150px;
}
.result-actions #report-quiz {
  min-width: 250px;
}
.result-actions .button-primary {
  order: 1;
}
.result-actions #share-score {
  order: 2;
}
.result-actions #watch-video {
  order: 3;
}
.result-actions #play-again {
  order: 4;
}
.result-actions #report-quiz {
  order: 5;
}

.button {
  min-height: 46px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, opacity 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.button-primary {
  color: #03112a;
  background: linear-gradient(135deg, var(--cyan), #7ee6ff);
  box-shadow: 0 12px 32px rgba(0, 204, 255, 0.2);
}
.button-secondary {
  color: white;
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
}

.score-orbit { display: grid; place-items: center; }
.score-ring {
  width: min(320px, 66vw);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0, 204, 255, 0.65);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18, 49, 130, 0.95), rgba(8, 14, 62, 0.92));
  box-shadow: 0 0 0 22px rgba(164, 92, 255, 0.07), 0 0 80px rgba(0, 204, 255, 0.2);
}
.score-ring strong { font-size: clamp(56px, 9vw, 92px); letter-spacing: -0.07em; }
.score-ring span { color: var(--muted); font-weight: 700; }

.section { padding-block: 44px; }
.section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.section-heading h2 { font-size: clamp(30px, 4vw, 46px); }

.filter-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.filter-label select {
  min-width: 180px;
  min-height: 42px;
  padding: 8px 12px;
  color: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0b174f;
}

.quiz-feature,
.quiz-card,
.quiz-stage,
.results-card,
.empty-state {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(14, 30, 93, 0.96), rgba(9, 18, 65, 0.95));
  box-shadow: var(--shadow);
}

.quiz-feature {
  min-height: 220px;
  padding: clamp(24px, 4vw, 42px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  border-radius: 20px;
}
.quiz-feature h3 { margin: 4px 0 10px; font-size: clamp(28px, 4vw, 46px); letter-spacing: -0.035em; }
.quiz-feature p { margin: 0; color: var(--muted); line-height: 1.6; }

.quiz-context-card {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.category-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 211, 82, 0.48);
  border-radius: 999px;
  color: var(--yellow);
  background: rgba(255, 211, 82, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quiz-card {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease;
}
.quiz-card:hover { transform: translateY(-3px); border-color: rgba(0, 204, 255, 0.72); }
.quiz-card h3 { margin: 18px 0 8px; font-size: 22px; letter-spacing: -0.025em; }
.quiz-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.quiz-card .quiz-card-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d8e5ff;
  font-size: 13px;
  font-weight: 750;
}

.loading-card { display: grid; place-items: center; color: var(--muted); }
.empty-state {
  padding: 46px 24px;
  text-align: center;
  border-radius: 18px;
}
.empty-state h3 { margin-top: 0; font-size: 28px; }
.empty-state p { color: var(--muted); }
.hidden { display: none !important; }

.quiz-shell { padding-block: 46px 72px; }
.quiz-stage,
.results-card {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 20px;
}
.quiz-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.quiz-title { margin-top: 16px; font-size: clamp(30px, 5vw, 52px); }
.progress-track {
  height: 8px;
  margin: 22px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 200ms ease;
}
.question-card {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 16px;
  background: rgba(4, 12, 49, 0.56);
}
.question-number { margin: 0 0 10px; color: var(--cyan); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em; }
.question-card h2 { margin: 0; font-size: clamp(23px, 3.3vw, 34px); line-height: 1.25; letter-spacing: -0.025em; }
.answer-list { margin-top: 24px; display: grid; gap: 12px; }
.answer-button {
  width: 100%;
  min-height: 58px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  color: white;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 12px;
  background: rgba(255,255,255,0.055);
  cursor: pointer;
}
.answer-button:hover { border-color: rgba(0,204,255,0.58); }
.answer-button.selected { border-color: var(--cyan); background: rgba(0,204,255,0.14); }
.answer-letter {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  font-weight: 850;
}
.quiz-controls { margin-top: 18px; display: flex; justify-content: flex-end; }

.results-card { text-align: center; }
.result-score {
  margin-top: 8px;
  font-size: clamp(68px, 12vw, 116px);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 1;
  background: linear-gradient(135deg, var(--cyan), white 46%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.results-card h1 { margin-top: 14px; font-size: clamp(32px, 5vw, 50px); }
.result-copy { max-width: 650px; margin: 12px auto 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.result-actions { justify-content: center; }
.result-breakdown {
  margin-top: 28px;
  display: grid;
  gap: 8px;
  text-align: left;
}
.result-row {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
}
.result-row.correct { border-left: 3px solid var(--green); }
.result-row.incorrect { border-left: 3px solid var(--pink); }
.result-row strong { color: white; }
.result-row p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.site-footer { margin-top: 42px; border-top: 1px solid rgba(255,255,255,0.08); background: rgba(2,7,29,0.52); }
.footer-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .score-orbit { order: -1; }
  .score-ring { width: 210px; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-feature { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { min-height: 64px; }
  .top-nav { display: none; }
  .hero { padding-top: 40px; gap: 30px; }
  .hero h1 { font-size: 48px; }
  .score-ring { width: 180px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .filter-label select { width: 100%; }
  .quiz-grid { grid-template-columns: 1fr; }
  .quiz-meta-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .answer-button { grid-template-columns: 32px 1fr; }
  .footer-inner { padding-block: 24px; align-items: flex-start; flex-direction: column; justify-content: center; }
}


/* ===== site-shell.css ===== */
/* Factburst shared site shell: branding, stable header, footer, legal layout and loading states. */

/* Keep the navigation invisible until notification-header has finished normalising it. */
.top-nav { visibility: hidden; }
.top-nav.nav-ready { visibility: visible; }

/* About, FAQ and Contact remain available in the footer, but are intentionally not shown in the top navigation. */
.top-nav a[href="/about.html"],
.top-nav a[href="/about"],
.top-nav a[href="/faq.html"],
.top-nav a[href="/faq"],
.top-nav a[href="/contact.html"],
.top-nav a[href="/contact"] {
  display: none !important;
}

.brand-mark { width: auto; height: 64px; flex: 0 0 auto; padding: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; display: flex; align-items: center; }
.brand-mark img { width: auto; height: 64px; max-width: 180px; display: block; object-fit: contain; border-radius: 0; image-rendering: auto; }

@media (min-width: 841px) {
  .site-header { min-height: 82px; display: grid !important; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
  .site-header > .brand { justify-self: start; }
  .site-header > .top-nav { position: relative; justify-self: center; justify-content: center; }
  .site-header > .account-header-area { justify-self: end; margin-left: 0 !important; }
}

.top-nav a[aria-current="page"] { color: #fff; background: rgba(53, 199, 255, 0.10); border-color: rgba(53, 199, 255, 0.18); }
.professional-footer { margin-top: 56px; border-top: 1px solid rgba(170, 192, 224, 0.14); background: rgba(5, 9, 16, 0.94); }
.professional-footer-grid { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, 0.7fr)); gap: 44px; padding-top: 44px; padding-bottom: 34px; }
.professional-footer-brand-link { display: inline-flex; color: #fff; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -0.025em; }
.professional-footer-brand p { max-width: 360px; margin: 10px 0 0; color: var(--muted, #9ba9bd); }
.professional-footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.professional-footer-links strong { margin-bottom: 3px; color: #fff; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.professional-footer-links a, .footer-link-button { padding: 0; border: 0; background: transparent; color: var(--muted, #9ba9bd); text-decoration: none; font: inherit; cursor: pointer; transition: color 160ms ease; }
.professional-footer-links a:hover, .footer-link-button:hover { color: #fff; }
.professional-footer-bottom { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid rgba(170, 192, 224, 0.10); color: var(--muted, #9ba9bd); font-size: 13px; }
.cookie-consent { position: fixed; left: 50%; bottom: 18px; z-index: 1000; width: min(960px, calc(100% - 28px)); transform: translateX(-50%); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 26px; padding: 22px 24px; border: 1px solid rgba(170, 192, 224, 0.24); border-radius: 18px; background: rgba(9, 15, 26, 0.97); box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48); backdrop-filter: blur(20px); }
.cookie-consent.hidden { display: none; }
.cookie-consent-eyebrow { display: block; margin-bottom: 5px; color: var(--cyan-soft, #73dbff); font-size: 11px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.cookie-consent h2 { margin: 0; color: #fff; font-size: 19px; letter-spacing: -0.02em; }
.cookie-consent p { margin: 7px 0 0; max-width: 680px; color: var(--muted-strong, #c4cedb); font-size: 14px; line-height: 1.55; }
.cookie-consent p a { color: #fff; }
.cookie-consent-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.legal-shell { width: min(860px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 84px; }
.legal-hero { margin-bottom: 34px; padding-bottom: 30px; border-bottom: 1px solid rgba(170, 192, 224, 0.14); }
.legal-hero h1 { margin: 7px 0 12px; font-size: clamp(38px, 6vw, 60px); line-height: 1; letter-spacing: -0.045em; }
.legal-hero p { margin: 0; color: var(--muted-strong, #c4cedb); font-size: 17px; }
.legal-updated { display: inline-block; margin-top: 14px; color: var(--muted, #9ba9bd); font-size: 13px; }
.legal-content { display: grid; gap: 30px; }
.legal-content section { padding: 0; }
.legal-content h2 { margin: 0 0 10px; color: #fff; font-size: 23px; letter-spacing: -0.02em; }
.legal-content h3 { margin: 18px 0 8px; color: #fff; font-size: 17px; }
.legal-content p, .legal-content li { color: var(--muted-strong, #c4cedb); line-height: 1.72; }
.legal-content p { margin: 0 0 12px; }
.legal-content ul { margin: 10px 0 0; padding-left: 22px; }
.legal-content a { color: var(--cyan-soft, #73dbff); }
.legal-content section.legal-callout { padding: 26px 28px; border: 1px solid rgba(53, 199, 255, 0.18); border-radius: 14px; background: rgba(53, 199, 255, 0.05); }
.legal-content section.legal-callout > :last-child { margin-bottom: 0; }
.skeleton-block, .skeleton-line, .skeleton-pill, .skeleton-button { position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.065); }
.skeleton-block::after, .skeleton-line::after, .skeleton-pill::after, .skeleton-button::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); animation: factburst-skeleton 1.35s ease-in-out infinite; }
@keyframes factburst-skeleton { to { transform: translateX(100%); } }
.skeleton-line { height: 14px; border-radius: 999px; }
.skeleton-line-lg { height: 28px; border-radius: 9px; }
.skeleton-line-sm { height: 10px; }
.skeleton-w-30 { width: 30%; }
.skeleton-w-45 { width: 45%; }
.skeleton-w-60 { width: 60%; }
.skeleton-w-75 { width: 75%; }
.skeleton-w-90 { width: 90%; }
.skeleton-pill { width: 82px; height: 25px; border-radius: 999px; }
.skeleton-button { width: 108px; height: 44px; border-radius: 10px; }
.skeleton-stack { display: grid; gap: 12px; width: 100%; }
.skeleton-card { min-height: 190px; display: grid; align-content: start; gap: 14px; pointer-events: none; }
.skeleton-feature-copy { display: grid; gap: 13px; width: min(680px, 100%); }
.skeleton-quiz-stage { display: grid; gap: 14px; }
.skeleton-answer-grid { display: grid; gap: 9px; margin-top: 8px; }
.skeleton-answer { height: 46px; border-radius: 10px; }
.skeleton-profile { display: grid; gap: 18px; }
.skeleton-stat-row { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.skeleton-stat { height: 84px; border-radius: 14px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1080px) and (min-width: 841px) { .notification-slot { width: 44px; } .notification-slot .notification-button-header { width: 44px; padding-inline: 9px; } .notification-slot .notification-button-label { display: none; } }
@media (max-width: 840px) { .brand-mark, .brand-mark img { height: 52px; } .brand-mark img { max-width: 150px; } .site-header { min-height: 72px; } .notification-slot { display: inline-flex; width: 42px; min-width: 42px; height: 38px; } .notification-slot:empty { visibility: hidden; } .notification-slot .notification-button-header { margin: 0 !important; } .notification-slot .notification-button-label { display: none; } .professional-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 24px; padding-top: 34px; } .professional-footer-brand { grid-column: 1 / -1; } .professional-footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding-block: 15px; } .cookie-consent { grid-template-columns: 1fr; gap: 16px; padding: 18px; } .cookie-consent-actions { width: 100%; } .cookie-consent-actions .button { flex: 1; } .legal-shell { width: min(100% - 28px, 860px); padding-top: 42px; } .legal-content section.legal-callout { padding: 22px; } .skeleton-stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 420px) { .site-header { flex-wrap: wrap !important; } .brand-mark, .brand-mark img { height: 46px; } .brand-mark img { max-width: 126px; } .top-nav { order: 3 !important; width: 100% !important; flex: 1 0 100% !important; justify-content: flex-start !important; overflow-x: auto !important; scrollbar-width: none; } .top-nav::-webkit-scrollbar { display: none; } .top-nav a { display: inline-flex !important; flex: 0 0 auto; font-size: 12px !important; padding: 6px 8px !important; } .notification-slot { flex: 0 0 40px; } }
@media (max-width: 460px) { .professional-footer-grid { grid-template-columns: 1fr; } .professional-footer-brand { grid-column: auto; } .cookie-consent { bottom: 10px; width: calc(100% - 20px); border-radius: 15px; } .cookie-consent-actions { flex-direction: column-reverse; } .cookie-consent-actions .button { width: 100%; } .skeleton-stat-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .skeleton-block::after, .skeleton-line::after, .skeleton-pill::after, .skeleton-button::after { animation: none; } }


/* ===== professional-redesign.css ===== */
/* Factburst professional redesign
   Loaded last so the existing application behaviour and component markup stay intact. */

:root {
  color-scheme: dark;
  --bg: #060a12;
  --bg-elevated: #0a101c;
  --panel: #0d1524;
  --panel-2: #111c2f;
  --panel-3: #15223a;
  --text: #f7f9fc;
  --muted: #9ba9bd;
  --muted-strong: #c4cedb;
  --cyan: #35c7ff;
  --cyan-soft: #73dbff;
  --green: #45d483;
  --yellow: #f6c85f;
  --purple: #8c7cff;
  --pink: #f1739a;
  --border: rgba(170, 192, 224, 0.16);
  --border-strong: rgba(170, 192, 224, 0.28);
  --surface: rgba(13, 21, 36, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.035);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.18);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 76% -10%, rgba(53, 199, 255, 0.08), transparent 30rem),
    radial-gradient(circle at -8% 28%, rgba(140, 124, 255, 0.07), transparent 31rem),
    linear-gradient(180deg, #070c15 0%, #060a12 42%, #070b13 100%);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

::selection { background: rgba(53, 199, 255, 0.3); color: #fff; }
a { color: inherit; }
button, select, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(53, 199, 255, 0.35);
  outline-offset: 3px;
}

.shell,
.engagement-shell {
  width: min(1120px, calc(100% - 48px));
  max-width: 1120px;
  margin-inline: auto;
}

/* Header and navigation */
.site-header {
  min-height: 70px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(170, 192, 224, 0.12);
  background: rgba(6, 10, 18, 0.82);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 8px 26px rgba(0,0,0,0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  padding: 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(53,199,255,0.15), rgba(140,124,255,0.12));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.top-nav a {
  padding: 8px 11px;
  border-radius: 9px;
  color: var(--muted-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: color 140ms ease, background 140ms ease;
}

.top-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,0.055);
}

.account-header-area {
  margin-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.account-welcome { color: var(--muted); font-size: 14px; font-weight: 650; }
.account-welcome a { color: #fff; text-decoration: none; font-weight: 800; }
.account-welcome a:hover { color: var(--cyan-soft); text-decoration: none; }

.account-trigger,
.notification-button.notification-button-header {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #eaf1fb;
  background: rgba(255,255,255,0.035);
  box-shadow: none;
  font-weight: 750;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.account-trigger:hover,
.account-trigger.signed-in,
.notification-button.notification-button-header:hover {
  border-color: rgba(53,199,255,0.32);
  color: #fff;
  background: rgba(53,199,255,0.07);
}

/* Typography and shared section rhythm */
.eyebrow {
  margin: 0 0 7px;
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.quiz-title,
.results-card h1,
.empty-state h1,
.profile-hero h1 {
  color: #fff;
  letter-spacing: -0.045em;
}

.section { padding-block: 40px; }
.section + .section { border-top: 1px solid rgba(170, 192, 224, 0.07); }

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.05;
}

.hero-text,
.profile-help,
.account-copy,
.comment-login-note,
.challenge-picker-copy {
  color: var(--muted);
}

/* Homepage hero */
.hero {
  min-height: 470px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  align-items: center;
  gap: clamp(42px, 7vw, 88px);
  padding-block: 78px 58px;
}

.hero-copy { max-width: 710px; }

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(46px, 6.4vw, 76px);
  line-height: 0.99;
  text-wrap: balance;
  background: linear-gradient(105deg, #fff 12%, #dce9f7 60%, #86ddff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-text {
  max-width: 650px;
  margin: 22px 0 0;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.65;
}

.hero-actions,
.result-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.score-orbit { display: grid; place-items: center; }

.score-ring {
  position: relative;
  width: min(280px, 60vw);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116, 218, 255, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(53,199,255,0.12), transparent 48%),
    linear-gradient(145deg, rgba(17, 28, 47, 0.92), rgba(8, 14, 25, 0.96));
  box-shadow: inset 0 0 0 11px rgba(255,255,255,0.018), 0 30px 75px rgba(0,0,0,0.32);
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(140,124,255,0.13);
  border-radius: 50%;
}

.score-ring strong {
  font-size: clamp(54px, 8vw, 78px);
  line-height: 1;
  letter-spacing: -0.075em;
}

.score-ring span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* Buttons and form controls */
.button {
  min-height: 44px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease, opacity 140ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }

.button-primary {
  color: #04121c;
  border-color: rgba(112, 221, 255, 0.5);
  background: linear-gradient(135deg, #6bddff, #34c4f7);
  box-shadow: 0 8px 22px rgba(53,199,255,0.16);
}
.button-primary:hover { box-shadow: 0 10px 28px rgba(53,199,255,0.24); }

.button-secondary {
  color: #edf4fc;
  border-color: var(--border);
  background: rgba(255,255,255,0.035);
}
.button-secondary:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.06); }

.filter-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-label select,
.friend-add-form input,
.friend-challenge-picker select,
.email-change-form input,
.account-form input,
.comment-form textarea {
  color: #fff;
  border: 1px solid var(--border);
  background: #0a111e;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
}

.filter-label select {
  min-width: 190px;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border-radius: 10px;
}

.filter-label select:focus,
.friend-add-form input:focus,
.friend-challenge-picker select:focus,
.email-change-form input:focus,
.account-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(53,199,255,0.58);
  box-shadow: 0 0 0 3px rgba(53,199,255,0.09);
}

/* Shared cards */
.quiz-feature,
.quiz-card,
.quiz-stage,
.results-card,
.empty-state,
.leaderboard-card,
.comments-card,
.engagement-card,
.profile-hero,
.profile-panel,
.challenge-picker,
.account-dialog {
  border-color: var(--border);
  background: linear-gradient(145deg, rgba(16, 26, 44, 0.96), rgba(10, 16, 28, 0.98));
  box-shadow: var(--shadow-soft);
}

.category-pill,
.engagement-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(53,199,255,0.2);
  border-radius: 999px;
  color: #9ee7ff;
  background: rgba(53,199,255,0.055);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.quiz-feature {
  min-height: 200px;
  padding: clamp(24px, 4vw, 38px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.quiz-feature::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--cyan), var(--purple));
}

.quiz-feature h3 {
  margin: 12px 0 9px;
  color: #fff;
  font-size: clamp(27px, 3.5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.quiz-feature p { max-width: 700px; margin: 0; color: var(--muted); line-height: 1.6; }

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quiz-card {
  min-height: 205px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.quiz-card:hover {
  transform: translateY(-3px);
  border-color: rgba(53,199,255,0.3);
  background: linear-gradient(145deg, rgba(19, 31, 52, 0.98), rgba(11, 18, 31, 0.99));
  box-shadow: 0 14px 38px rgba(0,0,0,0.2);
}

.quiz-card h3 {
  margin: 15px 0 7px;
  color: #fff;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.quiz-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.quiz-card .quiz-card-footer {
  margin-top: auto;
  padding-top: 17px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}
.quiz-card .quiz-card-footer span:last-child { color: #b9ebfb; }

.loading-card { display: grid; place-items: center; color: var(--muted); }

.empty-state {
  padding: 44px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
}
.empty-state h3 { margin-top: 0; font-size: 26px; }
.empty-state p { color: var(--muted); }
.hidden { display: none !important; }

/* Account summary and leaderboards */
#account-summary {
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 34, 0.86);
  box-shadow: none;
}

.account-stat {
  min-width: 0;
  padding: 18px 20px;
  border: 0;
  border-right: 1px solid rgba(170, 192, 224, 0.1);
  border-radius: 0;
  background: transparent;
}
.account-stat:last-of-type { border-right: 0; }
.account-stat strong { color: #fff; font-size: 24px; letter-spacing: -0.035em; }
.account-stat span { margin-top: 4px; color: var(--muted); font-size: 12px; }
#account-summary > p { grid-column: 1 / -1; margin: 0; padding: 18px 20px; color: var(--muted); }
#account-summary > .button,
#account-summary > .account-summary-profile { margin: 0 20px 20px; grid-column: 1 / -1; justify-self: start; }

.leaderboard-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.leaderboard-row {
  min-height: 50px;
  padding: 10px 17px;
  border-top: 1px solid rgba(170,192,224,0.085);
}
.leaderboard-header { color: #8291a6; background: rgba(255,255,255,0.025); }
.leaderboard-row.current-user { background: rgba(53,199,255,0.055); box-shadow: inset 2px 0 0 rgba(53,199,255,0.7); }
.leaderboard-cell.rank { color: var(--yellow); }
.leaderboard-message { color: var(--muted); }

/* Quiz player: intentionally compact so a question remains visible without excessive scrolling. */
.quiz-page-grid { background: transparent; }
.quiz-shell { padding-block: 24px 50px; }

.quiz-stage,
.results-card {
  max-width: 700px;
  margin-inline: auto;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.quiz-meta-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.quiz-title {
  margin-top: 11px;
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.12;
}

.progress-track {
  height: 5px;
  margin: 13px 0 17px;
  background: rgba(255,255,255,0.07);
}
.progress-bar { background: linear-gradient(90deg, #3fcaff, #8c7cff); box-shadow: 0 0 12px rgba(53,199,255,0.22); }

.question-card {
  padding: 18px;
  border: 1px solid rgba(170,192,224,0.12);
  border-radius: var(--radius-md);
  background: rgba(5, 10, 18, 0.42);
}

.question-number {
  margin: 0 0 8px;
  color: #78ddff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.question-card h2 {
  margin: 0;
  color: #f9fbff;
  font-size: clamp(20px, 2.25vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.answer-list { margin-top: 15px; display: grid; gap: 8px; }

.answer-button {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  color: #edf3fb;
  text-align: left;
  border: 1px solid rgba(170,192,224,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}
.answer-button:hover { transform: translateY(-1px); border-color: rgba(53,199,255,0.32); background: rgba(53,199,255,0.035); }
.answer-button.selected { border-color: rgba(53,199,255,0.66); background: rgba(53,199,255,0.105); box-shadow: inset 0 0 0 1px rgba(53,199,255,0.08); }

.answer-letter {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #dfe9f6;
  background: rgba(255,255,255,0.065);
  font-size: 12px;
  font-weight: 850;
}
.answer-button.selected .answer-letter { color: #06121b; background: #72dfff; }

.quiz-controls { margin-top: 12px; display: flex; justify-content: flex-end; }

.question-visual {
  min-height: 125px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(170,192,224,0.2);
  border-radius: 12px;
  background: #f7f9fc;
  box-shadow: inset 0 0 0 1px rgba(8,17,29,0.03);
}
.question-visual img { max-width: min(100%, 220px); max-height: 120px; }

.logo-quiz.quiz-stage { max-width: 620px; padding: 18px; }
.logo-quiz .question-card { padding: 14px; }
.logo-quiz .question-visual { min-height: 98px; margin-bottom: 10px; padding: 7px; }
.logo-quiz .question-visual img { max-width: min(100%, 165px); max-height: 86px; }
.logo-quiz .answer-list { margin-top: 12px; gap: 7px; }

/* Results */
.results-card { text-align: center; }
.result-score {
  margin-top: 7px;
  font-size: clamp(62px, 10vw, 94px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1;
  background: linear-gradient(120deg, #79ddff, #ffffff 55%, #f6c85f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.results-card h1 { margin-top: 13px; font-size: clamp(30px, 4.2vw, 42px); }
.result-copy { max-width: 610px; margin: 10px auto 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.result-actions { justify-content: center; }
.result-breakdown { margin-top: 24px; gap: 7px; }
.result-row { padding: 11px 13px; border-radius: 9px; background: rgba(255,255,255,0.025); }
.result-row.correct { border-left: 2px solid var(--green); }
.result-row.incorrect { border-left: 2px solid var(--pink); }
.result-row p { color: var(--muted); }
.result-account-note { border-color: rgba(53,199,255,0.16); background: rgba(53,199,255,0.04); }

.quiz-leaderboard-section,
.quiz-comments-section { max-width: 700px; margin: 28px auto 42px; }
.quiz-leaderboard-section .section-heading h2,
.quiz-comments-section .section-heading h2 { font-size: 25px; }

/* Leaderboard page */
.leaderboard-page {
  padding-top: 10px;
}
.leaderboard-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.leaderboard-page-header h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}
.leaderboard-page-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.leaderboard-quiz-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 0 18px;
}
.leaderboard-quiz-picker label {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}
.leaderboard-quiz-picker select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
}
.leaderboard-page-card {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(14, 30, 60, 0.9), rgba(8, 16, 32, 0.96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}
.leaderboard-page-list {
  display: grid;
  gap: 6px;
}
.leaderboard-page-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(20, 34, 56, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}
.leaderboard-page-row:hover {
  background: rgba(28, 46, 74, 0.68);
}
.leaderboard-page-row-top {
  min-height: 62px;
  background: rgba(32, 52, 82, 0.72);
}
.leaderboard-page-rank {
  color: var(--muted);
  font-weight: 800;
  font-size: 15px;
}
.leaderboard-page-row-top .leaderboard-page-rank {
  font-size: 22px;
}
.leaderboard-page-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-page-score {
  font-weight: 800;
  white-space: nowrap;
}
.leaderboard-page-score small {
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 640px) {
  .leaderboard-page-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .leaderboard-page-header .button {
    width: 100%;
  }
  .leaderboard-quiz-picker {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .leaderboard-quiz-picker select {
    width: 100%;
  }
  .leaderboard-page-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .leaderboard-page-score {
    grid-column: 2;
  }
}

/* Quiz leaderboard */
.quiz-leaderboard {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 34, 0.72);
}
.quiz-leaderboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.quiz-leaderboard-heading h2 {
  margin: 0;
  font-size: 22px;
}
.quiz-leaderboard-heading .eyebrow {
  margin: 0 0 5px;
}
.quiz-leaderboard-heading > span {
  color: var(--muted);
  font-size: 13px;
}
.quiz-leaderboard-list {
  display: grid;
  gap: 6px;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(20, 34, 56, 0.55);
}
.leaderboard-rank {
  color: var(--muted);
  font-weight: 800;
}
.leaderboard-score {
  color: var(--muted-strong);
  font-weight: 700;
}
.leaderboard-empty {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 640px) {
  .quiz-leaderboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .leaderboard-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .leaderboard-score {
    grid-column: 2;
  }
}

/* SEO question list */
.quiz-seo-content {
  max-width: 700px;
  margin: 24px auto 40px;
}
.quiz-seo-content details {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(14, 30, 60, 0.92), rgba(9, 18, 38, 0.96));
  box-shadow: var(--shadow);
}
.quiz-seo-content summary {
  position: relative;
  padding: 15px 20px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  list-style-position: inside;
  user-select: none;
}
.quiz-seo-content summary::marker {
  color: var(--muted);
}
.quiz-seo-content details[open] summary {
  border-bottom: 1px solid var(--border);
}
.quiz-seo-content ol {
  margin: 0;
  padding: 18px 24px 20px 48px;
}
.quiz-seo-content li {
  padding: 8px 0 8px 4px;
  color: #dce5f2;
  line-height: 1.55;
}
.quiz-seo-content li + li {
  border-top: 1px solid rgba(170,192,224,0.07);
}
@media (max-width: 640px) {
  .quiz-seo-content {
    margin-inline: 0;
  }
  .quiz-seo-content ol {
    padding-left: 40px;
    padding-right: 18px;
  }
}

/* Comments */
.quiz-comments-section .section-heading {
  display: block;
  margin-bottom: 16px;
}
.quiz-comments-section .section-heading .eyebrow {
  margin-bottom: 6px;
}
.quiz-comments-section .section-heading h2 {
  margin: 0;
  line-height: 1.15;
}
.quiz-comments-section .section-heading > p:last-child {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.comments-card {
  border-radius: var(--radius-lg);
  box-shadow: none;
  padding: 0;
}
.comments-empty {
  margin: 0;
  padding: 22px 20px;
  text-align: center;
  color: var(--muted);
}
.comment-form-card {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(12, 20, 34, 0.72);
}
#quiz-comment-composer { padding: 18px; border-bottom-color: rgba(170,192,224,0.09); }
.comment-form label { color: var(--muted-strong); font-size: 13px; }
.comment-form textarea { min-height: 96px; padding: 11px 13px; border-radius: 10px; }
.quiz-comment-form {
  display: grid;
  gap: 14px;
}
.quiz-comment-form label {
  display: grid;
  gap: 7px;
}
.quiz-comment-form textarea {
  width: 100%;
  box-sizing: border-box;
}
.quiz-comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.quiz-comment-form-row small {
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .quiz-comments-section .section-heading > p:last-child {
    max-width: none;
  }
  .quiz-comment-form-row {
    align-items: stretch;
    flex-direction: column;
  }
  .quiz-comment-form-row .button {
    width: 100%;
  }
}
.comment-thread { border-top-color: rgba(170,192,224,0.08); }
.comment-card { padding: 17px 18px; }
.comment-card p { color: #d5dfec; }
.comment-meta span { color: #7f8fa5; }
.comment-replies { background: rgba(0,0,0,0.12); border-left-color: rgba(53,199,255,0.18); }
.comment-action { border-color: rgba(170,192,224,0.16); color: #aab8ca; background: rgba(255,255,255,0.02); }
.comment-action:hover { border-color: rgba(53,199,255,0.32); color: #fff; }

/* Account modal */
.account-backdrop,
.challenge-picker-overlay {
  background: rgba(3, 6, 11, 0.78);
  backdrop-filter: blur(14px);
}

.account-dialog {
  width: min(500px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  padding: 28px;
  border-radius: var(--radius-xl);
}
.account-dialog h2 { font-size: clamp(28px, 5vw, 39px); }
.account-close,
.challenge-picker-close {
  border: 1px solid rgba(170,192,224,0.12);
  color: #fff;
  background: rgba(255,255,255,0.035);
}
.account-close:hover,
.challenge-picker-close:hover { background: rgba(255,255,255,0.07); }

.account-tabs { border-color: rgba(170,192,224,0.1); background: rgba(255,255,255,0.025); }
.account-tab { color: var(--muted); }
.account-tab.active { color: #04121c; background: #67d9ff; }
.account-form label { color: var(--muted-strong); }
.account-fine-print { color: #7f8fa5; }

/* Personal dashboard and engagement */
#personal-dashboard {
  width: min(1120px, calc(100% - 48px));
  max-width: 1120px;
  padding-block: 32px 22px;
}

#personal-dashboard > .engagement-grid,
.profile-stat-grid,
#profile-engagement .engagement-grid {
  border-color: var(--border);
  background: rgba(12,20,34,0.76);
}

.engagement-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(12,20,34,0.8);
  box-shadow: none;
}
.engagement-card h3 { color: #fff; }
.engagement-card p,
.engagement-row small { color: var(--muted); }
.engagement-card .big { color: #fff; letter-spacing: -0.04em; }
.achievement-card { border-color: rgba(170,192,224,0.1); background: rgba(255,255,255,0.025); }
.category-progress { background: rgba(255,255,255,0.06); }
.category-progress span { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.rank-table th { color: #8291a6; }
.rank-table td { color: #dce5f0; }

#personal-dashboard > .engagement-grid > .engagement-card,
#personal-dashboard > .engagement-mini-grid > .engagement-card,
#personal-dashboard > .engagement-card {
  background: transparent;
  box-shadow: none;
}

#personal-dashboard > .engagement-mini-grid > .engagement-card {
  border-color: var(--border);
  background: rgba(12,20,34,0.72);
}

/* Notifications */
.notification-button:not(.notification-button-header) {
  width: 46px;
  min-width: 46px;
  height: 46px;
  border: 1px solid rgba(53,199,255,0.28);
  background: #48cffd;
  color: #06111b;
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}
.notification-panel {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: #0b1321;
  box-shadow: 0 24px 65px rgba(0,0,0,0.44);
}
.notification-item:hover { background: rgba(255,255,255,0.04); }
.notification-item span { color: var(--muted); }
.notification-item.unread { border-left-color: var(--cyan); }

/* Challenge UI */
.challenge-banner {
  border-color: rgba(53,199,255,0.23);
  border-radius: var(--radius-md);
  background: rgba(53,199,255,0.055);
}
.challenge-kicker { color: #7cdfff; }
.challenge-notice { border-color: var(--border); background: rgba(255,255,255,0.025); }
.challenge-picker { width: min(600px, 100%); border-radius: var(--radius-xl); }
.challenge-friend { border-color: var(--border); background: rgba(255,255,255,0.025); }
.challenge-friend:hover,
.challenge-friend:focus-visible { border-color: rgba(53,199,255,0.35); background: rgba(53,199,255,0.05); }
.challenge-friend span,
.challenge-empty,
.challenge-picker-status { color: var(--muted); }

/* Profile */
.profile-shell {
  width: min(1120px, calc(100% - 48px));
  padding-top: 24px;
  padding-bottom: 48px;
}

#profile-content { gap: 18px; }

.profile-hero {
  min-height: 0;
  padding: 20px 24px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}
.profile-hero h1 { margin: 2px 0 4px; font-size: clamp(32px, 4vw, 46px); }
.profile-verified { color: var(--green); font-size: 14px; }
.profile-actions { gap: 9px; }

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.profile-stat {
  min-height: 76px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid rgba(170,192,224,0.1);
  background: transparent;
}
.profile-stat span,
.profile-history-metrics span { color: #8898ae; font-size: 11px; }
.profile-stat strong { margin-top: 3px; color: #fff; font-size: 21px; }

.profile-panel,
.profile-engagement-panel {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.profile-friends-panel,
.profile-history-panel,
#friends-leaderboard-panel,
#live-match-panel,
#email-change-panel { background: rgba(12,20,34,0.78); }

.friend-request-grid > section,
.friend-card,
.profile-history-card {
  border-color: rgba(170,192,224,0.11);
  background: rgba(255,255,255,0.025);
}

.friend-card { border-radius: 12px; }
.friend-identity span { color: var(--muted); }
.friend-challenge-picker { border-top-color: rgba(170,192,224,0.1); color: var(--muted); }
.friend-empty,
.profile-history-empty { border-color: rgba(170,192,224,0.18); color: var(--muted); }
.profile-history-main p { color: var(--muted); }

#email-change-panel { background: rgba(9,15,26,0.7); }

/* Footer */
.site-footer {
  margin-top: 36px;
  border-top: 1px solid rgba(170,192,224,0.09);
  background: rgba(4,7,12,0.55);
}
.footer-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #7f8da0;
  font-size: 12px;
}
.footer-inner span:first-child { color: #cdd7e4; font-weight: 750; }

/* Responsive */
@media (max-width: 960px) {
  .shell,
  .engagement-shell,
  #personal-dashboard,
  .profile-shell { width: min(100% - 36px, 1120px); }

  .hero { grid-template-columns: 1fr minmax(220px, 0.55fr); gap: 34px; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stat { border-bottom: 1px solid rgba(170,192,224,0.1); }
  .profile-stat:nth-child(2n) { border-right: 0; }
}

@media (max-width: 840px) {
  .site-header {
    min-height: 64px;
    padding: 9px 18px;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .brand { font-size: 17px; }
  .brand-mark { width: 35px; height: 35px; }
  .top-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a { white-space: nowrap; padding: 7px 9px; font-size: 13px; }
  .account-header-area { margin-left: auto; }
  .hero { min-height: auto; padding-block: 60px 46px; }
}

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 48px; }
  .hero-copy { text-align: center; }
  .hero h1 { margin-inline: auto; font-size: clamp(42px, 12vw, 60px); }
  .hero-text { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .score-orbit { order: -1; }
  .score-ring { width: 178px; }
  .score-ring strong { font-size: 52px; }
  .quiz-feature { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .filter-label select { width: 100%; }
  .profile-hero { align-items: stretch; flex-direction: column; padding: 22px; }
  .profile-panel,
  .profile-engagement-panel { padding: 21px; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .shell,
  .engagement-shell,
  #personal-dashboard,
  .profile-shell { width: min(100% - 24px, 1120px); }

  .site-header { padding-inline: 12px; }
  .brand > span:last-child { font-size: 16px; }
  .account-welcome { display: none; }
  .notification-button.notification-button-header { padding: 8px 10px; }

  .top-nav { display: flex; }
  .hero { padding-block: 38px 34px; }
  .section { padding-block: 32px; }
  .section-heading h2 { font-size: 29px; }
  .quiz-grid { grid-template-columns: 1fr; }
  .quiz-card { min-height: 184px; }

  #account-summary { grid-template-columns: 1fr; }
  .account-stat { border-right: 0; border-bottom: 1px solid rgba(170,192,224,0.1); }
  .account-stat:last-of-type { border-bottom: 0; }

  .quiz-shell { padding-block: 14px 36px; }
  .quiz-stage,
  .results-card { padding: 15px; border-radius: 15px; }
  .quiz-title { font-size: 24px; }
  .question-card { padding: 14px; }
  .question-card h2 { font-size: 20px; }
  .answer-list { margin-top: 12px; gap: 7px; }
  .answer-button { min-height: 44px; padding: 8px 10px; }
  .quiz-controls .button { width: 100%; }
  .question-visual { min-height: 112px; padding: 9px; }
  .question-visual img { max-width: min(100%, 190px); max-height: 105px; }

  .leaderboard-row { font-size: 13px; }
  .quiz-comments-section,
  .quiz-leaderboard-section { margin-top: 22px; }

  .profile-shell { padding-top: 18px; }
  #profile-content { gap: 12px; }
  .profile-stat-grid { grid-template-columns: 1fr 1fr; }
  .profile-stat { min-height: 88px; padding: 14px; }
  .profile-stat strong { font-size: 21px; }
  .friend-card,
  .friend-add-form,
  .friend-challenge-picker { grid-template-columns: 1fr; }
  .profile-history-metrics { grid-template-columns: 1fr 1fr; }

  .footer-inner { min-height: 74px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 4px; }
}

@media (max-width: 420px) {
  .brand > span:last-child { display: none; }
  .site-header { flex-wrap: nowrap; }
  .top-nav { order: initial; width: auto; flex: 1; justify-content: flex-end; }
  .top-nav a { display: none; }
  .account-header-area { margin-left: 0; }
  .hero h1 { font-size: 42px; }
  .hero-text { font-size: 16px; }
  .score-ring { width: 155px; }
  .score-ring strong { font-size: 46px; }
  .profile-stat-grid { grid-template-columns: 1fr; }
  .profile-stat { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ===== page-split.css ===== */
/* Focused page layouts for the multi-page Factburst site. */

body[data-layout="landing"] #personal-dashboard,
body[data-layout="directory"] #personal-dashboard {
  display: none !important;
}

.page-intro {
  padding: 72px 0 26px;
}

.page-intro-copy {
  max-width: 760px;
}

.page-intro h1 {
  margin: 8px 0 14px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.page-intro .hero-text {
  max-width: 680px;
}

body[data-layout="landing"] .hero {
  padding-bottom: 42px;
}

body[data-layout="landing"] #latest,
body[data-layout="landing"] #more-quizzes {
  padding-top: 34px;
  padding-bottom: 34px;
}

.home-more-actions,
.page-section-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.directory-main,
.leaderboard-main {
  min-height: calc(100vh - 150px);
}

.directory-main .section:first-of-type,
.leaderboard-main .section:first-of-type {
  padding-top: 28px;
}

.leaderboard-intro-note {
  max-width: 760px;
  margin-bottom: 24px;
}

body[data-layout="leaderboard"] .leaderboard-card {
  max-width: 920px;
}

@media (max-width: 700px) {
  .page-intro {
    padding: 46px 0 18px;
  }

  .page-intro h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  body[data-layout="landing"] .hero {
    padding-bottom: 24px;
  }
}


/* ===== visual-polish.css ===== */
/* Factburst visual polish: mobile navigation, category identity, profile hierarchy and leaderboards. */

/* Quiz library cards get a restrained category identity without changing their structure. */
.quiz-card[data-category-key],
.quiz-feature[data-category-key] {
  --category-rgb: 53, 199, 255;
  --category-accent: rgb(var(--category-rgb));
}

[data-category-key="science"] { --category-rgb: 69, 212, 131; }
[data-category-key="history"] { --category-rgb: 246, 200, 95; }
[data-category-key="geography"] { --category-rgb: 92, 193, 170; }
[data-category-key="space"] { --category-rgb: 140, 124, 255; }
[data-category-key="nature-animals"] { --category-rgb: 111, 205, 120; }
[data-category-key="technology"] { --category-rgb: 53, 199, 255; }
[data-category-key="arts-literature"] { --category-rgb: 193, 135, 255; }
[data-category-key="music"] { --category-rgb: 241, 115, 154; }
[data-category-key="film"] { --category-rgb: 255, 145, 95; }
[data-category-key="logos"] { --category-rgb: 103, 218, 255; }
[data-category-key="sports"] { --category-rgb: 93, 218, 158; }
[data-category-key="entertainment"] { --category-rgb: 238, 130, 211; }
[data-category-key="mathematics"] { --category-rgb: 111, 166, 255; }
[data-category-key="general-knowledge"] { --category-rgb: 118, 221, 255; }

.quiz-card[data-category-key] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.quiz-card[data-category-key]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(var(--category-rgb), 1), rgba(var(--category-rgb), .25));
  opacity: .9;
}

.quiz-card[data-category-key]::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -90px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--category-rgb), .075), transparent 68%);
  pointer-events: none;
}

.quiz-card[data-category-key] .category-pill,
.quiz-feature[data-category-key] .category-pill {
  border-color: rgba(var(--category-rgb), .28);
  color: rgba(var(--category-rgb), 1);
  background: rgba(var(--category-rgb), .07);
}

.quiz-card[data-category-key] .category-pill::before,
.quiz-feature[data-category-key] .category-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(var(--category-rgb), 1);
  box-shadow: 0 0 10px rgba(var(--category-rgb), .42);
}

.quiz-feature[data-category-key]::before {
  background: linear-gradient(180deg, rgba(var(--category-rgb), 1), rgba(var(--category-rgb), .35));
}

.quiz-card[data-category-key] .quiz-card-footer span:last-child {
  color: rgba(var(--category-rgb), .92);
}

@media (hover: hover) {
  .quiz-card[data-category-key]:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--category-rgb), .4);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .22), 0 0 0 1px rgba(var(--category-rgb), .035);
  }

  .profile-stat:hover,
  .friend-card:hover,
  .profile-history-card:hover {
    background-color: rgba(255, 255, 255, .04);
    border-color: rgba(170, 192, 224, .2);
  }
}

.quiz-card:focus-visible {
  border-color: rgba(var(--category-rgb, 53, 199, 255), .55);
  box-shadow: 0 0 0 3px rgba(var(--category-rgb, 53, 199, 255), .11);
}

/* Profile: clearer identity and stat hierarchy. */
.profile-hero {
  position: relative;
  overflow: hidden;
}

.profile-hero::after {
  content: "";
  position: absolute;
  top: -110px;
  left: -70px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53, 199, 255, .085), transparent 70%);
  pointer-events: none;
}

.profile-identity {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-identity-copy { min-width: 0; }

.profile-avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(113, 221, 255, .34);
  border-radius: 21px;
  color: #f8fcff;
  background:
    radial-gradient(circle at 32% 24%, rgba(115, 219, 255, .32), transparent 35%),
    linear-gradient(145deg, rgba(53, 199, 255, .18), rgba(140, 124, 255, .18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 32px rgba(0,0,0,.24);
  font-size: 29px;
  font-weight: 900;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.profile-verified {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(69, 212, 131, .18);
  border-radius: 999px;
  background: rgba(69, 212, 131, .055);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.profile-stat {
  position: relative;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.profile-stat:first-child {
  background: linear-gradient(145deg, rgba(246, 200, 95, .065), transparent 70%);
}

.profile-stat:first-child strong { color: #f6d477; }
.profile-stat:last-child strong { color: #78ddff; }

.profile-stat:first-child::after,
.profile-stat:last-child::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: .35;
}

.friend-card,
.profile-history-card,
#profile-engagement .achievement-card {
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

#profile-engagement .achievement-card {
  border-radius: 12px;
}

#profile-engagement .achievement-card strong {
  color: #f8fbff;
}

.category-progress span {
  transition: width 420ms cubic-bezier(.2,.7,.2,1);
}

/* Leaderboards: podium emphasis, stronger current-user state, and useful mobile rows. */
.leaderboard-row:not(.leaderboard-header) {
  position: relative;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.leaderboard-row:not(.leaderboard-header) .leaderboard-cell.score {
  color: #f5f8fc;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.leaderboard-table > .leaderboard-row:nth-child(2) {
  background: linear-gradient(90deg, rgba(246, 200, 95, .095), transparent 72%);
}
.leaderboard-table > .leaderboard-row:nth-child(3) {
  background: linear-gradient(90deg, rgba(199, 210, 224, .075), transparent 72%);
}
.leaderboard-table > .leaderboard-row:nth-child(4) {
  background: linear-gradient(90deg, rgba(204, 143, 92, .075), transparent 72%);
}

.leaderboard-table > .leaderboard-row:nth-child(2) .leaderboard-cell.rank,
.leaderboard-table > .leaderboard-row:nth-child(3) .leaderboard-cell.rank,
.leaderboard-table > .leaderboard-row:nth-child(4) .leaderboard-cell.rank {
  width: fit-content;
  min-width: 40px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
}
.leaderboard-table > .leaderboard-row:nth-child(2) .leaderboard-cell.rank { color: #f6d477; background: rgba(246, 200, 95, .075); }
.leaderboard-table > .leaderboard-row:nth-child(3) .leaderboard-cell.rank { color: #d2dae5; background: rgba(210, 218, 229, .055); }
.leaderboard-table > .leaderboard-row:nth-child(4) .leaderboard-cell.rank { color: #dca172; background: rgba(220, 161, 114, .055); }

.leaderboard-cell.player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaderboard-row.current-user .leaderboard-cell.player::after {
  content: "You";
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(53, 199, 255, .22);
  border-radius: 999px;
  color: #9ee7ff;
  background: rgba(53, 199, 255, .075);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .02em;
}

.leaderboard-row.current-user {
  background: rgba(53, 199, 255, .075);
  box-shadow: inset 3px 0 0 rgba(53, 199, 255, .82);
}

@media (hover: hover) {
  .leaderboard-row:not(.leaderboard-header):hover {
    background-color: rgba(255,255,255,.028);
  }
}

/* Mobile header: one compact, swipeable navigation row so links never wrap. */
@media (max-width: 700px) {
  .site-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand account"
      "nav nav";
    align-items: center;
    column-gap: 12px;
    row-gap: 7px;
    min-height: 0 !important;
    padding: 8px 12px 10px !important;
  }

  .site-header > .brand {
    grid-area: brand;
    min-width: 0;
    justify-self: start;
  }

  .site-header > .account-header-area {
    grid-area: account;
    justify-self: end;
    margin: 0 !important;
  }

  .brand-mark,
  .brand-mark img {
    height: 48px !important;
  }

  .brand-mark img { max-width: 140px !important; }
  .brand > span:last-child { display: inline !important; font-size: 15px !important; }

  .top-nav {
    grid-area: nav;
    order: initial !important;
    width: 100% !important;
    min-width: 0;
    display: flex !important;
    align-items: center;
    gap: 5px !important;
    padding: 7px 1px 1px;
    border-top: 1px solid rgba(170, 192, 224, .09);
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    justify-content: flex-start !important;
  }

  .top-nav::-webkit-scrollbar { display: none; }

  .top-nav a {
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px 10px !important;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px !important;
    line-height: 1;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .top-nav a[aria-current="page"] {
    border-color: rgba(53, 199, 255, .18);
    background: rgba(53, 199, 255, .09);
  }

  .notification-slot {
    position: static !important;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    transform: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .notification-slot:empty { visibility: hidden; }

  .notification-slot .notification-button-header {
    width: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }

  .notification-slot .notification-button-label { display: none !important; }

  .account-trigger {
    min-height: 40px;
    max-width: 145px;
    padding: 7px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
  }

  .profile-identity { gap: 13px; }
  .profile-avatar { width: 58px; height: 58px; flex-basis: 58px; border-radius: 17px; font-size: 24px; }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .profile-stat:last-child { grid-column: 1 / -1; }

  .leaderboard-row {
    padding: 11px 12px !important;
  }

  .leaderboard-row:not(.leaderboard-header) {
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
    grid-template-areas:
      "rank player score"
      "rank extra extra";
    row-gap: 3px;
    min-height: 62px;
  }

  .leaderboard-row:not(.leaderboard-header) .leaderboard-cell.rank { grid-area: rank; align-self: center; }
  .leaderboard-row:not(.leaderboard-header) .leaderboard-cell.player { grid-area: player; }
  .leaderboard-row:not(.leaderboard-header) .leaderboard-cell.score { grid-area: score; }
  .leaderboard-row:not(.leaderboard-header) .leaderboard-cell.extra {
    grid-area: extra;
    display: block !important;
    text-align: left !important;
    color: var(--muted, #9ba9bd);
    font-size: 11px;
    line-height: 1.25;
  }

  .leaderboard-header {
    grid-template-columns: 44px minmax(0, 1fr) auto !important;
  }
  .leaderboard-header .leaderboard-cell.extra { display: none !important; }
}

@media (max-width: 480px) {
  .brand-mark,
  .brand-mark img { height: 44px !important; }
  .brand-mark img { max-width: 126px !important; }
  .brand > span:last-child { font-size: 14px !important; }

  .top-nav { gap: 4px !important; }
  .top-nav a { min-width: 68px; font-size: 11px !important; padding-inline: 8px !important; }

  .profile-hero { padding: 18px !important; }
  .profile-identity { align-items: flex-start; }
  .profile-avatar { width: 52px; height: 52px; flex-basis: 52px; border-radius: 15px; font-size: 22px; }
  .profile-hero h1 { font-size: clamp(31px, 10vw, 42px) !important; }

  .leaderboard-row { font-size: 13px !important; }
  .leaderboard-row.current-user .leaderboard-cell.player::after { display: none; }
}

@media (max-width: 380px) {
  .brand > span:last-child { display: none !important; }
  .profile-stat-grid { grid-template-columns: 1fr !important; }
  .profile-stat:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-card,
  .profile-stat,
  .friend-card,
  .profile-history-card,
  .leaderboard-row,
  .category-progress span {
    transition: none !important;
  }
}

/* ===== quiz-library.css ===== */
.library-controls{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.library-controls .filter-label{min-width:180px}.library-controls input,.library-controls select{min-height:44px}.library-count-row{min-height:28px;margin:4px 0 14px;color:var(--admin-muted,#9ca8ba);font-size:14px}.quiz-pagination{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px}.quiz-pagination button:disabled{opacity:.45;cursor:not-allowed}.quiz-pagination span{min-width:100px;text-align:center;font-weight:700}@media(max-width:720px){.library-controls{width:100%;align-items:stretch}.library-controls .filter-label{width:100%}.quiz-pagination{gap:10px}.quiz-pagination .button{flex:1}.quiz-pagination span{min-width:90px}}


/* ===== PHP environment status page ===== */
.php-status-page { margin: 40px; }
.php-status-card { max-width: 700px; padding: 24px; border-radius: 12px; background: #1f2937; }
.php-status-ok { color: #86efac; }
.php-status-error { color: #fca5a5; white-space: pre-wrap; }


/* ===== PHP site header ===== */
.site-main { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.site-header .brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #03112a;
  background: linear-gradient(145deg, var(--cyan), #7ee6ff);
  box-shadow: 0 0 28px rgba(0, 204, 255, 0.25);
  font-size: 22px;
  font-weight: 900;
}
.site-header .brand > span:last-child { color: #fff; }
.site-header .language-switcher { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; }
.site-header .language-switcher a { color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 800; }
.site-header .language-switcher a:hover { color: #fff; }
@media (max-width: 700px) {
  .site-main { width: min(100% - 24px, 1180px); }
  .site-header .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
}


/* ===== PHP account pages ===== */
.page-section {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 64px 0 80px;
}
.page-section > h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -0.045em;
}
.form-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(14, 30, 93, 0.96), rgba(9, 18, 65, 0.95));
  box-shadow: var(--shadow);
}
.form-card label {
  display: grid;
  gap: 8px;
  color: #d8e5ff;
  font-size: 14px;
  font-weight: 750;
}
.form-card input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: #fff;
  border: 1px solid rgba(120, 167, 255, 0.32);
  border-radius: 10px;
  outline: none;
  background: rgba(4, 12, 49, 0.72);
}
.form-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 204, 255, 0.10);
}
.form-card button {
  width: fit-content;
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 12px;
  color: #03112a;
  background: linear-gradient(135deg, var(--cyan), #7ee6ff);
  font-weight: 800;
  cursor: pointer;
}
.form-card p { margin: 0; color: var(--muted); min-height: 20px; }
.page-section > p { color: var(--muted); }
.page-section > p a { color: var(--cyan); font-weight: 750; }
@media (max-width: 620px) {
  .page-section { padding: 42px 0 60px; }
  .form-card { padding: 20px; }
  .form-card button { width: 100%; }
}


/* ===== PHP maintenance page ===== */
.maintenance-page {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}
.maintenance-card {
  width: min(680px, 100%);
  padding: clamp(30px, 6vw, 56px);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(14, 30, 93, 0.96), rgba(9, 18, 65, 0.95));
  box-shadow: var(--shadow);
}
.maintenance-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border-radius: 0;
  color: #03112a;
  background: transparent !important;
  font-size: 28px;
  font-weight: 900;
}
.maintenance-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: transparent !important;
}
.maintenance-card h1 { margin: 0; font-size: clamp(34px, 6vw, 54px); letter-spacing: -0.04em; }
.maintenance-card p { margin: 16px auto 0; max-width: 540px; color: var(--muted); line-height: 1.65; }
.maintenance-card .button { margin-top: 26px; }


/* ===== maintenance status banner ===== */
.maintenance-banner{width:100%;min-height:42px;display:flex;align-items:center;justify-content:center;gap:10px;padding:9px 18px;color:#07132f;background:linear-gradient(90deg,#f5c84b,#ffd96f);border-bottom:1px solid rgba(0,0,0,.18);font-size:13px;line-height:1.35;text-align:center}
.maintenance-banner strong{font-weight:900}.maintenance-banner span{font-weight:650}
.site-logo{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:12px;overflow:hidden}
.site-logo img,.maintenance-mark img{width:100%;height:100%;object-fit:contain;display:block}
@media(max-width:700px){.maintenance-banner{flex-direction:column;gap:2px;padding:8px 12px}.site-logo{width:38px;height:38px;flex-basis:38px}}

.site-confirm-overlay{position:fixed !important;inset:0 !important;z-index:2147483000 !important;width:100vw !important;height:100vh !important;display:grid !important;place-items:center !important;box-sizing:border-box;background:rgba(3,9,24,.72);backdrop-filter:blur(5px)}.site-confirm-overlay[hidden]{display:none !important}.site-confirm-dialog{width:min(460px,100%);padding:26px;border:1px solid rgba(142,223,255,.22);border-radius:18px;background:#101a35;box-shadow:0 24px 70px rgba(0,0,0,.45)}.site-confirm-dialog h2{margin:0 0 10px;color:#fff;font-size:24px}.site-confirm-dialog p{margin:0;color:#b9c6df;line-height:1.55;white-space:pre-line}.site-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}


/* Quiz controls: report link on the left, next-question action on the right. */
.quiz-controls {
  justify-content: space-between;
  align-items: center;
}
.quiz-controls #report-question {
  order: -1;
  min-height: 40px;
  padding: 9px 14px;
  font-size: 13px;
}


/* ===== PHP report page ===== */
.contact-page {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 76px;
}
.contact-card {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(14, 30, 93, .96), rgba(9, 18, 65, .95));
  box-shadow: var(--shadow);
}
.contact-card h1 {
  margin: 4px 0 12px;
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1;
  letter-spacing: -.045em;
}
.contact-card > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.report-target {
  display: grid;
  gap: 7px;
  margin: 28px 0 24px;
  padding: 17px 18px;
  border: 1px solid rgba(53, 199, 255, .18);
  border-left: 3px solid var(--cyan);
  border-radius: 12px;
  background: rgba(53, 199, 255, .055);
}
.report-target strong {
  color: #fff;
  font-size: 16px;
}
.report-target span {
  color: var(--muted);
  line-height: 1.5;
}
.contact-form {
  display: grid;
  gap: 18px;
}
.contact-form label {
  display: grid;
  gap: 8px;
  color: #d8e5ff;
  font-size: 13px;
  font-weight: 800;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: #fff;
  border: 1px solid rgba(120, 167, 255, .32);
  border-radius: 10px;
  outline: none;
  background: rgba(4, 12, 49, .72);
  font: inherit;
  resize: vertical;
}
.contact-form textarea {
  min-height: 150px;
  line-height: 1.5;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 204, 255, .10);
}
.contact-form .button {
  justify-self: start;
  margin-top: 2px;
}
.contact-success,
.contact-error {
  margin-top: 22px;
  padding: 13px 15px;
  border-radius: 10px;
  line-height: 1.5;
}
.contact-success {
  border: 1px solid rgba(69, 212, 131, .25);
  color: #a9f1c2;
  background: rgba(69, 212, 131, .07);
}
.contact-error {
  border: 1px solid rgba(255, 95, 154, .25);
  color: #ffc0d5;
  background: rgba(255, 95, 154, .07);
}
@media (max-width: 620px) {
  .contact-page {
    width: min(100% - 24px, 900px);
    padding: 36px 0 56px;
  }
  .contact-card { padding: 22px 18px; }
  .contact-form .button { width: 100%; }
}


/* Authenticated report identity */
.report-reporter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 2px;
}
.report-reporter > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid rgba(120, 167, 255, .22);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}
.report-reporter span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.report-reporter strong {
  color: #fff;
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .report-reporter { grid-template-columns: 1fr; }
}


/* Quiz comments */
.quiz-comments-section {
  width: min(700px, calc(100% - 36px));
  margin: 36px auto 50px;
}

.quiz-comments-section .section-heading {
  margin-bottom: 18px;
}

.comments-card,
.comment-form-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(7, 16, 58, 0.72);
  box-shadow: var(--shadow);
}

.quiz-comment {
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-comment:first-child {
  padding-top: 0;
}

.quiz-comment:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.quiz-comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.quiz-comment-meta strong {
  font-size: 15px;
}

.quiz-comment-meta time {
  color: var(--muted);
  font-size: 12px;
}

.quiz-comment p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quiz-comment-report {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.comments-empty {
  margin: 0;
  color: var(--muted);
}

.comment-form-card {
  margin-top: 16px;
}

.quiz-comment-form {
  display: grid;
  gap: 14px;
}

.quiz-comment-form label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.quiz-comment-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(4, 12, 45, 0.8);
}

.quiz-comment-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.quiz-comment-form-row small {
  color: var(--muted);
}

.comment-feedback {
  margin: 0;
  color: var(--green);
}

@media (max-width: 700px) {
  .quiz-comments-section {
    width: min(100% - 24px, 700px);
    margin-top: 24px;
  }

  .comments-card,
  .comment-form-card {
    padding: 17px;
  }

  .quiz-comment-form-row {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ===== FactBurst visual refresh ===== */
:root{--bg-deep:#050817;--bg-surface:#0b1226;--line-soft:rgba(158,190,255,.14);--line-strong:rgba(84,202,255,.34);--cyan-soft:#7edfff;--muted-strong:#c9d5ea;--radius-lg:22px;--radius-md:16px;--shadow-soft:0 18px 50px rgba(0,0,0,.24)}
body{background:radial-gradient(circle at 8% 4%,rgba(0,204,255,.12),transparent 28rem),radial-gradient(circle at 92% 18%,rgba(164,92,255,.16),transparent 30rem),linear-gradient(145deg,#040713 0%,#09122b 55%,#17113d 100%)}
.site-header{min-height:76px;border-bottom-color:rgba(164,192,240,.12);background:rgba(4,8,23,.84);box-shadow:0 8px 30px rgba(0,0,0,.12)}
.top-nav{gap:6px;padding:4px;border:1px solid rgba(164,192,240,.10);border-radius:14px;background:rgba(255,255,255,.025)}
.top-nav a{padding:9px 12px;border:1px solid transparent;border-radius:10px;color:#aebbd1;transition:color 160ms ease,background 160ms ease,border-color 160ms ease,transform 160ms ease}
.top-nav a:hover{color:#fff;background:rgba(255,255,255,.045);transform:translateY(-1px)}
.top-nav a[aria-current=page]{color:#fff;border-color:rgba(53,199,255,.22);background:linear-gradient(135deg,rgba(53,199,255,.13),rgba(164,92,255,.10))}
.hero{min-height:560px;padding-block:86px 62px}.hero h1{max-width:780px;text-wrap:balance;font-weight:900}.hero-text{color:var(--muted-strong);max-width:650px}.eyebrow{color:var(--cyan-soft);letter-spacing:.14em}
.score-ring{border-color:rgba(126,223,255,.58);background:radial-gradient(circle at 35% 25%,rgba(72,116,255,.42),transparent 42%),radial-gradient(circle,rgba(15,40,98,.96),rgba(6,12,39,.96));box-shadow:0 0 0 16px rgba(164,92,255,.045),0 0 0 32px rgba(53,199,255,.025),0 28px 90px rgba(0,0,0,.32)}
.button{min-height:48px;padding-inline:19px;border-radius:13px;transition:transform 160ms ease,box-shadow 160ms ease,border-color 160ms ease,background 160ms ease,opacity 160ms ease}
.button-primary{color:#03111f;background:linear-gradient(135deg,#63dcff,#b0efff);box-shadow:0 10px 30px rgba(53,199,255,.16)}.button-primary:hover{box-shadow:0 14px 36px rgba(53,199,255,.24)}
.button-secondary{border-color:rgba(164,192,240,.20);background:rgba(255,255,255,.045)}.button-secondary:hover{border-color:rgba(126,223,255,.35);background:rgba(126,223,255,.07)}
.section{padding-block:54px}.section-heading{margin-bottom:26px}.section-heading h2{ text-wrap:balance}
.quiz-feature,.quiz-card,.quiz-stage,.results-card,.empty-state,.form-card,.contact-card{border-color:var(--line-soft);background:linear-gradient(145deg,rgba(17,31,66,.90),rgba(8,17,40,.92));box-shadow:var(--shadow-soft)}
.quiz-feature{border-radius:var(--radius-lg);box-shadow:0 24px 70px rgba(0,0,0,.22)}.quiz-feature h3{ text-wrap:balance}
.quiz-card{min-height:220px;border-radius:var(--radius-md);transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease,background 180ms ease}.quiz-card:hover{transform:translateY(-4px);border-color:var(--line-strong);box-shadow:0 20px 48px rgba(0,0,0,.26);background:linear-gradient(145deg,rgba(20,38,80,.94),rgba(9,18,43,.94))}
.library-controls{gap:10px}.library-controls input,.library-controls select,.filter-label select{border-color:rgba(164,192,240,.18);border-radius:12px;background:rgba(5,12,31,.78);transition:border-color 160ms ease,box-shadow 160ms ease}.library-controls input{min-width:240px;min-height:44px;padding:9px 13px;color:#fff}.library-controls input:focus,.library-controls select:focus,.filter-label select:focus{outline:none;border-color:rgba(126,223,255,.55);box-shadow:0 0 0 3px rgba(53,199,255,.09)}
.quiz-stage,.results-card{border-radius:var(--radius-lg)}.question-card{border-color:rgba(164,192,240,.12);border-radius:var(--radius-md);background:rgba(4,10,29,.58)}
.answer-button{min-height:62px;border-color:rgba(164,192,240,.13);border-radius:14px;background:rgba(255,255,255,.035);transition:transform 140ms ease,border-color 140ms ease,background 140ms ease,box-shadow 140ms ease}.answer-button:hover{transform:translateY(-1px);border-color:rgba(126,223,255,.45);background:rgba(126,223,255,.055)}.answer-button.selected{border-color:rgba(126,223,255,.72);background:rgba(53,199,255,.11);box-shadow:0 8px 24px rgba(0,0,0,.14)}
.answer-letter{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.065)}.results-card{padding-block:clamp(30px,5vw,52px)}.result-row{border:1px solid rgba(255,255,255,.055);border-left-width:3px;background:rgba(255,255,255,.035)}
.page-section{padding-block:72px 88px}.page-section>h1{text-wrap:balance}.form-card,.contact-card{border-radius:var(--radius-lg)}.form-card input,.contact-form input,.contact-form textarea,.quiz-comment-form textarea{border-color:rgba(164,192,240,.18);border-radius:12px;background:rgba(4,10,29,.70);transition:border-color 160ms ease,box-shadow 160ms ease,background 160ms ease}.form-card input:focus,.contact-form input:focus,.contact-form textarea:focus,.quiz-comment-form textarea:focus{border-color:rgba(126,223,255,.58);background:rgba(4,10,29,.84);box-shadow:0 0 0 3px rgba(53,199,255,.09)}
.contact-form .button,.form-card button{border-radius:13px}.professional-footer{margin-top:70px;background:rgba(3,7,18,.92)}.professional-footer-grid{padding-block:50px 38px}.professional-footer-brand-link{font-size:21px}.professional-footer-bottom{color:#8796ad}.quiz-comments-section{margin-top:42px}.comments-card,.comment-form-card{border-color:rgba(164,192,240,.14);background:rgba(8,16,38,.74)}
@media(max-width:700px){.hero{padding-block:52px 38px}.hero h1{font-size:clamp(42px,13vw,62px)}.section{padding-block:38px}.section-heading{margin-bottom:20px}.quiz-feature,.quiz-card,.quiz-stage,.results-card{border-radius:17px}.library-controls input{min-width:0}.page-section{padding-block:48px 64px}.professional-footer{margin-top:48px}}
@media(prefers-reduced-motion:reduce){.top-nav a,.button,.quiz-card,.answer-button,.library-controls input,.library-controls select,.filter-label select{transition:none!important}}

/* ===== Homepage focused layout ===== */
.home-hero{position:relative;overflow:hidden;border-bottom:1px solid rgba(164,192,240,.09);background:radial-gradient(circle at 78% 45%,rgba(53,199,255,.10),transparent 22rem),radial-gradient(circle at 92% 15%,rgba(164,92,255,.14),transparent 25rem)}
.home-hero::after{content:"";position:absolute;width:520px;height:520px;right:-190px;top:-180px;border:1px solid rgba(126,223,255,.08);border-radius:50%;box-shadow:0 0 0 70px rgba(126,223,255,.025),0 0 0 140px rgba(164,92,255,.018);pointer-events:none}
.home-hero-inner{position:relative;z-index:1;min-height:500px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);align-items:center;gap:70px;padding-block:72px}
.home-hero-copy{max-width:720px}
.home-hero-copy h1{margin:0;max-width:700px;font-size:clamp(48px,7vw,82px);line-height:.98;letter-spacing:-.055em;text-wrap:balance}
.home-hero-copy .hero-text{margin-top:22px}
.home-hero-score{display:flex;justify-content:center}
.home-score-card{width:min(300px,70vw);aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid rgba(126,223,255,.28);border-radius:32px;background:linear-gradient(145deg,rgba(20,40,85,.88),rgba(8,15,38,.96));box-shadow:0 30px 80px rgba(0,0,0,.28),inset 0 0 60px rgba(53,199,255,.035);transform:rotate(2deg)}
.home-score-card span{color:var(--cyan-soft);font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.home-score-card strong{margin-top:10px;font-size:clamp(64px,8vw,88px);line-height:1;letter-spacing:-.08em}
.home-score-card strong span{font-size:.38em;color:#8fa0bc;letter-spacing:-.02em}
.home-score-card small{margin-top:16px;color:#8090aa;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.home-section{padding-block:64px}
.home-section-heading{margin-bottom:24px}
.home-section-heading h2{margin:0;font-size:clamp(30px,4vw,46px);letter-spacing:-.045em;text-wrap:balance}
.home-section-heading-row{display:flex;align-items:end;justify-content:space-between;gap:20px}
.text-link{color:var(--cyan-soft);font-weight:800;text-decoration:none}.text-link:hover{text-decoration:underline}
.home-feature-card{min-height:220px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:30px;padding:clamp(26px,4vw,42px);border:1px solid rgba(126,223,255,.18);border-radius:22px;background:linear-gradient(120deg,rgba(17,35,76,.96),rgba(10,20,47,.92));box-shadow:0 22px 60px rgba(0,0,0,.20)}
.home-feature-copy h3{margin:14px 0 10px;font-size:clamp(28px,4vw,44px);line-height:1.05;letter-spacing:-.04em}.home-feature-copy p{max-width:720px;margin:0;color:var(--muted-strong);line-height:1.6}
.home-quiz-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.home-quiz-card{min-height:220px;display:flex;flex-direction:column;padding:22px;border:1px solid rgba(164,192,240,.13);border-radius:17px;background:rgba(10,20,45,.72);text-decoration:none;transition:transform 170ms ease,border-color 170ms ease,background 170ms ease,box-shadow 170ms ease}
.home-quiz-card:hover{transform:translateY(-4px);border-color:rgba(126,223,255,.35);background:rgba(15,30,62,.90);box-shadow:0 18px 42px rgba(0,0,0,.22)}
.home-quiz-card h3{margin:18px 0 8px;color:#f7faff;font-size:21px;line-height:1.15;letter-spacing:-.025em}.home-quiz-card p{margin:0;color:#9eacc3;line-height:1.55}.home-quiz-card-link{margin-top:auto;padding-top:22px;color:var(--cyan-soft);font-size:13px;font-weight:850}
.home-benefits{margin-top:12px;padding-block:78px;background:rgba(3,8,20,.46);border-top:1px solid rgba(164,192,240,.08);border-bottom:1px solid rgba(164,192,240,.08)}
.home-benefits-inner{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(0,1.25fr);gap:70px;align-items:start}
.home-benefits-intro{position:sticky;top:110px}.home-benefits-intro h2{margin:0 0 24px;font-size:clamp(30px,4vw,46px);line-height:1.05;letter-spacing:-.045em}.home-benefits-list{display:grid;gap:0}
.home-benefits-list article{display:grid;grid-template-columns:48px 1fr;gap:18px;padding:24px 0;border-top:1px solid rgba(164,192,240,.12)}.home-benefits-list article:last-child{border-bottom:1px solid rgba(164,192,240,.12)}
.home-benefits-list article>span{color:var(--cyan-soft);font-size:12px;font-weight:900;letter-spacing:.08em}.home-benefits-list h3{margin:0 0 7px;font-size:21px}.home-benefits-list p{margin:0;color:#9eacc3;line-height:1.6}
@media(max-width:840px){.home-hero-inner{grid-template-columns:1fr;gap:36px;min-height:0;padding-block:60px}.home-hero-score{order:-1;justify-content:flex-start}.home-score-card{width:190px;border-radius:24px}.home-quiz-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-benefits-inner{grid-template-columns:1fr;gap:34px}.home-benefits-intro{position:static}}
@media(max-width:620px){.home-hero-inner{padding-block:44px 50px}.home-hero-copy h1{font-size:clamp(42px,13vw,60px)}.home-hero-score{justify-content:center}.home-score-card{width:170px}.home-section{padding-block:46px}.home-section-heading-row{align-items:flex-start;flex-direction:column;gap:10px}.home-feature-card{grid-template-columns:1fr;gap:22px}.home-feature-card .button{width:100%}.home-quiz-grid{grid-template-columns:1fr}.home-quiz-card{min-height:190px}.home-benefits{padding-block:56px}.home-benefits-inner{gap:26px}.home-benefits-list article{grid-template-columns:34px 1fr;padding-block:20px}}

/* ===== Full homepage restyle ===== */
.homepage{background:#070b18}
.home-intro{position:relative;overflow:hidden;border-bottom:1px solid rgba(255,255,255,.08);background:#080d1c}
.home-intro:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,204,255,.06),transparent 45%,rgba(164,92,255,.08));pointer-events:none}
.home-intro:after{content:"";position:absolute;width:620px;height:620px;right:-240px;top:-260px;border:1px solid rgba(126,223,255,.10);border-radius:50%;box-shadow:0 0 0 90px rgba(126,223,255,.025),0 0 0 180px rgba(164,92,255,.018);pointer-events:none}
.home-intro-inner{position:relative;z-index:1;min-height:590px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);align-items:center;gap:70px}
.home-intro-copy{padding-block:80px}.home-kicker{display:inline-block;margin-bottom:22px;color:#7edfff;font-size:11px;font-weight:900;letter-spacing:.22em}
.home-intro-copy h1{max-width:760px;margin:0;color:#f8fbff;font-size:clamp(52px,7.2vw,88px);line-height:.94;letter-spacing:-.065em}
.home-intro-copy h1 em{font-style:normal;color:#7edfff}
.home-intro-copy>p{max-width:590px;margin:26px 0 0;color:#aebbd1;font-size:18px;line-height:1.65}
.home-intro-actions{display:flex;align-items:center;gap:18px;margin-top:34px}
.home-primary-action{min-height:54px;display:inline-flex;align-items:center;gap:20px;padding:0 20px 0 22px;border-radius:12px;color:#06101e;background:#7edfff;text-decoration:none;font-weight:900;box-shadow:0 14px 40px rgba(53,199,255,.16);transition:transform 160ms ease,box-shadow 160ms ease}
.home-primary-action span{width:32px;height:32px;display:grid;place-items:center;border-radius:8px;color:#7edfff;background:#07101f;font-size:18px}
.home-primary-action:hover{transform:translateY(-2px);box-shadow:0 18px 48px rgba(53,199,255,.24)}
.home-secondary-action{color:#aebbd1;text-decoration:none;font-size:14px;font-weight:800}.home-secondary-action:hover{color:#fff}
.home-intro-art{position:relative;min-height:390px;display:grid;place-items:center}
.home-art-card{position:absolute;display:flex;flex-direction:column;justify-content:center}
.home-art-card-main{width:270px;height:300px;right:12%;transform:rotate(4deg);padding:30px;border:1px solid rgba(126,223,255,.28);border-radius:28px;background:linear-gradient(150deg,#142957,#0b1225);box-shadow:28px 32px 80px rgba(0,0,0,.38)}
.home-art-card-main span{color:#8192ad;font-size:10px;font-weight:900;letter-spacing:.18em}.home-art-card-main strong{margin-top:20px;font-size:82px;line-height:.9;letter-spacing:-.09em}.home-art-card-main strong small{font-size:27px;color:#7c8ca7;letter-spacing:-.02em}.home-art-stars{margin-top:26px;color:#7edfff;letter-spacing:5px;font-size:13px}
.home-art-card-mini{width:112px;height:112px;left:7%;bottom:32px;align-items:center;transform:rotate(-8deg);border:1px solid rgba(255,255,255,.14);border-radius:22px;background:#111a31;box-shadow:0 24px 55px rgba(0,0,0,.3)}.home-art-card-mini strong{font-size:42px;line-height:1}.home-art-card-mini span{margin-top:7px;color:#7c8ca7;font-size:9px;font-weight:900;letter-spacing:.16em}
.home-latest{display:grid;grid-template-columns:120px minmax(0,1fr);gap:40px;padding-block:88px;border-bottom:1px solid rgba(255,255,255,.07)}
.home-latest-label{padding-top:8px}.home-latest-label span,.home-section-title>div>span,.home-proof-heading>span{color:#52627d;font-size:12px;font-weight:900;letter-spacing:.15em}.home-latest-label p{margin:8px 0 0;color:#aebbd1;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.12em}
.home-latest-content{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:30px}.home-category{display:inline-block;color:#7edfff;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.home-latest-content h2{margin:12px 0 10px;max-width:760px;font-size:clamp(32px,4.5vw,54px);line-height:1;letter-spacing:-.05em}.home-latest-content p{max-width:680px;margin:0;color:#9eacc3;line-height:1.6}
.home-round-action{width:66px;height:66px;display:grid;place-items:center;border:1px solid rgba(126,223,255,.30);border-radius:50%;color:#7edfff;text-decoration:none;font-size:25px;transition:transform 160ms ease,background 160ms ease}.home-round-action:hover{transform:translate(3px,-3px);background:rgba(126,223,255,.08)}
.home-recent{padding-block:88px}.home-section-title{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:26px}.home-section-title>div{display:flex;align-items:baseline;gap:18px}.home-section-title h2{margin:0;font-size:clamp(32px,4.5vw,54px);line-height:1;letter-spacing:-.05em}.home-section-title>a{color:#7edfff;text-decoration:none;font-size:13px;font-weight:850}.home-section-title>a:hover{text-decoration:underline}
.home-recent-list{border-top:1px solid rgba(255,255,255,.10)}
.home-recent-item{display:grid;grid-template-columns:54px minmax(0,1fr) 50px;align-items:center;gap:22px;min-height:108px;padding:16px 8px;border-bottom:1px solid rgba(255,255,255,.09);color:inherit;text-decoration:none;transition:background 160ms ease,padding 160ms ease}
.home-recent-item:hover{padding-inline:18px;background:rgba(126,223,255,.035)}
.home-recent-number{color:#53627b;font-size:12px;font-weight:900;letter-spacing:.08em}.home-recent-main{min-width:0;display:grid;gap:4px}.home-recent-main strong{color:#f4f8ff;font-size:20px;letter-spacing:-.025em}.home-recent-main small{overflow:hidden;color:#7f8da5;font-size:13px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}.home-recent-arrow{justify-self:end;color:#60708b;font-size:22px;transition:color 160ms ease,transform 160ms ease}.home-recent-item:hover .home-recent-arrow{color:#7edfff;transform:translate(2px,-2px)}
.home-proof{padding-block:88px;background:#0a1020;border-top:1px solid rgba(255,255,255,.07);border-bottom:1px solid rgba(255,255,255,.07)}
.home-proof-inner{display:grid;grid-template-columns:.75fr 1.25fr;gap:80px}.home-proof-heading h2{max-width:420px;margin:12px 0 0;font-size:clamp(32px,4.5vw,52px);line-height:1;letter-spacing:-.05em}.home-proof-points{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}.home-proof-points>div{padding-left:0;border-left:0}.home-proof-points b{display:block;margin-bottom:34px;color:#52627d;font-size:11px;letter-spacing:.12em}.home-proof-points strong{display:block;color:#f4f8ff;font-size:17px}.home-proof-points p{margin:9px 0 0;color:#8f9db5;font-size:13px;line-height:1.6}
@media(max-width:840px){.home-intro-inner{grid-template-columns:1fr;min-height:0}.home-intro-copy{padding-block:64px 24px}.home-intro-art{min-height:320px}.home-art-card-main{right:18%;width:230px;height:250px}.home-art-card-mini{left:12%}.home-latest{grid-template-columns:70px 1fr;gap:24px}.home-proof-inner{grid-template-columns:1fr;gap:45px}.home-proof-points{gap:18px}}
@media(max-width:620px){.home-intro-inner{display:block}.home-intro-copy{padding-block:52px 20px}.home-intro-copy h1{font-size:clamp(45px,14vw,64px)}.home-intro-copy>p{font-size:16px}.home-intro-actions{align-items:stretch;flex-direction:column;gap:10px}.home-primary-action,.home-secondary-action{justify-content:center}.home-intro-art{min-height:245px}.home-art-card-main{right:14%;width:190px;height:205px;padding:22px;border-radius:20px}.home-art-card-main strong{font-size:62px}.home-art-stars{margin-top:16px}.home-art-card-mini{left:4%;bottom:20px;width:86px;height:86px;border-radius:17px}.home-art-card-mini strong{font-size:32px}.home-latest{grid-template-columns:1fr;gap:20px;padding-block:58px}.home-latest-content{grid-template-columns:minmax(0,1fr) auto}.home-round-action{width:54px;height:54px}.home-recent{padding-block:58px}.home-section-title{align-items:flex-start;flex-direction:column;gap:12px}.home-section-title>div{gap:12px}.home-recent-item{grid-template-columns:34px minmax(0,1fr) 28px;gap:12px;min-height:96px;padding-inline:0}.home-recent-item:hover{padding-inline:6px}.home-recent-main strong{font-size:17px}.home-recent-main small{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.home-proof{padding-block:60px}.home-proof-inner{gap:34px}.home-proof-points{grid-template-columns:1fr;gap:0}.home-proof-points>div{padding:20px 0 20px 16px;border-left:0;border-top:1px solid rgba(126,223,255,.18)}.home-proof-points>div:last-child{border-bottom:1px solid rgba(126,223,255,.18)}.home-proof-points b{margin-bottom:10px}}


/* ===== Public site final design pass ===== */
:root {
  --public-bg: #070b18;
  --public-surface: rgba(13, 22, 42, .82);
  --public-surface-strong: #0d162a;
  --public-line: rgba(164, 192, 240, .14);
  --public-muted: #9eacc3;
  --public-accent: #7edfff;
}

body {
  background:
    radial-gradient(circle at 85% 0%, rgba(126, 223, 255, .07), transparent 28rem),
    radial-gradient(circle at 10% 0%, rgba(164, 92, 255, .07), transparent 30rem),
    var(--public-bg);
}

.site-header {
  min-height: 76px;
  background: rgba(7, 11, 24, .88);
  border-bottom-color: rgba(255,255,255,.08);
}

.site-header .brand {
  min-width: 0;
}

.site-header .brand > span:last-child {
  white-space: nowrap;
}

.top-nav {
  align-items: center;
  gap: 4px;
}

.top-nav > a {
  padding: 9px 11px;
  border-radius: 9px;
  color: #9eacc3;
  font-size: 13px;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease;
}

.top-nav > a:hover,
.top-nav > a[aria-current="page"] {
  color: #fff;
  background: rgba(126,223,255,.08);
}

.top-nav > a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--public-accent);
}

.site-header .language-switcher {
  margin-left: 5px;
  padding-left: 9px;
  border-left: 1px solid var(--public-line);
}

.site-main {
  width: 100%;
  max-width: none;
  margin: 0;
}

.site-main > .shell,
.site-main > .page-section,
.site-main > .contact-page,
.site-main > .profile-shell,
.site-main > .directory-main,
.site-main > .quiz-page-grid {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.page-section {
  width: min(900px, calc(100% - 36px));
  padding: 72px 0 86px;
}

.page-section > h1,
.page-hero h1 {
  margin: 0;
  max-width: 850px;
  color: #f8fbff;
  font-size: clamp(44px, 6vw, 72px);
  line-height: .96;
  letter-spacing: -.055em;
}

.page-section > .hero-text,
.page-hero > p:last-child {
  max-width: 700px;
  margin-top: 20px;
  color: var(--public-muted);
  font-size: 17px;
  line-height: 1.7;
}

.page-hero {
  width: min(900px, calc(100% - 36px));
  margin-inline: auto;
  padding: 72px 0 34px;
}

.page-hero + .content-section {
  width: min(900px, calc(100% - 36px));
  margin-inline: auto;
}

.content-section {
  padding: 0 0 80px;
}

.eyebrow {
  color: var(--public-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}

.button {
  min-height: 46px;
  padding: 11px 17px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
}

.button-primary {
  color: #06101e;
  background: var(--public-accent);
  box-shadow: 0 12px 30px rgba(53,199,255,.12);
}

.button-secondary {
  color: #e8eef8;
  border-color: var(--public-line);
  background: rgba(255,255,255,.045);
}

.button-secondary:hover {
  border-color: rgba(126,223,255,.30);
  background: rgba(126,223,255,.07);
}

.quiz-grid {
  gap: 14px;
}

.quiz-card,
.quiz-feature,
.quiz-stage,
.results-card,
.empty-state {
  border-color: var(--public-line);
  background: linear-gradient(145deg, rgba(15,27,52,.92), rgba(9,16,31,.94));
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
}

.quiz-card {
  min-height: 205px;
  padding: 21px;
  border-radius: 14px;
}

.quiz-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126,223,255,.34);
  box-shadow: 0 22px 52px rgba(0,0,0,.22);
}

.quiz-card h3 {
  color: #f5f8ff;
  font-size: 19px;
}

.quiz-card p {
  color: #9eacc3;
  font-size: 13px;
  line-height: 1.6;
}

.quiz-card .quiz-card-footer {
  color: #8493aa;
  font-size: 12px;
}

.category-pill {
  padding: 5px 9px;
  border-color: rgba(126,223,255,.24);
  color: var(--public-accent);
  background: rgba(126,223,255,.06);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quiz-feature {
  min-height: 190px;
  border-radius: 16px;
}

.library-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.filter-label {
  display: grid;
  gap: 6px;
  color: #8392aa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.library-controls select,
.library-controls input {
  min-height: 44px;
  padding: 9px 12px;
  color: #edf3ff;
  border: 1px solid var(--public-line);
  border-radius: 9px;
  outline: 0;
  background: rgba(5,10,20,.72);
}

.library-controls input {
  width: 230px;
}

.library-controls select:focus,
.library-controls input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.form-card input:focus {
  border-color: rgba(126,223,255,.65);
  box-shadow: 0 0 0 3px rgba(126,223,255,.08);
}

.library-count-row {
  min-height: 26px;
  margin: 14px 0 10px;
  color: #71819a;
  font-size: 12px;
  font-weight: 750;
}

.quiz-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.quiz-pagination #quiz-page-label {
  min-width: 92px;
  text-align: center;
  color: #8998ae;
  font-size: 12px;
  font-weight: 800;
}

.page-section .quiz-feature + .quiz-feature {
  margin-top: 14px;
}

.page-section .quiz-feature h2 {
  margin: 0 0 9px;
  color: #f4f8ff;
  font-size: clamp(23px, 3vw, 31px);
  letter-spacing: -.035em;
}

.page-section .quiz-feature p {
  color: var(--public-muted);
  line-height: 1.7;
}

/* Login, registration and simple account forms */
.form-card {
  max-width: 560px;
  margin-top: 30px;
  padding: 26px;
  border-color: var(--public-line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(15,27,52,.94), rgba(9,16,31,.96));
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.form-card input {
  min-height: 48px;
  border-color: var(--public-line);
  border-radius: 9px;
  background: rgba(4,9,18,.68);
}

.form-card button {
  min-height: 46px;
  border-radius: 9px;
  background: var(--public-accent);
}

.form-card p {
  color: #8796ad;
  line-height: 1.55;
}

.form-card + p {
  color: #8796ad;
}

.form-card + p a {
  color: var(--public-accent);
}

#login-message,
#register-message {
  color: #ffb9c9;
  white-space: pre-line;
}

.contact-form {
  max-width: 760px;
  padding: 26px;
  border: 1px solid var(--public-line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(15,27,52,.94), rgba(9,16,31,.96));
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.contact-form label {
  color: #aebbd1;
}

.contact-form input,
.contact-form textarea {
  border-color: var(--public-line);
  border-radius: 9px;
  background: rgba(4,9,18,.68);
}

.notice {
  max-width: 760px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--public-line);
  background: rgba(255,255,255,.035);
}

.notice.success {
  color: #a8edc0;
  border-color: rgba(69,212,131,.25);
  background: rgba(69,212,131,.06);
}

.notice.error {
  color: #ffc1cf;
  border-color: rgba(255,95,154,.25);
  background: rgba(255,95,154,.06);
}

/* Account */
.profile-shell {
  padding: 54px 0 76px;
}

.profile-hero {
  padding: 28px;
  border-color: var(--public-line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15,27,52,.94), rgba(9,16,31,.96));
  box-shadow: 0 20px 55px rgba(0,0,0,.16);
}

.profile-hero h1 {
  color: #f8fbff;
}

.profile-stat-grid {
  margin-top: 14px;
  border-color: var(--public-line);
  background: rgba(9,16,31,.72);
}

.profile-stat {
  background: transparent;
}

.profile-stat strong {
  color: #f6f9ff;
}

/* Quiz player */
.quiz-page-grid {
  width: min(900px, calc(100% - 36px));
}

.quiz-shell {
  padding: 48px 0 72px;
}

.quiz-stage,
.results-card {
  max-width: 900px;
  border-radius: 16px;
  padding: 24px;
}

.quiz-title {
  color: #f7faff;
}

.question-card {
  border-color: var(--public-line);
  border-radius: 13px;
  background: rgba(4,9,18,.42);
}

.answer-button {
  border-color: var(--public-line);
  background: rgba(255,255,255,.035);
}

.answer-button:hover:not(:disabled) {
  border-color: rgba(126,223,255,.42);
  background: rgba(126,223,255,.06);
}

.quiz-controls {
  gap: 9px;
}

.results-card .result-score {
  color: #f7faff;
}

/* Comments */
.quiz-comments-section {
  max-width: 900px;
  margin: 18px auto 0;
  padding: 24px 0 50px;
}

.comments-card,
.comment-form-card {
  border-color: var(--public-line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15,27,52,.82), rgba(9,16,31,.90));
}

.quiz-comment {
  border-color: var(--public-line);
}

.comment-form-card {
  margin-top: 12px;
  padding: 20px;
}

.quiz-comment-form textarea {
  border-color: var(--public-line);
  border-radius: 9px;
  background: rgba(4,9,18,.68);
}

/* Legal / FAQ */
.page-section > .quiz-grid {
  margin-top: 32px;
}

.page-section > .quiz-grid .quiz-card {
  min-height: 180px;
}

.page-section > .quiz-grid .quiz-card h2 {
  margin: 0 0 10px;
  color: #f5f8ff;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

/* Footer */
.professional-footer {
  margin-top: 0;
  background: #060b16;
  border-top-color: rgba(255,255,255,.08);
}

.professional-footer-grid {
  padding-top: 42px;
  padding-bottom: 30px;
}

.professional-footer-bottom {
  border-top-color: rgba(255,255,255,.07);
}

/* Mobile public navigation and layout */
@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .top-nav {
    max-width: 62vw;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav > a {
    flex: 0 0 auto;
  }

  .site-header .language-switcher {
    flex: 0 0 auto;
  }

  .library-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .library-controls input,
  .library-controls select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .shell,
  .site-main > .shell,
  .site-main > .page-section,
  .site-main > .contact-page,
  .site-main > .profile-shell,
  .site-main > .directory-main,
  .site-main > .quiz-page-grid,
  .page-hero,
  .page-hero + .content-section {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    min-height: 64px;
    padding-inline: 12px;
    gap: 10px;
  }

  .site-header .brand {
    gap: 7px;
    font-size: 17px;
  }

  .site-header .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .top-nav {
    max-width: 58vw;
    gap: 1px;
  }

  .top-nav > a {
    padding: 8px 8px;
    font-size: 11px;
  }

  .site-header .language-switcher {
    display: none;
  }

  .page-section {
    padding: 50px 0 64px;
  }

  .page-section > h1,
  .page-hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .page-section > .hero-text,
  .page-hero > p:last-child {
    font-size: 15px;
    line-height: 1.6;
  }

  .page-hero {
    padding-top: 48px;
  }

  .content-section {
    padding-bottom: 60px;
  }

  .form-card,
  .contact-form {
    padding: 20px;
  }

  .profile-shell {
    padding-top: 34px;
  }

  .profile-hero {
    padding: 20px;
  }

  .profile-stat-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .profile-stat {
    border-bottom: 1px solid var(--public-line);
  }

  .quiz-shell {
    padding-top: 28px;
  }

  .quiz-stage,
  .results-card {
    padding: 18px;
  }

  .quiz-comments-section {
    padding-top: 12px;
  }

  .professional-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .professional-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding-block: 18px;
  }
}


/* Secondary public pages */
.contact-page {
  width: min(900px, calc(100% - 36px));
  margin-inline: auto;
  padding: 68px 0 80px;
}

.contact-card {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--public-line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(15,27,52,.94), rgba(9,16,31,.96));
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
}

.contact-card > h1 {
  margin: 0 0 14px;
  color: #f8fbff;
  font-size: clamp(40px, 6vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}

.contact-card > p:not(.eyebrow) {
  max-width: 700px;
  color: var(--public-muted);
  line-height: 1.7;
}

.contact-card .contact-form {
  margin-top: 20px;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.report-target {
  display: grid;
  gap: 6px;
  margin: 22px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--public-line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}

.report-target strong {
  color: #f5f8ff;
}

.report-target span {
  color: #8f9db5;
  line-height: 1.55;
}

.report-reporter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.report-reporter > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--public-line);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}

.report-reporter span {
  color: #71819a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.report-reporter strong {
  color: #edf3ff;
  overflow-wrap: anywhere;
}

.contact-card .admin-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  color: #fff;
  border: 1px solid var(--public-line);
  border-radius: 9px;
  outline: 0;
  background: rgba(4,9,18,.68);
  font: inherit;
  resize: vertical;
}

.page-section > p:not(.eyebrow) {
  line-height: 1.7;
}

.page-section > p:not(.eyebrow) a {
  color: var(--public-accent);
  font-weight: 800;
}

@media (max-width: 620px) {
  .contact-page {
    width: min(100% - 24px, 900px);
    padding: 46px 0 60px;
  }

  .contact-card {
    padding: 20px;
  }

  .report-reporter {
    grid-template-columns: 1fr;
  }
}


/* ===== Account / profile redesign ===== */
.profile-shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
  padding: 54px 0 80px;
}

#account-content {
  display: grid;
  gap: 14px;
}

.profile-hero {
  position: relative;
  min-height: 210px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid var(--public-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 25%, rgba(126,223,255,.10), transparent 22rem),
    linear-gradient(145deg, rgba(15,27,52,.96), rgba(8,15,29,.98));
  box-shadow: 0 24px 60px rgba(0,0,0,.20);
}

.profile-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  bottom: -150px;
  border-radius: 50%;
  border: 1px solid rgba(126,223,255,.10);
  pointer-events: none;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.profile-avatar {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126,223,255,.30);
  border-radius: 22px;
  color: #07111e;
  background: linear-gradient(145deg, #b9f1ff, #6edcff);
  box-shadow: 0 14px 36px rgba(53,199,255,.16);
  font-size: 34px;
  font-weight: 900;
}

.profile-identity-copy {
  min-width: 0;
}

.profile-identity-copy .eyebrow {
  margin-bottom: 7px;
}

.profile-identity-copy h1 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(34px, 5vw, 52px);
  line-height: .98;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.profile-email,
.profile-member-since {
  margin: 9px 0 0;
  color: #94a3ba;
  font-size: 13px;
}

.profile-member-since {
  margin-top: 4px;
  color: #66758d;
  font-size: 12px;
}

.profile-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.profile-actions .button {
  white-space: nowrap;
}

.profile-stat-grid-main {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--public-line);
  border-radius: 14px;
  background: rgba(8,15,29,.86);
}

.profile-stat-grid-main .profile-stat {
  min-height: 100px;
  padding: 18px 20px;
}

.profile-stat-grid-main .profile-stat:last-child {
  border-right: 0;
}

.profile-stat-grid-main .profile-stat span {
  color: #718098;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.profile-stat-grid-main .profile-stat strong {
  margin-top: 7px;
  color: #f5f8ff;
  font-size: 25px;
  letter-spacing: -.035em;
}

.profile-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 10px;
}

.profile-panel {
  padding: 25px;
  border: 1px solid var(--public-line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(13,23,44,.92), rgba(8,15,29,.96));
  box-shadow: 0 16px 46px rgba(0,0,0,.13);
}

.profile-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.profile-panel-heading h2 {
  margin: 4px 0 0;
  color: #f3f7ff;
  font-size: 23px;
  letter-spacing: -.035em;
}

.profile-section-label {
  margin: 0;
  color: #6f8099;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.profile-performance-badge {
  padding: 7px 10px;
  border: 1px solid rgba(126,223,255,.20);
  border-radius: 999px;
  color: var(--public-accent);
  background: rgba(126,223,255,.06);
  font-size: 11px;
  font-weight: 900;
}

 .profile-performance-body {
  min-height: 150px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-score-ring {
  --profile-progress: 0%;
  width: 128px;
  height: 128px;
  flex: 0 0 128px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0a1428 59%, transparent 60%),
    conic-gradient(var(--public-accent) var(--profile-progress), rgba(255,255,255,.07) 0);
  box-shadow: 0 0 45px rgba(53,199,255,.08);
}

.profile-score-ring strong {
  color: #f7fbff;
  font-size: 29px;
  line-height: 1;
  letter-spacing: -.05em;
}

.profile-score-ring span {
  margin-top: 5px;
  color: #718098;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-performance-copy {
  max-width: 470px;
}

.profile-performance-copy h3 {
  margin: 0 0 9px;
  color: #f4f8ff;
  font-size: 22px;
  letter-spacing: -.03em;
}

.profile-performance-copy p {
  margin: 0;
  color: #8d9bb1;
  line-height: 1.65;
  font-size: 13px;
}

.profile-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: var(--public-accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.profile-inline-link:hover {
  color: #fff;
}

.profile-details {
  margin: 14px 0 0;
  display: grid;
  gap: 0;
}

.profile-details > div {
  min-width: 0;
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid rgba(164,192,240,.08);
}

.profile-details dt {
  color: #687991;
  font-size: 11px;
  font-weight: 800;
}

.profile-details dd {
  margin: 0;
  max-width: 62%;
  color: #dfe7f4;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.profile-results-panel,
.profile-best-panel {
  min-width: 0;
}

.profile-panel-heading-results {
  align-items: center;
}

.profile-result-list {
  margin-top: 13px;
  display: grid;
  gap: 7px;
}

.profile-result-row {
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(164,192,240,.09);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,.022);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.profile-result-row:hover {
  transform: translateY(-1px);
  border-color: rgba(126,223,255,.24);
  background: rgba(126,223,255,.04);
}

.profile-result-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.profile-result-main small,
.profile-best-copy small {
  color: #65748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.profile-result-main strong,
.profile-best-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #edf3fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-result-main > span:last-child {
  color: #687890;
  font-size: 10px;
}

.profile-result-score {
  min-width: 60px;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.profile-result-score strong {
  color: #f2f7ff;
  font-size: 14px;
}

.profile-result-score small {
  color: var(--public-accent);
  font-size: 10px;
  font-weight: 850;
}

.profile-result-arrow {
  color: #56667e;
  font-size: 17px;
}

 .profile-best-grid {
  margin-top: 13px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 8px;
}

.profile-best-card {
  min-width: 0;
  min-height: 105px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(164,192,240,.09);
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
  background: rgba(255,255,255,.022);
  transition: border-color 140ms ease, transform 140ms ease;
}

.profile-best-card:hover {
  transform: translateY(-2px);
  border-color: rgba(126,223,255,.24);
}

.profile-best-number {
  color: #596a83;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
}

.profile-best-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-best-copy strong {
  font-size: 12px;
}

.profile-best-score {
  color: var(--public-accent);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.profile-loading,
.profile-empty {
  padding: 30px 15px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: #718098;
  text-align: center;
  font-size: 12px;
}

.profile-empty strong {
  color: #dfe7f4;
  font-size: 14px;
}

.profile-empty span {
  color: #6f8098;
}

@media (max-width: 900px) {
  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-actions {
    justify-content: flex-start;
  }

  .profile-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .profile-best-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 700px) {
  .profile-shell {
    width: min(100% - 24px, 1180px);
    padding: 34px 0 60px;
  }

  .profile-hero {
    padding: 22px;
  }

  .profile-identity {
    gap: 14px;
  }

  .profile-avatar {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
    border-radius: 17px;
    font-size: 26px;
  }

  .profile-identity-copy h1 {
    font-size: 35px;
  }

  .profile-stat-grid-main {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .profile-stat-grid-main .profile-stat {
    min-height: 84px;
    border-bottom: 1px solid rgba(164,192,240,.08);
  }

  .profile-stat-grid-main .profile-stat:nth-child(2n) {
    border-right: 0;
  }

  .profile-panel {
    padding: 20px;
  }

  .profile-performance-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-score-ring {
    width: 132px;
    height: 132px;
    flex-basis: 132px;
  }

  .profile-best-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 480px) {
  .profile-actions {
    width: 100%;
  }

  .profile-actions .button {
    flex: 1 1 0;
  }

  .profile-result-row {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 10px;
  }

  .profile-result-score {
    grid-column: 2;
    grid-row: 1;
  }

  .profile-result-arrow {
    display: none;
  }

  .profile-best-grid {
    grid-template-columns: 1fr;
  }
}


/* Account security settings */
.profile-security-panel {
  padding-bottom: 22px;
}

.profile-security-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-security-card {
  min-width: 0;
  padding: 20px;
  display: grid;
  gap: 13px;
  border: 1px solid rgba(164,192,240,.09);
  border-radius: 12px;
  background: rgba(255,255,255,.022);
}

.profile-security-card > div:first-child {
  margin-bottom: 2px;
}

.profile-security-card-label {
  margin: 0 0 5px;
  color: #65758d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.profile-security-card h3 {
  margin: 0;
  color: #edf3fb;
  font-size: 17px;
  letter-spacing: -.025em;
}

.profile-security-card p:not(.profile-security-card-label):not(.profile-security-message) {
  margin: 7px 0 0;
  color: #7f8ea5;
  font-size: 12px;
  line-height: 1.6;
}

.profile-security-card label {
  display: grid;
  gap: 6px;
  color: #aebbd0;
  font-size: 11px;
  font-weight: 800;
}

.profile-security-card input {
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  color: #f4f8ff;
  border: 1px solid var(--public-line);
  border-radius: 9px;
  outline: 0;
  background: rgba(4,9,18,.68);
  font: inherit;
}

.profile-security-card input:focus {
  border-color: rgba(126,223,255,.42);
  box-shadow: 0 0 0 3px rgba(126,223,255,.06);
}

.profile-security-card .button {
  justify-self: start;
}

.profile-security-message {
  min-height: 18px;
  margin: 0;
  color: #8fa1ba;
  font-size: 11px;
  line-height: 1.5;
}

.pending-email-box {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(126,223,255,.16);
  border-radius: 10px;
  background: rgba(126,223,255,.045);
}

.pending-email-box strong {
  color: #dff8ff;
  font-size: 12px;
}

.pending-email-box span {
  color: var(--public-accent);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.pending-email-box small {
  color: #718198;
  line-height: 1.5;
}

.pending-email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.pending-email-actions .button {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 10px;
}

@media (max-width: 760px) {
  .profile-security-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .profile-security-card .button {
    width: 100%;
  }

  .pending-email-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* Quiz AdSense layout */
.quiz-page-grid.has-quiz-ads {
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 160px minmax(0, 900px) 160px;
  align-items: start;
  justify-content: center;
  gap: 18px;
}

.quiz-page-grid.has-quiz-ads .quiz-shell {
  min-width: 0;
  width: 100%;
}

.quiz-ad {
  width: 160px;
  min-height: 600px;
  position: sticky;
  top: 102px;
  overflow: hidden;
  display: block;
}

.quiz-ad .adsbygoogle {
  width: 160px;
  min-height: 600px;
}

.quiz-ad-mobile {
  display: none;
}

@media (max-width: 1120px) {
  .quiz-page-grid.has-quiz-ads {
    grid-template-columns: minmax(0, 900px);
  }

  .quiz-ad-left,
  .quiz-ad-right {
    display: none;
  }

  .quiz-ad-mobile {
    width: 100%;
    min-height: 120px;
    position: static;
    display: block;
    grid-column: 1;
    order: 2;
    margin: 0 auto 24px;
  }

  .quiz-ad-mobile .adsbygoogle {
    width: 100%;
    min-height: 120px;
  }

  .quiz-page-grid.has-quiz-ads .quiz-shell {
    order: 1;
  }
}

@media (max-width: 620px) {
  .quiz-page-grid.has-quiz-ads {
    width: min(100% - 24px, 900px);
  }

  .quiz-ad-mobile {
    min-height: 100px;
  }

  .quiz-ad-mobile .adsbygoogle {
    min-height: 100px;
  }
}

/* XP progression */
.profile-xp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  gap: 24px;
  align-items: center;
}
.profile-xp-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}
.profile-xp-total strong {
  color: #fff;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}
.profile-xp-total span {
  color: var(--muted);
  font-size: 12px;
}
.profile-xp-track {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}
.profile-xp-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fcaff, #8c7cff);
  transition: width 300ms ease;
}
.profile-xp-benefits {
  padding: 14px 16px;
  border: 1px solid rgba(170,192,224,0.11);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
}
.profile-xp-benefits strong {
  color: #fff;
  font-size: 12px;
}
.profile-xp-benefits ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
#result-xp { margin-top: 8px; }
@media (max-width: 700px) {
  .profile-xp-grid { grid-template-columns: 1fr; }
  .profile-xp-total { align-items: flex-start; flex-direction: column; }
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #eef3fb;
  --text: #162033;
  --muted: #5b6b84;
  --border: rgba(47, 76, 117, 0.18);
  --shadow: 0 18px 50px rgba(35, 55, 85, 0.12);
}

html[data-theme="light"] body {
  color: var(--text);
  background:
    radial-gradient(circle at 85% 15%, rgba(164, 92, 255, 0.10), transparent 34rem),
    radial-gradient(circle at 10% 0%, rgba(0, 204, 255, 0.10), transparent 32rem),
    linear-gradient(145deg, #f7faff 0%, #eef4fb 52%, #f5efff 100%);
}

html[data-theme="light"] .site-header {
  border-bottom-color: rgba(47, 76, 117, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .top-nav a,
html[data-theme="light"] .filter-label,
html[data-theme="light"] .quiz-feature p,
html[data-theme="light"] .quiz-card p,
html[data-theme="light"] .quiz-meta-row,
html[data-theme="light"] .hero-text,
html[data-theme="light"] .result-copy,
html[data-theme="light"] .site-footer {
  color: var(--muted);
}

html[data-theme="light"] .top-nav a:hover { color: #162033; }

html[data-theme="light"] .quiz-feature,
html[data-theme="light"] .quiz-card,
html[data-theme="light"] .quiz-stage,
html[data-theme="light"] .results-card,
html[data-theme="light"] .empty-state {
  border-color: var(--border);
  background: linear-gradient(145deg, #ffffff, #f3f7fd);
  box-shadow: var(--shadow);
}

html[data-theme="light"] .question-card {
  border-color: rgba(47, 76, 117, 0.14);
  background: rgba(238, 244, 251, 0.82);
}

html[data-theme="light"] .answer-button {
  color: #162033;
  border-color: rgba(47, 76, 117, 0.16);
  background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .answer-button:hover {
  border-color: rgba(0, 160, 210, 0.58);
}

html[data-theme="light"] .answer-button.selected {
  background: rgba(0, 180, 225, 0.10);
}

html[data-theme="light"] .answer-letter {
  background: rgba(47, 76, 117, 0.08);
}

html[data-theme="light"] .result-row {
  background: rgba(47, 76, 117, 0.055);
}

html[data-theme="light"] .result-row strong { color: #162033; }

html[data-theme="light"] .button-secondary {
  color: #26364e;
  border-color: rgba(47, 76, 117, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .progress-track {
  background: rgba(47, 76, 117, 0.10);
}

html[data-theme="light"] .site-footer {
  border-top-color: rgba(47, 76, 117, 0.12);
  background: rgba(255, 255, 255, 0.65);
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.theme-choice {
  min-height: 92px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}

.theme-choice:hover,
.theme-choice.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,204,255,0.10);
}

.theme-choice:disabled { opacity: 0.6; cursor: wait; }

.theme-choice > span:last-child {
  display: grid;
  gap: 4px;
}

.theme-choice small {
  color: var(--muted);
  font-size: 12px;
}

.theme-choice-preview {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.theme-choice-preview-dark {
  background: linear-gradient(145deg, #060d35, #34176c);
}

.theme-choice-preview-light {
  background: linear-gradient(145deg, #ffffff, #e8f0fa);
}

html[data-theme="light"] .theme-choice {
  background: rgba(255,255,255,0.8);
}

@media (max-width: 620px) {
  .theme-choice-grid { grid-template-columns: 1fr; }
}

/* ===== Light theme readability pass ===== */
html[data-theme="light"] {
  --text: #182438;
  --muted: #53657e;
  --border: rgba(46, 72, 108, 0.18);
  --border-strong: rgba(31, 105, 145, 0.34);
}

html[data-theme="light"] body {
  background: #f4f7fb;
}

html[data-theme="light"] .site-header {
  color: #182438;
  box-shadow: 0 1px 10px rgba(30, 50, 80, 0.06);
}

html[data-theme="light"] .brand,
html[data-theme="light"] .brand span {
  color: #182438;
}

html[data-theme="light"] .top-nav {
  border-color: rgba(46,72,108,.14);
  background: rgba(255,255,255,.88);
}

html[data-theme="light"] .top-nav a {
  color: #53657e;
}

html[data-theme="light"] .hero h1,
html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .quiz-title,
html[data-theme="light"] .results-card h1,
html[data-theme="light"] .empty-state h1,
html[data-theme="light"] .quiz-feature h3,
html[data-theme="light"] .quiz-card h3,
html[data-theme="light"] .question-card h2,
html[data-theme="light"] .profile-panel h2,
html[data-theme="light"] .profile-panel h3,
html[data-theme="light"] .profile-hero h1 {
  color: #182438;
}

html[data-theme="light"] .quiz-feature,
html[data-theme="light"] .quiz-card,
html[data-theme="light"] .quiz-stage,
html[data-theme="light"] .results-card,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .question-card,
html[data-theme="light"] .profile-panel,
html[data-theme="light"] .profile-stat,
html[data-theme="light"] .profile-security-card,
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .profile-result-row,
html[data-theme="light"] .profile-best-card {
  color: #182438;
  border-color: rgba(46,72,108,.16);
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(40,60,90,.08);
}

html[data-theme="light"] .quiz-feature p,
html[data-theme="light"] .quiz-card p,
html[data-theme="light"] .quiz-meta-row,
html[data-theme="light"] .result-copy,
html[data-theme="light"] .profile-email,
html[data-theme="light"] .profile-member-since,
html[data-theme="light"] .profile-section-label,
html[data-theme="light"] .profile-security-card p,
html[data-theme="light"] .profile-details dd,
html[data-theme="light"] .profile-result-main small,
html[data-theme="light"] .profile-best-copy small,
html[data-theme="light"] .profile-loading,
html[data-theme="light"] .profile-empty,
html[data-theme="light"] .profile-performance-copy p {
  color: #53657e;
}

html[data-theme="light"] .answer-button {
  color: #182438;
  background: #f8fafc;
  border-color: rgba(46,72,108,.17);
}

html[data-theme="light"] .answer-button:hover {
  background: #eef8fc;
  border-color: rgba(0,160,210,.45);
}

html[data-theme="light"] .answer-button.selected {
  color: #10233a;
  background: #e3f7fc;
  border-color: #27b8df;
}

html[data-theme="light"] .answer-letter {
  color: #33455d;
  background: #e8eef5;
  border-color: rgba(46,72,108,.12);
}

html[data-theme="light"] .progress-track,
html[data-theme="light"] .profile-xp-track {
  background: #dce5ef;
}

html[data-theme="light"] .result-row {
  color: #182438;
  background: #f4f7fa;
  border-color: rgba(46,72,108,.12);
}

html[data-theme="light"] .result-row strong,
html[data-theme="light"] .result-row p {
  color: #182438;
}

html[data-theme="light"] .result-row p {
  color: #53657e;
}

html[data-theme="light"] .button-secondary {
  color: #24364e;
  background: #ffffff;
  border-color: rgba(46,72,108,.2);
}

html[data-theme="light"] .button-secondary:hover {
  background: #f1f7fb;
}

html[data-theme="light"] .filter-label {
  color: #53657e;
}

html[data-theme="light"] .filter-label select {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.2);
}

html[data-theme="light"] .site-footer {
  color: #53657e;
  background: #ffffff;
}

html[data-theme="light"] .site-footer a {
  color: #344b68;
}

html[data-theme="light"] .profile-avatar {
  color: #ffffff;
}

html[data-theme="light"] .profile-result-score strong,
html[data-theme="light"] .profile-best-score,
html[data-theme="light"] .profile-performance-badge {
  color: #182438;
}

html[data-theme="light"] .theme-choice {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.18);
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.20);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #71819a;
}

html[data-theme="light"] .category-pill {
  background: rgba(0,160,210,.08);
}

html[data-theme="light"] .maintenance-banner {
  color: #07132f;
}

html[data-theme="light"] .site-confirm-overlay {
  background: rgba(30,45,70,.35);
}

html[data-theme="light"] .site-confirm-dialog {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.18);
  box-shadow: 0 24px 70px rgba(30,50,80,.20);
}

html[data-theme="light"] .site-confirm-dialog h2 {
  color: #182438;
}

html[data-theme="light"] .site-confirm-dialog p {
  color: #53657e;
}

/* ===== Light theme: comments and contrast fixes ===== */
html[data-theme="light"] .comments-card,
html[data-theme="light"] .engagement-card,
html[data-theme="light"] .leaderboard-card {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.16);
}

html[data-theme="light"] #quiz-comment-composer {
  border-bottom-color: rgba(46,72,108,.13);
}

html[data-theme="light"] .comment-form label,
html[data-theme="light"] .quiz-comment-form label {
  color: #25364d;
}

html[data-theme="light"] .comment-form textarea,
html[data-theme="light"] .quiz-comment-form textarea {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.20);
  box-shadow: none;
}

html[data-theme="light"] .comment-form textarea::placeholder,
html[data-theme="light"] .quiz-comment-form textarea::placeholder {
  color: #71819a;
}

html[data-theme="light"] .comment-thread,
html[data-theme="light"] .quiz-comment {
  border-top-color: rgba(46,72,108,.12);
  border-bottom-color: rgba(46,72,108,.12);
}

html[data-theme="light"] .comment-card p,
html[data-theme="light"] .quiz-comment p {
  color: #344862;
}

html[data-theme="light"] .comment-meta span,
html[data-theme="light"] .quiz-comment-meta time,
html[data-theme="light"] .comment-action,
html[data-theme="light"] .comment-login-note,
html[data-theme="light"] .comments-empty,
html[data-theme="light"] .quiz-comment-report {
  color: #5b6d86;
}

html[data-theme="light"] .comment-replies {
  background: #f2f6fa;
  border-left-color: rgba(0,160,210,.22);
}

html[data-theme="light"] .comment-action {
  background: #ffffff;
  border-color: rgba(46,72,108,.18);
}

html[data-theme="light"] .comment-action:hover {
  color: #18344d;
  background: #eef8fc;
}

html[data-theme="light"] .hero h1 {
  background: none;
  -webkit-text-fill-color: #182438;
  color: #182438;
}

html[data-theme="light"] .hero-text {
  color: #53657e;
}

html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .section-heading p {
  color: #182438;
}

html[data-theme="light"] .section-heading p {
  color: #53657e;
}

html[data-theme="light"] .leaderboard-header,
html[data-theme="light"] .leaderboard-row,
html[data-theme="light"] .leaderboard-cell {
  color: #344862;
}

html[data-theme="light"] .leaderboard-header {
  background: #f1f5f9;
}

html[data-theme="light"] .notification-item:hover,
html[data-theme="light"] .account-tab,
html[data-theme="light"] .account-fine-print {
  color: #53657e;
}

html[data-theme="light"] .account-tabs {
  background: #f1f5f9;
  border-color: rgba(46,72,108,.14);
}

html[data-theme="light"] .account-tab.active {
  color: #10233a;
}

html[data-theme="light"] .profile-history-card,
html[data-theme="light"] .friend-card,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .challenge-notice,
html[data-theme="light"] .challenge-friend {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.16);
}

html[data-theme="light"] .challenge-notice p,
html[data-theme="light"] .challenge-friend p,
html[data-theme="light"] .friend-card small,
html[data-theme="light"] .achievement-card p {
  color: #53657e;
}

/* ===== Light theme: comment composer and header polish ===== */
html[data-theme="light"] .site-header {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(46,72,108,.12);
}

html[data-theme="light"] .brand {
  color: #182438;
}

html[data-theme="light"] .brand span {
  color: #182438;
}

html[data-theme="light"] .comment-form-card {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.16);
  box-shadow: 0 12px 36px rgba(40,60,90,.08);
}

html[data-theme="light"] .comment-form-card .quiz-comment-form label {
  color: #25364d;
}

html[data-theme="light"] .quiz-comment-form-row small {
  color: #53657e;
}

html[data-theme="light"] .comment-feedback {
  color: #087f58;
}

/* ===== Light theme: contact page ===== */
html[data-theme="light"] .contact-card {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.16);
  box-shadow: 0 12px 36px rgba(40,60,90,.08);
}

html[data-theme="light"] .contact-card h1 {
  color: #182438;
}

html[data-theme="light"] .contact-card > p:not(.eyebrow) {
  color: #53657e;
}

html[data-theme="light"] .contact-form label {
  color: #25364d;
}

html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form textarea {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.20);
}

html[data-theme="light"] .contact-form input::placeholder,
html[data-theme="light"] .contact-form textarea::placeholder {
  color: #71819a;
}

html[data-theme="light"] .contact-form input:focus,
html[data-theme="light"] .contact-form textarea:focus {
  background: #ffffff;
  border-color: #27b8df;
  box-shadow: 0 0 0 3px rgba(39,184,223,.12);
}

html[data-theme="light"] .report-target {
  background: #f1f8fc;
  border-color: rgba(0,160,210,.18);
}

html[data-theme="light"] .report-target strong {
  color: #182438;
}

html[data-theme="light"] .contact-success {
  color: #087f58;
  background: #effaf5;
}

html[data-theme="light"] .contact-error {
  color: #a1264e;
  background: #fff1f5;
}

/* ===== Light theme: global text contrast ===== */
html[data-theme="light"] {
  --muted: #465a74;
  --cyan: #087fa8;
}

html[data-theme="light"] .category-pill,
html[data-theme="light"] .engagement-badge {
  color: #17627b;
  border-color: rgba(8,127,168,.22);
  background: rgba(8,127,168,.07);
}

html[data-theme="light"] .eyebrow {
  color: #8a6500;
}

html[data-theme="light"] .home-kicker,
html[data-theme="light"] .home-latest-content::after {
  color: #17627b;
}

html[data-theme="light"] .profile-section-label,
html[data-theme="light"] .profile-performance-badge {
  color: #36516f;
}

html[data-theme="light"] .quiz-comment-report,
html[data-theme="light"] .comment-action,
html[data-theme="light"] .comment-meta span {
  color: #465a74;
}

html[data-theme="light"] .site-footer a:hover,
html[data-theme="light"] .top-nav a:hover {
  color: #18344d;
}

/* ===== Light theme: final contact page override ===== */
html[data-theme="light"] .site-main > .contact-page .contact-card {
  color: #182438 !important;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.16) !important;
  box-shadow: 0 16px 42px rgba(40,60,90,.10) !important;
}

html[data-theme="light"] .site-main > .contact-page .contact-card > h1 {
  color: #182438 !important;
}

html[data-theme="light"] .site-main > .contact-page .contact-card > p:not(.eyebrow) {
  color: #465a74 !important;
}

html[data-theme="light"] .site-main > .contact-page .contact-form label {
  color: #25364d !important;
}

html[data-theme="light"] .site-main > .contact-page .contact-form input,
html[data-theme="light"] .site-main > .contact-page .contact-form textarea {
  color: #182438 !important;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.22) !important;
}

html[data-theme="light"] .site-main > .contact-page .contact-form input::placeholder,
html[data-theme="light"] .site-main > .contact-page .contact-form textarea::placeholder {
  color: #667892 !important;
}

html[data-theme="light"] .site-main > .contact-page .report-target {
  color: #182438;
  background: #f1f8fc !important;
  border-color: rgba(8,127,168,.18) !important;
}

html[data-theme="light"] .site-main > .contact-page .report-target strong {
  color: #182438 !important;
}

html[data-theme="light"] .site-main > .contact-page .report-target span {
  color: #465a74 !important;
}

/* ===== Light theme: actual contact.php layout ===== */
html[data-theme="light"] .page-hero {
  color: #182438;
}

html[data-theme="light"] .page-hero h1 {
  color: #182438 !important;
}

html[data-theme="light"] .page-hero > p:not(.eyebrow) {
  color: #465a74 !important;
}

html[data-theme="light"] .page-hero .eyebrow {
  color: #087fa8 !important;
}

html[data-theme="light"] .content-section {
  color: #182438;
}

html[data-theme="light"] .content-section .contact-form {
  padding: 30px;
  border: 1px solid rgba(46,72,108,.16);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(40,60,90,.10);
}

html[data-theme="light"] .content-section .contact-form label {
  color: #25364d !important;
}

html[data-theme="light"] .content-section .contact-form input,
html[data-theme="light"] .content-section .contact-form textarea {
  color: #182438 !important;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.22) !important;
}

html[data-theme="light"] .content-section .contact-form input::placeholder,
html[data-theme="light"] .content-section .contact-form textarea::placeholder {
  color: #667892 !important;
}

html[data-theme="light"] .content-section .contact-form input:focus,
html[data-theme="light"] .content-section .contact-form textarea:focus {
  border-color: #087fa8 !important;
  box-shadow: 0 0 0 3px rgba(8,127,168,.12);
}

html[data-theme="light"] .content-section .notice.success,
html[data-theme="light"] .content-section .notice.error {
  color: #25364d;
}

@media (max-width: 620px) {
  html[data-theme="light"] .content-section .contact-form {
    padding: 22px 18px;
  }
}

/* ===== Light theme: account page contrast pass ===== */
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .profile-panel,
html[data-theme="light"] .profile-stat,
html[data-theme="light"] .profile-engagement-panel,
html[data-theme="light"] .profile-friends-panel,
html[data-theme="light"] .profile-history-panel,
html[data-theme="light"] .profile-history-card,
html[data-theme="light"] .profile-best-card,
html[data-theme="light"] .achievement-card,
html[data-theme="light"] .friend-card,
html[data-theme="light"] .profile-security-card,
html[data-theme="light"] .profile-xp-benefits,
html[data-theme="light"] .account-dialog {
  color: #182438;
  background: #ffffff;
  border-color: rgba(46,72,108,.16);
}

html[data-theme="light"] .profile-hero h1,
html[data-theme="light"] .profile-panel-heading,
html[data-theme="light"] .profile-panel-heading h2,
html[data-theme="light"] .profile-panel-heading h3,
html[data-theme="light"] .profile-security-card h3,
html[data-theme="light"] .profile-xp-total strong,
html[data-theme="light"] .profile-xp-benefits strong,
html[data-theme="light"] .achievement-card strong,
html[data-theme="light"] .friend-card strong,
html[data-theme="light"] .profile-best-copy strong,
html[data-theme="light"] .profile-result-main strong {
  color: #182438 !important;
}

html[data-theme="light"] .profile-help,
html[data-theme="light"] .account-copy,
html[data-theme="light"] .profile-email,
html[data-theme="light"] .profile-member-since,
html[data-theme="light"] .profile-performance-copy p,
html[data-theme="light"] .profile-security-card p,
html[data-theme="light"] .profile-best-copy small,
html[data-theme="light"] .profile-result-main small,
html[data-theme="light"] .friend-card small,
html[data-theme="light"] .achievement-card p,
html[data-theme="light"] .profile-history-main p {
  color: #465a74 !important;
}

html[data-theme="light"] .profile-section-label,
html[data-theme="light"] .profile-security-card-label,
html[data-theme="light"] .profile-best-number,
html[data-theme="light"] .profile-details dt {
  color: #53677f !important;
}

html[data-theme="light"] .profile-details dd,
html[data-theme="light"] .profile-result-score,
html[data-theme="light"] .profile-best-score {
  color: #25364d !important;
}

html[data-theme="light"] .profile-details > div,
html[data-theme="light"] .profile-result-row {
  border-color: rgba(46,72,108,.12);
}

html[data-theme="light"] .profile-score-ring {
  background:
    radial-gradient(circle at center, #ffffff 59%, transparent 60%),
    conic-gradient(#087fa8 var(--profile-progress), #dce5ef 0);
  box-shadow: 0 0 30px rgba(8,127,168,.08);
}

html[data-theme="light"] .profile-score-ring strong {
  color: #182438;
}

html[data-theme="light"] .profile-score-ring span {
  color: #53677f;
}

html[data-theme="light"] .profile-performance-badge,
html[data-theme="light"] .profile-inline-link {
  color: #087fa8 !important;
  background: rgba(8,127,168,.07);
  border-color: rgba(8,127,168,.20);
}

html[data-theme="light"] .profile-inline-link {
  background: transparent;
}

html[data-theme="light"] .profile-inline-link:hover {
  color: #075d7c !important;
}

html[data-theme="light"] .profile-xp-total span,
html[data-theme="light"] .profile-xp-benefits ul {
  color: #465a74 !important;
}

html[data-theme="light"] .profile-xp-track {
  background: #dce5ef;
}

html[data-theme="light"] .profile-xp-benefits {
  background: #f5f8fb;
}

html[data-theme="light"] .account-tabs {
  background: #eef3f8;
}

html[data-theme="light"] .account-tab {
  color: #53677f;
}

html[data-theme="light"] .account-tab.active {
  color: #182438;
  background: #ffffff;
}

html[data-theme="light"] .account-fine-print {
  color: #53677f !important;
}

/* ===== Light theme: eliminate pale-blue text across the public site ===== */
html[data-theme="light"] {
  --cyan-soft: #087fa8;
  --muted-strong: #465a74;
  --public-muted: #465a74;
  --public-accent: #087fa8;
  --public-line: rgba(46,72,108,.16);
  --cyan: #087fa8;
}

html[data-theme="light"] .top-nav > a,
html[data-theme="light"] .home-quiz-card p,
html[data-theme="light"] .home-benefits-list p,
html[data-theme="light"] .home-latest-content p,
html[data-theme="light"] .quiz-card p,
html[data-theme="light"] .quiz-card .quiz-card-footer,
html[data-theme="light"] .form-card label,
html[data-theme="light"] .contact-form label,
html[data-theme="light"] .account-form label {
  color: #465a74 !important;
}

html[data-theme="light"] .home-kicker,
html[data-theme="light"] .home-intro-copy h1 em,
html[data-theme="light"] .home-category,
html[data-theme="light"] .home-round-action,
html[data-theme="light"] .home-section-title > a,
html[data-theme="light"] .home-proof-points b,
html[data-theme="light"] .challenge-kicker,
html[data-theme="light"] .profile-inline-link {
  color: #087fa8 !important;
}

html[data-theme="light"] .category-pill,
html[data-theme="light"] .engagement-badge,
html[data-theme="light"] .current-user .leaderboard-cell.player::after {
  color: #17627b !important;
}

html[data-theme="light"] .quiz-card .quiz-card-footer span:last-child {
  color: #36516f !important;
}

html[data-theme="light"] .quiz-card .quiz-card-footer,
html[data-theme="light"] .home-recent-arrow {
  color: #53677f !important;
}

html[data-theme="light"] .pending-email-box strong,
html[data-theme="light"] .pending-email-box span {
  color: #36516f !important;
}

html[data-theme="light"] .profile-score-ring span,
html[data-theme="light"] .profile-best-number,
html[data-theme="light"] .profile-details dt,
html[data-theme="light"] .account-fine-print {
  color: #53677f !important;
}

html[data-theme="light"] .profile-performance-badge {
  color: #17627b !important;
  background: rgba(8,127,168,.07);
  border-color: rgba(8,127,168,.20);
}

html[data-theme="light"] .answer-button.selected .answer-letter {
  color: #ffffff !important;
  background: #087fa8 !important;
}

html[data-theme="light"] .button-primary {
  color: #ffffff !important;
  background: #087fa8 !important;
}

html[data-theme="light"] .result-score {
  background: none;
  -webkit-text-fill-color: #087fa8;
  color: #087fa8;
}

html[data-theme="light"] .hero h1 {
  background: none;
  -webkit-text-fill-color: #182438;
  color: #182438;
}

html[data-theme="light"] .home-primary-action {
  color: #ffffff !important;
  background: #087fa8 !important;
}

html[data-theme="light"] .home-primary-action span {
  color: #ffffff !important;
  background: #075d7c !important;
}

html[data-theme="light"] .home-art-card-main strong small {
  color: #53677f !important;
}

html[data-theme="light"] .home-art-stars {
  color: #087fa8 !important;
}

/* ===== Light theme: About page ===== */
html[data-theme="light"] .page-section > h1 {
  color: #182438 !important;
}

html[data-theme="light"] .page-section > .hero-text {
  color: #465a74 !important;
}

html[data-theme="light"] .page-section .quiz-feature,
html[data-theme="light"] .page-section .quiz-card {
  color: #182438;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.16) !important;
  box-shadow: 0 14px 38px rgba(40,60,90,.08);
}

html[data-theme="light"] .page-section .quiz-feature h2,
html[data-theme="light"] .page-section .quiz-feature h3,
html[data-theme="light"] .page-section .quiz-card h2 {
  color: #182438 !important;
}

html[data-theme="light"] .page-section .quiz-feature p,
html[data-theme="light"] .page-section .quiz-card p {
  color: #465a74 !important;
}

html[data-theme="light"] .page-section .button-secondary {
  color: #24364e !important;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.20) !important;
}

html[data-theme="light"] .page-section .button-secondary:hover {
  color: #18344d !important;
  background: #f1f7fb !important;
}

/* ===== Legal pages: light theme ===== */
.legal-updated {
  margin: 10px 0 30px;
  color: var(--muted);
  font-size: 12px;
}

.legal-page .legal-card {
  margin-top: 18px;
}

.legal-page .legal-card h2 {
  color: var(--text);
}

.legal-page .legal-card p {
  color: var(--muted);
  line-height: 1.75;
}

.legal-page .legal-card a {
  color: var(--cyan);
  font-weight: 750;
}

html[data-theme="light"] .legal-updated {
  color: #53677f;
}

html[data-theme="light"] .legal-page .legal-card {
  color: #182438;
  background: #ffffff !important;
  border-color: rgba(46,72,108,.16) !important;
  box-shadow: 0 14px 38px rgba(40,60,90,.08);
}

html[data-theme="light"] .legal-page .legal-card h2 {
  color: #182438 !important;
}

html[data-theme="light"] .legal-page .legal-card p {
  color: #465a74 !important;
}

html[data-theme="light"] .legal-page .legal-card a {
  color: #087fa8 !important;
}


/* Language selector: compact dropdown for the public header. */
.site-header .language-switcher {
  display: inline-flex !important;
  align-items: center;
  margin-left: 2px;
}

.site-header .language-switcher select {
  min-width: 112px;
  height: 38px;
  padding: 0 30px 0 12px;
  color: #fff;
  border: 1px solid rgba(53, 199, 255, 0.28);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.site-header .language-switcher select:focus {
  outline: 2px solid rgba(53, 199, 255, 0.42);
  outline-offset: 2px;
}

html[data-theme="light"] .site-header .language-switcher select {
  color: #182438;
  border-color: rgba(46, 72, 108, 0.2);
  background: #fff;
}

@media (max-width: 700px) {
  .site-header .language-switcher {
    display: inline-flex !important;
  }
}


/* Refined public language selector. */
.site-header .language-switcher {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  margin: 0;
}

.site-header .language-switcher select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 128px;
  height: 42px;
  padding: 0 38px 0 14px;
  color: #f7fbff;
  border: 1px solid rgba(91, 211, 255, 0.34);
  border-radius: 11px;
  background-color: rgba(14, 28, 65, 0.96);
  background-image: linear-gradient(45deg, transparent 50%, #9db0ca 50%), linear-gradient(135deg, #9db0ca 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.site-header .language-switcher select:hover {
  border-color: rgba(91, 211, 255, 0.62);
  background-color: rgba(19, 38, 82, 0.98);
}

.site-header .language-switcher select:focus {
  outline: none;
  border-color: rgba(91, 211, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(91, 211, 255, 0.13), 0 6px 20px rgba(0, 0, 0, 0.18);
}

.site-header .language-switcher select option {
  color: #f7fbff;
  background: #101d3d;
  font-weight: 700;
}

html[data-theme="light"] .site-header .language-switcher select {
  color: #182438;
  border-color: rgba(46, 72, 108, 0.20);
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #53657e 50%), linear-gradient(135deg, #53657e 50%, transparent 50%);
  box-shadow: 0 4px 14px rgba(46, 72, 108, 0.10);
}

html[data-theme="light"] .site-header .language-switcher select option {
  color: #182438;
  background: #fff;
}

@media (max-width: 840px) {
  .site-header .language-switcher select {
    min-width: 116px;
  }
}

@media (max-width: 620px) {
  .site-header .language-switcher select {
    min-width: 108px;
    height: 40px;
    padding-left: 12px;
  }
}
