/* Layout: sticky nav, one centered column (max 1100px), views switched by hash; the Karma ring is the one bold element */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --sunk: #e9edf3;
  --ink: #142033;
  --muted: #59657a;
  --line: #d5dce6;
  --primary: #1d5a78;
  --primary-ink: #ffffff;
  --primary-soft: #dcebf2;
  --karma: #e09a12;
  --karma-soft: #fbefd4;
  --karma-ink: #6b4500;
  --ok: #2e7d4f;
  --ok-soft: #dcf0e3;
  --warn: #9a5b00;
  --bad: #b3322a;
  --bad-soft: #f8e0de;
  --f-display: ui-rounded, "Avenir Next", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1520; --surface: #172131; --sunk: #1e2a3d; --ink: #e8edf5; --muted: #9aa7bb; --line: #2c3a50;
  --primary: #6fb3d6; --primary-ink: #0b1b26; --primary-soft: #1b3546;
  --karma: #f2b63d; --karma-soft: #3a2d10; --karma-ink: #f7d48a;
  --ok: #6cc996; --ok-soft: #173325; --warn: #e9b35a; --bad: #f08a80; --bad-soft: #3d1c1a;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0f1520; --surface: #172131; --sunk: #1e2a3d; --ink: #e8edf5; --muted: #9aa7bb; --line: #2c3a50;
  --primary: #6fb3d6; --primary-ink: #0b1b26; --primary-soft: #1b3546;
  --karma: #f2b63d; --karma-soft: #3a2d10; --karma-ink: #f7d48a;
  --ok: #6cc996; --ok-soft: #173325; --warn: #e9b35a; --bad: #f08a80; --bad-soft: #3d1c1a;
  color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; color: var(--muted); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* nav */
header.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.logo svg { width: 28px; height: 28px; }
.navlinks { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.navlinks a, .navme a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; font-size: 0.92rem; }
.navlinks a:hover, .navme a:hover { color: var(--ink); background: var(--sunk); }
.navlinks a.on, .navme a.on { color: var(--ink); background: var(--primary-soft); }
.navme { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.karma-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--karma-soft); color: var(--karma-ink); border-radius: 999px; padding: 3px 10px; font-family: var(--f-mono); font-weight: 700; font-size: 0.82rem; }

/* buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.92rem; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.karma { background: var(--karma); color: #2b1c00; border-color: var(--karma); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary); padding-inline: 8px; }
.btn.small { padding: 5px 10px; font-size: 0.84rem; }
.btn.danger { color: var(--bad); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
label { display: grid; gap: 4px; font-weight: 500; font-size: 0.9rem; }
input, select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

main { padding-block: 28px 64px; }
section.block { display: grid; gap: 16px; padding-block: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 12px; min-width: 0; }
.notice { background: var(--primary-soft); border-radius: var(--r); padding: 12px 16px; font-size: 0.92rem; }
.notice.karma { background: var(--karma-soft); color: var(--karma-ink); }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

/* tags */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag.give { background: var(--primary-soft); color: var(--primary); }
.tag.need { background: var(--karma-soft); color: var(--karma-ink); }
.tag.demo { background: transparent; border: 1px dashed var(--muted); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 20px 36px; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 52ch; margin-top: 14px; }
.hero .row { margin-top: 22px; }
.ring { width: 100%; max-width: 420px; justify-self: center; aspect-ratio: 1; }
.ring text { font-family: var(--f-body); font-size: 11px; fill: var(--ink); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .ring { max-width: 300px; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--surface); padding: 14px 16px; }
.stat b { display: block; font-family: var(--f-mono); font-size: 1.6rem; font-variant-numeric: tabular-nums; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.step { padding: 16px; border-top: 3px solid var(--primary); background: var(--surface); border-radius: 0 0 var(--r) var(--r); display: grid; gap: 6px; align-content: start; }
.step::before { counter-increment: s; content: "Schritt " counter(s); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.step.k { border-top-color: var(--karma); }

/* listing cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card .who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.card .who > div { min-width: 0; }
.card .who b { display: block; overflow-wrap: anywhere; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; color: #fff; font-size: 0.95rem; }
.item { display: grid; gap: 2px; padding: 8px 10px; background: var(--sunk); border-radius: 8px; font-size: 0.9rem; }
.item .tag { justify-self: start; }

/* match */
.match { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; }
.score { width: 74px; height: 74px; position: relative; }
.score svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.score span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 1.05rem; }
.reasons { margin: 0; padding-left: 18px; font-size: 0.88rem; color: var(--muted); display: grid; gap: 2px; }
.flow { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 8px; align-items: stretch; }
.flow .arrow { align-self: center; }
.flow .arrow { color: var(--muted); font-family: var(--f-mono); }
@media (max-width: 520px) { .match { grid-template-columns: 1fr; } .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); justify-self: center; } }

