/* ==========================================================================
   OVULATION CALCULATOR US — SAAS DESIGN SYSTEM
   Modern, High-Converting, Clinical-Grade Healthcare Design
   Target: US SERP (Mobile-First, WCAG AAA, High CWV Speed)
   ========================================================================== */

:root {
  /* Color Palette - Warm HealthTech & Editorial Aesthetic */
  --bg-main: #fbfaf8;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f4f1ea;
  --bg-dark-preview: #12151a;

  --ink-primary: #15181e;
  --ink-secondary: #525a66;
  --ink-muted: #7b8594;
  --ink-inverse: #ffffff;

  --border-light: #e5e0d6;
  --border-focus: #c24d42;
  --border-subtle: rgba(21, 24, 30, 0.07);

  /* Semantic Health Status Colors */
  --rose-primary: #d25346;
  --rose-hover: #b94236;
  --rose-light: #fef0ee;
  --rose-border: #f9d3ce;

  --fertile-green: #0d8368;
  --fertile-light: #e6f6f1;
  --fertile-border: #bce6dc;

  --peak-purple: #6149cd;
  --peak-light: #f0edfd;
  --peak-border: #d3cbfa;

  --period-red: #c92a42;
  --period-light: #fdebee;
  --period-border: #f9c6ce;

  --amber-warning: #9e6005;
  --amber-light: #fef7e6;
  --amber-border: #fae4ad;

  /* Typography & Spatial System */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Newsreader", "Playfair Display", Georgia, serif;
  --font-mono: "JetBrains Mono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(20, 24, 31, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 24, 31, 0.06), 0 2px 6px rgba(20, 24, 31, 0.03);
  --shadow-lg: 0 20px 48px rgba(20, 24, 31, 0.08), 0 4px 12px rgba(20, 24, 31, 0.04);
  --shadow-glow: 0 0 0 4px rgba(210, 83, 70, 0.15);

  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-main: #0e1115;
  --bg-surface: #161a20;
  --bg-surface-elevated: #1e232b;
  --bg-subtle: #1c212a;

  --ink-primary: #f0f2f5;
  --ink-secondary: #a0a8b5;
  --ink-muted: #727c8d;
  --ink-inverse: #0e1115;

  --border-light: #282f3a;
  --border-subtle: rgba(255, 255, 255, 0.08);

  --rose-light: #2c1816;
  --rose-border: #4d2320;
  --fertile-light: #102621;
  --fertile-border: #1a4239;
  --peak-light: #1e1933;
  --peak-border: #352b5e;
  --period-light: #2b1317;
  --period-border: #491d24;
  --amber-light: #2a1f0a;
  --amber-border: #4a3710;

  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

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

a:hover {
  color: var(--rose-hover);
  text-decoration: underline;
}

button, input, select {
  font: inherit;
}

.mono {
  font-family: var(--font-mono);
}

.serif {
  font-family: var(--font-serif);
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(251, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-nav {
  background-color: rgba(14, 17, 21, 0.92);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--rose-primary), #e26d5c);
  display: grid;
  place-items: center;
  color: white;
  box-shadow: 0 3px 10px rgba(210, 83, 70, 0.35);
}

.brand-title {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tld {
  background-color: var(--rose-light);
  color: var(--rose-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rose-border);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.nav-links a {
  color: var(--ink-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--ink-primary);
  background-color: var(--bg-subtle);
  text-decoration: none;
}

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

.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--ink-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--ink-primary);
  border-color: var(--ink-muted);
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rose-primary);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(210, 83, 70, 0.28);
  transition: all var(--transition-fast);
}

.btn-header-cta:hover {
  background: var(--rose-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO & TRUST BANNER
   ========================================================================== */
.hero-section {
  padding: 44px 0 20px;
  text-align: center;
}

.trust-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--fertile-green);
  box-shadow: 0 0 0 3px rgba(13, 131, 104, 0.2);
}

.trust-badge-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  color: var(--ink-primary);
}

.hero-title span {
  color: var(--rose-primary);
  font-style: italic;
}

.hero-subtitle {
  max-width: 740px;
  margin: 0 auto 30px;
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* Privacy & Medical Cert Bar */
.cert-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 34px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 600;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-item svg {
  color: var(--fertile-green);
}

/* ==========================================================================
   SAAS CALCULATOR SUITE CONTAINER
   ========================================================================== */
.calculator-suite {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
}

/* Top Mode Switcher (SaaS Tab Pill Bar) */
.suite-mode-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  padding: 5px;
  gap: 4px;
  margin-bottom: 28px;
  border: 1px solid var(--border-light);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.mode-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-tab-btn:hover {
  color: var(--ink-primary);
}

.mode-tab-btn.active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.badge-tab-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 800;
  text-transform: uppercase;
}

.badge-tab-tag.gap {
  background: var(--rose-light);
  color: var(--rose-primary);
}

