/*
Theme Name: SleepWell Calculator V14
Theme URI: https://sleepwellcalculator.com/
Author: SleepWell Calculator
Description: Custom SleepWell Calculator theme v2 with self-contained homepage, calculators, blog archive, FAQs, and educational sleep content.
Version: 1.1.3
Text Domain: sleepwell-calculator
*/

:root {
  --night: #10162f;
  --night-2: #172044;
  --ink: #172033;
  --muted: #687089;
  --card: rgba(255, 255, 255, 0.92);
  --soft: #f5f7ff;
  --lavender: #d9ddff;
  --blue: #7aa7ff;
  --mint: #b9f2dc;
  --cream: #fff8ee;
  --accent: #9ed8ff;
  --accent-2: #e8ccff;
  --success: #2f8f73;
  --warning: #b06a18;
  --shadow: 0 24px 70px rgba(22, 28, 62, 0.18);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #eef3ff 0%, #fff 34%, #fff8ee 100%);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: white;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 99;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--night);
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: radial-gradient(circle at 70% 30%, var(--mint), transparent 32%), linear-gradient(135deg, var(--night), #575ef7 55%, var(--accent));
  box-shadow: 0 12px 28px rgba(87, 94, 247, 0.24);
  position: relative;
}
.logo-mark::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 9px;
  right: 9px;
  box-shadow: -5px 7px 0 rgba(255,255,255,0.75);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #38415b;
  font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a:focus { color: #3d55ff; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(23,32,51,0.1);
  background: white;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(22, 28, 62, 0.08);
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(135deg, #5967ff, #9ed8ff);
  color: white;
  border: 0;
}
.btn.dark {
  background: var(--night);
  color: white;
  border: 0;
}
.btn.ghost {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.18);
}
.hero {
  min-height: 760px;
  color: white;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 78% 18%, rgba(158,216,255,0.65), transparent 22%), radial-gradient(circle at 16% 28%, rgba(232,204,255,0.42), transparent 24%), linear-gradient(145deg, #10162f 0%, #19255a 48%, #352b7a 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.82) 1px, transparent 1px);
  background-size: 74px 74px;
  opacity: 0.18;
}
.hero-inner, .section, .footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 22px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 44px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.92);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.9rem;
}
.hero h1, .page-hero h1 {
  font-size: clamp(3rem, 7vw, 6.1rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
  margin: 22px 0 20px;
}
.hero p.lede, .page-hero p.lede {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  color: rgba(255,255,255,0.82);
  max-width: 650px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.phone-card {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 44px;
  padding: 18px;
  box-shadow: 0 38px 90px rgba(0,0,0,0.25);
  backdrop-filter: blur(18px);
}
.phone-screen {
  background: linear-gradient(180deg, #0d1228, #1d2551 55%, #fbf7ff);
  border-radius: 34px;
  min-height: 520px;
  padding: 26px;
  overflow: hidden;
  position: relative;
}
.moon-orb {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  margin: 18px auto 28px;
  background: radial-gradient(circle at 36% 32%, #fff, #dfe8ff 42%, #8db6ff 70%, transparent 71%);
  box-shadow: 0 0 70px rgba(158,216,255,0.65);
}
.metric-card {
  background: rgba(255,255,255,0.92);
  color: var(--ink);
  border-radius: 26px;
  padding: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.metric-card small { color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.metric-card strong { display: block; font-size: 2rem; letter-spacing: -0.04em; margin-top: 4px; }
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -52px;
  position: relative;
  z-index: 3;
}
.trust-card, .feature-card, .article-card, .calculator-card, .content-card {
  background: var(--card);
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.trust-card strong { display: block; font-size: 1.45rem; letter-spacing: -0.04em; }
.trust-card span { color: var(--muted); font-size: 0.94rem; }
.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.section h2, .page-section h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.065em;
  line-height: 1;
  margin: 0;
}
.section-intro { color: var(--muted); max-width: 620px; font-size: 1.08rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.icon-bubble {
  width: 54px;
  height: 54px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--lavender), var(--mint));
  font-size: 1.45rem;
  margin-bottom: 20px;
}
.feature-card h3, .article-card h3, .calculator-card h3 { margin: 0 0 10px; font-size: 1.35rem; letter-spacing: -0.035em; }
.feature-card p, .article-card p, .calculator-card p, .content-card p { color: var(--muted); margin: 0 0 18px; }
.sleep-panel {
  background: linear-gradient(135deg, rgba(16,22,47,0.98), rgba(44,54,126,0.96));
  color: white;
  border-radius: 42px;
  padding: 36px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.sleep-panel::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158,216,255,0.5), transparent 65%);
  right: -90px;
  top: -80px;
}
.sleep-panel > * { position: relative; z-index: 1; }
.calculator-card label, .field label {
  display: block;
  font-weight: 750;
  margin-bottom: 8px;
}
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(23,32,51,0.14);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: white;
}
.sleep-panel input, .sleep-panel select { background: rgba(255,255,255,0.96); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 22px 0; }
.result-box {
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  border-radius: 24px;
  padding: 20px;
  margin-top: 18px;
  display: none;
}
.result-box.show { display: block; }
.result-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.result-pill {
  border-radius: 18px;
  background: #f3f5ff;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(23,32,51,0.08);
}
.result-pill strong { display: block; font-size: 1.35rem; }
.notice {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(158,216,255,0.18);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  margin-top: 16px;
}
.light-notice {
  background: #f4f7ff;
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--muted);
}
.article-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.article-tag {
  display: inline-flex;
  border-radius: 999px;
  background: #edf2ff;
  color: #3d55ff;
  padding: 6px 10px;
  font-weight: 750;
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.cta-band {
  background: linear-gradient(135deg, #10162f, #342a7c);
  color: white;
  border-radius: 44px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { margin: 0; }
.cta-band p { color: rgba(255,255,255,0.78); }
.site-footer {
  background: #0d1228;
  color: white;
  margin-top: 80px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 24px;
  padding-top: 58px;
  padding-bottom: 58px;
}
.footer-inner p, .footer-inner a { color: rgba(255,255,255,0.68); }
.footer-inner h4 { margin: 0 0 12px; }
.footer-inner a { display: block; margin: 8px 0; }
.page-hero {
  background: radial-gradient(circle at 80% 0%, rgba(158,216,255,0.48), transparent 22%), linear-gradient(135deg, #10162f, #27306e);
  color: white;
  padding: 88px 22px;
}
.page-hero-inner { max-width: var(--max); margin: 0 auto; }
.page-section { max-width: var(--max); margin: 0 auto; padding: 70px 22px; }
.prose { max-width: 850px; }
.prose h2 { margin-top: 42px; }
.prose p, .prose li { color: #4f5870; }
.kicker { color: #6270ff; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 34px rgba(22,28,62,.08); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid rgba(23,32,51,0.08); }
th { background: #f4f7ff; }
.faq details {
  background: white;
  border: 1px solid rgba(23,32,51,0.08);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 12px 0;
  box-shadow: 0 10px 30px rgba(22,28,62,.06);
}
.faq summary { cursor: pointer; font-weight: 800; }
@media (max-width: 900px) {
  .nav { align-items: flex-start; }
  .nav-links { display: none; }
  .hero-grid, .grid-3, .grid-2, .trust-row, .cta-band, .footer-inner { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-inner { padding-top: 58px; }
  .trust-row { margin-top: 0; padding: 0 22px; }
  .section-header { display: block; }
  .form-grid, .result-list { grid-template-columns: 1fr; }
  .cta-band, .sleep-panel { padding: 28px; border-radius: 30px; }
}
@media (prefers-reduced-motion: no-preference) {
  .phone-card, .trust-card, .feature-card, .article-card, .calculator-card { transition: transform .25s ease, box-shadow .25s ease; }
  .phone-card:hover, .trust-card:hover, .feature-card:hover, .article-card:hover, .calculator-card:hover { transform: translateY(-4px); }
}

/* SleepWell premium homepage refresh */
:root {
  --sw-midnight: #0f1631;
  --sw-evening: #182246;
  --sw-purple: #241a45;
  --sw-cream: #f5f0e4;
  --sw-cream-2: #fffaf1;
  --sw-sage: #8d9b87;
  --sw-gold: #d5b06e;
  --sw-peach: #e8b39c;
  --sw-rose: #d99cc4;
  --sw-ink: #24304a;
  --sw-muted: #667085;
  --sw-white: #ffffff;
}

body.sleepwell-theme {
  background: var(--sw-cream);
  color: var(--sw-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sleepwell-theme h1,
.sleepwell-theme h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.035em;
}

.sleepwell-theme .sw-header {
  background: transparent;
  border: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}

.sleepwell-theme .sw-nav {
  margin-top: 22px;
  background: rgba(18, 13, 43, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  color: var(--sw-cream);
}

.sleepwell-theme .sw-brand,
.sleepwell-theme .sw-nav-links,
.sleepwell-theme .sw-nav-links a {
  color: var(--sw-cream);
}

.sleepwell-theme .sw-nav-links a:hover,
.sleepwell-theme .sw-nav-links a:focus {
  color: var(--sw-peach);
}

.sleepwell-theme .sw-logo-mark,
.sleepwell-theme .sw-footer .logo-mark {
  background: radial-gradient(circle at 64% 28%, var(--sw-gold), transparent 31%), linear-gradient(135deg, #111936, #273660 58%, var(--sw-sage));
}

.sw-btn-primary {
  background: linear-gradient(135deg, #f0bd8b 0%, #e8a0c8 100%) !important;
  color: #1f1630 !important;
  border: 0 !important;
  box-shadow: 0 18px 42px rgba(216, 134, 132, 0.28) !important;
}

.sw-btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--sw-cream) !important;
  border: 1px solid rgba(245, 240, 228, 0.2) !important;
  box-shadow: none !important;
}

.sw-btn-dark {
  background: var(--sw-midnight) !important;
  color: var(--sw-cream) !important;
  border: 0 !important;
}

.sw-btn-soft {
  background: #fff !important;
  color: var(--sw-midnight) !important;
  border: 1px solid rgba(36, 48, 74, 0.1) !important;
}

.sw-hero-pro {
  min-height: 880px;
  padding-top: 110px;
  color: var(--sw-cream);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(213, 176, 110, 0.18), transparent 24%),
    radial-gradient(circle at 18% 25%, rgba(217, 156, 196, 0.20), transparent 28%),
    linear-gradient(135deg, #0b1028 0%, #1b1739 44%, #241a45 100%);
}

.sw-hero-pro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(245, 240, 228, 0.7) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.09;
}

.sw-hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  right: -190px;
  top: 95px;
  background: radial-gradient(circle, rgba(232, 179, 156, 0.18), transparent 64%);
}

.sw-hero-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 82px 28px 90px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.75fr);
  gap: 58px;
  align-items: center;
}

.sw-eyebrow,
.sw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--sw-gold);
}

.sw-hero-copy h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(3.5rem, 7.5vw, 7.35rem);
  line-height: 0.88;
  color: var(--sw-cream);
}

.sw-lede {
  max-width: 690px;
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.7;
  color: rgba(245, 240, 228, 0.86);
}

.sw-hero-actions,
.sw-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.sw-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.sw-hero-proof span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(245, 240, 228, 0.82);
  font-weight: 650;
}

.sw-book-stage {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.sw-book-halo {
  position: absolute;
  width: min(100%, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 176, 110, 0.22), rgba(141, 155, 135, 0.08), transparent 68%);
  filter: blur(4px);
}

.sw-book-img {
  width: min(88%, 410px);
  position: relative;
  transform: rotate(-5deg);
  filter: drop-shadow(0 35px 60px rgba(0, 0, 0, 0.34));
}

.sw-benefits {
  max-width: 1100px;
  margin: -100px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.sw-benefit-card {
  min-height: 250px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(213, 176, 110, 0.22), transparent 24%),
    linear-gradient(180deg, #372567, #3d2f70);
  color: var(--sw-cream);
  box-shadow: 0 28px 62px rgba(27, 23, 57, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sw-benefit-card h2 {
  margin: 18px 0 10px;
  font-size: 2.2rem;
  line-height: 1;
}

.sw-benefit-card p {
  margin: 0;
  color: rgba(245, 240, 228, 0.85);
}

.sw-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(245, 240, 228, 0.12);
  color: var(--sw-gold);
  font-size: 1.4rem;
}

.sw-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px;
}

.sw-calculator-feature {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 34px;
  align-items: center;
}

.sw-section-copy h2,
.sw-section-header h2,
.sw-reset-card h2,
.sw-guide-copy h2,
.sw-faq-section h2 {
  margin: 0 0 18px;
  color: var(--sw-midnight);
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
}

.sw-section-copy p,
.sw-section-header p,
.sw-reset-card p,
.sw-guide-copy p,
.sw-faq-section p {
  font-size: 1.06rem;
  color: var(--sw-muted);
}

.sw-mini-calculator {
  border-radius: 32px;
  padding: 28px;
  background: var(--sw-white);
  box-shadow: 0 24px 60px rgba(36, 48, 74, 0.11);
  border: 1px solid rgba(36, 48, 74, 0.08);
}

.sw-card-label {
  margin: 0 0 16px !important;
  color: var(--sw-sage) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem !important;
}

.sw-time-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(36, 48, 74, 0.09);
}

.sw-time-row span {
  color: var(--sw-muted);
  font-weight: 650;
}

.sw-time-row strong {
  color: var(--sw-midnight);
  font-size: 1.35rem;
}

.sw-note,
.sw-privacy-note {
  color: var(--sw-muted) !important;
  font-size: 0.95rem !important;
}

.sw-reset-section {
  padding-top: 28px;
}

.sw-reset-card {
  padding: 56px;
  border-radius: 38px;
  background:
    radial-gradient(circle at 95% 5%, rgba(213, 176, 110, 0.18), transparent 28%),
    linear-gradient(135deg, var(--sw-midnight), var(--sw-evening));
  color: var(--sw-cream);
  overflow: hidden;
}

.sw-reset-card h2 {
  color: var(--sw-cream);
  max-width: 760px;
}

.sw-reset-card > p {
  color: rgba(245, 240, 228, 0.78);
}

.sw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.sw-steps article {
  padding: 26px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.sw-steps span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sw-gold);
  color: var(--sw-midnight);
  font-weight: 900;
}

.sw-steps h3 {
  margin: 18px 0 8px;
  color: var(--sw-cream);
}

.sw-steps p {
  color: rgba(245, 240, 228, 0.78);
  font-size: 1rem;
}

.sw-section-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.sw-section-header.centered {
  display: block;
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
}

.sw-article-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 20px;
}

