/* Männerriege Umfrage: gemeinsame Gestaltung für Umfrage und Auswertung.
   Schlicht: weiße Fläche, ein Blau aus dem Vereinslogo, eine Schrift. */

@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #FFFFFF; --plane: #F5F7FA; --surface: #FFFFFF;
  --ink: #121A2E; --ink-2: #3C4558; --muted: #5E6779;
  --line: #E3E7EE; --line-strong: #C9D0DC;
  --accent: #164195; --accent-hover: #0F2F6E; --accent-soft: #EDF2FB; --on-accent: #FFFFFF;
  --danger: #B4232B; --warn-bg: #FFF4DE; --warn-ink: #6B4500; --ok-bg: #E7F4EA; --ok-ink: #1D5B2C;
  --logo-bg: #FFFFFF;
  --bar: #256ABF;
  --neg2: #C93C3C; --neg1: #EE8E88; --mid: #D5D7DC; --pos1: #86B6EF; --pos2: #256ABF;
  --on-neg2: #FFFFFF; --on-neg1: #121A2E; --on-mid: #121A2E; --on-pos1: #121A2E; --on-pos2: #FFFFFF;
  --ord1: #104281; --ord2: #256ABF; --ord3: #5598E7; --ord4: #86B6EF;
  --on-ord1: #FFFFFF; --on-ord2: #FFFFFF; --on-ord3: #121A2E; --on-ord4: #121A2E;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1320; --plane: #0A0E18; --surface: #151B2B;
    --ink: #E8ECF3; --ink-2: #C4CBD8; --muted: #9AA4B6;
    --line: #262E42; --line-strong: #38415A;
    --accent: #8FB0EE; --accent-hover: #A9C2F2; --accent-soft: #1A2440; --on-accent: #0E1320;
    --danger: #FF7A85; --warn-bg: #2A2214; --warn-ink: #F3D49B; --ok-bg: #12291A; --ok-ink: #9AD8A8;
    --bar: #6DA7EC;
    --neg2: #E57373; --neg1: #9B3B3B; --mid: #4A505C; --pos1: #1C5CAB; --pos2: #6DA7EC;
    --on-neg2: #0E1320; --on-neg1: #E8ECF3; --on-mid: #E8ECF3; --on-pos1: #E8ECF3; --on-pos2: #0E1320;
    --ord1: #86B6EF; --ord2: #5598E7; --ord3: #2A78D6; --ord4: #184F95;
    --on-ord1: #0E1320; --on-ord2: #0E1320; --on-ord3: #0E1320; --on-ord4: #E8ECF3;
    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(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tnum { font-variant-numeric: tabular-nums; }

.logo { display: block; width: 32px; height: auto; background: var(--logo-bg); border-radius: 6px; }
.logo-lg { width: 52px; border-radius: 10px; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 12px; font-size: 17px; font-weight: 700; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); } }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
@media (hover: hover) { .btn-secondary:hover { border-color: var(--accent); } }
.btn-quiet { background: none; color: var(--muted); padding: 0 8px; font-weight: 600; }
@media (hover: hover) { .btn-quiet:hover { color: var(--ink); } }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 15px; border-radius: 8px; font-weight: 600; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--accent); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Umfrage ---------- */
body.survey { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.survey .wrap { max-width: 640px; }
.s-head { display: flex; align-items: center; gap: 10px; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
.s-head strong { font-size: 16px; }
.prog { display: grid; gap: 8px; padding-top: 16px; }
.prog-track { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .35s ease; }
.prog-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.s-main { flex: 1; display: flex; flex-direction: column; gap: 14px; padding-top: 24px; padding-bottom: 28px; }
.s-main:focus { outline: none; }
.screen { display: flex; flex-direction: column; gap: 14px; animation: rise .22s ease-out; }
@keyframes rise { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.title-xl { font-size: clamp(30px, 8vw, 38px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: 17px; color: var(--ink-2); max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-2); font-size: 15px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts svg { flex: none; }
.note { display: grid; gap: 6px; padding: 16px; border-radius: 12px; background: var(--plane); }
.note h2 { font-size: 16px; font-weight: 700; }
.screen > h2 { font-size: 19px; font-weight: 700; margin-top: 8px; }
.note p { font-size: 15px; color: var(--ink-2); }
.sec-intro { font-size: 15px; color: var(--muted); }
.q-title { font-size: clamp(22px, 5.6vw, 26px); line-height: 1.25; font-weight: 700; outline: none; }
.help { font-size: 15px; color: var(--muted); margin-top: -4px; }
.context { font-size: 15px; color: var(--ink-2); background: var(--plane); border-radius: 10px; padding: 10px 14px; }

.opts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.opt { position: relative; display: flex; gap: 12px; align-items: flex-start; min-height: 52px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s; }
@media (hover: hover) { .opt:hover { border-color: var(--line-strong); } }
.opt input { flex: none; margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.is-disabled { opacity: .45; cursor: not-allowed; }
.opt-text { display: flex; flex-direction: column; min-width: 0; }
.opt-label { font-size: 16px; }
.opt:has(input:checked) .opt-label { font-weight: 600; }
.opt-sub { font-size: 14px; color: var(--muted); }

.legend-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.mrows { display: flex; flex-direction: column; gap: 18px; }
.mrow { display: flex; flex-direction: column; gap: 8px; }
.mrow-label { font-size: 16px; }
.seg { display: grid; gap: 6px; }
.seg-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seg-5.has-na { grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(0, 1.3fr); }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-11 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (min-width: 560px) { .seg-11 { grid-template-columns: repeat(11, minmax(0, 1fr)); } }
.seg-btn { position: relative; display: block; min-width: 0; cursor: pointer; }
.seg-btn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg-btn span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; font-weight: 600; text-align: center; line-height: 1.15; font-variant-numeric: tabular-nums; transition: background-color .15s, border-color .15s; }
.seg-3 .seg-btn span { font-size: 14px; }
.seg-btn .na { font-size: 13px; color: var(--muted); }
@media (hover: hover) { .seg-btn:hover span { border-color: var(--line-strong); } }
.seg-btn input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg-btn input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

textarea, .field { width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 16px; line-height: 1.45; resize: vertical; }
textarea:focus, .field:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea::placeholder, .field::placeholder { color: var(--muted); }
.field-label { font-size: 15px; font-weight: 600; }
.field-wrap { display: flex; flex-direction: column; gap: 6px; }
.count { font-size: 13px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.q-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmt { display: flex; flex-direction: column; gap: 8px; }
.err { color: var(--danger); font-weight: 600; font-size: 15px; }

.s-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); z-index: 5; }
.s-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: max(16px, calc(10px + env(safe-area-inset-bottom, 0px))); }
.s-bar .btn-next { flex: 1; max-width: 260px; margin-left: auto; }
.s-bar .btn-start { flex: 1; max-width: none; }
.s-foot { padding-top: 6px; padding-bottom: 18px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.s-foot a { color: var(--muted); }

.done-icon { width: 56px; height: 56px; border-radius: 28px; background: var(--accent-soft); display: grid; place-items: center; }

/* ---------- Admin ---------- */
body.admin { background: var(--plane); }
.admin .wrap { max-width: 1200px; }
.a-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 24px; padding-bottom: 8px; }
.a-brand { display: flex; align-items: center; gap: 14px; }
.a-brand h1 { font-size: 26px; line-height: 1.15; }
.a-brand .logo { width: 44px; }
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--line); }
.tabs button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 15px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 26, 46, .14); }
.tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.a-main { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; padding-bottom: 56px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.toolbar label { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
select.field { width: auto; min-height: 40px; padding: 0 10px; border-radius: 10px; font-size: 15px; }
.banner { padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.banner-warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner-ok { background: var(--ok-bg); color: var(--ok-ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.kpi-label { font-size: 14px; color: var(--muted); }
.kpi-value { font-size: 32px; font-weight: 700; line-height: 1.1; }
.kpi-sub { font-size: 14px; color: var(--ink-2); }
.meter { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; }
.meter > div { height: 100%; background: var(--bar); border-radius: 3px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 16px; }
.grid-top { align-items: start; }
.tool-actions { display: inline-flex; gap: 8px; margin-left: auto; }
.roster-note { font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.card.span { grid-column: 1 / -1; }
.card-head { display: flex; flex-direction: column; gap: 2px; }
.card-head h2, .card-head h3 { font-size: 18px; font-weight: 700; }
.card-head .qid { color: var(--accent); margin-right: 6px; }
.card-meta { font-size: 14px; color: var(--muted); }
.sec-title { font-size: 20px; font-weight: 700; padding-top: 10px; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-label { font-size: 15px; }
.bar-line { display: flex; align-items: center; gap: 8px; border-left: 1px solid var(--line-strong); min-height: 16px; }
.bar-fill { height: 14px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 0; }
.bar-val { font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.stack { display: flex; gap: 2px; height: 26px; }
.stack > div { min-width: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border-radius: 3px; }
.lk-rows { display: flex; flex-direction: column; gap: 12px; }
.lk-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
@media (min-width: 760px) { .lk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 72px; align-items: center; gap: 16px; } }
.lk-mean { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) { .lk-mean { text-align: right; } }

.cols { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; border-bottom: 1px solid var(--line-strong); }
.cols.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; min-width: 0; }
.col-bar { width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; }
.col-val { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.col-axis { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; font-size: 13px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.col-axis.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 8px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.tbl td.num, .tbl th.num { text-align: center; font-variant-numeric: tabular-nums; }
.tbl .cellbox { display: grid; place-items: center; min-height: 30px; border-radius: 6px; font-weight: 700; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-open { background: var(--plane); color: var(--muted); border: 1px solid var(--line); }
.link-cell { display: flex; gap: 8px; align-items: center; min-width: 0; }
.link-cell code { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }

.quotes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.quotes li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); line-height: 1.45; white-space: pre-line; }
details.cmts summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
details.cmts[open] summary { margin-bottom: 4px; }

.login { max-width: 420px; margin: 10vh auto 0; }
.login .card { gap: 16px; }

@media print {
  body.admin { background: #fff; color: #000; }
  .tabs, .toolbar, .no-print, .btn { display: none !important; }
  .card { break-inside: avoid; border-color: #ccc; }
  .a-main { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
