/* ==========================================================================
   BodyComparison.com - Shared Design System & Stylesheet
   Modern, accessible, responsive utility-grade styles
   ========================================================================== */

:root {
  /* Color Palette - macOS Sonoma/Ventura Light Studio Palette */
  --color-bg: #eceef2;
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-subtle: #f4f5f8;
  --color-surface-hover: #e6e8ee;
  --color-border: #d0d5dd;
  --color-border-subtle: #e4e7ec;
  
  --color-text-main: #1d2939;
  --color-text-muted: #475467;
  --color-text-light: #667085;
  
  --color-primary: #0071e3;
  --color-primary-hover: #005bb5;
  --color-primary-subtle: #e8f2fc;
  --color-primary-contrast: #ffffff;

  --color-accent: #6366f1;
  --color-success: #34c759;
  --color-danger: #ff3b30;
  --color-warning: #ff9500;
  --color-ground: #334155;
  --color-ground-line: #1e293b;
  
  /* Typography - San Francisco Style */
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, Menlo, Consolas, monospace;

  /* macOS Smooth Curves & Shadows */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-macos-window: 0 20px 40px -15px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);

  /* Layout */
  --max-width: 1280px;
  --header-height: 64px;
}

/* Stage Window Card Container */
.stage-window, .macos-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.stage-window-header, .macos-window-header {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-window-title, .macos-window-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-category-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


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

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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Focus outline for accessibility */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Typography Defaults */
h1, h2, h3, h4 {
  color: var(--color-text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--color-primary-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Header & Navigation */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1.25rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text-main);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-block;
  padding: 0.42rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-text-main);
  background-color: var(--color-surface-subtle);
}

.nav-link.active {
  color: var(--color-primary);
  background-color: var(--color-primary-subtle);
  font-weight: 600;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.45rem;
  color: var(--color-text-main);
  cursor: pointer;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-contrast);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-primary-contrast);
}

.btn-secondary {
  background-color: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background-color: var(--color-surface-hover);
  border-color: var(--color-border);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text-main);
}

.form-control, .form-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-surface);
  color: var(--color-text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  outline: none;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row > * {
  flex: 1;
}

/* Hero Section (Homepage) */
.hero {
  padding: 2.25rem 0 1.5rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-success);
}

/* Tool Main Container - Placed directly below header */
.tool-section {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.tool-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Tool Sidebar / Live Athlete Inspector Panel */
.tool-sidebar {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  background: linear-gradient(180deg, #ffffff 0%, #f4f5f8 100%);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-main);
}

/* Inline Direct Side Panel Form / Real-Time Live Inspector */
.sidebar-direct-form {
  padding: 1.15rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.sidebar-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.sidebar-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Gender Segmented Control */
.gender-segmented-control {
  display: flex;
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.gender-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gender-btn:hover {
  color: var(--color-text-main);
}

.gender-btn.active {
  background-color: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Live Range Slider + Number Row */
.range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.range-val-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  font-family: var(--font-mono);
}

.range-val-badge.bf-badge {
  background-color: #ecfdf5;
  color: #059669;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.form-range {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.range-number-input {
  width: 76px;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  font-family: var(--font-mono);
}

/* Active Athlete Quick Actions */
.active-athlete-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.active-athlete-actions .btn {
  flex: 1;
}

.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 10px;
  background-color: #ecfdf5;
  color: #059669;
}

.count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--color-surface-subtle);
  color: var(--color-text-main);
  border: 1px solid var(--color-border-subtle);
}

/* Color Swatches */
.color-swatches {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.color-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.selected {
  box-shadow: 0 0 0 2px var(--color-primary);
  transform: scale(1.15);
}

/* Hero SEO Section Below Tool */
.hero-seo-section {
  padding: 3.5rem 0 2.5rem;
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-subtle);
}

.composition-stats-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.sidebar-people-container {
  padding: 1rem 1.15rem;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 0.25rem;
}


.person-card {
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.person-card:hover {
  border-color: var(--color-border);
}

.person-card.active-compare-a {
  border-color: var(--color-primary);
  background-color: #f0f9ff;
}

.person-card.active-compare-b {
  border-color: #8b5cf6;
  background-color: #f5f3ff;
}

.person-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.person-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

.person-text {
  min-width: 0;
}

.person-name {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text-main);
}

.person-height {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.person-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.icon-btn:hover {
  color: var(--color-text-main);
  background-color: var(--color-surface-hover);
}

.icon-btn.btn-delete:hover {
  color: var(--color-danger);
  background-color: #fee2e2;
}

.presets-container {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 1rem;
}

.presets-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-preset {
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  font-size: 0.8125rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-main);
  font-family: inherit;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s ease;
}

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

/* Tool Stage (Comparison Canvas Area) */
.tool-stage-wrapper {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stage-toolbar {
  background-color: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background-color: var(--color-border);
  margin: 0 0.35rem;
}

.tool-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-main);
  cursor: pointer;
  user-select: none;
}

