/*
Theme Name: Birthday Rarity
Theme URI: https://birthdayrarity.com
Author: Birthday Rarity Team
Description: Birthday Rarity Checker — Discover how rare or common your birth date really is.
Version: 2.2.0
License: GNU General Public License v2 or later
Text Domain: birthdayrarity
*/

/* =============================================
   CSS VARIABLES
============================================= */
:root {
  --purple:       #7c3aed;
  --purple-dark:  #5b21b6;
  --purple-light: #8b5cf6;
  --purple-bg:    #f5f3ff;
  --purple-border:rgba(124,58,237,0.18);

  --amber:        #f59e0b;
  --amber-bg:     #fffbeb;

  --green:        #059669;
  --green-bg:     #ecfdf5;

  --red:          #dc2626;

  --white:        #ffffff;
  --bg:           #ffffff;
  --bg2:          #f8fafc;
  --bg3:          #f1f5f9;

  --text:         #1e293b;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  --border:       #e2e8f0;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 10px 40px rgba(0,0,0,0.1);
  --shadow-purple:0 4px 20px rgba(124,58,237,0.22);

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:    'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
}

/* =============================================
   RESET
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
input, select, textarea { font-family: var(--font-sans); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: var(--purple-light); border-radius: 3px; }

/* =============================================
   LAYOUT UTILITIES
============================================= */
.container     { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container--sm { max-width:  740px; margin: 0 auto; padding: 0 20px; }
.container--md { max-width:  940px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 400px) {
  .container, .container--sm, .container--md { padding: 0 14px; }
}
.section       { padding: 64px 0; }
.section--alt  { background: var(--bg2); }
.section--purple { background: var(--purple-bg); }
@media (max-width: 600px) {
  .section { padding: 44px 0; }
  .section-header { margin-bottom: 28px; }
}
.text-center   { text-align: center; }

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p  { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }

.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-bg);
  border: 1px solid var(--purple-border);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.section-header { text-align: center; margin-bottom: 44px; }
.section-header h2 { margin-bottom: 10px; }
.section-header p  { color: var(--text-muted); max-width: 500px; margin: 0 auto; font-size: 0.98rem; }

