/* GAMI-Anmeldung – Gestaltung (v3)
   Aufbau nach dem Kindsight-Designsystem: ruhige, helle Fläche, Serifen-Überschriften
   ohne Fettung, weiße Kopfzeile mit Pill-Navigation, dunkler Grund für Fuß- und Einstiegsbereich.
   Farben aus dem GAMI-Logo (Grün #00A88E und seine Abstufungen, Anthrazit #231F20, Grau #918F90).
   Nur Systemschriften: keine externen Font-Server (DSGVO, Content-Security-Policy).
   Farben zentral hier oben in :root ändern. */

:root {
  /* Marke (aus dem Logo) */
  --brand: #00806c;          /* Hauptgrün für Buttons, Links – dunkler als das Logo-Grün für gute Lesbarkeit */
  --brand-hover: #006a5a;
  --brand-logo: #00a88e;     /* Logo-Grün: Akzente, Fokus, Auswahl */
  --brand-mid: #5fc6b1;
  --brand-soft: #dff1e9;
  --brand-softer: #eef8f3;
  --brand-ink: #ffffff;
  --forest: #12352f;         /* dunkler Grund für Fußzeile, Admin-Leiste, Einstieg */
  --forest-2: #1c4a41;

  /* Flächen und Schrift */
  --canvas: #f6f8f6;
  --surface: #ffffff;
  --ink: #231f20;
  --ink-2: #5c5859;
  --ink-3: #8a8788;
  --line: #e1e7e3;
  --line-strong: #c4cfc9;

  /* Plan-Zustände */
  --free: #ffffff;
  --requested-soft: #f3ead2;
  --requested-stripe: #e6d6a8;
  --requested-ink: #6f5517;
  --occupied: #00806c;
  --occupied-soft: #dff1e9;
  --blocked-soft: #eceeed;
  --blocked-stripe: #d9dddb;
  --full-soft: #fde1db;
  --full-stripe: #f6c2b6;
  --full-ink: #8a2f1c;
  --priority: #c4552f;       /* Ringelblume aus dem Designsystem, abgedunkelt */
  --priority-soft: #fcebe4;
  --select: #00a88e;

  --ok: #00806c;
  --warn: #8a6a12;
  --bad: #b3261e;

  --r-input: 4px;
  --r-btn: 10px;
  --r-card: 12px;
  --r-lg: 18px;
  --radius: 10px;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(18, 53, 47, .05), 0 4px 16px rgba(18, 53, 47, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--canvas); color: var(--ink);
  font: 16px/1.55 var(--font);
}
main { flex: 1 0 auto; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand-logo); outline-offset: 2px; }
::selection { background: var(--brand-soft); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1rem; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--brand); }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Kopfzeile: weiß, 72px, Pill-Navigation ---------- */
.topbar {
  background: var(--surface); color: var(--ink);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar .inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand:hover { color: inherit; }
.brand-logo { height: 44px; width: auto; display: block; }
.brand-name {
  font-family: var(--serif); font-size: 1.15rem; color: var(--ink);
  padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 1.2;
}
.topnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topnav a {
  color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 999px;
  font-size: .925rem; font-weight: 500; transition: background .15s, color .15s;
}
.topnav a:hover { background: var(--brand-softer); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-hover); }

