@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..600&family=JetBrains+Mono:wght@500;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  --bg: #F7F8FD;
  --surface: #FFFFFF;
  --surface-2: #F8FAFF;
  --surface-3: #F1F4FC;
  --ink: #13182B;
  --ink-2: #525D77;
  --ink-3: #838DA8;
  --muted: #838DA8;
  --accent: #6366F1;
  --sky: #0EA5E9;
  --indigo: #6366F1;
  --violet: #8B5CF6;
  --coral: #FB7185;
  --mint: #10B981;
  --amber: #D97706;
  --line: #E5EAF6;
  --line-hi: #CBD5EE;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --nav-border: rgba(255, 255, 255, 0.96);
  --cel-bg: linear-gradient(135deg, #FFFFFF 0%, #FAF7FF 100%);
  --cel-border: #E2D9FA;
  --cel-cell: rgba(255, 255, 255, 0.92);
  --cel-cell-border: #EAE4FA;
  --gauge-track: #E8ECF8;
  --duel-bg: linear-gradient(135deg, #F0F9FF 0%, #F5F3FF 52%, #FFF1F2 100%);
  --pill-sky-bg: #F0F9FF; --pill-sky-bd: #BAE6FD;
  --pill-ind-bg: #EEF2FF; --pill-ind-bd: #C7D2FE;
  --pill-cor-bg: #FFF1F2; --pill-cor-bd: #FECDD3;
  --pill-mnt-bg: #ECFDF5; --pill-mnt-bd: #A7F3D0;
  --capsule-bg: linear-gradient(135deg, #FFFFFF 0%, #F5F3FF 100%);
  --shadow-sm: 0 2px 8px rgba(31, 41, 87, 0.04);
  --shadow: 0 12px 34px rgba(31, 41, 87, 0.065), 0 2px 6px rgba(31, 41, 87, 0.03);
  --shadow-lg: 0 18px 46px rgba(99, 102, 241, 0.14);
  --chart-era-a: #F5F3FF;
  --chart-era-b: #F1F5F9;
  --chart-grid: #E2E8F0;
  --chart-txt: #64748B;
  --chart-peak: #4F46E5;
  --r-outer: 28px;
  --r-inner: 16px;
}

/* CELESTIAL MIDNIGHT — MODO NOCHE ESTELAR */
html[data-theme="dark"] {
  --bg: #070B17;
  --surface: #0E1528;
  --surface-2: #121C35;
  --surface-3: #182342;
  --ink: #F8FAFC;
  --ink-2: #B6C2DC;
  --ink-3: #7E8CAD;
  --muted: #7E8CAD;
  --accent: #818CF8;
  --sky: #38BDF8;
  --indigo: #818CF8;
  --violet: #A78BFA;
  --coral: #FB7185;
  --mint: #34D399;
  --amber: #FBBF24;
  --line: rgba(148, 163, 184, 0.16);
  --line-hi: rgba(167, 139, 250, 0.36);
  --nav-bg: rgba(14, 21, 40, 0.84);
  --nav-border: rgba(148, 163, 184, 0.18);
  --cel-bg: linear-gradient(135deg, #111834 0%, #191538 55%, #121B32 100%);
  --cel-border: rgba(167, 139, 250, 0.34);
  --cel-cell: rgba(10, 16, 32, 0.72);
  --cel-cell-border: rgba(167, 139, 250, 0.22);
  --gauge-track: rgba(148, 163, 184, 0.18);
  --duel-bg: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(139, 92, 246, 0.15) 52%, rgba(251, 113, 133, 0.12) 100%);
  --pill-sky-bg: rgba(14, 165, 233, 0.11); --pill-sky-bd: rgba(56, 189, 248, 0.28);
  --pill-ind-bg: rgba(99, 102, 241, 0.13); --pill-ind-bd: rgba(129, 140, 248, 0.30);
  --pill-cor-bg: rgba(251, 113, 133, 0.11); --pill-cor-bd: rgba(251, 113, 133, 0.28);
  --pill-mnt-bg: rgba(16, 185, 129, 0.11); --pill-mnt-bd: rgba(52, 211, 153, 0.28);
  --capsule-bg: linear-gradient(135deg, #0E1528 0%, #151B37 100%);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-lg: 0 20px 56px rgba(99, 102, 241, 0.24);
  --chart-era-a: rgba(139, 92, 246, 0.10);
  --chart-era-b: rgba(148, 163, 184, 0.04);
  --chart-grid: rgba(148, 163, 184, 0.14);
  --chart-txt: #94A3B8;
  --chart-peak: #38BDF8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.24s ease;
}

/* Atmospheric Aurora Sky + Constellations */
.celestial-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden;
  background:
    radial-gradient(42% 36% at 14% 5%, rgba(14, 165, 233, 0.14), transparent 72%),
    radial-gradient(38% 34% at 86% 9%, rgba(139, 92, 246, 0.15), transparent 70%),
    radial-gradient(32% 30% at 72% 44%, rgba(251, 113, 133, 0.09), transparent 70%),
    radial-gradient(44% 38% at 28% 95%, rgba(99, 102, 241, 0.08), transparent 72%);
  transition: background 0.35s ease;
}
html[data-theme="dark"] .celestial-bg {
  background:
    radial-gradient(46% 38% at 15% 6%, rgba(14, 165, 233, 0.20), transparent 70%),
    radial-gradient(42% 36% at 86% 10%, rgba(139, 92, 246, 0.24), transparent 70%),
    radial-gradient(34% 32% at 74% 50%, rgba(251, 113, 133, 0.11), transparent 70%),
    radial-gradient(46% 38% at 26% 92%, rgba(99, 102, 241, 0.14), transparent 72%);
}
.constellation-svg {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1440px; max-width: 100vw; height: 420px; opacity: 0.56;
  transition: opacity 0.3s ease;
}
html[data-theme="dark"] .constellation-svg { opacity: 0.92; }

.wrap {
  max-width: 1160px; margin: 0 auto; padding: 18px 20px 64px;
  min-width: 0; container-type: inline-size;
}
main, section, article, aside, .card { min-width: 0; max-width: 100%; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* Focus accessibility */
:focus-visible { outline: 2.5px solid var(--indigo); outline-offset: 2px; border-radius: 10px; }

/* FLOATING GLASS PILL HEADER */
header.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--nav-bg);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--nav-border);
  border-radius: 999px;
  padding: 9px 12px 9px 16px;
  box-shadow: var(--shadow);
  position: sticky; top: 14px; z-index: 50;
  margin-bottom: 24px;
  transition: background 0.28s, border-color 0.28s;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  flex-shrink: 0;
}
.brand-crest { width: 34px; height: 34px; object-fit: contain; display: block; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: "Outfit", sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -0.025em; }
.brand-sub { font-family: "JetBrains Mono", monospace; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--violet); }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: 13.5px; font-weight: 700;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap; transition: 0.16s;
  min-height: 38px; display: inline-flex; align-items: center;
}
.nav a:hover { background: var(--pill-ind-bg); color: var(--indigo); }
.nav a.active { background: var(--pill-ind-bg); color: var(--indigo); border: 1px solid var(--pill-ind-bd); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 38px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-family: "DM Sans", sans-serif; font-size: 12.5px; font-weight: 700;
  white-space: nowrap; transition: 0.16s;
}
.icon-btn:hover { border-color: var(--violet); color: var(--violet); transform: translateY(-1px); }
.theme-btn {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.14));
  border-color: var(--cel-border);
}
.lang-pill {
  background: var(--ink) !important; color: var(--bg) !important;
  padding: 8px 14px !important; font-size: 12.5px !important; font-weight: 700 !important;
}
.lang-pill:hover { opacity: 0.9; transform: translateY(-1px); }

