/* Shared layout styles for Zone2Cal pages */

/* ============================================
   PHASE 1: Korean Font & Color System
   ============================================ */

/* Import Pretendard Variable Font - Optimized for Korean */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* Enhanced Color Palette */
:root {
  /* Primary - Sky Blue (Keep existing) */
  --color-primary: #0ea5e9;
  --color-primary-dark: #0284c7;
  --color-primary-light: #38bdf8;

  /* Secondary - Amber (Achievement/Race) - Fixed for WCAG AA */
  --color-secondary: #d97706;
  --color-secondary-dark: #b45309;
  --color-secondary-light: #f59e0b;

  /* Tertiary - Emerald (Health/Heart Rate) */
  --color-tertiary: #10b981;
  --color-tertiary-dark: #059669;
  --color-tertiary-light: #34d399;

  /* Accent - Violet (Advanced Features) */
  --color-accent: #8b5cf6;
  --color-accent-dark: #7c3aed;

  /* Better contrast colors for accessibility */
  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #64748b;
  --color-link: #0369a1;        /* 4.89:1 contrast - WCAG AA */
  --color-link-hover: #0c4a6e;  /* 7.24:1 contrast - WCAG AAA */

  /* Korean-optimized fonts */
  --font-display: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont,
                  'Apple SD Gothic Neo', sans-serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Consolas',
               'D2Coding', monospace;

  /* Spacing system */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
}

/* Apply Korean-optimized typography */
body {
  font-family: var(--font-body);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.hero-title,
.section-title,
.feature-card h3,
.resource-card h3,
.workflow-card h3,
.marathon-card h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.hero-description,
.section-subtitle {
  word-break: keep-all;
}

/* ============================================ */

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  left: 1.5rem;
  top: 1.5rem;
  width: auto;
  height: auto;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background-color: var(--color-link);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.4);
  clip: auto;
  clip-path: none;
  z-index: 9999;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background-color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e2e8f0;
}
.site-header__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .site-header__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.site-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.site-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
}
.site-brand-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle styles */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background-color: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}
.theme-toggle:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}
.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.theme-icon--light {
  opacity: 1;
  transform: rotate(0deg);
}
.theme-icon--dark {
  opacity: 0;
  transform: rotate(180deg);
}
:root.dark .theme-icon--light {
  opacity: 0;
  transform: rotate(180deg);
}
:root.dark .theme-icon--dark {
  opacity: 1;
  transform: rotate(0deg);
}

/* Header share button adjustments */
.header-share {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

/* Language toggle button - positioned in header-actions */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 48px;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  border: 1.5px solid #cbd5e1;
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.lang-toggle:hover,
.lang-toggle:focus-visible {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.15);
  outline: none;
}
.lang-toggle:active {
  transform: translateY(0);
}

@media (min-width: 768px) {
  .site-brand {
    font-size: 1.5rem;
  }
}
.site-subline {
  font-size: 0.8rem;
  color: #64748b;
}
@media (min-width: 768px) {
  .site-subline {
    font-size: 0.9rem;
  }
}

.nav-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
  position: relative;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}
.nav-scroll::-webkit-scrollbar {
  display: none;
}
/* Scroll hint gradient on mobile */
@media (max-width: 1024px) {
  .nav-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 3rem;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-scroll.scrolled-end::after {
    opacity: 0;
  }
}
.header-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
  font-weight: 600;
  font-size: 0.88rem;
  color: #475569;
}
.header-nav__item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
  text-decoration: none;
  background-color: transparent;
  position: relative;
}
.header-nav__item:hover,
.header-nav__item:focus-visible {
  border-color: #38bdf8;
  background-color: rgba(14, 165, 233, 0.08);
  color: #0369a1;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}
.header-nav__item--lang {
  border-color: #cbd5e1;
  background-color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.header-nav__item--lang:hover,
.header-nav__item--lang:focus-visible {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.12);
}
.header-nav__item[aria-current="page"] {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.1) 100%);
  color: #0369a1;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}
