/* ==========================================================================
   SaaSMetricLab — Minimalist Zinc & Emerald SaaS Founder UI (Linear/Stripe Style)
   Zero External Dependencies • Responsive • Print-Ready
   ========================================================================== */

:root {
  /* Core Palette */
  --bg-canvas: #fafafa;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-muted: #e4e4e7;
  --bg-dark: #18181b;
  --bg-dark-elevated: #27272a;

  /* Typography Colors */
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-on-dark: #fafafa;

  /* Emerald Growth Accent */
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-500: #10b981;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;

  /* Semantic Status Colors */
  --amber-600: #d97706;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --red-600: #dc2626;
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --blue-600: #2563eb;
  --blue-50: #eff6ff;
  --blue-200: #bfdbfe;

  /* Borders & Shadows */
  --border-light: #e4e4e7;
  --border-strong: #d4d4d8;
  --shadow-xs: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.06), 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(24, 24, 27, 0.07), 0 2px 4px -2px rgba(24, 24, 27, 0.04);
  --shadow-focus: 0 0 0 3px rgba(5, 150, 105, 0.16);

  /* Radii & Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container-max: 1200px;

  /* Font Stacks */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular Numbers for Financial Metrics */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--emerald-600);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   SwiftKitHub Global Portal Top Bar & Breadcrumb
   ========================================================================== */
.skh-topbar {
  background: var(--bg-dark);
  color: #a1a1aa;
  border-bottom: 1px solid #27272a;
  font-size: 12.5px;
  line-height: 1.4;
}

.skh-topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.skh-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.skh-breadcrumb a {
  color: #d4d4d8;
  font-weight: 500;
  transition: color 0.15s ease;
}

.skh-breadcrumb a:hover {
  color: #34d399;
}

.skh-breadcrumb span {
  color: #fafafa;
  font-weight: 600;
}

.skh-all-tools-link {
  color: #34d399;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.skh-all-tools-link:hover {
  color: #6ee7b7;
}

/* ==========================================================================
   Sticky Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-logo:hover {
  color: var(--text-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
  letter-spacing: 0;
}

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

.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ==========================================================================
   AdSense Slots (Hidden by default unless configured)
   ========================================================================== */
.ad-slot {
  margin: 16px auto;
  max-width: var(--container-max);
  padding: 0 20px;
}

.ad-slot[hidden] {
  display: none !important;
}

.ad-placeholder-box {
  border: 1px dashed var(--border-strong);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Hero Header (Compact & High-Signal)
   ========================================================================== */
.hero-section {
  padding: 28px 0 18px;
}

.hero-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald-700);
  background: var(--emerald-50);
  border: 1px solid var(--emerald-200);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

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

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
}

.hero-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 660px;
}

