:root {
  --ink: #1f2426;
  --muted: #5b6468;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --line: #d8d2c6;
  --sage: #3f5f56;
  --rose: #8e4f58;
  --clay: #9f6744;
  --blue: #334f5f;
  --soft-green: #edf1eb;
  --soft-rose: #f1ece7;
  --soft-blue: #e8edf0;
  --shadow: 0 18px 38px rgba(31, 36, 38, 0.08);
  --shadow-soft: 0 8px 22px rgba(31, 36, 38, 0.055);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(247, 245, 240, 0) 420px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 240, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #172022;
  font-weight: 850;
  line-height: 0;
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 42px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 22px;
  font-size: 0.94rem;
  color: var(--muted);
}

.nav a,
.footer a {
  text-decoration-color: rgba(63, 95, 86, 0.36);
  text-underline-offset: 4px;
}

.hero {
  min-height: calc(100vh - 66px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(44px, 7vw, 96px) clamp(18px, 6vw, 92px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--sage);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  font-size: clamp(3rem, 8vw, 7rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 650;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 650;
}

h3 {
  font-size: 1.22rem;
  font-weight: 820;
}

p {
  margin: 14px 0 0;
}

.hero p {
  max-width: 690px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button.primary {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.button.ghost {
  background: var(--surface);
}

.button:hover {
  transform: translateY(-1px);
}

.hero-visual {
  min-height: 520px;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 18px;
}

.lipedema-spiral {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 1;
}

.spiral-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 0 28%, transparent 29%),
    conic-gradient(from -88deg, rgba(63, 95, 86, 0.08), rgba(63, 95, 86, 0.42), rgba(91, 111, 122, 0.18), rgba(63, 95, 86, 0.08));
  border: 1px solid rgba(63, 95, 86, 0.22);
  box-shadow: inset 0 0 0 24px rgba(255, 255, 255, 0.55), var(--shadow-soft);
}

.spiral-ring::after {
  content: "";
  position: absolute;
  right: 11%;
  top: 18%;
  width: 0;
  height: 0;
  border-left: 18px solid var(--sage);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  transform: rotate(18deg);
}

.spiral-core {
  position: absolute;
  inset: 35%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.spiral-core img {
  width: min(78%, 138px);
  height: auto;
  display: block;
}

.spiral-steps {
  position: absolute;
  inset: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.spiral-step {
  position: absolute;
  width: 172px;
  min-height: 96px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 2px 10px;
  align-items: start;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.spiral-step span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
}

.spiral-step strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.1;
}

.spiral-step small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.step-1 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.step-2 {
  top: 15%;
  right: 0;
}

.step-3 {
  top: 42%;
  right: 2%;
}

.step-4 {
  bottom: 4%;
  right: 18%;
}

.step-5 {
  bottom: 4%;
  left: 18%;
}

.step-6 {
  top: 42%;
  left: 2%;
}

.step-7 {
  top: 15%;
  left: 0;
}

.section,
.model,
.model-spiral-section,
.page-hero,
.article {
  padding: clamp(42px, 7vw, 92px) clamp(18px, 6vw, 92px);
}

.note {
  align-self: start;
  padding: 20px;
  background: #eef1f0;
  border: 1px solid #d5ddd9;
  border-radius: 8px;
  color: #344145;
}

.note strong {
  display: block;
  margin-bottom: 8px;
}

.hero-note {
  width: min(560px, 100%);
  margin: 0;
}

.model-spiral-section {
  display: grid;
  place-items: center;
  background: var(--background);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 32px;
}

.section-heading p {
  color: var(--muted);
  font-size: 1.08rem;
}

.subsection-heading {
  max-width: 820px;
  margin: 30px 0 16px;
}

.subsection-heading h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.subsection-heading p {
  margin: 0;
  color: var(--muted);
}

.detection-group {
  margin-bottom: 34px;
}

.muted {
  background: #eef1eb;
  border-block: 1px solid #d7ddd2;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card,
.feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 12px 14px;
  min-height: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover,
.feature:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 95, 86, 0.48);
  box-shadow: 0 14px 30px rgba(31, 36, 38, 0.075);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0;
  background: #eef1f0;
  border-radius: 50%;
  color: var(--blue);
  font-weight: 900;
  font-size: 0.8rem;
}

.card .icon,
.feature .icon {
  grid-column: 1;
  grid-row: 1;
}

.card h3,
.feature h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
}

.card p,
.feature p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  min-height: 0;
}

