/* Design tokens — Design B ("Drei Fragen"). Change a value here, not in a
   component. Beton grey page, white working surfaces, one green for "go",
   and Zollstock yellow reserved for the progress ruler and the logo mark. */
:root {
  --bg:          #ECEBE6;
  --surface:     #FFFFFF;
  --sunk:        #F5F4F0;
  --line:        #D6D5CE;
  --ink:         #15181A;
  --muted:       #5A6064;
  --faint:       #73787C;
  --accent:      #157A4B;
  --accent-ink:  #0F6039;
  --accent-soft: #E2F2E8;
  --accent-text: #11683F;
  --ruler:       #F1C232;
  --ruler-ink:   #15181A;
  --error:       #B3261E;
  --disabled:    #C9C8C1;

  --font-display: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mail:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-card:  16px;
  --radius-input: 12px;
  --radius-pill:  999px;

  --shell: 1120px;
  --prose: 680px;
  --card:  560px;
  --gutter: max(16px, 3vw);
}

*, *::before, *::after { box-sizing: border-box; }

/* `display: flex` on a block would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p { margin: 0; }
a { color: var(--accent-text); }
a:hover { color: var(--accent-ink); }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
.prose { max-width: var(--prose); margin: 0 auto; padding-inline: var(--gutter); }
.center { text-align: center; }

/* Header ------------------------------------------------------------ */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}
.header-left { display: flex; align-items: center; gap: 24px; }
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--ink); }
.wordmark svg { flex: none; }
.nav { display: flex; gap: 22px; }
.nav-link { font-size: 16px; color: var(--muted); text-decoration: none; }
.nav-link:hover { color: var(--ink); }

/* Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}
.footer-text { max-width: 62ch; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover { color: var(--ink); }
.footer-links .sep { margin: 0 8px; }

/* Shared form parts (feedback page, server-rendered pages) ----------- */
.hero { padding-block: 56px 40px; }
.hero h1 { font-size: 40px; line-height: 1.1; }
.hero .lede { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--muted); }

.signup-section { padding: 0 var(--gutter) 88px; }
.card {
  max-width: var(--card);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 36px;
}
.signup-form { display: flex; flex-direction: column; gap: 26px; }

.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend {
  padding: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.field-hint { font-size: 15px; line-height: 1.5; color: var(--muted); }

input[type="email"], textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--surface);
  font: inherit;
  font-size: 18px;
  color: var(--ink);
}
input[type="email"]::placeholder, textarea::placeholder { color: var(--faint); }
input[type="email"]:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: var(--accent); }
input[type="email"].invalid { border-color: var(--error); }
textarea { resize: vertical; }

.submit-block { display: flex; flex-direction: column; gap: 12px; }
.submit, .cta {
  width: 100%;
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius-input);
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.submit:hover:not(:disabled), .cta:hover:not(:disabled) { background: var(--accent-ink); }
.submit:disabled, .cta:disabled { background: var(--disabled); cursor: not-allowed; }

.form-note { font-size: 15px; color: var(--muted); text-align: center; }
.form-error { font-size: 15.5px; font-weight: 700; color: var(--error); }
.submit-block .form-error { text-align: center; }

.confirmation { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.confirmation .check { font-size: 32px; color: var(--accent); }
.confirmation h2 { font-size: 24px; }
.confirmation p { font-size: 16px; line-height: 1.6; color: var(--muted); }

/* The self-hosted ALTCHA widget, in the page's colours. */
altcha-widget {
  --altcha-border-radius: var(--radius-input);
  --altcha-border-color: var(--line);
  --altcha-color-base: var(--surface);
  --altcha-color-base-content: var(--ink);
  --altcha-color-primary: var(--accent);
  --altcha-color-success: var(--accent);
  --altcha-color-error: var(--error);
  --altcha-max-width: 100%;
}

/* Landing page ======================================================== */
.start .shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
  padding-block: 32px 80px;
}
.start-text { padding-top: 28px; }
.start h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.08; }
.start h1 span { color: var(--accent-text); }
.start .lede { margin-top: 18px; max-width: 44ch; font-size: 1.15rem; color: var(--muted); }
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; font-size: 16.5px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { flex: none; margin-top: 3px; color: var(--accent); }

