/* ==============================================
   MATRIX MLM SOFTWARE PAGE
   matrix.css — Page-specific styles
   Extends: css/style.css
   ============================================== */

/* ===========================
   BREADCRUMB BAR
   (shared pattern from binary.css)
   =========================== */
.breadcrumb-bar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.625rem 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb a { color: var(--gray-500); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li[aria-current="page"] { color: var(--gray-900); font-weight: 600; }
.breadcrumb i { color: var(--gray-400); font-size: 0.65rem; }

/* ===========================
   EEAT AUTHOR BOX
   =========================== */
.eeat-author-box {
  display: flex;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(99,102,241,0.04));
  border: 1px solid rgba(37,99,235,0.15);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}
.eeat-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.375rem;
  flex-shrink: 0;
}
.eeat-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.eeat-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 0.625rem;
}
.eeat-creds span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 500;
}
.eeat-creds i { color: var(--primary); font-size: 0.75rem; }
.eeat-summary {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0;
}

/* ===========================
   BG SECTION VARIANTS
   =========================== */
.bg-light-section { background: var(--gray-50); }
.bg-dark-section {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%);
}

/* ===========================
   HERO — MATRIX TWO-COLUMN LAYOUT
   =========================== */
.hero-matrix {
  min-height: 640px;
  padding: 4.5rem 0 5rem;
}
.hero-matrix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.hero-matrix-copy { max-width: 560px; }

/* ===========================
   MATRIX HERO DIAGRAM (1+3+9)
   =========================== */
.matrix-hero-diagram {
  background: var(--gray-900);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 100px;
}
.mhd-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.mhd-header i { color: var(--primary-light); flex-shrink: 0; }
.mhd-badge {
  margin-left: auto;
  background: rgba(99,102,241,0.2);
  color: #a5b4fc;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Level container */
.mhd-level {
  margin-bottom: 0.75rem;
  position: relative;
}
.mhd-level-label {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.625rem;
}

/* Connector bar between levels */
.mhd-connector {
  width: 2px;
  height: 20px;
  background: linear-gradient(to bottom, rgba(37,99,235,0.5), rgba(99,102,241,0.2));
  margin: 0 auto 0.75rem;
}

/* Row alignments */
.mhd-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.mhd-row-1 { gap: 0; }
.mhd-row-3 { gap: 0.875rem; }
.mhd-row-9 { gap: 0.3rem; flex-wrap: wrap; }

/* Individual node */
.mhd-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: default;
  position: relative;
}
.mhd-node-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.mhd-node-avatar:hover { transform: scale(1.1); }
.mhd-node-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-align: center;
}
.mhd-node-bv {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}
.mhd-node-bv.spill {
  background: rgba(245,158,11,0.2);
  color: #fbbf24;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* Node type: root */
.mhd-root .mhd-node-avatar {
  border-color: var(--warning);
  background: rgba(245,158,11,0.15);
  color: var(--warning);
  width: 60px;
  height: 60px;
  font-size: 1.25rem;
  box-shadow: 0 0 20px rgba(245,158,11,0.3);
}

/* Node type: active */
.mhd-active .mhd-node-avatar {
  border-color: var(--primary-light);
  background: rgba(59,130,246,0.15);
  color: var(--primary-light);
}

/* Node type: inactive (open) */
.mhd-inactive .mhd-node-avatar {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.25);
  border-style: dashed;
}

/* Small nodes (level 2) */
.mhd-node.sm .mhd-node-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}
.mhd-node.sm .mhd-node-name { font-size: 0.6rem; }

/* Tooltip */
.mhd-node[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  font-size: 0.7rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}

/* Summary bar */
.mhd-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 1rem;
  padding: 0.875rem;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
}
.mhd-sum-item { text-align: center; }
.mhd-sum-num {
  display: block;
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--primary-light);
  font-family: var(--font-primary);
  line-height: 1;
}
.mhd-sum-item.total .mhd-sum-num { color: var(--warning); font-size: 1.75rem; }
.mhd-sum-lbl { font-size: 0.65rem; color: rgba(255,255,255,0.4); font-weight: 500; }
.mhd-sum-sep {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255,255,255,0.2);
  align-self: flex-start;
  padding-top: 2px;
}

