/* ============================================================
   The Neuropathy Compass — neuropathycompass.com
   Editorial design system. Palette: paper cream, deep navy,
   pine teal, compass copper. Type: Fraunces + Inter.
   ============================================================ */

:root {
  --paper: #FAF7F2;
  --paper-deep: #F3EDE3;
  --sand: #EFE7DA;
  --line: #E2D9C8;
  --ink: #1E2A38;
  --ink-soft: #43536A;
  --ink-faint: #6E7B8F;
  --teal: #2F6E6A;
  --teal-deep: #24534F;
  --teal-tint: #E6EFEA;
  --copper: #B07D3C;
  --copper-deep: #8F6127;
  --copper-tint: #F6EBDA;
  --white: #FFFFFF;
  --shadow: 0 1px 2px rgba(30, 42, 56, .06), 0 8px 24px rgba(30, 42, 56, .07);
  --shadow-lift: 0 2px 4px rgba(30, 42, 56, .08), 0 16px 40px rgba(30, 42, 56, .12);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg { width: 40px; height: 40px; flex-shrink: 0; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.28rem;
  letter-spacing: .01em;
  line-height: 1.15;
}

.brand-name span { color: var(--copper); }

.brand-tag {
  display: block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .15rem;
}

.site-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--teal-deep);
  border-bottom-color: var(--copper);
}

.nav-start {
  background: var(--teal);
  color: var(--white) !important;
  padding: .45rem 1.05rem !important;
  border-radius: 999px;
  border-bottom: none !important;
}

.nav-start:hover { background: var(--teal-deep); }

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,42,56,.05) 20%, rgba(30,42,56,.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 2rem 4.5rem;
  width: 100%;
  color: var(--white);
}

.hero-kicker {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #EAD9BC;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 1.12;
  max-width: 17ch;
  margin-bottom: 1.2rem;
}

.hero p {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  max-width: 52ch;
  color: #E9E4DB;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  background: var(--copper);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: background .15s ease, transform .15s ease;
}

.btn:hover { background: var(--copper-deep); color: var(--white); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.65);
  margin-left: .8rem;
}

.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Sections ---------- */

.section { max-width: 1240px; margin: 0 auto; padding: 4.5rem 2rem; }

.section-kicker {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: .6rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.18;
  max-width: 26ch;
  margin-bottom: 1rem;
}

.section-intro { max-width: 62ch; color: var(--ink-soft); margin-bottom: 2.5rem; }

/* Card grid (home) */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.card img { height: 210px; width: 100%; object-fit: cover; }

.card-body { padding: 1.5rem 1.6rem 1.7rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }

.card-cat {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
}

.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.3; }

.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--teal-deep); }

.card p { font-size: .95rem; color: var(--ink-soft); }

.card-more {
  margin-top: auto;
  font-weight: 600;
  font-size: .9rem;
  color: var(--copper-deep);
  text-decoration: none;
}

.card-more:hover { color: var(--copper); }

.card-soon { opacity: .75; }
.card-soon .card-cat { color: var(--ink-faint); }

/* Mission strip */

.strip {
  background: var(--ink);
  color: #EDE7DC;
}

.strip .section { padding: 4rem 2rem; }

.strip .section-title { color: var(--white); }

.strip p { max-width: 68ch; color: #C9CDD6; }

.strip a { color: #EAD9BC; }

/* ---------- Article layout ---------- */

.article-hero { max-width: 1240px; margin: 0 auto; padding: 3rem 2rem 0; }

.breadcrumb { font-size: .85rem; color: var(--ink-faint); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal); }

.article-cat {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: .8rem;
}

h1.article-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.14;
  max-width: 24ch;
  margin-bottom: 1.1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .9rem;
  color: var(--ink-faint);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.article-meta .avatar { width: 42px; height: 42px; border-radius: 50%; }

.article-meta strong { color: var(--ink); font-weight: 600; }

.article-figure { margin: 0 0 2.5rem; }

.article-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-figure figcaption { font-size: .82rem; color: var(--ink-faint); margin-top: .6rem; }

.article-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem 4.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 3.5rem;
  align-items: start;
}

.article-body { max-width: 720px; min-width: 0; }

.article-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 2.6rem 0 1rem;
  scroll-margin-top: 90px;
}

.article-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 1.9rem 0 .7rem;
}

.article-body p { margin-bottom: 1.15rem; }

.article-body ul, .article-body ol { margin: 0 0 1.3rem 1.4rem; }

.article-body li { margin-bottom: .55rem; }

.article-body figure { margin: 2rem 0; }

.article-body figure img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; max-height: 440px; }

.article-body figcaption { font-size: .82rem; color: var(--ink-faint); margin-top: .6rem; }

.article-body strong { font-weight: 600; }

/* Quick-answer block (answer-block for AI/featured snippets) */

.quick-answer {
  background: var(--teal-tint);
  border: 1px solid #CBDDD3;
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.2rem;
}

.quick-answer .qa-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: .55rem;
}

.quick-answer p { margin: 0; font-size: 1.05rem; }

/* Compass point (internal CTA box) */

.compass-point {
  background: var(--copper-tint);
  border: 1px solid #E8D5B5;
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 2.2rem 0;
}

.compass-point .cp-label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: .5rem;
}

.compass-point p { margin: 0; font-size: .98rem; }

/* Data callout */

.stat-callout {
  border-left: 4px solid var(--copper);
  padding: .4rem 0 .4rem 1.3rem;
  margin: 1.8rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
}

