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

:root {
  --bg: #f0f4f8;
  --white: #ffffff;
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #7c3aed;
  --accent-light: #f5f3ff;
  --green: #10b981;
  --green-bg: #ecfdf5;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --dark-red: #b91c1c;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-subtle: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.main-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background: var(--gradient);
  color: #fff;
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
  }

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

  .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
  }
}

.hero-section {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #1e3a5f 100%);
  padding: 60px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
}

.calculator-section {
  margin-top: -40px;
  position: relative;
  z-index: 10;
  padding: 0 20px 60px;
  display: flex;
  justify-content: center;
}

.calculator-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  padding: 36px 32px;
  width: 100%;
  max-width: 480px;
  position: relative;
}

.calculator-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 1px);
  background: var(--gradient);
  z-index: -1;
  opacity: 0.15;
}

.input-group {
  margin-bottom: 24px;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

.input-label-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.input-helper {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 28px;
}

.calc-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-family: var(--font);
  font-weight: 500;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--border-light);
  color: var(--text);
  transition: all 0.25s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.calc-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.calc-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.reset-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reset-btn:hover,
.reset-btn:focus-visible {
  background: var(--red-bg);
  color: var(--red);
}

.result-section {
  margin-top: 12px;
}

.result-card {
  border-radius: var(--radius);
  padding: 0;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
}

.result-top-bar {
  height: 4px;
  transition: background 0.4s;
  background: var(--border);
}

.result-card.result-animate {
  animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultPop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header row: gauge left, summary right */
.result-header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 24px 0;
}

.gauge-container {
  flex-shrink: 0;
}

.gauge-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s;
}

.gauge-text-group {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.gauge-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.gauge-percent {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  transition: color 0.4s;
}

.gauge-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

/* Summary text next to gauge */
.result-summary {
  flex: 1;
  text-align: left;
}

.result-profit {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: all 0.4s;
}

.result-badge.good {
  background: var(--green-bg);
  color: #059669;
}

.result-badge.ok {
  background: var(--amber-bg);
  color: #b45309;
}

.result-badge.bad {
  background: var(--red-bg);
  color: #dc2626;
}

.result-guidance {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.55;
  transition: color 0.3s;
}

/* Cost Breakdown Grid */
.result-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-light);
  margin: 20px 0 0;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px;
  border-right: 1px solid var(--border-light);
}

.breakdown-item:last-child {
  border-right: none;
}

.breakdown-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.breakdown-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.breakdown-highlight {
  color: var(--primary);
}

/* Actionable Tip */
.result-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  text-align: left;
}

.result-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--amber);
}

/* Actions row */
.result-actions {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-light);
}

.ideal-price-btn {
  background: var(--gradient);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 11px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ideal-price-btn:hover,
.ideal-price-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
  .result-header-row {
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px 0;
  }

  .result-summary {
    text-align: center;
  }

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

  .breakdown-item:nth-child(2) {
    border-right: none;
  }

  .breakdown-item:nth-child(1),
  .breakdown-item:nth-child(2) {
    border-bottom: 1px solid var(--border-light);
  }

  .result-tip {
    padding: 12px 16px;
  }

  .result-actions {
    padding: 14px 16px 18px;
  }

  .ideal-price-btn {
    width: 100%;
    justify-content: center;
  }

  .gauge-wrapper,
  .gauge-svg {
    width: 110px;
    height: 110px;
  }

  .gauge-percent {
    font-size: 1.4rem;
  }
}


.features-section {
  padding: 80px 24px;
  background: var(--white);
}

.features-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

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