/* =============================================
   BUTTONS
============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple);
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(124,58,237,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}
.btn-outline:hover {
  background: var(--purple-bg);
  color: var(--purple-dark);
}
.btn-white {
  background: #fff;
  color: var(--purple);
  border-color: #fff;
}
.btn-white:hover {
  background: var(--purple-bg);
  border-color: var(--purple-bg);
}
.btn-ghost {
  background: var(--bg2);
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.btn-lg  { padding: 15px 32px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-sm  { padding: 8px 18px;  font-size: 0.85rem; }
.btn-full{ width: 100%; }

/* =============================================
   NAVBAR
============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--purple), var(--amber));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}
.logo-accent { color: var(--purple); }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--purple);
  background: var(--purple-bg);
}

.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-cta { display: flex; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  align-items: center;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle .bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-toggle.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 12px 20px 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 13px 0;
  border-bottom: 1px solid var(--bg3);
  text-decoration: none;
  transition: color 0.15s;
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover { color: var(--purple); }
.mobile-tool-btn {
  margin-top: 16px;
  text-align: center;
  width: 100%;
  justify-content: center;
}

@media (max-width: 820px) {
  .main-nav { display: none; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
}

body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

/* =============================================
   HERO — NO min-height:100vh (fixes blank space)
============================================= */
.hero {
  padding: 110px 20px 60px;
  text-align: center;
  background: linear-gradient(160deg, #faf5ff 0%, #fff 55%, #fffbeb 100%);
  position: relative;
  overflow: hidden;
}
@media (max-width: 600px) {
  .hero {
    padding: 88px 16px 48px;
  }
}
@media (max-width: 380px) {
  .hero {
    padding: 80px 14px 40px;
  }
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid var(--purple-border);
  color: var(--purple);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.hero-badge .dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;} 50%{opacity:0.3;} }

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 18px;
}
.hero-title .highlight { color: var(--purple); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.75;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
@media (max-width: 420px) {
  .hero-btns { flex-direction: column; align-items: center; margin-bottom: 32px; }
  .hero-btns .btn-lg { width: 100%; max-width: 300px; justify-content: center; }
}
.hero-stats {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
@media (max-width: 480px) {
  .hero-stats { gap: 18px; padding-top: 24px; }
  .hero-stat .val { font-size: 1.35rem; }
}
.hero-stat { text-align: center; }
.hero-stat .val {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}
.hero-stat .lbl {
  font-size: 0.74rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 4px;
}

/* =============================================
   TOOL SECTION
============================================= */
.tool-section {
  padding: 56px 20px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tool-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 540px) {
  .tool-card { padding: 22px 16px; }
  .tool-section { padding: 40px 14px; }
}
.tool-card-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  text-align: center;
}
.tool-card-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

/* Tool inputs — mobile-first grid */
.tool-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.tool-year-group {
  grid-column: 1 / -1;
}
@media (min-width: 520px) {
  .tool-inputs {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .tool-year-group {
    grid-column: auto;
  }
}

.input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.tool-select,
.tool-input {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.tool-select:focus,
.tool-input:focus {
  border-color: var(--purple);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.tool-select option { background: #fff; color: var(--text); }
/* hide number spinners */
.tool-input::-webkit-inner-spin-button,
.tool-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.tool-input[type=number] { -moz-appearance: textfield; }

.tool-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tool-check-btn { flex: 1; min-width: 200px; }
.tool-reset-btn { display: none; }

.tool-privacy {
  font-size: 11.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Results ────────────────────────── */
.results-box {
  display: none;
  margin-top: 24px;
  border-top: 2px solid var(--bg3);
  padding-top: 22px;
}
.results-box.show {
  display: block;
  animation: slideDown 0.35s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.result-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.ri-ultra    { background: #fef2f2; border: 2px solid #fecaca; }
.ri-rare     { background: #f5f3ff; border: 2px solid #ddd6fe; }
.ri-uncommon { background: #ecfdf5; border: 2px solid #a7f3d0; }
.ri-common   { background: #f0fdf4; border: 2px solid #bbf7d0; }
.ri-vcommon  { background: #f8fafc; border: 2px solid #cbd5e1; }

.result-tier-label {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.result-date-label { font-size: 0.88rem; color: var(--text-muted); }
.result-msg-label  { font-size: 0.84rem; color: var(--text-muted); margin-top: 2px; }

.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}
@media (max-width: 400px) {
  .result-stats-grid { grid-template-columns: 1fr 1fr; }
}
.r-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 8px;
  text-align: center;
}
.r-stat-val {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}
.r-stat-lbl {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

.result-bar-wrap { margin-bottom: 16px; }
.result-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.result-bar-track {
  height: 9px;
  background: var(--bg3);
  border-radius: 5px;
  overflow: hidden;
}
.result-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--purple), var(--amber));
  width: 0;
  transition: width 1s cubic-bezier(0.4,0,0.2,1);
}
.result-bar-ends {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-light);
  margin-top: 4px;
}

.result-insights {
  background: var(--purple-bg);
  border: 1px solid var(--purple-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.result-insights-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin-bottom: 8px;
}
.result-insights ul { display: flex; flex-direction: column; gap: 5px; }
.result-insights li {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.5;
}
.result-insights li::before {
  content: '✦';
  color: var(--amber);
  font-size: 9px;
  margin-top: 4px;
  flex-shrink: 0;
}

.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 400px) {
  .result-actions .btn { flex: 1; }
}

/* =============================================
   STATS BANNER
============================================= */
.stats-banner {
  background: var(--purple);
  padding: 36px 20px;
}
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
@media (max-width: 540px) {
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
.sbanner-val {
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.sbanner-lbl {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 5px;
}

/* =============================================
   STEPS
============================================= */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 820px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.step-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.step-num {
  width: 42px; height: 42px;
  background: var(--purple);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 12px;
}
.step-icon { font-size: 24px; margin-bottom: 10px; }
.step-title { font-size: 0.93rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.step-desc  { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   WHAT THE TOOL SHOWS — FACT CARDS
============================================= */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .facts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .facts-grid { grid-template-columns: 1fr; } }
.fact-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.fact-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.fact-icon  { font-size: 26px; margin-bottom: 12px; }
.fact-title { font-size: 0.97rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.fact-text  { font-size: 0.86rem; color: var(--text-muted); line-height: 1.68; }

/* =============================================
   RARITY SCALE
============================================= */
.rarity-scale { display: flex; flex-direction: column; gap: 10px; max-width: 680px; margin: 0 auto; }
.rarity-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: border-color 0.2s;
}
.rarity-row:hover { border-color: var(--purple); }
.rarity-row-icon  { font-size: 24px; width: 40px; text-align: center; flex-shrink: 0; }
.rarity-row-info  { flex: 1; min-width: 0; }
.rarity-row-name  { font-weight: 700; font-size: 0.93rem; color: var(--text); }
.rarity-row-desc  { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.rarity-row-pct   { font-size: 0.95rem; font-weight: 700; color: var(--purple); flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
  .rarity-row { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .rarity-row-icon { width: 28px; font-size: 20px; }
  .rarity-row-pct { font-size: 0.82rem; }
}

/* =============================================
   DATES TABLE
============================================= */
.table-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) { .table-pair { grid-template-columns: 1fr; } }
.table-sub-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }

.dates-table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1.5px solid var(--border); }
.dates-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.dates-table th {
  background: var(--bg2);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
}
.dates-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--bg3);
  color: var(--text);
}
.dates-table tr:last-child td { border-bottom: none; }
.dates-table tr:hover td { background: var(--bg2); }
.dates-table .t-rank  { color: var(--text-light); font-size: 0.75rem; }
.dates-table .t-date  { font-weight: 600; }

.rarity-pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 0.71rem; font-weight: 700; }
.pill-ultra   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.pill-rare    { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.pill-uncommon{ background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.pill-common  { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.pill-vcommon { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

/* =============================================
   SCIENCE CARDS
============================================= */
.science-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 580px) { .science-grid { grid-template-columns: 1fr; } }
.science-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.2s;
}
.science-card:hover { border-color: var(--purple); }
.science-icon { font-size: 24px; margin-bottom: 11px; }
.science-card h4 { font-size: 0.97rem; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.science-card p  { font-size: 0.86rem; color: var(--text-muted); line-height: 1.68; margin: 0; }

/* =============================================
   FAQ
============================================= */
.faq-list { display: flex; flex-direction: column; gap: 8px; max-width: 740px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item.open { border-color: var(--purple); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.96rem;
  font-weight: 600;
  text-align: left;
  padding: 17px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: color 0.15s;
}
.faq-question:hover { color: var(--purple); }
.faq-arrow { color: var(--purple); font-size: 15px; flex-shrink: 0; transition: transform 0.3s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s ease, padding 0.3s;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.78;
}
.faq-item.open .faq-answer { max-height: 500px; padding: 0 20px 17px; }

/* =============================================
   BLOG CARDS
============================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 800px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.blog-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--purple-bg), var(--amber-bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  overflow: hidden;
}
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.blog-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: var(--purple-bg);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 9px;
}
.blog-title { font-size: 0.97rem; font-weight: 700; color: var(--text); line-height: 1.38; margin-bottom: 8px; }
.blog-title a { color: inherit; text-decoration: none; }
.blog-title a:hover { color: var(--purple); }
.blog-excerpt { font-size: 0.84rem; color: var(--text-muted); line-height: 1.62; flex: 1; margin-bottom: 12px; }
.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  padding-top: 11px;
}
.blog-read { color: var(--purple); font-weight: 600; font-size: 0.82rem; }
.blog-read:hover { color: var(--purple-dark); }

/* =============================================
   CTA BANNER
============================================= */
.cta-section {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  padding: 68px 20px;
  text-align: center;
  color: #fff;
}
@media (max-width: 540px) {
  .cta-section { padding: 48px 16px; }
}
.cta-section h2 { color: #fff; margin-bottom: 12px; }
.cta-section p  { color: rgba(255,255,255,0.82); font-size: 1rem; max-width: 440px; margin: 0 auto 28px; }
.cta-note { font-size: 0.76rem; color: rgba(255,255,255,0.52); margin-top: 12px; }

/* =============================================
   INNER PAGE TEMPLATES
============================================= */
.page-hero {
  padding: 120px 20px 54px;
  background: linear-gradient(160deg, var(--purple-bg) 0%, #fff 60%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p  { font-size: 0.98rem; color: var(--text-muted); max-width: 520px; margin: 0 auto; }
.breadcrumb   { font-size: 0.8rem; color: var(--text-light); margin-bottom: 12px; }
.breadcrumb a { color: var(--purple); }
.breadcrumb span { margin: 0 5px; }

.page-content { padding: 60px 0 76px; }
.page-content h2 { font-size: 1.45rem; margin: 34px 0 11px; color: var(--text); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 1.1rem; margin: 22px 0 8px; color: var(--text); }
.page-content p  { font-size: 0.94rem; color: var(--text-muted); line-height: 1.85; margin-bottom: 13px; }
.page-content ul, .page-content ol { padding-left: 18px; margin-bottom: 14px; }
.page-content ul li { list-style: disc;    font-size: 0.94rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 5px; }
.page-content ol li { list-style: decimal; font-size: 0.94rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 5px; }
.page-content a { color: var(--purple); text-decoration: underline; }
.page-content hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }
.highlight-box {
  background: var(--purple-bg);
  border: 1.5px solid var(--purple-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
}
.highlight-box p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.highlight-box strong { color: var(--text); }

/* methodology */
.method-steps { display: flex; flex-direction: column; gap: 14px; max-width: 740px; margin: 0 auto; }
.method-step { display: flex; gap: 16px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; }
.method-num {
  width: 38px; height: 38px;
  background: var(--purple);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 0.95rem;
  color: #fff; flex-shrink: 0;
}
.method-step h4 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.method-step p  { font-size: 0.87rem; color: var(--text-muted); line-height: 1.68; margin: 0; }

/* contact */
.contact-wrap { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 7px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; background: var(--bg2); border: 1.5px solid var(--border);
  color: var(--text); font-size: 0.93rem; font-family: var(--font-sans);
  padding: 11px 14px; border-radius: var(--radius-sm); outline: none; transition: all 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--purple); background: #fff; box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-light); }
.form-success { display: none; text-align: center; padding: 32px 16px; }
.form-success .s-icon { font-size: 46px; margin-bottom: 12px; }
.form-success h3 { color: var(--green); font-size: 1.25rem; margin-bottom: 6px; }
.form-error { display: none; color: var(--red); font-size: 0.85rem; padding: 9px 13px; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); margin-bottom: 13px; }

.ci-grid { display: flex; flex-direction: column; gap: 11px; }
.ci-item { display: flex; align-items: flex-start; gap: 13px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.ci-item .ci-icon { font-size: 19px; flex-shrink: 0; }
.ci-item h4 { font-size: 0.86rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ci-item p  { font-size: 0.83rem; color: var(--text-muted); margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* data table for methodology */
.data-table-wrap { overflow-x: auto; margin: 18px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.data-table th { background: var(--bg2); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 12px; text-align: left; }
.data-table td { padding: 9px 12px; border: 1px solid var(--border); color: var(--text-muted); }
.data-table tr:hover td { background: var(--bg2); }

/* =============================================
   FOOTER
============================================= */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 52px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.footer-brand .brand-logo .logo-icon { width: 30px; height: 30px; font-size: 15px; border-radius: 8px; background: linear-gradient(135deg, var(--purple), var(--amber)); display: flex; align-items: center; justify-content: center; }
.footer-brand .brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--text); }
.footer-brand .brand-name span { color: var(--purple); }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.72; margin-bottom: 14px; }
.footer-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-chip { background: var(--bg3); border: 1px solid var(--border); color: var(--text-muted); font-size: 0.74rem; padding: 3px 10px; border-radius: 20px; }

.footer-col h4 { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-bottom: 13px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.86rem; color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--purple); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: 0.78rem; color: var(--text-light); margin: 0; }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { font-size: 0.78rem; color: var(--text-light); text-decoration: none; }
.footer-bottom-links a:hover { color: var(--purple); }

/* =============================================
   ANIMATIONS & UTILITIES
============================================= */
/* MOBILE FIX: fade-in only on larger screens — avoids invisible content on mobile */
@media (min-width: 769px) {
  .fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .fade-in.visible { opacity: 1; transform: translateY(0); }
}
@media (max-width: 768px) {
  .fade-in { opacity: 1; transform: none; }
  .fade-in.visible { opacity: 1; transform: none; }
}

/* SCROLL ANCHOR FIX: prevent fixed header from covering section targets */
section[id], div[id="tool"], div[id="how-it-works"] {
  scroll-margin-top: 72px;
}
@media (max-width: 820px) {
  section[id], div[id="tool"], div[id="how-it-works"] {
    scroll-margin-top: 64px;
  }
}

.no-posts { text-align: center; padding: 52px 20px; }
.no-posts .np-icon { font-size: 52px; margin-bottom: 12px; }
.no-posts h3 { color: var(--text); margin-bottom: 7px; }
.no-posts p  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; }

.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.pagination a, .pagination span {
  background: #fff; border: 1.5px solid var(--border);
  color: var(--text-muted); padding: 7px 13px;
  border-radius: var(--radius-sm); font-size: 0.86rem;
  text-decoration: none; transition: all 0.15s;
}
.pagination a:hover, .pagination .current {
  background: var(--purple); border-color: var(--purple); color: #fff;
}

.post-content { font-size: 0.95rem; color: var(--text-muted); line-height: 1.85; }
.post-content h2 { font-size: 1.4rem; margin: 30px 0 11px; color: var(--text); }
.post-content h3 { font-size: 1.1rem; margin: 20px 0 8px; color: var(--text); }
.post-content p  { margin-bottom: 13px; }
.post-content ul { padding-left: 17px; margin-bottom: 13px; }
.post-content ul li { list-style: disc; margin-bottom: 5px; }
.post-content a  { color: var(--purple); text-decoration: underline; }
.post-content img { border-radius: var(--radius); margin: 18px 0; border: 1px solid var(--border); }
.post-content blockquote { border-left: 3px solid var(--purple); padding: 11px 16px; background: var(--purple-bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 18px 0; }
.post-content blockquote p { margin: 0; font-style: italic; color: var(--text); }

/* table source note */
.table-note { font-size: 0.76rem; color: var(--text-light); text-align: center; margin-top: 12px; }

/* screen reader */
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }

@media print {
  .site-header, .site-footer, .hero::before, .cta-section, .stats-banner { display: none !important; }
  body { background: #fff; color: #000; }
}
