/* ==========================================================================
   WebGTR — Binary MLM Plan Architecture Stylesheet
   Designed to integrate seamlessly with WebGTR's core design system (style.css).
   Supports both Night (default) and Day (light) themes with high-contrast legibility.
   ========================================================================== */

/* --------------------------------------------------------------------------
   MLM Plan Color Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  --plan-left: #5699EF;              /* Left Leg Accent (WebGTR Blue) */
  --plan-left-glow: rgba(86, 153, 239, 0.25);
  --plan-left-bg: rgba(86, 153, 239, 0.10);
  --plan-left-border: rgba(86, 153, 239, 0.35);

  --plan-right: #FF9C8D;             /* Right Leg Accent (WebGTR Coral) */
  --plan-right-glow: rgba(255, 156, 141, 0.25);
  --plan-right-bg: rgba(255, 156, 141, 0.10);
  --plan-right-border: rgba(255, 156, 141, 0.35);

  --plan-match: #10B981;             /* Matched Volume (Emerald) */
  --plan-match-bg: rgba(16, 185, 129, 0.12);
  --plan-match-border: rgba(16, 185, 129, 0.35);

  --plan-flush: #EF4444;             /* Flushed / Capped Volume */
  --plan-flush-bg: rgba(239, 68, 68, 0.12);

  --plan-toc-bg: rgba(13, 19, 35, 0.75);
  --plan-card-bg: rgba(13, 19, 35, 0.65);
  --plan-card-hover: rgba(19, 27, 48, 0.85);
  --plan-input-bg: rgba(6, 9, 20, 0.85);
  --plan-input-border: rgba(255, 255, 255, 0.14);
}

/* Day Mode Theme Overrides */
html[data-theme="light"],
body.light-theme {
  --plan-left: #2563EB;
  --plan-left-glow: rgba(37, 99, 235, 0.15);
  --plan-left-bg: rgba(37, 99, 235, 0.08);
  --plan-left-border: rgba(37, 99, 235, 0.25);

  --plan-right: #E11D48;
  --plan-right-glow: rgba(225, 29, 72, 0.15);
  --plan-right-bg: rgba(225, 29, 72, 0.08);
  --plan-right-border: rgba(225, 29, 72, 0.25);

  --plan-match: #059669;
  --plan-match-bg: rgba(5, 150, 105, 0.08);
  --plan-match-border: rgba(5, 150, 105, 0.25);

  --plan-flush: #DC2626;
  --plan-flush-bg: rgba(220, 38, 38, 0.08);

  --plan-toc-bg: #FFFFFF;
  --plan-card-bg: #FFFFFF;
  --plan-card-hover: #FFFFFF;
  --plan-input-bg: #F8FAFC;
  --plan-input-border: rgba(15, 23, 42, 0.16);
}

/* --------------------------------------------------------------------------
   Global Layout & Typography for MLM Plan Pages
   -------------------------------------------------------------------------- */
.plan-page {
  position: relative;
  /*overflow-x: hidden;*/
  color: var(--text-second);
  font-family: var(--font-body);
  line-height: 1.7;
}

.plan-page h1,
.plan-page h2,
.plan-page h3,
.plan-page h4 {
  font-family: var(--font-display);
  color: var(--text-accent);
  letter-spacing: -0.025em;
  font-weight: 700;
}

.plan-page a {
  color: var(--primary-coral);
  text-decoration: none;
  transition: color 0.2s ease;
}

.plan-page a:hover {
  color: var(--primary-magenta);
}

/* Leg Indicators in Text */
.L {
  color: var(--plan-left);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.R {
  color: var(--plan-right);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.BV {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-accent);
}

/* --------------------------------------------------------------------------
   Breadcrumb Navigation
   -------------------------------------------------------------------------- */
.plan-crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
}

html[data-theme="light"] .plan-crumb {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.plan-crumb a {
  color: var(--text-muted);
}

.plan-crumb a:hover {
  color: var(--text-accent);
}

.plan-crumb span.sep {
  opacity: 0.4;
}

.plan-crumb span.current {
  color: var(--primary-coral);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.plan-hero-section {
  padding: 48px 0 60px;
  position: relative;
}

.plan-hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 48px;
  align-items: center;
}

.plan-hero-content h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.1;
  margin: 0 0 20px;
}