.sw-article-feature,
.sw-article-tile {
  border-radius: 30px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(36, 48, 74, 0.08);
  border: 1px solid rgba(36, 48, 74, 0.08);
}

.sw-article-feature {
  grid-row: span 2;
  min-height: 370px;
  background:
    radial-gradient(circle at 15% 10%, rgba(232, 179, 156, 0.22), transparent 30%),
    linear-gradient(135deg, #fffaf1, #efe8ff);
}

.sw-article-feature h3,
.sw-article-tile h3 {
  margin: 0 0 12px;
  color: var(--sw-midnight);
  font-size: 1.45rem;
  line-height: 1.15;
}

.sw-article-feature h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3rem;
  letter-spacing: -0.03em;
}

.sw-article-feature a {
  color: var(--sw-midnight);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: var(--sw-gold);
  text-underline-offset: 5px;
}

.sw-faq-section {
  max-width: 980px;
}

.sw-faq-list {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.sw-faq-list details {
  background: #fff;
  border-radius: 22px;
  padding: 20px 24px;
  border: 1px solid rgba(36, 48, 74, 0.09);
  box-shadow: 0 16px 42px rgba(36, 48, 74, 0.06);
}

.sw-faq-list summary {
  cursor: pointer;
  color: var(--sw-midnight);
  font-weight: 850;
  font-size: 1.06rem;
}

.sw-faq-list p {
  margin: 14px 0 0;
  color: var(--sw-muted);
}

.sw-guide-section {
  padding-top: 40px;
}

.sw-guide-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 34px;
  align-items: center;
  border-radius: 42px;
  padding: 46px;
  background:
    radial-gradient(circle at 10% 20%, rgba(213, 176, 110, 0.18), transparent 28%),
    linear-gradient(135deg, var(--sw-midnight), var(--sw-purple));
  color: var(--sw-cream);
}