.feature.feature-highlight {
  background: linear-gradient(135deg, #e5f4eb 0%, #f4fbf6 100%);
  border-color: #3f7f5c;
  box-shadow: 0 18px 36px rgba(42, 103, 76, 0.18);
}

.feature.feature-highlight:hover {
  border-color: #2d6848;
  box-shadow: 0 20px 42px rgba(42, 103, 76, 0.24);
}

.feature.feature-highlight .icon {
  width: 48px;
  height: 48px;
  background: #2f704f;
  color: #f5fff8;
  font-size: 0.72rem;
}

.treatment-mode {
  margin: 30px 0 44px;
  padding: clamp(22px, 4vw, 34px);
  background: #f7f8f5;
  border: 1px solid #dce2dc;
  border-left: 6px solid #536f65;
  border-radius: 12px;
}

.treatment-mode > .subsection-heading {
  margin-top: 0;
}

.treatment-mode .category-guide {
  margin-bottom: 24px;
  box-shadow: none;
}

.treatment-mode > .feature-list {
  margin: 0 0 28px;
}

.treatment-mode > .feature-list .feature {
  grid-column: 1 / -1;
}

.treatment-subsections {
  display: grid;
  gap: 26px;
  margin: 26px 0 0;
}

.treatment-subsection {
  --section-accent: #6c7f78;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 30px);
  background: #f5f6f4;
  border: 1px solid #d9dfda;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(31, 36, 38, 0.055);
}

.treatment-subsection::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--section-accent);
}

.treatment-subsection .subsection-heading {
  margin: 0 0 18px;
}

.treatment-subsection .subsection-heading h3 {
  color: #20282a;
}

.treatment-subsection .feature {
  background: rgba(255, 255, 255, 0.86);
}

.treatment-subsection.is-lymph {
  --section-accent: #47786d;
  background: #eef5f3;
  border-color: #d3e2dd;
}

.treatment-subsection.is-nutrition {
  --section-accent: #8a7b3f;
  background: #f5f2e5;
  border-color: #e3dcc3;
}

.treatment-subsection.is-fibrosis {
  --section-accent: #9a6a4c;
  background: #f5eee9;
  border-color: #e4d4ca;
}

.treatment-subsection.is-supplementation {
  --section-accent: #75648b;
  background: #f2eef5;
  border-color: #ded5e5;
}

.category-guide {
  margin: 0 0 18px;
  padding: 18px 20px 18px 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.category-guide li + li {
  margin-top: 4px;
}

.feature-labels,
.page-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.feature-label {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.tier-predisposition {
  background: #edf3ef;
  color: #315545;
  border-color: #d6e3da;
}

.tier-trigger {
  background: #f2ebe5;
  color: #7e513b;
  border-color: #e3d5ca;
}

.tier-mechanism {
  background: #e9eef2;
  color: #304f68;
  border-color: #d4dee6;
}

.tier-amplifier {
  background: #f2eee2;
  color: #6d5b2b;
  border-color: #e2dac3;
}

.target-lymph {
  background: #e8f1ef;
  color: #28574f;
  border-color: #cfe0dc;
}

.target-fibrosis {
  background: #f1ece6;
  color: #71523d;
  border-color: #dfd2c5;
}

.target-vessels {
  background: #eaf0f5;
  color: #2d506d;
  border-color: #d3dde6;
}

.target-metabolic {
  background: #eef0e7;
  color: #53602e;
  border-color: #dbe0ca;
}

.target-hormonal {
  background: #f3e9ee;
  color: #77465d;
  border-color: #e2ced8;
}

.target-fat {
  background: #eee9f3;
  color: #59486f;
  border-color: #d9cfe4;
}

.target-function {
  background: #f2eee2;
  color: #685a2d;
  border-color: #dfd6bd;
}

.target-evidence {
  background: #edf0f0;
  color: #475254;
  border-color: #d8dddd;
}

.page-category-box {
  margin: 0 0 22px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.page-category-box strong {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--ink);
}

.factor-tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 10px;
}

.factor-tier-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.factor-tier-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
}

.factor-tier-card p {
  margin: 0;
}

.factor-tier-card a {
  color: var(--sage);
  font-weight: 700;
}

.model {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: 42px;
  align-items: center;
}

.model-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.cycle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cycle li {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.cycle span {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 28px clamp(18px, 6vw, 92px);
  background: #1e2728;
  color: #f2efe8;
}

.footer p {
  margin: 0;
}

.page-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(238, 241, 235, 0.88)),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.page-hero.has-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}

.page-hero.has-summary > :not(.hero-summary) {
  grid-column: 1;
}

.breadcrumbs {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs a {
  text-underline-offset: 4px;
}

.page-hero h1 {
  max-width: 1000px;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
}

.page-hero p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.16rem;
}

