:root {
    --blue: #2563EB;
    --blue-dark: #1D4ED8;
    --blue-light: #EFF6FF;
    --blue-50: #DBEAFE;
    --green: #16A34A;
    --green-light: #F0FDF4;
    --green-dark: #15803D;
    --text: #0F172A;
    --text-2: #475569;
    --text-3: #94A3B8;
    --bg: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* ===== HEADER ===== */
.header {
    background: var(--white);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: var(--blue);
}
.logo-dot {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(37,99,235,0.3);
}
.header-trust {
    font-size: 11px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-trust::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== MAIN CONTAINER ===== */
.container {
    padding: 0 16px;
    max-width: 480px;
    margin: 0 auto;
}

/* ===== STEP 1: PLATE INPUT ===== */
.step1 { padding-top: 20px; }

.headline {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 16px;
}
.headline span {
    color: var(--blue);
}

/* Reasons list */
.reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.reason {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
}
.reason-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ri-1 { background: #FEF3C7; }
.ri-2 { background: #FEE2E2; }
.ri-3 { background: #DBEAFE; }

/* Form card */
.form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.input-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

/* Plate input with mask overlay */
.plate-wrap {
    display: flex;
    align-items: stretch;
    border: 2px solid #CBD5E1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s;
    background: var(--white);
    margin-bottom: 14px;
    position: relative;
}
.plate-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.plate-wrap.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.plate-input-area {
    flex: 1;
    position: relative;
    min-width: 0;
}
.plate-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2.5px;
    pointer-events: none;
    display: flex;
    align-items: center;
    white-space: pre;
    overflow: hidden;
}
.plate-mask .ch-filled {
    color: var(--text);
}
.plate-mask .ch-current {
    color: var(--blue);
    animation: cursor-blink 1s step-end infinite;
    border-bottom: 2px solid var(--blue);
    padding-bottom: 1px;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.plate-mask .ch-ghost {
    color: #CBD5E1;
}
.plate-mask .ch-space {
    width: 0.35em;
    display: inline-block;
}
.plate-input {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    padding: 16px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: transparent;
    caret-color: transparent;
    background: transparent;
    min-height: 58px;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
}
.plate-hint {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 14px;
    margin-top: -8px;
    padding-left: 2px;
    font-weight: 500;
}
.plate-hint span {
    font-weight: 700;
    color: var(--text-2);
}
.plate-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-left: 2px solid #CBD5E1;
    background: #F8FAFC;
    flex-shrink: 0;
    min-width: 48px;
    gap: 2px;
}
.plate-badge-flag { font-size: 14px; line-height: 1; }
.plate-badge-text {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-3);
    letter-spacing: 1px;
}

/* CTA button */
.cta {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    -webkit-tap-highlight-color: transparent;
}
.cta-blue {
    background: var(--blue);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.cta-blue:active {
    background: var(--blue-dark);
    transform: scale(0.98);
}
.cta-blue.pulse {
    animation: btn-pulse 1.5s ease-in-out infinite;
}
@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(37,99,235,0.25); }
    50% { box-shadow: 0 2px 20px rgba(37,99,235,0.4); }
}
.cta-green {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(22,163,74,0.25);
}
.cta-green:active {
    background: var(--green-dark);
    transform: scale(0.98);
}

/* Sources */
.sources {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.source {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.source-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sd-1 { background: #1E40AF; }
.sd-2 { background: #B91C1C; }
.sd-3 { background: #7C3AED; }

/* ===== CHECKING STATE ===== */
.checking {
    display: none;
    padding: 40px 0;
    text-align: center;
}
.checking.visible { display: block; }

.check-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--blue-50);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.check-status {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.check-sub {
    font-size: 13px;
    color: var(--text-3);
}

.check-progress {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
    transition: color 0.3s;
}
.check-item.active { color: var(--text); }
.check-item.done { color: var(--green); }
.check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    border: 2px solid var(--border);
    color: var(--text-3);
    transition: all 0.3s;
}
.check-item.active .check-icon {
    border-color: var(--blue);
    color: var(--blue);
    animation: icon-pulse 1s ease-in-out infinite;
}
@keyframes icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.2); }
    50% { box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
}
.check-item.done .check-icon {
    border-color: var(--green);
    background: var(--green);
    color: white;
}

/* ===== STEP 2: PHONE INPUT ===== */
.step2 {
    display: none;
}
.step2.visible { display: block; }

.step2-progress {
    margin-bottom: 14px;
}
.progress-bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar {
    height: 100%;
    background: var(--green);
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s ease;
}
.progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    text-align: center;
}

.step2-status {
    background: var(--blue-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.step2-status-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.step2-status-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}
.step2-status-text strong {
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--blue);
}
.edit-plate-btn {
    background: none;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.7;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.edit-plate-btn:active { opacity: 1; }

/* Consent checkbox */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.consent-check {
    display: none;
}
.consent-box {
    width: 20px;
    height: 20px;
    border: 2px solid #CBD5E1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.15s;
    background: var(--white);
}
.consent-box svg {
    opacity: 0;
    transition: opacity 0.15s;
}
.consent-check:checked + .consent-box {
    background: var(--blue);
    border-color: var(--blue);
}
.consent-check:checked + .consent-box svg {
    opacity: 1;
}
.consent-text {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.5;
}
.consent-text a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Disabled button state */
.cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.step2-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}
.step2-sub {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 16px;
}

.phone-wrap {
    display: flex;
    align-items: stretch;
    border: 2px solid #CBD5E1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.2s;
    background: var(--white);
    margin-bottom: 14px;
}
.phone-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.phone-wrap.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.phone-prefix {
    padding: 16px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    background: #F8FAFC;
    border-right: 2px solid #CBD5E1;
    display: flex;
    align-items: center;
}
.phone-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
    background: transparent;
    min-height: 54px;
    min-width: 0;
}
.phone-input::placeholder {
    color: #CBD5E1;
    font-weight: 500;
}

.privacy-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 10px;
}
.privacy-note svg { flex-shrink: 0; }

/* ===== BELOW FOLD CONTENT ===== */
.below-fold {
    padding: 32px 0;
}
.section-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text);
}

