/* CureSnore — evidence-based snoring information
   Design: clinical-clean, fast, zero external requests */

:root {
  --navy: #14324e;
  --navy-dark: #0d2337;
  --teal: #0f766e;
  --teal-dark: #0b5d57;
  --teal-tint: #e7f4f2;
  --ink: #24313f;
  --ink-soft: #4a5a6a;
  --line: #dde5ec;
  --bg: #ffffff;
  --bg-soft: #f5f8fa;
  --amber-tint: #fdf3e3;
  --amber-line: #e8c98a;
  --red-tint: #fbeeee;
  --red-line: #d9a0a0;
  --max: 1080px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cfe0ee;
  font-size: 0.82rem;
  text-align: center;
  padding: 0.35rem 1rem;
  letter-spacing: 0.02em;
}
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--teal);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span { color: #7fd1c8; }
.site-tag {
  font-size: 0.85rem;
  color: #b8cddd;
}
.site-nav {
  background: var(--navy);
}
.site-nav ul {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}
.site-nav a {
  display: block;
  padding: 0.65rem 0.9rem;
  color: #e4edf5;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="true"] {
  color: #fff;
  border-bottom-color: #7fd1c8;
  background: rgba(255,255,255,0.06);
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
main { display: block; }

.breadcrumb {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin: 1.1rem 0 0;
}
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin: 0 0.45rem; color: #9db0c0; }
.breadcrumb a { color: var(--teal); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Article ---------- */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 900px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}
article.post { max-width: 46rem; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }
h1 { font-size: 2.15rem; margin: 1.2rem 0 0.4rem; }
h2 { font-size: 1.55rem; margin-top: 2.4rem; padding-top: 0.4rem; }
h3 { font-size: 1.2rem; margin-top: 1.8rem; }
article.post h2 { border-top: 1px solid var(--line); padding-top: 1.4rem; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.6rem 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--line);
}
.badge {
  display: inline-block;
  background: var(--teal-tint);
  color: var(--teal-dark);
  border: 1px solid #bcded9;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 1.2rem;
  border-left: 4px solid var(--teal);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-style: italic;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
th, td { border: 1px solid var(--line); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); font-family: var(--sans); color: var(--navy); }
tr:nth-child(even) td { background: #fafcfd; }

/* callout boxes */
.key-points, .evidence-box {
  background: var(--teal-tint);
  border: 1px solid #bcded9;
  border-left: 5px solid var(--teal);
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
}
.key-points h2, .key-points h3, .key-points p.box-title {
  margin: 0 0 0.6rem; font-size: 1.02rem; font-family: var(--sans); font-weight: 700;
  color: var(--teal-dark); border: 0; padding: 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.key-points ul { margin-bottom: 0; }

.warning-box {
  background: var(--amber-tint);
  border: 1px solid var(--amber-line);
  border-left: 5px solid #c99136;
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
}
.warning-box p.box-title {
  margin: 0 0 0.6rem; font-size: 1.02rem; font-weight: 700; color: #8a5d13;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.danger-box {
  background: var(--red-tint);
  border: 1px solid var(--red-line);
  border-left: 5px solid #b04a4a;
  border-radius: 6px;
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
}
.danger-box p.box-title {
  margin: 0 0 0.6rem; font-size: 1.02rem; font-weight: 700; color: #8f2f2f;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* verdict labels for evidence ratings */
.verdict { font-weight: 700; padding: 0.1rem 0.55rem; border-radius: 4px; font-size: 0.85rem; white-space: nowrap; }
.verdict.strong { background: #e2f2e5; color: #1e6b34; }
.verdict.moderate { background: #e7f0f9; color: #23527c; }
.verdict.weak { background: var(--amber-tint); color: #8a5d13; }
.verdict.none { background: var(--red-tint); color: #8f2f2f; }

/* references */
.references {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--line);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.references h2 { font-size: 1.15rem; border: 0; padding-top: 0; }
.references ol { padding-left: 1.3rem; }
.references li { margin-bottom: 0.5rem; overflow-wrap: break-word; }

sup.ref a { text-decoration: none; font-weight: 600; font-size: 0.78em; }

/* ---------- Sidebar ---------- */
.sidebar { font-size: 0.92rem; }
.sidebar-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.4rem;
}
.sidebar-block h2 {
  font-size: 0.95rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  margin: 0 0 0.7rem;
}
.sidebar-block ul { list-style: none; padding: 0; margin: 0; }
.sidebar-block li { margin: 0 0 0.55rem; padding-left: 0.9rem; position: relative; }
.sidebar-block li::before { content: "›"; position: absolute; left: 0; color: var(--teal); }
.sidebar-block a { text-decoration: none; }
.sidebar-block a:hover { text-decoration: underline; }
.sidebar-note { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- Home ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 70%);
  color: #fff;
  padding: 3.2rem 0 3.4rem;
}
.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin: 0 0 0.8rem;
  max-width: 40rem;
}
.hero p.lead {
  font-size: 1.18rem;
  color: #c9dae8;
  max-width: 40rem;
  margin: 0 0 1.6rem;
}
.hero .cta {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  margin-right: 0.8rem;
}
.hero .cta:hover { background: var(--teal-dark); }
.hero .cta.ghost { background: transparent; border: 2px solid #5b7a94; }
.hero .cta.ghost:hover { border-color: #7fd1c8; background: rgba(255,255,255,0.05); }

.trust-strip {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.trust-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.4rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  color: var(--ink-soft);
}
.trust-strip strong { color: var(--navy); }

.section-head { margin: 2.8rem 0 1.2rem; }
.section-head h2 { margin: 0 0 0.3rem; font-size: 1.7rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

.card-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin-bottom: 1rem;
}
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem 1.3rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(20, 50, 78, 0.1); transform: translateY(-2px); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.12rem; }
.card h3 a { text-decoration: none; color: var(--navy); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }
.card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.card .card-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--teal-dark);
  margin-bottom: 0.4rem;
}

.home-note {
  background: var(--teal-tint);
  border: 1px solid #bcded9;
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  margin: 2.6rem 0;
}
.home-note h2 { margin-top: 0; font-size: 1.3rem; }
.home-note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3.5rem;
  background: var(--navy-dark);
  color: #b8cddd;
  font-size: 0.88rem;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 1.4rem;
  display: grid;
  gap: 1.8rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer h2 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #cfe0ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-disclaimer {
  border-top: 1px solid #2a4763;
  padding: 1.2rem 1.25rem 1.8rem;
  max-width: var(--max);
  margin: 0 auto;
  color: #8fa9c0;
  font-size: 0.8rem;
}

/* ---------- misc ---------- */
.updated-note { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }
.center { text-align: center; }

@media (max-width: 600px) {
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 1.9rem; }
  body { font-size: 1rem; }
}

@media print {
  .site-header, .site-nav, .site-footer, .sidebar, .topbar { display: none; }
}