.sw-guide-media img {
  width: min(100%, 330px);
  margin: 0 auto;
  transform: rotate(-3deg);
  filter: drop-shadow(0 28px 56px rgba(0, 0, 0, 0.34));
}

.sw-guide-copy h2 {
  color: var(--sw-cream);
}

.sw-guide-copy p {
  color: rgba(245, 240, 228, 0.8);
}

.sw-email-form {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 24px;
}

.sw-email-form label {
  color: rgba(245, 240, 228, 0.86);
  font-weight: 750;
}

.sw-email-form input {
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: var(--sw-ink);
  padding: 0 16px;
  font-size: 1rem;
}

.sw-email-form button {
  margin-top: 8px;
  justify-self: start;
}

.sw-footer {
  background: var(--sw-midnight);
}

@media (max-width: 980px) {
  .sleepwell-theme .sw-header {
    position: sticky;
    background: var(--sw-midnight);
  }

  .sleepwell-theme .sw-nav {
    margin-top: 0;
    border-radius: 0;
    flex-wrap: wrap;
  }

  .sw-hero-wrap,
  .sw-calculator-feature,
  .sw-guide-panel {
    grid-template-columns: 1fr;
  }

  .sw-benefits,
  .sw-steps,
  .sw-article-grid {
    grid-template-columns: 1fr;
  }

  .sw-benefits {
    margin-top: -55px;
  }

  .sw-section-header {
    display: block;
  }

  .sw-book-stage {
    min-height: auto;
    order: -1;
  }

  .sw-book-img {
    width: min(72%, 320px);
  }
}

