:root {
  --paper: #f3eee4;
  --surface: #fcfaf5;
  --ink: #211d17;
  --ink-soft: #564e43;
  --muted: #9b9081;
  --line: #e2d9c9;
  --line-soft: #ece5d8;
  --accent: #8a6d3f;       /* przygaszony mosiądz */
  --accent-dark: #6e5630;
  --star: #c79a3a;
  --star-off: #d8cfbd;
  --google: #1a73e8;
  --err: #a8402d;
  --shadow: 0 1px 2px rgba(33, 29, 23, 0.04), 0 18px 50px -28px rgba(33, 29, 23, 0.30);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  /* delikatna ziarnistość papieru zamiast gradientu */
  background-image:
    radial-gradient(rgba(33, 29, 23, 0.022) 1px, transparent 1px);
  background-size: 4px 4px;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 56px 22px 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 44px 40px;
}

/* ---------- nagłówek ---------- */
.card-head {
  margin-bottom: 14px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 16px;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-size: clamp(33px, 8vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}
h1 em { font-style: italic; font-weight: 400; }

.lead {
  color: var(--ink-soft);
  margin: 0;
  font-size: 16.5px;
  max-width: 46ch;
}

/* ---------- pytania ---------- */
.q {
  border: none;
  margin: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
}
.q:last-of-type { border-bottom: none; }

.q legend {
  display: block;
  width: 100%;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 16px;
  padding: 0;
  color: var(--ink);
}

.qnum {
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  color: var(--accent);
  margin-right: 10px;
}
.qnum::after { content: "."; }

.opt {
  display: inline-block;
  font-family: "Instrument Sans", sans-serif;
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* ---------- gwiazdki ---------- */
.stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 6px;
}
.stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars label {
  font-size: 34px;
  line-height: 1;
  color: var(--star-off);
  cursor: pointer;
  transition: color 0.14s ease, transform 0.1s ease;
  user-select: none;
}
.stars label:hover { transform: translateY(-1px); }
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label { color: var(--star); }
.stars input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

/* ---------- pola tekstowe ---------- */
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 13px 15px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fffdf9;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea::placeholder { color: #b6ab99; }
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 109, 63, 0.12);
}

/* ---------- wybór Tak/Nie ---------- */
.choice { display: inline-flex; gap: 10px; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice label {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 26px;
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-soft);
  background: #fffdf9;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  user-select: none;
}
.choice label:hover { border-color: var(--accent); }
.choice input:checked + label {
  background: var(--accent);
  color: #fffdf8;
  border-color: var(--accent);
}
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- błędy ---------- */
.err {
  display: none;
  color: var(--err);
  font-size: 13.5px;
  margin: 10px 0 0;
}
.q.invalid .err { display: block; }
.q.invalid legend { color: var(--err); }
.q.invalid .qnum { color: var(--err); }

/* ---------- honeypot ---------- */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- przyciski ---------- */
.btn {
  display: block;
  width: 100%;
  margin-top: 30px;
  border: none;
  border-radius: 5px;
  background: var(--accent);
  color: #fffdf8;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  padding: 16px 22px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-google {
  background: var(--google);
  margin-top: 26px;
}
.btn-google:hover { background: #1660c9; }

.form-status {
  text-align: center;
  font-size: 14px;
  margin: 16px 0 0;
  min-height: 1em;
  color: var(--ink-soft);
}
.form-status.is-error { color: var(--err); }

/* ---------- podziękowania ---------- */
.thanks { text-align: center; padding: 56px 40px; }
.mark {
  width: 56px; height: 56px;
  color: var(--accent);
  margin: 0 auto 22px;
  display: block;
}
.thanks h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.thanks .lead { margin: 0 auto; }
.thanks .btn-google { max-width: 360px; margin-left: auto; margin-right: auto; }

.muted { color: var(--muted); font-size: 14px; margin: 22px 0 0; }

.hidden { display: none !important; }

.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  margin-top: 26px;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 36px 16px 48px; }
  .card { padding: 32px 22px; }
  .thanks { padding: 44px 22px; }
  .stars label { font-size: 32px; }
}
