:root {
  --bg: #f6f6f5;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #565654;
  --ink-faint: #8a8a86;
  --line: #e2e2dd;
  --line-strong: #d3d3cc;
  --accent: #7a2231;
  --accent-tint: #f0e6e7;
  --maxw: 1320px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.25; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-sub { font-size: 12.5px; color: var(--ink-faint); }

.search-wrap { flex: 1; display: flex; justify-content: flex-end; }
#search {
  width: min(280px, 100%);
  padding: 8px 2px;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s;
}
#search::placeholder { color: var(--ink-faint); }
#search:focus { outline: none; border-bottom-color: var(--accent); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: var(--maxw);
  margin: 0 auto;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  max-height: calc(100vh - 74px);
  overflow-y: auto;
  padding: 34px 20px 60px 6px;
}
.nav-group { margin-bottom: 26px; }
.nav-group h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-weight: 500;
  margin: 0 0 10px;
}
.nav-link {
  display: block;
  padding: 4px 0;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 14.5px;
  transition: color .12s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-home { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-bottom: 26px; }
.nav-home:hover { color: var(--ink); }
.nav-home.active { color: var(--accent); }

.content {
  padding: 40px clamp(16px, 4vw, 56px) 90px;
  border-left: 1px solid var(--line);
  min-height: 80vh;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin: 0 0 18px;
}
.eyebrow .num { color: var(--accent); font-weight: 500; }

/* ---------- Hero / home ---------- */
.hero { max-width: 720px; margin-bottom: 20px; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(38px, 6.5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.hero .lede { font-size: 20px; color: var(--ink); margin: 0 0 14px; line-height: 1.5; }
.hero p { font-size: 17px; color: var(--ink-soft); margin: 0 0 12px; }

.cat-block { padding-top: 46px; margin-top: 46px; border-top: 1px solid var(--line); }
.cat-block:first-of-type { border-top: none; }
.cat-head { max-width: 640px; margin-bottom: 30px; }
.cat-head h2 {
  font-weight: 800;
  font-size: clamp(24px, 3.5vw, 34px);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  line-height: 1.1;
}
.cat-head p { color: var(--ink-soft); font-size: 16px; margin: 0; }

/* ---------- Card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 26px;
  background: var(--bg);
  text-decoration: none;
  color: var(--ink);
  transition: background .14s;
  min-height: 140px;
}
.card:hover { background: var(--paper); }
.card .card-eyebrow {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint);
}
.card .card-symbol { color: var(--accent); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 13px; }
.card h4 { margin: 2px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.card p { margin: 0; font-size: 14px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Detail ---------- */
.detail { max-width: 760px; }
.breadcrumb {
  display: inline-block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-faint); text-decoration: none; margin-bottom: 30px;
}
.breadcrumb:hover { color: var(--accent); }

.detail-head { margin-bottom: 8px; }
.detail-head .cat-pill {
  display: inline-block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-faint); margin-bottom: 16px;
}
.detail-head .cat-pill .sym { color: var(--accent); font-weight: 600; }
.detail-head h1 {
  font-weight: 800;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}
.detail-head h1 .latin { font-weight: 400; font-size: 0.42em; color: var(--ink-faint); letter-spacing: 0; vertical-align: middle; }
.detail-head .tagline { color: var(--ink-soft); font-size: 20px; line-height: 1.45; margin: 0; max-width: 640px; }

/* quick stats */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid var(--line);
  margin: 40px 0 10px;
}
.stat { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); }
.stat .v { font-size: 18px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.stat .v small { font-weight: 400; font-size: 13px; color: var(--ink-soft); }

/* sections */
.detail-section { padding-top: 40px; margin-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.detail-section > h2 {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.detail-section p { margin: 0 0 14px; font-size: 16.5px; color: var(--ink); line-height: 1.62; }
.detail-section p:last-child { margin-bottom: 0; }
.detail-section strong { font-weight: 600; }
.detail-section em { font-style: normal; font-weight: 600; color: var(--accent); }

.body-list { list-style: none; padding: 0; margin: 0; }
.body-list li {
  position: relative;
  padding: 14px 0 14px 22px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.55;
}
.body-list li:first-child { border-top: none; padding-top: 4px; }
.body-list li::before {
  content: "";
  position: absolute; left: 2px; top: 22px;
  width: 5px; height: 5px; background: var(--accent);
}
.body-list li:first-child::before { top: 12px; }

/* signs */
.sign-list { display: block; }
.sign {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
}
.sign:first-child { border-top: none; }
.sign .badge {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint); padding-top: 2px;
}
.sign.excess .badge { color: var(--accent); }
.sign.good .badge { color: var(--ink); }
.sign b { font-weight: 600; }

.callout {
  padding: 20px 22px;
  border-left: 2px solid var(--accent);
  background: var(--paper);
  font-size: 16px; color: var(--ink-soft); line-height: 1.6;
  margin: 22px 0 0;
}
.callout.warn { border-left-color: var(--accent); background: var(--accent-tint); color: var(--ink); }
.callout strong { color: var(--ink); }

/* flow */
.flow { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 4px 0; }
.flow-step { background: var(--bg); padding: 16px 18px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: baseline; }
.flow-step .n { color: var(--accent); font-weight: 700; font-size: 14px; }
.flow-step b { font-size: 16px; font-weight: 600; }
.flow-step span { display: block; color: var(--ink-soft); font-size: 15px; line-height: 1.5; margin-top: 3px; }

.sec-note { color: var(--ink-faint); font-size: 14.5px; margin-top: 14px; line-height: 1.55; }

/* related */
.related-row { font-size: 16px; line-height: 1.9; color: var(--ink-soft); }
.related-row a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.related-row a:hover { border-bottom-color: var(--accent); color: var(--accent); }
.related-row .sep { color: var(--line-strong); margin: 0 10px; }

/* internal links */
a.ilink { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
a.ilink:hover { border-bottom-color: var(--accent); color: var(--accent); }

.empty { padding: 80px 0; color: var(--ink-faint); }
.empty h2 { font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.empty a { color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px clamp(16px, 4vw, 56px) 60px; }
.foot-note { font-size: 13px; color: var(--ink-faint); max-width: 720px; line-height: 1.6; margin: 0 0 14px; }
.foot-meta { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin: 0; }

/* praxis steckbrief (definition rows) */
.deflist { border: 1px solid var(--line); }
.defrow {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 24px;
  padding: 17px 22px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.6;
}
.defrow:first-child { border-top: none; }
.defrow .dk { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); padding-top: 3px; }
.defrow .dv { color: var(--ink); }

/* buy list */
.buy-list { list-style: none; padding: 0; margin: 0; }
.buy-list li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-top: 1px solid var(--line);
  font-size: 16px; line-height: 1.55;
}
.buy-list li:first-child { border-top: none; padding-top: 4px; }
.buy-list li::before {
  content: "\2713";
  position: absolute; left: 0; top: 12px;
  color: var(--accent); font-weight: 700; font-size: 14px;
}
.buy-list li:first-child::before { top: 3px; }

/* links list */
.links-list { list-style: none; padding: 0; margin: 0; }
.links-list li { border-top: 1px solid var(--line); }
.links-list li:first-child { border-top: none; }
.links-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 2px; text-decoration: none; color: var(--ink);
}
.links-list a:hover { color: var(--accent); }
.links-list a:hover .lt { border-bottom-color: var(--accent); }
.links-list .lt { border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.links-list .lh { font-size: 12.5px; color: var(--ink-faint); white-space: nowrap; }

/* overview table */
.otable-wrap { overflow-x: auto; border: 1px solid var(--line); margin-top: 6px; }
.otable { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 640px; }
.otable th, .otable td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.otable thead th { border-top: none; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); font-weight: 500; }
.otable tbody tr:hover { background: var(--paper); }
.otable .cat-row td { background: var(--bg-soft); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); }
.otable td.name a { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.otable td.name a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* resources */
.resource-group { padding-top: 32px; margin-top: 32px; border-top: 1px solid var(--line); }
.resource-group:first-of-type { border-top: none; padding-top: 8px; margin-top: 16px; }
.resource-group h2 { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; margin: 0 0 4px; }
.resource-group > p { color: var(--ink-soft); font-size: 15px; margin: 0 0 14px; }

/* wide pages (overview, shop) */
.page-wide { max-width: 100%; }
.page-head { max-width: 720px; margin-bottom: 22px; }
.page-head h1 { font-weight: 800; font-size: clamp(30px, 4.5vw, 46px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 12px; }
.page-head p { color: var(--ink-soft); font-size: 16.5px; margin: 0; line-height: 1.55; }
.page-head .tagline { color: var(--ink-soft); font-size: 19px; }

.home-links { margin-top: 20px; font-size: 15px; }
.home-links .hsep { color: var(--line-strong); margin: 0 10px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.fchip {
  padding: 7px 14px; border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--ink-soft); border-radius: 999px; font-family: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .12s;
}
.fchip:hover { border-color: var(--accent); color: var(--ink); }
.fchip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.freq-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.freq-tag.f-taeglich { background: var(--good-soft); color: var(--good); }
.freq-tag.f-bedarf { background: var(--accent-tint); color: var(--accent); }
.freq-tag.f-kur { background: var(--warn-soft); color: var(--warn); }
.freq-tag.f-selten { background: var(--bg-soft); color: var(--ink-soft); }

/* wider overview table: no forced min-width cramping, roomy columns */
.page-wide .otable { min-width: 940px; }
.page-wide .otable th, .page-wide .otable td { padding: 18px 22px; font-size: 17px; line-height: 1.55; }
.page-wide .otable thead th { font-size: 12.5px; }
.page-wide .otable td.name a { font-size: 17.5px; }
.page-wide .otable .cat-row td { font-size: 13px; padding: 14px 22px; }
.page-wide .freq-tag { font-size: 13.5px; padding: 3px 11px; }

/* shopping gallery */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.shop-card { display: flex; flex-direction: column; background: var(--bg); text-decoration: none; color: var(--ink); transition: background .14s; }
.shop-card:hover { background: var(--paper); }
.shop-thumb {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 18%;
  background: radial-gradient(circle at 50% 40%, var(--pcl), var(--bg-soft) 78%);
  border-bottom: 1px solid var(--line);
}
.shop-thumb svg { filter: drop-shadow(0 6px 10px rgba(30,25,15,.14)); }
.form-badge {
  position: absolute; left: 12px; top: 12px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-soft); background: color-mix(in srgb, var(--bg) 82%, transparent); padding: 3px 8px; border-radius: 999px;
}
.shop-body { padding: 15px 16px 18px; }
.shop-body h4 { margin: 0 0 5px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.shop-tip { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* sex differences */
.sexlist { border: 1px solid var(--line); }
.sexrow { display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 17px 22px; border-top: 1px solid var(--line); font-size: 17px; line-height: 1.6; }
.sexrow:first-child { border-top: none; }
.sexbadge { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); padding-top: 3px; }

/* body map */
.bodywrap { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; margin-top: 8px; }
.bodyfig { background: var(--paper); border: 1px solid var(--line); padding: 20px; }
.bodysvg { display: block; max-height: 520px; }
.bodysvg .hot circle { fill: var(--accent); opacity: .9; transition: opacity .12s, r .12s; }
.bodysvg .hot text { fill: #fff; font-size: 13px; font-weight: 700; font-family: var(--sans); pointer-events: none; }
.bodysvg .hot:hover circle { opacity: 1; }
.bodylegend { display: flex; flex-direction: column; }
.bodyleg { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 16.5px; }
.bodyleg:first-child { border-top: none; }
.bodyleg:hover { color: var(--accent); }
.bodyleg .ln { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; flex-shrink: 0; }

/* stack builder */
.stack-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 8px; }
.stack-count { font-size: 14px; font-weight: 600; color: var(--accent); }
.slot { margin-bottom: 22px; }
.slot h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0 0 8px; }
.slot-items { border: 1px solid var(--line); }
.slot-item { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 16px; }
.slot-item:first-child { border-top: none; }
.slot-item a { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line-strong); }
.slot-item a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.slot-item span { color: var(--ink-soft); font-size: 14.5px; text-align: right; }
.pick-group { margin-bottom: 20px; }
.pick-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0 0 10px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { padding: 7px 13px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-soft); border-radius: 999px; font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .12s; }
.pchip:hover { border-color: var(--accent); color: var(--ink); }
.pchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* mobile */
.menu-toggle { display: none; }
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .content { border-left: none; padding-top: 28px; }
  .sidebar {
    position: fixed; inset: 71px 0 auto 0; max-height: 70vh;
    background: var(--bg); border-bottom: 1px solid var(--line); z-index: 40;
    padding: 20px clamp(16px, 4vw, 40px);
    transform: translateY(-120%); transition: transform .25s ease;
  }
  .sidebar.open { transform: translateY(0); }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; flex-shrink: 0; order: -1;
    border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
    font-size: 15px; cursor: pointer;
  }
  .brand-sub { display: none; }
  .sign { grid-template-columns: 100px 1fr; gap: 12px; }
  .defrow { grid-template-columns: 1fr; gap: 4px; }
  .defrow .dk { padding-top: 0; }
  .sexrow { grid-template-columns: 1fr; gap: 4px; }
  .sexbadge { padding-top: 0; }
  .bodywrap { grid-template-columns: 1fr; gap: 20px; }
  .bodyfig { max-width: 320px; margin: 0 auto; }
}
