/* ARVP – Armored Reconnaissance Vehicle Platoon */
:root {
  --bg: #0e0c0b;
  --bg-2: #171311;
  --panel: #1d1815;
  --panel-2: #251f1b;
  --line: #3a2f28;
  --text: #ece4dc;
  --muted: #a8998c;
  --orange: #e2701f;
  --orange-2: #f08a3a;
  --sand: #c9773d;
  --yellow: #e8b628;
  --red: #c4423a;
  --green: #4fae5b;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font-head: 'Russo One', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg) radial-gradient(1200px 600px at 50% -200px, rgba(226, 112, 31, .12), transparent 70%) no-repeat;
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  overflow-wrap: break-word;
  hyphens: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; letter-spacing: .02em; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-transform: uppercase; }
h2 { font-size: 1.5rem; color: var(--orange-2); text-transform: uppercase; }
h3 { font-size: 1.1rem; color: var(--yellow); }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: #0008; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 12, 11, .92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--orange);
}
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); letter-spacing: .08em; }
.brand:hover { text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand .brand-fallback { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--orange); display: grid; place-items: center; font-size: .7rem; background: #ece4dc; color: #111; }
.brand span small { display: block; font-family: var(--font-body); font-size: .68rem; color: var(--muted); letter-spacing: .05em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
@media (max-width: 1320px) { .brand span small { display: none; } }
.nav a, .nav button.nav-drop {
  color: var(--text); padding: 8px 10px; border-radius: 6px; font: 600 .9rem var(--font-body); white-space: nowrap;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button.nav-drop:hover { background: var(--panel-2); text-decoration: none; }
.nav a.active { color: var(--orange-2); }
.nav .login-link { border: 1px solid var(--orange); color: var(--orange-2); margin-left: 6px; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow);
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 10px; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 1100px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); border-bottom: 2px solid var(--orange); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: 0; background: none; padding: 0 0 0 12px; }
  .nav button.nav-drop { text-align: left; color: var(--muted); cursor: default; }
  .nav .login-link { margin: 8px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(70vh, 640px); display: grid; align-items: end; overflow: hidden; border-bottom: 2px solid var(--orange); }
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,12,11,0) 40%, rgba(14,12,11,.95) 100%); }
.hero .container { position: relative; z-index: 1; padding: 40px 0; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero .hero-logo { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 6px 18px #000a); }
.hero p { font-size: 1.1rem; max-width: 640px; color: #f3ebe4; text-shadow: 0 2px 8px #000; margin: 0; }

.page-head { padding: 48px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; background: linear-gradient(180deg, rgba(226,112,31,.08), transparent); }
.page-head p { color: var(--muted); max-width: 760px; margin: 0; }
.eyebrow { font: 700 .75rem var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }

/* ---------- Layout ---------- */
section { margin-bottom: 48px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

.grid-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid-quick { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3:first-child, .card h2:first-child { margin-top: 0; }
.card.accent { border-top: 3px solid var(--orange); }
a.card { color: var(--text); display: block; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--orange); text-decoration: none; }
a.card p { color: var(--muted); margin: 0; }

.with-toc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.toc { position: sticky; top: 88px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: .9rem; }
.toc strong { display: block; font-family: var(--font-head); font-weight: 400; color: var(--orange-2); margin-bottom: 6px; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; }
.toc a { display: block; color: var(--muted); padding: 4px 6px; border-radius: 4px; }
.toc a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
@media (max-width: 900px) { .with-toc { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }

/* ---------- Regelwerk ---------- */
.rules { list-style: none; padding: 0; margin: 0 0 1rem; }
.rules li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rules li:nth-child(odd) { background: rgba(255,255,255,.015); }
.rules li .par { font: 700 .85rem ui-monospace, monospace; color: var(--orange-2); padding-top: 2px; }
.rules li.sub { padding-left: 32px; }
.rules li.void { color: var(--muted); font-style: italic; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel-2); font-weight: 700; color: var(--yellow); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td.center, th.center { text-align: center; }

/* ---------- Badges & Steps ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.orange { background: rgba(226,112,31,.15); border-color: var(--orange); color: var(--orange-2); }
.badge.green { background: rgba(79,174,91,.15); border-color: var(--green); color: #7fd68a; }
.badge.red { background: rgba(196,66,58,.15); border-color: var(--red); color: #ee8b84; }
.badge.yellow { background: rgba(232,182,40,.15); border-color: var(--yellow); color: var(--yellow); }

.status { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.status .dot { width: 28px; height: 28px; border-radius: 6px; flex: none; }
.status h3 { margin: 0 0 4px; }
.status p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1rem; }
.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 52px; border-left: 2px solid var(--line); margin-left: 16px; }
.steps li::before { content: counter(step); position: absolute; left: -17px; top: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #111; display: grid; place-items: center; font-weight: 800; }
.dialog { background: #0007; border-left: 3px solid var(--yellow); padding: 10px 14px; border-radius: 0 6px 6px 0; font-style: italic; }
.note { background: rgba(232,182,40,.08); border: 1px solid rgba(232,182,40,.4); border-radius: var(--radius); padding: 12px 16px; color: #f2dd9c; margin: 0 0 1rem; }
.note.info { background: rgba(226,112,31,.08); border-color: rgba(226,112,31,.4); color: #f6c39a; }

/* ---------- Formulare & Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--orange);
  background: var(--orange); color: #140c06; font: 700 .92rem var(--font-body); cursor: pointer;
}
.btn:hover { background: var(--orange-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--orange-2); }
.btn.ghost:hover { background: rgba(226,112,31,.12); }
.btn.danger { background: transparent; border-color: var(--red); color: #ee8b84; }
.btn.danger:hover { background: rgba(196,66,58,.15); }
.btn.small { padding: 5px 10px; font-size: .82rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 4px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--orange); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { margin: 0; min-width: 180px; }

.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 600; }
.msg.error { background: rgba(196,66,58,.15); border: 1px solid var(--red); color: #f2a19b; }
.msg.ok { background: rgba(79,174,91,.15); border: 1px solid var(--green); color: #94e09e; }
.msg.warn { background: rgba(232,182,40,.12); border: 1px solid var(--yellow); color: var(--yellow); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Mitglieder-Matrix ---------- */
.matrix th.rot { height: 175px; white-space: nowrap; vertical-align: bottom; padding: 6px 4px; }
.matrix th.rot > div { writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto; font-size: .78rem; max-height: 165px; overflow: hidden; text-overflow: ellipsis; }
.matrix th.cat { text-align: center; font-family: var(--font-head); font-weight: 400; color: var(--orange-2); border-left: 1px solid var(--line); }
.matrix td.tick { text-align: center; padding: 6px; border-left: 1px solid rgba(58,47,40,.4); }
.matrix td.first-of-cat, .matrix th.first-of-cat { border-left: 1px solid var(--line); }
.tick-box { width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--bg-2); color: transparent; font-weight: 900; }
.tick-box.done { background: rgba(79,174,91,.2); border-color: var(--green); color: #7fd68a; }
button.tick-box { cursor: pointer; padding: 0; font: inherit; }
button.tick-box:hover { border-color: var(--orange); }
.matrix td.name { white-space: nowrap; position: sticky; left: 0; background: var(--panel); z-index: 1; }
.matrix th.name { position: sticky; left: 0; z-index: 2; }
.stat { font-family: var(--font-head); font-size: 2rem; color: var(--orange-2); line-height: 1; }

/* ---------- Prüfung ---------- */
.exam-q { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.exam-q h3 { color: var(--text); font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; }
.exam-q .num { color: var(--orange-2); font-family: var(--font-head); margin-right: 6px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; cursor: pointer; background: var(--bg-2); font-weight: 500; color: var(--text); }
.option:hover { border-color: var(--orange); }
.option input { margin-top: 4px; }
.option.correct { border-color: var(--green); background: rgba(79,174,91,.1); }
.option.wrong { border-color: var(--red); background: rgba(196,66,58,.1); }
.timer { position: sticky; top: 72px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--orange); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 16px; }
.timer .time { font-family: var(--font-head); font-size: 1.5rem; color: var(--orange-2); }
.timer .time { text-align: right; line-height: 1.1; font-variant-numeric: tabular-nums; }
.timer .time small { display: block; font-family: var(--font-body); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.timer.low .time { color: var(--red); }
.code-display { font-family: var(--font-head); font-size: 2.2rem; letter-spacing: .25em; color: var(--yellow); }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button { background: none; border: 0; color: var(--muted); font: 700 .95rem var(--font-body); padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; }
.tabs button.active { color: var(--orange-2); border-bottom-color: var(--orange); }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow: auto; }
.list button { text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 9px 12px; cursor: pointer; font: inherit; }
.list button:hover { border-color: var(--orange); }
.list button.active { border-color: var(--orange); background: rgba(226,112,31,.1); }
.list button small { display: block; color: var(--muted); font-size: .78rem; }
.list .cat-label { font: 700 .72rem var(--font-body); letter-spacing: .15em; text-transform: uppercase; color: var(--orange); margin: 10px 0 2px; }
.q-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; background: var(--bg-2); }
.q-item .q-head { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.q-item ol { margin: 6px 0 0; padding-left: 22px; color: var(--muted); }
.q-item ol li.ok { color: #7fd68a; font-weight: 700; }
.modal-back { position: fixed; inset: 0; background: #000b; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .88rem; margin-top: 48px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- Vorschläge (Forum) ---------- */
.forum-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tag-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 5px 12px; font: 600 .85rem var(--font-body); cursor: pointer; }
.chip:hover { border-color: var(--orange); color: var(--text); }
.chip.active { background: rgba(226,112,31,.15); border-color: var(--orange); color: var(--orange-2); }
.post { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.post:hover, .post:focus { border-color: var(--orange); outline: none; }
.post-main { flex: 1; min-width: 0; }
.post h3 { color: var(--text); font-family: var(--font-body); font-weight: 700; font-size: 1.08rem; margin: 0 0 4px; }
.post p { margin: 0 0 8px; }
.post-meta { color: var(--muted); font-size: .85rem; }
.post-meta strong { color: var(--text); }
.vote { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font: 700 1rem var(--font-body); cursor: pointer; }
.vote span { font-size: .85rem; }
.vote:hover { border-color: var(--orange); }
.vote.voted { background: rgba(226,112,31,.18); border-color: var(--orange); color: var(--orange-2); }
.modal-wide { width: min(760px, 100%); }
.thread-body { white-space: normal; line-height: 1.65; }
.reply { border-left: 3px solid var(--line); padding: 8px 0 8px 14px; margin-bottom: 10px; }
.reply .post-meta { margin-bottom: 4px; }

/* ---------- Personal ---------- */
ul.todo { list-style: none; padding: 0; margin: 0; }
ul.todo li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.todo li:last-child { border-bottom: 0; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea, select:disabled { opacity: .7; }

/* ---------- Wiki-Übersicht ---------- */
a.back-link { display: inline-block; text-decoration: none; }
a.back-link:hover { color: var(--orange-2); text-decoration: none; }
.wiki-entry { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; color: var(--text); transition: border-color .15s, background .15s; }
.wiki-entry:hover { border-color: var(--orange); background: var(--panel-2); text-decoration: none; }
.wiki-entry h3 { color: var(--text); font-family: var(--font-body); font-weight: 700; font-size: 1.12rem; margin: 0 0 4px; }
.wiki-entry p { margin: 0; color: var(--muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiki-entry p b { color: var(--orange-2); font-weight: 700; }
.wiki-entry .meta { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Fahrzeug-Wiki ---------- */
.vehicle-card h3 { color: var(--text); margin: 10px 0 2px; }
.vehicle-card p { min-height: 1.4em; }
.vehicle-thumb { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--bg-2) radial-gradient(circle at 50% 120%, rgba(226,112,31,.25), transparent 70%); display: grid; place-items: center; overflow: hidden; position: relative; border: 1px solid var(--line); }
.vehicle-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; object-fit: contain; padding: 10px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
.vehicle-thumb span { font-size: 2.4rem; color: var(--orange-2); opacity: .7; }
.vehicle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.vehicle-aside { position: sticky; top: 88px; }
.vehicle-img { width: 100%; border-radius: 8px; border: 1px solid var(--line); padding: 14px; background: var(--bg-2) radial-gradient(circle at 50% 120%, rgba(226,112,31,.25), transparent 70%); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.stat-tile .muted { font-size: .78rem; }
.stat-tile .stat { font-size: 1.4rem; margin-top: 2px; }
.stat-tile:last-child { grid-column: 1 / -1; }
section.spec { margin-bottom: 24px; }
section.spec h2 { font-size: 1.15rem; }
@media (max-width: 900px) { .vehicle-layout { grid-template-columns: minmax(0, 1fr); } .vehicle-aside { position: static; order: -1; } }
.badge.spec-medic { background: rgba(196,66,58,.12); border-color: #c4423a; color: #f2a19b; }
.badge.spec-eod { background: rgba(110,160,220,.12); border-color: #6ea0dc; color: #a9c8f0; }

/* ---------- Mitgliedskarten ---------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 14px; }
.member-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.member-card.inactive { opacity: .55; }
.mc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.mc-name { font-size: 1.08rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mc-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9rem; }
.mc-cat { margin-top: 12px; }
.mc-cat-head { display: flex; justify-content: space-between; font: 700 .78rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 5px; }
.progress { height: 6px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 8px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-t { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font: 600 .8rem var(--font-body); border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); }
.chip-t.done { background: rgba(79,174,91,.15); border-color: var(--green); color: #94e09e; }
.chip-t.needed { border-color: var(--yellow); color: var(--yellow); }
button.chip-t { cursor: pointer; }
button.chip-t:hover { border-color: var(--orange); color: var(--text); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .85rem; margin: 10px 0 16px; }

/* ---------- Suchleiste ---------- */
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px; margin-bottom: 14px; transition: border-color .15s, box-shadow .15s; }
.search-bar:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(226,112,31,.18); }
.search-bar .search-icon { font-size: 1.4rem; color: var(--orange-2); line-height: 1; }
.search-bar input { border: 0; background: transparent; padding: 12px 0; font-size: 1.05rem; flex: 1; min-width: 0; }
.search-bar input:focus { outline: none; }
.search-count { white-space: nowrap; font-size: .85rem; }

/* Ausbildungsübersicht */
.plan { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.plan-row { display: grid; grid-template-columns: 170px repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.plan-row:first-child { border-top: 0; }
.plan-head { background: var(--bg-2); }
.plan-col { padding: 12px 14px; font-family: var(--font-head); font-size: .95rem; letter-spacing: .02em; border-left: 1px solid var(--line); border-bottom: 3px solid var(--c, var(--line)); }
.plan-rank { padding: 12px 14px; font-weight: 600; font-size: .9rem; display: flex; flex-direction: column; justify-content: center; border-left: 4px solid var(--rc, var(--line)); background: color-mix(in srgb, var(--rc, transparent) 10%, transparent); }
.plan-head .plan-rank { border-left-color: transparent; background: none; }
.plan-rank span { font-family: var(--font-head); font-size: .8rem; color: var(--rc); letter-spacing: .06em; }
.rank-nco { --rc: #4fae5b; } .rank-cpl { --rc: #e58a74; } .rank-enl { --rc: #9aa3ad; }
.col-gen { --c: #8d8d8d; } .col-recon { --c: #4f8a3a; } .col-div { --c: #e2701f; } .col-pilot { --c: #4a76b5; }
.plan-cell { padding: 10px; border-left: 1px solid var(--line); display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; background: color-mix(in srgb, var(--c) 6%, transparent); min-height: 54px; }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--c) 22%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); line-height: 1.25; }
.plan-chip:hover { border-color: var(--c); background: color-mix(in srgb, var(--c) 35%, var(--panel-2)); }
.plan-chip.planned { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; }
.plan-chip small { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
p .plan-chip { --c: #8d8d8d; }
.plan-lead { display: inline-flex; padding: 5px 10px; border-radius: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); }
.card.is-planned { opacity: .75; border-style: dashed; }
.card:target { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (max-width: 860px) {
  .plan-row { display: block; }
  .plan-row.plan-head { display: none; }
  .plan-rank { flex-direction: row; align-items: baseline; gap: 10px; }
  .plan-cell { border-left: 0; border-top: 1px dashed var(--line); min-height: 0; }
  .plan-cell.empty { display: none; }
  .plan-cell::before { content: attr(data-col); flex-basis: 100%; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c); font-weight: 700; }
}
