/* ==========================================================================
   BookAI Studio Partner Program — Tier-1 Design System (styles.css)
   Built on Google DESIGN.md, Impeccable Design Principles, & Haus Media Perf:
   - Palette: Deep Midnight Obsidian (#080B11), Electric Cobalt (#3B82F6), Emerald Payout (#10B981)
   - Typography: Plus Jakarta Sans (Display/Headings) & Inter (Body/Data)
   - Glassmorphism: Layered backdrop blur with 1px hairline lighting borders
   - 100% GPU Hardware Accelerated Motion, Zero Main-Thread Blocking
   ========================================================================== */

:root {
  /* Surface & Canvas Tokens */
  --bg-canvas: #080B11;
  --bg-surface: #0E131F;
  --bg-surface-elevated: #141C2E;
  --bg-card: rgba(17, 24, 39, 0.72);
  --bg-card-hover: rgba(23, 32, 53, 0.85);
  --bg-glass: rgba(14, 20, 32, 0.75);
  
  /* Text & Hierarchy Tokens */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  /* Brand & Accent Tokens (No Gold, No Beige) */
  --accent-primary: #3B82F6;
  --accent-primary-hover: #60A5FA;
  --accent-primary-glow: rgba(59, 130, 246, 0.35);
  --accent-indigo: #6366F1;
  --accent-cyan: #06B6D4;
  
  /* Payout & Success Tokens (High-Yield Emerald) */
  --emerald: #10B981;
  --emerald-light: #34D399;
  --emerald-glow: rgba(16, 185, 129, 0.28);
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.30);

  /* Border & Stroke Tokens */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);
  --border-glow: rgba(59, 130, 246, 0.5);

  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.65);
  --inner-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography Scale */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --max-width: 1240px;
  --header-height: 72px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ensure background canvas remains behind all content */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.025rem;
}

a {
  color: var(--accent-primary-hover);
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
a:hover {
  color: #93C5FD;
}

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

.tnum {
  font-variant-numeric: tabular-nums;
}

/* Accessible Focus Ring */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Global Content Wrappers */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Floating Glass Header
   ========================================================================== */
.header-wrapper {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: 100%;
  padding: 0 16px;
  pointer-events: none; /* Allows canvas interaction on margins */
}

.site-header {
  pointer-events: auto;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md), var(--inner-highlight);
  padding: 10px 24px;
  transition: all 0.25s ease;
}

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-plaque {
  display: flex;
  align-items: center;
  background: #000000;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.logo-plaque img {
  height: 24px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain;
}

.brand-note {
  display: flex;
  flex-direction: column;
}

.brand-note .title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-note .subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav Links */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ==========================================================================
   Button System
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #2563EB 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 14px var(--accent-primary-glow), var(--inner-highlight);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover) 0%, #3B82F6 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 22px rgba(59, 130, 246, 0.5), var(--inner-highlight);
  transform: translateY(-1.5px);
}

.btn-emerald {
  background: linear-gradient(135deg, var(--emerald) 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 14px var(--emerald-glow), var(--inner-highlight);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-emerald:hover {
  background: linear-gradient(135deg, var(--emerald-light) 0%, #10B981 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 22px rgba(16, 185, 129, 0.5), var(--inner-highlight);
  transform: translateY(-1.5px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: var(--border-medium);
  transform: translateY(-1.5px);
}

.btn-small {
  padding: 7px 15px;
  font-size: 0.82rem;
}

.btn-large {
  padding: 14px 30px;
  font-size: 1.05rem;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 90px 0 70px;
  position: relative;
  z-index: 1;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93C5FD;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  margin-bottom: 20px;
  max-width: 900px;
}

.text-gradient {
  background: linear-gradient(180deg, #FFFFFF 20%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.65;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

/* Micro Stat Chips in Hero */
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.stat-chip {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-chip:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.stat-chip .chip-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.stat-chip .chip-val {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-chip .chip-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 54px;
}

.section-head.left-aligned {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary-hover);
  margin-bottom: 12px;
  display: inline-block;
}

.section-head h2 {
  margin-bottom: 16px;
}

.section-head p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.block-section {
  padding: 90px 0;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Rate Cards & Tier Matrix
   ========================================================================== */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.tier-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md), var(--inner-highlight);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.tier-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-lg), 0 0 24px rgba(59, 130, 246, 0.15);
}

.tier-card.featured {
  background: linear-gradient(180deg, rgba(30, 41, 69, 0.8) 0%, rgba(17, 24, 39, 0.85) 100%);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-lg), 0 0 32px rgba(59, 130, 246, 0.2);
}

.tier-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #2563EB 100%);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px var(--accent-primary-glow);
}

.tier-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-header .tier-title {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.tier-header .tier-category {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tier-price-box {
  margin: 16px 0;
}

.tier-price {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.tier-price-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.commission-highlight {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 16px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.commission-highlight .label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.commission-highlight .payout {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.tier-features {
  list-style: none;
  margin-bottom: 32px;
  flex-grow: 1;
}

.tier-features li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-features li::before {
  content: "✓";
  color: var(--emerald-light);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Interactive Calculator Section
   ========================================================================== */
.calc-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.calc-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.calc-group .slider-indicator {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-primary-hover);
}

/* Custom Slider Styling */
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: var(--radius-full);
  background: #1E293B;
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 12px var(--accent-primary-glow);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--accent-primary-hover);
}

.calc-toggles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.calc-toggle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.calc-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-medium);
}

.calc-toggle-btn.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.calc-toggle-btn .name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.calc-toggle-btn .sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.calc-toggle-btn .rate {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--emerald-light);
  background: var(--emerald-bg);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Calculator Readout Box */
.calc-readout-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(14, 20, 32, 0.9) 100%);
  border: 1px solid var(--emerald-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 32px var(--emerald-glow);
}

.calc-readout-card .readout-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--emerald-light);
  display: block;
  margin-bottom: 8px;
}

