:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #667085;
  --line: #dfe5ee;
  --primary: #0b6bcb;
  --primary-dark: #0757a7;
  --primary-soft: #eaf4ff;
  --accent: #0f9f8f;
  --danger: #c43c47;
  --danger-soft: #fff1f2;
  --warning: #9b6700;
  --warning-soft: #fff8e6;
  --success: #087a55;
  --shadow: 0 20px 50px rgba(26, 44, 72, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.hero {
  background:
    radial-gradient(circle at 80% 10%, rgba(50, 175, 255, .22), transparent 32%),
    linear-gradient(135deg, #08264b 0%, #0b5fae 55%, #078b9c 100%);
  color: white;
  padding: 34px 20px 96px;
}
.hero__inner { max-width: 1120px; margin: 0 auto; }
.brand { display: flex; align-items: center; margin-bottom: 42px; }
.brand__logo {
  display: block;
  width: min(230px, 58vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.14));
}
.eyebrow, .section-kicker { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 800; }
.eyebrow { color: #a8e8ff; margin-bottom: 10px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 52px); line-height: 1.08; max-width: 800px; letter-spacing: -0.04em; }
.hero__copy > p { margin: 0; max-width: 760px; color: rgba(255,255,255,.83); font-size: 17px; }

.container { max-width: 1120px; margin: -62px auto 0; padding: 0 20px 50px; }
.form-card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(255,255,255,.6); }
.progress-wrap { padding: 26px 34px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 20; }
.progress-bar { height: 5px; background: #e8edf3; border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.progress-bar span { display: block; height: 100%; width: 20%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .25s ease; }
.step-indicators { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.step-indicator { border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; gap: 9px; justify-content: center; padding: 3px 4px; }
.step-indicator span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #edf1f6; font-size: 12px; font-weight: 800; transition: .2s ease; }
.step-indicator small { font-size: 12px; font-weight: 700; white-space: nowrap; }
.step-indicator.active, .step-indicator.done { color: var(--primary); }
.step-indicator.active span { background: var(--primary); color: white; box-shadow: 0 0 0 5px var(--primary-soft); }
.step-indicator.done span { background: #dff7f2; color: var(--success); }

form { margin: 0; }
.form-step { display: none; padding: 42px 40px 24px; animation: fade .18s ease; }
.form-step.active { display: block; }
@keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.section-heading--actions { align-items: center; }
.section-kicker { color: var(--primary); margin-bottom: 5px; }
.section-heading h2 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); max-width: 720px; }

.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid--1 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.field--full { grid-column: 1 / -1; }
.field { min-width: 0; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: #344054; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="date"], .field input[type="time"], .field input[type="number"], .field textarea, .field select,
.repeat-card input, .repeat-card select, .extensions-table input, .ivr-option input, .hours-table input[type="time"] {
  width: 100%; border: 1px solid #cfd7e3; border-radius: 11px; padding: 11px 12px; color: var(--text); background: #fff; outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
}
textarea { resize: vertical; min-height: 52px; }
input:focus, textarea:focus, select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--primary-soft); }
input::placeholder, textarea::placeholder { color: #98a2b3; }
.required { color: var(--danger); }
.field-error { display: none; color: var(--danger); margin-top: 5px; font-size: 12px; }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--danger); background: var(--danger-soft); }
.helper-text, .field small { color: var(--muted); font-size: 12px; }

