@font-face { font-family: Poppins; src: url("assets/fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Poppins; src: url("assets/fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url("assets/fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("assets/fonts/open-sans-400.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --pcfg-green: #4caf50;
  --pcfg-green-50: #f1f8e9;
  --pcfg-green-100: #e8f5e9;
  --pcfg-green-300: #81c784;
  --pcfg-green-800: #558b2f;
  --pcfg-green-text: #2e7d32;
  --pcfg-navy-50: #f5f8fa;
  --pcfg-navy-600: #00418c;
  --pcfg-navy-700: #00366f;
  --pcfg-navy-800: #002a52;
  --pcfg-navy-900: #001d36;
  --pcfg-ink: #212121;
  --muted: #52606d;
  --border: #c8d2dc;
  --error: #a32116;
  --error-bg: #fff4f2;
  --surface: #fff;
  --radius: 10px;
  --shadow: 0 8px 24px rgb(0 29 54 / 9%);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; color: var(--pcfg-ink); background: var(--pcfg-navy-50); font: 400 16px/1.5 "Open Sans", Arial, sans-serif; }
h1, h2, h3, h4, button { font-family: Poppins, Arial, sans-serif; }
button, input, textarea, select { font: inherit; }
.hidden { display: none !important; }
.visually-hidden, .honeypot { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 10px 14px; background: var(--pcfg-navy-900); color: #fff; }
.skip-link:focus { top: 12px; }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--pcfg-navy-900);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--pcfg-green);
}

