@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');
:root {
  --ink: #193b36;
  --muted: #74817b;
  --green: #235b4b;
  --line: #e1e7e1;
  --bg: #f6f7f2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
}
header {
  max-width: 1320px;
  margin: auto;
  padding: 27px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.7px;
  margin-top: 5px;
}
.mark {
  width: 42px;
  height: 44px;
  background: var(--green);
  border-radius: 12px 12px 12px 0;
  color: white;
  display: grid;
  place-items: center;
  font-size: 26px;
}
.pill {
  border: 1px solid #d8e1d5;
  border-radius: 30px;
  padding: 10px 15px;
  font-size: 11px;
  color: #4b6d55;
}
main {
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: 39% 61%;
  padding: 50px 44px;
  gap: 0;
}
aside {
  padding: 30px 55px 0 0;
  position: sticky;
  top: 0;
  align-self: start;
  overflow: hidden;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #718771;
}
h1 {
  font-size: 43px;
  line-height: 1.2;
  letter-spacing: -1.9px;
  font-weight: 500;
  margin: 23px 0;
}
.intro {
  font-size: 15px;
  line-height: 1.85;
  color: #6a7971;
  max-width: 320px;
}
.steps {
  margin: 36px 0;
}
.steps div {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  font-size: 12px;
}
.steps b {
  font-size: 10px;
  border: 1px solid #ced8ca;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: #66856a;
}
.aside-note {
  display: flex;
  gap: 12px;
  border-top: 1px solid #dce3d7;
  padding-top: 20px;
}
.aside-note > span {
  font-size: 24px;
}
.aside-note p {
  margin: 0;
  color: #78847a;
  font-size: 11px;
  line-height: 1.9;
}
.aside-note strong {
  color: #48604f;
  font-weight: 600;
}
.text-link {
  display: inline-block;
  margin-top: 22px;
  font-size: 11px;
  text-underline-offset: 5px;
}
.house {
  margin: 45px 20px -10px;
  opacity: 0.14;
  width: 190px;
  border: 1px solid var(--green);
  border-radius: 50px 50px 0 0;
  transform: rotate(-8deg);
}
.windows {
  text-align: center;
  font-size: 42px;
  letter-spacing: 12px;
  line-height: 1.4;
}
.form-area {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 34px;
  box-shadow: 0 6px 25px #183b3605;
}
.topline {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
  color: #819084;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
#progress {
  letter-spacing: 0;
  color: var(--green);
}
section {
  padding: 29px 0 2px;
}
section + section {
  border-top: 1px solid var(--line);
  margin-top: 27px;
}
.section-heading {
  display: flex;
  gap: 13px;
  align-items: start;
  margin-bottom: 24px;
}
.number {
  font-size: 11px;
  color: #63816c;
  background: #eef3ec;
  border-radius: 7px;
  padding: 8px;
}
h2 {
  font-size: 18px;
  margin: 2px 0 6px;
  letter-spacing: -0.5px;
}
.section-heading p {
  margin: 0;
  color: #879088;
  font-size: 11px;
  line-height: 1.7;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #4c6055;
}
.wide {
  grid-column: 1/-1;
}
input,
select {
  width: 100%;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  padding: 13px;
  border-radius: 7px;
  border: 1px solid #dce3db;
  background: #fcfdfa;
  min-width: 0;
  outline-offset: 3px;
}
input:focus,
select:focus {
  outline: 2px solid #98b7a3;
}
input::placeholder {
  color: #a1aaa2;
}
button {
  cursor: pointer;
  font: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 15px;
  color: var(--ink);
}
button:hover {
  filter: brightness(0.96);
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #59856a;
  outline-offset: 3px;
}
.q {
  padding: 19px 0;
  border-top: 1px solid #edf0eb;
}
.q:first-child {
  border-top: 0;
  padding-top: 0;
}
.q h3 {
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 11px;
  font-weight: 600;
}
.q details {
  font-size: 11px;
  color: #738077;
  line-height: 1.8;
}
.q summary {
  cursor: pointer;
  color: #4c705c;
}
.q pre {
  font: inherit;
  white-space: pre-wrap;
  margin: 13px 0;
  background: #f6f8f3;
  padding: 14px;
  border-radius: 7px;
}
.answers {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.choice {
  position: relative;
  flex: 1;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.choice span {
  border: 1px solid #dce3db;
  border-radius: 7px;
  text-align: center;
  padding: 11px;
  font-size: 12px;
  cursor: pointer;
}
.choice input:checked + span {
  background: #eaf3e8;
  color: var(--green);
  border-color: #73997b;
}
.choice input:focus-visible + span {
  outline: 2px solid #59856a;
  outline-offset: 2px;
}
.signature-box {
  border: 1px dashed #bdcbbb;
  border-radius: 9px;
  background: #fcfdfb;
}
canvas {
  display: block;
  width: 100%;
  height: 170px;
  touch-action: none;
  cursor: crosshair;
}
.signature-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 14px;
  padding: 10px 0;
  border-top: 1px solid #e3e9e0;
}
.signature-bottom span {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #a1aca0;
}
.signature-bottom button {
  border: 0;
  padding: 4px;
  font-size: 10px;
  background: transparent;
}
.hint {
  font-size: 10px;
  color: #8b948b;
  line-height: 1.8;
}
.check {
  flex-direction: row;
  align-items: start;
  gap: 10px;
  margin: 22px 0;
  line-height: 1.8;
  font-weight: 400;
}
.check input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--green);
  margin-top: 3px;
}
.pollster {
  font-size: 11px;
  margin: 20px 0;
  color: #6c7d70;
}
.pollster summary {
  cursor: pointer;
}
.pollster label {
  margin-top: 14px;
}
.primary {
  background: var(--green);
  color: white;
  border: 0;
  font-weight: 600;
  padding: 16px 20px;
}
form .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  text-align: left;
}
.center {
  text-align: center;
}
#error {
  color: #a6382d;
  font-size: 12px;
  margin-bottom: 12px;
}
footer {
  font-size: 9px;
  text-align: center;
  color: #9ba49a;
  margin-top: 25px;
}
dialog {
  width: min(950px, 96vw);
  max-height: 92vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 25px;
  color: var(--ink);
}
dialog::backdrop {
  background: #15372a99;
}
.dialog-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.review-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
#paper {
  background: white;
  color: black;
  padding: 25px;
  font-family: 'Times New Roman', serif;
  font-size: 12px;
  border: 1px solid #ddd;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