@media (max-width: 680px) {
  .sleepwell-theme .sw-nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .sw-hero-pro {
    min-height: auto;
    padding-top: 34px;
  }

  .sw-hero-wrap {
    padding-top: 36px;
  }

  .sw-hero-copy h1 {
    font-size: clamp(3.1rem, 15vw, 4.6rem);
  }

  .sw-benefit-card,
  .sw-reset-card,
  .sw-guide-panel {
    padding: 28px;
  }

  .sw-section {
    padding: 70px 18px;
  }
}


/* SleepWell v3 refinement pass */
.sleepwell-theme .sw-hero-pro {
  min-height: 820px;
  padding-top: 104px;
}

.sleepwell-theme .sw-hero-wrap {
  padding: 76px 28px 126px;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.82fr);
  gap: 70px;
}

.sleepwell-theme .sw-hero-copy h1 {
  font-size: clamp(3.4rem, 6.6vw, 6.45rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.sleepwell-theme .sw-lede {
  max-width: 660px;
  font-size: clamp(1.08rem, 1.65vw, 1.28rem);
}

.sleepwell-theme .sw-book-stage {
  min-height: 600px;
  align-self: center;
}

.sleepwell-theme .sw-book-halo {
  width: min(100%, 540px);
  background:
    radial-gradient(circle, rgba(245, 240, 228, 0.24), rgba(213, 176, 110, 0.16), transparent 70%);
}

.sleepwell-theme .sw-book-img {
  width: min(95%, 440px);
  transform: rotate(-4deg);
  filter: drop-shadow(0 38px 58px rgba(0, 0, 0, 0.32));
}

.sleepwell-theme .sw-benefits {
  margin: -46px auto 0;
  max-width: 1120px;
  gap: 24px;
}

.sleepwell-theme .sw-benefit-card {
  min-height: 235px;
  padding: 30px 30px 28px;
}

.sleepwell-theme .sw-benefit-card h2 {
  font-size: clamp(1.8rem, 2.7vw, 2.35rem);
  line-height: 1.05;
}

.sleepwell-theme .sw-section {
  padding-top: 108px;
  padding-bottom: 108px;
}

.sleepwell-theme .sw-guide-media img {
  content: url("assets/images/3am-sleep-reset-book-ivory.png");
}

.page-hero {
  min-height: auto;
  padding: 98px 0 88px;
  background:
    radial-gradient(circle at 82% 18%, rgba(158,216,255,0.26), transparent 26%),
    linear-gradient(135deg, #10162f 0%, #1a2554 100%);
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-hero h1 {
  font-size: clamp(3rem, 6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  max-width: 1000px;
}

.page-hero p.lede {
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.65;
  max-width: 780px;
}

#main .page-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 74px 24px;
}

#main .grid-2 {
  gap: 34px;
}

#main .grid-3 {
  gap: 28px;
}

#main .content-card,
#main .feature-card,
#main .calculator-card,
#main .article-card {
  padding: 32px;
  border-radius: 26px;
}

#main .content-card h2 {
  margin-top: 0;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

#main .content-card p,
#main .feature-card p,
#main .prose p {
  font-size: 1.05rem;
  line-height: 1.75;
}