/* Calculator Grid Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 32px;
  align-items: start;
}

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

/* Controls Column */
.calculator-controls {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.control-group {
  margin-bottom: 22px;
}

.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--ink-primary);
}

.tooltip-icon {
  display: inline-flex;
  cursor: help;
  color: var(--ink-muted);
}

.input-date-custom {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  outline: none;
}

.input-date-custom:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

/* Quick Preset Chips */
.preset-chips-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.preset-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--ink-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  border-color: var(--ink-muted);
  color: var(--ink-primary);
}

.chip-btn.active {
  background: var(--rose-primary);
  color: white;
  border-color: var(--rose-primary);
}

/* Range Slider Control */
.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-light);
  border-radius: var(--radius-full);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--rose-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(210, 83, 70, 0.4);
  transition: transform var(--transition-fast);
}

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

.slider-val-box {
  min-width: 58px;
  padding: 6px 8px;
  text-align: center;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-primary);
}

/* Toggle Accordion Settings (Luteal, Period Length) */
.advanced-settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  border-top: 1px dashed var(--border-light);
  margin-top: 14px;
}

.advanced-settings-toggle:hover {
  color: var(--ink-primary);
}

.advanced-panel {
  display: none;
  padding-top: 14px;
  animation: fadeIn 200ms ease-in-out;
}

.advanced-panel.open {
  display: block;
}

/* Primary Action Button */
.btn-calculate {
  width: 100%;
  background: linear-gradient(135deg, var(--rose-primary), #e26152);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(210, 83, 70, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  margin-top: 14px;
}

.btn-calculate:hover {
  background: linear-gradient(135deg, var(--rose-hover), #ce5243);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(210, 83, 70, 0.45);
}

/* ==========================================================================
   RESULTS DASHBOARD DISPLAY (HIGH ENGAGEMENT)
   ========================================================================== */
.results-dashboard {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Hero Metric Banner */
.results-hero-banner {
  background: linear-gradient(145deg, var(--rose-light), #fff8f7);
  border: 1.5px solid var(--rose-border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  position: relative;
}

[data-theme="dark"] .results-hero-banner {
  background: linear-gradient(145deg, #241413, #1c1415);
}

.hero-banner-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rose-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-ovulation-date {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.15;
  margin-bottom: 6px;
}

.hero-cycle-day-badge {
  display: inline-block;
  background: var(--rose-primary);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-left: 8px;
  vertical-align: middle;
}

.hero-fertile-span {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

.hero-fertile-span strong {
  color: var(--fertile-green);
}

/* 3-Column Highlights Grid */
.milestones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .milestones-grid {
    grid-template-columns: 1fr;
  }
}

.milestone-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}

.milestone-card.peak {
  border-color: var(--peak-border);
  background: var(--peak-light);
}

.milestone-card.test {
  border-color: var(--fertile-border);
  background: var(--fertile-light);
}

.milestone-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.milestone-card.peak .milestone-badge {
  color: var(--peak-purple);
}

.milestone-card.test .milestone-badge {
  color: var(--fertile-green);
}

.milestone-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.25;
  margin-bottom: 4px;
}

.milestone-caption {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ==========================================================================
   INTERACTIVE CYCLE TIMELINE (VISUAL GRAPH)
   ========================================================================== */
.timeline-section {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.timeline-legend {
  display: flex;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 700;
}

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

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.period { background: var(--period-red); }
.legend-dot.fertile { background: var(--fertile-green); }
.legend-dot.peak { background: var(--peak-purple); }
.legend-dot.ovulation { background: var(--rose-primary); }

.timeline-bar-wrapper {
  display: flex;
  gap: 2px;
  height: 38px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.timeline-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-primary);
  background: var(--bg-surface);
  position: relative;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.timeline-day-col:hover {
  transform: translateY(-2px);
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline-day-col.period-day {
  background: var(--period-light);
  color: var(--period-red);
  border-top: 3px solid var(--period-red);
}

.timeline-day-col.fertile-day {
  background: var(--fertile-light);
  color: var(--fertile-green);
  border-top: 3px solid var(--fertile-green);
}

.timeline-day-col.peak-day {
  background: var(--peak-light);
  color: var(--peak-purple);
  border-top: 3px solid var(--peak-purple);
}

.timeline-day-col.ovulation-day {
  background: var(--rose-primary);
  color: white;
  border-top: 3px solid #9c271b;
}

/* ==========================================================================
   CONCEPTION ODDS INTERACTIVE CHART
   ========================================================================== */
.odds-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
}

.odds-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.odds-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.odds-chart-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.odds-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.odds-day-label {
  font-weight: 700;
  color: var(--ink-secondary);
}

.odds-bar-track {
  height: 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.odds-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--fertile-green);
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.odds-bar-fill.peak {
  background: linear-gradient(90deg, var(--peak-purple), var(--rose-primary));
}

.odds-percent-num {
  text-align: right;
  font-weight: 800;
  color: var(--ink-primary);
}

/* ==========================================================================
   CALENDAR EXPORT & PRINT ACTION BAR
   ========================================================================== */
.export-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--ink-primary);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-export:hover {
  background: var(--bg-surface);
  border-color: var(--ink-muted);
}

.btn-export.primary {
  background: var(--ink-primary);
  color: var(--ink-inverse);
  border-color: var(--ink-primary);
}

.btn-export.primary:hover {
  opacity: 0.92;
}

/* ==========================================================================
   MULTI-MONTH FUTURE CYCLES VIEW
   ========================================================================== */
.multi-cycle-section {
  margin: 50px 0;
}

.section-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rose-primary);
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--ink-primary);
}

.section-desc {
  max-width: 680px;
  color: var(--ink-secondary);
  margin-bottom: 28px;
  font-size: 0.98rem;
}

.calendar-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.calendar-month-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

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

.month-card-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-primary);
}