.burg {
  display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; flex-shrink: 0;
}
.burg span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.2s; }

/* BREADCRUMBS & SUBPAGE HERO */
.crumbs {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink-3); margin-bottom: 14px;
}
.crumbs a { color: var(--indigo); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.page-hero {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer);
  padding: 28px 30px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--pill-sky-bg), var(--pill-ind-bg));
  border: 1px solid var(--cel-border); color: var(--indigo);
  font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
h1 {
  font-family: "Outfit", sans-serif; font-size: clamp(30px, 4.2vw, 48px);
  font-weight: 800; line-height: 1.06; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 10px;
}
h1 em {
  font-style: normal;
  background: linear-gradient(115deg, #0EA5E9 0%, #6366F1 44%, #A855F7 72%, #FB7185 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 16px; line-height: 1.62; color: var(--ink-2); max-width: 65ch; }

.trust-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2);
}

/* QUICK ANSWER CAPSULE (GEO / AEO) */
.capsule {
  background: var(--capsule-bg); border: 1px solid var(--cel-border);
  border-left: 4px solid var(--indigo); border-radius: 18px;
  padding: 15px 20px; font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.capsule strong { color: var(--ink); }

/* CORE CARD SYSTEM (CONCENTRIC RADII 28px OUTER / 16px INNER) */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer);
  padding: 28px; box-shadow: var(--shadow);
  transition: background-color 0.25s, border-color 0.25s;
}
.section-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer);
  padding: 28px; box-shadow: var(--shadow); margin-top: 22px;
}
.section-block h2 {
  font-family: "Outfit", sans-serif; font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 800; letter-spacing: -0.025em; margin-bottom: 12px; color: var(--ink);
}
.section-block p { color: var(--ink-2); line-height: 1.65; max-width: 68ch; margin-bottom: 12px; }

