/**
 * OC Sim Racing Tools — FFB Clipping Calculator v2
 * Light theme matching the Fuel/FOV/Tire calculator design system.
 */

/* ============================================
   1. CONTAINER
   ============================================ */
.ocst-ffb-calculator {
    max-width: 1060px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

.ocst-ffb-calculator *,
.ocst-ffb-calculator *::before,
.ocst-ffb-calculator *::after {
    box-sizing: border-box;
}

/* ============================================
   2. HEADER
   ============================================ */
.ocst-ffb-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.ocst-ffb-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0 !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.ocst-ffb-title svg {
    color: #7c3aed;
    flex-shrink: 0;
}

.ocst-ffb-subtitle {
    margin: 0 !important;
    font-size: 1rem;
    color: #64748b;
}

/* ============================================
   3. LAYOUT  — left inputs, right results
   ============================================ */
.ocst-ffb-body {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 24px;
    align-items: start;
}

.ocst-ffb-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.ocst-ffb-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ============================================
   4. CARDS
   ============================================ */
.ocst-ffb-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    transition: border-color .2s, box-shadow .2s;
}

.ocst-ffb-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
}

.ocst-ffb-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0 !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ocst-ffb-card-title svg {
    color: #7c3aed;
    flex-shrink: 0;
}

/* ============================================
   5. FORM FIELDS & INPUTS
   ============================================ */
.ocst-ffb-field {
    margin-bottom: 18px;
}

.ocst-ffb-field:last-child {
    margin-bottom: 0;
}

.ocst-ffb-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.ocst-ffb-input-group {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: .75rem;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.ocst-ffb-input-group:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .1);
}

.ocst-ffb-input-group input[type="number"] {
    flex: 1;
    min-width: 0;
    border: none !important;
    outline: none !important;
    padding: 11px 14px !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    color: #1e293b !important;
    background: transparent !important;
    -moz-appearance: textfield;
    appearance: textfield;
    box-shadow: none !important;
    margin: 0 !important;
}

.ocst-ffb-input-group input[type="number"]::-webkit-outer-spin-button,
.ocst-ffb-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ocst-ffb-unit {
    padding: 11px 14px;
    font-size: .85rem;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    white-space: nowrap;
    user-select: none;
}

.ocst-ffb-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    margin-top: .5rem;
}

.ocst-ffb-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7c3aed;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
    transition: transform .1s;
}

.ocst-ffb-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #7c3aed;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.ocst-ffb-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.ocst-ffb-hint {
    display: block;
    margin-top: 6px;
    font-size: .78rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* ============================================
   6. BUTTON GROUPS (presets, car types, feel)
   ============================================ */
.ocst-ffb-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ocst-ffb-btn {
    padding: 5px 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all .2s;
}

.ocst-ffb-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
}

.ocst-ffb-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.ocst-ffb-badge-inline {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    background: rgba(0, 0, 0, .12);
    border-radius: 10px;
    padding: 1px 5px;
    margin-left: 3px;
}

.ocst-ffb-btn.active .ocst-ffb-badge-inline {
    background: rgba(255, 255, 255, .25);
}

/* Feel quick-select colour coding */
.ocst-ffb-btn[data-feel="light"] {
    border-color: #22c55e40;
}

.ocst-ffb-btn[data-feel="light"].active {
    background: #16a34a;
    border-color: #16a34a;
}

.ocst-ffb-btn[data-feel="strong"].active {
    background: #d97706;
    border-color: #d97706;
}

.ocst-ffb-btn[data-feel="maximum"].active {
    background: #dc2626;
    border-color: #dc2626;
}

/* ============================================
   7. PRIMARY RESULT CARD
   ============================================ */
.ocst-ffb-primary-result {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
    border: none !important;
    text-align: center;
    padding: 28px 24px !important;
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, .25), 0 4px 6px -2px rgba(124, 58, 237, .1) !important;
    position: relative;
    overflow: hidden;
}

.ocst-ffb-primary-result::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .12), transparent 60%);
    pointer-events: none;
}

.ocst-ffb-result-label {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 6px;
}

.ocst-ffb-result-value {
    font-size: 3.8rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -.03em;
}

.ocst-ffb-result-unit {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, .65);
    margin-left: 4px;
}

.ocst-ffb-result-sub {
    margin-top: 8px;
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .6);
}

.ocst-ffb-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    margin-top: 12px;
    background: rgba(255, 255, 255, .2);
}

