/* 200 % Formulare – Design wie der Karriere-Anker-Fragebogen */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand:   #1a3a5c;
  --accent:  #c8952a;
  --light:   #f4f7fb;
  --border:  #dce4ef;
  --text:    #1e2a38;
  --muted:   #6b7e93;
  --white:   #ffffff;
  --success: #2e7d56;
  --error:   #b3261e;
  --radius:  10px;
  --shadow:  0 2px 14px rgba(0,0,0,.10);
}
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 15px; color: var(--text); background: var(--light); line-height: 1.6; }
a { color: var(--brand); }
.wrapper { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.wrapper.wide { max-width: 1100px; }
.muted { color: var(--muted); font-weight: 400; }

/* Header */
.site-header { background: var(--brand); color: var(--white); padding: 22px 32px; border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; gap: 20px; }
.site-header img { height: 40px; width: auto; filter: brightness(0) invert(1); }
.site-header h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.3px; color: var(--white); }
.site-header .kicker { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--accent); }
.site-header .header-link { margin-left: auto; color: var(--white); font-size: .9rem; }
.accent-bar { height: 4px; background: var(--accent); border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 28px; }
@media (max-width: 560px) {
  .site-header { padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-header img { height: 30px; }
  .site-header h1 { font-size: 1.2rem; }
}

/* Card */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-bottom: 24px; }
.card h2 { font-size: 1.15rem; color: var(--brand); border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 16px; }
.card p + p { margin-top: 12px; }
@media (max-width: 560px) { .card { padding: 22px 18px; } }

/* Scale legend */
.scale-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 6px; padding: 14px 18px; background: var(--light); border-radius: 8px; border-left: 4px solid var(--accent); font-size: .9rem; }
.scale-legend .item { display: flex; align-items: center; gap: 8px; }
.scale-dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--white); background: var(--brand); flex-shrink: 0; }

/* Questions */
.question-block { display: flex; flex-direction: column; gap: 14px; }
.question-row { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; transition: border-color .2s, box-shadow .2s; }
.question-row:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(26,58,92,.08); }
.question-row.answered { border-color: #b0c8e8; }
.question-row.invalid { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.question-row.followup { background: #fffbf4; border-color: var(--accent); }
.question-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.q-num { min-width: 28px; height: 28px; background: var(--brand); color: var(--white); border-radius: 50%; font-weight: 700; font-size: .82rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.q-num.alt { background: var(--accent); }
.q-text { font-size: .97rem; }

.rating-group { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 40px)); gap: 6px; padding-left: 40px; }
.rating-group input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.rating-group label { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; cursor: pointer; color: var(--muted); transition: all .15s; user-select: none; }
.rating-group label:hover { border-color: var(--accent); color: var(--accent); }
.rating-group input[type="radio"]:checked + label { background: var(--brand); border-color: var(--brand); color: var(--white); }
.rating-group input[type="radio"]:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.rating-ends { display: flex; justify-content: space-between; padding-left: 40px; margin-top: 4px; font-size: .78rem; color: var(--muted); max-width: calc(40px + var(--n, 10) * 46px); }
@media (max-width: 560px) {
  .rating-group { padding-left: 0; gap: 4px; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); }
  .rating-group label { font-size: .8rem; border-width: 1.5px; }
  .rating-ends { padding-left: 0; }
}

.section-title { font-size: 1rem; color: var(--brand); font-weight: 700; margin: 26px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-title:first-child { margin-top: 0; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Progress */
#progress-container { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 32px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.07); margin: -4px 0 20px; border-radius: 8px; }
#progress-label { font-size: .85rem; color: var(--muted); white-space: nowrap; }
#progress-bar-bg { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
#progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 4px; transition: width .3s; }
#progress-count { font-size: .85rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
@media (max-width: 560px) { #progress-container { padding: 10px 16px; } #progress-label { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; text-decoration: none; font-family: inherit; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: #0f2540; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: #a87820; }
.btn-outline { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.action-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }

/* Steps */
.step { display: none; }
.step.active { display: block; }
.hidden { display: none !important; }

/* Form fields */
.personal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
@media (max-width: 560px) { .personal-form { grid-template-columns: 1fr; } }
.form-group label, .field-label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: .95rem; color: var(--text); font-family: inherit; transition: border-color .2s; background: var(--white); }
.form-group textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,58,92,.1); }
.form-group.invalid input, .form-group.invalid textarea { border-color: var(--error); }
.form-group .hint { font-size: .83rem; color: var(--muted); margin: -2px 0 6px; }
.req { color: var(--accent); }
.field-error { color: var(--error); font-size: .83rem; margin-top: 4px; }
.error-text { color: var(--error); font-weight: 600; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #3a4a5c; margin-top: 16px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.consent.invalid { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Chips (Geräte, Themen) */
.chip-group { margin-bottom: 14px; }
.chip-group .field-label { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 14px; border: 2px solid var(--border); border-radius: 20px; font-size: .9rem; cursor: pointer; transition: all .15s; user-select: none; background: var(--white); }
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip input:disabled + span { opacity: .4; cursor: not-allowed; }
.chips.topics .chip input:checked + span { background: var(--accent); border-color: var(--accent); }
.pick-counter { font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.pick-counter.done { color: var(--success); }

/* Info box */
.info-box { background: #fff8ec; border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 18px; font-size: .93rem; margin-bottom: 16px; }
.form-alert { background: #fdecea; border-left: 4px solid var(--error); border-radius: 6px; padding: 12px 16px; margin-top: 18px; color: var(--error); font-weight: 600; }

/* Result */
.result-hero { text-align: center; padding: 8px 0 4px; }
.result-hero .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.result-hero h2 { border: none; font-size: 1.6rem; margin: 4px 0 8px; padding: 0; }
.score-ring { --p: 0; width: 140px; height: 140px; border-radius: 50%; margin: 18px auto 10px; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--border) 0); transition: --p 1s; }
.score-ring::before { content: ""; grid-area: 1 / 1; width: 112px; height: 112px; border-radius: 50%; background: var(--white); }
.score-ring span { grid-area: 1 / 1; font-size: 2.2rem; font-weight: 800; color: var(--brand); line-height: 1; text-align: center; }
.score-ring small { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
.area-result { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.area-result:last-child { border-bottom: none; }
.area-result .name { flex: 1; min-width: 0; font-weight: 600; }
.area-result .name small { display: block; font-weight: 400; color: var(--accent); font-size: .8rem; }
.bar-wrap { flex: 1.5; display: flex; align-items: center; gap: 10px; }
.bar-bg { flex: 1; height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 7px; transition: width .8s ease; background: linear-gradient(90deg, var(--brand), #3a6ea8); }
.bar-fill.weak { background: linear-gradient(90deg, var(--accent), #e8b040); }
.bar-score { font-weight: 700; min-width: 32px; text-align: right; color: var(--brand); }
@media (max-width: 560px) { .area-result { flex-direction: column; align-items: stretch; gap: 6px; } }
.thanks { text-align: center; padding: 20px 0; }
.thanks .check { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: var(--white); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 14px; }

/* Admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tile { text-decoration: none; color: inherit; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--accent); margin-bottom: 16px; padding-bottom: 8px; }
.list-head h2 { border: none; margin: 0; padding: 0; }
.list-head .btn { padding: 7px 14px; font-size: .88rem; }
.band-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.band-stats div { background: var(--light); border-radius: 8px; padding: 10px 12px; }
.band-stats strong { display: block; font-size: 1.4rem; color: var(--brand); }
.band-stats span { font-size: .8rem; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; padding: 8px; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:hover { background: var(--light); }
@media (max-width: 700px) { .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; } }