/* Matrix fill progress */
.mhd-progress-wrap { margin-bottom: 1rem; }
.mhd-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.375rem;
  font-weight: 500;
}
.mhd-progress-pct { font-weight: 700; color: var(--primary-light); }
.mhd-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.mhd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 1s ease;
}
.mhd-progress-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.35);
  margin-top: 0.375rem;
  text-align: center;
}

/* Legend */
.mhd-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.mhd-leg-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
}
.mhd-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
}
.mhd-dot.active { border-color: var(--primary-light); background: rgba(59,130,246,0.3); }
.mhd-dot.inactive { border-color: rgba(255,255,255,0.2); background: transparent; border-style: dashed; }
.mhd-dot.spill { border-color: var(--warning); background: rgba(245,158,11,0.2); }
.mhd-dot.root { border-color: var(--warning); background: rgba(245,158,11,0.35); }

/* ===========================
   MATRIX INTRO TEXT & CARDS
   =========================== */
.matrix-intro-text {
  max-width: 860px;
  margin: 0 auto 3rem;
}
.matrix-intro-text p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.85;
  margin-bottom: 1.25rem;
}
.matrix-intro-text p:last-child { margin-bottom: 0; }

.matrix-intro-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.mic-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.mic-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}
.mic-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.375rem;
  flex-shrink: 0;
}
.mic-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}
.mic-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin: 0;
}

/* ===========================
   HOW MATRIX WORKS — GRID STEPS
   =========================== */
.how-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.hmg-step {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}
.hmg-step:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}
.hmg-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
}
.hmg-step:hover::before { opacity: 1; }

.hmg-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(99,102,241,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.375rem;
  flex-shrink: 0;
}
.hmg-step-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(37,99,235,0.08);
  font-family: var(--font-primary);
  line-height: 1;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
}
.hmg-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.4;
}
.hmg-step p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin: 0;
}

/* ===========================
   TYPES OF MATRIX — ACCORDION
   =========================== */
.matrix-types-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.mta-item {
  border-bottom: 1px solid var(--gray-200);
}
.mta-item:last-child { border-bottom: none; }

.mta-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.375rem 1.5rem;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background 0.2s;
}
.mta-trigger:hover { background: var(--gray-50); }
.mta-item.open .mta-trigger { background: rgba(37,99,235,0.03); }

.mta-trigger-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}
.mta-trig-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.mta-trig-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.2rem;
}
.mta-trig-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
  font-weight: 400;
}
.mta-arrow {
  color: var(--gray-400);
  font-size: 0.875rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.mta-item.open .mta-arrow { transform: rotate(180deg); color: var(--primary); }

.mta-body {
  padding: 0 1.5rem 1.5rem 4rem;
  background: rgba(37,99,235,0.02);
}
.mta-body p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 1rem;
}
.mta-body p:last-of-type { margin-bottom: 1.25rem; }

.mta-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.mta-stat {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  text-align: center;
  min-width: 90px;
}
.mta-stat-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-primary);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.mta-stat-lbl {
  font-size: 0.7rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ===========================
   BENEFITS — ACCORDION GRID
   =========================== */
.benefits-accordion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.bag-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.bac-item {
  border-bottom: 1px solid var(--gray-200);
}
.bac-item:last-child { border-bottom: none; }

.bac-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 0.875rem;
  transition: background 0.2s;
}
.bac-trigger:hover { background: var(--gray-50); }
.bac-item.open .bac-trigger { background: rgba(37,99,235,0.03); }

.bac-trig-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  flex: 1;
}
.bac-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.bac-arrow {
  font-size: 0.8rem;
  color: var(--gray-400);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.bac-item.open .bac-arrow {
  transform: rotate(45deg);
  color: var(--primary);
}
.bac-body {
  padding: 0 1.25rem 1.25rem 3.625rem;
  background: rgba(37,99,235,0.02);
}
.bac-body p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin: 0;
}

