/* ================================================================
   INNOVA LIFE — "Obsidian × Champagne" luxury design system
   Light + Dark · glass surfaces · gold accents · motion-rich
   ================================================================ */

/* ----------------------------------------------------------------
   1) DESIGN TOKENS
   ---------------------------------------------------------------- */
:root {
  --font-display: "Sora", "Anuphan", system-ui, sans-serif;
  --font-body: "Anuphan", "Sora", system-ui, sans-serif;

  /* champagne gold ramp (shared) */
  --gold-050: #fdf6e3;
  --gold-100: #f7e8bf;
  --gold-200: #eed9a0;
  --gold-300: #e3c076;
  --gold-400: #d4a94f;
  --gold-500: #b98a2e;
  --gold-600: #93691d;

  /* emerald ramp (growth / money) */
  --em-300: #6ee7b7;
  --em-400: #34d399;
  --em-500: #10b981;
  --em-600: #059669;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-luxe: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 72px;
  --wrap: 1180px;

  color-scheme: dark;
}

/* ---------- DARK (default) ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #06070b;
  --bg-2: #0a0c13;
  --bg-3: #0f1220;

  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-solid: #10131d;
  --surface-glass: rgba(13, 16, 26, 0.66);

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(227, 192, 118, 0.32);

  --text: #f5f3ec;
  --text-2: #c3c6d1;
  --muted: #8f93a5;

  --gold: var(--gold-300);
  --gold-deep: var(--gold-400);
  --gold-soft: rgba(227, 192, 118, 0.14);

  --accent: var(--em-400);
  --accent-soft: rgba(52, 211, 153, 0.13);

  --shadow-1: 0 8px 28px rgba(0, 0, 0, 0.42);
  --shadow-2: 0 22px 60px -18px rgba(0, 0, 0, 0.65);
  --shadow-gold: 0 12px 42px -10px rgba(212, 169, 79, 0.35);

  --aurora-a: rgba(16, 185, 129, 0.16);
  --aurora-b: rgba(212, 169, 79, 0.12);
  --aurora-c: rgba(56, 89, 220, 0.12);
  --grid-line: rgba(255, 255, 255, 0.035);
  --noise-opacity: 0.05;

  --btn-primary-text: #201804;
  --chip-bg: rgba(9, 12, 19, 0.85);
}

/* ---------- LIGHT ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f4ee;
  --bg-2: #fbfaf6;
  --bg-3: #f1eee4;

  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);

  --border: rgba(24, 25, 32, 0.1);
  --border-strong: rgba(24, 25, 32, 0.18);
  --border-gold: rgba(185, 138, 46, 0.35);

  --text: #191a20;
  --text-2: #40424e;
  --muted: #7a7d8c;

  --gold: var(--gold-500);
  --gold-deep: var(--gold-600);
  --gold-soft: rgba(185, 138, 46, 0.1);

  --accent: var(--em-600);
  --accent-soft: rgba(5, 150, 105, 0.1);

  --shadow-1: 0 8px 26px rgba(31, 27, 12, 0.09);
  --shadow-2: 0 24px 60px -20px rgba(31, 27, 12, 0.18);
  --shadow-gold: 0 14px 40px -12px rgba(185, 138, 46, 0.3);

  --aurora-a: rgba(16, 185, 129, 0.14);
  --aurora-b: rgba(212, 169, 79, 0.18);
  --aurora-c: rgba(99, 132, 233, 0.1);
  --grid-line: rgba(24, 25, 32, 0.045);
  --noise-opacity: 0.035;

  --btn-primary-text: #221a06;
  --chip-bg: rgba(255, 255, 255, 0.92);
}

/* ----------------------------------------------------------------
   2) BASE
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* theme cross-fade — toggled briefly from JS */
html.theme-anim body,
html.theme-anim body * {
  transition:
    background-color 0.5s var(--ease-luxe),
    border-color 0.5s var(--ease-luxe),
    color 0.35s var(--ease-luxe),
    box-shadow 0.5s var(--ease-luxe) !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(227, 192, 118, 0.35);
  color: inherit;
}

/* slim luxe scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-400), var(--gold-600));
  border-radius: 99px;
  border: 3px solid var(--bg);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----------------------------------------------------------------
   3) AMBIENT BACKGROUND SYSTEM
   aurora blobs + perspective grid + film grain + particle canvas
   ---------------------------------------------------------------- */
.lux-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 85% -8%, var(--aurora-b), transparent 62%),
    radial-gradient(900px 620px at -10% 12%, var(--aurora-a), transparent 60%),
    radial-gradient(1000px 700px at 55% 118%, var(--aurora-c), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 32%, var(--bg-3));
}

.lux-aurora {
  position: absolute;
  width: 58vw;
  height: 58vw;
  min-width: 540px;
  min-height: 540px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.9;
  will-change: transform;
}

.lux-aurora.a1 {
  top: -22%;
  left: -14%;
  background: radial-gradient(circle at 40% 40%, var(--aurora-a), transparent 65%);
  animation: aurora-drift 26s var(--ease-luxe) infinite alternate;
}

.lux-aurora.a2 {
  top: -10%;
  right: -18%;
  background: radial-gradient(circle at 55% 45%, var(--aurora-b), transparent 62%);
  animation: aurora-drift 32s var(--ease-luxe) -8s infinite alternate-reverse;
}

.lux-aurora.a3 {
  bottom: -30%;
  left: 22%;
  background: radial-gradient(circle at 50% 50%, var(--aurora-c), transparent 62%);
  animation: aurora-drift 38s var(--ease-luxe) -16s infinite alternate;
}

@keyframes aurora-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, -3vh, 0) scale(0.94); }
}

.lux-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 82%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 82%);
}

.lux-noise {
  position: absolute;
  inset: -50%;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, 6%); }
  80% { transform: translate(6%, -3%); }
}

#fxCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* legacy sky classes kept harmless if referenced anywhere */
.sky-bg, .sky-cloud { display: none; }

/* ----------------------------------------------------------------
   4) SCROLL PROGRESS
   ---------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 120;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--em-500), var(--gold-300) 55%, var(--gold-500));
  box-shadow: 0 0 14px rgba(227, 192, 118, 0.55);
  pointer-events: none;
}

/* ----------------------------------------------------------------
   5) UTILITIES
   ---------------------------------------------------------------- */
