/* Business Ideas: ein Akzent (Tannengruen), warmes Off-White, Serif nur fuer H1/H2 */
:root {
  --bg: #F4F1EA;
  --bg-2: #ECE8DF;
  --fg: #1C1C1A;
  --fg-2: #4A4944;
  --fg-3: #7A786F;
  --linie: #D9D4C7;
  --akzent: #1F4E46;
  --akzent-2: #2E6B60;
  --akzent-hell: #DCE8E4;
  --warn: #8A3B2E;
  --warn-hell: #F2DED9;
  --gut: #2F6B3A;
  --radius: 4px;
  --display: "DM Serif Display", Georgia, serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --h1: clamp(2rem, 5vw, 3.4rem);
  --h2: clamp(1.45rem, 3vw, 2.1rem);
  --h3: clamp(1.15rem, 2.2vw, 1.4rem);
  --mass: 70ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131514; --bg-2: #1B1E1C; --fg: #E6E4DE; --fg-2: #B9B6AD; --fg-3: #8A877E; --linie: #2C302D;
    --akzent: #7FB3A6; --akzent-2: #9CC8BC; --akzent-hell: #1E2E2A; --warn: #D98B7A; --warn-hell: #3A2420; --gut: #8CC094;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--body); letter-spacing: 0; }
a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--akzent-2); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .4em; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-2); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.klein { font-size: .875rem; color: var(--fg-3); }
.vorzeile { font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--akzent); margin-bottom: .75rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.lead { font-size: 1.125rem; color: var(--fg-2); max-width: var(--mass); }

/* Kopf */
.kopf { border-bottom: 1px solid var(--linie); background: var(--bg); position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); }
.kopf-innen { max-width: 1240px; margin: 0 auto; padding: .75rem clamp(1rem, 4vw, 3rem); display: flex; align-items: center; gap: 1.5rem; }
.marke { font-family: var(--display); font-size: 1.35rem; color: var(--fg); text-decoration: none; letter-spacing: -0.02em; }
.marke span { color: var(--akzent); }
.nav { display: flex; gap: 1.25rem; margin-left: auto; overflow-x: auto; }
.nav a { color: var(--fg-2); text-decoration: none; font-size: .9375rem; padding: .6rem 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav a[aria-current] { color: var(--fg); border-bottom-color: var(--akzent); }
.abmelden { margin: 0; }
.btn-leise { background: none; border: 1px solid var(--linie); color: var(--fg-2); font: inherit; font-size: .875rem; padding: .5rem .9rem; border-radius: var(--radius); cursor: pointer; min-height: 44px; }
.btn-leise:hover { border-color: var(--fg-3); color: var(--fg); }

.inhalt { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 6rem; }

/* Anmeldung: karg, verraet nichts */
.anmeldung { max-width: 24rem; margin: clamp(4rem, 18vh, 10rem) auto 0; }
.anmeldung h1 { font-size: 2rem; }
.formular { display: grid; gap: .5rem; margin-top: 1.5rem; }
.formular label { font-size: .875rem; color: var(--fg-2); }
.formular input { font: inherit; font-size: 1.125rem; padding: .8rem .9rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--bg); color: var(--fg); min-height: 48px; letter-spacing: .05em; }
.formular input:focus { border-color: var(--akzent); outline: none; box-shadow: 0 0 0 3px var(--akzent-hell); }
.formular .klein { margin: 0; }
.btn { font: inherit; font-weight: 700; background: var(--akzent); color: #F4F1EA; border: 0; border-radius: var(--radius); padding: .85rem 1.25rem; min-height: 48px; cursor: pointer; margin-top: .75rem; transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s; }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.15); } }
.leise { font-size: .875rem; color: var(--fg-3); justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.fehler { background: var(--warn-hell); color: var(--warn); padding: .75rem 1rem; border-radius: var(--radius); }
.hinweis { background: var(--akzent-hell); color: var(--fg-2); padding: .75rem 1rem; border-radius: var(--radius); }

/* Startseite */
.hero { display: grid; gap: 2rem; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.5fr 1fr; align-items: end; } }
.hero h1 { max-width: 18ch; }
.hero-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--linie); border: 1px solid var(--linie); }
.hero-zahlen div { background: var(--bg); padding: 1.25rem 1rem; display: grid; gap: .25rem; }
.hero-zahlen strong { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--akzent); }
.hero-zahlen span { font-size: .8125rem; color: var(--fg-3); }
.block { padding: clamp(2.5rem, 6vw, 4.5rem) 0 0; border-top: 1px solid var(--linie); margin-top: clamp(2rem, 5vw, 3.5rem); }
.block-kopf { display: grid; gap: .25rem; margin-bottom: 1.5rem; max-width: var(--mass); }
.block-kopf p { margin: 0; }

