.mode-badge { display: none; padding: 7px 10px; border: 1px solid #b9dedc; border-radius: 999px; color: var(--accent-dark); background: #edfbf9; font-size: 0.72rem; font-weight: 750; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); background: var(--surface); font-weight: 850; cursor: pointer; }
.text-button { padding: 3px; border: 0; color: var(--brand-dark); background: transparent; text-decoration: underline; cursor: pointer; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; font-weight: 760; line-height: 1.2; text-decoration: none; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button--large { min-height: 52px; padding-inline: 23px; }
.button--wide { width: 100%; }
.button--primary { color: #fff; background: linear-gradient(135deg, var(--brand), #1987a0); box-shadow: 0 9px 20px rgba(23, 107, 135, 0.21); }
.button--primary:not(:disabled):hover { box-shadow: 0 12px 25px rgba(23, 107, 135, 0.28); }
.button--secondary { color: var(--brand-dark); border-color: #b9d4db; background: #f6fbfc; }
.button--ghost { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.button--danger { color: #fff; background: var(--danger); }
.button--danger-soft { color: var(--danger); border-color: #efc7ce; background: var(--danger-soft); }
.screen-card { min-height: 440px; padding: clamp(22px, 4vw, 46px); border: 1px solid rgba(214, 227, 230, 0.9); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-lg); }
.screen-heading { max-width: 720px; margin-bottom: 28px; }
.screen-heading h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 5vw, 2.75rem); }
.screen-lead { max-width: 680px; margin-bottom: 0; color: var(--ink-soft); font-size: 1.04rem; }
.eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-size: 0.77rem; font-weight: 850; letter-spacing: 0.14em; text-transform: uppercase; }
.step-list { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; margin: 0; padding: 12px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.87); }
.step-list li { min-width: 0; display: grid; justify-items: center; flex: 1; gap: 5px; color: #839399; font-size: 0.63rem; text-align: center; }
.step-number { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 0.73rem; font-weight: 850; }
.step-list .is-complete { color: var(--success); }
.step-list .is-complete .step-number { color: #fff; border-color: var(--success); background: var(--success); }
.step-list .is-current { color: var(--brand-dark); font-weight: 780; }
.step-list .is-current .step-number { color: #fff; border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 4px #dceff3; }
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label, fieldset legend { color: var(--ink); font-weight: 730; }
.field input, .field select, .demo-toolbar select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b9cdd2; border-radius: 10px; color: var(--ink); background: #fff; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px #fde6ea; }
.field-hint, .field-error { margin: 0; font-size: 0.79rem; }
.field-hint { color: var(--ink-soft); }
.field-error { min-height: 1.1em; color: var(--danger); font-weight: 650; }
.required-badge { margin-left: 5px; color: var(--ink-soft); font-size: 0.65rem; font-weight: 650; }
.choice-card { display: grid; gap: 11px; margin: 22px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.choice-card label { display: flex; align-items: center; gap: 9px; }
.choice-card small { color: var(--ink-soft); }
.form-actions, .split-actions, .review-actions, .hero-actions, .completion-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.form-actions .button, .split-actions .button { flex: 1 1 170px; }
.form-actions--center { justify-content: center; }
.narrow-form { max-width: 620px; }
.preview-notice, .warning-banner, .success-banner, .info-banner, .actor-banner, .finalize-warning { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border-radius: var(--radius-md); margin-bottom: 20px; }
.preview-notice { color: #6b4e18; border: 1px dashed #dcbe76; background: #fff9e9; }
.preview-notice strong { margin-right: 5px; }
.warning-banner { flex-direction: column; color: #6e4a0b; background: var(--warning-soft); border: 1px solid #efd79f; }
.success-banner { flex-direction: column; color: #105b40; background: var(--success-soft); border: 1px solid #b9e2d0; }
.info-banner { flex-direction: column; color: #254b75; background: var(--info-soft); border: 1px solid #c5daf4; }
.actor-banner { align-items: center; background: var(--surface-tint); }
.actor-banner > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--accent); }
.actor-banner div { display: grid; gap: 3px; }
.actor-banner small { color: var(--ink-soft); }
.quick-fill, .demo-codes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; color: var(--ink-soft); font-size: 0.83rem; }
.chip { min-height: 34px; padding: 6px 11px; border: 1px solid #bbd7dd; border-radius: 999px; color: var(--brand-dark); background: #f1f9fa; font-weight: 720; cursor: pointer; }
.inline-status { margin: 8px 0 0; color: var(--accent-dark); font-size: 0.84rem; font-weight: 720; }
.document-card { max-height: 390px; overflow-y: auto; padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line); border-radius: var(--radius-md); background: #fbfcfd; }
.document-card h2 { margin-top: 15px; }
.document-card p { color: #40565f; }
.document-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; }
.document-placeholder { padding-top: 15px; border-top: 1px dashed var(--line); font-size: 0.82rem; }
.confirm-check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-md); font-weight: 680; }
.confirm-check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--brand); }
.progress-card { position: relative; display: grid; gap: 12px; padding: 18px; border: 1px solid #cfe1e5; border-radius: var(--radius-md); background: linear-gradient(135deg, #f6fcfc, #edf7fa); }
.progress-copy { display: flex; align-items: center; gap: 13px; }
.progress-copy > span:last-child { display: grid; gap: 3px; }
.progress-copy small { color: var(--ink-soft); }
.progress-number { font-size: 2.25rem; font-weight: 900; line-height: 1; color: var(--brand-dark); }
.progress-track { width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: #d4e5e8; }
.progress-track::-webkit-progress-bar { background: #d4e5e8; }
.progress-track::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), var(--brand)); }
.progress-track::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), var(--brand)); }
.minimum-badge { justify-self: end; color: var(--ink-soft); font-size: .74rem; }
.status-pill { display: inline-flex; width: max-content; padding: 6px 10px; border-radius: 999px; font-size: .73rem; font-weight: 800; }
.status-pill--success { color: var(--success); background: var(--success-soft); }
.demo-toolbar { margin: 0 0 14px; border: 1px dashed #d3b776; border-radius: var(--radius-md); background: #fff9e9; }
.demo-toolbar summary { padding: 12px 15px; color: #6f5217; font-weight: 780; cursor: pointer; }
.demo-toolbar-grid { display: grid; gap: 10px; padding: 0 15px 15px; }
.demo-toolbar label { display: grid; gap: 5px; color: #6e5b32; font-size: .73rem; font-weight: 700; }
.dialog-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(8, 35, 43, .58); }
.dialog { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 30px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 39px; height: 39px; border: 0; border-radius: 50%; background: var(--surface-soft); font-size: 1.4rem; cursor: pointer; }

@media (min-width: 540px) {
  .mode-badge { display: inline-flex; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field--wide { grid-column: 1 / -1; }
  .demo-toolbar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .step-list { display: grid; justify-content: stretch; padding: 18px 12px; }
  .step-list li { position: relative; grid-template-columns: 34px 1fr; justify-items: start; align-items: center; gap: 10px; min-height: 58px; text-align: left; font-size: .78rem; }
  .step-list li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 44px; width: 1px; height: 28px; background: var(--line); }
  .step-number { width: 34px; height: 34px; }
}