.site-header { background: #fff; border-top: 7px solid var(--pcfg-green); border-bottom: 1px solid #dce4e9; }
.header-inner { max-width: 1080px; margin: 0 auto; padding: 24px; display: flex; align-items: center; gap: 34px; }
.brand-logo { width: 210px; height: auto; flex: 0 0 auto; }
.eyebrow { margin: 0 0 2px; color: var(--pcfg-green-text); font: 600 14px/1.3 Poppins, Arial, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.site-header h1 { margin: 0; color: var(--pcfg-navy-900); font-size: clamp(24px, 4vw, 36px); line-height: 1.15; }
.header-copy { margin: 5px 0 0; color: var(--muted); }

.container { width: min(100% - 32px, 1000px); margin: 26px auto 64px; }
.confidential-note { margin: 0 0 18px; padding: 14px 18px; border-left: 5px solid var(--pcfg-green); background: var(--surface); border-radius: var(--radius); color: var(--muted); box-shadow: var(--shadow); }
.resume-banner, .autosave-bar { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: var(--pcfg-green-50); border: 1px solid var(--pcfg-green-300); border-radius: var(--radius); padding: 13px 16px; margin-bottom: 16px; }
.resume-banner strong, .resume-banner span { display: block; }
.autosave-bar { background: #fff; border-color: var(--border); font-size: 14px; flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.text-button { border: 0; background: transparent; color: var(--pcfg-navy-700); text-decoration: underline; cursor: pointer; padding: 5px; }

.progress { margin: 22px 0; }
.progress-heading { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 14px; }
.progress-heading span:first-child { color: var(--pcfg-navy-900); font-weight: 700; }
.progress-track { height: 9px; margin: 8px 0 12px; overflow: hidden; border-radius: 999px; background: #dce4e9; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--pcfg-green); transition: width .2s ease; }
.progress-track .progress-1 { width: 16.6667%; }
.progress-track .progress-2 { width: 33.3333%; }
.progress-track .progress-3 { width: 50%; }
.progress-track .progress-4 { width: 66.6667%; }
.progress-track .progress-5 { width: 83.3333%; }
.progress-track .progress-6 { width: 100%; }
.progress ol { display: flex; gap: 7px; list-style: none; padding: 0; margin: 0; overflow-x: auto; }
.progress li { padding: 5px 10px; border-radius: 999px; background: #e8edf1; color: #45515c; font-size: 12px; white-space: nowrap; }
.progress li.current { background: var(--pcfg-navy-900); color: #fff; }
.progress li.complete { background: var(--pcfg-green-100); color: var(--pcfg-green-text); }

.form-step { display: none; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 34px); }
.form-step.active { display: block; }
.form-step h2 { margin: 0 0 7px; color: var(--pcfg-navy-900); font-size: 24px; }
.step-intro { margin: 0 0 24px; color: var(--muted); }
.field-section { margin: 26px 0 0; padding: 0; border: 0; }
.field-section legend { width: 100%; padding: 0 0 8px; margin-bottom: 14px; border-bottom: 2px solid var(--pcfg-green-100); color: var(--pcfg-navy-800); font: 600 17px/1.35 Poppins, Arial, sans-serif; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.field { min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field[hidden] { display: none; }
.field > label, .field-label { display: block; margin-bottom: 6px; color: var(--pcfg-ink); font-weight: 700; font-size: 14px; }
.required-mark { color: var(--error); }
.help-text, .hint { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea, select {
  width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--pcfg-ink);
}
textarea { min-height: 88px; resize: vertical; }
input[readonly] { background: #f1f4f6; color: #39444e; }
.choice-group { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 9px 0 3px; }
.choice-group label, .checkbox-control { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.choice-group input, .checkbox-control input { margin-top: 4px; flex: 0 0 auto; }
.field.invalid :is(input, textarea, select, .choice-group) { border-color: var(--error); }
.field-error { display: none; margin: 5px 0 0; color: var(--error); font-size: 13px; font-weight: 700; }
.field.invalid .field-error { display: block; }
.error-summary { margin-bottom: 18px; padding: 14px 18px; border: 2px solid var(--error); background: var(--error-bg); border-radius: 8px; }
.error-summary h2 { margin: 0 0 6px; font-size: 18px; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--pcfg-navy-700); }

.money-wrap { display: grid; grid-template-columns: auto 1fr; align-items: stretch; }
.money-code { display: grid; place-items: center; min-width: 55px; padding: 0 8px; border: 1px solid var(--border); border-right: 0; border-radius: 7px 0 0 7px; background: #eef2f4; color: var(--pcfg-navy-800); font-weight: 700; font-size: 13px; }
.money-wrap input { border-radius: 0 7px 7px 0; }
.currency-lock { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

.repeat-card-list { display: grid; gap: 14px; }
.repeat-card { padding: 17px; border: 1px solid var(--border); border-radius: 9px; background: #fbfcfd; }
.repeat-card h4 { margin: 0 0 12px; color: var(--pcfg-navy-800); }
.repeat-card .field-grid { gap: 12px 16px; }
.history-scope-note { margin: 12px 0; padding: 10px 12px; background: var(--pcfg-green-50); border-left: 4px solid var(--pcfg-green); color: #314034; }
.mix-total { margin-top: 10px; font-weight: 700; color: var(--pcfg-navy-800); }
.mix-total.invalid { color: var(--error); }

.fraud-groups { display: grid; gap: 12px; }
.fraud-group { border: 1px solid var(--border); border-radius: 8px; background: #fbfcfd; }
.fraud-group summary { padding: 13px 15px; color: var(--pcfg-navy-800); font-family: Poppins, Arial, sans-serif; font-weight: 600; cursor: pointer; }
.fraud-content { padding: 0 16px 15px; }
.fraud-notice h4 { margin: 16px 0 4px; font-size: 14px; color: var(--pcfg-navy-900); }
.fraud-notice p { margin: 0; font-size: 13px; }
.legal-copy { margin: 14px 0; padding: 14px 16px; border: 1px solid var(--border); border-left: 5px solid var(--pcfg-green); border-radius: 8px; background: #fbfcfd; }
.legal-copy h3 { margin: 0 0 8px; color: var(--pcfg-navy-800); font-size: 16px; }
.legal-copy p { margin: 7px 0; }
.draft-warning { color: var(--error); font-weight: 700; }
.signature-input { font-family: Poppins, Arial, sans-serif; font-size: 18px; }

.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.centered { justify-content: center; }
.btn { min-height: 42px; padding: 9px 18px; border: 1px solid transparent; border-radius: 7px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--pcfg-navy-900); color: #fff; }
.btn-primary:hover { background: var(--pcfg-navy-700); }
.btn-secondary { border-color: var(--pcfg-navy-700); background: #fff; color: var(--pcfg-navy-700); }
.btn-secondary:hover { background: var(--pcfg-navy-50); }
.btn:disabled { cursor: not-allowed; opacity: .55; }

.success-panel { padding: 38px 24px; text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.success-panel h2 { margin: 4px 0; color: var(--pcfg-navy-900); }
.success-mark { margin: 0; color: var(--pcfg-green-text); font: 700 48px/1 Poppins, Arial, sans-serif; }
.application-ref { overflow-wrap: anywhere; }
.site-footer { padding: 24px; text-align: center; background: var(--pcfg-navy-900); color: #fff; font-size: 13px; }

dialog { width: min(92vw, 570px); padding: 0; border: 0; border-radius: 10px; box-shadow: 0 18px 55px rgb(0 29 54 / 35%); }
dialog::backdrop { background: rgb(0 29 54 / 62%); }
dialog form { padding: 24px; }
dialog h2 { margin-top: 0; color: var(--pcfg-navy-900); }
.warning { padding: 10px 12px; background: #fff5e8; border-left: 4px solid #9b5d00; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%); max-width: min(90vw, 620px); padding: 11px 18px; border-radius: 999px; background: var(--pcfg-navy-900); color: #fff; box-shadow: var(--shadow); }
.toast.error { background: var(--error); }

@media (max-width: 720px) {
  .header-inner { align-items: flex-start; flex-direction: column; gap: 16px; }
  .brand-logo { width: 170px; }
  .field-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .progress ol { display: none; }
  .resume-banner { align-items: flex-start; flex-direction: column; }
  .wizard-nav { flex-wrap: wrap; }
  #btn-next, #btn-submit { margin-left: auto; }
}

@media print {
  .site-header, .confidential-note, .resume-banner, .autosave-bar, .progress, .wizard-nav, .site-footer, .toast { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .container { width: 100%; margin: 0; }
  .form-step { display: block !important; box-shadow: none; padding: 14px 0; break-after: page; }
  details { display: block; }
  details > summary { display: none; }
  details > .fraud-content { display: block; }
  .repeat-card { break-inside: avoid; }
}
