:root {
  --green: #32621f;
  --lime: #78bf32;
  --ink: #20352a;
  --muted: #57675d;
  --line: #d4dfd0;
  --paper: #fff;
  --bg: #f3f6ef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    17px/1.55 system-ui,
    -apple-system,
    sans-serif;
}
header {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 25px;
  font-weight: 750;
}
.brand img {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
nav form {
  margin: 0;
}
main {
  max-width: 1180px;
  margin: 40px auto;
  padding: 0 24px;
  min-height: 70vh;
}
.eyebrow {
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 750;
}
h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 14px 0 22px;
}
h2 {
  font-size: 23px;
  margin: 16px 0 10px;
}
h3 {
  font-size: 19px;
}
.intro {
  font-size: 21px;
  max-width: 760px;
  color: var(--muted);
  margin-bottom: 32px;
}
.panel,
.question {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 3px 12px #20352a04;
}
.question legend {
  font-weight: 700;
  padding: 0 8px;
  max-width: 100%;
}
.question {
  padding-top: 18px;
}
.notice {
  background: #e5efdd;
  border-left: 4px solid var(--green);
  padding: 16px 20px;
  border-radius: 4px;
}
.error {
  background: #ffebe6;
  border-color: #aa3d21;
  color: #702512;
}
.row,
.actions,
.grid {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.actions {
  justify-content: flex-start;
  margin: 20px 0;
}
.grid > * {
  flex: 1;
  min-width: 220px;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #f3f6ef;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
}
.badge {
  background: #e6efdd;
  color: #315824;
  border-radius: 30px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}
button,
.button {
  display: inline-block;
  background: var(--green);
  color: white;
  padding: 12px 20px;
  border: 1px solid var(--green);
  border-radius: 8px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  min-height: 46px;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
.secondary {
  background: white;
  color: var(--green);
}
a {
  color: var(--green);
}
label {
  display: block;
  margin: 14px 0;
  font-weight: 600;
  font-size: 15px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #8d9f89;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font: inherit;
  margin-top: 5px;
  min-height: 46px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  display: inline-block;
  width: 22px;
  min-height: 22px;
  height: 22px;
  vertical-align: middle;
  margin: 0 10px 0 0;
  accent-color: var(--green);
}
.scale {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.scale label {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
}
.scale label:has(:checked) {
  border: 2px solid var(--green);
  background: #edf5e5;
}
.scale input {
  flex-shrink: 0;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
fieldset:disabled {
  opacity: 0.85;
}
.checks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.checks label {
  font-weight: 400;
}
.sticky {
  position: sticky;
  bottom: 0;
  background: #f3f6eff5;
  border-top: 1px solid var(--line);
  padding: 16px;
  display: flex;
  gap: 16px;
}
*:focus-visible {
  outline: 3px solid #135f91;
  outline-offset: 3px;
}
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 19px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 8px;
  border: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #edf2e8;
}
td p {
  margin: 4px 0;
}
.table-scroll {
  overflow: auto;
}
.compare th:first-child {
  min-width: 240px;
}
.compare td:not(:first-child) {
  text-align: center;
}
.same {
  background: #dcf0eb;
}
.near {
  background: #fff3ca;
}
.different {
  background: #ffe1bf;
}
.none {
  background: #e9ece9;
}
.marker {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 4px;
  margin: 2px;
  padding: 1px 5px;
  font-weight: 800;
}
.small {
  font-size: 13px;
  color: var(--muted);
}
.access-card {
  border: 1px dashed #777;
  padding: 22px;
  break-inside: avoid;
  margin: 20px 0;
}
.access-card code {
  font-size: 21px;
}
footer {
  padding: 25px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.login {
  max-width: 480px;
  margin: 40px auto;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
@media (max-width: 760px) {
  header {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  main {
    padding: 0 16px;
    margin-top: 24px;
  }
  .status-grid,
  .scale,
  .checks {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel {
    padding: 18px;
  }
  .sticky {
    flex-wrap: wrap;
  }
  .brand small {
    max-width: 240px;
  }
  .compare {
    font-size: 12px;
  }
}
@media print {
  header nav,
  .eyebrow,
  footer,
  .no-print,
  button,
  .sticky,
  details {
    display: none !important;
  }
  body,
  main {
    background: white;
    color: black;
    margin: 0;
    padding: 0;
    font-size: 11pt;
  }
  .panel {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  thead {
    display: table-header-group;
  }
  tr,
  .access-card {
    break-inside: avoid;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  .table-scroll {
    overflow: visible;
  }
  .compare th:first-child {
    min-width: 0;
  }
  a {
    color: black;
    text-decoration: none;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}

.section-nav,.sub-nav{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 1.5rem}
.section-nav a,.sub-nav a{padding:.7rem 1rem;border-radius:.6rem;text-decoration:none;border:1px solid #c9d7c1;color:#244523;background:#fff}
.section-nav a[aria-current],.sub-nav a[aria-current]{background:#244523;color:#fff;border-color:#244523;font-weight:700}
.sub-nav a{padding:.5rem .8rem;font-size:.95rem}
.filters{display:flex;gap:.8rem;align-items:end;flex-wrap:wrap;margin-bottom:1rem}
.filters label{flex:1;min-width:150px}.table-scroll{overflow-x:auto}
.table-scroll td{vertical-align:top}.table-scroll form{margin-bottom:.6rem}
.table-scroll select{min-width:165px}.table-scroll details{min-width:160px}
[data-save-status]{display:block;max-width:240px;font-size:.85rem;margin-top:.3rem}
.danger{background:#842a25;color:#fff}input[type=checkbox]{min-width:22px;min-height:22px}
@media print{.section-nav,.sub-nav,.filters{display:none}}

.student-table [data-branch-save]{display:flex;flex-wrap:wrap;align-items:end;gap:.4rem}
.student-table [data-branch-save] label{margin:0;flex:1;font-size:.85rem}
.student-table [data-branch-save] button{margin:0;padding:.65rem}
@media(max-width:600px){
 .section-nav,.sub-nav{flex-wrap:nowrap;overflow-x:auto;padding-bottom:.5rem;margin:.7rem 0;scrollbar-width:thin}
 .section-nav a,.sub-nav a{flex-shrink:0;padding:.65rem .8rem}
 .student-table,.student-table tbody,.student-table tr,.student-table td{display:block;width:100%}
 .student-table thead{display:block}.student-table thead tr{display:flex}
 .student-table thead th:not(:first-child){display:none}
 .student-table thead th:first-child{width:100%;text-align:left}
 .student-table thead th:first-child:after{content:" Alle angezeigten Schüler auswählen"}
 .student-table tbody tr{margin-bottom:1rem;border:1px solid #c9d7c1;border-radius:.5rem;padding:.6rem;background:white}
 .student-table td{border:0;padding:.3rem;box-sizing:border-box}
 .student-table td:first-child{width:auto;float:right}
 .student-table td:nth-child(4):before{content:"Zugang: ";font-weight:600}
 .student-table{border:0}.student-table details{min-width:0}
}