.who-am-i { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.who-am-i span { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-am-i button {
  font: inherit; font-size: .875rem; font-weight: 500; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.who-am-i button:hover { border-color: var(--ink); }

main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 36px 20px 72px; }
.narrow { max-width: 720px; }

/* ---------- Fußzeile: dunkler Grund ---------- */
.footer {
  background: var(--forest); color: rgba(255,255,255,.72); font-size: .875rem;
  padding: 28px max(20px, calc((100% - 1240px) / 2)) 36px;
  display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center;
}
.footer a, .footer .linklike { color: rgba(255,255,255,.88); }
.footer a:hover, .footer .linklike:hover { color: #fff; }

/* ---------- Meldungen ---------- */
.notice {
  border-radius: var(--r-card); padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line);
  background: var(--surface);
}
.notice p:last-child { margin-bottom: 0; }
.notice.success { border-color: #a9dcc9; background: var(--brand-softer); }
.notice.error { border-color: #ecb3ad; background: #fcf0ee; }
.notice.warning { border-color: #e6d6a8; background: #fbf6e8; }
.notice.info { border-color: #bfe5d7; background: var(--brand-softer); }

/* ---------- Formulare ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.field .hint { font-size: .825rem; color: var(--ink-2); margin-top: 4px; }
.field .err { font-size: .85rem; color: var(--bad); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--r-input); padding: 10px 12px; min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
input[type=file] { padding: 8px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-logo); box-shadow: 0 0 0 3px rgba(0, 168, 142, .18); }
textarea { min-height: 88px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > * { min-width: 0; }
input[type=date] { min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .925rem; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; border-radius: var(--r-btn); border: 1px solid transparent;
  padding: 11px 20px; min-height: 46px; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--brand); color: var(--brand-ink); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--brand-hover); color: var(--brand-ink); }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.btn.danger { background: var(--bad); }
.btn.danger:hover { background: #941f18; }
.btn.ok { background: var(--ok); }
.btn.small { min-height: 36px; padding: 7px 14px; font-size: .875rem; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 1.35rem; }

/* ---------- Startseite: Plan + Formular ---------- */
.planner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.planner-side { position: sticky; top: 92px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; }

.years { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.years > a, .years > span {
  padding: 6px 14px; border-radius: 999px; text-decoration: none; font-weight: 500;
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.years > a:hover { color: var(--ink); background: var(--brand-softer); }
.years a[aria-current="page"] { background: var(--forest); color: #fff; }
.years .tag { border: 0; padding: 0; font-weight: 500; font-size: .72rem; opacity: .75; margin-left: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--ink-2); margin: 0 0 12px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line-strong); display: inline-block; background: #fff; }
.legend .sw.req { background: repeating-linear-gradient(135deg, var(--requested-soft) 0 4px, var(--requested-stripe) 4px 6px); }
.legend .sw.occ { background: var(--occupied-soft); border-color: #a9dcc9; }
.legend .sw.blk { background: repeating-linear-gradient(45deg, var(--blocked-soft) 0 3px, var(--blocked-stripe) 3px 5px); }
.legend .sw.full { background: repeating-linear-gradient(45deg, var(--full-soft) 0 3px, var(--full-stripe) 3px 5px); }
.legend .sw.prio { background: var(--priority); border-color: var(--priority); width: 5px; }

/* Der Belegungsplan */
.board {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; box-shadow: var(--shadow);
}
.board table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.board thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface);
  font-size: .75rem; font-weight: 600; color: var(--ink-3); padding: 10px 0; text-align: center;
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line-strong);
}
.board th.kw, .board td.kw { width: 56px; }
.board th.who, .board td.who { width: 30%; text-align: left; padding-left: 14px; }
.board td { padding: 0; border-bottom: 1px solid var(--line); height: 42px; vertical-align: middle; }
.board tr.month-start td { border-top: 1px solid var(--line-strong); }
.board td.kw {
  font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; color: var(--ink);
  border-right: 1px solid var(--line); position: relative; font-size: .95rem;
}
.board td.kw .mon { display: block; font-size: .64rem; font-weight: 500; color: var(--ink-3); line-height: 1; margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }
.board tr.prio td.kw { color: var(--priority); background: var(--priority-soft); }
.board tr.prio td.kw::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--priority);
}
.board td.who { font-size: .85rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--line); }
.board td.who .prio-label { color: var(--priority); font-weight: 600; margin-right: 6px; }

.day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 42px; border: 0; margin: 0; padding: 0; background: var(--free);
  font: inherit; font-size: .8rem; color: var(--ink); cursor: default; position: relative;
  border-right: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
td:last-of-type .day { border-right: 0; }
.day .d { line-height: 1; }
.day .k { font-size: .66rem; font-weight: 700; line-height: 1; margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.day.weekend { background: #fafbfa; color: var(--ink-2); }
.day.s-angefragt { background: repeating-linear-gradient(135deg, var(--requested-soft) 0 6px, var(--requested-stripe) 6px 9px); }
.day.s-angefragt .k { color: var(--requested-ink); }
.day.s-belegt { background: var(--occupied-soft); }
.day.s-belegt .k { color: var(--occupied); }
.day.s-ausgebucht { background: repeating-linear-gradient(45deg, var(--full-soft) 0 5px, var(--full-stripe) 5px 7px); color: var(--full-ink); }
.day.s-ausgebucht .k { color: var(--full-ink); }
.day.s-gesperrt { background: repeating-linear-gradient(45deg, var(--blocked-soft) 0 5px, var(--blocked-stripe) 5px 7px); color: var(--ink-3); }
.day.past { opacity: .45; }
.day.pickable { cursor: pointer; }
.day.pickable:hover { box-shadow: inset 0 0 0 2px var(--select); }
.day.sel { box-shadow: inset 0 0 0 2px var(--select); background: var(--brand-soft); }
.day.sel-edge { background: var(--brand); color: #fff; box-shadow: none; }
.day.sel-edge .k { color: #fff; }
.day.today::after { content: ""; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand-logo); }
.day.slot2 .k::after { content: " +1"; }

.board-note { padding: 40px 20px; text-align: center; color: var(--ink-2); }

/* Auswahlleiste (mobil) */
.selbar { display: none; }

/* Status- und Detailtabellen */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; font-size: .925rem; }
table.list th, table.list td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .75rem; color: var(--ink-3); font-weight: 600; background: #fafbfa; white-space: nowrap; text-transform: uppercase; letter-spacing: .05em; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #fafcfb; }
table.list td.nowrap { white-space: nowrap; }
table.list tr.overdue td:first-child { box-shadow: inset 4px 0 0 var(--priority); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--blocked-soft); color: var(--ink-2);
}
.badge.ok { background: var(--occupied-soft); color: var(--brand-hover); }
.badge.pending { background: var(--requested-soft); color: var(--requested-ink); }
.badge.bad { background: #f8dedb; color: var(--bad); }
.badge.prio { background: var(--priority-soft); color: var(--priority); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 16px; }
dl.facts dt { color: var(--ink-2); font-size: .9rem; }
dl.facts dd { margin: 0; }

.decision-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.decision-pair .who { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; background: #fafbfa; }
.decision-pair .who strong { display: block; font-size: .78rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }

.reg-card { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.reg-card header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details[open] summary { margin-bottom: 10px; }

.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .3em; }
.placeholder { background: #fbf6e8; padding: 0 3px; border-radius: 3px; }

/* ---------- Einstieg (Anmeldung zum Plan): dunkler Grund mit weißer Karte ---------- */
.hero {
  background: var(--forest); color: #fff; border-radius: var(--r-lg);
  padding: 56px 48px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 198, 177, .28), rgba(95, 198, 177, 0) 70%); pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-text .eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-mid); margin-bottom: 14px; }
.hero-text h1 { font-size: 3rem; color: #fff; margin-bottom: .4em; }
.hero-text h1 em { color: var(--brand-mid); }
.hero-text p { color: rgba(255,255,255,.8); font-size: 1.05rem; }
.hero-text a { color: #fff; }
.hero .panel { color: var(--ink); position: relative; z-index: 1; border: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.hero .panel h2 { margin-bottom: .3em; }

/* ---------- Responsiv ---------- */
@media (max-width: 1000px) {
  .planner { grid-template-columns: 1fr; }
  .planner-side { position: static; }
  .board th.who, .board td.who { display: none; }
  .hero { grid-template-columns: 1fr; padding: 40px 28px; gap: 28px; }
}
@media (max-width: 640px) {
  main { padding: 20px 16px 96px; }
  h1 { font-size: 1.75rem; }
  .hero { padding: 28px 18px; border-radius: var(--r-card); margin: 0 -4px; }
  .hero-text h1 { font-size: 2.1rem; }
  .panel { padding: 18px; }
  .topbar { position: static; }
  .topbar .inner { gap: 8px 12px; padding: 10px 16px; min-height: 0; }
  .brand-logo { height: 36px; }
  .brand-name { display: none; }
  .topnav { margin-left: 0; width: 100%; gap: 2px; order: 3; }
  .topnav a { padding: 6px 11px; font-size: .875rem; white-space: nowrap; }
  .years { border-radius: var(--r-card); }
  .who-am-i { margin-left: auto; }
  .row2 { grid-template-columns: 1fr; }
  .board th.kw, .board td.kw { width: 38px; }
  .board td.kw { font-size: .85rem; }
  .day { font-size: .72rem; height: 42px; }
  .day .k { font-size: .6rem; }
  .decision-pair { grid-template-columns: 1fr; }
  .selbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--forest); color: #fff; padding: 10px 16px; gap: 12px; align-items: center; justify-content: space-between;
    box-shadow: 0 -2px 12px rgba(0,0,0,.18);
  }
  .selbar[hidden] { display: none; }
  .selbar .btn { background: #fff; color: var(--forest); min-height: 40px; }
  dl.facts { grid-template-columns: 1fr; gap: 0; }
  dl.facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .topbar, .planner-side, .footer, .selbar { display: none; }
  .planner { display: block; }
  body { background: #fff; }
}
.actions.split { justify-content: space-between; margin-bottom: 8px; }
.actions.split h2 { margin: 0; }

/* ---------- Admin ---------- */
.admin-bar { background: var(--forest); border-bottom: 0; color: #fff; }
.admin-bar .brand-name { color: #fff; border-left-color: rgba(255,255,255,.3); }
.admin-bar .brand-logo { background: #fff; padding: 4px 8px; border-radius: 8px; height: 40px; }
.admin-bar .topnav a { color: rgba(255,255,255,.78); padding: 7px 12px; font-size: .875rem; }
.admin-bar .topnav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-bar .topnav a[aria-current="page"] { background: var(--brand-mid); color: var(--forest); }
.admin-section { margin-bottom: 32px; }
.admin-section h2 { display: flex; align-items: center; gap: 10px; }
.count { display: inline-block; min-width: 26px; padding: 1px 9px; border-radius: 999px; background: var(--brand-soft); font-family: var(--font); font-size: .82rem; font-weight: 600; text-align: center; color: var(--brand-hover); font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.two-col .panel + .panel { margin-top: 16px; }
.form-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-grid .field { margin-bottom: 0; min-width: 150px; }
.form-grid .grow { flex: 1 1 240px; }
.form-grid .grow-all { flex: 1 1 100%; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.filter-bar .field { margin: 0; min-width: 200px; }
.filter-bar .grow { flex: 1 1 260px; }
.mt { margin-top: 20px; }
.mt-s { margin-top: 8px; }
.mb { margin-bottom: 12px; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.week-chip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: .875rem; cursor: pointer; font-variant-numeric: tabular-nums; background: var(--surface); }
.week-chip input { accent-color: var(--priority); }
.week-chip:has(input:checked) { border-color: var(--priority); background: var(--priority-soft); color: var(--priority); font-weight: 600; }
.panel.highlight { border-color: #e6d6a8; background: #fbf6e8; margin-bottom: 16px; }
.diff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
ul.diff { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
ul.diff li { padding: 6px 10px; border-left: 3px solid var(--line); margin-bottom: 4px; background: #fafbfa; border-radius: 0 var(--r-input) var(--r-input) 0; }
ul.diff.add li { border-left-color: var(--ok); }
ul.diff.remove li { border-left-color: var(--bad); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.table-wrap.flat { border: 0; box-shadow: none; }
.scroll-y { max-height: 360px; overflow-y: auto; }
code { font-size: .88em; background: var(--brand-softer); padding: 1px 5px; border-radius: 4px; }
details form { margin-top: 8px; }
details .field label { font-weight: 500; }
@media (max-width: 900px) {
  .two-col, .diff-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-bar .topnav a { padding: 6px 10px; }
}
.two-col > .panel + .panel { margin-top: 0; }
.visitor-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: flex-end; font-size: .875rem; color: var(--ink-2); margin: -8px 0 12px; }

/* ---------- Downloadcenter und Ablauf ---------- */
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.file { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.file:hover { border-color: var(--brand-logo); color: var(--ink); box-shadow: var(--shadow); }
.file-type { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--r-btn); background: var(--brand-soft); color: var(--brand-hover); font-size: .72rem; font-weight: 700; letter-spacing: .03em; }
.file-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.prose ol.steps { padding-left: 1.3em; }
.prose ol.steps li { margin-bottom: .8em; }
.prose ol.steps li::marker { color: var(--brand); font-weight: 600; }
.rule { border-left: 4px solid var(--brand-logo); background: var(--surface); padding: 12px 16px; border-radius: 0 var(--r-card) var(--r-card) 0; margin: 0 0 12px; box-shadow: var(--shadow); }
.rule.prio { border-left-color: var(--priority); }
.prio-hint { border-left: 4px solid var(--priority); background: var(--priority-soft); padding: 12px 16px; border-radius: 0 var(--r-card) var(--r-card) 0; margin: 0 0 16px; font-size: .925rem; }
#days-count.warn { color: var(--bad); font-weight: 600; }

/* ---------- Admin: Übersicht (Schnellfilter) ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  transition: border-color .15s;
}
.stat:hover { border-color: var(--brand-logo); color: var(--ink); }
.stat.is-current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow); }
.stat-n { font-family: var(--serif); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: .85rem; color: var(--ink-2); }
.stat.alert .stat-n { color: var(--priority); }
.stat.ok .stat-n { color: var(--brand); }
.filter-bar .btn { align-self: flex-end; }

/* ---------- Admin: Jahresplanung ---------- */
.years-add { color: var(--brand) !important; font-weight: 600 !important; }
.year-status {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--brand-logo);
  border-radius: var(--r-card); padding: 18px 22px; margin: 0 0 24px; box-shadow: var(--shadow);
}
.year-status.is-draft { border-left-color: #d9b45a; background: #fffdf6; }
.year-status-main { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.year-status-main .muted { max-width: 70ch; }
.year-status-main strong { font-size: 1.05rem; }
.step-label { font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.year-facts { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: .875rem; color: var(--ink-2); }
.year-facts b { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; color: var(--ink); margin-right: 3px; }
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.plan-side { position: sticky; top: 92px; display: grid; gap: 16px; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 4px; }
.plan-side .panel + .panel { margin-top: 0; }
.plan-side .week-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); max-height: 260px; overflow-y: auto; padding: 2px; }
.plan-side .week-chip { padding: 5px 8px; font-size: .8rem; }
.board[data-pick="block"] .day.pickable:hover { box-shadow: inset 0 0 0 2px var(--priority); }
@media (max-width: 1100px) {
  .year-status { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan-side { position: static; max-height: none; overflow: visible; }
}
@media (max-width: 760px) {
  .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Anmeldung mit Passwort ---------- */
.gate-cards { position: relative; z-index: 1; display: grid; gap: 14px; }
.gate-cards .notice { margin: 0; }
.gate-cards .panel { color: var(--ink); border: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.gate-link { padding: 16px 24px; }
.gate-link summary { color: var(--brand); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.gate-link summary::-webkit-details-marker { display: none; }
.gate-link summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-hover); font-weight: 700; line-height: 1; }
.gate-link[open] summary::before { content: "–"; }
.gate-link[open] summary { margin-bottom: 12px; }
.hero-note { color: rgba(255,255,255,.75); margin: 0; }
.hero-note a { color: #fff; }
input[readonly] { background: var(--canvas); color: var(--ink-2); }

/* ---------- GPA-Erinnerung (Jahresplanung) ---------- */
.gpa-weeks { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; font-size: .875rem; }
.gpa-weeks li { padding: 6px 10px; border-left: 3px solid var(--priority); background: var(--priority-soft); border-radius: 0 var(--r-input) var(--r-input) 0; }
.gpa-weeks a { font-weight: 600; color: var(--priority); }
#gpa dl.facts { margin-bottom: 12px; }

/* ---------- Downloadcenter: Rubriken ---------- */
.chip-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.chip-filter a, .chip-filter .is-empty {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.chip-filter a:hover { border-color: var(--brand-logo); color: var(--ink); }
.chip-filter a[aria-current="page"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.chip-filter .is-empty { color: var(--ink-3); border-style: dashed; cursor: default; }
.chip-n { font-size: .75rem; font-weight: 600; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-hover); text-align: center; }
.chip-filter a[aria-current="page"] .chip-n { background: rgba(255,255,255,.18); color: #fff; }
.file-section { margin-top: 28px; }
.file-section h2 { font-size: 1.35rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }

/* ---------- Seite „Ablauf“: Umschalter und Ansprechpersonen ---------- */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 0 0 24px; box-shadow: var(--shadow); }
.segmented a { padding: 9px 18px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.segmented a:hover { color: var(--ink); background: var(--brand-softer); }
.segmented a[aria-current="page"] { background: var(--forest); color: #fff; }
.wiki-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.wiki-main { max-width: 720px; }
.wiki-main .lead { font-size: 1.1rem; color: var(--ink-2); }
.wiki-main h2.first { margin-top: 1em; }
.wiki-side { position: sticky; top: 92px; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand-logo); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--shadow); }
.contact-box h2 { font-size: 1.3rem; margin-bottom: 12px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact { display: flex; gap: 12px; align-items: flex-start; }
.contact + .contact { padding-top: 16px; border-top: 1px solid var(--line); }
.contact-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-hover); font-family: var(--serif); font-size: 1.15rem; }
.contact-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-role { font-size: .85rem; color: var(--ink-2); margin-bottom: 2px; }
.contact-line { font-size: .875rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
a.contact-line:hover { color: var(--brand); text-decoration: underline; }
.contact-k { display: inline-block; min-width: 58px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
@media (max-width: 1000px) {
  .wiki-grid { grid-template-columns: 1fr; gap: 28px; }
  .wiki-side { position: static; }
}

/* ---------- Ablauf des Aufenthalts: Inhaltsverzeichnis und Zeitleiste ---------- */
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.toc a { font-size: .85rem; padding: 5px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.toc a:hover { border-color: var(--brand-logo); color: var(--ink); }
.wiki-main h2[id] { scroll-margin-top: 92px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--brand-soft); }
.tl-step { position: relative; margin: 0 0 22px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.tl-step::before { content: ""; position: absolute; left: -31px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand-logo); }
.tl-step h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.tl-step ul { margin: 0; padding-left: 1.2em; }
.tl-step li { margin-bottom: .45em; }
.tl-step p:last-child, .tl-step .rule:last-child { margin-bottom: 0; }
.tl-step .rule { box-shadow: none; background: var(--brand-softer); }
.tl-when { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .03em; color: var(--brand-hover); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }
.wiki-main code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .timeline { padding-left: 16px; }
  .tl-step { padding: 12px 14px; }
  .tl-step::before { left: -25px; }
}
