/* ==========================================================================
   CogniTest Modern CSS - Editorial Light & Executive Slate Design System
   High-Contrast, Clean Typography, Unified Components & Mobile-First UX
   ========================================================================== */

:root {
  /* Surface & Background */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #2563eb;

  /* Brand Primary & Accents */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;

  --accent-cyan: #0369a1;
  --accent-indigo: #4f46e5;
  --accent-emerald: #047857;
  --accent-amber: #92400e;
  --accent-rose: #be123c;

  /* Text & Typography */
  --text-main: #0f172a;       /* Slate-900: Crisp & deep */
  --text-muted: #334155;      /* Slate-700: High-contrast body */
  --text-dim: #64748b;        /* Slate-500: Neutral captions */

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* Soft High-End Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 12px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 24px 48px -12px rgba(15, 23, 42, 0.18);

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ==========================================================================
   Header & Navigation (Universal 100% Coherent)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 0;
  min-height: 65px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--accent-indigo));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 36px;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
}

@media (max-width: 360px) {
  .header-inner { gap: 6px; }
  .brand { font-size: 1.05rem; gap: 6px; }
  .brand-icon { width: 28px; height: 28px; flex-shrink: 0; }
  .header-actions { gap: 6px; }
  .header-actions .lang-btn { padding: 6px 8px; gap: 4px; font-size: 0.78rem; }
}

.mobile-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  transition: var(--transition);
}

.mobile-toggle-btn:hover {
  background: var(--border-subtle);
}

.hamburger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.2s ease;
}

.mobile-toggle-btn.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle-btn.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-toggle-btn.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Language Switcher Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}

.lang-btn:hover {
  border-color: var(--border-medium);
  background: #ffffff;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  min-width: 170px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 200;
}

.lang-menu.open {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.lang-option:hover, .lang-option.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   Badges, Buttons & Call to Actions
   ========================================================================== */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--text-main);
}

/* Ad Slots: Hidden by default to eliminate CLS until initialized */
[data-ad-slot] {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 50px 0 25px;
  text-align: center;
  min-height: 380px;
  contain: layout style;
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  color: var(--text-main);
  min-height: 75px;
}

.hero-desc {
  max-width: 680px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.65;
  min-height: 54px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 52px;
  contain: layout;
}

@media (max-width: 640px) {
  .hero-actions {
    min-height: 245px;
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   HOMEPAGE DAILY HOROSCOPE COMPONENT (Front Page & Prominent)
   ========================================================================== */
.horoscope-home-section {
  margin: 25px auto 45px;
  min-height: 520px;
  contain: layout style;
}

.horoscope-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  min-height: 480px;
}

.horoscope-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  min-height: 60px;
}

.zodiac-strip {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  margin-bottom: 25px;
  min-height: 50px;
}

.horo-reading-card-main {
  min-height: 320px;
}

#homeHoroScoresGrid {
  min-height: 120px;
}

@media (max-width: 900px) {
  .zodiac-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}
@media (max-width: 550px) {
  .zodiac-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.zodiac-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.zodiac-chip:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.zodiac-chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--primary);
}

.zodiac-chip .symbol {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 4px;
}

.zodiac-chip .name {
  font-size: 0.76rem;
  font-weight: 600;
}

.horo-reading-card-main {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.horo-reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.horo-statement-box {
  background: rgba(37, 99, 235, 0.04);
  border-left: 4px solid var(--primary, #2563eb);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 18px 0 20px;
  text-align: left;
}

.horo-statement-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary, #2563eb);
  margin-bottom: 6px;
}

.horo-statement-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-main);
  margin: 0;
  font-weight: 500;
}

.horo-score-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  transition: var(--transition);
}

.horo-score-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* ==========================================================================
   Featured Scientific IQ Assessment Card (CHC Standard)
   ========================================================================== */