.ocst-ffb-status-badge.safe {
    color: #bbf7d0;
}

.ocst-ffb-status-badge.warning {
    color: #fde68a;
}

.ocst-ffb-status-badge.clipping {
    color: #fecaca;
}



/* ============================================
   9. SIM CARDS (per-sim recommendation panels)
   ============================================ */
.ocst-ffb-sim-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.ocst-ffb-sim-card {
    border: 2px solid #e2e8f0;
    border-radius: .875rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04);
    transition: box-shadow .2s;
}

.ocst-ffb-sim-card:hover {
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, .1);
}

.ocst-ffb-sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-left: 4px solid #7c3aed;
    background: #fafafa;
    width: 100%;
    text-align: left;
    border: none;
    border-left: 4px solid #7c3aed;
    border-radius: 0;
    gap: 12px;
}


.ocst-ffb-sim-header-left {
    flex: 1;
    min-width: 0;
}

.ocst-ffb-sim-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}


/* Expanded body */
.ocst-ffb-sim-body {
    display: block;
}

.ocst-ffb-sim-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1e293b;
}

.ocst-ffb-sim-where {
    font-size: .72rem;
    color: #94a3b8;
    margin-top: 2px;
}

.ocst-ffb-risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.pill-low {
    background: #dcfce7;
    color: #15803d;
}

.pill-medium {
    background: #fef3c7;
    color: #b45309;
}

.pill-high {
    background: #fee2e2;
    color: #dc2626;
}

/* Signal strength mini bar */
.ocst-ffb-signal-bar-wrap {
    position: relative;
    height: 6px;
    background: #f1f5f9;
    margin: 0;
}