.gold-text {
  background: linear-gradient(
    100deg,
    var(--gold-500) 0%,
    var(--gold-100) 28%,
    var(--gold-300) 48%,
    var(--gold-100) 66%,
    var(--gold-500) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: gold-sheen 5.5s linear infinite;
}

@keyframes gold-sheen {
  to { background-position: -220% center; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(227, 192, 118, 0.6);
  animation: dot-pulse 2.4s var(--ease-luxe) infinite;
}

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(227, 192, 118, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(227, 192, 118, 0); }
  100% { box-shadow: 0 0 0 0 rgba(227, 192, 118, 0); }
}

/* section scaffolding */
.section {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 118px) 24px;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(28px, 4.4vw, 44px);
  margin: 18px 0 12px;
}

.section-head p {
  color: var(--text-2);
  font-size: 17px;
  margin: 0;
}

.section-sub {
  font-size: clamp(19px, 2.6vw, 26px);
  color: var(--text);
  margin: 0;
  font-family: var(--font-display);
}

.hl-bonus {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(227, 192, 118, 0.35);
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
  will-change: opacity, transform, filter;
}

.reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ----------------------------------------------------------------
   6) BUTTONS
   ---------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.35s var(--ease-out),
    background-color 0.3s,
    border-color 0.3s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  color: var(--btn-primary-text);
  background: linear-gradient(120deg, var(--gold-200), var(--gold-400) 55%, var(--gold-500));
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 48px -10px rgba(212, 169, 79, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* sheen sweep */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -70%;
  width: 45%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transition: left 0.7s var(--ease-luxe);
  left: -70%;
}

.btn-primary:hover::after { left: 130%; }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 30px;
  font-size: 17px;
  border-radius: 22px;
}

/* ----------------------------------------------------------------
   7) NAVBAR — floating glass pill
   ---------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px clamp(14px, 3vw, 28px) 0;
  transition: transform 0.45s var(--ease-out);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  position: relative;
  transition:
    background-color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

.nav.is-scrolled .nav-inner {
  background: var(--surface-glass);
  border-color: var(--border);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: #211804;
  background: conic-gradient(from 210deg, var(--gold-500), var(--gold-200), var(--gold-400), var(--gold-500));
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.brand-word b {
  color: var(--gold);
  font-weight: 800;
}

.nav-spacer {
  width: 178px;
  min-width: 0;
  margin-right: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  transition: color 0.25s, background-color 0.25s;
}

.nav-links a:hover {
  color: var(--gold);
  background: var(--gold-soft);
}

/* theme toggle pill */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
}

.theme-toggle:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.5s var(--ease-spring);
}

.theme-toggle:hover .theme-icon { transform: rotate(-24deg) scale(1.15); }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.nav-toggle span {
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}

.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------
   8) HERO — intro headline + interactive cards
   ---------------------------------------------------------------- */
.hero {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(44px, 8vw, 84px)) 24px clamp(48px, 6vw, 72px);
  display: block;
}

.hero-glow {
  position: absolute;
  top: 6%;
  left: 50%;
  width: min(820px, 90vw);
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--gold-soft), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-intro {
  position: relative;
  text-align: left;
  max-width: 820px;
  margin: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  backdrop-filter: blur(6px);
  animation: badge-float 5s var(--ease-luxe) infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.hero-intro h1 {
  font-size: clamp(34px, 6.2vw, 62px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 26px 0 18px;
  line-height: 1.18;
}

.hero-lede {
  color: var(--text-2);
  font-size: clamp(18px, 2vw, 21px);
  margin: 0 0 30px;
}

.hero-cta-row {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

/* stat strip */
.hero-stats {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 6px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 26px;
  text-align: center;
}

.hero-stat + .hero-stat { border-left: 1px solid var(--border); }

.hero-stat b {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.6vw, 24px);
  font-weight: 800;
  color: var(--gold);
}

.hero-stat small {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* hero interactive zone — การ์ดเครือข่ายความกว้างเท่า grid คอลัมน์เดี่ยว */
.hero-network-section {
  padding-top: 0;
}

.hero-matrix-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
}

.hero-visual {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* ----------------------------------------------------------------
   9) GLASS CARD (shared shell)
   ---------------------------------------------------------------- */
.glass-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, var(--surface-2), transparent 55%),
    var(--surface-glass);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

/* mouse-tracking spotlight (JS sets --mx / --my in px) */
.glass-card::before,
.product-card .card-spot,
.course-card .card-spot {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(227, 192, 118, 0.1),
    transparent 65%
  );
  pointer-events: none;
}

.glass-card:hover::before,
.product-card:hover .card-spot,
.course-card:hover .card-spot { opacity: 1; }

/* animated gold hairline on top edge */
.hero-card::after,
.matrix-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  background-size: 200% 100%;
  animation: hairline-slide 4.5s linear infinite;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes hairline-slide {
  to { background-position: -200% 0; }
}

/* ----------------------------------------------------------------
   10) HERO CARD — live network
   ---------------------------------------------------------------- */
.hero-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 438px;
}

.hero-card-summary {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.hero-card-foot {
  display: flex;
  gap: 12px;
}

.hero-card-foot > div {
  width: 120px;
  min-height: 86px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-card-foot small {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.hero-card-foot b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* withdraw pill */
.hero-card-withdraw {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 310px;
  min-height: 86px;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(52, 211, 153, 0.32);
  background: var(--accent-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.withdraw-left {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.withdraw-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 20px;
  border-radius: 13px;
  background: linear-gradient(140deg, var(--em-500), var(--em-600));
  box-shadow: 0 8px 22px -6px rgba(16, 185, 129, 0.55);
  animation: badge-float 4s var(--ease-luxe) -1s infinite;
}

.withdraw-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.withdraw-action {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.25;
}

.withdraw-note {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
}

/* live status + company sales */
.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.hero-live-status { min-height: 30px; }

.hero-live-message {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.hero-live-message::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  animation: dot-pulse 2s infinite;
}

.hero-live-message.is-visible {
  opacity: 1;
  transform: none;
}

.company-sales {
  display: none;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
}

.company-sales.is-visible {
  display: flex;
  animation: pop-in 0.6s var(--ease-spring);
}

.company-sales-main {
  display: flex;
  flex-direction: column;
}

.company-sales-main small {
  color: var(--muted);
  font-size: 11.5px;
}

.company-sales-main strong {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.company-sales-main strong.is-updating {
  animation: stat-flash 0.7s var(--ease-out);
}

@keyframes stat-flash {
  0% { color: var(--gold); text-shadow: 0 0 16px rgba(227, 192, 118, 0.7); }
  100% { color: var(--text); text-shadow: none; }
}

.company-share-live {
  display: flex;
  flex-direction: column;
  padding-left: 16px;
  border-left: 1px solid var(--border-gold);
}

.company-share-live span {
  color: var(--muted);
  font-size: 11.5px;
}

.company-share-live b {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* network canvas area — SVG ย่อสเกลให้พอดีการ์ด ไม่มี scroll */
.heronet-wrap {
  position: relative;
  flex: 0 0 auto;
  min-height: 182px;
  margin-top: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(500px 200px at 50% 0%, var(--gold-soft), transparent 70%),
    var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 1;
}

.heronet-wrap::-webkit-scrollbar {
  display: none;
}

.heronet-svg-wrap {
  width: 100%;
  height: 100%;
}

#heroNet {
  display: block;
  width: auto;
  min-width: 680px;
  height: 100%;
  min-height: 182px;
}

.heronet-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.hero-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--chip-bg);
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}

/* ---------- GUIDE SYSTEM — แถบแนะนำขั้นตอนถัดไปในการ์ด ---------- */
.hero-guide {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px dashed var(--border-gold);
  background: var(--gold-soft);
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.5;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.hero-guide.is-swap {
  opacity: 0;
  transform: translateY(5px);
}

.hero-guide b { color: var(--gold); }

.hero-guide .hg-icon {
  font-size: 18px;
  line-height: 1;
  animation: tap-bounce 1.4s var(--ease-luxe) infinite;
}

@keyframes tap-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px) scale(1.12); }
}

/* ปุ่มเปิดคู่มือ (?) บน nav */
.help-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease-spring);
}