.header-nav__item[aria-current="page"]:hover,
.header-nav__item[aria-current="page"]:focus-visible {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22) 0%, rgba(14, 165, 233, 0.15) 100%);
  color: #0c4a6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* Color-coded navigation hints */
.header-nav__item[href*="race-calculator"]:not([aria-current="page"])::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
  border-radius: 0.75rem 0.75rem 0 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.header-nav__item[href*="race-calculator"]:hover::before {
  opacity: 1;
}

.header-nav__item[href*="heartrate-zones"]:not([aria-current="page"])::before,
.header-nav__item[href*="lactate-threshold"]:not([aria-current="page"])::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
  border-radius: 0.75rem 0.75rem 0 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.header-nav__item[href*="heartrate-zones"]:hover::before,
.header-nav__item[href*="lactate-threshold"]:hover::before {
  opacity: 1;
}

.header-nav__item[href*="knowledge"]:not([aria-current="page"])::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
  border-radius: 0.75rem 0.75rem 0 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.header-nav__item[href*="knowledge"]:hover::before {
  opacity: 1;
}

.btn,

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  border-radius: 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}
.btn {
  border: 1px solid #cbd5f5;
  color: #1e293b;
  background-color: #ffffff;
}
.btn:hover,
.btn:focus-visible {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}
.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow:
    0 4px 16px rgba(245, 158, 11, 0.35),
    0 20px 40px -24px rgba(245, 158, 11, 0.5);
  transform: translateY(0);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow:
    0 6px 20px rgba(245, 158, 11, 0.45),
    0 24px 48px -24px rgba(245, 158, 11, 0.6);
  transform: translateY(-2px);
  outline: none;
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-secondary {
  border: 1px solid #cbd5f5;
  color: #1e293b;
  background-color: #ffffff;
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: #f1f5f9;
  color: #0f172a;
  outline: none;
}
.btn-ghost {
  border: 1px dashed #cbd5f5;
  color: #0369a1;
  background-color: transparent;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background-color: rgba(14, 165, 233, 0.1);
  color: #0c4a6e;
  outline: none;
}
@media (max-width: 640px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
    white-space: normal;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* Additional mobile improvements */
@media (max-width: 480px) {
  .page-shell {
    padding: 2rem 1rem 4rem;
  }
  
  .section-block {
    gap: 1.5rem;
  }
  
  .hero-card {
    padding: 1.5rem;
  }
  
  .faq-item {
    padding: 1.25rem 1.5rem;
  }
  
  .cta-panel {
    padding: 1.75rem 1.25rem;
    margin: 0 -0.25rem;
  }
  
  .cta-panel h2 {
    font-size: 1.4rem;
  }
}

/* Improved small screen navigation */
@media (max-width: 375px) {
  .site-header__inner {
    padding: 0.75rem 0.875rem;
  }
  
  .site-brand {
    font-size: 1rem;
  }
  
  .header-nav__item {
    padding: 0.625rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
}


/* Prevent wide calculator content from forcing horizontal scroll */
body {
  overflow-x: hidden;
}
.page-shell .grid > *,
.page-shell .flex > * {
  min-width: 0;
}

.page-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}
.page-shell > * + * {
  margin-top: 4rem;
}
@media (min-width: 768px) {
  .page-shell {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.section-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.section-header {
  display: grid;
  gap: 0.6rem;
  max-width: 48rem;
}
.section-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.section-subtitle {
  font-size: 1rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

.tool-grid,
.resource-grid,
.workflow-grid,
.marathon-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .marathon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.feature-card,
.resource-card,
.workflow-card,
.marathon-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 1.6rem;
  box-shadow: 0 20px 40px -30px rgba(2, 132, 199, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.feature-card:hover,
.feature-card:focus-visible,
.resource-card:hover,
.resource-card:focus-visible,
.workflow-card:hover,
.workflow-card:focus-visible,
.marathon-card:hover,
.marathon-card:focus-visible {
  box-shadow: 0 24px 48px -28px rgba(2, 132, 199, 0.55);
  transform: translateY(-3px);
  outline: none;
}
.feature-card {
  border-radius: 1.25rem;
  padding: 1.75rem;
}
.feature-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-link);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(14, 165, 233, 0.1);
  width: fit-content;
}

/* Color-coded feature cards by category */
.feature-card {
  border-top-width: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on hover */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.feature-card:hover::before {
  left: 100%;
}

/* Race Calculator - Amber (Achievement) */
.feature-card[href*="race-calculator"],
a.feature-card[href*="race-calculator"] {
  border-top-color: var(--color-secondary);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.feature-card[href*="race-calculator"]:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
  box-shadow: 0 16px 40px -16px rgba(245, 158, 11, 0.4);
}

.feature-card[href*="race-calculator"] .feature-card__eyebrow {
  color: var(--color-secondary-dark);
  background-color: rgba(245, 158, 11, 0.12);
}

/* Heart Rate Zones - Emerald (Health) */
.feature-card[href*="heartrate-zones"],
a.feature-card[href*="heartrate"] {
  border-top-color: var(--color-tertiary);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.feature-card[href*="heartrate-zones"]:hover,
.feature-card[href*="heartrate"]:hover {
  background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
  box-shadow: 0 16px 40px -16px rgba(16, 185, 129, 0.4);
}

.feature-card[href*="heartrate-zones"] .feature-card__eyebrow,
.feature-card[href*="heartrate"] .feature-card__eyebrow {
  color: var(--color-tertiary-dark);
  background-color: rgba(16, 185, 129, 0.12);
}

/* Treadmill - Sky Blue (Tools) */
.feature-card[href*="treadmill"],
.feature-card[href*="track-lap"] {
  border-top-color: var(--color-primary);
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.feature-card[href*="treadmill"]:hover,
.feature-card[href*="track-lap"]:hover {
  background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%);
  box-shadow: 0 16px 40px -16px rgba(14, 165, 233, 0.4);
}

/* Lactate Threshold - Violet (Advanced) */
.feature-card[href*="lactate-threshold"],
.feature-card[href*="lactate"] {
  border-top-color: var(--color-accent);
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
}

.feature-card[href*="lactate-threshold"]:hover,
.feature-card[href*="lactate"]:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #ffffff 100%);
  box-shadow: 0 16px 40px -16px rgba(139, 92, 246, 0.4);
}

.feature-card[href*="lactate-threshold"] .feature-card__eyebrow,
.feature-card[href*="lactate"] .feature-card__eyebrow {
  color: var(--color-accent-dark);
  background-color: rgba(139, 92, 246, 0.12);
}
.feature-card h3,
.resource-card h3,
.workflow-card h3,
.marathon-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.feature-card p,
.resource-card p,
.workflow-card p,
.marathon-card p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.section-header--split {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .section-header--split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.section-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-link);
  text-decoration: none;
  align-self: flex-start;
  transition: color 0.2s ease;
}
.section-link:hover,
.section-link:focus-visible {
  color: var(--color-link-hover);
  text-decoration: underline;
  outline: none;
}

.hero-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  border: 2px solid rgba(245, 158, 11, 0.3);
  background: linear-gradient(135deg,
    #fffbeb 0%,
    #fef3c7 25%,
    #f0f9ff 60%,
    #e0f2fe 100%
  );
  padding: 3rem 2.5rem;
  box-shadow:
    0 20px 60px -30px rgba(245, 158, 11, 0.4),
    0 50px 120px -60px rgba(2, 132, 199, 0.3);
}
@media (min-width: 768px) {
  .hero-wrapper {
    padding: 3rem 3.25rem;
  }
}
.hero-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(245, 158, 11, 0.15),
    rgba(56, 189, 248, 0.15) 40%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: 2.5rem;
  z-index: 1;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: start;
  }
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background-color: rgba(3, 105, 161, 0.12);
  color: var(--color-link);
  width: fit-content;
}
.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.hero-title__highlight {
  color: var(--color-secondary);
  position: relative;
  white-space: nowrap;
}