.page-hero .page-category-tags {
  max-width: 820px;
  margin-top: 20px;
}

.article {
  display: grid;
  grid-template-columns: minmax(0, 920px) minmax(220px, 300px);
  gap: clamp(36px, 6vw, 104px);
  align-items: start;
}

.article-body h2 {
  margin-top: 42px;
  font-size: clamp(1.55rem, 2.6vw, 2.6rem);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: #3c4244;
  font-size: 1.04rem;
}

.article-body :where(p, li) strong,
.article-body :where(p, li) b {
  color: #1d2527;
  font-weight: 850;
}

.article-body :where(p, li) a:not(.button) {
  color: #294f45;
  font-weight: 780;
  text-decoration-color: rgba(63, 95, 86, 0.42);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-body :where(p, li) a:not(.button):hover {
  color: #173a32;
  text-decoration-color: rgba(63, 95, 86, 0.78);
}

.article-body ul {
  padding-left: 20px;
}

.expandable-block {
  margin: 22px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.expandable-block summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 850;
  color: var(--ink);
  background: #f8f7f4;
  list-style: none;
}

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

.expandable-block summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  margin-right: 8px;
  color: var(--sage);
  font-weight: 900;
}

.expandable-block[open] summary::before {
  content: "-";
}

.table-wrap {
  width: 100%;
  margin: 0;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.article-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.article-table th,
.article-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: #f5f4f0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

.article-table td {
  color: #3c4244;
  font-size: 0.96rem;
  line-height: 1.48;
}

.article-table tr:last-child td {
  border-bottom: 0;
}

.article-table strong {
  color: var(--ink);
  font-weight: 880;
}

.term-list {
  padding: 18px 20px;
  background: #f8f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.term-list li + li {
  margin-top: 10px;
}

.term-list strong {
  color: #243f38;
  font-weight: 900;
}

.factor-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.factor-links li {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.factor-links a {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--sage);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.side-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
  background: #f4f1eb;
  border: 1px solid #ded6ca;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.hero-summary {
  grid-column: 2;
  grid-row: 1 / span 6;
  position: sticky;
  top: 94px;
  max-height: min(420px, calc(100vh - 124px));
  overflow: auto;
}

.side-panel h2 {
  font-size: 1.25rem;
}

.side-panel ul {
  padding-left: 20px;
}

.side-panel li {
  color: #303638;
  font-weight: 650;
}

.side-panel li + li {
  margin-top: 8px;
}

.toc-panel {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 22px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.toc-panel h2 {
  font-size: 1.25rem;
}

.toc-panel ol {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.toc-panel li + li {
  margin-top: 8px;
}

.toc-panel a {
  display: block;
  color: #303638;
  font-size: 0.96rem;
  font-weight: 720;
  line-height: 1.35;
  text-decoration-color: rgba(63, 95, 86, 0.32);
  text-underline-offset: 3px;
}

.toc-panel a:hover {
  color: #173a32;
  text-decoration-color: rgba(63, 95, 86, 0.78);
}

.toc-subitem {
  padding-left: 14px;
}

.toc-subitem a {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 650;
}

.page-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 42px;
}

.page-links a {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease;
}

.page-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 95, 86, 0.45);
}

@media (max-width: 980px) {
  .hero,
  .model,
  .article {
    grid-template-columns: 1fr;
  }

  .page-hero.has-summary {
    grid-template-columns: 1fr;
  }

  .page-hero.has-summary > :not(.hero-summary),
  .hero-summary {
    grid-column: 1;
  }

  .hero-summary {
    grid-row: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 420px;
  }

  .card-grid,
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    position: static;
  }

  .toc-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero-visual {
    min-height: 320px;
  }

  .lipedema-spiral {
    aspect-ratio: auto;
  }

  .spiral-ring {
    display: none;
  }

  .spiral-core {
    position: static;
    min-height: 132px;
    margin-bottom: 12px;
    padding: 18px;
    border-radius: 8px;
  }

  .spiral-steps {
    position: static;
    display: grid;
    gap: 10px;
  }

  .spiral-step,
  .step-1,
  .step-2,
  .step-3,
  .step-4,
  .step-5,
  .step-6,
  .step-7 {
    position: static;
    width: 100%;
    min-height: auto;
    transform: none;
  }

  .card-grid,
  .feature-list,
  .factor-tier-grid,
  .factor-links,
  .cycle,
  .page-links {
    grid-template-columns: 1fr;
  }

  .card,
  .feature {
    min-height: auto;
  }
}
