:root {
  --fg: #1c2128;
  --muted: #5a6470;
  --bg: #ffffff;
  --accent: #1f4788;
  --border: #d8dde3;
  --warn-bg: #fff8e1;
  --warn-border: #f5d061;

  --main-max: 720px;
  --rail-width: 200px;
  --rail-gap: 1.75rem;
  --rail-breakpoint: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.brand {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand b { color: var(--fg); }

/* Three-column page layout: left rail | content | right rail.
   Rails collapse below the breakpoint so mobile/tablet just sees content. */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  padding: 2rem 1.5rem 3rem;
}

main {
  width: 100%;
  max-width: var(--main-max);
}

.ad-rail { display: none; }

@media (min-width: 1180px) {
  .layout {
    grid-template-columns:
      var(--rail-width)
      minmax(0, var(--main-max))
      var(--rail-width);
    column-gap: var(--rail-gap);
    justify-items: stretch;
  }
  .ad-rail {
    display: block;
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

h1 { font-size: 1.75rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }

.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; }

.report-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.field-label, legend.field-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.field input[type="number"],
.field input[type="file"] {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

fieldset.field {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem 1rem;
  background: #fff;
}

fieldset.field legend { padding: 0 0.35rem; }

.sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  margin: 0.3rem 0;
}

.sub input { max-width: 8rem; }

/* Switch-style toggle used for "Freigrenzen nicht anwenden". */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  user-select: none;
}
.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.toggle-track {
  flex-shrink: 0;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background-color 0.15s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}
.toggle input:checked + .toggle-track {
  background: var(--accent);
}
.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}
.toggle input:focus-visible + .toggle-track {
  box-shadow: 0 0 0 3px rgba(31, 71, 136, 0.25);
}

.freigrenzen-inputs.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.freigrenzen-inputs.is-disabled input { background: #f1f2f4; }

button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
button[type="submit"]:hover { filter: brightness(1.1); }

.disclaimer {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.info { padding-left: 1.25rem; }
.info li { margin: 0.25rem 0; }

/* Ad slot wrappers — kept presentational, the actual ad markup
   (AdSense <ins>, etc.) is injected inside. */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.ad-slot::before { content: "Werbung"; }

.ad-slot-banner   { min-height: 90px;  margin: 1.25rem 0; }     /* top/bottom in main column */
.ad-slot-rect     { min-height: 250px; margin: 1.25rem 0; }     /* in-content rectangle */
.ad-slot-skyscraper {
  min-height: 600px;
  width: var(--rail-width);
}

footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
footer nav a {
  color: var(--muted);
  margin: 0 0.5rem;
}
footer .muted { margin-top: 0.5rem; }

address { font-style: normal; }

a { color: var(--accent); }