.hero-title__highlight::after {
  content: '';
  position: absolute;
  bottom: 0.125em;
  left: 0;
  right: 0;
  height: 0.3em;
  background: linear-gradient(90deg,
    rgba(245, 158, 11, 0.3),
    rgba(245, 158, 11, 0.1)
  );
  border-radius: 0.125em;
  z-index: -1;
}
.hero-description {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
  max-width: 40rem;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-highlights {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.hero-highlight {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.3);
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
}
.hero-highlight span {
  display: block;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.hero-card {
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 197, 253, 0.65);
  background-color: rgba(255, 255, 255, 0.92);
  padding: 1.8rem;
  box-shadow: 0 30px 80px -48px rgba(2, 132, 199, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.hero-card h2,
.hero-card h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}
.hero-card__list {
  display: grid;
  gap: 0.85rem;
  font-size: 0.92rem;
  color: #475569;
}
.hero-card__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-left: 0.4rem;
}
.hero-card__item span {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
}
.hero-card--secondary {
  border-style: dashed;
  border-color: rgba(148, 197, 253, 0.8);
  background-color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  background-color: rgba(3, 105, 161, 0.12);
  color: var(--color-link);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.quick-links a:hover,
.quick-links a:focus-visible {
  background-color: rgba(3, 105, 161, 0.18);
  color: var(--color-link-hover);
  outline: none;
}

.faq-list {
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  box-shadow: 0 22px 55px -42px rgba(2, 132, 199, 0.45);
  overflow: hidden;
}
.faq-item {
  padding: 1.6rem 1.8rem;
}
.faq-item + .faq-item {
  border-top: 1px solid #e2e8f0;
}
.faq-item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
}
.faq-item p {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.7;
  margin: 0;
}

.cta-panel {
  background: linear-gradient(120deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.25));
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 1.75rem;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  box-shadow: 0 28px 72px -44px rgba(2, 132, 199, 0.45);
}
.cta-panel h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.cta-panel p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
  max-width: 36rem;
}