.help-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  transform: translateY(-1px) rotate(8deg);
}

/* รายการขั้นตอนใน popup คู่มือ */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0 4px;
  text-align: left;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-2);
}

.guide-step b { color: var(--text); }

.gs-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--btn-primary-text);
  background: linear-gradient(130deg, var(--gold-200), var(--gold-400));
  box-shadow: var(--shadow-gold);
}

.guide-start-btn {
  width: 100%;
  margin-top: 16px;
}

/* ---------- SVG network styling ---------- */
.hlink {
  display: none;
}

.hlink.is-on { opacity: 1; stroke: var(--gold-200); }
.hlink.is-dim { opacity: 0.16; }

.hnode { cursor: pointer; }

.hnode:focus,
.hnode:focus-visible {
  outline: none;
}

.hnode .hfx {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
}

.hnode .hfx.pop-now {
  animation: node-pop 0.55s var(--ease-spring) forwards;
}

@keyframes node-pop {
  0% { opacity: 0; transform: scale(0.2); }
  70% { opacity: 1; transform: scale(1.18); }
  100% { opacity: 1; transform: scale(1); }
}

/* person icon */
.hicon-head {
  fill: var(--em-400);
  transition: fill 0.3s;
}

.hicon-body {
  fill: none;
  stroke: var(--em-400);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke 0.3s;
}

/* "คุณ" — gold */
.hnode.center .hicon-head { fill: var(--gold-300); }
.hnode.center .hicon-body { stroke: var(--gold-300); }

.hnode.is-on .hicon-head { fill: var(--gold-200); }
.hnode.is-on .hicon-body { stroke: var(--gold-200); }
.hnode.is-dim { opacity: 0.28; }

.hnode.is-trigger { cursor: pointer; }

.hnode-pulse-ring {
  transform-origin: center;
  transform-box: fill-box;
  animation: ring-pulse 2.2s var(--ease-out) infinite;
}

@keyframes ring-pulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* income chip above nodes */
.hchip {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.hchip.chip-show {
  opacity: 1;
  transform: translateY(0);
}

.hchip rect {
  fill: var(--chip-bg);
  stroke: var(--border-gold);
  stroke-width: 1;
}

.hchip text {
  fill: var(--gold);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(20, 16, 8, 0.28);
  stroke-width: 0.8px;
  filter: drop-shadow(0 2px 5px rgba(227, 192, 118, 0.48));
}

.hnode-count {
  fill: var(--muted);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
}

.hnode > text {
  fill: var(--text);
  font-size: 12px;
  text-anchor: middle;
}

/* purchase label under "คุณ" */
.hyou-purchase-label text {
  fill: var(--muted);
  font-size: 10.5px;
  text-anchor: middle;
}

.hyou-purchase-label .hyou-purchase-amount {
  fill: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
}

/* per-row summary strip */
.hero-row-summary rect {
  fill: var(--gold-soft);
  stroke: var(--border-gold);
  stroke-width: 1;
}

.hero-row-summary line {
  stroke: var(--border-gold);
  stroke-width: 1;
}

.hero-row-summary-label {
  fill: var(--muted);
  font-size: 12px;
}

.hero-row-summary-value {
  fill: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
}

/* floating tip */
.hero-tip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -130%);
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--border-gold);
  background: var(--chip-bg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-1);
  font-size: 16px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}

.hero-tip b { color: var(--gold); font-weight: 800; }
.hero-tip span { color: var(--muted); margin-left: 6px; }

.hero-tip.show { opacity: 1; }

.hero-tip.purchase-tip {
  transform: translate(-50%, 30%);
}

/* ----------------------------------------------------------------
   11) MATRIX CARD (hero right)
   ---------------------------------------------------------------- */
.matrix-col { display: flex; }

.matrix-card {
  flex: 1;
  display: flex;
  padding: 0;
}

.matrix-card-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
}

.matrix-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border-radius: inherit;
}

.matrix-lock-icon {
  font-size: 38px;
  filter: drop-shadow(0 6px 18px rgba(227, 192, 118, 0.4));
  animation: badge-float 3.4s var(--ease-luxe) infinite;
}

.matrix-lock-overlay p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

.matrix-lock-overlay b { color: var(--gold); }

.matrix-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.matrix-badge {
  display: inline-flex;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--btn-primary-text);
  background: linear-gradient(120deg, var(--gold-200), var(--gold-400));
  box-shadow: var(--shadow-gold);
}

.matrix-unlocked-tag {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}

/* invest → receive row */
.matrix-invest-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.matrix-invest-item {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.matrix-invest-item small {
  color: var(--muted);
  font-size: 12px;
}

.matrix-invest-item b {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.matrix-invest-get {
  border-color: var(--border-gold);
  background: var(--gold-soft);
}

.matrix-invest-get b { color: var(--gold); }

.matrix-invest-arrow {
  color: var(--gold);
  font-size: 20px;
  animation: arrow-nudge 1.6s var(--ease-luxe) infinite;
}

@keyframes arrow-nudge {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(5px); opacity: 1; }
}

/* rebirth chips */
.matrix-rebirth-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.matrix-rebirth-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
  color: var(--text-2);
}

.matrix-rebirth-item b { color: var(--text); }
.matrix-rebirth-icon { font-size: 18px; }

.matrix-comm-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.matrix-comm-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.matrix-comm-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
}