.tabelle { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.25rem 0 1.5rem; border: 1px solid var(--linie); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; min-width: 560px; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); font-weight: 700; background: var(--bg-2); }
tbody tr:last-child td { border-bottom: 0; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
.rangliste td.rang { font-family: var(--display); font-size: 1.5rem; color: var(--akzent); width: 2.5rem; line-height: 1; }
.rangliste td.titel a { font-weight: 700; color: var(--fg); text-decoration: none; }
.rangliste td.titel a:hover { color: var(--akzent); text-decoration: underline; }
.rangliste .klein { margin-top: .15rem; }

.karten { display: grid; gap: 1px; background: var(--linie); border: 1px solid var(--linie); }
@media (min-width: 640px) { .karten { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .karten { grid-template-columns: repeat(3, 1fr); } .karten .karte:first-child { grid-column: span 2; } }
.karte { background: var(--bg); padding: 1.5rem; color: var(--fg); text-decoration: none; display: grid; grid-template-rows: auto auto 1fr auto; gap: .5rem; min-height: 14rem; transition: background .2s; }
.karte:hover { background: var(--akzent-hell); color: var(--fg); }
.karte-rang { font-family: var(--display); font-size: 2rem; color: var(--akzent); line-height: 1; }
.karte p { color: var(--fg-2); font-size: .9375rem; margin: 0; }
.karte-fuss { display: flex; gap: 1.25rem; font-size: .8125rem; color: var(--fg-3); padding-top: .75rem; border-top: 1px solid var(--linie); }

.quer-liste { display: grid; gap: 1rem; }
@media (min-width: 900px) { .quer-liste { grid-template-columns: 1.3fr 1fr 1fr; } }
.quer { display: grid; gap: .5rem; padding: 1.5rem; border: 1px solid var(--linie); border-left: 4px solid var(--akzent); color: var(--fg); text-decoration: none; background: var(--bg); transition: background .2s; }
.quer:hover { background: var(--akzent-hell); color: var(--fg); }
.quer p { color: var(--fg-2); margin: 0; }

/* Dokument */
.dok { display: grid; gap: 2rem; padding-top: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 1024px) { .dok { grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; } .toc { position: sticky; top: 5rem; max-height: calc(100vh - 6rem); overflow-y: auto; } }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--linie); }
.toc li a { display: block; padding: .4rem .9rem; color: var(--fg-2); text-decoration: none; font-size: .875rem; border-left: 2px solid transparent; margin-left: -1px; }
.toc li a:hover { color: var(--fg); }
.toc li.toc-l3 a { padding-left: 1.6rem; font-size: .8125rem; color: var(--fg-3); }
.toc li a[aria-current] { color: var(--akzent); border-left-color: var(--akzent); font-weight: 700; }
.artikel { min-width: 0; }
.artikel-kopf { padding-bottom: 2rem; border-bottom: 1px solid var(--linie); margin-bottom: 2.5rem; }
.artikel-kopf h1 { max-width: 22ch; }
.kennzahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--linie); border: 1px solid var(--linie); margin: 1.5rem 0 1.25rem; max-width: 56rem; }
@media (min-width: 700px) { .kennzahlen { grid-template-columns: 1.3fr 1.3fr 1fr 1fr 1fr; } }
.kennzahlen div { background: var(--bg); padding: .9rem 1rem; }
.kennzahlen dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-3); }
.kennzahlen dd { margin: .25rem 0 0; font-weight: 700; font-size: 1.05rem; }
.delta { display: block; font-size: .75rem; font-weight: 400; color: var(--fg-3); }
.delta.hoch { color: var(--gut); } .delta.runter { color: var(--warn); }
.risiko, .china { max-width: var(--mass); margin: .5rem 0; }
.china strong { color: var(--akzent); }