/* Action Toolbar & Presets */
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.preset-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.preset-btn {
  appearance: none;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.preset-btn.active {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-color: var(--bg-dark);
}

.utility-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.btn-outline.copied {
  color: var(--emerald-700);
  border-color: var(--emerald-500);
  background: var(--emerald-50);
}

/* ==========================================================================
   Main Calculator Workspace Grid
   ========================================================================== */
.workspace-section {
  padding: 6px 0 36px;
}

.calculator-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

/* Inputs Panel */
.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.inputs-panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reset-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reset-link:hover {
  color: var(--text-primary);
}

.input-section-divider {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 18px 0 10px;
}

.input-section-divider:first-of-type {
  margin-top: 0;
}

.field-group {
  margin-bottom: 14px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 550;
  color: var(--text-primary);
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.unit-prefix,
.unit-suffix {
  position: absolute;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  font-family: var(--font-mono);
}

.unit-prefix {
  left: 11px;
}

.unit-suffix {
  right: 11px;
}

.num-input {
  width: 100%;
  height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.num-input.has-prefix {
  padding-left: 26px;
}

.num-input.has-suffix {
  padding-right: 44px;
}

.num-input:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--emerald-600);
  box-shadow: var(--shadow-focus);
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover,
.range-slider:focus::-webkit-slider-thumb {
  background: var(--emerald-600);
  transform: scale(1.12);
}

.range-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.derived-context-bar {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.derived-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.derived-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Right Column: Instant Unit Economics Dashboard + SVG Trajectory Chart
   ========================================================================== */
.results-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.kpi-card.kpi-span-2 {
  grid-column: span 2;
}

.kpi-card.kpi-highlight {
  background: linear-gradient(180deg, #ffffff 0%, #f6fef9 100%);
  border-color: var(--emerald-200);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.kpi-value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.kpi-dual-values {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
}

.kpi-secondary-stat {
  font-size: 14px;
  font-weight: 600;
  color: var(--emerald-700);
  font-family: var(--font-mono);
}

.kpi-subtext {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Investor Benchmark Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-emerald {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
}

.badge-amber {
  background: var(--amber-50);
  color: var(--amber-600);
  border: 1px solid var(--amber-200);
}

.badge-red {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid var(--red-200);
}

.badge-blue {
  background: var(--blue-50);
  color: var(--blue-600);
  border: 1px solid var(--blue-200);
}

/* ==========================================================================
   Pure SVG 12-Month MRR Trajectory Chart Card
   ========================================================================== */
.chart-card {
  padding: 20px;
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.chart-title-block h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.chart-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Unlock Extra ARR Callout Pill */
.arr-unlock-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  margin-bottom: 16px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.arr-unlock-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arr-unlock-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arr-unlock-title {
  font-size: 12px;
  color: #a1a1aa;
  margin: 0;
}

.arr-unlock-headline {
  font-size: 14px;
  font-weight: 600;
  margin: 1px 0 0;
  color: #fafafa;
}

.arr-unlock-amount {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 750;
  color: #34d399;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 18px;
  height: 3px;
  border-radius: 2px;
}

.swatch-optimized {
  background: var(--emerald-600);
}

.swatch-baseline {
  background: #52525b;
}

.swatch-wedge {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: rgba(5, 150, 105, 0.15);
  border: 1px solid rgba(5, 150, 105, 0.35);
}

/* SVG Wrapper & Interactive Tooltip */
.svg-chart-container {
  position: relative;
  width: 100%;
  user-select: none;
}

.trajectory-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  top: 12px;
  left: 64px;
  pointer-events: none;
  background: rgba(24, 24, 27, 0.96);
  color: #fafafa;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10;
  min-width: 215px;
  transition: opacity 0.12s ease;
}

.chart-tooltip[hidden] {
  display: none !important;
}

.tt-month {
  font-weight: 700;
  font-size: 12px;
  color: #e4e4e7;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

.tt-row:last-child {
  margin-bottom: 0;
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  color: #34d399;
  font-weight: 600;
}

/* Monthly Schedule Accordion inside Chart Card */
.schedule-details {
  margin-top: 14px;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.schedule-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-summary::-webkit-details-marker {
  display: none;
}

.schedule-summary:hover {
  color: var(--text-primary);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.data-table thead th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
  background: var(--emerald-50);
  font-weight: 650;
}

.delta-positive {
  color: var(--emerald-700);
  font-weight: 600;
}

/* ==========================================================================
   Contextual Affiliate Partner Cards (#recommended-tools)
   ========================================================================== */
.partners-section {
  padding: 12px 0 40px;
}

.partners-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.section-heading {
  margin: 0;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.ftc-inline-note {
  font-size: 12px;
  color: var(--text-muted);
}

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

.affiliate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.affiliate-card:hover {
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.affiliate-card-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.affiliate-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.affiliate-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.affiliate-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
}

.affiliate-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.affiliate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.affiliate-cta:hover {
  background: var(--emerald-600);
  color: #ffffff;
}

/* ==========================================================================
   SEO Guide Section (#guide) & Benchmark Tables
   ========================================================================== */
.guide-section {
  padding: 44px 0;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.prose-wrapper {
  max-width: 820px;
  margin: 0 auto;
}

.prose-wrapper h2 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.prose-wrapper h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 30px 0 10px;
  color: var(--text-primary);
}

.prose-wrapper p {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.68;
}

.prose-wrapper ul,
.prose-wrapper ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.prose-wrapper li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.prose-wrapper strong {
  color: var(--text-primary);
  font-weight: 650;
}

.formula-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--emerald-600);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 16px 0 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  overflow-x: auto;
}

.benchmark-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.benchmark-table th,
.benchmark-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
}

.benchmark-table thead th {
  background: var(--bg-subtle);
  font-weight: 650;
  color: var(--text-primary);
  font-size: 12.5px;
}

.benchmark-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Interactive FAQ Section (#faq)
   ========================================================================== */
.faq-section {
  padding: 44px 0 56px;
  border-top: 1px solid var(--border-light);
}

.faq-list {
  max-width: 820px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item.open {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 18px;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-question:hover {
  color: var(--emerald-700);
}

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--emerald-600);
}

.faq-answer {
  padding: 0 18px 16px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.65;
}

.faq-answer[hidden] {
  display: none;
}

/* ==========================================================================
   Related Calculators & Internal Linking Mesh (#related-calculators)
   ========================================================================== */
.related-section {
  padding: 44px 0 52px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.related-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.related-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.related-group-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.related-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.related-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-canvas);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.related-card:hover {
  border-color: var(--emerald-500);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.related-card-tag {
  font-size: 11px;
  font-weight: 650;
  color: var(--emerald-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.related-card:hover .related-card-title {
  color: var(--emerald-700);
}

.related-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.48;
}

@media (max-width: 960px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .related-grid,
  .related-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Subpages (Privacy, Terms, About, Contact)
   ========================================================================== */
.subpage-main {
  padding: 44px 0 64px;
}

.subpage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-xs);
}

.subpage-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.subpage-updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.subpage-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 26px 0 10px;
}

.subpage-card p,
.subpage-card li {
  color: var(--text-secondary);
  line-height: 1.68;
  font-size: 15px;
}

.subpage-card a {
  color: var(--emerald-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-canvas);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: var(--shadow-focus);
  background: var(--bg-surface);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background: var(--emerald-600);
}

/* ==========================================================================
   Footer & FTC Disclosure
   ========================================================================== */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 36px 0 28px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.footer-brand-col {
  max-width: 420px;
}

.footer-tagline {
  margin: 8px 0 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--emerald-600);
}

.footer-bottom {
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ftc-disclosure-box {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    padding: 12px 20px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: flex;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card.kpi-span-2 {
    grid-column: span 1;
  }

  .affiliate-grid {
    grid-template-columns: 1fr;
  }

  .subpage-card {
    padding: 24px 20px;
  }

  .chart-tooltip {
    position: static;
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   Print Stylesheet (Clean 1-Page Board / Investor Summary)
   ========================================================================== */
@media print {
  body {
    background: #ffffff;
    font-size: 12px;
  }

  .skh-topbar,
  .site-header,
  .toolbar-row,
  .range-slider,
  .partners-section,
  .guide-section,
  .faq-section,
  .related-section,
  .site-footer,
  .ad-slot {
    display: none !important;
  }

  .calculator-grid {
    grid-template-columns: 280px 1fr;
    gap: 14px;
  }

  .panel-card,
  .kpi-card {
    box-shadow: none;
    border-color: #d4d4d8;
    break-inside: avoid;
  }

  .arr-unlock-banner {
    background: #f4f4f5;
    color: #18181b;
    border: 1px solid #d4d4d8;
  }

  .arr-unlock-headline,
  .arr-unlock-title {
    color: #18181b;
  }

  .arr-unlock-amount {
    color: #047857;
  }
}