.month-cycle-num {
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--ink-secondary);
}

.month-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.grid-day-head {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ink-muted);
  padding: 4px 0;
}

.grid-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
}

.grid-day-cell.empty {
  visibility: hidden;
}

.grid-day-cell.period {
  background: var(--period-light);
  color: var(--period-red);
  font-weight: 800;
}

.grid-day-cell.fertile {
  background: var(--fertile-light);
  color: var(--fertile-green);
  font-weight: 800;
}

.grid-day-cell.peak {
  background: var(--peak-light);
  color: var(--peak-purple);
  font-weight: 800;
}

.grid-day-cell.ovulation {
  background: var(--rose-primary);
  color: white;
  font-weight: 800;
}

/* ==========================================================================
   SNIPPET BAIT: CYCLE-LENGTH TABLE
   ========================================================================== */
.table-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 50px;
}

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

.data-table th {
  background: var(--bg-subtle);
  padding: 14px 18px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-primary);
}

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

.data-table tr:hover td {
  background: rgba(210, 83, 70, 0.02);
}

/* ==========================================================================
   MEDICAL EDITORIAL & REVIEWER BOX (YMYL PROOF)
   ========================================================================== */
.medical-review-card {
  background: linear-gradient(135deg, var(--bg-surface), var(--bg-subtle));
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 50px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 680px) {
  .medical-review-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.reviewer-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--rose-primary);
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(210, 83, 70, 0.25);
  background: #f4dcd9;
  display: grid;
  place-items: center;
}

.reviewer-details h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--fertile-light);
  color: var(--fertile-green);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.reviewer-meta {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.reviewer-bio {
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   HSA/FSA PRODUCT COMPARISON MATRIX (US MONETIZATION)
   ========================================================================== */
.monetization-section {
  margin: 50px 0;
}

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

@media (max-width: 880px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hsa-badge {
  background: #eef7f2;
  color: #1e7046;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  border: 1px solid #c2e2d0;
  letter-spacing: 0.04em;
}

.product-type {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.product-title {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--ink-primary);
}

.product-desc {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
  line-height: 1.45;
}

.product-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.product-price-range {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink-primary);
}

.btn-affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rose-light);
  color: var(--rose-primary);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--rose-border);
  transition: all var(--transition-fast);
}

.btn-affiliate-link:hover {
  background: var(--rose-primary);
  color: white;
  text-decoration: none;
}

/* ==========================================================================
   FAQ ACCORDION WITH LIVE FILTER
   ========================================================================== */
.faq-search-box {
  width: 100%;
  max-width: 580px;
  margin: 0 auto 30px;
  position: relative;
}

.faq-search-input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 0.96rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.faq-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}

.faq-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto 50px;
}

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

.faq-question-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 22px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.faq-icon-arrow {
  color: var(--ink-muted);
  transition: transform var(--transition-fast);
}

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

.faq-answer-panel {
  display: none;
  padding: 0 22px 20px;
  color: var(--ink-secondary);
  font-size: 0.94rem;
  line-height: 1.6;
}

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

/* ==========================================================================
   YMYL MEDICAL DISCLAIMER
   ========================================================================== */
.ymyl-disclaimer-card {
  background: var(--amber-light);
  border: 1px solid var(--amber-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 40px 0;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.disclaimer-icon {
  color: var(--amber-warning);
  flex-shrink: 0;
}

.disclaimer-text {
  font-size: 0.88rem;
  color: #634306;
  line-height: 1.55;
}

.disclaimer-text strong {
  color: #442d03;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 30px;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

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

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

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

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

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

.footer-links a {
  color: var(--ink-secondary);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
}

/* ==========================================================================
   PRINT STYLESHEET (CLEAN DOCTOR / FRIDGE SUMMARY)
   ========================================================================== */
@media print {
  .site-nav, .theme-toggle-btn, .btn-header-cta, .suite-mode-tabs,
  .calculator-controls, .export-action-bar, .monetization-section,
  .faq-section, .site-footer {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .calculator-suite, .results-dashboard {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .results-hero-banner {
    border: 1px solid #ccc !important;
  }

  .print-header {
    display: block !important;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
  }
}