.calc-readout-card .monthly-fig {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 12px;
}

.calc-readout-card .readout-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.calc-runrate-box {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-runrate-box .run-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-runrate-box .annual-fig {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   40-Offer Catalog Section
   ========================================================================== */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.catalog-search-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.catalog-search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 14px 24px 14px 48px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.catalog-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 16px var(--accent-primary-glow);
  outline: none;
}

.catalog-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
}

.catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.catalog-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.catalog-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.catalog-tab.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 12px var(--accent-primary-glow);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.offer-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.offer-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.1);
}

.offer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.offer-category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.offer-payout-chip {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--emerald-light);
  background: var(--emerald-bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.offer-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.offer-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer-footer-pricing {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.offer-price-label {
  font-size: 0.70rem;
  color: var(--text-dim);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 2px;
}

.offer-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.offer-price-unit {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 400;
}

.offer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.offer-actions .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 8px 6px;
  font-size: 0.76rem;
  white-space: nowrap;
}

/* ==========================================================================
   How It Works (4-Step Tech Architecture)
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  position: relative;
  transition: transform 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
}

.step-number {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-primary-hover);
  background: rgba(59, 130, 246, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 0 12px var(--accent-primary-glow);
}

.step-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Application Form Components (Inline & Standalone /apply)
   ========================================================================== */
.apply-container-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
  max-width: 820px;
  margin: 0 auto;
}

.form-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-field .hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.18s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px var(--accent-primary-glow);
  outline: none;
}

.form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0;
}

.form-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  margin-top: 3px;
}

.form-checkbox-row label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-status-msg {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 0.92rem;
  display: none;
}

.form-status-msg.success {
  display: block;
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: #A7F3D0;
}

.form-status-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

/* ==========================================================================
   Legal Architecture (Directory & Document Detail with Sidebar Nav)
   ========================================================================== */
.legal-page-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 40px;
  padding: 40px 0 80px;
  position: relative;
  z-index: 1;
}

/* Sticky Legal Sidebar */
.legal-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md), var(--inner-highlight);
}

.legal-sidebar-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 18px 0 10px;
}
.legal-sidebar-heading:first-child {
  margin-top: 0;
}

.legal-nav-list {
  list-style: none;
}

.legal-nav-item {
  margin-bottom: 4px;
}

.legal-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.legal-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.legal-nav-link.active {
  color: #FFFFFF;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

.legal-nav-link.active::before {
  content: "●";
  font-size: 0.65rem;
  color: var(--accent-primary-hover);
  margin-right: 8px;
}

/* Legal Document Main Area */
.legal-doc-content {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.legal-breadcrumbs a {
  color: var(--text-muted);
}
.legal-breadcrumbs a:hover {
  color: var(--accent-primary-hover);
}

.legal-meta-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.legal-meta-item .key {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.legal-meta-item .val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Legal Typography Formatting */
.legal-article h2 {
  font-size: 1.45rem;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.legal-article h3 {
  font-size: 1.15rem;
  margin: 24px 0 12px;
  color: #E2E8F0;
}

.legal-article p {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-article ul {
  margin: 14px 0 24px 24px;
  color: var(--text-secondary);
}

.legal-article li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #04060A;
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
  margin-top: 14px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.system-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid var(--emerald-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: var(--emerald-light);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
}

/* Toast Notification for Link Copying */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-lg), 0 0 20px var(--accent-primary-glow);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .calc-card {
    grid-template-columns: 1fr;
  }
  .legal-page-layout {
    grid-template-columns: 1fr;
  }
  .legal-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .main-nav,
  .header-actions {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .site-header.mobile-open .main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding-top: 16px;
    gap: 14px;
    border-top: 1px solid var(--border-subtle);
  }
  .site-header.mobile-open .header-actions {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
  }
  .site-header.mobile-open {
    border-radius: var(--radius-lg);
  }
  .form-grid-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .apply-container-box,
  .legal-doc-content {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
