@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/CormorantGaramond-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-Italic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==================================================================
   Bechterew unter Kontrolle — Buchseite.
   Welt: Cover. Kohle (#1f1d1a), Elfenbein, das Orange der Wirbel.
   Die Wirbelsäule ist die Navigation und das Inhaltsverzeichnis.
   ================================================================== */
:root {
  --bg: #f1ebdf;
  --bg-raised: #e7dfce;
  --ink: #221d17;
  --muted: #655b4c;
  --rule: #cdc2ab;
  --accent: #a9532c;
  --on-accent: #fff8ee;
  --shadow: rgba(40, 28, 14, 0.28);
  --vert: color-mix(in srgb, var(--muted) 38%, var(--bg));
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1d1a; --bg-raised: #292621; --ink: #eee5d3; --muted: #aca08d;
    --rule: #3a352d; --accent: #d37a54; --on-accent: #1f1d1a; --shadow: rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1d1a; --bg-raised: #292621; --ink: #eee5d3; --muted: #aca08d;
  --rule: #3a352d; --accent: #d37a54; --on-accent: #1f1d1a; --shadow: rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; accent-color: var(--accent); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 1.125rem; line-height: 1.65;
  padding-inline: 1rem; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

.wrap { max-width: 42rem; margin-inline: auto; }
.wide { max-width: 66rem; margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopf ---------- */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.1rem; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.top a { text-decoration: none; }
.top a:hover { color: var(--accent); }
.top nav { display: flex; gap: 1.6rem; }
@media (max-width: 639px) { .top nav a:not(:last-child) { display: none; } }

/* ---------- Wirbelsäule als Abschnitts-Navigation ---------- */
.spine { display: none; }
@media (min-width: 1180px) {
  .spine { display: flex; flex-direction: column; align-items: center; gap: 5px; position: fixed; left: max(1.5rem, calc(50% - 40rem)); top: 50%; transform: translateY(-50%); z-index: 5; margin: 0; padding: 0; list-style: none; }
  .spine a { position: relative; display: block; height: 1.1rem; border-radius: 0.5rem; background: var(--rule); transition: background 0.2s; }
  .spine li:nth-child(1) a { width: 1.6rem; } .spine li:nth-child(2) a { width: 1.95rem; } .spine li:nth-child(3) a { width: 2.3rem; }
  .spine li:nth-child(4) a { width: 2.65rem; } .spine li:nth-child(5) a { width: 3rem; } .spine li:nth-child(6) a { width: 3.35rem; }
  .spine a:hover { background: var(--muted); }
  .spine a[aria-current="true"] { background: var(--accent); }
  .spine a span { position: absolute; left: calc(100% + 0.9rem); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .spine a:hover span, .spine a:focus-visible span, .spine a[aria-current="true"] span { opacity: 1; }
  .spine a[aria-current="true"] span { color: var(--accent); }
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 2.2rem 4rem; align-items: center; grid-template-columns: 1fr; padding-block: 1.5rem 4.5rem; }
@media (min-width: 780px) { .hero { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); } }
.book-col { display: grid; justify-items: center; gap: 1.1rem; }
.book { perspective: 1500px; width: 100%; max-width: 18rem; }
.tilt { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s var(--ease); }
.flip { position: relative; aspect-ratio: 900 / 1440; transform-style: preserve-3d; transition: transform 0.9s var(--ease); }
.flip[data-side="back"] { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px; overflow: hidden; box-shadow: 0 1.6rem 2.2rem -0.6rem var(--shadow), 0 0.3rem 0.6rem var(--shadow); }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; }
.face.back { transform: rotateY(180deg); }
.flip-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; background: none; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); font-size: 0.88rem; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.flip-btn:hover { color: var(--ink); border-color: var(--muted); }
.hero-text > * { margin: 0; }
h1 { font-family: var(--display); font-weight: 700; text-wrap: balance; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 0.98; letter-spacing: 0.01em; text-transform: uppercase; }
h1 em { display: block; font-style: normal; color: var(--accent); font-size: clamp(1.6rem, 4.3vw, 2.85rem); letter-spacing: 0.03em; margin-top: 0.15em; }
.subtitle { margin-top: 1.3rem !important; color: var(--muted); font-size: 1.08rem; max-width: 30rem; text-wrap: pretty; }
.quote { margin-top: 1.6rem !important; font-family: var(--display); font-size: 1.55rem; line-height: 1.32; font-weight: 500; text-wrap: balance; }
.shops { margin: 2rem 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
@media (max-width: 420px) { .shops { grid-template-columns: 1fr; } }
.shops a { display: flex; flex-direction: column; gap: 0.1rem; height: 100%; padding: 0.8rem 1rem; background: var(--accent); color: var(--on-accent); text-decoration: none; border-radius: 0.4rem; transition: filter 0.15s, transform 0.2s var(--ease); }
.shops a:hover { filter: brightness(1.08); transform: translateY(-2px); }
.shops small { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.9; }
.shops strong { font-weight: 600; font-size: 1.05rem; }
.format-note { margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- Abschnitte ---------- */
section { padding-block: 4rem; border-top: 1px solid var(--rule); }
h2 { margin: 0 0 1.5rem; font-family: var(--display); font-weight: 600; text-wrap: balance; font-size: clamp(2rem, 4.6vw, 2.8rem); line-height: 1.2; }
.lead { margin: 0 0 1.5rem; color: var(--muted); max-width: 36rem; text-wrap: pretty; }
.prose p { margin: 0 0 1.15em; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Die Regel: drei Aussagearten ---------- */
.rule-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.rule-tabs button { padding: 0.55rem 1.05rem; background: none; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; font-size: 0.95rem; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.rule-tabs button:hover { color: var(--ink); border-color: var(--muted); }
.rule-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rule-panel { min-height: 8.5rem; }
.rule-panel blockquote { margin: 0 0 1rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 3.6vw, 2rem); line-height: 1.3; text-wrap: balance; }
.rule-panel p { margin: 0; color: var(--muted); font-size: 1rem; }
.rule-panel p a { color: var(--ink); text-underline-offset: 0.2em; }
.rule-close { margin: 2rem 0 0; font-size: 1rem; color: var(--muted); text-wrap: pretty; }

/* ---------- Aufbau: die Wirbelsäule als Inhaltsverzeichnis ---------- */
.toc { --col: 3.4rem; display: grid; gap: 1.8rem; }
.toc-part { margin: 0 0 0.5rem; padding-left: var(--col); font-family: var(--display); font-size: 1.55rem; line-height: 1.3; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.toc ol { position: relative; margin: 0; padding: 0; list-style: none; }
.toc ol::before { content: ""; position: absolute; left: calc(var(--col) / 2 - 1px); top: 1rem; bottom: 1rem; width: 2px; background: var(--vert); }
.toc li { position: relative; }
.toc h4 { margin: 0; font: inherit; }
.row { display: grid; grid-template-columns: var(--col) minmax(0, 1fr); align-items: center; width: 100%; padding: 0.5rem 0; background: none; border: 0; text-align: left; cursor: pointer; }
.vert { position: relative; justify-self: center; display: block; width: var(--w); height: 1.3rem; border-radius: 0.65rem; background: var(--vert); transition: background 0.2s, transform 0.3s var(--ease); }
.row:hover .vert { background: var(--muted); }
.row[aria-expanded="true"] .vert { background: var(--accent); transform: scaleX(1.12); }
.r-text { display: grid; gap: 0.05rem; padding-left: 0.4rem; min-width: 0; }
.r-label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.r-title { font-family: var(--display); font-size: 1.4rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.row[aria-expanded="true"] .r-label { color: var(--accent); }
.panel { margin: 0 0 0.6rem calc(var(--col) + 0.4rem); padding: 0.4rem 0 1rem; font-size: 1rem; color: var(--muted); }
.panel[hidden] { display: none; }
.panel ul { margin: 0 0 0.6rem; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.panel li { padding-left: 1rem; position: relative; text-wrap: pretty; }
.panel li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.4rem; height: 2px; background: var(--rule); }
.panel .note { margin: 0.4rem 0 0; color: var(--ink); font-size: 0.98rem; }
.panel:not([hidden]) li { animation: rise 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Rezepte ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.chip { padding: 0.5rem 1rem; background: none; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; font-size: 0.95rem; color: var(--muted); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip small { opacity: 0.8; margin-left: 0.25rem; }
.toggles { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--muted); }
.toggles label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.toggles input { width: 1.1rem; height: 1.1rem; margin: 0; }
.filter-note { margin: 0 0 1.6rem; font-size: 0.88rem; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.4rem 1.2rem; margin: 0; padding: 0; list-style: none; }
.rcard { margin: 0; }
.rcard[hidden] { display: none; }
.rcard .ph { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 0.35rem; background: var(--bg-raised); }
.rcard img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.rcard:hover img { transform: scale(1.04); }
.rcard h3 { margin: 0.7rem 0 0.15rem; font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.rcard p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.count { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--muted); }
.ai-note { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* ---------- Autoren ---------- */
.authors { display: grid; gap: 2rem 4rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .authors { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.authors h2 { grid-column: 1 / -1; margin-bottom: 0; }
.authors p { margin: 0 0 1em; text-wrap: pretty; }
.bigquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 1.95rem); line-height: 1.3; text-wrap: pretty; }
.bigquote cite { display: block; margin-top: 1rem; font-family: var(--body); font-size: 0.85rem; font-style: normal; color: var(--muted); }

/* ---------- Fragen ---------- */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0.1rem; cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.4rem; font-weight: 600; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 0.8rem; height: 0.8rem; background: linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.2rem; max-width: 36rem; color: var(--muted); text-wrap: pretty; }

/* ---------- Kaufen ---------- */
.buy-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.buy-list li { border-bottom: 1px solid var(--rule); }
.buy-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0.2rem; text-decoration: none; transition: color 0.15s; }
.buy-list a:hover { color: var(--accent); }
.buy-list .shop { font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1.3; transition: transform 0.25s var(--ease); }
.buy-list a:hover .shop { transform: translateX(0.4rem); }
.buy-list .kind { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* ---------- Fuß ---------- */
footer { padding-block: 2.5rem 3.2rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: space-between; font-size: 0.85rem; color: var(--muted); }
footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---------- Rechtsseiten ---------- */
.legal { padding-block: 1rem 3rem; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin-bottom: 0.4rem; }
.legal h2 { font-size: 1.6rem; margin: 2.4rem 0 0.6rem; }
.legal p, .legal li { text-wrap: pretty; }
.legal .stand { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.6rem; }
.legal .summary { padding: 1.1rem 1.3rem; background: var(--bg-raised); border-radius: 0.4rem; margin: 0 0 1rem; }
.legal .summary p { margin: 0; }
.legal-back { display: inline-block; margin-bottom: 1.4rem; font-size: 0.88rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.legal-back:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .flip[data-side="back"] { transition: none; }
}