/* The signup flow: one question per step. */
.flow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 24px 28px;
}
.flow noscript p { margin-bottom: 18px; }

/* Progress as a folding ruler (Zollstock): one link unfolds per answer. */
.ruler {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.ruler li { min-width: 0; }
.seg {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 40px;
  padding: 0 10px 6px;
  border: 1.5px dashed var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: left;
  cursor: default;
}
.seg .n { margin-right: 6px; }
.seg.on, .seg.done {
  border: 0;
  background-color: var(--ruler);
  color: var(--ruler-ink);
  background-image:
    repeating-linear-gradient(to right, var(--ruler-ink) 0 1.5px, transparent 1.5px 40px),
    repeating-linear-gradient(to right, var(--ruler-ink) 0 1px, transparent 1px 8px);
  background-size: 100% 13px, 100% 7px;
  background-repeat: no-repeat;
  background-position: 10px 0, 10px 0;
}
.seg.done { cursor: pointer; }
.seg.on::after, .seg.done::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: #C9CCC9;
  border: 1.5px solid var(--ruler-ink);
  z-index: 1;
}
.ruler li:last-child .seg::after { display: none; }

.step h2 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.15; }
.step h2:focus { outline: none; }
.step .hint { margin-top: 8px; font-size: 16px; color: var(--muted); }
.aside-note { margin-top: 14px; font-size: 15px; color: var(--muted); }

.radio {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease;
}
.radio:checked { border: 6.5px solid var(--accent); }
.check {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--surface) no-repeat center / 13px 13px;
  cursor: pointer;
}
.check:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
}

/* Step 1: Gewerk tiles. The description is what makes the choice obvious
   to someone who has never read a CPV code. */