/* Why check */
.why-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}
.why-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.why-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}
.why-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.why-card p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.45;
}

/* How it works */
.how-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}
.how-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.how-num {
    width: 32px;
    height: 32px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.how-item h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 1px;
}
.how-item p {
    font-size: 13px;
    color: var(--text-2);
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 32px;
}
.stat {
    text-align: center;
}
.stat-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--blue);
    display: block;
}
.stat-label {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Bottom CTA */
.bottom-cta {
    text-align: center;
    padding-bottom: 24px;
}
.bottom-cta p {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 12px;
}
.bottom-cta .cta { max-width: 320px; margin: 0 auto; }

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 20px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.8;
}
.footer a { color: var(--text-3); }

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
    .container { max-width: 480px; }
    .headline { font-size: 26px; }
    .form-card { padding: 24px 20px; }
}

.header-step {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.online-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 20px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* Context: plate */
.context {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-2);
}
.context-plate {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Status */
.status {
    background: var(--blue-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.status-icon {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.status-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.status-phone {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    color: var(--blue);
}
.status-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
}

/* Card */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px 20px 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
.card-title {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
}

/* Code input */
.code-wrap {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    background: var(--white);
    margin-bottom: 6px;
}
.code-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.code-wrap.filled {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.08);
}
.code-wrap.has-error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.code-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 18px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 16px;
    text-align: center;
    color: var(--text);
    background: transparent;
    min-height: 64px;
    caret-color: var(--blue);
    -webkit-tap-highlight-color: transparent;
}
.code-input::placeholder {
    color: #D1D5DB;
    letter-spacing: 12px;
    font-size: 28px;
    font-weight: 600;
}

/* Error */
.error-msg {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    height: 22px;
    line-height: 22px;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}
.error-msg.visible { opacity: 1; }

.cta:active { background: var(--blue-dark); transform: scale(0.98); }

/* Resend */
.resend {
    text-align: center;
    margin-top: 14px;
    min-height: 24px;
}
.resend-timer {
    font-size: 13px;
    color: var(--text-3);
}
.resend-timer strong {
    font-weight: 700;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}
.resend-btn {
    display: none;
    background: none;
    border: none;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
    cursor: pointer;
    padding: 4px 0;
}
.resend-btn:active { opacity: 0.6; }
.resend-btn.visible { display: inline-block; }

/* ===== TRUST BLOCK ===== */
.trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
}
.trust-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    background: var(--green-light);
}

/* Footer */
.foot {
    margin-top: auto;
    padding-top: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-3);
    line-height: 1.7;
}
.foot a {
    color: var(--text-3);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.header-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}

/* Terms box */
.terms-box {
    background: var(--blue-light);
    border: 1px solid #DBEAFE;
    border-radius: var(--radius-sm);
    padding: 18px 16px;
    margin-bottom: 20px;
}
.terms-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
}
.terms-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.terms-list li {
    font-size: 14px;
    color: var(--text-2);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.45;
}
.terms-list li::before {
    content: '•';
    color: var(--text-3);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0px;
}

.consent-input { display: none; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Trust footer */
.trust-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-3);
    font-weight: 500;
}
.trust-foot svg { flex-shrink: 0; }