.application-wizard { margin: 0; color: #292722; }
.application-wizard * { box-sizing: border-box; }
.application-wizard [hidden] { display: none !important; }
.application-wizard button, .application-wizard input, .application-wizard textarea, .application-wizard select { font: inherit; }
.application-wizard a { color: inherit; }
.application-header { background: #171714; color: white; }
.application-header nav { max-width: 1080px; margin: auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.application-header img { display: block; width: 160px; height: auto; }
.application-header nav > a:last-child { font-size: .9rem; text-align: right; text-underline-offset: 5px; }
.application-wizard main { min-height: 80vh; padding: 48px 20px 72px; }
.application-container { max-width: 900px; margin: auto; }
.application-intro { max-width: 660px; margin: 0 auto 32px; text-align: center; }
.application-intro h1 { font-size: clamp(2.5rem, 6vw, 3.8rem); line-height: 1.1; text-transform: uppercase; margin: 12px 0 20px; }
.application-intro h1 span { color: #80652e; }
.eyebrow { color: #705722; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
#trade-form, .success-panel { background: #fff; border: 1px solid #c9c4b8; border-radius: 18px; box-shadow: 0 16px 48px #29272220; overflow: hidden; }
.wizard-progress { padding: 24px 36px; background: #f7f5ef; border-bottom: 1px solid #d5d0c4; }
.wizard-progress ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 0; padding: 0; }
.wizard-progress li { display: flex; align-items: center; gap: 8px; color: #605e57; font-size: .85rem; }
.wizard-progress li span { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid #89867e; border-radius: 50%; }
.wizard-progress li[aria-current="step"] { color: #292722; font-weight: 700; }
.wizard-progress li[aria-current="step"] span, .wizard-progress li.completed span { background: #705722; border-color: #705722; color: #fff; }
.wizard-content { padding: 28px 40px 36px; }
.required-note { margin: 0 0 28px; color: #605e57; font-size: .8rem; }
.wizard-step h2, .success-panel h2 { font-size: 2rem; margin: 8px 0 12px; line-height: 1.2; }
.step-intro { color: #605e57; line-height: 1.6; margin-bottom: 28px; }
.field-grid, .choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { margin-bottom: 22px; min-width: 0; }
.field label, .application-wizard legend { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 9px; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 14px; border: 1px solid #89867e; border-radius: 7px; color: #292722; background: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #716e67; font-size: .9rem; }
.application-wizard fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.field-help { font-size: .85rem; color: #605e57; margin: 6px 0 12px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #aaa59a; border-radius: 8px; cursor: pointer; font-size: .95rem; }
.choice:has(input:checked) { background: #f6f1e4; border-color: #705722; }
.application-wizard input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: #705722; cursor: pointer; }
.notice { background: #fff7e7; border-left: 3px solid #98702a; padding: 14px 18px; font-size: .9rem; line-height: 1.5; margin-bottom: 24px; }
.application-wizard :focus-visible { outline: 3px solid #80652e; outline-offset: 4px; }
.application-wizard [aria-invalid="true"] { border-color: #af2424; }
.field-error { color: #a51f1f; font-size: .9rem; }
.message { padding: 16px; border-radius: 8px; line-height: 1.6; }
.error { background: #fff0ef; border: 1px solid #c7463d; color: #8d1d19; }
.wizard-actions { padding: 22px 40px; background: #f7f5ef; border-top: 1px solid #d5d0c4; display: flex; align-items: center; gap: 18px; }
#save-note { font-size: .8rem; color: #605e57; flex: 1; line-height: 1.5; max-width: 320px; margin-right: auto; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; min-height: 48px; border: 1px solid transparent; border-radius: 7px; text-decoration: none; font-weight: 700; cursor: pointer; }
.button-primary { background: #705722; color: #fff !important; }
.button-primary:hover { background: #564219; }
.button-secondary { border-color: #89867e; background: #fff; color: #292722; }
.application-wizard button:disabled { opacity: .6; cursor: not-allowed; }
.submission-spinner { width: 20px; height: 20px; flex-shrink: 0; margin-right: 10px; border: 3px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: submission-spin .8s linear infinite !important; }
#trade-form[aria-busy="true"] #submit-application { opacity: 1; cursor: wait; }
.submission-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: #171714b8; }
.submission-panel { width: 100%; max-width: 420px; padding: 36px 24px; border-radius: 16px; background: #fff; text-align: center; box-shadow: 0 16px 48px #00000040; }
.submission-panel .submission-spinner { display: block; width: 56px; height: 56px; margin: 0 auto 24px; border-width: 5px; border-color: #e4dccb; border-top-color: #705722; }
.submission-panel h2 { margin: 0 0 12px; font-size: 1.7rem; }
.submission-panel p { margin: 0; line-height: 1.6; }
@keyframes submission-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .submission-spinner { animation: none !important; }
}
.text-button { color: #705722; background: transparent; padding: 8px 0; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.review-card { padding: 18px 0; border-top: 1px solid #d5d0c4; }
.review-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.review-card h3 { font-size: 1.15rem; margin: 0; }
.review-card dl { margin: 10px 0 0; }
.review-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; padding: 7px 0; font-size: .9rem; line-height: 1.6; }
.review-row dt { color: #605e57; }
.review-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.declaration { display: flex; align-items: flex-start; gap: 14px; margin-top: 20px; padding: 20px; background: #f7f5ef; border-radius: 8px; font-size: .85rem; line-height: 1.7; cursor: pointer; }
.declaration input { margin-top: 3px; }
.spam-check { margin-top: 28px; }
.spam-check h3 { margin-bottom: 8px; }
#captcha-status { font-size: .9rem; line-height: 1.6; }
.success-panel { text-align: center; padding: 48px 32px; }
.success-panel p { line-height: 1.7; max-width: 550px; margin: 20px auto; }
.application-footer { background: #171714; color: #ddd; text-align: center; padding: 28px 20px; font-size: .8rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
    .application-wizard main { padding: 30px 12px 48px; }
    .application-header nav { padding: 14px 20px; }
    .application-header img { width: 125px; }
    .wizard-progress { padding: 22px 18px; }
    .wizard-progress ol { gap: 5px; }
    .wizard-progress li { flex-direction: column; font-size: .7rem; gap: 7px; }
    .wizard-content { padding: 24px 18px; }
    .field-grid { grid-template-columns: 1fr; gap: 0; }
    .choice-grid { gap: 10px; }
    .choice { padding: 12px 10px; font-size: .85rem; gap: 8px; }
    .wizard-actions { padding: 20px 18px; flex-wrap: wrap; gap: 12px; }
    #save-note { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
    #next-step, #submit-application { margin-left: auto; }
    .review-row { grid-template-columns: 1fr; gap: 2px; }
    .declaration { padding: 14px; }
}
