/* Dama dama – modernes Layout */
:root {
  --bg: #f6f2e9;
  --surface: #fffdf8;
  --ink: #1f2a22;
  --muted: #5d6a5f;
  --line: #e2dccd;
  --forest: #1e3a2a;
  --forest-2: #2c5139;
  --moss: #6b8f4e;
  --fawn: #a8662c;
  --fawn-soft: #f1e3cf;
  --link: #2c6a3f;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(30 58 42 / .06), 0 8px 24px rgb(30 58 42 / .07);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a16;
    --surface: #1b231d;
    --ink: #e8e6dd;
    --muted: #a7b0a6;
    --line: #2d3830;
    --forest: #0f1d14;
    --forest-2: #1d3325;
    --moss: #9cbc7c;
    --fawn: #e0a468;
    --fawn-soft: #2b241b;
    --link: #9fd29a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.7 var(--sans);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--fawn); }
:focus-visible { outline: 3px solid var(--fawn); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* ------------------------------------------------ Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--forest) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  color: #f3efe4;
  border-bottom: 1px solid rgb(255 255 255 / .08);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand .mark { width: 34px; height: 34px; color: #e2b57f; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand em { font: italic 600 1.35rem/1.1 var(--serif); letter-spacing: .01em; }
.brand small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-top: 3px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; gap: 4px; }
.site-nav a { color: #e9e5d8; text-decoration: none; font-size: .95rem; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a { display: block; padding: 8px 14px; border-radius: 999px; transition: background .2s; }
.site-nav > ul > li > a:hover, .site-nav > ul > li:focus-within > a { background: rgb(255 255 255 / .1); color: #fff; }
.site-nav > ul > li > a[aria-current] { background: rgb(226 181 127 / .18); color: #f2cf9f; }
.site-nav .has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); opacity: .7; }
.site-nav .sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s;
}
.site-nav .sub::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); font-size: .92rem; }
.site-nav .sub a:hover { background: var(--fawn-soft); color: var(--ink); }
.site-nav .sub a[aria-current] { color: var(--fawn); font-weight: 600; }

.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px;
    background: rgb(255 255 255 / .08); color: #fff; cursor: pointer;
  }
  .nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after {
    display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: .2s;
  }
  .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span:first-child::before { top: -6px; }
  .nav-toggle span:first-child::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
  .nav-toggle[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 68px); overflow: auto;
    background: var(--forest); padding: 8px 16px 20px; display: none; border-bottom: 1px solid rgb(255 255 255 / .1);
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav > ul > li > a { border-radius: 8px; padding: 12px; font-size: 1.05rem; }
  .site-nav .has-sub > a::after { display: none; }
  .site-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: 0; box-shadow: none; padding: 0 0 6px 12px; min-width: 0; }
  .site-nav .sub a { color: #cfd8c9; padding: 7px 12px; }
  .site-nav .sub a:hover { background: rgb(255 255 255 / .08); color: #fff; }
  .site-nav .sub a[aria-current] { color: #f2cf9f; }
}

/* ------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  background: var(--fawn); color: #fff; text-decoration: none; font-weight: 600; transition: transform .15s, background .15s;
}
.btn:hover { background: #8e5321; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: rgb(255 255 255 / .1); color: inherit; }

/* ------------------------------------------------ Startseite */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgb(226 181 127 / .25), transparent 60%),
    linear-gradient(160deg, var(--forest) 0%, var(--forest-2) 100%);
  color: #f3efe4; padding: 72px 0 88px; overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }
.hero .eyebrow { color: #e2b57f; }
.hero h1 { margin: 6px 0 18px; font-weight: 400; line-height: 1; }
.hero h1 em { display: block; font: italic 600 clamp(3.2rem, 8vw, 5.6rem)/1 var(--serif); letter-spacing: -.01em; }
.hero h1 span { display: block; font-size: clamp(1.1rem, 2.4vw, 1.45rem); margin-top: 14px; font-weight: 400; opacity: .9; }
.hero .lead { font-size: 1.1rem; max-width: 36em; color: #dfe5d8; margin: 0 0 10px; }
.hero-note { font-size: .92rem; color: #b9c4b3; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-img { margin: 0; justify-self: center; position: relative; }
.hero-img::before { content: ""; position: absolute; inset: -14px; border: 1.5px solid rgb(226 181 127 / .5); border-radius: 50%; transform: rotate(-4deg); }
.hero-img::after { content: ""; position: absolute; inset: -30px; border: 1px dashed rgb(226 181 127 / .25); border-radius: 50%; transform: rotate(6deg); }
.hero-img img { position: relative; width: 352px; clip-path: ellipse(47.5% 46.5% at 50% 50%); filter: drop-shadow(0 20px 40px rgb(0 0 0 / .35)); }

.photo-strip { margin-top: -44px; position: relative; }
.photo-strip .wrap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.photo-strip img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow); border: 3px solid var(--surface); }

.eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--fawn); margin: 0; }