/* ===========================
   MATRIX vs BINARY — COMPARISON TABLE
   =========================== */
.mvb-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}
.mvb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

/* Header row */
.mvb-table thead tr {
  background: var(--gray-900);
}
.mvb-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 2px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.mvb-table th i { margin-right: 0.5rem; }
.mvb-feature-col {
  color: rgba(255,255,255,0.6);
  width: 32%;
}
.mvb-matrix-col {
  color: #a5b4fc;
  width: 34%;
}
.mvb-binary-col {
  color: #6ee7b7;
  width: 34%;
}

/* Body rows */
.mvb-table tbody tr {
  transition: background 0.15s;
}
.mvb-table tbody tr:hover { background: rgba(37,99,235,0.03); }
.mvb-table tbody td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  line-height: 1.5;
  vertical-align: middle;
}
.mvb-table tbody td.mvb-feature-col {
  color: var(--gray-800);
  font-weight: 500;
}
.mvb-table tbody td.mvb-matrix-col {
  background: rgba(37,99,235,0.03);
  color: var(--gray-700);
}
.mvb-table tbody td.mvb-binary-col {
  background: rgba(16,185,129,0.02);
  color: var(--gray-700);
}

/* Badge chips in table */
.mvb-badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.mvb-badge.matrix {
  background: rgba(37,99,235,0.1);
  color: var(--primary);
}
.mvb-badge.binary {
  background: rgba(16,185,129,0.1);
  color: var(--success);
}

/* Icon helpers in table */
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.text-warning { color: var(--warning); }

/* Footer row — recommendation */
.mvb-table tfoot tr { background: var(--gray-50); }
.mvb-table tfoot td {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  border-top: 2px solid var(--gray-200);
}
.mvb-table tfoot td.mvb-feature-col {
  font-weight: 700;
  color: var(--gray-900);
}
.mvb-winner {
  background: rgba(37,99,235,0.05) !important;
  color: var(--primary) !important;
  font-weight: 600;
}
.mvb-winner i { color: var(--warning); margin-right: 0.375rem; }

/* CTA strip below table */
.mvb-cta-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}
.mvb-cta-strip p {
  flex: 1;
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin: 0;
  min-width: 200px;
}

/* ===========================
   WHO SHOULD USE — GRID
   =========================== */
.who-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.who-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: var(--transition);
}
.who-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}
.who-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(99,102,241,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.375rem;
}
.who-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.4;
}
.who-card p {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin: 0;
  flex: 1;
}
.who-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.25rem;
}
.who-examples span {
  background: rgba(37,99,235,0.07);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

/* ===========================
   EARNINGS EXAMPLE SECTION
   =========================== */
.example-setup-box {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2.5rem;
}
.example-setup-box h3 {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.example-setup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.es-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 0.875rem;
}
.es-key {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.25rem;
}
.es-val { font-size: 0.9375rem; font-weight: 700; color: #fff; }

/* Main earnings card wrapper */
.matrix-earnings-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
}
.matrix-earnings-card > h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.matrix-earnings-card > h3 i { color: var(--primary-light); }
.matrix-earnings-card > p { color: rgba(255,255,255,0.7); margin-bottom: 2rem; font-size: 0.9375rem; line-height: 1.75; }

/* Phase blocks */
.mec-phase {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.mec-phase:last-child { margin-bottom: 0; }

.mec-phase-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(37,99,235,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.mec-phase-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}
.mec-phase-title { color: rgba(255,255,255,0.85); font-weight: 600; font-size: 0.9375rem; }

.mec-phase-body {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.5rem;
  align-items: start;
}
.mec-phase-body.full-width { grid-template-columns: 1fr; }

/* Mini matrix diagrams inside earnings phases */
.mec-matrix-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}
.mmm-root {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.35);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.mmm-level1 {
  display: flex;
  gap: 0.5rem;
}
.mmm-level2 {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 220px;
}
.mmm-node {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  gap: 2px;
  transition: transform 0.15s;
}
.mmm-node:hover { transform: scale(1.08); }
.mmm-node i { font-size: 0.875rem; }
.mmm-node span { font-size: 0.6rem; color: rgba(255,255,255,0.6); }

.mmm-node.filled {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: var(--primary-light);
}
.mmm-node.filled.spill {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.35);
  color: #fbbf24;
}
.mmm-node.empty {
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.25);
}

