:root {
  --text: #1a1a1a;
  --muted: #5b6168;
  --line: #d4d8dd;
  --bg: #f5f6f8;
  --card: #ffffff;
  --accent: #0b5cad;
  --accent-hover: #084a8c;
  --error-bg: #fdecec;
  --error-text: #8a1c1c;
  --ok-bg: #e7f5ea;
  --ok-text: #1d5b2c;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-weight: 600;
}

main.wrap { padding-block: 32px 64px; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.optional { font-weight: 400; color: var(--muted); }

input[type=text], input[type=email], input[type=tel], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  color: inherit;
  background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.has-error input, .has-error textarea { border-color: var(--error-text); }

.hint { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }

.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 12px; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.check label { font-weight: 400; }

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.secondary:hover { background: #eef4fb; }

.actions { display: flex; flex-wrap: wrap; gap: 0 12px; }
.actions form { display: inline; }

.msg { padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; }
.msg p { margin: 0 0 4px; }
.msg ul { margin: 0; padding-left: 20px; }
.msg-error { background: var(--error-bg); color: var(--error-text); }
.msg-notice { background: var(--ok-bg); color: var(--ok-text); }

.result-signed h1 { color: var(--ok-text); }
.result-failed h1, .result-expired h1 { color: var(--error-text); }

/* The honeypot: off-screen rather than display:none, which some bots know to skip. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.form-list h2 { font-size: 1.15rem; margin: 0 0 6px; }
.form-list p { margin: 0; color: var(--muted); }
select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