/* projects */
.proj { display: grid; gap: 10px; }
.timeline { display: flex; gap: 4px; flex-wrap: wrap; }
.timeline span { font-size: 0.74rem; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--muted); }
.timeline span.done { background: var(--ok-soft); color: var(--ok); }
.timeline span.now { background: var(--primary); color: var(--primary-ink); }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: none; border: 0; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--line); padding: 0 2px; }
.stars button.on { color: var(--karma); }
.starline { color: var(--karma); letter-spacing: 1px; }

/* karma profile */
.kp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.kp-total { text-align: center; padding: 16px 22px; background: var(--karma-soft); color: var(--karma-ink); border-radius: var(--r); }
.kp-total b { display: block; font-family: var(--f-mono); font-size: 2.6rem; line-height: 1; }
@media (max-width: 560px) { .kp-head { grid-template-columns: 1fr; } }
.ref { border-left: 3px solid var(--karma); padding: 4px 0 4px 14px; display: grid; gap: 4px; }
.ref q { font-style: italic; }
.badge-prev { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--surface); }
.badge-prev svg { width: 34px; height: 34px; }
pre.code { background: var(--sunk); padding: 12px; border-radius: 8px; overflow-x: auto; font-family: var(--f-mono); font-size: 0.8rem; margin: 0; white-space: pre; }

/* editor */
.edlist { display: grid; gap: 8px; }
.edrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px auto; gap: 8px; align-items: start; }
@media (max-width: 640px) { .edrow { grid-template-columns: 1fr 1fr; } .edrow textarea { grid-column: 1 / -1; } }
.typepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.typepick label { flex-direction: row; display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; font-weight: 400; }
.typepick input { width: auto; margin-top: 4px; }
.typepick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 20; }
footer { border-top: 1px solid var(--line); padding-block: 22px; font-size: 0.86rem; color: var(--muted); }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.prose { display: grid; gap: 12px; max-width: 68ch; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .ring .spin { animation: spin 60s linear infinite; transform-origin: 210px 210px; } @keyframes spin { to { transform: rotate(360deg); } } }

.small { font-size: .85rem; }
.tight { gap: 6px; }
form.inline { display: inline; margin: 0; }
.notice { margin-bottom: 14px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--primary-soft); color: var(--ink); }
.card .btn, .panel .btn.start { justify-self: start; }
.auth { max-width: 440px; margin: 0 auto; }
.check { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--line); display: inline; }
.stars label.on { color: var(--karma); }
.stars input:focus-visible + label { outline: 2px solid var(--primary); }
details.req > summary { list-style: none; display: inline-flex; }
details.req > summary::-webkit-details-marker { display: none; }
details.req[open] > summary { margin-bottom: 10px; }
.legal h2 { margin-top: 18px; font-size: 1.2rem; }
footer .wrap { align-items: flex-start; }
.avatar.big { width: 60px; height: 60px; font-size: 1.4rem; }
details.req[open] { flex-basis: 100%; order: 3; }
.btn.start { justify-self: start; }
.onlineplaner-link { display: inline-block; margin-top: 12px; color: var(--muted); }

/* Monetarisierung: Pro, Preise, Partner, Statistik, Admin, Logo */
.tag.pro { background: var(--ink); color: var(--surface); letter-spacing: .02em; }
img.avatar { object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
img.avatar.big { width: 64px; height: 64px; border-radius: 14px; }
.logoedit { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.logoedit > label:first-of-type { flex: 1; min-width: 220px; }
.addrow { gap: 10px; align-items: center; }
.plans { align-items: stretch; margin-top: 18px; }
.plan { align-content: start; }
.plan .btn { justify-self: start; margin-top: auto; }
.plan.hl { border: 2px solid var(--primary); }
.price { font-family: var(--f-display); font-size: 1.8rem; font-weight: 800; }
.tablewrap { overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; }
.compare.admin td { text-align: left !important; }
.sponsor { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--r); background: var(--surface); margin: 6px 0 10px; }
.partners .row { gap: 6px 14px; }
.karmabox { border-left: 4px solid var(--karma); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.bars span { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-width: 3px; }
.card.done { opacity: .6; }
.inline.row.tight input[type=date] { width: auto; }
@media (min-width: 1000px) { .navlinks a, .navme a { padding: 6px 8px; } .navlinks { flex-wrap: nowrap; } .navlinks a { white-space: nowrap; } }
.plan { display: flex; flex-direction: column; }
.grid2 > .panel, .grid3 > .panel { align-content: start; }
.tag.heart { background: #fde3e6; color: #b3263e; }
.safety summary { cursor: pointer; }
.fairline { margin-top: 16px; }
.amounts { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
