:root {
    color-scheme: light;
    --ink: #172235;
    --muted: #667085;
    --line: #dce2ea;
    --surface: #ffffff;
    --canvas: #f3f5f8;
    --brand: #1458d4;
    --brand-dark: #0d3f9d;
    --accent: #e7efff;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.page-shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 80px; }
.hero { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 28px; }
.brand-mark { display: grid; flex: 0 0 56px; height: 56px; place-items: center; border-radius: 16px; color: white; background: var(--brand); font-weight: 800; letter-spacing: .04em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.12; }
h2 { margin-bottom: 3px; font-size: 1.25rem; }
h3 { margin-bottom: 0; }
.lead { max-width: 720px; color: var(--muted); margin-bottom: 0; }
.eyebrow { margin-bottom: 5px; color: var(--brand); font-size: .75rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.intake-form { display: grid; gap: 20px; }
.form-card { padding: clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 10px 32px rgb(23 34 53 / 5%); }
.section-heading, .heading-group { display: flex; gap: 14px; align-items: flex-start; }
.section-heading { margin-bottom: 24px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.split-heading { justify-content: space-between; }
.step { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--brand); font-weight: 800; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-grid > *, .file-drop { min-width: 0; }
.field-grid.compact { gap: 15px; }
.field, .field > span { display: block; }
.field > span { margin-bottom: 7px; font-weight: 700; font-size: .9rem; }
.field small { display: block; margin-top: 6px; color: var(--muted); }
.field input, .field select, .field textarea, .captcha-field input { width: 100%; border: 1px solid #c7ced8; border-radius: 10px; padding: 11px 13px; color: var(--ink); background: white; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; }
.field input.invalid,
.field select.invalid,
.field textarea.invalid,
.captcha-field input.invalid,
input.invalid,
select.invalid,
textarea.invalid {
    border: 2px solid var(--danger) !important;
    background-color: var(--danger-bg) !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18) !important;
}
.file-drop.invalid {
    border: 2px dashed var(--danger) !important;
    background-color: var(--danger-bg) !important;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18) !important;
}
.check-field.invalid {
    border: 2px solid var(--danger) !important;
    background-color: var(--danger-bg) !important;
    border-radius: 10px;
    padding: 10px 14px;
}
.full-width { grid-column: 1 / -1; }
.wheel-list { display: grid; gap: 16px; }
.wheel-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfe; }
.wheel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.remove-link { border: 0; padding: 7px; color: var(--danger); background: transparent; font-weight: 700; }
.wheel-card:only-child .remove-link { visibility: hidden; }
.file-drop { display: grid; gap: 5px; margin-top: 18px; padding: 18px; border: 1px dashed #9aa8bb; border-radius: 12px; background: white; color: var(--muted); font-size: .88rem; }
.file-drop:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(20 88 212 / 10%); }
.file-drop input { width: 100%; min-width: 0; max-width: 100%; margin-top: 8px; }
.file-drop output { margin-top: 4px; color: var(--brand-dark); font-weight: 700; }
.file-title { color: var(--ink); font-weight: 800; font-size: .95rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; padding: 10px 17px; text-decoration: none; font-weight: 800; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button.primary { border: 1px solid var(--brand); color: white; background: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { border: 1px solid #b8c7e3; color: var(--brand-dark); background: white; white-space: nowrap; }
.button:disabled { cursor: wait; opacity: .65; }
.captcha-field { max-width: 260px; }
.check-field { display: flex; gap: 11px; align-items: flex-start; margin: 24px 0; }
.check-field input { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; }
.submit-row { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--line); }
.submit-row p { max-width: 560px; margin-bottom: 0; color: var(--muted); font-size: .88rem; }
.alert { margin-bottom: 20px; padding: 17px 20px; border: 1px solid #f3b8b3; border-radius: 12px; color: var(--danger); background: var(--danger-bg); }
.alert p { margin: 4px 0 0; }
.error { color: var(--danger) !important; font-weight: 700; }
.block-error { display: block; margin-top: 9px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.success-shell { display: grid; min-height: 100vh; place-items: center; padding: 32px 0; }
.success-card { max-width: 620px; text-align: center; }
.success-icon { display: grid; width: 64px; height: 64px; margin: 0 auto 20px; place-items: center; border-radius: 50%; color: #067647; background: #dcfae6; font-size: 2rem; font-weight: 900; }
.reference { display: block; width: fit-content; margin: 8px auto 20px; padding: 12px 18px; border-radius: 9px; color: var(--brand-dark); background: var(--accent); font-size: 1.25rem; letter-spacing: .04em; }

@media (max-width: 700px) {
    .page-shell { width: min(100% - 20px, 960px); padding-top: 24px; }
    .hero { gap: 13px; }
    .brand-mark { flex-basis: 46px; height: 46px; border-radius: 12px; }
    .field-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
    .split-heading, .submit-row { align-items: stretch; flex-direction: column; }
    .split-heading .button { margin-left: 48px; }
    .submit-row .button { width: 100%; }
    .wheel-card { padding: 17px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* AI Preloader Modal */
.ai-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.78) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
}
.ai-modal-overlay.visible {
    display: flex !important;
}
.ai-modal-box {
    background: #ffffff;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
    position: relative;
    animation: preloaderScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
@keyframes preloaderScaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}
.ai-radar-scanner {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ai-pulse-circle {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2.5px solid #38bdf8;
    opacity: 0;
    animation: preloaderPulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes preloaderPulseRing {
    0% { transform: scale(0.6); opacity: 0.85; }
    50% { opacity: 0.4; }
    100% { transform: scale(1.45); opacity: 0; }
}
.ai-rim-icon {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
    animation: preloaderSpin 8s linear infinite;
}
@keyframes preloaderSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ai-rim-icon svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.ai-modal-box h3 {
    margin: 0 0 8px;
    font-size: 1.38rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.ai-modal-subtitle {
    margin: 0 0 24px;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}
.ai-steps-progress {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 22px;
}
.ai-step {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0.38;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ai-step.active {
    opacity: 1;
    transform: translateX(2px);
}
.ai-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.35s ease;
}
.ai-step.active .ai-step-dot {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.25);
    animation: preloaderStepPulse 1.8s ease-in-out infinite alternate;
}
@keyframes preloaderStepPulse {
    0% { box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2); }
    100% { box-shadow: 0 0 0 8px rgba(2, 132, 199, 0.4); }
}
.ai-step-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}
.ai-step-text small {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 3px;
}
.ai-modal-note {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.4;
}

/* Wheel Count Selector */
.wheel-count-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
@media (max-width: 640px) {
    .wheel-count-options {
        grid-template-columns: repeat(2, 1fr);
    }
}
.wheel-count-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    border-radius: 14px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.wheel-count-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}
.wheel-count-btn.active {
    border-color: #ef2b2d;
    background: #fff5f5;
    box-shadow: 0 4px 12px rgba(239, 43, 45, 0.12);
}
.wheel-count-btn .btn-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.wheel-count-btn.active .btn-title {
    color: #d91f22;
}
.wheel-count-btn .btn-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    margin-top: 4px;
}
.wheel-count-btn.active .btn-badge {
    color: #b91c1c;
}
.wheel-count-btn .btn-badge.discount-badge {
    color: #15803d;
}