.featured-iq-card {
  margin: 35px auto;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.featured-iq-badge {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: inline-block;
}

.featured-iq-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.featured-iq-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 820px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.metric-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.metric-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Quizzes Grid & Clean Cards
   ========================================================================== */
.section-quizzes {
  padding: 35px 0 60px;
}

.section-head {
  text-align: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
}

.category-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.cat-btn {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.cat-btn:hover, .cat-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.quiz-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
}

.quiz-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-icon {
  font-size: 2rem;
}

.quiz-meta {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.quiz-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.35;
}

.quiz-card-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.quiz-card-btn {
  width: 100%;
  text-align: center;
  padding: 11px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.94rem;
  transition: var(--transition);
}

.quiz-card-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* ==========================================================================
   IQ Test & Interactive Assessments Engine
   ========================================================================== */
.iq-test-wrapper {
  max-width: 820px;
  margin: 30px auto 60px;
  padding: 0 16px;
}

.iq-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: var(--bg-card);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.iq-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  margin-bottom: 25px;
  overflow: hidden;
}

.iq-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.iq-question-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
  margin-bottom: 25px;
}

.iq-pillar-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.iq-question-text {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 24px;
  color: var(--text-main);
}

.iq-svg-display {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-sm);
}

.iq-svg-display svg {
  max-width: 100%;
  max-height: 260px;
}

.iq-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.iq-option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-align: left;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.iq-option-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.iq-option-btn.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 0 0 2px var(--primary);
}

.option-letter {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.iq-option-btn.selected .option-letter {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.iq-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Transition Interstitial Buffer Screen
   ========================================================================== */
.analyzing-modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.analyzing-modal.show {
  display: flex;
}

.pulse-loader {
  width: 70px;
  height: 70px;
  border: 4px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyzing-title {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.analyzing-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 16px;
}

/* ==========================================================================
   Results Screen & Psychometric Score Display
   ========================================================================== */
.results-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-card);
  text-align: center;
  max-width: 820px;
  margin: 30px auto;
}

.iq-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0 25px;
}

.iq-score-big {
  font-size: clamp(3.6rem, 7vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  margin-bottom: 8px;
}

.iq-percentile-badge {
  display: inline-flex;
  padding: 6px 16px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  color: var(--accent-emerald);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
}

.radar-chart-container {
  max-width: 440px;
  margin: 20px auto;
}

.radar-chart-container svg {
  width: 100%;
  height: auto;
}

.pillars-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 25px 0;
  text-align: left;
}

.pillar-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.pillar-item-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.pillar-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pillar-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
}

.btn-share.whatsapp {
  background: #0f766e;
  color: #fff;
}

.btn-share.telegram {
  background: #0088cc;
  color: #fff;
}

.btn-share.x-twitter {
  background: #0f172a;
  color: #fff;
}

.btn-viral-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 18px auto 12px auto;
  padding: 14px 24px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-viral-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(37, 211, 102, 0.65);
  filter: brightness(1.08);
}

.btn-viral-wa svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   EDITORIAL COLUMNS & SCIENTIFIC RESEARCH SECTION
   ========================================================================== */
.editorial-section {
  padding: 50px 0;
  border-top: 1px solid var(--border-subtle);
}

.editorial-header {
  text-align: center;
  margin-bottom: 30px;
}

.editorial-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.editorial-subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 20px;
}

.editorial-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}

.editorial-filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.editorial-filter-btn:hover,
.editorial-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.editorial-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.editorial-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-hover);
}

.editorial-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.editorial-badge {
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.editorial-readtime {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.editorial-card-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text-main);
}

