:root {
  --navy: #1F3B6E;
  --navy-deep: #16294d;
  --blue: #2E6FB0;
  --blue-light: #eaf1f9;
  --ink: #14181f;
  --gray: #5b6573;
  --gray-light: #8b95a3;
  --line: #e2e8f0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #1f9d63;
  --err: #c23b3b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 41, 77, .06), 0 8px 24px rgba(20, 41, 77, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 40px; display: block; }
.header-tag {
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-light); padding: 6px 12px; border-radius: 999px;
}

/* Hero */
.hero { padding: 48px 0 24px; }
.hero h1 { font-size: 2.2rem; line-height: 1.1; margin: 0 0 12px; color: var(--navy); letter-spacing: -.02em; }
.lede { font-size: 1.08rem; color: var(--gray); margin: 0; max-width: 60ch; }

/* Cards / sections */
.sections { display: flex; flex-direction: column; gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px 24px 8px; margin: 0;
}
fieldset.card { min-width: 0; }
.card legend, .section-title {
  font-size: 1.25rem; font-weight: 700; color: var(--navy); padding: 0;
  display: flex; align-items: baseline; gap: 10px;
}
.section-num {
  font-size: .8rem; font-weight: 700; color: #fff; background: var(--navy);
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; flex: none;
}
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.section-intro { color: var(--gray); margin: 4px 0 18px; }

/* Fields */
.field { display: block; margin: 0 0 18px; }
.field-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field-label .req { color: var(--err); margin-left: 2px; }
.field-help { display: block; font-size: .88rem; color: var(--gray-light); margin: -2px 0 8px; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=date],
select, textarea {
  width: 100%; padding: 11px 13px; font-size: 1rem; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 9px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 111, 176, .15);
}
input[type=file] { font-size: .95rem; color: var(--gray); }

/* Choice groups */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices.inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 9px; cursor: pointer; transition: all .12s; background: #fff;
}
.choice:hover { border-color: var(--blue); background: var(--blue-light); }
.choice input { accent-color: var(--blue); width: 17px; height: 17px; flex: none; }
.choice.checked { border-color: var(--blue); background: var(--blue-light); }

/* File list */
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li {
  font-size: .9rem; color: var(--gray); background: var(--bg);
  padding: 8px 12px; border-radius: 7px; display: flex; justify-content: space-between;
}

/* Actions */
.actions { display: flex; align-items: center; gap: 16px; margin: 28px 0 56px; }
.btn {
  font: inherit; font-weight: 600; border: none; border-radius: 10px; padding: 14px 28px;
  cursor: pointer; transition: transform .05s, background .15s, box-shadow .15s;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: var(--gray-light); cursor: not-allowed; }
.form-error { color: var(--err); font-weight: 500; }

/* Success */
.success { padding: 32px; text-align: center; margin: 40px 0; }
.success h2 { color: var(--navy); margin-top: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; font-size: .9rem; color: var(--gray); }

.muted { color: var(--gray-light); }
.loading { color: var(--gray-light); padding: 40px 0; text-align: center; }
code { background: var(--bg); padding: 2px 7px; border-radius: 5px; font-size: .9em; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.7rem; }
  .card { padding: 20px 16px 4px; }
  .header-tag { display: none; }
}