/* Dark mode styles */
:root.dark body {
  background: linear-gradient(to bottom, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #e2e8f0;
}

:root.dark .site-header {
  background-color: rgba(15, 23, 42, 0.9);
  border-bottom-color: #334155;
}

:root.dark .site-brand {
  color: #f1f5f9;
}

:root.dark .site-subline {
  color: #94a3b8;
}

:root.dark .header-nav__item {
  color: #cbd5e1;
}

:root.dark .header-nav__item:hover,
:root.dark .header-nav__item:focus-visible {
  color: #38bdf8;
  background-color: rgba(14, 165, 233, 0.12);
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

:root.dark .header-nav__item--lang {
  background-color: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

:root.dark .header-nav__item--lang:hover,
:root.dark .header-nav__item--lang:focus-visible {
  background-color: #334155;
  border-color: #64748b;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.2);
}

:root.dark .header-nav__item[aria-current="page"] {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.15) 100%);
  color: #7dd3fc;
  border-color: #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

:root.dark .header-nav__item[aria-current="page"]:hover,
:root.dark .header-nav__item[aria-current="page"]:focus-visible {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28) 0%, rgba(14, 165, 233, 0.2) 100%);
  color: #bae6fd;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

:root.dark .nav-scroll::after {
  background: linear-gradient(to left, rgba(15, 23, 42, 0.95), transparent);
}

:root.dark .theme-toggle {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

:root.dark .theme-toggle:hover {
  background-color: #475569;
  border-color: #64748b;
}

:root.dark .lang-toggle {
  background-color: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

:root.dark .lang-toggle:hover,
:root.dark .lang-toggle:focus-visible {
  background-color: #334155;
  border-color: #64748b;
  color: #f8fafc;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.25);
}

:root.dark .hero-wrapper {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 45%, #1e293b 100%);
  border-color: #334155;
}

:root.dark .hero-title {
  color: #f1f5f9;
}

:root.dark .hero-description {
  color: #cbd5e1;
}

:root.dark .section-title {
  color: #f1f5f9;
}

:root.dark .section-subtitle {
  color: #cbd5e1;
}

:root.dark .feature-card,
:root.dark .resource-card,
:root.dark .workflow-card,
:root.dark .marathon-card,
:root.dark .hero-card {
  background-color: #1e293b;
  border-color: #334155;
}

:root.dark .feature-card h3,
:root.dark .resource-card h3,
:root.dark .workflow-card h3,
:root.dark .marathon-card h3,
:root.dark .hero-card h2,
:root.dark .hero-card h3 {
  color: #f1f5f9;
}

:root.dark .feature-card p,
:root.dark .resource-card p,
:root.dark .workflow-card p,
:root.dark .marathon-card p {
  color: #cbd5e1;
}

:root.dark .btn-primary {
  background-color: #0ea5e9;
}

:root.dark .btn-primary:hover {
  background-color: #0284c7;
}

:root.dark .btn-secondary {
  background-color: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

:root.dark .btn-secondary:hover {
  background-color: #475569;
  color: #f1f5f9;
}

/* Loading state styles */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  border-radius: inherit;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e2e8f0;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

:root.dark .loading-overlay {
  background-color: rgba(30, 41, 59, 0.9);
}

:root.dark .loading-spinner {
  border-color: #475569;
  border-top-color: #0ea5e9;
}

:root.dark .loading-text {
  color: #94a3b8;
}

/* Enhanced button touch targets for mobile */
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.header-nav__item,
.theme-toggle,
.header-share {
  min-height: 48px;
  min-width: 48px;
}

/* Improved mobile spacing and touch targets */
@media (max-width: 640px) {
  .site-header__inner {
    padding: 0.875rem 1rem;
    gap: 1rem;
  }
  
  .site-brand {
    font-size: 1.1rem;
  }
  
  .header-nav__item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .nav-scroll {
    padding-bottom: 0.5rem;
  }
  
  .hero-wrapper {
    padding: 1.75rem 1.25rem;
    margin: 0 -0.25rem;
  }
  
  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-highlights {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .hero-highlight {
    padding: 0.875rem 1rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .feature-card,
  .resource-card,
  .workflow-card,
  .marathon-card {
    padding: 1.375rem;
  }
  
  .workflow-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .workflow-actions .btn-secondary {
    width: 100%;
  }
}

.time-preset-btn,
.help-toggle,
.help-close {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
}

/* Responsive table wrapper for calculator outputs */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive table {
  width: 100%;
  border-collapse: collapse;
}
.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}
.table-responsive::-webkit-scrollbar-thumb {
  background-color: rgba(15, 23, 42, 0.2);
  border-radius: 9999px;
}
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
footer .footer-links a {
  font-size: 0.78rem;
  color: #475569;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
footer .footer-links a:hover,
footer .footer-links a:focus-visible {
  color: #0f172a;
  text-decoration: none;
  outline: none;
}

/* ============================================
   PHASE 2: Trust Indicators & Social Proof
   ============================================ */

/* Hero Stats (Social Proof) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(203, 213, 225, 0.5);
}

.hero-stat {
  text-align: center;
}

.hero-stat__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-stat__label {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .hero-stat__value {
    font-size: 1.5rem;
  }

  .hero-stat__label {
    font-size: 0.75rem;
  }
}

/* Trust Indicators Section */
.trust-indicators {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.08);
}

.trust-indicators__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.trust-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trust-indicator__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  color: var(--color-link);
  font-size: 1.5rem;
}

.trust-indicator__icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5px;
}

.trust-indicator__content {
  flex: 1;
  min-width: 0;
}

.trust-indicator__value {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  word-break: keep-all;
}

.trust-indicator__label {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.125rem;
  line-height: 1.4;
  word-break: keep-all;
}

@media (max-width: 768px) {
  .trust-indicators {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .trust-indicators__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .trust-indicator {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .trust-indicator__icon {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .trust-indicators__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Enhanced button styles with icon support */
.btn-primary svg,
.btn-secondary svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5px;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.btn-link:hover {
  color: #0f172a;
  transform: translateY(2px);
}

.btn-link svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5px;
  transition: transform 0.2s ease;
}

.btn-link:hover svg {
  transform: translateY(2px);
}

/* ============================================ */

/* ============================================
   PHASE 3: Mobile UX & Input/Result Enhancements
   ============================================ */

/* Enhanced Input Field Styling */
input[type="number"],
input[type="text"],
input[type="email"],
select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.875rem;
  background-color: #ffffff;
  color: var(--color-text-primary);
  transition: all 0.2s ease;
  width: 100%;
  appearance: none;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow:
    0 0 0 3px rgba(14, 165, 233, 0.1),
    0 4px 12px rgba(14, 165, 233, 0.15);
  background-color: #f0f9ff;
}

input[type="number"]:disabled,
input[type="text"]:disabled,
select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  border-color: #e2e8f0;
}

/* Label styling */
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

label.required::after {
  content: ' *';
  color: #ef4444;
  font-weight: 700;
}

/* Input helper text */
.input-helper {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  margin-top: 0.375rem;
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  line-height: 1.5;
}

.input-helper::before {
  content: 'ℹ️';
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

/* Input error state */
input.error,
select.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

input.error:focus,
select.error:focus {
  box-shadow:
    0 0 0 3px rgba(239, 68, 68, 0.1),
    0 4px 12px rgba(239, 68, 68, 0.15);
}

.input-error-message {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.input-error-message::before {
  content: '⚠️';
  font-size: 0.875rem;
}

/* Enhanced Result Card Designs */
.result-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 3px solid var(--color-secondary-light);
  border-radius: 1.25rem;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 24px rgba(245, 158, 11, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(245, 158, 11, 0.1) 50%,
    transparent 100%
  );
  animation: shimmer 3s infinite;
  opacity: 0;
  pointer-events: none;
}

.result-card.has-result::before {
  opacity: 1;
}

@keyframes shimmer {
  0%, 100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.result-card__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.result-card-value {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-secondary-dark);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  animation: countUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-card__description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-top: 0.75rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .result-card {
    padding: 1.5rem;
  }

  .result-card-value {
    font-size: 2.25rem;
  }
}

/* Alternative result card colors */
.result-card--primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: var(--color-primary-light);
}

.result-card--primary .result-card__label,
.result-card--primary .result-card-value {
  color: var(--color-link);
}

.result-card--success {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: var(--color-tertiary-light);
}

.result-card--success .result-card__label,
.result-card--success .result-card-value {
  color: var(--color-tertiary-dark);
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
  .mobile-calculator-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem env(safe-area-inset-bottom, 0rem);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-calculator-nav.visible {
    transform: translateY(0);
  }

  .mobile-calculator-nav__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
  }

  .mobile-calculator-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.625rem 0.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--color-text-tertiary);
    font-size: 0.6875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
  }

  .mobile-calculator-nav__item svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    stroke-width: 2px;
  }

  .mobile-calculator-nav__item.active {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--color-link);
  }

  .mobile-calculator-nav__item.active svg {
    opacity: 1;
  }

  .mobile-calculator-nav__item:active {
    transform: scale(0.95);
  }

  /* Add padding to page bottom when nav is visible */
  body.has-mobile-nav {
    padding-bottom: 80px;
  }
}