.editorial-card-summary {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.editorial-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.editorial-date {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.editorial-read-link {
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 700;
}

/* Modal Reader per Approfondimento Scientifico */
.editorial-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.editorial-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 34px;
  box-shadow: var(--shadow-modal);
  position: relative;
}

.editorial-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.editorial-modal-close:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.editorial-full-text p {
  margin-bottom: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  font-size: 1rem;
}

.editorial-takeaways-box {
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 25px 0;
}

.editorial-takeaways-box ul {
  padding-left: 20px;
  margin: 0;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   ASTROLOGY, ZODIAC & NATAL CHART MODERN STYLING
   ========================================================================== */
.zodiac-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 30px;
}

.zodiac-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.zodiac-btn:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.zodiac-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.zodiac-btn .symbol {
  font-size: 1.6rem;
  line-height: 1;
}

.zodiac-btn .name {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.natal-input-group {
  margin-bottom: 18px;
}

.natal-input-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.natal-input {
  width: 100%;
  padding: 13px 16px;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.natal-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.natal-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  margin: 25px 0;
  box-shadow: var(--shadow-sm);
}

.natal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.natal-table th {
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.natal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.natal-table tr:hover td {
  background: var(--bg-subtle);
}

.element-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.element-pill.fire {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.element-pill.earth {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.element-pill.air {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.element-pill.water {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* ==========================================================================
   Natal Chart Wheel & Advanced Subtabs (Astro-Seek Interactive Style)
   ========================================================================== */
.natal-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin: 20px 0 24px;
}

.natal-subtab-btn {
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
  padding: 9px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .natal-subtab-btn {
    flex: 1;
    min-width: auto;
    font-size: 0.9rem;
    padding: 11px 16px;
  }
}

.natal-subtab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
}

.natal-subtab-btn.active {
  background: #ffffff;
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.12);
}

.natal-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.natal-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.natal-wheel-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 8px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.natal-wheel-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}

.natal-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 14px;
}

.natal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.natal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.aspects-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.aspect-stat-card {
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.aspect-stat-card .val {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-main);
}

.aspect-stat-card .lbl {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.aspect-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.aspect-pill.harmonic {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.aspect-pill.dynamic {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.aspect-pill.major {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* ==========================================================================
   AdSense & Monetag Display Containers
   ========================================================================== */
.ad-slot-wrapper {
  margin: 25px auto;
  text-align: center;
  max-width: 970px;
  width: 100%;
}

.ad-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.ad-banner-box {
  background: #ffffff;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Footer & Legal
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 35px 0;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-toggle-btn {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-modal);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px;
    gap: 12px;
    z-index: 150;
  }
  .nav-links.mobile-open {
    display: flex;
    animation: mobileNavFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-link {
    width: 100%;
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .featured-iq-card {
    padding: 24px;
  }
  .iq-question-card {
    padding: 22px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@keyframes mobileNavFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   ADVERTISING SLOTS (Hidden by default when in placeholder/clean mode)
   ========================================================================== */
[data-ad-slot]:empty,
[data-ad-slot].ad-hidden,
.ad-slot-wrapper.ad-hidden,
.ad-banner-box.ad-hidden {
  display: none !important;
}

/* ==========================================================================
   OFFICIAL A4 PRINT CERTIFICATE STYLING (@media print)
   ========================================================================== */
.print-certificate-header,
.print-certificate-footer {
  display: none;
}

.print-invitation-box {
  background: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 22px 0;
  text-align: center;
}

/* ==========================================================================
   Ko-fi Support Button & Results Cards
   ========================================================================== */
.btn-kofi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #c42b28 0%, #b4231b 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(255, 94, 91, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-kofi:hover {
  background: linear-gradient(135deg, #b4231b 0%, #991b1b 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 91, 0.5);
  color: #ffffff !important;
}

.btn-kofi .kofi-cup {
  font-size: 1.15rem;
  display: inline-block;
  animation: kofiWiggle 2.5s infinite ease-in-out;
}

.btn-kofi-header {
  display: none !important;
}

@media (min-width: 769px) {
  .btn-kofi-header {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 0.88rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 94, 91, 0.25);
  }
}

.mobile-nav-kofi {
  display: none;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .mobile-nav-kofi {
    display: block;
  }
}

@keyframes kofiWiggle {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(-12deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-8deg); }
  60% { transform: rotate(8deg); }
  75% { transform: rotate(0deg); }
}

.kofi-results-card {
  margin: 30px 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(255, 94, 91, 0.08) 0%, rgba(37, 99, 235, 0.05) 100%);
  border: 1.5px solid rgba(255, 94, 91, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.kofi-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.kofi-big-icon {
  font-size: 2.2rem;
  background: rgba(255, 94, 91, 0.15);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kofi-card-left h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-main);
}

.kofi-card-left p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .kofi-results-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 16px;
  }
  .kofi-card-left {
    flex-direction: column;
    text-align: center;
  }
  .btn-kofi-header {
    display: none !important;
  }
}

/* ==========================================================================
   Culture-Fair Matrix Reasoning Engine UI (High-IQ Standard)
   ========================================================================== */
.matrix-test-wrapper {
  max-width: 860px;
  margin: 30px auto 60px;
  padding: 0 16px;
}

.matrix-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: var(--bg-card);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.matrix-test-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
  margin-bottom: 25px;
}

.matrix-matrix-display {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #070d1d;
  border: 2px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(15, 23, 42, 0.08);
}

.matrix-puzzle-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
}

.matrix-instruction-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 16px;
}

.matrix-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .matrix-options-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.matrix-option-card {
  position: relative;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.matrix-option-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(56, 189, 248, 0.18);
}

.matrix-option-card.selected {
  border-color: #38bdf8;
  background: #0b1f3b;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45);
}

.matrix-option-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #1e293b;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #475569;
}

.matrix-option-card.selected .matrix-option-badge {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

.matrix-option-graphic {
  width: 100%;
  max-width: 100px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.matrix-option-graphic svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Dual Psychometric Scores Display */
.matrix-dual-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 22px 0 16px;
}

@media (max-width: 600px) {
  .matrix-dual-scores {
    grid-template-columns: 1fr;
  }
}

.matrix-score-tile {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
}

.matrix-score-tile.primary-tile {
  background: #eff6ff;
  border-color: #93c5fd;
}

.matrix-score-number {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  color: #1e3a8a;
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}

.matrix-score-scale {
  font-size: 0.82rem;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.matrix-status-box {
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 25px;
  text-align: left;
}

.matrix-status-box.qualified {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 2px solid #10b981;
}

.matrix-status-box.qualified .matrix-seal-title {
  color: #065f46;
  font-size: 1.25rem;
  font-weight: 900;
}

.matrix-status-box.superior {
  background: #eff6ff;
  border: 2px solid #3b82f6;
}

.matrix-status-box.superior .matrix-seal-title {
  color: #1e40af;
  font-size: 1.25rem;
  font-weight: 900;
}

.matrix-status-box.normal {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
}

.matrix-status-box.normal .matrix-seal-title {
  color: #334155;
  font-size: 1.25rem;
  font-weight: 800;
}

.matrix-seal-icon {
  font-size: 2.2rem;
  line-height: 1;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  [data-ad-slot],
  .ad-slot-wrapper,
  .ad-banner-box,
  .site-header,
  .site-footer,
  .share-actions,
  .print-invitation-box,
  .kofi-results-card,
  .btn-kofi,
  .iq-nav-controls,
  .analyzing-modal,
  .btn-primary,
  .btn-secondary,
  .btn-share,
  .badge-pill,
  #langSwitcher,
  #iqProgressTrack,
  .category-filter {
    display: none !important;
  }

  .results-card {
    background: #ffffff !important;
    border: 3px double #0f172a !important;
    box-shadow: none !important;
    padding: 25px !important;
    margin: 0 !important;
    max-width: 100% !important;
    color: #0f172a !important;
    page-break-inside: avoid !important;
  }

  .iq-score-big {
    color: #0284c7 !important;
    font-size: 3.8rem !important;
  }

  .iq-percentile-badge {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
  }

  .pillar-item {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
  }

  .pillar-bar-bg {
    background: #e2e8f0 !important;
  }

  .pillar-bar-fill {
    background: #0284c7 !important;
  }

  .print-certificate-header {
    display: block !important;
    text-align: center;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }

  .print-certificate-footer {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 25px;
    border-top: 1px solid #cbd5e1;
    padding-top: 12px;
    font-size: 9pt;
    color: #475569;
  }
}

/* ==========================================================================
   Gamification Achievements & PWA Install Pill (Zero Sounds, Pure Luxury UX)
   ========================================================================== */
.cognitest-achievement-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(12px);
  z-index: 99999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  max-width: 380px;
}
.cognitest-achievement-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
.cognitest-achievement-toast .toast-icon {
  font-size: 2.2rem;
  background: rgba(56, 189, 248, 0.15);
  padding: 10px;
  border-radius: 12px;
  line-height: 1;
}
.cognitest-achievement-toast .toast-subtitle {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  text-transform: uppercase;
}
.cognitest-achievement-toast .toast-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0;
}
.cognitest-achievement-toast .toast-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Shelf & Badges */
.achievements-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.badge-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 16px 10px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.badge-item:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.badge-item.locked {
  opacity: 0.45;
  filter: grayscale(0.8);
}
.badge-icon-wrap {
  position: relative;
  font-size: 2rem;
  margin-bottom: 8px;
  display: inline-block;
}
.badge-lock {
  position: absolute;
  bottom: -4px;
  right: -8px;
  font-size: 0.9rem;
}
.badge-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.badge-rarity {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

/* PWA Floating Pill */
.pwa-install-pill {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.2s ease, background 0.2s ease;
}
.pwa-install-pill:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}
.pwa-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}


