/*
  The public forms in the brand that applies (README, "Public forms",
  "Brand"). Only variables: the values below are the design kit of the
  Suite; the CSS of the instance (`instanzCss`, loaded by form.js) sets the
  same variables, and its rule `[data-leiste] { … }` turns the band dark
  when the brand has a dark bar. No colour, font or corner of a brand is
  fixed here.
*/
:root {
  --color-blue-20: 236 237 255;
  --color-text-primary: 43 60 244;
  --color-text-secondary: 100 112 247;
  --color-background: 250 247 243;
  --color-surface: 252 251 250;
  --color-brand: 43 60 244;
  --color-on-brand: 252 251 250;
  --color-error: 192 34 62;
  --font-heading: "Zen Antique", serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --radius-flaeche: 8px;
  --radius-feld: 8px;
  --radius-knopf: 4px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: rgb(var(--color-background));
  color: rgb(var(--color-text-primary));
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

/* The band with the wordmark, as the hub's public pages. It stays on top
   while the form scrolls (sticky). */
.band {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 12px 16px;
  background: rgb(var(--color-surface));
  color: rgb(var(--color-text-primary));
  border-bottom: 1px solid rgb(var(--color-blue-20));
}

/* "About …": the website, on the right of the band. */
.band .about {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.band .about:hover,
.band .about:focus-visible {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .band .about {
    position: static;
    transform: none;
    margin-left: auto;
  }

  .band .logo,
  .band .name {
    margin: 0;
  }
}

.hint {
  margin: 0;
  font-size: 0.875rem;
  color: rgb(var(--color-text-secondary));
}

.band:empty,
.band[hidden] {
  display: none;
}

.band .logo {
  display: block;
  max-height: 36px;
  max-width: min(240px, 70vw);
  margin: 0;
}

/* Logo and name on the left, as on the website (mockup 13.11.2026). */
.band .name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.card {
  max-width: 640px;
  margin: 16px auto;
  padding: 24px;
  background: rgb(var(--color-surface));
  border: 1px solid rgb(var(--color-blue-20));
  border-radius: var(--radius-flaeche);
}

@media (max-width: 680px) {
  .card {
    margin: 0;
    border-width: 0 0 1px;
    border-radius: 0;
  }
}

/* The step bar: one segment per step, the ones reached filled. */
.steps {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
}

.step {
  flex: 1;
  height: 3px;
  background: rgb(var(--color-blue-20));
}

.step.is-done {
  background: rgb(var(--color-brand));
}

h1 {
  margin: 0 0 4px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.25;
}

h2 {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.muted {
  color: rgb(var(--color-text-secondary));
}

/* The head over the questions (mockup 13.11.2026): kind, then cohort and
   organizer; the questions start 32px below. */
.step-head {
  margin-bottom: 32px;
}

.step-head p {
  margin: 0;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

fieldset.group {
  display: grid;
  gap: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

fieldset.group[hidden],
[hidden] {
  display: none;
}

legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 700;
}

label {
  display: grid;
  gap: 4px;
  align-content: start;
}

/* The red `*` of a required field, right at its label. */
.req {
  color: rgb(var(--color-error));
  font-weight: 700;
}

/* Two fields side by side, aligned on top; one under the other on a phone. */
.row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 16px;
  align-items: start;
}

@media (max-width: 480px) {
  .row {
    grid-template-columns: 1fr;
  }
}

/* The error state: a note on top, a red frame and a line per field. */
.alert {
  padding: 12px 16px;
  border: 1px solid rgb(var(--color-error));
  background: rgb(var(--color-error) / 0.06);
  color: rgb(var(--color-error));
  font-size: 0.875rem;
}

label.is-invalid input,
label.is-invalid select,
label.is-invalid textarea,
[aria-invalid="true"] {
  border: 2px solid rgb(var(--color-error));
}

.field-error {
  font-size: 0.875rem;
  color: rgb(var(--color-error));
}

label.tick .field-error {
  grid-column: 2;
}

/* The ticks of the privacy, under their heading, right above "Send". */
.consents {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgb(var(--color-blue-20));
}

.consents-title {
  margin: 0;
  font-weight: 700;
}

/* "Also of interest" on the answer: changeable per link, may be hidden. */
.highlight {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 20px;
  background: rgb(var(--color-blue-20) / 0.4);
  border: 1px solid rgb(var(--color-blue-20));
  border-radius: var(--radius-flaeche);
}

.highlight h2,
.highlight p {
  margin: 0;
}

.highlight-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(var(--color-text-secondary));
}

.highlight a.button {
  margin-top: 0;
}

label.tick {
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid rgb(var(--color-blue-20));
  border-radius: var(--radius-feld);
  background: rgb(var(--color-surface));
  color: inherit;
  font: inherit;
}

label.tick input {
  width: auto;
  margin-top: 4px;
}

/* Only bots see this field. */
.hidden-field {
  position: absolute;
  left: -9999px;
}

/* Buttons always on the right; on a phone one under the other in full
   width, the main one on top (mockup 13.11.2026). */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* "Zurück" on the far left, "Weiter" and "Absenden" on the right; on a
   phone all below each other, full width (feedback 15.11.2026). */
.nav .back {
  margin-right: auto;
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column-reverse;
  }

  .nav button,
  .nav a.button {
    width: 100%;
    margin-right: 0;
    text-align: center;
  }
}

button,
a.button {
  display: inline-block;
  text-decoration: none;
  justify-self: start;
  margin-top: 16px;
  padding: 10px 20px;
  border: 1px solid rgb(var(--color-brand));
  border-radius: var(--radius-knopf);
  background: rgb(var(--color-brand));
  color: rgb(var(--color-on-brand));
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

form button,
.nav button {
  margin-top: 0;
}

button.secondary {
  background: transparent;
  color: rgb(var(--color-brand));
}

button:disabled {
  opacity: 0.6;
  cursor: default;
}

.error {
  color: rgb(var(--color-error));
}

a {
  color: rgb(var(--color-brand));
}

/* What a course is about, on the start: name and value per line. */
.course-facts {
  margin: 16px 0;
  border-top: 1px solid rgb(var(--color-blue-20));
}

.course-facts > div {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(var(--color-blue-20));
}

.course-facts dt {
  flex: 0 0 9em;
  color: rgb(var(--color-text-secondary));
}

.course-facts dd {
  margin: 0;
  color: rgb(var(--color-text-primary));
}

.course-facts dd.open {
  font-style: italic;
  color: rgb(var(--color-text-secondary));
}

/* What the course is about, on the start: in the colour of the text. */
.course-text {
  color: rgb(var(--color-text-primary));
  white-space: pre-line;
}

/* How the course is examined and what it is credited to, with the dates. */
.exam-text {
  margin: 0 0 8px;
  white-space: pre-line;
}

.course-rules .course-facts {
  margin: 0;
}

.course-rules .course-facts + .dates-head,
.exam-text + .dates-head {
  margin-top: 24px;
}

/* The dates of a course as tiles below each other, as the hub showed
   them (feedback 15.11.2026). */
.dates {
  margin: 8px 0 16px;
}

/* The attendance under the heading of the dates (17.11.2026). */
.dates .course-facts {
  margin: 0 0 16px;
}

.dates-head {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(var(--color-text-secondary));
  margin: 0 0 8px;
}

.date-tile {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 8px;
  padding: 12px 16px;
  border: 1px solid rgb(var(--color-blue-20));
  border-radius: var(--radius-feld);
  background: rgb(var(--color-background));
}

.date-day {
  font-weight: 600;
  color: rgb(var(--color-text-primary));
}

.date-time {
  color: rgb(var(--color-text-secondary));
}

.date-title {
  flex: 1 1 100%;
  font-size: 0.9em;
  color: rgb(var(--color-text-secondary));
}

.dates-all > summary {
  cursor: pointer;
  font-weight: 600;
  color: rgb(var(--color-brand));
  margin: 4px 0 8px;
}

/* The start of the application (mockup 13.11.2026): a head in the brand
   colour across the card, three facts, what to have at hand. */
.hero {
  margin: 0 -24px 24px;
  padding: 28px 24px 24px;
  background: rgb(var(--color-brand));
  color: rgb(var(--color-on-brand));
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 1.875rem;
  line-height: 1.2;
}

.hero .eyebrow {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.hero .lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  opacity: 0.92;
  white-space: pre-line;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.fact {
  display: grid;
  padding: 12px 14px;
  border: 1px solid rgb(var(--color-blue-20));
  border-radius: var(--radius-feld);
}

.fact b {
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

.fact span {
  font-size: 0.875rem;
  color: rgb(var(--color-text-secondary));
}

.prepare {
  margin: 24px 0 0;
  padding: 12px 14px;
  background: rgb(var(--color-blue-20) / 0.4);
  font-size: 0.875rem;
}

@media (max-width: 680px) {
  .hero {
    margin: 0 -24px 24px;
  }
}

/* The footer of the operator's website (settings, `footer`); never when
   embedded. Brand colour, links in a new tab. */
.foot {
  margin-top: 48px;
  background: rgb(var(--color-brand));
  color: rgb(var(--color-on-brand));
  font-size: 0.9375rem;
}

.foot a {
  color: inherit;
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible {
  text-decoration: underline;
}

.foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.foot-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
}

.foot-col p {
  margin: 0 0 10px;
}

.foot-col .foot-title {
  margin-bottom: 16px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
}

.foot-contact {
  display: grid;
  gap: 12px;
  line-height: 1.8;
}

.foot-block {
  display: grid;
}

.foot-social {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 24px 24px;
  font-size: 0.875rem;
  opacity: 0.8;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 20px max(24px, calc((100% - 1152px) / 2));
  background: rgb(255 255 255 / 0.08);
  font-size: 0.8125rem;
}
