/* ==========================================================================
   USA CALCULATOR PORTAL - UNIFIED DESIGN SYSTEM
   Modern, Accessible, Responsive, and SEO/AdSense Optimized
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand & Core Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --secondary: #0f172a;
  --accent: #0ea5e9;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --danger: #dc2626;

  /* Surfaces & Backgrounds (Light Mode) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --heading-color: #0f172a;

  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Surfaces & Backgrounds (Dark Mode) */
  --bg-body: #0b0f17;
  --bg-surface: #111827;
  --bg-surface-alt: #1a2234;
  --bg-card: #151d2d;
  --border-color: #243048;
  --border-focus: #60a5fa;

  /* Typography Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --heading-color: #ffffff;

  --primary-light: rgba(37, 99, 235, 0.2);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.25;
}

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

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

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

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.95);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.95);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--heading-color);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

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

.nav-item a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary);
}

.nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.mobile-menu-btn {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  z-index: -1;
  filter: blur(40px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero h1 {
  font-size: 2.75rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2rem;
}

/* Search Bar */
.search-wrapper {
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 3rem;
  font-size: 1rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md);
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
   AdSense Placement Containers
   Compliant with Google AdSense Publisher Policies
   ========================================================================== */
.ad-slot-container {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

.ad-box {
  width: 100%;
  min-height: 90px;
  background-color: var(--bg-surface-alt);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  padding: 0.5rem;
  overflow: hidden;
}

/* Standard Google Ad Dimensions */
.ad-box.leaderboard {
  max-width: 728px;
  min-height: 90px;
}

.ad-box.rectangle {
  max-width: 336px;
  min-height: 280px;
}

/* ==========================================================================
   Card Grid (Tools & Features)
   ========================================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-amber { background: #fef3c7; color: #d97706; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

[data-theme="dark"] .icon-blue { background: rgba(37, 99, 235, 0.2); color: #60a5fa; }
[data-theme="dark"] .icon-amber { background: rgba(217, 119, 6, 0.2); color: #fbbf24; }
[data-theme="dark"] .icon-emerald { background: rgba(5, 150, 105, 0.2); color: #34d399; }
[data-theme="dark"] .icon-rose { background: rgba(225, 29, 72, 0.2); color: #fb7185; }

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* ==========================================================================
   Calculator Dedicated Pages Layout
   ========================================================================== */
.calc-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

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

.calc-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.calc-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 800px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .calculator-layout {
    grid-template-columns: 1fr;
  }
}

/* Calculator Panel (Form) */
.calc-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.panel-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--heading-color);
}

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

.input-with-unit input,
.input-with-unit select {
  width: 100%;
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  transition: var(--transition);
}

.input-with-unit input:focus,
.input-with-unit select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.unit-addon {
  position: absolute;
  right: 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Tabs & Toggle Buttons */
.tab-group {
  display: flex;
  background: var(--bg-surface-alt);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Slider Controls */
.slider-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.slider-control input[type="range"] {
  flex: 1;
  accent-color: var(--primary);
  cursor: pointer;
}

.slider-val {
  min-width: 45px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.98rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: var(--bg-surface-alt);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-group .btn {
  flex: 1;
}

/* Results Display Panel */
.results-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 92px;
}

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

.results-badge {
  background: var(--success-light);
  color: var(--success);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

[data-theme="dark"] .results-badge {
  background: rgba(5, 150, 105, 0.2);
}

.primary-result-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
  border: 1.5px solid var(--primary-glow);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.primary-result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.primary-result-value {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.primary-result-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Breakdown List */
.result-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-alt);
}

.result-item-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-item-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
}

/* Action bar for results (Copy, Print, Share) */
.results-actions {
  display: flex;
  gap: 0.5rem;
}

.results-actions button {
  flex: 1;
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.results-actions button:hover {
  background: var(--border-color);
}

/* ==========================================================================
   Table & Guide Content Styling
   ========================================================================== */
.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.content-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.content-section h3 {
  font-size: 1.3rem;
  margin: 1.75rem 0 0.75rem;
}

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

.content-section ul, 
.content-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

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

/* Formula Box */
.formula-card {
  background: var(--bg-surface-alt);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  font-family: 'Inter', monospace;
}

.formula-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--primary);
}

.formula-code {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading-color);
}

/* Data Tables */
.data-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--bg-surface-alt);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--heading-color);
  border-bottom: 2px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}

.data-table tr:hover td {
  background: var(--bg-surface-alt);
}

/* Step cards */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.step-card {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.step-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.step-card p {
  font-size: 0.88rem;
  margin: 0;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

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

.faq-question {
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: transparent;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--heading-color);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--bg-surface-alt);
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 1.25rem;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 1.25rem 1.25rem;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Interactive Timecard Table (Hours to Decimal Tool)
   ========================================================================== */
.timecard-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.timecard-table th {
  padding: 0.65rem 0.5rem;
  background: var(--bg-surface-alt);
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  text-align: center;
}

.timecard-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.timecard-input {
  width: 100%;
  max-width: 95px;
  padding: 0.45rem;
  font-size: 0.88rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-main);
  text-align: center;
}

/* ==========================================================================
   Fitness Zones & Rating Meters (VO2 Max Tool)
   ========================================================================== */
.fitness-meter {
  position: relative;
  height: 16px;
  background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #eab308 50%, #22c55e 75%, #3b82f6 100%);
  border-radius: 9999px;
  margin: 1.5rem 0 2rem;
}

.fitness-pointer {
  position: absolute;
  top: -8px;
  width: 6px;
  height: 32px;
  background: #0f172a;
  border: 2px solid #ffffff;
  border-radius: 3px;
  transform: translateX(-50%);
  transition: left 0.5s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

[data-theme="dark"] .fitness-pointer {
  background: #ffffff;
  border-color: #0f172a;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   Static / Legal Pages Layout (About, Contact, Privacy, Terms, Disclaimer)
   ========================================================================== */
.legal-wrapper {
  max-width: 860px;
  margin: 3rem auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.legal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

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

.legal-body h2 {
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}

.legal-body h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
}

.legal-body p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-body ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.disclaimer-box {
  background: var(--warning-light);
  border-left: 4px solid var(--warning);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  color: #78350f;
  font-size: 0.92rem;
}

[data-theme="dark"] .disclaimer-box {
  background: rgba(217, 119, 6, 0.15);
  color: #fde68a;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  min-height: 140px;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 320px;
  line-height: 1.6;
}

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

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

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

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

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

/* ==========================================================================
   Mobile Navigation Drawer & Responsive Helpers
   ========================================================================== */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    display: none;
    box-shadow: var(--shadow-lg);
  }

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

  .mobile-menu-btn {
    display: flex;
  }

  .hero h1 {
    font-size: 2.15rem;
  }
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--heading-color);
  color: var(--bg-surface);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 9999;
}

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