/* Fill progress bar inside mini matrix */
.mmm-fill-bar {
  width: 100%;
  max-width: 220px;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  margin-top: 0.25rem;
}
.mmm-fill-bar > span {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  white-space: nowrap;
}
.mmm-fill-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
}

/* Earnings tables inside phases */
.mec-earnings-table { overflow-x: auto; }

/* Shared earnings table styles (also used in week summary) */
.earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.earnings-table th {
  background: rgba(255,255,255,0.06);
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.earnings-table td {
  padding: 0.625rem 0.875rem;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8375rem;
  line-height: 1.5;
}
.earn-val {
  font-weight: 700;
  color: #10b981;
  text-align: right;
  white-space: nowrap;
}
.cycle-earn { color: #fbbf24; font-size: 1rem; }
.earn-subtotal td { background: rgba(37,99,235,0.1); border-top: 1px solid rgba(37,99,235,0.2); }
.earn-subtotal .earn-val { color: #a5b4fc; font-size: 1rem; }

/* Week / Month Summary Box */
.week-summary-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 2rem;
}
.week-summary-box h3 {
  color: #fff;
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.week-summary-box h3 i { color: var(--primary-light); }
.wsb-table-wrapper { overflow-x: auto; margin-bottom: 1.5rem; }
.wsb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 480px;
}
.wsb-table th {
  background: rgba(37,99,235,0.2);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.wsb-table td {
  padding: 0.75rem 1rem;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.wsb-table .total-col { color: #a5b4fc; font-weight: 600; }
.grand-total-row td {
  background: rgba(37,99,235,0.15);
  border-top: 2px solid rgba(37,99,235,0.4);
  color: rgba(255,255,255,0.9);
}
.grand-total-row .total-col.highlight {
  color: #10b981;
  font-size: 1.0625rem;
  font-weight: 700;
}

.wsb-insight {
  display: flex;
  gap: 1rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
}
.wsb-insight i { color: #10b981; font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }

/* ===========================
   CASE STUDY — PREMIUM CARD
   =========================== */
.case-study-premium {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.csp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, #f8faff, #eef2ff);
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
  gap: 1rem;
}
.csp-company {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.csp-logo-placeholder {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.csp-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
}
.csp-type {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 400;
}
.csp-result-pill {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(20,184,166,0.1));
  border: 1px solid rgba(16,185,129,0.3);
  color: #065f46;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.5rem 1.125rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.csp-result-pill i { color: #10b981; }

.csp-body { padding: 2rem; }

.csp-section { margin-bottom: 1.75rem; }
.csp-section h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.csp-section p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin: 0;
}

.csp-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.75rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(99,102,241,0.03));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37,99,235,0.1);
}
.csp-metric { text-align: center; }
.csp-m-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-primary);
  line-height: 1.1;
  margin-bottom: 0.375rem;
}
.csp-m-lbl {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  line-height: 1.3;
}

.csp-quote {
  background: var(--gray-50);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.8;
  font-style: italic;
}
.csp-quote cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.875rem;
}

/* ===========================
   WHY CHOOSE — ACCORDION
   =========================== */
.why-choose-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 2rem;
}
.wca-item {
  border-bottom: 1px solid var(--gray-200);
}
.wca-item:last-child { border-bottom: none; }

.wca-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: background 0.2s;
}
.wca-trigger:hover { background: var(--gray-50); }
.wca-item.open .wca-trigger { background: rgba(37,99,235,0.03); }

.wca-trig-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  flex: 1;
}
.wca-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(99,102,241,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.0625rem;
  flex-shrink: 0;
  transition: background 0.2s;
}
.wca-item.open .wca-icon {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.wca-arrow {
  font-size: 0.875rem;
  color: var(--gray-400);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.wca-item.open .wca-arrow { transform: rotate(180deg); color: var(--primary); }

.wca-body {
  padding: 0 1.5rem 1.5rem 4rem;
  background: rgba(37,99,235,0.02);
}
.wca-body p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin: 0;
}

/* ===========================
   VALUE PROPS STRIP
   =========================== */
.value-props-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
}
.vp-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}
.vp-item i { color: var(--primary); font-size: 1.0625rem; }