.prosa { max-width: var(--mass); }
.prosa h2 { margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--linie); }
.prosa h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prosa h3 { margin-top: 2rem; }
.prosa h4 { margin-top: 1.5rem; }
.prosa li { margin: .3rem 0; }
.prosa ul, .prosa ol { padding-left: 1.4rem; }
.prosa blockquote { margin: 1.25rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--akzent); color: var(--fg-2); }
.prosa code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .875em; background: var(--bg-2); padding: .1em .35em; border-radius: 3px; }
.prosa pre { background: var(--bg-2); padding: 1rem; overflow-x: auto; border-radius: var(--radius); }
.prosa pre code { background: none; padding: 0; }
.prosa .tabelle { max-width: none; }
.prosa table { font-size: .875rem; }
.prosa hr { border: 0; border-top: 1px solid var(--linie); margin: 2rem 0; }
.prosa sup.fn { font-size: .7em; line-height: 0; }
.prosa sup.fn a { text-decoration: none; padding: 0 .1em; }
.prosa li[id^="q-"]:target { background: var(--akzent-hell); }
.prosa li[id^="q-"] { word-break: break-word; }

.nachbarn { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--linie); font-size: .9375rem; }
.nachbarn a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Notizen */
.notiz { margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--linie); background: var(--bg-2); max-width: var(--mass); }
.notiz h2 { font-size: 1.4rem; }
.notiz-form { display: grid; gap: .75rem; }
.status-wahl { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; font-size: .8125rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--linie); background: var(--bg); color: var(--fg-2); white-space: nowrap; }
.status-wahl .chip { cursor: pointer; min-height: 44px; padding: .5rem .9rem; }
.status-wahl .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.status-wahl .chip:has(input:focus-visible) { outline: 2px solid var(--akzent); outline-offset: 2px; }
.chip.aktiv, .chip-starten.aktiv, .chip-laeuft.aktiv { background: var(--akzent); color: #F4F1EA; border-color: var(--akzent); }
.chip-verworfen.aktiv { background: var(--warn); border-color: var(--warn); color: #F4F1EA; }
.chip-pruefen:not(.status-wahl .chip), .chip-starten:not(.status-wahl .chip), .chip-laeuft:not(.status-wahl .chip) { background: var(--akzent-hell); color: var(--akzent); border-color: transparent; }
.chip-verworfen:not(.status-wahl .chip) { background: var(--warn-hell); color: var(--warn); border-color: transparent; }
.notiz textarea { font: inherit; font-size: 1rem; padding: .75rem; border: 1px solid var(--linie); border-radius: var(--radius); background: var(--bg); color: var(--fg); resize: vertical; min-height: 8rem; }
.notiz textarea:focus { border-color: var(--akzent); outline: none; box-shadow: 0 0 0 3px var(--akzent-hell); }
.notiz-fuss { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.notiz-fuss .btn { margin: 0; }

@media (max-width: 767px) {
  .kopf-innen { flex-wrap: wrap; gap: .5rem 1rem; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 1rem; }
  .abmelden { margin-left: auto; }
  .inhalt { padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print { .kopf, .toc, .notiz, .nachbarn { display: none; } .prosa { max-width: none; } }