.matrix-comm-level { font-weight: 700; color: var(--text); }
.matrix-comm-people { color: var(--muted); }
.matrix-comm-rate { color: var(--accent); font-weight: 700; }
.matrix-comm-total { text-align: right; font-weight: 700; color: var(--gold); }
.matrix-comm-total.muted { color: var(--muted); font-weight: 500; }

/* milestones */
.matrix-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.matrix-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.mm-level { color: var(--muted); font-size: 12px; }

.mm-income {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text);
}

.matrix-milestone.mm-big {
  border-color: var(--border-gold);
  background:
    linear-gradient(160deg, var(--gold-soft), transparent),
    var(--surface);
  position: relative;
  overflow: hidden;
}

.matrix-milestone.mm-big .mm-income {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(227, 192, 118, 0.4);
}

.matrix-note {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

/* ----------------------------------------------------------------
   12) MATRIX TABLE SECTION
   ---------------------------------------------------------------- */
.matrix-table-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.matrix-table-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-1);
}

.matrix-table-grid.matrix-flash {
  animation: matrix-flash 1s var(--ease-out);
}

@keyframes matrix-flash {
  0%, 60% {
    border-color: var(--gold-300);
    box-shadow: 0 0 0 3px rgba(227, 192, 118, 0.25), var(--shadow-gold);
  }
  100% { border-color: var(--border); }
}

.matrix-table-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 22px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.35s;
}

.matrix-table-cell:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-1);
}

.mtc-icon { font-size: 32px; }

.mtc-label {
  font-weight: 700;
  font-size: 17px;
}

.mtc-status {
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
}

.mtc-status.filled {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.mtc-status.waiting {
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid var(--border-gold);
  animation: waiting-blink 1.8s var(--ease-luxe) infinite;
}

@keyframes waiting-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.matrix-table-cell.mtc-you {
  border-color: var(--border-gold);
  background:
    radial-gradient(140px 120px at 50% 42%, rgba(227, 192, 118, 0.18), transparent 68%),
    linear-gradient(165deg, var(--gold-soft), transparent 72%),
    var(--surface);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.mtc-aura {
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  transform: none;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 34%, rgba(227, 192, 118, 0.22), transparent 50%);
  border: 1px solid rgba(227, 192, 118, 0.3);
  box-shadow:
    0 0 0 5px rgba(227, 192, 118, 0.06),
    0 0 34px rgba(227, 192, 118, 0.22);
  animation: aura-pulse 2.6s var(--ease-out) infinite;
}

@keyframes aura-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(227, 192, 118, 0.22),
      0 0 28px rgba(227, 192, 118, 0.28);
  }
  70% {
    box-shadow:
      0 0 0 18px rgba(227, 192, 118, 0),
      0 0 42px rgba(227, 192, 118, 0.4);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(227, 192, 118, 0),
      0 0 28px rgba(227, 192, 118, 0.28);
  }
}

.matrix-table-cell.empty {
  border-style: dashed;
  border-color: var(--border-gold);
  cursor: pointer;
  background: transparent;
}

.matrix-plus-sep {
  align-self: center;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  background:
    radial-gradient(circle at 50% 50%, rgba(227, 192, 118, 0.2), transparent 62%),
    var(--gold-soft);
  box-shadow:
    0 0 0 6px rgba(227, 192, 118, 0.08),
    0 10px 28px rgba(227, 192, 118, 0.24);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

/* bonus footer strip */
.matrix-table-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background:
    linear-gradient(120deg, var(--gold-soft), transparent 60%),
    var(--surface-glass);
  backdrop-filter: blur(14px);
  color: var(--text);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s;
}

.matrix-table-footer:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

.mtf-bonus-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}

.mtf-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-pulse 1.8s infinite;
}

.mtf-bonus-label {
  font-weight: 600;
  color: var(--text-2);
  font-size: 14.5px;
}

.mtf-bonus-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(227, 192, 118, 0.35);
}

.mtf-count-row {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.mtf-count-row b { color: var(--text); font-variant-numeric: tabular-nums; }

/* re-buy explainer */
.rebuy-box {
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
}

.rebuy-title {
  font-size: 18px;
  margin-bottom: 18px;
  text-align: center;
}

.rebuy-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rebuy-step {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  transition: transform 0.3s var(--ease-spring), border-color 0.3s;
}

.rebuy-step:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
}

.rebuy-step p { margin: 0; font-size: 13.5px; color: var(--text-2); }
.rebuy-step b { color: var(--text); }

.rebuy-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: var(--btn-primary-text);
  background: linear-gradient(130deg, var(--gold-200), var(--gold-400));
  box-shadow: var(--shadow-gold);
}

.rebuy-arrow {
  align-self: center;
  color: var(--gold);
  animation: arrow-nudge 1.6s var(--ease-luxe) infinite;
}

.rebuy-note {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ----------------------------------------------------------------
   13) MATRIX SIMULATOR
   ---------------------------------------------------------------- */
.matrix-lab { position: relative; }

.matrix-sim {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    linear-gradient(150deg, var(--surface-2), transparent 45%),
    var(--surface-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.matrix-sim-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.matrix-sim-kicker {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 700;
}

.matrix-sim-topbar strong {
  font-family: var(--font-display);
  font-size: 19px;
}

.matrix-sim-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.matrix-sim-stats span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
}

.matrix-sim-stats b {
  font-family: var(--font-display);
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.matrix-sim-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* left: visual board */
.matrix-sim-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 26px 36px;
  border-right: 0;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(420px 260px at 50% 20%, var(--gold-soft), transparent 70%);
}

.matrix-board-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 26px;
}

.matrix-board-summary b {
  color: var(--gold);
  font-family: var(--font-display);
}

.matrix-board-dots {
  display: flex;
  gap: 6px;
}

.matrix-board-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: background 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-spring);
}

.matrix-board-dots i.is-on {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(227, 192, 118, 0.7);
  transform: scale(1.25);
}

.matrix-owner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.matrix-owner span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-size: 28px;
  border-radius: 22px;
  border: 1px solid var(--border-gold);
  background:
    linear-gradient(160deg, var(--gold-soft), transparent),
    var(--surface);
  box-shadow: var(--shadow-gold);
  animation: badge-float 4.5s var(--ease-luxe) infinite;
}

.matrix-owner small {
  color: var(--muted);
  font-size: 12px;
}

.matrix-stem {
  width: 2px;
  height: 34px;
  margin: 6px 0 10px;
  background: linear-gradient(var(--gold-400), transparent);
}

.matrix-sim-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 130px));
  gap: 14px;
  width: 100%;
  justify-content: center;
}

.matrix-sim-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 10px 14px;
  border-radius: var(--radius);
  text-align: center;
  transition:
    border-color 0.35s,
    background-color 0.35s,
    transform 0.4s var(--ease-spring),
    box-shadow 0.4s;
}

