:root {
  color-scheme: light;
  --bg: #ffffff;
  --card: #ffffff;
  --line: #d5e6db;
  --text: #143024;
  --muted: #5d7a68;
  --green: #1f8a4d;
  --green-2: #1a7a45;
  --danger: #b42318;
  --warn: #8a6116;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.45;
}

.wrap { width: min(840px, calc(100% - 32px)); margin: 0 auto; }
main.wrap { padding: 28px 0 72px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bar { display: flex; align-items: center; gap: 14px; min-height: 92px; }
.brand-logo { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; }
.bar strong, .bar span { display: block; }
.bar span { color: var(--muted); font-size: 14px; }

.hero { margin-bottom: 18px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--green-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.03em; }
.hero p { margin: 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
}

h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 22px; }
h2 span, h3 { font-weight: 700; }
h2 span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a5a36;
  color: #d9ffe8;
  font-size: 14px;
}
h3 { margin: 26px 0 12px; font-size: 18px; }
.label, .hint { color: var(--muted); }
.label { margin: 16px 0 8px; }
.hint { margin: 8px 0 12px; font-size: 14px; }
i { color: #d92d20; font-style: normal; }

.field { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.field > span { font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}
input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--green-2);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-2); border-color: transparent; }
input[readonly] { opacity: 0.75; }

.choice, .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label, .checks label, .checkline, .consent {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.choice label, .checks label { max-width: 100%; }
.choice label:has(input:checked), .checks label:has(input:checked) {
  background: #e7f6ec;
  border-color: var(--green);
}
.checkline, .consent {
  border-radius: 14px;
  width: 100%;
  margin: 10px 0;
  align-items: flex-start;
}
.consent input, .checkline input { margin-top: 2px; }
.consent a { color: var(--green-2); font-weight: 700; }
.consent label { cursor: pointer; }

.repeat-card {
  background: #f7fbf8;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.repeat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.repeat-head h3 { margin: 0; }

button, .button-secondary, .text-button {
  font: inherit;
  cursor: pointer;
}
button[type="submit"] {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #2ea15f, #176b3e);
  color: white;
  font-weight: 800;
  font-size: 17px;
}
button[type="submit"]:disabled { opacity: 0.65; cursor: progress; }
.button-secondary {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px dashed #2f7a4e;
  border-radius: 12px;
  padding: 12px 16px;
}
.text-button { background: none; border: 0; color: var(--danger); padding: 0; }
.upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px dashed #2f7a4e;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
}
.upload small, .banner { color: var(--muted); }
.preview { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }

.banner {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.banner.error { background: #fdecea; color: var(--danger); }
.banner.warn { background: #fff6dd; color: var(--warn); }
.success p { color: var(--muted); }

@media (max-width: 700px) {
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 16px; }

  .choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .choice:has(> label:nth-child(3)) { grid-template-columns: 1fr; }
  .choice label {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    border-radius: 12px;
    padding: 10px 12px;
  }

  .checks {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .checks label {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    border-radius: 12px;
    padding: 10px 6px;
  }
}