/* ===========================
   RESPONSIVE — MATRIX PAGE
   =========================== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  /* Hero */
  .hero-matrix-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-matrix-copy { max-width: 100%; }
  .matrix-hero-diagram { position: static; }

  /* Cards & grids */
  .matrix-intro-cards { grid-template-columns: repeat(2, 1fr); }
  .how-matrix-grid { grid-template-columns: repeat(2, 1fr); }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-accordion-grid { grid-template-columns: 1fr; }

  /* Earnings */
  .example-setup-grid { grid-template-columns: repeat(2, 1fr); }
  .mec-phase-body { grid-template-columns: 1fr; }
  .csp-metrics { grid-template-columns: repeat(2, 1fr); }

  /* Tables */
  .mvb-table { font-size: 0.8125rem; }
  .mvb-table th, .mvb-table td { padding: 0.625rem 0.875rem; }
}

/* Tablet Small (≤768px) */
@media (max-width: 768px) {
  /* EEAT */
  .eeat-author-box { flex-direction: column; }
  .eeat-creds { gap: 0.5rem; }

  /* Hero matrix diagram */
  .mhd-row-3 { gap: 0.5rem; }
  .mhd-row-9 { gap: 0.2rem; }
  .mhd-node-avatar { width: 40px; height: 40px; }
  .mhd-root .mhd-node-avatar { width: 52px; height: 52px; }
  .mhd-node.sm .mhd-node-avatar { width: 32px; height: 32px; font-size: 0.75rem; }
  .mhd-summary { gap: 0.375rem; }
  .mhd-sum-num { font-size: 1rem; }

  /* Content cards */
  .matrix-intro-cards { grid-template-columns: 1fr; }
  .how-matrix-grid { grid-template-columns: 1fr; }

  /* Accordion body indent */
  .mta-body { padding-left: 1.25rem; }
  .bac-body { padding-left: 1.125rem; }
  .wca-body { padding-left: 1.5rem; }

  /* Who grid */
  .who-grid { grid-template-columns: 1fr 1fr; }

  /* Case study */
  .csp-header { flex-direction: column; align-items: flex-start; }
  .csp-metrics { grid-template-columns: repeat(2, 1fr); }
  .csp-body { padding: 1.25rem; }

  /* Earnings */
  .matrix-earnings-card { padding: 1.5rem; }
  .mec-phase-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .example-setup-grid { grid-template-columns: 1fr 1fr; }
  .week-summary-box { padding: 1.25rem; }
  .wsb-table th, .wsb-table td { padding: 0.5rem 0.625rem; }
  .wsb-table { font-size: 0.8rem; }

  /* Value props */
  .value-props-strip { gap: 1.125rem; }

  /* MVB comparison CTA strip */
  .mvb-cta-strip { flex-direction: column; align-items: flex-start; }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
  /* Hero nodes */
  .mhd-node.sm .mhd-node-avatar { width: 28px; height: 28px; font-size: 0.65rem; }
  .mhd-row-9 { gap: 2px; }

  /* Grids → single column */
  .who-grid { grid-template-columns: 1fr; }
  .example-setup-grid { grid-template-columns: 1fr; }
  .csp-metrics { grid-template-columns: 1fr 1fr; }

  /* Accordion trigger text sizes */
  .mta-trig-title { font-size: 0.9375rem; }
  .mta-trig-sub { font-size: 0.75rem; }
  .bac-trig-left { font-size: 0.875rem; }

  /* Matrix mini nodes in earnings */
  .mmm-node { width: 30px; height: 30px; }
  .mmm-level2 { max-width: 180px; }

  /* Case study */
  .csp-m-val { font-size: 1.375rem; }

  /* Summary badge */
  .mhd-badge { margin-left: 0; margin-top: 0.375rem; }
}