.matrix-sim-slot span { font-size: 24px; }

.matrix-sim-slot b {
  font-size: 13.5px;
  font-weight: 700;
}

.matrix-sim-slot small {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.matrix-sim-slot.is-waiting {
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  color: var(--muted);
}

.matrix-sim-slot.is-filled {
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: var(--accent-soft);
  color: var(--text);
  animation: slot-land 0.55s var(--ease-spring);
}

@keyframes slot-land {
  0% { transform: translateY(-16px) scale(0.85); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

.matrix-sim-slot.is-complete {
  border: 1px solid var(--border-gold);
  background:
    linear-gradient(160deg, var(--gold-soft), transparent),
    var(--surface);
  color: var(--gold);
  box-shadow: var(--shadow-gold);
  animation: slot-celebrate 0.7s var(--ease-spring);
}

@keyframes slot-celebrate {
  0% { transform: scale(0.9); }
  55% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* right: control panel */
.matrix-sim-control {
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
}

.matrix-step-label {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.matrix-sim-control h3 {
  font-size: 22px;
  margin: 8px 0 6px;
}

.matrix-sim-control > p {
  color: var(--text-2);
  font-size: 15px;
  margin: 0 0 20px;
  min-height: 48px;
}

.matrix-qualify {
  margin-bottom: 22px;
}

.matrix-qualify-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.matrix-qualify-head b {
  color: var(--gold);
  font-family: var(--font-display);
}

.matrix-qualify-track {
  height: 9px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.matrix-qualify-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--em-500), var(--gold-300));
  box-shadow: 0 0 12px rgba(227, 192, 118, 0.5);
  transition: width 0.6s var(--ease-out);
}

.matrix-sim-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.matrix-sim-actions .btn { width: 100%; }

.matrix-reset {
  align-self: center;
  padding: 8px 16px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  border-radius: 999px;
  transition: color 0.25s;
}

.matrix-reset:hover { color: var(--gold); }

.matrix-sim-rule {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 12.5px;
}

.matrix-sim-rule span {
  display: block;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-2);
  line-height: 1.45;
}

.matrix-sim-rule b {
  color: var(--gold);
  font-weight: 800;
}

.matrix-sim-rule small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88em;
}

/* ----------------------------------------------------------------
   14) PRODUCTS
   ---------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transform-style: preserve-3d;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.4s,
    box-shadow 0.5s var(--ease-out);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-2), var(--shadow-gold);
}

.product-card img {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: contain;
  object-position: center top;
  background: #fff;
  transition: filter 0.5s;
}

:root[data-theme="dark"] .product-card img {
  opacity: 0.9;
  filter: brightness(0.88) contrast(1.02);
}

.product-card:hover img {
  transform: none;
}

.product-card-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.product-card-copy span {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.product-card-copy h3 {
  font-size: 18.5px;
  font-weight: 700;
  margin: 4px 0 8px 0;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.product-card-copy p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

/* ----------------------------------------------------------------
   15) COURSES
   ---------------------------------------------------------------- */
.online-learning-link {
  gap: 7px;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.online-learning-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.course-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transform-style: preserve-3d;
  transition:
    transform 0.5s var(--ease-out),
    border-color 0.4s,
    box-shadow 0.5s var(--ease-out);
}

.course-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-2), var(--shadow-gold);
}

.course-card img {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: contain;
  object-position: center top;
  background: #fff;
  transition: filter 0.5s;
}

:root[data-theme="dark"] .course-card img {
  opacity: 0.9;
  filter: brightness(0.88) contrast(1.02);
}

.course-card:hover img { transform: none; }

.course-card-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.course-card-copy span {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.course-card-copy h3 {
  font-size: 18.5px;
  font-weight: 700;
  margin: 4px 0 8px 0;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.course-card-copy p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

/* ----------------------------------------------------------------
   16) CTA / CONTACT
   ---------------------------------------------------------------- */
.cta-shell {
  position: relative;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  background:
    radial-gradient(700px 380px at 12% 0%, rgba(212, 169, 79, 0.16), transparent 60%),
    radial-gradient(560px 340px at 95% 110%, rgba(16, 185, 129, 0.14), transparent 60%),
    linear-gradient(155deg, var(--bg-3), var(--bg-2));
  box-shadow: var(--shadow-2);
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.cta-orb-one {
  width: 380px;
  height: 380px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(227, 192, 118, 0.3), transparent 65%);
  animation: aurora-drift 18s var(--ease-luxe) infinite alternate;
}

.cta-orb-two {
  width: 300px;
  height: 300px;
  bottom: -140px;
  left: -60px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28), transparent 65%);
  animation: aurora-drift 22s var(--ease-luxe) -6s infinite alternate-reverse;
}

.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  flex-wrap: wrap;
  padding: clamp(36px, 6vw, 64px);
}

.cta-copy h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 16px 0 10px;
}

.cta-copy h2 span { color: inherit; }

.cta-copy p {
  color: var(--text-2);
  margin: 0;
  font-size: 16.5px;
}

.eyebrow-light { backdrop-filter: blur(6px); }

.cta-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cta-right > small {
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 12.5px;
  text-transform: uppercase;
}

.cta-call {
  gap: 16px;
  text-align: left;
}

.cta-call span b {
  display: block;
  font-size: 20px;
  letter-spacing: 0.03em;
}

.cta-call span em {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 12.5px;
  opacity: 0.75;
}

.cta-phone {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 21px;
  animation: phone-ring 2.8s var(--ease-luxe) infinite;
}

@keyframes phone-ring {
  0%, 82%, 100% { transform: rotate(0); }
  86% { transform: rotate(-12deg); }
  90% { transform: rotate(10deg); }
  94% { transform: rotate(-8deg); }
  98% { transform: rotate(5deg); }
}

.cta-arrow {
  font-size: 20px;
  transition: transform 0.3s var(--ease-spring);
}

.cta-call:hover .cta-arrow { transform: translateX(6px); }

/* ----------------------------------------------------------------
   17) FOOTER
   ---------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  backdrop-filter: blur(10px);
  padding: 40px 24px 110px;
}

.footer-inner {
  max-width: var(--wrap);
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: var(--text-2);
  font-size: 14.5px;
  transition: color 0.25s;
}

.footer-nav a:hover { color: var(--gold); }

.footer-fine {
  max-width: var(--wrap);
  margin: 0 auto;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

/* ----------------------------------------------------------------
   18) MOBILE STICKY CTA
   ---------------------------------------------------------------- */
.mobile-bar {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: none;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--border-gold);
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: var(--shadow-2);
}

.mobile-bar .btn { width: 100%; }