/* Readability review, October 2026. Keep text inside the viewport at narrow widths. */
body > main, .game-detail-container, .sudoku-container, .wiki-container {
  width: 100%;
  min-width: 0;
}
.footer-inner { flex-wrap: wrap; }
.footer-copy, .footer-nav { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.footer-nav { flex-wrap: wrap; }
.site-header .nav-link[href*="sudoku"], .hub-nav-pill[href*="sudoku"] { color: #075985 !important; }
.site-header .nav-link[href*="arcade"], .hub-nav-pill[href*="arcade"] { color: #92400e !important; }
.btn-primary[style*="gradient"] { background: linear-gradient(135deg, #0369a1, #1d4ed8) !important; }
.hub-card-tag, .digest-badge, #horoElementBadge { color: #334155 !important; }
#resTopPct, #resClassTitle, .pct-table .highlight-row td { color: #047857 !important; }
.badge-rarity { font-size: 0.75rem !important; }
.site-footer p { color: #475569 !important; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 3px;
}
:where(.game-cabinet, .arcade-cabinet, .widget-box) :focus-visible { outline-color: #7dd3fc; }
@media (max-width: 640px) {
  .quizzes-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { align-items: flex-start; }
  .header-inner { flex-wrap: wrap; }
  .header-actions { min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 6px !important; }
  .header-actions .lang-btn { padding: 6px 8px !important; gap: 4px !important; font-size: 0.8rem !important; }
  .header-actions .lang-name { max-width: 7em; overflow-wrap: anywhere; }
  .btn-primary, .btn-secondary { white-space: normal; overflow-wrap: anywhere; }
}

#horoScoresGrid .metric-box span[style*="color"],
#domainBars span:first-child { color: #334155 !important; }

@media (max-width: 640px) {
  .editorial-grid { grid-template-columns: minmax(0, 1fr); }
  .zodiac-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zodiac-chip { min-width: 0; padding-inline: 2px; }
  .zodiac-chip .name { max-width: 100%; overflow-wrap: anywhere; }
  .horo-reading-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Long translated words must wrap within the reading column. */
main { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .horo-reading-card-main [style*="display: flex"] { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 640px) {
  .hub-games-grid, .digest-grid,
  main [style*="grid-template-columns"][style*="minmax(320px"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