/* AURORA CELESTIAL 2-COLUMN HERO STAGE (RARITY CALCULATOR) */
.au-hero-grid { display: grid; grid-template-columns: 1.16fr 0.84fr; gap: 20px; align-items: stretch; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.f-in {
  height: 52px; width: 100%; border-radius: var(--r-inner); border: 1.8px solid var(--line);
  background: var(--surface-2); padding: 0 16px;
  font-family: "DM Sans", sans-serif; font-size: 15.5px; font-weight: 600; color: var(--ink);
  outline: none; transition: 0.16s;
}
.f-in::placeholder { color: var(--ink-3); }
.f-in:focus { border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16); }

.f-actions { grid-column: span 2; display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 2px; }
.btn-main {
  height: 52px; border-radius: var(--r-inner); border: 0; cursor: pointer;
  background: linear-gradient(135deg, #0EA5E9 0%, #6366F1 52%, #8B5CF6 100%);
  color: #FFFFFF; font-family: "Outfit", sans-serif; font-size: 15.5px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.30); transition: transform 0.14s, filter 0.14s;
  padding: 0 20px;
}
.btn-main:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-main:active { transform: scale(0.98); }

.btn-rand {
  height: 52px; padding: 0 18px; border-radius: var(--r-inner);
  border: 1.8px solid var(--cel-border);
  background: linear-gradient(135deg, var(--pill-ind-bg), var(--pill-cor-bg));
  color: var(--violet); font-family: "Outfit", sans-serif; font-size: 14.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: 0.15s;
}
.btn-rand:hover { border-color: var(--violet); transform: translateY(-1px); }

.quick-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.av-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px;
  min-height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2); transition: 0.15s;
}
.av-chip:hover { border-color: var(--violet); color: var(--ink); transform: translateY(-1px); }
.av-dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  color: #FFF; font-size: 11px; font-weight: 800; flex-shrink: 0;
}

.voice-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.voice-lbl { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.v-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-family: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: 0.15s;
}
.v-btn:hover { border-color: var(--sky); background: var(--pill-sky-bg); color: var(--sky); }