/* ----------------------------------------------------------------
   19) POPUPS
   ---------------------------------------------------------------- */
.matrix-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.matrix-popup-overlay.is-in { opacity: 1; }

.matrix-popup {
  position: relative;
  width: min(420px, 100%);
  padding: 34px 30px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background:
    radial-gradient(320px 200px at 50% 0%, var(--gold-soft), transparent 70%),
    var(--surface-solid);
  box-shadow: var(--shadow-2), var(--shadow-gold);
  text-align: center;
  transform: translateY(26px) scale(0.94);
  transition: transform 0.5s var(--ease-spring);
}

.matrix-popup-overlay.is-in .matrix-popup { transform: none; }

.matrix-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}

.matrix-popup-close:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  transform: rotate(90deg);
}

.matrix-popup-lock {
  font-size: 40px;
  margin-bottom: 8px;
  animation: badge-float 3s var(--ease-luxe) infinite;
}

.matrix-popup-title {
  font-size: 24px;
  margin-bottom: 4px;
}

.matrix-popup-sub {
  color: var(--text-2);
  margin: 0 0 18px;
}

.matrix-popup-sub b { color: var(--gold); }

.matrix-popup-reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
}

.mpr-rate,
.mpr-pct {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(227, 192, 118, 0.45);
}

.mpr-desc { color: var(--text-2); font-size: 14.5px; }
.mpr-company { color: var(--text); }

.matrix-popup-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* bonus-received variant */
.bonus-confetti {
  font-size: 44px;
  animation: confetti-pop 0.8s var(--ease-spring);
}

@keyframes confetti-pop {
  0% { transform: scale(0) rotate(-30deg); }
  70% { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.bonus-unlocked {
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 14px;
}

.bonus-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-gold);
  background: var(--gold-soft);
  margin-bottom: 12px;
}

.bonus-total span { color: var(--text-2); font-size: 13.5px; }

.bonus-total strong {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(227, 192, 118, 0.4);
}

.bonus-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.bonus-breakdown > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.bonus-breakdown span { color: var(--muted); font-size: 12px; }
.bonus-breakdown b { font-family: var(--font-display); font-size: 17px; }

.bonus-next {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
}

@keyframes pop-in {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ----------------------------------------------------------------
   20) RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: stretch;
  }
  .hero-intro {
    text-align: center;
    margin: 0 auto clamp(44px, 6vw, 64px);
  }
  .hero-lede {
    margin: 0 auto clamp(32px, 4.5vw, 44px);
    max-width: 620px;
  }
  .hero-cta-row {
    justify-content: center;
    margin-bottom: 38px;
  }
  .hero-matrix-grid {
    grid-column: auto;
  }
  .matrix-sim-layout { grid-template-columns: 1fr; }
  .matrix-sim-visual { border-right: none; border-bottom: 1px solid var(--border); }
  .product-grid, .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-glass);
    backdrop-filter: blur(22px) saturate(1.4);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: var(--shadow-2);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  }

  .nav-links a { padding: 13px 16px; text-align: center; }

  .menu-open .nav-links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-toggle { display: flex; }
  .theme-toggle .theme-label { display: none; }
  .theme-toggle { padding: 0 12px; }

  .hero { padding-top: calc(var(--nav-h) + 28px); }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
  }

  .hero-stat { padding: 10px 8px; }

  .hero-card { padding: 18px 16px 16px; min-height: 0; }
  .hero-card-summary { flex-direction: column; }
  .hero-card-foot > div { flex: 1; width: auto; min-width: 0; }
  .hero-card-withdraw { justify-content: center; width: 100%; }

  .matrix-table-grid {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .matrix-plus-sep { display: none; }
  .matrix-table-cell.mtc-you { grid-column: 1 / -1; }

  .rebuy-steps { flex-direction: column; }
  .rebuy-arrow { transform: rotate(90deg); }
  .rebuy-step { min-width: 0; }

  .matrix-sim-topbar { padding: 16px 18px; }
  .matrix-sim-visual { padding: 24px 16px 28px; }
  .matrix-sim-control { padding: 24px 18px; }
  .matrix-sim-slots { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  .product-grid, .course-grid { grid-template-columns: 1fr; }

  .cta-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-right { align-items: center; }

  .footer { padding-bottom: 130px; }
  .footer-inner { flex-direction: column; }

  .mobile-bar { display: block; }
}

/* ----------------------------------------------------------------
   21) REDUCED MOTION
   ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .lux-noise, #fxCanvas { display: none; }
}

/* ----------------------------------------------------------------
   22) GLOBAL MATRIX FIFO QUEUE — paired board view
   ---------------------------------------------------------------- */

.matrix-queue-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.mq-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-2);
  background: var(--surface);
  font-size: 13.5px;
  text-align: center;
}

.mq-chip b {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.matrix-boards {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 22px;
  width: 100%;
}

@media (max-width: 900px) {
  .matrix-boards {
    flex-direction: column;
    align-items: center;
  }
}

.matrix-board {
  min-width: 0;
  width: 100%;
  max-width: 362.67px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
}

.matrix-board.is-head {
  border-color: rgba(52, 211, 153, 0.35);
  background:
    linear-gradient(150deg, var(--accent-soft), transparent 58%),
    var(--surface);
}

.matrix-board.is-new {
  border-color: var(--border-gold);
  background:
    linear-gradient(150deg, var(--gold-soft), transparent 58%),
    var(--surface);
}

.matrix-board.is-head.is-complete-preview {
  border-color: var(--border-gold);
  background:
    linear-gradient(150deg, rgba(52, 211, 153, 0.14), var(--gold-soft)),
    var(--surface);
  box-shadow: var(--shadow-gold);
}

.mb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.mb-tag {
  color: var(--text-2);
  font-size: 13px;
  font-weight: 750;
}

.mb-fill {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gold);
  background: var(--chip-bg);
  font-family: var(--font-display);
  font-size: 13px;
}

.matrix-board .matrix-owner {
  margin-top: 0;
}

.matrix-board .matrix-owner span {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  font-size: 23px;
}