.ocst-ffb-signal-bar {
    height: 100%;
    border-radius: 0 3px 3px 0;
    transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

.ocst-ffb-signal-bar-label {
    position: absolute;
    right: 8px;
    top: -18px;
    font-size: .68rem;
    font-weight: 700;
    color: #94a3b8;
}

/* Settings rows */
.ocst-ffb-settings-grid {
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ocst-ffb-setting-row {
    display: grid;
    grid-template-columns: 130px auto 1fr;
    gap: 8px;
    align-items: baseline;
}

.ocst-ffb-setting-key {
    font-size: .78rem;
    font-weight: 700;
    color: #475569;
    white-space: nowrap;
}

.ocst-ffb-setting-value {
    font-size: .9rem;
    font-weight: 800;
    white-space: nowrap;
}

.ocst-ffb-setting-desc {
    font-size: .75rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Note / explanation */
.ocst-ffb-sim-note {
    padding: 10px 18px 14px;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.55;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

/* Section 10 Responsive rules moved to Section 17 below */


/* ============================================
   11. UPSELL CARD
   ============================================ */
.ocst-ffb-simulation-section {
    position: relative;
}

.ocst-ffb-upsell-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(to right, #fef2f2, #fff);
    border: 2px solid #fecaca;
    border-radius: 1rem;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, .1);
}

.ocst-ffb-upsell-image img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.ocst-ffb-upsell-content {
    flex: 1;
}

.ocst-ffb-upsell-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #dc2626;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ocst-ffb-upsell-desc {
    font-size: 0.9rem;
    color: #475569;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.ocst-ffb-upsell-action {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ocst-ffb-upsell-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
}

.ocst-ffb-upsell-btn {
    background: #dc2626;
    color: #fff;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.ocst-ffb-upsell-btn:hover {
    background: #b91c1c;
    color: #fff;
}

/* ============================================
   12. INTERACTIVE SIMULATION
   ============================================ */
.ocst-ffb-sim-interactive {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    padding: 24px;
}

.ocst-ffb-sim-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ocst-ffb-sim-title svg {
    color: #7c3aed;
}

.ocst-ffb-sim-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 24px 0;
    max-width: 800px;
}

.ocst-live-graph-wrap {
    width: 100%;
    height: 150px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.ocst-live-graph-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.ocst-ffb-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.ocst-ffb-sbs-col {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
}

.ocst-sbs-header {
    font-weight: 700;
    color: #475569;
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.ocst-sbs-wheel-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 8px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #f1f5f9;
    transition: border-color 0s, box-shadow 0s;
}

.ocst-sbs-wheel {
    width: 96px;
    height: 96px;
    color: #64748b;
    transform-origin: center;
    transition: color 0s;
}

.clipping-col {
    border-color: #fecaca;
}

.clipping-col .ocst-sbs-wheel-wrap {
    border-color: #fee2e2;
}

.clipping-col.is-clipping .ocst-sbs-wheel-wrap {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.clipping-col.is-clipping .ocst-sbs-wheel {
    color: #ef4444;
    background: transparent;
}

.optimal-col {
    border-color: #bbf7d0;
}

.optimal-col .ocst-sbs-wheel-wrap {
    border-color: #dcfce7;
}

.optimal-col .ocst-sbs-wheel {
    color: #16a34a;
    background: transparent;
}

.optimal-col.is-clipping {
    border-color: #fecaca;
}

.optimal-col.is-clipping .ocst-sbs-wheel-wrap {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.optimal-col.is-clipping .ocst-sbs-wheel {
    color: #ef4444;
    background: transparent;
}

.ocst-sbs-status {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.clipping-col .ocst-sbs-status {
    background: #fee2e2;
    color: #dc2626;
}

.optimal-col .ocst-sbs-status {
    background: #dcfce7;
    color: #16a34a;
}

.optimal-col.is-clipping .ocst-sbs-status {
    background: #fee2e2;
    color: #dc2626;
}

.ocst-ffb-car-type-inline {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
}

.ocst-ffb-inline-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 12px;
}

.ocst-ffb-car-type-inline .ocst-ffb-btn-group {
    justify-content: center;
    margin-bottom: 12px;
}

.ocst-ffb-car-type-inline .ocst-ffb-hint {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 860px) {
    .ocst-ffb-sim-list {
        grid-template-columns: 1fr;
    }
}

/* Responsive Simulation */
@media (max-width: 600px) {
    .ocst-ffb-upsell-card {
        flex-direction: column;
        text-align: center;
    }

    .ocst-ffb-upsell-action {
        justify-content: center;
    }

    .ocst-ffb-side-by-side {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   13. MANUFACTURER TABS
   ============================================ */
.ocst-ffb-mfr-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    max-width: 100%;
}

.ocst-ffb-mfr-tabs::-webkit-scrollbar {
    display: none;
}

.ocst-ffb-mfr-tab {
    padding: 7px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: .78rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.ocst-ffb-mfr-tab:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
}

.ocst-ffb-mfr-tab.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, .25);
}

.ocst-ffb-mfr-panels {
    min-height: 50px;
}

.ocst-ffb-mfr-panel {
    display: none;
}

.ocst-ffb-mfr-panel.active {
    display: block;
    animation: ocst-fadeIn .2s ease;
}

@keyframes ocst-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ocst-ffb-custom-btn {
    margin-top: 10px;
    border-style: dashed !important;
}

/* ============================================
   14. SIM CARD ICONS
   ============================================ */
.ocst-ffb-sim-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ocst-ffb-sim-icon svg {
    width: 18px;
    height: 18px;
}

.ocst-ffb-sim-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ocst-ffb-sim-header-info {
    flex: 1;
    min-width: 0;
}

/* ============================================
   15. MOBILE STICKY RESULT BAR
   ============================================ */
.ocst-ffb-sticky-bar {
    display: none;
}

@media (max-width: 860px) {
    .ocst-ffb-sticky-bar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        background: rgba(255, 255, 255, .88);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(226, 232, 240, .6);
        box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
        transform: translateY(-100%);
        transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    }

    .ocst-ffb-sticky-bar.is-visible {
        transform: translateY(0);
    }

    .ocst-ffb-sticky-left {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .ocst-ffb-sticky-label {
        font-size: .72rem;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .ocst-ffb-sticky-value {
        font-size: 1.25rem;
        font-weight: 900;
        color: #1e293b;
    }

    .ocst-ffb-sticky-badge {
        display: inline-flex;
        align-items: center;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: .72rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .ocst-ffb-sticky-badge.safe {
        background: #dcfce7;
        color: #15803d;
    }

    .ocst-ffb-sticky-badge.warning {
        background: #fef3c7;
        color: #b45309;
    }

    .ocst-ffb-sticky-badge.clipping {
        background: #fee2e2;
        color: #dc2626;
    }
}

/* ============================================
   16. FINE-TUNING DISCLAIMER CARD
   ============================================ */
.ocst-ffb-fine-tune-card {
    display: flex;
    gap: 18px;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5, #f0f9ff);
    border: 2px solid #bbf7d0;
    border-radius: 1rem;
    padding: 24px;
    margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, .08);
}

.ocst-ffb-fine-tune-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.ocst-ffb-fine-tune-content {
    flex: 1;
}

.ocst-ffb-fine-tune-title {
    margin: 0 0 8px 0 !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #15803d !important;
}

.ocst-ffb-fine-tune-intro {
    margin: 0 0 12px 0 !important;
    font-size: .88rem;
    color: #475569;
    line-height: 1.55;
}

.ocst-ffb-fine-tune-steps {
    margin: 0 0 12px 0 !important;
    padding-left: 20px !important;
    font-size: .85rem;
    color: #475569;
    line-height: 1.7;
}

.ocst-ffb-fine-tune-steps li {
    margin-bottom: 6px;
}

.ocst-ffb-fine-tune-steps strong {
    color: #1e293b;
}

.ocst-ffb-fine-tune-note {
    margin: 0 !important;
    font-size: .82rem;
    font-weight: 600;
    color: #16a34a;
    padding: 8px 12px;
    background: rgba(34, 197, 94, .08);
    border-radius: 8px;
    border-left: 3px solid #22c55e;
}

/* ============================================
   17. ENHANCED MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
    .ocst-ffb-body {
        grid-template-columns: 1fr;
    }

    .ocst-ffb-results {
        order: -1;
    }

    .ocst-ffb-sim-list {
        grid-template-columns: 1fr;
    }

    .ocst-ffb-fine-tune-card {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .ocst-ffb-calculator {
        padding: 12px;
    }

    .ocst-ffb-title {
        font-size: 1.3rem !important;
    }

    .ocst-ffb-subtitle {
        font-size: .85rem;
    }

    .ocst-ffb-result-value {
        font-size: 3rem;
    }

    .ocst-ffb-card {
        padding: 16px 14px;
        border-radius: .75rem;
    }

    .ocst-ffb-card-title {
        margin-bottom: 14px !important;
    }

    /* Manufacturer tabs: horizontal scroll on mobile */
    .ocst-ffb-mfr-tabs {
        gap: 6px;
    }

    .ocst-ffb-mfr-tab {
        padding: 8px 12px;
        font-size: .75rem;
    }

    /* Preset buttons — larger touch targets on mobile */
    .ocst-ffb-btn {
        padding: 8px 12px;
        font-size: .8rem;
    }

    /* Feel preset buttons */
    .ocst-ffb-btn-group {
        gap: 6px;
    }

    /* Sim card headers */
    .ocst-ffb-sim-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ocst-ffb-sim-header-right {
        width: 100%;
        justify-content: space-between;
    }

    /* Sim card settings */
    .ocst-ffb-setting-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .ocst-ffb-setting-desc {
        display: none;
    }

    .ocst-ffb-sim-title {
        font-size: .88rem;
    }

    .ocst-ffb-sim-where {
        font-size: .68rem;
    }

    /* Side-by-side wheels */
    .ocst-ffb-side-by-side {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ocst-ffb-sbs-col {
        padding: 14px;
    }

    .ocst-sbs-wheel-wrap {
        width: 80px;
        height: 80px;
        border-width: 6px;
    }

    .ocst-sbs-wheel {
        width: 64px;
        height: 64px;
    }

    /* Upsell card */
    .ocst-ffb-upsell-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .ocst-ffb-upsell-image img {
        width: 80px;
        height: 80px;
    }

    .ocst-ffb-upsell-action {
        justify-content: center;
    }

    /* Fine-tuning card */
    .ocst-ffb-fine-tune-card {
        padding: 16px;
    }

    .ocst-ffb-fine-tune-steps {
        font-size: .82rem;
    }

    /* Car type inline section */
    .ocst-ffb-car-type-inline .ocst-ffb-btn-group {
        justify-content: center;
        gap: 6px;
    }

    .ocst-ffb-car-type-inline .ocst-ffb-btn {
        font-size: .72rem;
        padding: 6px 10px;
    }

    /* Live graph */
    .ocst-live-graph-wrap {
        height: 120px;
        margin-bottom: 16px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .ocst-ffb-title {
        font-size: 1.15rem !important;
    }

    .ocst-ffb-result-value {
        font-size: 2.5rem;
    }

    .ocst-ffb-primary-result {
        padding: 20px 16px !important;
    }

    .ocst-ffb-mfr-tab {
        padding: 6px 10px;
        font-size: .7rem;
    }
}