#main .sleep-panel {
  margin-top: 0;
  padding: 46px;
  border-radius: 36px;
}

#main .sleep-panel h2 {
  font-size: clamp(2.3rem, 4.5vw, 3.8rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin-top: 0;
}

#main .feature-card {
  text-align: left;
}

#main .feature-card .icon-bubble {
  margin-bottom: 20px;
}

#main .feature-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

#main .faq {
  max-width: 980px;
}

#main .faq h2 {
  font-size: clamp(2.4rem, 5vw, 4.15rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  margin: 0 0 14px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 0 28px;
}

#main .faq details {
  padding: 20px 24px;
  margin: 14px 0;
}

#main .faq summary {
  font-size: 1.04rem;
}

.disclaimer-prose {
  max-width: 860px !important;
}

.disclaimer-prose p {
  margin: 0 0 22px;
}

@media (max-width: 980px) {
  .sleepwell-theme .sw-hero-wrap {
    gap: 26px;
    padding-bottom: 92px;
  }

  .sleepwell-theme .sw-book-stage {
    min-height: auto;
  }

  .sleepwell-theme .sw-benefits {
    margin-top: -30px;
  }
}

@media (max-width: 680px) {
  .sleepwell-theme .sw-hero-copy h1 {
    font-size: clamp(3rem, 14vw, 4.25rem);
  }

  .sleepwell-theme .sw-book-img {
    width: min(82%, 330px);
  }

  .page-hero {
    padding: 70px 0 62px;
  }

  .page-hero h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  #main .page-section {
    padding: 58px 18px;
  }

  #main .sleep-panel {
    padding: 30px;
  }
}


/* V4 book edge refinement */
.sleepwell-theme .sw-book-img {
  filter: drop-shadow(0 32px 54px rgba(0, 0, 0, 0.30));
}

.sleepwell-theme .sw-book-stage::after {
  content: "";
  position: absolute;
  width: min(72%, 380px);
  height: 46px;
  left: 50%;
  bottom: 58px;
  transform: translateX(-50%) rotate(-4deg);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.22), transparent 68%);
  z-index: 0;
  pointer-events: none;
}

.sleepwell-theme .sw-book-img {
  z-index: 1;
}


/* WordPress integration cleanup */
.sleepwell-theme .wp-site-blocks,
.sleepwell-theme main,
.sleepwell-theme .site-main {
  margin: 0;
  padding: 0;
}

.sleepwell-theme .entry-content > .wp-block-navigation,
.sleepwell-theme .entry-content > nav,
.sleepwell-theme .entry-content > .wp-block-image:first-child {
  display: none !important;
}

.sleepwell-theme .custom-logo,
.sleepwell-theme .site-logo img,
.sleepwell-theme .wp-block-site-logo img {
  max-width: 42px !important;
  height: auto !important;
}

.sleepwell-theme .sw-header {
  background: transparent;
  border: 0;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}