.matrix-board .matrix-owner small {
  min-height: 20px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

.matrix-board .matrix-stem {
  height: 24px;
  margin-bottom: 8px;
}

.matrix-board .matrix-sim-slots {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.matrix-board .matrix-sim-slot {
  min-height: 112px;
  padding: 14px 7px 11px;
}

.matrix-board .matrix-sim-slot b {
  font-size: 12px;
  white-space: nowrap;
}

.mb-note {
  min-height: 58px;
  margin: auto 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  text-align: center;
}

.mb-note b { color: var(--gold); }

.matrix-queue-flow {
  display: flex;
  gap: 9px;
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  scrollbar-width: thin;
}

.queue-board-chip,
.queue-board-more {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-2);
  background: var(--surface-solid);
}

.queue-board-chip span { color: var(--muted); font-size: 10.5px; }
.queue-board-chip b { margin-top: 2px; color: var(--text); font-size: 13px; }
.queue-board-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.queue-board-chip.is-active {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.queue-board-chip.is-active span { color: var(--accent); }

.queue-board-chip.is-newest {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.queue-board-chip.is-newest span { color: var(--gold); }

.queue-board-chip.is-completed {
  border-color: rgba(52, 211, 153, 0.48);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.08);
}

.queue-board-chip.is-completed span,
.queue-board-chip.is-completed b { color: var(--accent); }

.queue-board-more {
  justify-content: center;
  min-width: 86px;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 1020px) and (min-width: 901px) {
  .matrix-sim-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    column-gap: 28px;
  }

  .matrix-sim-control .matrix-step-label,
  .matrix-sim-control h3,
  .matrix-sim-control > p,
  .matrix-sim-control .matrix-qualify {
    grid-column: 1;
  }

  .matrix-sim-control .matrix-sim-actions,
  .matrix-sim-control .matrix-sim-rule {
    grid-column: 2;
  }

  .matrix-sim-control .matrix-sim-actions {
    grid-row: 1 / span 4;
    align-self: center;
    margin-top: 0;
  }

  .matrix-sim-control .matrix-sim-rule {
    align-self: end;
  }
}

.matrix-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: saturate(0.65);
}

.matrix-qualify.is-unlocked {
  border-color: rgba(52, 211, 153, 0.5);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.08);
}

.matrix-qualify.is-unlocked .matrix-qualify-head b {
  color: var(--accent);
}

@media (max-width: 900px) {
  .matrix-sim-control { display: block; }
  .matrix-sim-control .matrix-sim-actions { margin-top: 20px; }
}

@media (max-width: 720px) {
  .matrix-queue-strip { grid-template-columns: 1fr; }
  .matrix-board .matrix-sim-slot { min-height: 102px; }
  .mb-note { min-height: 0; }
}

@media (max-width: 430px) {
  .matrix-board { padding: 15px 12px; }
  .matrix-board .matrix-sim-slots { gap: 6px; }
  .matrix-board .matrix-sim-slot { min-height: 94px; }
  .matrix-board .matrix-sim-slot b { font-size: 10.5px; }
}

/* Hard overflow guard for the paired Matrix boards. */
.matrix-lab,
.matrix-sim,
.matrix-sim-layout,
.matrix-sim-visual,
.matrix-boards,
.matrix-board,
.matrix-board .matrix-sim-slots,
.matrix-board .matrix-sim-slot {
  min-width: 0;
  max-width: 100%;
}

.matrix-sim,
.matrix-sim-layout,
.matrix-sim-visual,
.matrix-boards {
  width: 100%;
}

.matrix-sim-visual,
.matrix-boards,
.matrix-board {
  overflow: hidden;
}