/* RIGHT CARD: CELESTIAL SEMICIRCULAR RARITY GAUGE */
.gauge-card {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center;
  background: radial-gradient(80% 65% at 50% 0%, rgba(139, 92, 246, 0.10), transparent 68%), var(--surface);
  overflow: hidden;
}
.g-top-k {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--violet); text-transform: uppercase;
}
.g-name {
  font-family: "Outfit", sans-serif; font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 800; letter-spacing: -0.025em; margin: 4px 0 4px; color: var(--ink);
}
.gauge-svg { width: 100%; max-width: 292px; height: auto; overflow: visible; }
.g-arc-fill { transition: stroke-dashoffset 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
html[data-theme="dark"] .g-arc-fill { filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.55)); }
.g-tier {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 15px; border-radius: 999px;
  background: linear-gradient(135deg, var(--pill-ind-bg), var(--pill-cor-bg));
  border: 1px solid var(--cel-border); color: var(--violet); font-weight: 700; font-size: 13px;
}
.g-odds { font-family: "Outfit", sans-serif; font-size: 21px; font-weight: 800; color: var(--ink); margin-top: 8px; }
.g-est { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

.card-dl-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; width: 100%; margin-top: 14px; }
.dl-btn {
  height: 46px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg);
  font-family: "Outfit", sans-serif; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px; transition: 0.16s;
}
html[data-theme="dark"] .dl-btn { background: linear-gradient(135deg, #38BDF8, #6366F1); color: #070B17; }
.dl-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.dl-btn-sec {
  height: 46px; padding: 0 13px; border-radius: 14px; border: 1.5px solid var(--line-hi);
  background: var(--surface-2); color: var(--ink); font-family: "Outfit", sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: 0.15s;
}
.dl-btn-sec:hover { border-color: var(--violet); color: var(--violet); }

.mini-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; width: 100%; }
.ma-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: 0.15s; min-height: 34px;
}
.ma-btn:hover { border-color: var(--indigo); color: var(--indigo); }

/* 20% CELESTIAL ESSENCE & NUMEROLOGY STRIP */
.cel-strip {
  margin-top: 20px; border-radius: var(--r-outer); padding: 22px 26px;
  background: var(--cel-bg); border: 1px solid var(--cel-border); box-shadow: var(--shadow);
}
.cs-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cs-title { display: flex; align-items: center; gap: 10px; font-family: "Outfit", sans-serif; font-size: 18px; font-weight: 800; color: var(--ink); }
.cs-star {
  width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366F1, #A855F7); color: #FFF; font-size: 14px; flex-shrink: 0;
}
.cs-note {
  font-size: 12px; font-weight: 700; color: var(--violet);
  background: var(--pill-ind-bg); border: 1px solid var(--cel-border); padding: 4px 12px; border-radius: 999px;
}
.cs-grid { display: grid; grid-template-columns: 1fr 1fr 1.32fr; gap: 14px; }
.cs-cell {
  background: var(--cel-cell); border: 1px solid var(--cel-cell-border); border-radius: var(--r-inner);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px; min-width: 0;
}
.cs-orb {
  width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0; display: grid; place-items: center;
  font-family: "Outfit", sans-serif; font-size: 24px; font-weight: 800;
}
.orb-num { background: var(--pill-ind-bg); color: var(--indigo); border: 1px solid var(--pill-ind-bd); }
.orb-el { background: rgba(245, 158, 11, 0.14); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.34); font-size: 22px; }
.orb-mean { background: var(--pill-cor-bg); color: var(--coral); border: 1px solid var(--pill-cor-bd); font-size: 20px; }
.cs-meta small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.cs-meta strong { display: block; font-family: "Outfit", sans-serif; font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.22; }
.cs-meta p { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.42; }