/* Progressive Onboarding Styles */
.onboarding-flow {
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
  border: 2px dashed #bae6fd;
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(5, auto);
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.onboarding-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.onboarding-step--active {
  opacity: 1;
}

.onboarding-step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: var(--color-text-tertiary);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  transition: all 0.3s ease;
}

.onboarding-step--active .onboarding-step__number {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.onboarding-step--completed .onboarding-step__number {
  background-color: var(--color-tertiary);
  color: #ffffff;
}

.onboarding-step__content h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
}

.onboarding-step__content p {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  margin: 0;
  word-break: keep-all;
}

.onboarding-step__connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg,
    #cbd5e1 0%,
    #e2e8f0 100%
  );
}

@media (max-width: 768px) {
  .onboarding-flow {
    padding: 1.5rem;
  }

  .onboarding-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .onboarding-step__connector {
    width: 2px;
    height: 24px;
  }

  .onboarding-step__content {
    display: none;
  }

  .onboarding-step--active .onboarding-step__content {
    display: block;
  }
}

/* ============================================ */

/* ============================================
   PHASE 4: Exit Intent Modal & Accessibility
   ============================================ */

/* Exit Intent Modal */
.exit-intent-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  padding: 1rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.exit-intent-content {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exit-intent-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 0.5rem;
}

