:root {
  color-scheme: light;
  --ink: #202522;
  --muted: #66706a;
  --line: #d8e7f5;
  --soft: #f5fbff;
  --accent: #2498d4;
  --accent-strong: #087fbd;
  --sweet: #a64d68;
  --warm: #f6d96f;
  --coral: #d66552;
  --blue: #39aee6;
  --white: #ffffff;
  --shadow: 0 14px 38px rgba(35, 118, 174, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f3fbff 0, #ffffff 240px),
    var(--white);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.survey-main {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 14px 44px;
}

.intro {
  padding: 10px 2px 18px;
}

.date {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.intro h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(40px, 11vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.kids-strip {
  display: block;
  width: min(82%, 390px);
  height: 86px;
  object-fit: cover;
  object-position: center 45%;
  margin: 12px 0 0;
  border-radius: 8px;
}

.form-panel,
.thanks-panel,
.admin-login,
.admin-dashboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.form-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.field-stack {
  display: grid;
  gap: 14px;
}

label,
legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 7px;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

textarea {
  resize: vertical;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid,
.helper-list {
  display: grid;
  gap: 9px;
  margin-top: 9px;
}

.choice,
.helper-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.choice:has(input:checked),
.helper-list label:has(input:checked) {
  border-color: var(--accent);
  background: #eef9ff;
}

.choice input,
.helper-list input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.choice strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.choice em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.choice small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-button {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.inline-button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 28px rgba(36, 152, 212, 0.18);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  padding: 0 16px;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.form-message {
  min-height: 20px;
  margin: -4px 0 0;
  font-weight: 850;
}

.form-message.success {
  color: var(--accent);
}

.form-message.error {
  color: #9f2f2f;
}

.privacy-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.thanks-panel {
  margin-top: 16px;
  padding: 24px;
}

.thanks-panel h2 {
  margin: 0;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
}

.thanks-panel p:not(.date) {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.contribution-dialog {
  width: min(calc(100% - 24px), 560px);
  max-height: min(78vh, 720px);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 70px rgba(28, 55, 42, 0.2);
}

.contribution-dialog::backdrop {
  background: rgba(21, 34, 27, 0.42);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 24px;
}

.dialog-head p {
  margin: 3px 0 0;
  color: var(--muted);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.contribution-dialog select {
  margin: 0 0 12px;
  font-weight: 850;
}

.privacy-copy {
  display: grid;
  gap: 12px;
}

.privacy-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.contribution-list {
  display: grid;
  gap: 9px;
}

.contribution-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: white;
}

.contribution-item.suess {
  border-left-color: var(--sweet);
}

.contribution-item strong,
.contribution-item small {
  display: block;
}

.contribution-item small,
p,
small {
  color: var(--muted);
}

.site-footer {
  display: grid;
  gap: 12px;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 14px 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  justify-items: center;
}

.site-footer a,
.footer-button {
  color: var(--accent);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.admin-main {
  padding: 56px clamp(20px, 5vw, 72px) 64px;
}

.admin-login,
.admin-dashboard {
  padding: clamp(24px, 5vw, 42px);
}

.admin-login {
  max-width: 560px;
}

.hidden {
  display: none;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.admin-head h1,
.admin-login h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.status-panel div {
  min-height: 110px;
  padding: 18px;
  background: white;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-panel strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 38px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .survey-main {
    padding-top: 36px;
  }

  .form-panel,
  .thanks-panel {
    padding: 24px;
  }

  .field-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-stack label:first-child,
  .field-stack label:nth-child(3) {
    grid-column: 1 / -1;
  }

}

@media (max-width: 420px) {
  .helper-list label {
    min-height: 54px;
  }

  .choice strong {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .kids-strip {
    width: min(86%, 320px);
    height: 72px;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 760px) {
  .admin-main {
    padding: 24px 14px 44px;
  }

  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: stretch;
    width: 100%;
  }

  .admin-actions button {
    width: 100%;
  }

  .status-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}
