
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --border: #d9e0ea;
  --brand: #3156d3;
  --brand-dark: #2446b8;
  --success: #157f62;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(49, 86, 211, 0.08), transparent 28rem),
    var(--bg);
}

button, input, select, textarea { font: inherit; }

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, var(--brand), #6c84f4);
  box-shadow: 0 8px 18px rgba(49, 86, 211, 0.25);
}

.form-label {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero {
  padding: 30px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.progress-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0 14px;
  backdrop-filter: blur(12px);
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8ecf4;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #7188f1);
  transition: width 180ms ease;
}

.form-card {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.section-number {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: white;
  background: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0 0 5px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.full { grid-column: 1 / -1; }

.field label, .field .label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 750;
}

.required::after {
  content: " *";
  color: var(--danger);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(49, 86, 211, 0.12);
}

.help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.choice-row,
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.choice,
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.choice input, .check input { width: auto; }

.conditional {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed #bfc9dc;
  border-radius: 12px;
  background: var(--surface-soft);
}

.conditional.is-visible { display: block; }

.upload-box {
  position: relative;
  padding: 18px;
  border: 1px dashed #aeb9ce;
  border-radius: 12px;
  background: var(--surface-soft);
}

.upload-box input[type="file"] {
  padding: 9px;
  background: white;
}

.file-list {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.notice {
  padding: 14px 16px;
  border: 1px solid #c8d2ea;
  border-radius: 12px;
  background: #f4f7ff;
  color: #344054;
  line-height: 1.55;
}

.notice strong { color: var(--text); }

.review-box {
  max-height: 420px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 12px 17px;
  font-weight: 800;
  cursor: pointer;
}

.btn-secondary {
  color: var(--text);
  background: #e9edf5;
}

.btn-primary {
  color: white;
  background: var(--brand);
}

.btn-primary:hover { background: var(--brand-dark); }

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  line-height: 1.5;
}

.status.success {
  display: block;
  border: 1px solid #abdfcf;
  color: #0d5d48;
  background: #effbf7;
}

.status.error {
  display: block;
  border: 1px solid #f1b6b2;
  color: #8d2018;
  background: #fff4f3;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1040px); padding-top: 18px; }
  .topbar { align-items: flex-start; }
  .hero, .form-card { padding: 20px; }
  .grid { grid-template-columns: 1fr; }
  .full { grid-column: auto; }
  .actions { justify-content: stretch; }
  .actions button { flex: 1 1 160px; }
}


.captcha-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-top: 22px;
}

@media (max-width: 720px) {
  .captcha-wrap { align-items: flex-start; }
}


.captcha-wrap {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #c8d2ea;
  border-radius: 14px;
  background: #f7f9ff;
}

.captcha-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.captcha-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: white;
  background: var(--success);
  font-weight: 900;
}

#turnstileWidget {
  min-height: 65px;
}