.exit-intent-close:hover {
  color: #475569;
  background-color: #f1f5f9;
}

.exit-intent-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.exit-intent-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.exit-intent-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
}

.exit-intent-content p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 1.5rem;
  word-break: keep-all;
}

.exit-intent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.exit-intent-dismiss {
  background: transparent;
  border: none;
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.exit-intent-dismiss:hover {
  color: var(--color-text-secondary);
  text-decoration: underline;
}

.exit-intent-dismiss:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

@media (max-width: 480px) {
  .exit-intent-content {
    padding: 2rem 1.5rem;
  }

  .exit-intent-content h2 {
    font-size: 1.5rem;
  }

  .exit-intent-icon {
    font-size: 3rem;
  }
}

/* Enhanced Accessibility Styles */

/* Enhanced Focus Indicators */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

/* High-contrast focus for buttons */
button:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Card focus states */
.feature-card:focus-visible,
.resource-card:focus-visible,
.workflow-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  transform: translateY(-2px);
}

/* Link skip to content enhancement */
.skip-link:focus {
  position: fixed;
  left: 1.5rem;
  top: 1.5rem;
  z-index: 9999;
  padding: 1rem 1.5rem;
  background-color: var(--color-link);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.4);
  text-decoration: none;
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .exit-intent-icon {
    animation: none;
  }

  .result-card::before {
    animation: none;
  }

  .feature-card::before {
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card,
  .resource-card,
  .trust-indicator,
  .result-card {
    border-width: 3px;
  }

  button,
  .btn,
  .btn-primary,
  .btn-secondary {
    border-width: 2px;
    font-weight: 700;
  }
}