.chapters { padding-top: 72px; }
.chapters > h2, .facts h2 { font: 600 2rem/1.2 var(--serif); margin: 0 0 24px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 22px; box-shadow: var(--shadow); position: relative; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgb(30 58 42 / .06), 0 16px 36px rgb(30 58 42 / .12); }
.card .num { font: italic 600 1rem var(--serif); color: var(--fawn); }
.card h3 { font: 600 1.35rem/1.25 var(--serif); margin: 6px 0 10px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; line-height: 1.6; }
.card ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.card ul a { display: inline-block; font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--fawn-soft); color: var(--ink); text-decoration: none; }
.card ul a:hover { background: var(--fawn); color: #fff; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 56px; padding-bottom: 80px; }
.facts div { border-top: 2px solid var(--fawn); padding-top: 14px; }
.facts strong { display: block; font: 600 2.3rem/1.1 var(--serif); color: var(--forest-2); }
@media (prefers-color-scheme: dark) { .facts strong { color: var(--moss); } }
.facts span { color: var(--muted); font-size: .95rem; }

/* ------------------------------------------------ Artikelseiten */
.page-head { background: linear-gradient(160deg, var(--forest) 0%, var(--forest-2) 100%); color: #f3efe4; padding: 36px 0 44px; }
.page-head h1 { font: 600 clamp(1.9rem, 4.2vw, 2.9rem)/1.15 var(--serif); margin: 8px 0 0; max-width: 24em; text-wrap: balance; }
.page-head .eyebrow { color: #e2b57f; margin-top: 18px; }
.crumbs { font-size: .85rem; color: #b9c4b3; }
.crumbs a { color: #dfe5d8; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { margin: 0 4px; opacity: .6; }
.crumbs [aria-current] { margin: 0; opacity: 1; }

.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 72px; }
.sidebar { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: .92rem; }
.toc-title { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.toc ol, .chapnav ol { list-style: none; margin: 0 0 28px; padding: 0; border-left: 2px solid var(--line); }
.toc a, .chapnav a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover, .chapnav a:hover { color: var(--ink); border-color: var(--moss); }
.chapnav a[aria-current], .toc a.active { color: var(--fawn); border-color: var(--fawn); font-weight: 600; }

.prose { max-width: 720px; }
.prose > section { display: flow-root; }
.prose > section + section { margin-top: 12px; }
.prose h2 { font: 600 1.6rem/1.25 var(--serif); margin: 36px 0 12px; color: var(--forest-2); clear: both; }
@media (prefers-color-scheme: dark) { .prose h2 { color: var(--moss); } }
.prose > section:first-child h2 { margin-top: 0; }
.prose p { margin: 0 0 1.05em; hyphens: auto; -webkit-hyphens: auto; }
.prose ul.list { padding-left: 1.2em; }
.prose ul.linklist { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.prose ul.linklist a {
  display: flex; align-items: center; gap: 10px; height: 100%; padding: 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.35;
}
.prose ul.linklist a::before { content: "→"; color: var(--fawn); }
.prose ul.linklist a:hover { border-color: var(--fawn); background: var(--fawn-soft); }

.fig { margin: 0; }
.fig img { border-radius: 10px; box-shadow: var(--shadow); }
.fig figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.fig-left { float: left; margin: 6px 24px 12px 0; max-width: 45%; }
.fig-right { float: right; margin: 6px 0 12px 24px; max-width: 45%; }
.fig-wide { margin: 8px 0 22px; }
.fig-wide img { background: #fff; }
.fig-wide .zoom { display: block; cursor: zoom-in; }
@media (max-width: 640px) {
  .fig-wide .zoom { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
  .fig-wide .zoom img { min-width: 620px; }
}
.gallery { clear: both; display: flex; flex-wrap: wrap; gap: 18px; margin: 8px 0 24px; }
.gallery .fig img { height: 130px; width: auto; }

.prevnext { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pn { display: block; padding: 16px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.pn:hover { border-color: var(--fawn); color: var(--ink); transform: translateY(-1px); }
.pn small { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pn span { font: 600 1.08rem/1.3 var(--serif); }
.pn.prev small::before { content: "← "; }
.pn.next { text-align: right; }
.pn.next small::after { content: " →"; }

/* ------------------------------------------------ Footer */
.site-footer { background: var(--forest); color: #c9d2c4; padding: 44px 0 28px; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-brand { display: flex; gap: 12px; max-width: 460px; }
.footer-brand .mark { width: 32px; height: 32px; color: #e2b57f; flex: none; }
.footer-brand strong { font: italic 600 1.2rem var(--serif); color: #f3efe4; }
.footer-brand p { margin: 4px 0 0; line-height: 1.55; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: #e9e5d8; }
.site-footer a:hover { color: #f2cf9f; }
.footer-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .1); font-size: .82rem; color: #93a08f; }

/* ------------------------------------------------ Responsive */
@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
  .sidebar { min-width: 0; }
  .sidebar { position: static; max-height: none; overflow: visible; }
  .sidebar .toc { display: none; }
  .chapnav ol { display: flex; flex-wrap: nowrap; overflow-x: auto; border: 0; gap: 6px; margin: 0; padding-bottom: 4px; scrollbar-width: none; }
  .chapnav li { flex: none; }
  .chapnav a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0; background: var(--surface); white-space: nowrap; }
  .chapnav a[aria-current] { background: var(--fawn); color: #fff; border-color: var(--fawn); }
}
@media (max-width: 820px) {
  .hero { padding: 48px 0 76px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-img img { width: 100%; max-width: 352px; }
  .photo-strip .wrap { grid-template-columns: repeat(3, 1fr); }
  .photo-strip img:nth-child(n+4) { display: none; }
  .facts { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .fig-left, .fig-right { float: none; max-width: 100%; margin: 6px 0 18px; }
  .fig-left img, .fig-right img { width: auto; }
  .cards { grid-template-columns: 1fr; }
  .prevnext { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  .gallery { gap: 12px; }
  .gallery .fig img { height: 110px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .sidebar, .prevnext, .site-footer, .photo-strip { display: none; }
  .page-head, .hero { background: none; color: #000; }
  .article-grid { display: block; }
}