.sleepwell-theme:not(.home) .sw-header,
.sleepwell-theme.blog .sw-header,
.sleepwell-theme.single .sw-header,
.sleepwell-theme.page:not(.home) .sw-header {
  position: sticky;
  background: rgba(255,255,255,0.86);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.sleepwell-theme:not(.home) .sw-nav,
.sleepwell-theme.blog .sw-nav,
.sleepwell-theme.single .sw-nav,
.sleepwell-theme.page:not(.home) .sw-nav {
  margin-top: 0;
  background: rgba(255,255,255,0.88);
  color: var(--sw-midnight);
  border-radius: 0;
  box-shadow: none;
}

.sleepwell-theme:not(.home) .sw-brand,
.sleepwell-theme:not(.home) .sw-nav-links,
.sleepwell-theme:not(.home) .sw-nav-links a,
.sleepwell-theme.blog .sw-brand,
.sleepwell-theme.blog .sw-nav-links,
.sleepwell-theme.blog .sw-nav-links a,
.sleepwell-theme.single .sw-brand,
.sleepwell-theme.single .sw-nav-links,
.sleepwell-theme.single .sw-nav-links a,
.sleepwell-theme.page:not(.home) .sw-brand,
.sleepwell-theme.page:not(.home) .sw-nav-links,
.sleepwell-theme.page:not(.home) .sw-nav-links a {
  color: var(--sw-midnight);
}


/* V3 emergency cleanup for legacy WordPress icon/logo bleed */
.sleepwell-theme > img:not([class]),
.sleepwell-theme > p > img:not([class]),
.sleepwell-theme > figure.wp-block-image:first-child,
.sleepwell-theme main > img:not(.sw-book-img),
.sleepwell-theme main > p:first-child > img,
.sleepwell-theme main > figure:first-child img,
.sleepwell-theme .entry-content > figure:first-child img,
.sleepwell-theme .entry-content > p:first-child img,
.sleepwell-theme img.custom-logo,
.sleepwell-theme img.avatar,
.sleepwell-theme img[src*="cropped"],
.sleepwell-theme img[src*="site-icon"],
.sleepwell-theme img[src*="sleepwell"] {
  max-width: 42px;
}

.sleepwell-theme main > img:not(.sw-book-img),
.sleepwell-theme main > p:first-child > img,
.sleepwell-theme main > figure:first-child,
.sleepwell-theme .entry-content > figure:first-child,
.sleepwell-theme .entry-content > p:first-child:has(img),
.sleepwell-theme body > img {
  display: none !important;
}

.sleepwell-theme .sw-book-stage img,
.sleepwell-theme .sw-guide-media img,
.sleepwell-theme img.sw-book-img {
  display: block !important;
  max-width: 100%;
}

.sleepwell-theme .sw-header + img,
.sleepwell-theme .sw-header + figure,
.sleepwell-theme header + img,
.sleepwell-theme header + figure,
.sleepwell-theme header + p:has(img) {
  display: none !important;
}


/* V4 cleanup for legacy WordPress menu list bleed */
.sleepwell-theme .sw-header + ul,
.sleepwell-theme .sw-header + ol,
.sleepwell-theme header + ul,
.sleepwell-theme header + ol,
.sleepwell-theme body > ul:first-of-type,
.sleepwell-theme body > ol:first-of-type,
.sleepwell-theme main#main > ul:first-child,
.sleepwell-theme main#main > ol:first-child,
.sleepwell-theme .entry-content > ul:first-child,
.sleepwell-theme .entry-content > ol:first-child,
.sleepwell-theme .wp-block-page-list,
.sleepwell-theme .wp-block-navigation__container {
  display: none !important;
}

.sleepwell-theme .sw-nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 28px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.sleepwell-theme .sw-nav-links a {
  display: inline-flex !important;
  white-space: nowrap !important;
}


/* V5 stronger cleanup for old top-level WordPress menu bleed */
body.sleepwell-theme > ul,
body.sleepwell-theme > ol,
body.sleepwell-theme > nav:not(.sw-nav),
body.sleepwell-theme > .wp-block-navigation,
body.sleepwell-theme > .wp-block-page-list,
body.sleepwell-theme > .wp-site-blocks > ul:first-child,
body.sleepwell-theme > .wp-site-blocks > ol:first-child,
body.sleepwell-theme > .wp-site-blocks > nav:first-child {
  display: none !important;
}

body.sleepwell-theme .sw-header ul,
body.sleepwell-theme .sw-header ol,
body.sleepwell-theme .sw-header .sw-nav-links {
  display: flex !important;
}


/* V6 homepage working calculator */
.sw-home-calculator-form {
  display: grid;
  gap: 18px;
}

.sw-home-calculator-form .field {
  display: grid;
  gap: 8px;
}

.sw-home-calculator-form label {
  color: var(--sw-midnight);
  font-weight: 800;
}

.sw-home-calculator-form input,
.sw-home-calculator-form select {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(36, 48, 74, 0.12);
  background: #fff;
  padding: 0 14px;
  font-size: 1rem;
  color: var(--sw-ink);
}

.sw-home-calculator-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sw-home-calculator-note {
  margin-top: 14px !important;
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
}

.result-box {
  margin-top: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(36,48,74,0.10);
  padding: 18px;
}

.result-box:empty {
  display: none;
}

.result-box h3 {
  margin: 0 0 12px;
  color: var(--sw-midnight);
}

.result-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(36,48,74,0.08);
}

.result-row:first-of-type {
  border-top: 0;
}

.result-row span {
  color: var(--sw-muted);
  font-weight: 700;
}

.result-row strong {
  color: var(--sw-midnight);
  font-size: 1.2rem;
}

.result-row small {
  grid-column: 1 / -1;
  color: var(--sw-muted);
}

@media (max-width: 680px) {
  .sw-home-calculator-form .form-grid {
    grid-template-columns: 1fr;
  }
}


/* V9 article archive and single article polish */
.sleepwell-theme.blog .sw-header,
.sleepwell-theme.archive .sw-header,
.sleepwell-theme.single .sw-header {
  position: sticky;
  top: 0;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
}