.plan-hero-content h1 span.gradient-text {
  background: var(--webgtr-linear);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.plan-hero-lead {
  font-size: 18.5px;
  line-height: 1.65;
  color: var(--text-second);
  margin: 0 0 28px;
  max-width: 620px;
}

/* Facts Pills List */
.plan-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.plan-facts li {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-second);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html[data-theme="light"] .plan-facts li {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.plan-facts li.fact-left {
  background: var(--plan-left-bg);
  border-color: var(--plan-left-border);
  color: var(--plan-left);
}

.plan-facts li.fact-right {
  background: var(--plan-right-bg);
  border-color: var(--plan-right-border);
  color: var(--plan-right);
}

.plan-facts li.fact-badge {
  background: rgba(96, 83, 203, 0.12);
  border-color: rgba(96, 83, 203, 0.3);
  color: #9D8FFF;
}

html[data-theme="light"] .plan-facts li.fact-badge {
  background: rgba(96, 83, 203, 0.08);
  color: #6053CB;
}

.plan-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* --------------------------------------------------------------------------
   Hero Binary Topology Diagram (Interactive Card)
   -------------------------------------------------------------------------- */
.plan-diagram-card {
  background: var(--plan-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.plan-diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.plan-diagram-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-diagram-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.plan-diagram-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.plan-diagram-svg-wrap {
  position: relative;
  width: 100%;
}

.plan-diagram-caption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.plan-diagram-caption svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary-coral);
}

/* --------------------------------------------------------------------------
   Two-Column Layout Grid with High-Tech Sidebar
   -------------------------------------------------------------------------- */
.plan-main-wrap {
  position: relative;
  padding: 30px 0 90px;
}

.plan-layout-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

/* Sidebar Sticky Dock */
.plan-sidebar {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
}

/* Main Navigation Widget (Unified Contained Card, Never Cropped) */
.sidebar-widget {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 14px 14px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 104px);
}

.sidebar-widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--webgtr-linear);
  opacity: 0.9;
}

/* Widget Header (Fixed at top of card) */
.sidebar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sidebar-widget-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-accent);
  font-weight: 700;
}

.sidebar-widget-title svg {
  color: var(--primary-coral);
}

.sidebar-step-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text-muted);
}

html[data-theme="light"] .sidebar-step-badge {
  background: rgba(15, 23, 42, 0.06);
}

/* Reading Progress Bar */
.sidebar-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 10px;
  flex-shrink: 0;
}

html[data-theme="light"] .sidebar-progress-wrap {
  background: rgba(15, 23, 42, 0.08);
}

.sidebar-progress-bar {
  height: 100%;
  width: 5%;
  background: var(--webgtr-linear);
  border-radius: 100px;
  transition: width 0.15s ease-out;
}

/* Scrollable Nav Body (Holds All 11 Points in View) */
.sidebar-nav-body {
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  padding-right: 4px;
  margin-right: -4px;
  overscroll-behavior: contain;
  flex: 1;
}

.sidebar-nav-body::-webkit-scrollbar {
  width: 3.5px;
}

.sidebar-nav-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

/* Nav Groups */
.sidebar-group {
  margin-bottom: 10px;
}

.sidebar-group:last-child {
  margin-bottom: 4px;
}

.sidebar-group-title {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 8px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-group-title::before {
  content: "";
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: var(--primary-coral);
}

.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5.5px 8px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-second);
  text-decoration: none;
  transition: all 0.18s ease;
  position: relative;
  border: 1px solid transparent;
}

.sidebar-nav-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.7;
  flex-shrink: 0;
  min-width: 16px;
}

.sidebar-nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-nav-link:hover {
  color: var(--text-accent);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
  border-color: var(--line);
}

html[data-theme="light"] .sidebar-nav-link:hover {
  background: rgba(15, 23, 42, 0.04);
}

.sidebar-nav-link.on {
  color: var(--text-accent);
  font-weight: 600;
  background: rgba(214, 85, 165, 0.12);
  border-color: rgba(214, 85, 165, 0.3);
}

html[data-theme="light"] .sidebar-nav-link.on {
  background: rgba(214, 85, 165, 0.09);
  border-color: rgba(214, 85, 165, 0.25);
  color: #0F172A;
}

.sidebar-nav-link.on .sidebar-nav-num {
  color: var(--primary-coral);
  opacity: 1;
}

.sidebar-nav-link.on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2.5px;
  border-radius: 3px;
  background: var(--webgtr-linear);
}