.stat-callout cite { display: block; font-family: var(--font-body); font-style: normal; font-size: .85rem; color: var(--ink-faint); margin-top: .5rem; }

/* Warning / see a doctor box */

.doctor-box {
  background: #FBF1EC;
  border: 1px solid #EDD3C6;
  border-left: 5px solid #C05B3C;
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2.2rem 0;
}

.doctor-box .db-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #A2482D;
  margin-bottom: .55rem;
}

.doctor-box p, .doctor-box ul { font-size: .98rem; margin-bottom: .6rem; }
.doctor-box ul { margin-left: 1.3rem; }
.doctor-box :last-child { margin-bottom: 0; }

/* FAQ */

.faq { margin-top: 1rem; }

.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.05rem 1.3rem;
  margin-bottom: .8rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: .2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--copper);
}

.faq details[open] summary::after { content: "–"; }

.faq details p { margin: .8rem 0 0; font-size: .98rem; color: var(--ink-soft); }

/* Sources */

.sources {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--ink-soft);
}

.sources h2 { font-size: 1.1rem !important; margin: 0 0 .8rem !important; }

.sources ol { margin-left: 1.2rem; }
.sources li { margin-bottom: .4rem; overflow-wrap: anywhere; }

/* Author box (E-E-A-T) */

.author-box {
  display: flex;
  gap: 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-top: 2.5rem;
  box-shadow: var(--shadow);
}

.author-box img { width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0; }

.author-box h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .3rem; }

.author-box p { font-size: .92rem; color: var(--ink-soft); margin-bottom: .4rem; }

.author-box .ymyl { font-size: .84rem; color: var(--ink-faint); font-style: italic; }

/* ---------- Sidebar ---------- */

.sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 1.6rem; }

.side-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.side-card h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: .9rem;
}

.side-author { text-align: center; }

.side-author img { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto .8rem; }

.side-author .sa-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }

.side-author .sa-role { font-size: .82rem; color: var(--ink-faint); margin-bottom: .7rem; }

.side-author p { font-size: .88rem; color: var(--ink-soft); text-align: left; }

.side-author a { font-size: .88rem; font-weight: 600; }

.toc ol { margin-left: 1.1rem; font-size: .9rem; }
.toc li { margin-bottom: .5rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--teal-deep); text-decoration: underline; }

.side-cta { background: var(--ink); border: none; color: #EDE7DC; }
.side-cta h4 { color: #EAD9BC; }
.side-cta p { font-size: .92rem; color: #C9CDD6; margin-bottom: 1rem; }
.side-cta .btn { font-size: .9rem; padding: .65rem 1.4rem; }

.side-note { font-size: .82rem; color: var(--ink-faint); }
.side-note a { color: var(--teal); }

/* ---------- About page ---------- */

.about-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3.5rem;
  align-items: center;
}

.about-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.14;
  margin: .6rem 0 1.2rem;
}

.about-hero p { color: var(--ink-soft); margin-bottom: 1rem; }

.about-portrait { text-align: center; }

.about-portrait img.about-avatar {
  width: min(260px, 60vw);
  height: auto;
  border-radius: 50%;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-lift);
}

.about-portrait figcaption { font-size: .85rem; color: var(--ink-faint); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.value-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: .5rem; }
.value-card p { font-size: .93rem; color: var(--ink-soft); }

/* ---------- Legal / plain pages ---------- */

.plain { max-width: 780px; margin: 0 auto; padding: 3.5rem 2rem 4.5rem; }

.plain h1 { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; margin-bottom: 1.4rem; }

.plain h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 2rem 0 .7rem; }

.plain p, .plain ul { margin-bottom: 1rem; color: var(--ink-soft); }

.plain ul { margin-left: 1.4rem; }

.plain .updated { font-size: .85rem; color: var(--ink-faint); margin-bottom: 2rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #B9C0CC; margin-top: 2rem; }

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand { display: flex; align-items: flex-start; gap: .7rem; color: var(--white); text-decoration: none; }

.footer-brand svg { width: 34px; height: 34px; }

.footer-brand .brand-name { font-size: 1.15rem; color: var(--white); }

.footer-col p { font-size: .88rem; margin-top: 1rem; max-width: 38ch; }

.footer-col h4 {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #EAD9BC;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: .55rem; }

.footer-col a { color: #B9C0CC; text-decoration: none; font-size: .92rem; }

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1.4rem 2rem 2rem;
  text-align: center;
  font-size: .8rem;
  color: #8A93A3;
}

.footer-bottom .medical {
  max-width: 860px;
  margin: 0 auto .8rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .article-shell { grid-template-columns: 1fr; gap: 2.5rem; }
  .sidebar { position: static; }
  .article-body { max-width: 100%; }
  .about-hero { grid-template-columns: 1fr; gap: 2rem; }
  .about-portrait { order: -1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { padding: .8rem 1.2rem; justify-content: center; text-align: center; }
  .site-nav { justify-content: center; gap: 1rem; }
  .hero { min-height: 66vh; }
  .hero-content, .section, .article-hero, .article-shell, .about-hero, .plain { padding-left: 1.2rem; padding-right: 1.2rem; }
  .btn-ghost { margin-left: 0; margin-top: .8rem; }
  .footer-inner { grid-template-columns: 1fr; padding: 2.5rem 1.2rem 2rem; }
  .author-box { flex-direction: column; }
}