.notice { display: grid; gap: 3px; padding: 14px 16px; border-radius: 12px; margin: 0 0 22px; border: 1px solid transparent; font-size: 13px; }
.notice strong { font-size: 13px; }
.notice--info { background: #f0f7ff; border-color: #d8ebff; color: #174e83; }
.notice--warning { background: var(--warning-soft); border-color: #f7e3ad; color: #765100; }
.notice--neutral { background: #f7f8fa; border-color: var(--line); color: #515b6c; margin-top: 18px; }

.subsection { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 28px; }
.subsection--soft { background: var(--surface-soft); border: 1px solid var(--line); padding: 22px; border-radius: 15px; }
.subsection__title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.subsection__title h3 { margin: 0; font-size: 18px; }
.badge { background: #def4ff; color: #06628d; border-radius: 999px; padding: 4px 9px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.badge--muted { background: #eceff3; color: #687182; }

.btn { border: 0; border-radius: 11px; padding: 11px 17px; font-weight: 750; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(11,107,203,.2); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--secondary { background: var(--primary-soft); color: var(--primary); }
.btn--ghost { background: transparent; color: #475467; border: 1px solid var(--line); }
.btn--icon { display: inline-flex; align-items: center; gap: 6px; }
.btn--compact { padding: 9px 13px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.repeat-list { display: grid; gap: 14px; margin-bottom: 14px; }
.repeat-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fbfcfe; }
.repeat-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.repeat-card__head strong { font-size: 14px; }
.remove-btn { border: 0; background: #fff0f1; color: var(--danger); border-radius: 8px; padding: 6px 9px; font-size: 12px; font-weight: 750; }
.repeat-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; }
.repeat-grid label { display: block; font-size: 11px; font-weight: 750; color: var(--muted); margin-bottom: 5px; }
.file-field { margin-top: 24px; padding: 18px; border: 1px dashed #c7d3e2; border-radius: 13px; background: #fbfdff; }
.file-field input { width: 100%; }

.extensions-table-wrap, .hours-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
.extensions-table th, .extensions-table td, .hours-table th, .hours-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.extensions-table th, .hours-table th { background: #f6f8fb; color: #526071; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.extensions-table td { min-width: 120px; }
.extensions-table td:first-child { min-width: 92px; width: 105px; }
.extensions-table td:nth-child(5) { width: 105px; text-align: center; }
.extensions-table td:last-child { min-width: auto; width: 40px; }
.extensions-table input { padding: 9px 9px; border-radius: 9px; }
.checkbox-switch { display: inline-flex; align-items: center; justify-content: center; }
.checkbox-switch input { width: 18px; height: 18px; accent-color: var(--primary); }
.mobile-extension-list { display: none; }

.hours-table td:first-child { font-weight: 700; min-width: 105px; }
.hours-table td { min-width: 120px; }
.hours-table td:nth-child(2) { min-width: 72px; width: 72px; text-align: center; }
.hours-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.hours-table tr.closed input[type="time"] { opacity: .35; pointer-events: none; background: #f2f4f7; }

.ivr-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 14px; }
.ivr-option { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 10px; }
.ivr-option__key { border-radius: 9px; padding: 9px 10px; text-align: center; font-size: 12px; font-weight: 800; background: #eef3f8; color: #4d5e73; }
.ivr-option input { padding: 9px 10px; border-radius: 9px; }
.textarea-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; margin-top: 6px; }
.text-link { border: 0; background: transparent; color: var(--primary); padding: 0; font-weight: 700; }
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.choice-card { display: flex; gap: 12px; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice-card input { margin-top: 4px; accent-color: var(--primary); }
.choice-card span { display: grid; }
.choice-card small { color: var(--muted); }
.fax-details { margin-top: 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; padding: 16px; background: #f7fafc; border: 1px solid var(--line); border-radius: 12px; margin-top: 25px; font-size: 13px; }
.consent input { margin-top: 3px; accent-color: var(--primary); }

.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 21px 40px 28px; border-top: 1px solid var(--line); background: #fcfdff; }
.form-footer__right { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.autosave-status { color: #8993a3; font-size: 11px; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--submit.loading { display: inline-flex; align-items: center; gap: 9px; }
.btn--submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-panel { text-align: center; padding: 70px 30px; }
.success-icon { width: 70px; height: 70px; border-radius: 50%; background: #e0f7ef; color: var(--success); display: grid; place-items: center; font-size: 34px; font-weight: 800; margin: 0 auto 18px; }
.success-panel h2 { margin: 0 0 10px; font-size: 28px; }
.success-panel p { max-width: 600px; margin: 0 auto 22px; color: var(--muted); }
.error-panel { margin: 0 40px 30px; padding: 14px 16px; background: var(--danger-soft); color: #8f2933; border: 1px solid #ffcdd2; border-radius: 11px; }
.site-footer { text-align: center; color: #7a8596; font-size: 11px; padding: 24px 0 0; }
.site-footer p { margin: 3px 0; }

@media (max-width: 820px) {
  .hero { padding-bottom: 82px; }
  .brand { margin-bottom: 30px; }
  .brand__logo { width: min(210px, 62vw); }
  .container { padding: 0 12px 35px; }
  .progress-wrap { padding: 18px 16px 14px; }
  .step-indicator { gap: 0; }
  .step-indicator small { display: none; }
  .form-step { padding: 30px 20px 18px; }
  .grid--2, .repeat-grid, .ivr-grid, .choice-group { grid-template-columns: 1fr; }
  .section-heading, .section-heading--actions { align-items: flex-start; flex-direction: column; }
  .extensions-table-wrap { display: none; }
  .mobile-extension-list { display: grid; gap: 12px; }
  .mobile-extension-card { border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fbfcfe; }
  .mobile-extension-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .mobile-extension-card .grid { gap: 11px; margin-bottom: 10px; }
  .hours-table { min-width: 750px; }
  .form-footer { padding: 18px 20px 22px; flex-wrap: wrap; }
  .form-footer__right { width: 100%; }
  .autosave-status { display: none; }
  #prevBtn { order: 2; flex: 1; }
  .form-footer__right { order: 1; }
  .form-footer__right .btn { flex: 1; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 34px; }
  .hero__copy > p { font-size: 15px; }
  .form-card { border-radius: 18px; }
  .subsection--soft { padding: 16px; }
  .ivr-option { grid-template-columns: 62px 1fr; }
}