/* Integrated Bottom CTA Dock (Never Cropped) */
.sidebar-footer-cta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-cta-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-emerald);
  font-weight: 600;
}

.pulse-emerald {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulseEmerald 2s infinite;
  display: inline-block;
}

.sidebar-cta-hint {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 100px;
  background: var(--webgtr-linear);
  color: #FFFFFF !important;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(214, 85, 165, 0.35);
  transition: all 0.2s ease;
}

.sidebar-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(214, 85, 165, 0.5);
}

/* --------------------------------------------------------------------------
   Content Sections & Level Pill Badges
   -------------------------------------------------------------------------- */
.plan-content {
  min-width: 0;
  width: 100%;
}

.plan-section {
  padding-top: 56px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 56px;
}

.plan-section:first-of-type {
  padding-top: 10px;
}

.plan-section:last-of-type {
  border-bottom: none;
}

/* Level Indicator Pill */
.lvl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-muted);
  margin-bottom: 12px;
}

html[data-theme="light"] .lvl {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}

.plan-section h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--text-accent);
}

.prose {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-second);
}

.prose p {
  margin: 0 0 20px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose b {
  color: var(--text-accent);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Component: Real-World Example Box (.eg)
   -------------------------------------------------------------------------- */
.eg {
  margin: 28px 0;
  padding: 24px 28px;
  border-radius: 20px;
  background: var(--plan-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--plan-left);
  box-shadow: var(--shadow-card);
  position: relative;
}

.eg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--plan-left);
  margin-bottom: 8px;
}

.eg p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-second);
}

.eg-coral {
  border-left-color: var(--primary-coral);
}

.eg-coral .eg-badge {
  color: var(--primary-coral);
}

/* --------------------------------------------------------------------------
   Component: Formula Strip (.formula)
   -------------------------------------------------------------------------- */
.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 28px 0;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--plan-card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15.5px;
}

.formula span {
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-accent);
}

html[data-theme="light"] .formula span {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.08);
  color: #0F172A;
}

.formula .l {
  background: var(--plan-left-bg);
  border-color: var(--plan-left-border);
  color: var(--plan-left);
}

.formula .r {
  background: var(--plan-right-bg);
  border-color: var(--plan-right-border);
  color: var(--plan-right);
}

.formula .m {
  background: var(--plan-match-bg);
  border-color: var(--plan-match-border);
  color: var(--plan-match);
}

.formula i {
  font-style: normal;
  font-size: 18px;
  color: var(--text-muted);
  padding: 0 4px;
}

/* --------------------------------------------------------------------------
   Component: High-Precision Data Tables (.tbl)
   -------------------------------------------------------------------------- */
.tbl {
  overflow-x: auto;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--plan-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
  line-height: 1.5;
}

th, td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] th {
  background: #F8FAFC;
  color: #475569;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

html[data-theme="light"] tbody tr:hover {
  background: rgba(15, 23, 42, 0.02);
}

td strong, td b {
  color: var(--text-accent);
}

/* --------------------------------------------------------------------------
   Component: Feature Cards (.cards)
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.cards div {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--plan-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-second);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cards div:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.5);
}

.cards b {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Component: Callout Note (.note)
   -------------------------------------------------------------------------- */
.note {
  border-left: 4px solid var(--primary-magenta);
  background: rgba(214, 85, 165, 0.06);
  padding: 16px 20px;
  border-radius: 0 14px 14px 0;
  margin: 26px 0;
  color: var(--text-second);
  font-size: 15.5px;
  line-height: 1.6;
}

.note strong {
  color: var(--text-accent);
}

/* --------------------------------------------------------------------------
   Component: Lead Magnets (.magnet)
   -------------------------------------------------------------------------- */
.magnet {
  margin: 44px 0;
  padding: 34px 36px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(13, 19, 35, 0.95) 0%, rgba(20, 15, 38, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-card), 0 0 40px -10px rgba(214, 85, 165, 0.15);
  position: relative;
  overflow: hidden;
}

html[data-theme="light"] .magnet {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F3FF 100%);
  border-color: rgba(96, 83, 203, 0.2);
  box-shadow: 0 20px 45px -15px rgba(96, 83, 203, 0.15);
}

.magnet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--webgtr-linear);
}

