html, body {
  margin: 0;
  padding: 0;
  background: var(--wf-bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root {
  --wf-bg: #ffffff;
  --wf-ink: #1a1a1a;
  --wf-ink-2: #555;
  --wf-muted: #8a8a8a;
  --wf-line: #d0d0d0;
  --wf-line-2: #b8b8b8;
  --wf-fill: #ebebeb;

  --wf-yes: #2e9e4f;
  --wf-no: #d04848;
  --wf-bar-done: #2e9e4f;
  --wf-bar-remain: #f0c4c4;
  --wf-neutral: #3a72c2;
}

html.dark {
  --wf-bg: #161616;
  --wf-ink: #ececec;
  --wf-ink-2: #b8b8b8;
  --wf-muted: #7e7e7e;
  --wf-line: #2f2f2f;
  --wf-line-2: #4a4a4a;
  --wf-fill: #262626;
}

.wf {
  background: var(--wf-bg);
  color: var(--wf-ink);
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.wf *, .wf *::before, .wf *::after { box-sizing: border-box; }
.wf h1, .wf h2, .wf h3, .wf p { margin: 0; }

.wf-prog {
  height: 3px;
  background: var(--wf-bar-remain);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  margin: 18px 32px 0;
}
.wf-prog__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--wf-bar-done);
  transition: width .25s ease;
}
.wf.no-color-bar .wf-prog { background: var(--wf-fill); }
.wf.no-color-bar .wf-prog__fill { background: var(--wf-ink); }

.wf-top {
  padding: 14px 32px 0;
  min-height: 38px;
}

.wf-back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--wf-muted);
  cursor: pointer; user-select: none;
  border: none; background: transparent;
  font: inherit;
  font-size: 13px;
  padding: 4px 8px 4px 0;
  white-space: nowrap;
}
.wf-back:hover { color: var(--wf-ink); }
.wf-back[hidden] { display: none; }

.wf-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px 32px 48px;
  gap: 0;
}

.wf-meta {
  color: var(--wf-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.wf-q {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 600;
  max-width: 540px;
}
.wf-q--long { font-size: 22px; line-height: 1.45; max-width: 580px; }
.wf-q--text { font-size: 22px; line-height: 1.4; max-width: 560px; }
.wf-q--end { font-size: 30px; line-height: 1.2; max-width: 520px; }

.wf-split-setup {
  font-size: 16px;
  line-height: 1.55;
  color: var(--wf-ink-2);
  font-weight: 400;
  margin-bottom: 10px;
  max-width: 560px;
}

.wf-sub {
  color: var(--wf-ink-2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 480px;
  margin-top: 14px;
}

.wf-answers {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.wf-answers--vert {
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 520px;
  margin-top: 28px;
}
.wf-answers--text,
.wf-answers--email {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 480px;
  margin-top: 24px;
}
.wf-answers--email { max-width: 420px; }

.wf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--wf-ink);
  background: var(--wf-bg);
  color: var(--wf-ink);
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  white-space: nowrap;
  cursor: pointer;
  min-width: 120px;
  transition: filter .15s, background .15s, border-color .15s;
}
.wf-btn:hover { filter: brightness(0.95); }
.wf-btn:focus-visible { outline: 2px solid var(--wf-ink); outline-offset: 2px; }

.wf-btn--yes { background: var(--wf-yes); color: #fff; border-color: var(--wf-yes); }
.wf-btn--no  { background: var(--wf-no);  color: #fff; border-color: var(--wf-no); }
.wf-btn--neutral { background: var(--wf-neutral); color: #fff; border-color: var(--wf-neutral); }
.wf.neutral-outlined .wf-btn--neutral {
  background: var(--wf-bg);
  color: var(--wf-ink);
  border-color: var(--wf-line-2);
}
.wf.neutral-outlined .wf-btn--neutral:hover { border-color: var(--wf-ink); }

.wf-btn--long {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  white-space: normal;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.4;
}

.wf-input,
.wf-textarea {
  border: 1.5px solid var(--wf-line-2);
  background: var(--wf-bg);
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--wf-ink);
  border-radius: 6px;
  outline: none;
  width: 100%;
}
.wf-textarea {
  padding: 12px 14px;
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}
.wf-input:focus, .wf-textarea:focus { border-color: var(--wf-ink); }
.wf-input::placeholder, .wf-textarea::placeholder { color: var(--wf-muted); }

.wf-email-row { display: flex; gap: 10px; }
.wf-email-row .wf-input { flex: 1; min-width: 0; }

.wf-text-send {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.wf-skip {
  margin-top: 12px;
  font-size: 13px;
  display: inline-block;
  align-self: center;
}

.wf-footer {
  border-top: 1px solid var(--wf-line);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--wf-ink-2);
  font-size: 13px;
  flex-wrap: wrap;
}
.wf-footer__text { flex: 1 1 240px; }
.wf-footer .wf-input { padding: 7px 10px; font-size: 13px; flex: 1; max-width: 260px; }
.wf-footer .wf-btn { padding: 6px 14px; font-size: 13px; min-width: 0; }

.wf-theme-toggle {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--wf-line);
  background: var(--wf-bg);
  color: var(--wf-ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 5;
  transition: color .15s, border-color .15s, background .15s;
}
.wf-theme-toggle:hover { color: var(--wf-ink); border-color: var(--wf-line-2); }
.wf-theme-toggle svg { width: 14px; height: 14px; display: block; }

.wf-confirm {
  margin-top: 12px;
  color: var(--wf-ink-2);
  font-size: 13px;
}
.wf-confirm:empty { margin-top: 0; }

.wf-home-link {
  font-size: 14px;
  margin-top: 20px;
}

.wf-answers--share {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 480px;
  margin-top: 24px;
}
.wf-share-url {
  font-size: 14px;
  text-align: center;
  color: var(--wf-ink-2);
}

@media (max-width: 520px) {
  .wf-body { padding: 16px 20px 36px; }
  .wf-top { padding: 14px 20px 0; }
  .wf-prog { margin: 18px 20px 0; }
  .wf-footer { padding: 12px 18px; }
  .wf-q { font-size: 22px; }
  .wf-q--end { font-size: 26px; }
  .wf-email-row { flex-direction: column; }
  .wf-email-row .wf-btn { width: 100%; }
}