/* Dark mode accessibility enhancements */
:root.dark .exit-intent-modal {
  background-color: rgba(0, 0, 0, 0.85);
}

:root.dark .exit-intent-content {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

:root.dark .exit-intent-content h2 {
  color: #f1f5f9;
}

:root.dark .exit-intent-content p {
  color: #cbd5e1;
}

:root.dark .exit-intent-close {
  color: #cbd5e1;
}

:root.dark .exit-intent-close:hover {
  color: #f1f5f9;
  background-color: #334155;
}

:root.dark .exit-intent-dismiss {
  color: #94a3b8;
}

:root.dark .exit-intent-dismiss:hover {
  color: #cbd5e1;
}

:root.dark .result-card {
  background: linear-gradient(135deg, #422006 0%, #713f12 100%);
  border-color: #a16207;
}

:root.dark .result-card-value {
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

:root.dark .trust-indicators {
  background-color: #1e293b;
  border-color: #334155;
}

:root.dark .trust-indicator__icon {
  background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
  color: #93c5fd;
}

/* Keyboard navigation enhancements */
:focus:not(:focus-visible) {
  outline: none;
}

/* Ensure interactive elements are keyboard accessible */
[role="button"],
[role="link"] {
  cursor: pointer;
}

[role="button"]:focus-visible,
[role="link"]:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Improve table responsiveness for accessibility */
.table-responsive {
  position: relative;
}

.table-responsive::after {
  content: '← 좌우로 스크롤하세요';
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  animation: fadeIn 0.5s ease;
}

@media (max-width: 640px) {
  .table-responsive::after {
    font-size: 0.6875rem;
  }
}

/* ============================================ */