.sleepwell-theme.blog .sw-nav,
.sleepwell-theme.archive .sw-nav,
.sleepwell-theme.single .sw-nav {
  margin-top: 0;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  background: rgba(255, 253, 247, 0.92);
  color: var(--sw-midnight);
}

.sleepwell-theme.blog .sw-nav a,
.sleepwell-theme.archive .sw-nav a,
.sleepwell-theme.single .sw-nav a,
.sleepwell-theme.blog .sw-brand,
.sleepwell-theme.archive .sw-brand,
.sleepwell-theme.single .sw-brand {
  color: var(--sw-midnight);
}

.sleepwell-theme.blog .page-hero,
.sleepwell-theme.archive .page-hero {
  padding: 94px 0 86px;
}

.sleepwell-theme.blog .article-list,
.sleepwell-theme.archive .article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 980px;
  margin: 0 auto;
}

.sleepwell-theme.blog .article-card,
.sleepwell-theme.archive .article-card {
  display: block;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(36, 48, 74, 0.08);
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.08);
  padding: clamp(28px, 4vw, 46px);
  border-radius: 30px;
  overflow: hidden;
}

.sleepwell-theme.blog .article-card h2,
.sleepwell-theme.archive .article-card h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 8px 0 14px;
}

.sleepwell-theme.blog .article-card h2 a,
.sleepwell-theme.archive .article-card h2 a {
  color: var(--sw-midnight);
  text-decoration: none;
}

.sleepwell-theme.blog .article-card h2 a:hover,
.sleepwell-theme.archive .article-card h2 a:hover {
  text-decoration: underline;
}

.sleepwell-theme.blog .article-card p,
.sleepwell-theme.archive .article-card p {
  max-width: 780px;
  line-height: 1.7;
  color: var(--sw-muted);
}

.sleepwell-theme.blog .article-meta,
.sleepwell-theme.archive .article-meta {
  color: var(--sw-moss);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sleepwell-theme.single .page-hero {
  padding: 84px 0 70px;
}

.sleepwell-theme.single .page-hero h1 {
  max-width: 1060px;
  font-size: clamp(2.75rem, 5.6vw, 5.4rem);
  line-height: 1.04;
}

.sleepwell-theme.single .page-hero .lede {
  max-width: 900px;
}

.sleepwell-theme.single .prose {
  max-width: 920px !important;
  padding-top: 70px !important;
}

.sleepwell-theme.single .prose p,
.sleepwell-theme.single .prose li {
  font-size: 1.12rem;
  line-height: 1.82;
  color: var(--sw-ink);
}

.sleepwell-theme.single .prose h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 56px 0 18px;
  color: var(--sw-midnight);
}

.sleepwell-theme.single .prose h3 {
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  margin: 38px 0 14px;
  color: var(--sw-midnight);
}

.sleepwell-theme.single .prose figure,
.sleepwell-theme.single .prose .wp-block-image {
  margin: 42px auto;
  max-width: 100%;
  text-align: center;
}

.sleepwell-theme.single .prose img,
.sleepwell-theme.single .prose figure img,
.sleepwell-theme.single .prose .wp-block-image img,
.sleepwell-theme.single .prose .aligncenter img,
.sleepwell-theme.single .prose .size-full {
  width: auto !important;
  max-width: min(100%, 880px) !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(23, 32, 51, 0.12);
}

.sleepwell-theme.single .prose img[width],
.sleepwell-theme.single .prose img[height] {
  width: auto !important;
  height: auto !important;
}

.sleepwell-theme.single .prose figcaption,
.sleepwell-theme.single .prose .wp-element-caption {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--sw-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  font-style: italic;
}

.sleepwell-theme.single .prose blockquote {
  margin: 42px 0;
  padding: 26px 30px;
  border-left: 4px solid var(--sw-gold);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 18px;
}

@media (max-width: 760px) {
  .sleepwell-theme.blog .article-card,
  .sleepwell-theme.archive .article-card {
    padding: 26px 22px;
  }

  .sleepwell-theme.single .prose {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .sleepwell-theme.single .prose img,
  .sleepwell-theme.single .prose figure img,
  .sleepwell-theme.single .prose .wp-block-image img {
    max-width: 100% !important;
    border-radius: 16px;
  }
}


/* V11 footer spacing and final page polish */
.sleepwell-theme .footer-inner {
  grid-template-columns: minmax(280px, 1.8fr) repeat(3, minmax(140px, 0.7fr)) !important;
  gap: clamp(42px, 7vw, 96px) !important;
  align-items: start;
}

.sleepwell-theme .footer-inner > div:first-child {
  max-width: 380px;
}

.sleepwell-theme .footer-inner h4 {
  margin-bottom: 18px;
}

.sleepwell-theme .footer-inner a {
  margin: 10px 0;
}

.sleepwell-theme .sw-source-grid,
.sleepwell-theme .sw-faq-page-grid,
.sleepwell-theme .sw-contact-grid {
  display: grid;
  gap: 22px;
}

.sleepwell-theme .sw-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sleepwell-theme .sw-contact-grid {
  grid-template-columns: 1fr 1fr;
}

.sleepwell-theme .sw-clean-card {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(36,48,74,0.08);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 20px 60px rgba(23,32,51,0.08);
}

.sleepwell-theme .sw-clean-card h2,
.sleepwell-theme .sw-clean-card h3 {
  margin-top: 0;
}

.sleepwell-theme .sw-clean-card ul {
  padding-left: 1.25rem;
}

.sleepwell-theme .sw-clean-card li {
  margin: 10px 0;
  line-height: 1.65;
}

.sleepwell-theme .sw-contact-note {
  font-size: 1.06rem;
  line-height: 1.75;
}

.sleepwell-theme .sw-faq-page-grid {
  max-width: 980px;
  margin: 0 auto;
}

.sleepwell-theme .sw-faq-page-grid details {
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(36,48,74,0.08);
  border-radius: 22px;
  padding: 20px 24px;
  box-shadow: 0 14px 42px rgba(23,32,51,0.06);
}

.sleepwell-theme .sw-faq-page-grid summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--sw-midnight);
  font-size: 1.08rem;
}