.tiles { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.tile:hover { border-color: var(--faint); }
.tile svg { color: var(--accent-text); margin-bottom: 4px; }
.tile b { padding-right: 26px; font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.25; }
.tile small { font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.tile .radio { position: absolute; top: 14px; right: 14px; }

/* Step 2: sixteen Länder, a compact two-column list of large targets. */
.lands { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.land {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.land:hover { border-color: var(--faint); }
.land:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.land.all { grid-column: 1 / -1; font-weight: 700; }

.step-foot { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back {
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.back:hover { color: var(--ink); }
.next {
  padding: 13px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: transparent;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.next:disabled { opacity: 0.35; cursor: not-allowed; }

/* Step 3: what was picked, with room to add more. */
.picks { margin-top: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--sunk); }
.pick { padding: 14px 16px; }
.pick + .pick { border-top: 1.5px solid var(--line); }
.pick-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.pick-label {
  flex: none;
  width: 6.2rem;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pick-value { flex: 1 1 12rem; font-weight: 700; }
.pick-more {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.pick-list { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 16px; cursor: pointer; }

.email-field { margin-top: 22px; }
.email-field input { margin-top: 8px; }
.email-field label { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.flow altcha-widget { display: block; margin-top: 16px; }
.flow .cta { margin-top: 16px; }
.flow .form-note { margin-top: 12px; }
.flow .form-error { margin-top: 10px; }

/* Step 4: what the confirmation mail looks like. */
.inbox { margin-top: 20px; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; font-family: var(--font-mail); }
.inbox-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 14px 16px; background: var(--sunk); }
.inbox-row .dot { grid-row: span 2; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.inbox-row b { font-size: 15px; }
.inbox-row span { font-size: 14.5px; color: var(--muted); }
.inbox-body { display: grid; justify-items: start; gap: 12px; padding: 16px; font-size: 15px; color: var(--muted); }
.fake-button { padding: 10px 16px; border-radius: 8px; background: var(--accent); color: #FFFFFF; font-size: 14.5px; font-weight: 600; }
.then { margin-top: 18px; display: grid; gap: 8px; font-size: 16px; }

/* Sections below the signup ------------------------------------------ */
.section { padding-block: 80px; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.kicker {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.section h2 { margin-top: 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.12; }
.section .intro { margin-top: 12px; max-width: 58ch; font-size: 1.08rem; color: var(--muted); }

/* One real notice, line by line: what the mail says and what it means. */
.anatomy {
  margin-top: 36px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.an-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); border-top: 1px solid var(--line); }
.an-row:first-child { border-top: 0; }
.an-mail { padding: 14px 22px; font-family: var(--font-mail); font-size: 15px; }
.an-mail .label { display: inline-block; width: 5.2rem; color: var(--muted); }
.an-summary { font-size: 16.5px; font-weight: 650; line-height: 1.35; }
.an-button { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--accent); color: #FFFFFF; font-size: 14.5px; font-weight: 650; }
.an-note { padding: 14px 22px; border-left: 1px solid var(--line); background: var(--sunk); font-size: 15.5px; color: var(--muted); }
.an-note b { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); }
.an-caption { margin-top: 12px; font-size: 14px; color: var(--faint); }

.timeline { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline li { position: relative; padding: 28px 20px 0 0; border-top: 3px solid var(--ink); }
.timeline li.later { border-top-style: dashed; border-top-color: var(--faint); }
.timeline li::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--ink);
}
.timeline li.later::before { border-color: var(--faint); }
.timeline .when {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.timeline h3 { margin-top: 8px; font-size: 1.2rem; font-weight: 600; }
.timeline p { margin-top: 6px; max-width: 30ch; font-size: 16px; color: var(--muted); }

.faq-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq-grid details { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; }
.faq-grid summary {
  position: relative;
  padding: 18px 48px 18px 20px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 120ms ease;
}
.faq-grid details[open] summary::after { top: 27px; transform: rotate(225deg); }
.faq-grid p { padding: 0 20px 18px; color: var(--muted); }
.faq-more { margin-top: 20px; }

/* On a phone, bring the signup back once it has scrolled away. */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.sticky-cta a {
  display: block;
  padding: 15px;
  border-radius: 12px;
  background: var(--accent);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none;
}

/* Legal pages (Impressum, Datenschutz, FAQ) --------------------------- */
.legal { padding-block: 56px 88px; }
.legal h1 { font-size: 34px; }
.legal .updated { margin-top: 8px; font-size: 15px; color: var(--faint); }
.legal .todo {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1.5px solid var(--error);
  border-radius: var(--radius-input);
  background: var(--surface);
  font-size: 15px;
  color: var(--error);
}
.legal section { margin-top: 36px; }
.legal h2 { font-size: 21px; font-weight: 600; }
.legal h3 { margin-top: 20px; font-family: var(--font-body); font-size: 17px; font-weight: 700; }
.legal p { margin-top: 12px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.legal ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--ink); }
.legal a { word-break: break-word; }

/* Narrow screens ----------------------------------------------------- */
@media (max-width: 900px) {
  .start .shell { grid-template-columns: 1fr; gap: 24px; padding-block: 8px 64px; }
  .start-text { padding-top: 12px; }
  .ticks { display: none; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .an-row { grid-template-columns: 1fr; }
  .an-note { border-left: 0; border-top: 1px dashed var(--line); }
  .sticky-cta.show { display: block; }
  .has-sticky-cta .site-footer { padding-bottom: 104px; }
}

@media (max-width: 600px) {
  .nav .nav-link:first-child { display: none; }
  .wordmark { font-size: 18px; }
  .hero { padding-block: 40px 32px; }
  .hero h1 { font-size: 32px; }
  .hero .lede { font-size: 17px; }
  .signup-section { padding-bottom: 64px; }
  .card { padding: 24px; }
  .flow { margin-inline: -4px; padding: 18px 16px 22px; border-radius: 16px; }
  .seg { padding-inline: 8px; font-size: 12px; }
  .tiles { gap: 10px; }
  .tile { padding: 16px 12px 14px; }
  .tile small { font-size: 13.5px; }
  .lands { gap: 6px; }
  .land { gap: 8px; padding: 8px 10px; font-size: 15px; }
  .pick-label { width: 100%; }
  .faq-grid, .timeline { grid-template-columns: 1fr; }
  .timeline li { padding-right: 0; }
  .section { padding-block: 60px; }
  .header-left { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