.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.feature-card:hover {
  background: var(--white);
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon.blue {
  background: var(--primary-light);
}

.feature-icon.green {
  background: var(--green-bg);
}

.feature-icon.amber {
  background: var(--amber-bg);
}

.feature-icon.violet {
  background: var(--accent-light);
}

.feature-icon.red {
  background: var(--red-bg);
}

.feature-icon.slate {
  background: var(--border-light);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.learn-section {
  padding: 80px 24px;
  background: var(--bg);
}

.learn-inner {
  max-width: 800px;
  margin: 0 auto;
}

.learn-grid {
  display: grid;
  gap: 20px;
}

.learn-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.learn-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.learn-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.learn-card-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.learn-card-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.learn-card-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.learn-card-content a:hover {
  text-decoration: underline;
}

.faq-section {
  padding: 80px 24px;
  background: var(--white);
}

.faq-inner {
  max-width: 700px;
  margin: 0 auto;
}

.faq-list {
  margin-top: 48px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: color 0.2s;
}

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

.faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: var(--text-muted);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  background: var(--primary-light);
  color: var(--primary);
}

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

.faq-answer p {
  padding-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.trust-section {
  padding: 60px 24px;
  background: var(--gradient-subtle);
}

.trust-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-item span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.cta-section {
  padding: 80px 24px;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #1e3a5f 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 auto;
}

.cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
  line-height: 1.6;
}

.cta-btn {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
}

.cta-sublink {
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.cta-sublink a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.cta-sublink a:hover {
  color: #fff;
}

.site-footer {
  background: #0f172a;
  padding: 40px 24px 28px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
  width: 100%;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  animation: modalSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlide {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.modal-body {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

.modal-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ===== GENERIC PAGE STYLES (About, Privacy, Terms) ===== */
.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #fff;
  text-align: center;
  padding: 100px 24px 60px;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin: 0 auto;
}

.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.page-section {
  margin-bottom: 36px;
}

.page-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.page-section p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ===== LEARN PAGE STYLES ===== */
.learn-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #fff;
  text-align: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.learn-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.learn-hero p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 550px;
  margin: 0 auto;
}

.knowledge-content {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 60px;
  overflow-x: hidden;
}

.knowledge-section {
  margin-bottom: 16px;
}

.knowledge-inner {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Visual Price Bar */
.visual-bar-container {
  margin-top: 24px;
  width: 100%;
  overflow: hidden;
}

.visual-bar {
  display: flex;
  border-radius: var(--radius-xs);
  overflow: hidden;
  height: 48px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  width: 100%;
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: width 0.6s ease;
}

.segment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Comparison Grid (Margin vs. Markup) */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.comparison-card {
  border-radius: var(--radius-sm);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  overflow: hidden;
  word-wrap: break-word;
}

.comparison-card.bad {
  background: #fef2f2;
  border-color: #fecaca;
}

.comparison-card.good {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

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

.comparison-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.comparison-icon {
  font-size: 1.3rem;
  font-weight: 700;
}

.comparison-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.comparison-formula {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 10px 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
  word-break: break-all;
}

/* Psychology Grid */
.psych-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.psych-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
  overflow: hidden;
}

.psych-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.psych-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 50px;
  flex-wrap: wrap;
}

.price-tag {
  background: var(--gradient);
  color: #fff;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 1.2rem;
  font-weight: 800;
  display: inline-block;
}

.price-tag.small {
  font-size: 0.9rem;
  opacity: 0.5;
  text-decoration: line-through;
  background: #94a3b8;
}

.price-tag.accent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.psych-content h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.psych-content p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Cheat Sheet Table */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
}

.cheat-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 400px;
}

.cheat-sheet thead {
  background: var(--bg);
}

.cheat-sheet th {
  text-align: left;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cheat-sheet td {
  padding: 14px 20px;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.cheat-sheet tbody tr:last-child td {
  border-bottom: none;
}

.cheat-sheet tbody tr:hover {
  background: var(--bg);
}

.margin-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.margin-tag.risk {
  background: var(--red-bg);
  color: #dc2626;
}

.margin-tag.ok {
  background: var(--amber-bg);
  color: #b45309;
}

.margin-tag.good {
  background: var(--green-bg);
  color: #059669;
}


/* Section Header (Learn page knowledge cards) */
.section-header {
  margin-bottom: 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ===== LEARN PAGE RESPONSIVE ===== */

/* Tablet landscape */
@media (max-width: 768px) {
  .learn-hero {
    padding: 90px 20px 48px;
  }

  .learn-hero h1 {
    font-size: 1.8rem;
  }

  .learn-hero p {
    font-size: 0.92rem;
  }

  .knowledge-content {
    padding: 16px 16px 48px;
  }

  .knowledge-inner {
    padding: 28px 20px;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .psych-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .visual-bar {
    height: 42px;
    font-size: 0.65rem;
  }

  .bar-segment {
    padding: 0 3px;
    font-size: 0.6rem;
  }

  .page-hero h1 {
    font-size: 1.7rem;
  }

  .page-hero p {
    font-size: 0.9rem;
  }
}

/* Small tablet / large phone — matches nav hamburger breakpoint */
@media (max-width: 640px) {
  .learn-hero {
    padding: 80px 16px 40px;
  }

  .learn-hero h1 {
    font-size: 1.6rem;
  }

  .learn-hero p {
    font-size: 0.88rem;
    max-width: 400px;
  }

  .knowledge-content {
    padding: 14px 14px 40px;
  }

  .knowledge-section {
    margin-bottom: 14px;
  }

  .knowledge-inner {
    padding: 22px 16px;
    border-radius: var(--radius-sm);
  }

  .section-header {
    margin-bottom: 18px;
  }

  .section-label {
    font-size: 0.65rem;
    padding: 3px 10px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-subtitle {
    font-size: 0.82rem;
  }

  .visual-bar {
    height: 38px;
    font-size: 0.58rem;
  }

  .bar-segment {
    padding: 0 2px;
    font-size: 0.55rem;
  }

  .segment-legend {
    gap: 10px;
    font-size: 0.75rem;
  }

  .comparison-card {
    padding: 18px 14px;
  }

  .comparison-title {
    font-size: 0.95rem;
  }

  .comparison-formula {
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  .comparison-card p {
    font-size: 0.82rem;
  }

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

  .psych-card {
    padding: 20px 16px;
  }

  .price-tag {
    font-size: 1rem;
    padding: 6px 14px;
  }

  .price-tag.small {
    font-size: 0.8rem;
  }

  .psych-content h3 {
    font-size: 0.88rem;
  }

  .psych-content p {
    font-size: 0.78rem;
  }

  .cheat-sheet th,
  .cheat-sheet td {
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .cheat-sheet th {
    font-size: 0.7rem;
  }

  .margin-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .page-hero,
  .page-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .page-hero h1 {
    font-size: 1.5rem;
  }

  .page-section h2 {
    font-size: 1.05rem;
  }

  .page-section p {
    font-size: 0.85rem;
  }

  /* Footer responsive */
  .footer-inner {
    padding: 32px 16px 20px;
  }

  .footer-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Small phone */
@media (max-width: 380px) {
  .learn-hero {
    padding: 76px 12px 32px;
  }

  .learn-hero h1 {
    font-size: 1.35rem;
  }

  .learn-hero p {
    font-size: 0.82rem;
  }

  .knowledge-content {
    padding: 10px 10px 36px;
  }

  .knowledge-inner {
    padding: 16px 12px;
  }

  .section-title {
    font-size: 1rem;
  }

  .visual-bar {
    height: 32px;
    font-size: 0.48rem;
  }

  .bar-segment {
    padding: 0 1px;
    font-size: 0.44rem;
  }

  .segment-legend {
    font-size: 0.68rem;
    gap: 8px;
  }

  .legend-dot {
    width: 8px;
    height: 8px;
  }

  .comparison-card {
    padding: 14px 12px;
  }

  .psych-card {
    padding: 16px 12px;
  }

  .price-tag {
    font-size: 0.9rem;
    padding: 5px 12px;
  }

  .cheat-sheet {
    min-width: 340px;
  }

  .page-hero {
    padding: 72px 12px 28px;
  }

  .page-hero h1 {
    font-size: 1.3rem;
  }

  .page-content {
    padding: 24px 12px 48px;
  }
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  text-align: center;
}

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

.resource-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.resource-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  color: var(--primary);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s;
}

.resource-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================
   SHARED PAGE STYLES (About, Privacy, Terms)
   ============================================ */
body.resources-page {
  background: var(--bg);
  color: var(--text);
}

.page-hero {
  padding: 60px 24px;
  background: var(--gradient-subtle);
  text-align: center;
}

.page-hero h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.page-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-section {
  margin-bottom: 32px;
}

.page-section:last-child {
  margin-bottom: 0;
}

.page-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.page-section p:last-child {
  margin-bottom: 0;
}

.page-section ul {
  list-style: none;
  padding: 0;
}

.page-section ul li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 6px;
}

.page-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================
   GENERAL RESPONSIVE (shared)
   ============================================ */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

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

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

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
}

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

  .hero-section {
    padding: 40px 20px 60px;
  }

  .calculator-card {
    padding: 28px 20px;
  }

  .calc-input {
    padding: 16px 14px;
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .features-section,
  .learn-section,
  .faq-section {
    padding: 60px 20px;
  }

  .learn-card {
    flex-direction: column;
    gap: 12px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cta-title {
    font-size: 1.3rem;
  }

  .gauge-wrapper,
  .gauge-svg {
    width: 120px;
    height: 120px;
  }

  .gauge-percent {
    font-size: 1.5rem;
  }

  .page-hero h1 {
    font-size: 1.5rem;
  }
}

/* ============================================
   KNOWLEDGE / LEARN PAGE STYLES
   ============================================ */
.knowledge-section {
  padding: 80px 24px;
  background: var(--white);
}

.knowledge-section:nth-child(even) {
  background: var(--bg);
}

.knowledge-inner {
  max-width: 900px;
  margin: 0 auto;
}

.visual-bar-container {
  margin: 40px 0;
  background: var(--bg);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.visual-bar {
  display: flex;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
  box-shadow: var(--shadow);
}

.bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  height: 100%;
}

.bar-segment:hover {
  transform: scaleY(1.1);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.segment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.comparison-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.comparison-card.bad {
  background: #fffcfc;
  border-color: #fee2e2;
}

.comparison-card.good {
  background: #fbfeff;
  border-color: #d1fae5;
}

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

.comparison-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.comparison-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.comparison-card.bad .comparison-icon {
  background: #fee2e2;
  color: #ef4444;
}

.comparison-card.good .comparison-icon {
  background: #d1fae5;
  color: #10b981;
}

.comparison-formula {
  background: linear-gradient(to right, #f8fafc, #f1f5f9);
  padding: 16px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  text-align: center;
  margin: 20px 0;
  border: 1px dashed var(--border);
  font-weight: 600;
  color: var(--text-secondary);
}

.comparison-list {
  list-style: none;
  margin-top: 20px;
}

.comparison-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.comparison-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.comparison-card.bad .comparison-list li::before {
  background: var(--red);
}

.comparison-card.good .comparison-list li::before {
  background: var(--green);
}

.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--white);
  margin-top: 40px;
}

.cheat-sheet {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.cheat-sheet th,
.cheat-sheet td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.cheat-sheet th {
  background: var(--bg);
  font-weight: 700;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cheat-sheet tr:last-child td {
  border-bottom: none;
}

.cheat-sheet tr:hover td {
  background: var(--primary-light);
}

.margin-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.margin-tag.risk {
  background: #fee2e2;
  color: #b91c1c;
}

.margin-tag.ok {
  background: #ffedd5;
  color: #c2410c;
}

.margin-tag.good {
  background: #d1fae5;
  color: #047857;
}

.psych-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.psych-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid transparent;
}

/* ============================================
   RESOURCES PAGE — COMPLETE REDESIGN
   ============================================ */

/* --- Hero --- */
.res-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #1e3a5f 100%);
  padding: 72px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.res-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.res-hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.res-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.res-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.03em;
  margin-bottom: 24px;
}

.res-hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s infinite;
}

.res-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.res-hero-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.res-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

.res-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 60px;
}

/* --- Main Container --- */
.res-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* --- Disclosure --- */
.res-disclosure {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 0.82rem;
  color: var(--primary);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 40px;
  margin-bottom: 28px;
}

/* --- Strategy Tip --- */
.res-strategy {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.res-strategy-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
  display: flex;
  align-items: center;
  justify-content: center;
}

.res-strategy h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 6px;
}

.res-strategy p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* --- Filter Bar --- */
.res-filters-bar {
  position: sticky;
  top: 64px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  margin-left: -20px;
  margin-right: -20px;
  padding: 14px 20px;
  margin-bottom: 40px;
}

.res-filters-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.res-filters-scroll::-webkit-scrollbar {
  display: none;
}

.res-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 9px 18px;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.res-filter:hover {
  background: var(--bg);
  border-color: var(--text-muted);
  color: var(--text);
  transform: translateY(-1px);
}

.res-filter.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.res-filter.active svg {
  stroke: #fff;
}

/* --- Sections --- */
.res-sections {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.res-category {
  transition: opacity 0.3s ease;
}

.res-cat-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.res-cat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  min-width: 48px;
}

.res-cat-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.res-cat-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* --- Resource Cards --- */
.res-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.res-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.res-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

/* Badge */
.res-card-badge {
  display: inline-block;
  background: var(--green-bg);
  color: #059669;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.res-badge-blue {
  background: var(--primary-light);
  color: var(--primary);
}

/* Top section: logo + info side by side */
.res-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.res-card-logo {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.res-card-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.res-card-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Verdict Grid */
.res-card-verdict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}

.res-verdict-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.res-verdict-good h4 {
  color: #16a34a;
}

.res-verdict-bad h4 {
  color: #dc2626;
}

.res-verdict-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.res-verdict-col li {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 7px;
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.res-verdict-col li:last-child {
  margin-bottom: 0;
}

.res-verdict-good li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.res-verdict-bad li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
}

/* Footer */
.res-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.res-card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.res-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gradient);
  color: #fff;
  padding: 9px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.res-card-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

/* ============================================
   RESOURCES PAGE — RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .res-hero {
    padding: 56px 20px 68px;
  }

  .res-hero-title {
    font-size: 1.9rem;
  }

  .res-hero-subtitle {
    font-size: 0.95rem;
  }

  .res-main {
    padding: 0 16px 60px;
  }

  .res-filters-bar {
    margin-left: -16px;
    margin-right: -16px;
    padding: 12px 16px;
  }

  .res-cat-header h2 {
    font-size: 1.3rem;
  }

  .res-card {
    padding: 22px;
  }

  .res-card-verdict {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .res-strategy {
    flex-direction: column;
    gap: 12px;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .psych-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .visual-bar-container {
    padding: 20px;
  }

  .visual-bar {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
  }

  .bar-segment {
    font-size: 0.75rem;
    padding: 4px;
  }
}

@media (max-width: 480px) {
  .res-hero {
    padding: 44px 16px 56px;
  }

  .res-hero-title {
    font-size: 1.55rem;
  }

  .res-hero-badge {
    font-size: 0.72rem;
    padding: 6px 14px;
  }

  .res-hero-subtitle {
    font-size: 0.88rem;
  }

  .res-main {
    padding: 0 14px 48px;
  }

  .res-disclosure {
    margin-top: 28px;
    font-size: 0.78rem;
    padding: 12px 14px;
  }

  .res-filters-bar {
    margin-left: -14px;
    margin-right: -14px;
    padding: 10px 14px;
  }

  .res-filter {
    font-size: 0.78rem;
    padding: 7px 14px;
  }

  .res-sections {
    gap: 40px;
  }

  .res-cat-number {
    font-size: 1.6rem;
    min-width: 36px;
  }

  .res-cat-header h2 {
    font-size: 1.15rem;
  }

  .res-cat-header p {
    font-size: 0.84rem;
  }

  .res-card {
    padding: 18px;
  }

  .res-card-top {
    flex-direction: column;
    gap: 12px;
  }

  .res-card-logo {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 1.2rem;
  }

  .res-card-info h3 {
    font-size: 1.05rem;
  }

  .res-card-verdict {
    padding: 14px;
  }

  .res-card-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .res-card-cta {
    width: 100%;
    justify-content: center;
  }
}







/* Mobile Adjustments for Learn Page */
@media (max-width: 768px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .psych-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .visual-bar-container {
    padding: 20px;
  }

  .visual-bar {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
  }

  .bar-segment {
    font-size: 0.75rem;
    padding: 4px;
  }
}

/* Mobile Adjustments for Resources */
@media (max-width: 768px) {
  .verdict-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .resource-filters-container {
    top: 64px;
  }

  .resource-filters {
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
  }

  .detailed-resource-card {
    padding: 24px;
    gap: 16px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "logo"
      "title"
      "tagline"
      "body"
      "footer";
    text-align: center;
  }

  .resource-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto;
  }

  .resource-name {
    padding-right: 0;
    margin-top: 4px;
    justify-self: center;
    align-self: center;
  }

  .resource-tagline {
    text-align: center;
  }

  .resource-badge {
    position: static;
    display: inline-block;
    margin-bottom: 12px;
    border-radius: 6px;
  }

  .verdict-grid {
    text-align: left;
  }

  .resource-footer {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }
}