.matrix-board .matrix-sim-slots {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.matrix-board .matrix-sim-slot {
  width: 100%;
  overflow: hidden;
}

.matrix-board .matrix-sim-slot b {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.matrix-board .matrix-sim-slot small,
.matrix-board .matrix-owner small,
.mb-note {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mb-head { min-width: 0; }

.mb-tag {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1050px) {
  .matrix-boards {
    gap: 20px;
  }
}

/* Unified card sizing pass: keep every major section visually consistent. */
.glass-card,
.matrix-table-grid,
.matrix-sim,
.product-card,
.course-card,
.cta-shell {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-xl);
  border-color: var(--border);
}

.hero-card {
  width: 100%;
  max-width: 100%;
}

.product-card,
.course-card {
  min-height: 480px;
}

.matrix-card,
.matrix-board,
.matrix-table-cell,
.rebuy-box,
.hero-card-foot > div,
.hero-card-withdraw,
.heronet-wrap {
  border-radius: var(--radius-lg);
}

.matrix-sim-layout {
  grid-template-columns: 1fr;
}

.matrix-sim-visual {
  border-right: 0;
  border-bottom: 1px solid var(--border);
}

.matrix-lab {
  max-width: var(--wrap);
  margin: 0 auto;
}

.matrix-boards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.matrix-board {
  width: 100%;
  max-width: none;
}

/* Readability pass for older users and final interaction polish. */
body {
  font-size: 19px;
}

.nav-links a,
.btn,
.theme-toggle,
.hero-live-message,
.hero-guide,
.matrix-table-footer,
.matrix-sim-control > p,
.matrix-sim-stats span,
.matrix-sim-slot b,
.matrix-board .matrix-sim-slot b,
.product-card-copy p,
.course-card-copy p,
.matrix-popup-sub,
.matrix-popup-note {
  font-size: 17px;
}

.section-head p,
.hero-lede,
.cta-copy p {
  font-size: 21px;
}

.product-card-copy span,
.course-card-copy span,
.matrix-sim-kicker,
.matrix-step-label,
.matrix-sim-rule,
.matrix-board .matrix-owner small,
.matrix-board .matrix-sim-slot small,
.queue-board-chip small {
  font-size: 14.5px;
}

.product-card-copy h3,
.course-card-copy h3 {
  font-size: 22px;
  min-height: 60px;
}

.hchip {
  translate: 0 6px;
  transform: none;
}

.hchip.chip-show {
  translate: 0 0;
  transform: none;
}

.hchip text {
  font-size: 17px;
}

.hnode-count {
  font-size: 15px;
}

.hero-card-withdraw {
  flex: 0 0 auto;
  min-width: 255px;
  min-height: 72px;
  padding: 10px 16px;
}

.withdraw-icon {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.withdraw-left {
  gap: 12px;
}

.withdraw-action {
  font-size: 15.5px;
  white-space: nowrap;
}

.withdraw-note {
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .section-head p,
  .hero-lede,
  .cta-copy p { font-size: 18px; }
  .hero-card-withdraw {
    width: 100%;
    min-width: 0;
  }
}

/* Compact network card: graph on the left, controls stacked on the right. */
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  grid-template-rows: auto 1fr;
  gap: 16px;
  min-height: 330px;
  padding: 18px;
}

.hero-card-summary {
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.hero-card-foot {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hero-card-foot > div {
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
}

.hero-card-withdraw {
  width: 100%;
  min-width: 0;
  min-height: 72px;
}

.hero-card-head {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin-top: 0;
}

.hero-live-message {
  width: 100%;
  justify-content: center;
  white-space: normal;
}

.heronet-wrap {
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 286px;
  margin-top: 0;
}

@media (max-width: 900px) {
  .hero-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .hero-card-summary {
    flex-direction: column;
  }

  .heronet-wrap {
    min-height: 220px;
  }
}

/* Matrix simulator: boards on the left, control menu on the right. */
.matrix-sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
}

.matrix-sim-visual {
  border-right: 1px solid var(--border);
  border-bottom: 0;
}

.matrix-sim-control {
  border-left: 0;
  background:
    linear-gradient(160deg, rgba(227, 192, 118, 0.06), transparent 60%),
    rgba(255, 255, 255, 0.018);
}

.matrix-board.is-head {
  border-color: var(--border-gold);
  background:
    radial-gradient(420px 260px at 50% 10%, rgba(227, 192, 118, 0.18), transparent 72%),
    linear-gradient(150deg, var(--gold-soft), transparent 58%),
    var(--surface);
}

.matrix-board.is-head .matrix-owner span {
  color: var(--gold);
  border-color: var(--border-gold);
  background:
    linear-gradient(160deg, rgba(227, 192, 118, 0.24), transparent),
    var(--surface);
  box-shadow: var(--shadow-gold);
}

@media (max-width: 980px) {
  .matrix-sim-layout {
    grid-template-columns: 1fr;
  }

  .matrix-sim-visual {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

/* Restore original network card flow: controls on top, graph below. */
.hero-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px;
}

.hero-card-summary {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card-foot {
  display: flex;
  grid-template-columns: none;
  gap: 10px;
}

.hero-card-foot > div {
  width: 128px;
  min-height: 76px;
}

.hero-card-withdraw {
  flex: 0 1 320px;
  width: auto;
  max-width: 100%;
  min-width: 260px;
}

.hero-card-head {
  display: flex;
  margin-top: -4px;
}

.hero-live-message {
  width: auto;
  max-width: 100%;
  padding: 8px 14px;
  justify-content: flex-start;
  white-space: normal;
}

.heronet-wrap {
  min-height: 176px;
  margin-top: 0;
}

.heronet-svg-wrap {
  height: auto;
}

#heroNet {
  width: 100%;
  min-width: 680px;
  height: auto;
  min-height: 0;
}

.hicon-head {
  transform: scale(0.82);
  transform-origin: center;
  transform-box: fill-box;
}

.hicon-body {
  stroke-width: 4;
  transform: scale(0.82);
  transform-origin: center;
  transform-box: fill-box;
}

.hnode-pulse-ring {
  r: 18;
}

@media (max-width: 720px) {
  .hero-card-summary {
    flex-direction: column;
  }

  .hero-card-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card-foot > div {
    width: 100%;
  }

  .hero-card-withdraw {
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }
}

/* Final responsive polish: use right-side space, keep key labels on one line. */
.hero-card {
  gap: clamp(12px, 1.8vw, 18px);
  overflow: hidden;
}

.hero-card-summary {
  display: grid;
  grid-column: auto;
  grid-row: auto;
  grid-template-columns: auto minmax(250px, 320px) minmax(300px, 1fr);
  align-items: stretch;
  gap: clamp(10px, 1.4vw, 16px);
}

.hero-card-foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  min-width: 0;
}

.hero-card-foot > div {
  width: auto;
  min-width: 0;
}

.hero-card-withdraw {
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.hero-card-head {
  display: grid;
  grid-column: auto;
  grid-row: auto;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.78fr);
  align-items: stretch;
  align-self: stretch;
  gap: clamp(10px, 1.4vw, 16px);
  margin: 0;
  min-width: 0;
}

.hero-live-status {
  min-width: 0;
  min-height: 0;
}

.hero-live-message {
  width: 100%;
  min-height: 60px;
  justify-content: flex-start;
  padding: 12px 16px;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.35;
}

.company-sales {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
}

.company-sales-main,
.company-share-live {
  min-width: 0;
}

.company-sales-main small,
.company-share-live span {
  white-space: nowrap;
}

.withdraw-action {
  white-space: nowrap;
}

.online-learning-link {
  position: relative;
  isolation: isolate;
  gap: 8px;
  padding: 10px 18px;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 0 0 1px rgba(227, 192, 118, 0.18), 0 12px 36px -24px rgba(227, 192, 118, 0.85);
}

.online-learning-link::before,
.online-learning-link::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.online-learning-link::before {
  border: 1px solid rgba(227, 192, 118, 0.28);
  opacity: 0.75;
  animation: online-aura-ring 2.7s var(--ease-out) infinite;
}

.online-learning-link::after {
  background: radial-gradient(circle, rgba(227, 192, 118, 0.2), rgba(227, 192, 118, 0) 68%);
  filter: blur(8px);
  opacity: 0.75;
}

.online-learning-link:hover,
.online-learning-link:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-gold);
}

.online-learning-link:active {
  transform: translateY(0) scale(0.98);
}

@keyframes online-aura-ring {
  0% { opacity: 0.6; transform: scale(0.96); }
  65% { opacity: 0.08; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.2); }
}

.products .section-head,
.online-courses .section-head {
  max-width: min(100%, 1060px);
}

.products .section-head p,
.online-courses .section-head p {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  font-size: clamp(12px, 1.55vw, 20px);
  line-height: 1.55;
}

.products .section-head p::-webkit-scrollbar,
.online-courses .section-head p::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1080px) {
  .hero-card-summary {
    grid-template-columns: auto minmax(240px, 1fr);
  }

  .hero-card-head {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  }
}

@media (max-width: 820px) {
  .hero-card-summary,
  .hero-card-head {
    grid-template-columns: 1fr;
  }

  .hero-card-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-live-message,
  .company-sales {
    min-height: 58px;
  }

  .heronet-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .hero-card {
    padding: 14px;
    border-radius: 22px;
  }

  .hero-card-summary,
  .hero-card-head {
    gap: 10px;
  }

  .hero-card-foot {
    gap: 8px;
  }

  .hero-card-foot > div {
    min-height: 68px;
    padding: 12px 14px;
  }

  .hero-card-foot b {
    font-size: clamp(24px, 8vw, 34px);
  }

  .hero-card-withdraw {
    min-height: 68px;
    padding: 12px 14px;
  }

  .withdraw-left {
    gap: 10px;
  }

  .withdraw-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .withdraw-action {
    font-size: 15px;
  }

  .withdraw-note {
    font-size: 12.5px;
  }

  .hero-live-message {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .company-sales {
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
  }

  .company-share-live {
    padding-left: 10px;
  }

  .company-sales-main strong {
    font-size: 17px;
  }

  .company-share-live b {
    font-size: 16px;
  }

  .products .section-head p,
  .online-courses .section-head p {
    font-size: 11.5px;
  }
}
