:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: #e1e5ee;
  --text: #1d1e22;
  --text-2: #575c6a;
  --muted: #6e7282;
  --accent: #2847b2;
  --accent-ink: #ffffff;
  --accent-soft: #e8edfa;
  --gradient: linear-gradient(135deg, #203494 0%, #2c56cf 100%);
  --navy: linear-gradient(135deg, #1c1b20 0%, #1e2434 45%, #2e437a 100%);
  --series-1: #2847b2;
  --good: #1e8a4c;
  --good-soft: #e3f4ea;
  --warn: #a86b00;
  --warn-soft: #fbf0d9;
  --bad: #c93a3a;
  --bad-soft: #fbe6e6;
  --neutral-soft: #eceff5;
  --shadow: 0 1px 2px rgba(28, 37, 114, .04), 0 8px 24px rgba(28, 37, 114, .06);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15161c;
    --surface: #1e2028;
    --surface-2: #262a36;
    --border: #323748;
    --text: #f7f8fc;
    --text-2: #c3c8d6;
    --muted: #9b9ea8;
    --accent: #7a95e8;
    --accent-ink: #ffffff;
    --accent-soft: #232c4a;
    --gradient: linear-gradient(135deg, #203494 0%, #2c56cf 100%);
    --navy: linear-gradient(135deg, #1c1b20 0%, #1e2434 45%, #2e437a 100%);
    --series-1: #7a95e8;
    --good: #4cc27f;
    --good-soft: #17301f;
    --warn: #e0a83a;
    --warn-soft: #362b12;
    --bad: #ec6b6b;
    --bad-soft: #3a1c1c;
    --neutral-soft: #2a2e3b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15161c;
  --surface: #1e2028;
  --surface-2: #262a36;
  --border: #323748;
  --text: #f7f8fc;
  --text-2: #c3c8d6;
  --muted: #9b9ea8;
  --accent: #7a95e8;
  --accent-ink: #ffffff;
  --accent-soft: #232c4a;
  --gradient: linear-gradient(135deg, #203494 0%, #2c56cf 100%);
  --navy: linear-gradient(135deg, #1c1b20 0%, #1e2434 45%, #2e437a 100%);
  --series-1: #7a95e8;
  --good: #4cc27f;
  --good-soft: #17301f;
  --warn: #e0a83a;
  --warn-soft: #362b12;
  --bad: #ec6b6b;
  --bad-soft: #3a1c1c;
  --neutral-soft: #2a2e3b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: block; padding: 18px 18px 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
nav .group { padding: 14px 18px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 18px; color: var(--text-2); border-left: 3px solid transparent;
}
nav a:hover { background: var(--surface-2); text-decoration: none; }
nav a.active { color: var(--text); background: var(--accent-soft); border-left-color: var(--accent); font-weight: 600; }
nav a .count { margin-left: auto; font-size: .75rem; color: var(--muted); }
.sidebar-foot { margin-top: auto; padding: 14px 18px; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.menu-btn { display: none; }
main { padding: 24px 28px 60px; max-width: 1500px; width: 100%; }
main:focus { outline: none; }

/* Suche */
.search { position: relative; flex: 1; max-width: 520px; }
.search input { width: 100%; }
.search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); max-height: 420px; overflow-y: auto; z-index: 30;
}
.search-results a { display: flex; gap: 10px; padding: 8px 12px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); text-decoration: none; }
.search-results .kind { color: var(--muted); font-size: .8rem; margin-left: auto; }

/* Formelemente */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=search], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=date], select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { width: 100%; resize: vertical; }
button { cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; padding: 7px 12px; white-space: nowrap; color: var(--text);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn-ghost { border: none; background: none; padding: 6px 8px; border-radius: 6px; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }

/* Seitenkopf */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search] { min-width: 220px; flex: 1; max-width: 340px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button { border: none; background: var(--surface); padding: 6px 12px; }
.segmented button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.kpi .label { color: var(--text-2); font-size: .85rem; }
.kpi .value { font-size: 1.6rem; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi .hint { color: var(--muted); font-size: .8rem; }
.kpi a { color: inherit; }
.banner { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Tabellen */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface); position: sticky; top: 0; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 480px; }
tr.done td { color: var(--muted); }
tr.done .subject { text-decoration: line-through; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; background: var(--neutral-soft); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--accent-soft); color: var(--accent); }
.overdue { color: var(--bad); font-weight: 600; }

/* Detailansicht */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
dl.fields { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
dl.fields dt { color: var(--muted); }
dl.fields dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.section { margin-top: 16px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.section-head h2 { margin: 0; }
.section-head .btn { margin-left: auto; }
.stepper { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 16px; }
.stepper button { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 999px; }
.stepper button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper button.won.on { background: var(--good); border-color: var(--good); }
.stepper button.lost.on { background: var(--bad); border-color: var(--bad); }
.quick-log { display: grid; grid-template-columns: 1fr; gap: 8px; }
.quick-log .row { display: flex; gap: 8px; }
.quick-log .row > * { flex: 1; }
.rice { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rice .score { font-size: 2rem; font-weight: 700; }
.rice .formula { color: var(--muted); font-size: .85rem; }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.column { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 160px; border: 2px dashed transparent; }
.column.over { border-color: var(--accent); }
.column-head { display: flex; align-items: baseline; gap: 6px; padding: 2px 4px 10px; }
.column-head strong { font-size: .9rem; }
.column-head .meta { margin-left: auto; color: var(--muted); font-size: .8rem; text-align: right; }
.board-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  cursor: grab; box-shadow: var(--shadow);
}
.board-card:hover { border-color: var(--accent); }
.board-card.dragging { opacity: .5; }
.board-card .title { font-weight: 600; color: var(--text); display: block; margin-bottom: 4px; }
.board-card .line { display: flex; gap: 8px; justify-content: space-between; color: var(--text-2); font-size: .82rem; flex-wrap: wrap; }

/* Diagramme */
.bars-h { display: grid; grid-template-columns: max-content 1fr max-content; gap: 8px 10px; align-items: center; }
.bars-h .track { height: 12px; position: relative; }
.bars-h .bar { height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars-h .val { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: .85rem; text-align: right; }
.bars-v { display: flex; align-items: flex-end; gap: 6px; height: 170px; border-bottom: 1px solid var(--border); padding-top: 16px; }
.bars-v .col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.bars-v .bar { width: 100%; max-width: 34px; margin: 0 auto; background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars-v .col:hover .bar { filter: brightness(1.15); }
.bars-v-labels { display: flex; gap: 6px; margin-top: 4px; }
.bars-v-labels span { flex: 1; text-align: center; font-size: .72rem; color: var(--muted); }
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface); padding: 4px 8px; border-radius: 6px; font-size: .78rem; white-space: pre; z-index: 5; pointer-events: none;
}
.stack { display: flex; height: 14px; gap: 2px; margin: 6px 0 10px; }
.stack div { border-radius: 4px; min-width: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: baseline; }
ul.plain li:last-child { border-bottom: none; }
ul.plain li .grow { flex: 1; min-width: 0; }

/* Aufgaben */
.task-group { margin-bottom: 18px; }
.task-group h2 { display: flex; gap: 8px; align-items: baseline; }
.task { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: none; }
.task input[type=checkbox] { width: 18px; height: 18px; }
.task .grow { flex: 1; min-width: 0; }
.task .refs { font-size: .82rem; color: var(--muted); }
.quick-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.quick-add input[name=subject] { flex: 1; min-width: 220px; }

/* Dialog */
dialog { border: none; border-radius: var(--radius); padding: 0; width: min(760px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.modal-head { padding: 18px 22px 0; display: flex; align-items: center; }
.modal-head .btn-ghost { margin-left: auto; font-size: 1.2rem; }
.modal-body { padding: 16px 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .85rem; color: var(--text-2); margin-bottom: 4px; }
.field input:not([type=checkbox]), .field select { width: 100%; }
.field .err { color: var(--bad); font-size: .8rem; margin-top: 3px; }
.field .help { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.field.check label { display: flex; gap: 8px; align-items: center; margin-top: 24px; color: var(--text); }
.req { color: var(--bad); }
pre.md { white-space: pre-wrap; background: var(--surface-2); padding: 14px; border-radius: 8px; font-size: .85rem; max-height: 50vh; overflow: auto; }

/* Toasts */
#toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--surface); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 360px; animation: fade .2s; }
.toast.error { background: var(--bad); color: #fff; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* Responsiv */
@media (max-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 10px 16px; }
  main { padding: 16px 16px 60px; }
  .grid.two { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  dl.fields { grid-template-columns: 1fr; gap: 2px; }
  dl.fields dd { margin-bottom: 8px; }
  .toolbar input[type=search] { max-width: none; }
  /* verhindert das automatische Hineinzoomen von iOS-Safari beim Tippen */
  input, select, textarea { font-size: 16px; }
}

/* Anmeldung */
.login { max-width: 400px; margin: 40px auto; }
.login h1 { margin-bottom: 6px; }
.login .err { color: var(--bad); font-size: .85rem; }
.login input { width: 100%; }

/* Gesperrt: nur die Login-Seite, keine Navigation */
body.locked .sidebar, body.locked .topbar { display: none; }
body.locked main { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding-top: 16px; }
body.locked .login { margin: 0 auto; width: 100%; }

/* Ladebalken */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 200; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  transition: opacity .15s; }
body.loading #progress { opacity: 1; animation: progress 1s linear infinite; }
body.loading main { cursor: progress; }
@keyframes progress { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { body.loading #progress { animation: none; background: var(--accent); } }

/* ================= RideBuddy-Design (nach Produktvorstellung) ================= */
h1 { font-weight: 500; letter-spacing: -.02em; }
h2, h3 { font-weight: 700; letter-spacing: -.01em; }
.kpi .value { font-weight: 700; letter-spacing: -.02em; }

/* Marke: R-Bildzeichen + Wortmarke mit blauer Unterstreichung */
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 14px; }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; background: url("/logo-r.png") center / contain no-repeat; }
.brand-word { display: flex; flex-direction: column; line-height: 1.1; }
.brand-word b { font-size: 1.15rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand-word b::after { content: ""; display: block; width: 62%; height: 3px; margin-top: 3px; border-radius: 2px; background: var(--accent); }
.brand-word small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { background-image: url("/logo-r-white.png"); } }
:root[data-theme="dark"] .brand-mark { background-image: url("/logo-r-white.png"); }

/* Navigation: Gruppen wie die Kapitel-Kicker der Präsentation */
nav .group { padding: 18px 22px 6px; color: var(--accent); font-weight: 600; letter-spacing: .14em; font-size: .68rem; }
nav a { margin: 2px 10px; padding: 8px 12px; border-left: none; border-radius: var(--radius-sm); }
nav a.active { background: var(--accent-soft); color: var(--accent); }

/* Buttons als Pills, Hauptaktion im RideBuddy-Blauverlauf */
.btn { border-radius: 100px; padding: 8px 16px; font-weight: 600; }
.btn.primary { background: var(--gradient); border-color: transparent; box-shadow: 0 6px 16px rgba(40, 71, 178, .25); }
.btn.primary:hover { filter: brightness(1.08); background: var(--gradient); }
.btn-ghost { border-radius: 100px; }
.segmented { border-radius: 100px; padding: 2px; gap: 2px; }
.segmented button { border-radius: 100px; }
.segmented button.on { background: var(--gradient); color: #fff; }
.stepper button.on { background: var(--gradient); border-color: transparent; }
.badge { font-weight: 600; }

/* Karten und Board */
.board-card { border-radius: 12px; }
.column { border-radius: var(--radius); }
.toast { border-radius: 12px; }
pre.md { border-radius: var(--radius-sm); }
.kpi { position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--gradient); }
.banner { background: var(--accent-soft); border-color: transparent; }
input:focus, select:focus, textarea:focus { outline-color: var(--accent); }

/* Login: dunkler Navy-Verlauf wie die Titelfolien */
body.locked { background: var(--navy); }
body.locked #progress { background-image: linear-gradient(90deg, transparent, #7a95e8, transparent); }
.login { padding: 0; overflow: hidden; border: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.login .login-head { background: var(--gradient); color: #fff; padding: 22px 24px; display: flex; align-items: center; gap: 14px; }
.login .login-head img { width: 34px; height: 40px; object-fit: contain; }
.login .login-head h1 { color: #fff; margin: 0; font-size: 1.3rem; font-weight: 600; }
.login .login-head small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.login .login-body { padding: 20px 24px 24px; }
.login .btn.primary { width: 100%; justify-content: center; padding: 11px 16px; }

/* ================= Kundenportal (öffentlich) ================= */
body.portal { background: var(--bg); }
.portal-wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.portal-hero { background: var(--navy); color: #fff; padding: 28px 0 56px; }
.portal-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.portal-brand img { width: 26px; height: 30px; object-fit: contain; }
.portal-kicker { margin: 36px 0 8px; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #a9b3d1; font-weight: 600; }
.portal-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 400; margin: 0 0 12px; }
.portal-intro { color: #c3c8d6; max-width: 640px; font-size: 1.02rem; margin: 0; }
.portal-main { margin-top: -32px; display: grid; gap: 28px; padding-bottom: 40px; }
.portal-form-card { padding: 24px; }
.portal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.portal-form .full { grid-column: 1 / -1; }
.portal-form .field input, .portal-form textarea { width: 100%; }
.portal-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.portal .err { color: var(--bad); font-size: .82rem; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.portal-thanks h3 { font-size: 1.2rem; margin-top: 8px; }
.portal-roadmap > h2 { font-size: 1.3rem; margin-bottom: 4px; }
.portal-features { display: grid; gap: 12px; margin-top: 14px; }
.portal-feature { display: flex; gap: 18px; align-items: flex-start; }
.portal-votes { min-width: 64px; text-align: center; padding: 8px 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.portal-votes strong { display: block; font-size: 1.4rem; line-height: 1.1; }
.portal-votes span { font-size: .72rem; }
.portal-feature-body { flex: 1; min-width: 0; }
.portal-feature-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.portal-feature-head h3 { margin: 0; font-size: 1.02rem; }
.portal-feature-body p { margin: 6px 0 10px; }
.portal-done { color: var(--good); font-weight: 600; }
.portal-foot { padding: 0 20px 32px; }
.portal-vote .field { margin-bottom: 10px; }
.portal-vote .field input, .portal-vote textarea { width: 100%; }
@media (max-width: 640px) {
  .portal-form { grid-template-columns: 1fr; }
  .portal-feature { gap: 12px; }
  .portal-votes { min-width: 54px; }
}

/* ================= Automatisierungen ================= */
.automation { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.automation:last-child { border-bottom: none; }
.automation .grow { flex: 1; min-width: 0; }
.automation p { margin: 2px 0 0; }
.automation.off strong { color: var(--muted); }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; margin-top: 2px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 100px; background: var(--border); transition: background .15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