.magnet h3 {
  margin: 0 0 10px;
  font-size: 23px;
  color: var(--text-accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.magnet p {
  margin: 0 0 22px;
  color: var(--text-second);
  font-size: 16px;
  line-height: 1.6;
  max-width: 620px;
}

.magnet .btn,
.magnet .hdt-btn {
  font-size: 14.5px;
}

.magnet details {
  border: 0;
  padding: 0;
  margin-top: 14px;
}

.magnet summary {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.magnet summary:hover {
  color: var(--primary-coral);
}

.magnet label {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13.5px;
  display: block;
}

/* --------------------------------------------------------------------------
   Component: Interactive Binary Calculator Shell (.calc)
   -------------------------------------------------------------------------- */
.calc {
  background: var(--plan-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  margin: 28px 0;
  box-shadow: var(--shadow-card);
}

.calc-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.calc-title-bar h4 {
  margin: 0;
  font-size: 17px;
  color: var(--text-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.calc label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.calc input,
.calc select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--plan-input-border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  background: var(--plan-input-bg);
  color: var(--text-accent);
  transition: all 0.2s ease;
}

.calc input:focus,
.calc select:focus {
  outline: none;
  border-color: var(--primary-magenta);
  box-shadow: 0 0 0 3px rgba(214, 85, 165, 0.25);
}

.calc select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E9DB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 36px;
}

/* Calculator Output Screen (.out) */
.out {
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(13, 19, 35, 0.9) 0%, rgba(22, 16, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-second);
  position: relative;
}

html[data-theme="light"] .out {
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-color: rgba(37, 99, 235, 0.15);
  color: #1E293B;
}

.out b.payout-big {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 8px;
  background: var(--webgtr-linear);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.out-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.out-stat-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid var(--line);
}

html[data-theme="light"] .out-stat-card {
  background: #FFFFFF;
}

.out-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}

.out-stat-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-accent);
  display: block;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Component: 10-Point Compliance Checklist (.chk)
   -------------------------------------------------------------------------- */
.chk {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chk li {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

html[data-theme="light"] .chk li {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.08);
}

.chk li:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line-strong);
}

.chk input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0 12px 0 0;
  accent-color: var(--primary-magenta);
  cursor: pointer;
}

.chk label {
  cursor: pointer;
  font-size: 15px;
  color: var(--text-accent);
  user-select: none;
}

.chk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text-accent);
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   Component: FAQ Accordion (.acc)
   -------------------------------------------------------------------------- */
.acc {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acc details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--plan-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 18px 22px;
  transition: all 0.25s ease;
}

.acc details[open] {
  border-color: var(--line-strong);
  background: var(--plan-card-hover);
}

.acc summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  color: var(--text-accent);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.acc summary::-webkit-details-marker {
  display: none;
}

.acc summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--primary-coral);
  transition: transform 0.25s ease;
}

.acc details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

.acc p {
  margin: 14px 0 0;
  color: var(--text-second);
  font-size: 15.5px;
  line-height: 1.65;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* --------------------------------------------------------------------------
   Component: Pricing Band (.band)
   -------------------------------------------------------------------------- */
.band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.band div {
  padding: 30px 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--plan-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.band div:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.band div.featured {
  border-color: rgba(214, 85, 165, 0.5);
  box-shadow: var(--shadow-card), 0 0 30px -10px rgba(214, 85, 165, 0.3);
}

.band-pill {
  position: absolute;
  top: -12px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--webgtr-linear);
  color: #FFFFFF;
}

.band span.tier-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-coral);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.band b.price-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--text-accent);
  margin: 8px 0 10px;
  letter-spacing: -0.03em;
}

.band p {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-second);
}

.band ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.band ul li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.band ul li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.band .tier-btn {
  margin-top: auto;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints & Mobile Optimization
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .plan-layout-grid {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
  }
}