/* 4 OFFICIAL SIGNAL PILLS (USA SSA + MEXICO INEGI SIDE BY SIDE) */
.pills-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.sp { border-radius: 22px; padding: 18px 20px; border: 1px solid transparent; transition: transform 0.16s; }
.sp:hover { transform: translateY(-2px); }
.sp.sky { background: var(--pill-sky-bg); border-color: var(--pill-sky-bd); }
.sp.ind { background: var(--pill-ind-bg); border-color: var(--pill-ind-bd); }
.sp.cor { background: var(--pill-cor-bg); border-color: var(--pill-cor-bd); }
.sp.mnt { background: var(--pill-mnt-bg); border-color: var(--pill-mnt-bd); }
.sp span { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.sp strong { font-family: "Outfit", sans-serif; font-size: 23px; font-weight: 800; color: var(--ink); display: block; }
.sp small { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.35; }

/* 145-YEAR INTERACTIVE WAVE + COMPATIBILITY DUEL */
.wave-card { margin-top: 20px; }
.wc-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.wc-top h2 { font-family: "Outfit", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.wc-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.duel-in {
  height: 38px; width: 158px; border-radius: 999px; border: 1.5px solid var(--line-hi);
  background: var(--surface-2); color: var(--ink); padding: 0 13px;
  font-family: inherit; font-size: 13px; font-weight: 600; outline: none;
}
.duel-in:focus { border-color: var(--coral); background: var(--surface); }
.wp {
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 7px 13px; min-height: 38px; border-radius: 999px; font-family: inherit;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.wp:hover { border-color: var(--violet); color: var(--violet); }
.wp.on { background: var(--pill-cor-bg); border-color: var(--coral); color: var(--coral); }

.duel-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  background: var(--duel-bg); border: 1px solid var(--cel-border);
  border-radius: var(--r-inner); padding: 12px 16px; margin-bottom: 14px;
}
.db-names { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: "Outfit", sans-serif; font-size: 15px; font-weight: 700; }
.db-p1 { color: var(--sky); }
.db-p2 { color: var(--coral); }
.db-vs {
  font-size: 11px; font-weight: 800; background: var(--surface); border: 1px solid var(--cel-border);
  padding: 3px 8px; border-radius: 999px; color: var(--ink-2);
}
.db-compat { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--violet); }
.db-compat b { font-family: "Outfit", sans-serif; font-size: 18px; color: var(--indigo); }
.hud-line { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
svg.pop-svg { width: 100%; height: auto; display: block; }
@keyframes drawWave { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }
.wave-anim { stroke-dasharray: 2000; animation: drawWave 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }

/* INTERACTIVE OFFICIAL MEXICO RANKING (INEGI) */
.mx-card { margin-top: 20px; }
.mx-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.mx-head h2 { font-family: "Outfit", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.mx-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.mx-tab {
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 8px 15px; min-height: 40px; border-radius: 999px; font-family: inherit;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.mx-tab:hover { border-color: var(--mint); color: var(--mint); }
.mx-tab.on { background: var(--pill-mnt-bg); border-color: var(--mint); color: var(--mint); }

.mx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mx-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 15px; border-radius: var(--r-inner); border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; transition: 0.16s;
  text-align: left; width: 100%; font-family: inherit;
}
.mx-row:hover { border-color: var(--violet); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.mx-row.active-hit { border-color: var(--mint); background: var(--pill-mnt-bg); }
.mx-num {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font-family: "Outfit", sans-serif; font-size: 14px; font-weight: 800;
  background: var(--pill-ind-bg); color: var(--indigo);
}
.mx-row:nth-child(-n+3) .mx-num { background: linear-gradient(135deg, #0EA5E9, #6366F1); color: #FFF; }
.mx-info b { display: block; font-family: "Outfit", sans-serif; font-size: 16px; font-weight: 800; color: var(--ink); }
.mx-bar-bg { height: 6px; border-radius: 999px; background: var(--line); margin-top: 6px; overflow: hidden; }
.mx-bar-fg { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #10B981, #0EA5E9, #6366F1); }
.mx-cnt { text-align: right; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.mx-cnt small { display: block; font-family: "DM Sans", sans-serif; font-size: 11px; font-weight: 600; color: var(--ink-3); }

/* SAVED COMPARISON TRAY */
.saved-box { margin-top: 20px; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.saved-item {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-inner);
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.saved-item b { font-family: "Outfit", sans-serif; font-size: 16px; color: var(--ink); display: block; }
.saved-item small { font-size: 12px; color: var(--ink-2); }
.saved-del {
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 16px; padding: 6px;
}
.saved-del:hover { color: var(--coral); }

/* BILINGUAL DIRECTORY & TRENDS SUBPAGES */
.panel, .calc-shell {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer);
  padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.inp {
  width: 100%; height: 48px; border-radius: 15px; border: 1.8px solid var(--line);
  background: var(--surface-2); color: var(--ink); padding: 0 16px;
  font-family: inherit; font-size: 15px; font-weight: 600; outline: none; transition: 0.16s;
}
.inp:focus { border-color: var(--violet); background: var(--surface); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 7px 14px; min-height: 38px; border-radius: 999px; font-family: inherit;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: 0.15s;
}
.chip:hover { border-color: var(--violet); color: var(--violet); }
.chip.on { background: var(--pill-ind-bg); border-color: var(--indigo); color: var(--indigo); }

.cards-2, .b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.item-card, .b-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow-sm); transition: 0.16s;
}
.item-card:hover, .b-card:hover { border-color: var(--violet); transform: translateY(-2px); box-shadow: var(--shadow); }
.item-head, .b-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.item-name, .b-name { font-family: "Outfit", sans-serif; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.15; }
.item-name small { font-size: 14px; color: var(--violet); }
.score-badge, .b-score {
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; font-weight: 700;
  background: var(--pill-mnt-bg); border: 1px solid var(--pill-mnt-bd); color: var(--mint);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.audio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.audio-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  padding: 6px 12px; min-height: 36px; border-radius: 999px; font-family: inherit;
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: 0.14s;
}
.audio-btn:hover { border-color: var(--sky); background: var(--pill-sky-bg); color: var(--sky); }
.item-foot { padding-top: 8px; border-top: 1px solid var(--line); }
.item-foot a { color: var(--indigo); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.item-foot a:hover { text-decoration: underline; }
.btn-primary {
  height: 44px; padding: 0 18px; border-radius: 13px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #0EA5E9, #6366F1); color: #FFF; font-weight: 700; font-size: 14px;
}

/* Compound Multi-Name & Dual-Surname Breakdown Pills */
.breakdown-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 8px; width: 100%;
}
.bk-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.bk-pill.mx { background: var(--pill-cor-bg); border-color: var(--pill-cor-bd); color: var(--coral); }
.bk-pill.us { background: var(--pill-sky-bg); border-color: var(--pill-sky-bd); color: var(--sky); }

/* TABLES & FAQS */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--line); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.data-table th {
  text-align: left; padding: 13px 16px; background: var(--surface-2);
  color: var(--ink-3); font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--line);
}
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
table.data-table tr:last-child td { border-bottom: 0; }
table.data-table a { color: var(--indigo); font-weight: 700; text-decoration: none; }
table.data-table a:hover { text-decoration: underline; }
.growth-pill {
  display: inline-block; background: var(--pill-mnt-bg); border: 1px solid var(--pill-mnt-bd);
  color: var(--mint); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 15px 18px; transition: border-color 0.16s;
}
.faq details[open] { border-color: var(--cel-border); }
.faq summary {
  font-family: "Outfit", sans-serif; font-size: 16px; font-weight: 700; color: var(--ink);
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::after { content: "+"; font-size: 20px; color: var(--indigo); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; margin-bottom: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.62; }

/* FOOTER */
footer.footer {
  margin-top: 34px; padding: 24px 6px 10px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px;
  font-size: 13px; color: var(--ink-3);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--indigo); }

/* RESPONSIVE ADAPTATION (PC + MOBILE) */
@media (max-width: 960px) {
  .au-hero-grid, .cs-grid, .pills-4, .mx-grid { grid-template-columns: 1fr; }
  .burg { display: inline-flex; }
  header.topbar { border-radius: 22px; flex-wrap: wrap; }
  .nav {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; gap: 6px;
  }
  .nav.open { display: flex; }
  .nav a, .icon-btn { justify-content: center; width: 100%; min-height: 44px; }
}
@media (max-width: 640px) {
  .wrap { padding: 12px 14px 48px; }
  .card, .section-block, .page-hero, .cel-strip { padding: 20px 18px; border-radius: 22px; }
  .f-grid, .f-actions, .card-dl-row { grid-template-columns: 1fr; }
  .f-actions { grid-column: span 1; }
  .duel-in { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