#paper p {
  white-space: pre-wrap;
}
#paper table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}
#paper td,
#paper th {
  border: 1px solid black;
  padding: 7px;
  vertical-align: top;
}
#paper td:first-child {
  width: 74%;
}
#paper img {
  width: 85px;
  height: 36px;
  object-fit: contain;
}
#result {
  font-size: 12px;
  color: var(--green);
}
@media (max-width: 950px) {
  main {
    grid-template-columns: 34% 66%;
    padding: 30px 24px;
  }
  aside {
    padding-right: 25px;
  }
  h1 {
    font-size: 31px;
  }
  .form-area {
    padding: 24px;
  }
}
@media (max-width: 650px) {
  header {
    padding: 19px 20px;
  }
  .brand {
    font-size: 15px;
  }
  .pill {
    font-size: 0;
    padding: 8px;
  }
  .pill::after {
    content: 'Опитування';
    font-size: 10px;
  }
  main {
    display: block;
    padding: 20px 14px;
  }
  aside {
    position: static;
    padding: 8px 8px 22px;
  }
  h1 {
    font-size: 34px;
    letter-spacing: -1.2px;
    margin: 16px 0;
  }
  h1 br {
    display: none;
  }
  .intro {
    max-width: none;
    font-size: 13px;
  }
  .steps,
  .house,
  .aside-note,
  .text-link {
    display: none;
  }
  .form-area {
    padding: 22px 19px;
    border-radius: 13px;
  }
  .topline {
    font-size: 8px;
    letter-spacing: 0.3px;
  }
  .grid {
    gap: 17px 12px;
  }
  h2 {
    font-size: 17px;
  }
  input,
  select {
    font-size: 16px;
    padding: 12px 10px;
  }
  .review-actions {
    flex-wrap: wrap;
  }
  dialog {
    padding: 15px;
  }
  #paper {
    padding: 10px;
  }
  .dialog-bar {
    font-size: 12px;
  }
}
@media print {
  body > header,
  body > main,
  .dialog-bar,
  .review-actions,
  dialog > .hint,
  #result {
    display: none !important;
  }
  dialog {
    display: block !important;
    position: static;
    max-height: none;
    width: 100%;
    border: 0;
    padding: 0;
    overflow: visible;
  }
  #paper {
    border: 0;
    padding: 0;
    font-size: 11pt;
  }
  #paper table {
    font-size: 9pt;
  }
  #paper tr {
    break-inside: avoid;
  }
  @page {
    size: A4;
    margin: 12mm;
  }
}

button.text-link {
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: underline;
}

/* Handwritten owner-supplied values; form labels and proposals keep their original typeface. */
#paper .handwritten {
  font-family: 'Marck Script', cursive;
  font-size: 1.25em;
  font-weight: 400;
  line-height: 1.25;
}
#paper .owner-note {
  margin-top: 20px;
  font-family: 'Times New Roman', serif;
  font-size: 0.9em;
}

.send-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
}
.send-panel strong {
  overflow-wrap: anywhere;
}
#send-vote {
  width: 100%;
  margin-top: 10px;
}
button:disabled {
  cursor: default;
  opacity: 0.65;
}
#send-result {
  min-height: 1.8em;
  color: var(--green);
}
#send-result[data-error='true'] {
  color: #a6382d;
}
.mail-trap {
  display: none;
}
@media print {
  .send-panel {
    display: none !important;
  }
}