/* Tablets Portrait & Below: Switch to Single-Column & Horizontal Sticky Nav */
@media (max-width: 920px) {
  .plan-hero-section {
    padding: 36px 0 44px;
  }

  .plan-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .plan-layout-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .plan-sidebar {
    position: sticky;
    top: 74px;
    z-index: 85;
    max-height: none;
    margin: 0 -20px 24px;
    padding: 10px 20px;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .plan-sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar-widget {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0;
    width: max-content;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sidebar-widget::before,
  .sidebar-widget-header,
  .sidebar-progress-wrap,
  .sidebar-cta-card,
  .sidebar-group-title {
    display: none !important;
  }

  .sidebar-nav-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding: 0;
    margin: 0;
    flex: none;
    width: auto;
  }

  .sidebar-group {
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .sidebar-nav-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sidebar-nav-link {
    white-space: nowrap;
    border-radius: 100px;
    padding: 7px 14px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--text-second);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  html[data-theme="light"] .sidebar-nav-link {
    background: #FFFFFF;
    color: #475569;
  }

  .sidebar-nav-num {
    display: none;
  }

  .sidebar-nav-link.on {
    border-color: var(--primary-magenta);
    background: rgba(214, 85, 165, 0.16);
    color: var(--primary-coral);
    font-weight: 600;
  }

  .sidebar-nav-link.on::before {
    display: none;
  }
}

/* Medium Tablets & Large Phones (768px and below) */
@media (max-width: 768px) {
  .plan-hero-content h1 {
    font-size: clamp(28px, 6vw, 42px);
    line-height: 1.15;
    margin-bottom: 16px;
  }

  .plan-hero-lead {
    font-size: 16.5px;
    line-height: 1.6;
    margin-bottom: 22px;
  }

  .plan-facts {
    gap: 8px;
    margin-bottom: 26px;
  }

  .plan-facts li {
    font-size: 12.5px;
    padding: 6px 14px;
  }

  .plan-section {
    padding: 44px 0;
  }

  .plan-section h2 {
    font-size: clamp(23px, 5vw, 32px);
    margin-bottom: 14px;
  }

  .prose {
    font-size: 15.5px;
    line-height: 1.7;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
  }

  .eg {
    padding: 20px;
    border-radius: 18px;
  }

  .calc {
    padding: 24px 20px;
    border-radius: 20px;
  }
}

/* Standard Mobile Devices (600px and below) */
@media (max-width: 600px) {
  .plan-hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .plan-hero-ctas .hdt-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .plan-diagram-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .plan-diagram-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .plan-diagram-title {
    font-size: 14px;
  }

  .plan-diagram-badge {
    font-size: 11px;
    padding: 2px 8px;
  }

  .formula {
    padding: 14px 12px;
    gap: 8px;
    font-size: 13px;
    border-radius: 14px;
  }

  .formula span {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  .formula i {
    font-size: 15px;
    padding: 0 2px;
  }

  .tbl {
    margin: 20px 0;
    border-radius: 14px;
  }

  table {
    min-width: 480px;
    font-size: 14px;
  }

  th, td {
    padding: 10px 14px;
  }

  .calc {
    padding: 20px 16px;
    border-radius: 18px;
    margin: 22px 0;
  }

  .calc-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .calc .grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .calc input,
  .calc select {
    min-height: 42px;
    font-size: 14px;
    padding: 0 10px;
  }

  .out {
    padding: 20px 16px;
    border-radius: 16px;
    margin-top: 18px;
  }

  .out b.payout-big {
    font-size: clamp(28px, 7vw, 36px);
  }

  .out-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .out-stat-card {
    padding: 8px 10px;
  }

  .out-stat-label {
    font-size: 10px;
  }

  .out-stat-val {
    font-size: 13px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 20px 0;
  }

  .cards div {
    padding: 18px 16px;
    border-radius: 14px;
  }

  .chk li {
    padding: 10px 12px;
    font-size: 14px;
    align-items: flex-start;
    gap: 10px;
  }

  .chk input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 17px;
    height: 17px;
  }

  .chk-status-pill {
    font-size: 12px;
    padding: 6px 12px;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    text-align: center;
  }

  .acc details {
    padding: 14px 16px;
    border-radius: 14px;
  }

  .acc summary {
    font-size: 15px;
  }

  .acc p {
    font-size: 14px;
    padding-top: 10px;
  }

  .magnet {
    padding: 24px 18px;
    border-radius: 20px;
    margin: 32px 0;
  }

  .magnet h3 {
    font-size: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .magnet p {
    font-size: 14.5px;
    margin-bottom: 18px;
  }

  .magnet .hdt-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
  }
}

/* Extra Compact Phones (480px and below) */
@media (max-width: 480px) {
  .plan-sidebar {
    top: 68px;
    margin: 0 -16px 20px;
    padding: 8px 16px;
  }

  .plan-hero-content h1 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .plan-facts li {
    width: 100%;
    justify-content: flex-start;
  }

  .calc .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .out-stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