.tool-toggle-label input {
  accent-color: var(--color-primary);
}

/* Comparison Stage Canvas Area - Auto-fits perfectly on all screens */
.stage-canvas-container {
  position: relative;
  width: 100%;
  height: 520px;
  background: radial-gradient(circle at 50% 20%, #ffffff 0%, #f4f6fa 60%, #e9edf4 100%);
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}


.comparison-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Ground Line */
.ground-line {
  stroke: var(--color-ground-line);
  stroke-width: 2.5px;
}

.ground-shadow {
  fill: #e2e8f0;
}

/* Measurement Ruler */
.ruler-tick {
  stroke: #94a3b8;
  stroke-width: 1px;
}

.ruler-tick-major {
  stroke: #475569;
  stroke-width: 1.5px;
}

.ruler-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #64748b;
  font-weight: 500;
}

.grid-line {
  stroke: #e2e8f0;
  stroke-width: 1px;
  stroke-dasharray: 4 4;
}

/* Subject Head Line */
.subject-guide-line {
  stroke-width: 1.5px;
  stroke-dasharray: 3 3;
  opacity: 0.75;
}

/* Silhouette Elements */
.silhouette-group {
  cursor: move;
  transition: opacity 0.15s ease;
}

.silhouette-group:hover .silhouette-shape {
  filter: brightness(0.92) drop-shadow(0 6px 16px rgba(15, 23, 42, 0.18));
}

.silhouette-group.dragging {
  cursor: grabbing;
  opacity: 0.85;
}

/* Muscle Definition & Athletic Tone Layers */
.silhouette-muscle-tone {
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.muscle-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.78);
  stroke-width: 0.92px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.25));
}

.muscle-shadow {
  fill: none;
  stroke: rgba(0, 0, 0, 0.32);
  stroke-width: 0.88px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.silhouette-shape {
  transition: d 0.2s cubic-bezier(0.4, 0, 0.2, 1), fill 0.2s ease;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.12));
}

.conditioning-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: rgba(5, 150, 105, 0.12);
  color: #059669;
  margin-top: 0.35rem;
}

.silhouette-name-tag {
  font-size: 13px;
  font-weight: 700;
  fill: var(--color-text-main);
  text-anchor: middle;
}

.silhouette-height-tag {
  font-size: 12px;
  font-weight: 500;
  fill: var(--color-text-muted);
  text-anchor: middle;
}

/* Comparison Difference Bar */
.difference-banner {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.difference-selector {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.diff-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.diff-result {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
}

.diff-stat {
  display: flex;
  flex-direction: column;
}

.diff-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.2;
}

.diff-stat-desc {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.diff-badge {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Mobile Drawer / Collapsible Control Toggle */
.mobile-controls-toggle {
  display: none;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

/* Quick Info / Explainer Section on Homepage */
.features-section {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border-subtle);
  background-color: var(--color-surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.feature-box {
  padding: 1.5rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-bg);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Subpage Layouts (About, How It Works, FAQ, Privacy) */
.page-content-wrapper {
  padding: 3.5rem 0;
  flex: 1;
}

.page-header {
  margin-bottom: 2.5rem;
  max-width: 760px;
}

.page-title {
  font-size: 2.35rem;
  margin-bottom: 0.75rem;
}

.page-intro {
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

.content-body {
  max-width: 820px;
}

.content-block {
  margin-bottom: 2.5rem;
}

.content-block h2 {
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.content-block h3 {
  font-size: 1.2rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.content-block p, .content-block ul, .content-block ol {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content-block ul, .content-block ol {
  padding-left: 1.5rem;
}

.content-block li {
  margin-bottom: 0.5rem;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

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

.faq-button {
  width: 100%;
  padding: 1.15rem 1.25rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--color-text-light);
  flex-shrink: 0;
}

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

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  display: block;
}

/* How It Works Formula Box */
.formula-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.formula-box code {
  font-family: var(--font-mono);
  background-color: var(--color-surface-subtle);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--color-text-main);
}

/* Privacy Callout */
.callout-shield {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.callout-shield svg {
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.callout-shield-text h3 {
  color: #166534;
  margin-bottom: 0.25rem;
}

.callout-shield-text p {
  color: #15803d;
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  color: var(--color-text-main);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  background-color: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Color Picker Swatches */
.color-swatches {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.color-swatch-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--color-border);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.selected {
  box-shadow: 0 0 0 2px var(--color-text-main);
  transform: scale(1.1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: var(--color-text-main);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

/* Footer */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border-subtle);
  padding: 3rem 0 2rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

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

.footer-col h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 320px 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 990px) {
  .nav-toggle-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.35rem;
    box-shadow: var(--shadow-md);
    display: none;
  }

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

  .nav-link {
    width: 100%;
    padding: 0.75rem 1rem;
  }

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

  .mobile-controls-toggle {
    display: flex;
  }

  .tool-sidebar {
    display: none;
  }

  .tool-sidebar.open {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 580px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .stage-canvas-container {
    height: 420px;
  }

  .difference-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