.sleepwell-theme .sw-faq-page-grid p {
  margin-bottom: 0;
  color: var(--sw-muted);
  line-height: 1.72;
}

@media (max-width: 900px) {
  .sleepwell-theme .footer-inner,
  .sleepwell-theme .sw-source-grid,
  .sleepwell-theme .sw-contact-grid {
    grid-template-columns: 1fr !important;
  }

  .sleepwell-theme .footer-inner {
    gap: 30px !important;
  }
}


/* V12 citations page and footer balance */
.sleepwell-theme .footer-inner {
  grid-template-columns: minmax(300px, 1.6fr) repeat(3, minmax(150px, 0.85fr)) !important;
  gap: clamp(36px, 5vw, 72px) !important;
}

.sleepwell-theme .sw-citation-list {
  display: grid;
  gap: 18px;
  max-width: 1040px;
  margin: 0 auto;
}

.sleepwell-theme .sw-citation-item {
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(36,48,74,0.08);
  border-radius: 24px;
  padding: 24px 28px;
  box-shadow: 0 14px 44px rgba(23,32,51,0.06);
}

.sleepwell-theme .sw-citation-item h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: var(--sw-midnight);
}

.sleepwell-theme .sw-citation-item p {
  margin: 0 0 12px;
  color: var(--sw-muted);
  line-height: 1.65;
}

.sleepwell-theme .sw-citation-item a {
  color: var(--sw-moss);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sleepwell-theme .sw-small-note {
  max-width: 900px;
  margin: 28px auto 0;
  color: var(--sw-muted);
  line-height: 1.7;
  font-size: 1rem;
}


/* V13 footer balance and clearer citation links */
.sleepwell-theme .footer-inner {
  grid-template-columns: minmax(320px, 1.55fr) minmax(190px, 0.9fr) minmax(190px, 0.9fr) minmax(170px, 0.8fr) !important;
  gap: clamp(44px, 6vw, 82px) !important;
}

.sleepwell-theme .sw-citation-list {
  margin-top: 28px;
}

.sleepwell-theme .sw-citation-item {
  position: relative;
}

.sleepwell-theme .sw-citation-item a.sw-source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sw-peach), var(--sw-rose));
  color: var(--sw-midnight) !important;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 12px 28px rgba(214, 145, 154, 0.22);
}

.sleepwell-theme .sw-citation-item a.sw-source-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(214, 145, 154, 0.28);
}

.sleepwell-theme .sw-citation-intro {
  max-width: 900px;
  margin: 0 auto 24px;
  color: var(--sw-muted);
  line-height: 1.7;
  font-size: 1.06rem;
}

@media (max-width: 900px) {
  .sleepwell-theme .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}


/* V14 final footer alignment and citation click behavior */
.sleepwell-theme .footer-inner {
  grid-template-columns: minmax(330px, 1.45fr) minmax(210px, 0.95fr) minmax(210px, 1.05fr) minmax(170px, 0.8fr) !important;
  column-gap: clamp(34px, 4.5vw, 64px) !important;
}

.sleepwell-theme .footer-inner > div:nth-child(3) {
  transform: translateX(18px);
}

.sleepwell-theme .footer-inner > div:nth-child(4) {
  transform: translateX(6px);
}

.sleepwell-theme .sw-citation-item a.sw-source-button,
.sleepwell-theme .sw-citation-item button.sw-source-button {
  cursor: pointer !important;
  pointer-events: auto !important;
  border: 0;
  font-family: inherit;
  font-size: 1rem;
}

.sleepwell-theme .sw-citation-item a.sw-source-button::after,
.sleepwell-theme .sw-citation-item button.sw-source-button::after {
  content: " ↗";
  font-weight: 900;
}

@media (max-width: 900px) {
  .sleepwell-theme .footer-inner > div:nth-child(3),
  .sleepwell-theme .footer-inner > div:nth-child(4) {
    transform: none;
  }
}
