:root {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #172033;
    background: #f5f7fb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            rgba(56,189,248,.12),
            transparent 32rem
        ),
        #f5f7fb;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    min-height: 82px;
    padding: 0 5vw;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid #e8ecf3;

    background:
        rgba(255,255,255,.94);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #111827,
            #334155
        );

    color: white;

    font-weight: 900;

    box-shadow:
        0 8px 24px
        rgba(15,23,42,.16);
}

.brand-copy {
    display: flex;
    flex-direction: column;
}

.brand-copy strong {
    letter-spacing: .04em;
}

.brand-copy small {
    margin-top: 2px;
    color: #7b8496;
}

.environment {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #667085;
    font-size: .82rem;
}

.status-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;
    background: #f59e0b;
}

.status-dot.online {
    background: #22c55e;

    box-shadow:
        0 0 0 4px
        rgba(34,197,94,.12);
}

.status-dot.offline {
    background: #ef4444;

    box-shadow:
        0 0 0 4px
        rgba(239,68,68,.12);
}

.version-badge {
    margin-left: 8px;
    padding: 6px 9px;

    border-radius: 999px;

    background: #eef2ff;
    color: #4f46e5;

    font-weight: 800;
    font-size: .7rem;
}

.workspace {
    width: min(1280px,92vw);

    margin: 0 auto;
    padding: 60px 0 48px;

    display: grid;

    grid-template-columns:
        minmax(0,1.5fr)
        minmax(330px,.78fr);

    gap: 30px;
}

.intro {
    grid-column: 1 / -1;
    max-width: 780px;
}

.eyebrow {
    color: #4f46e5;

    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.intro h1 {
    margin: 10px 0 14px;

    font-size:
        clamp(
            2.6rem,
            5vw,
            4.5rem
        );

    line-height: 1;
    letter-spacing: -.055em;

    color: #111827;
}

.intro p {
    max-width: 680px;
    margin: 0;

    color: #667085;

    font-size: 1.05rem;
    line-height: 1.7;
}

.calculator-card,
.result-card {
    background: #fff;

    border:
        1px solid #e6eaf1;

    border-radius: 26px;

    box-shadow:
        0 18px 50px
        rgba(15,23,42,.07);
}

.calculator-card {
    padding: 30px;
}

.route-field {
    display: grid;

    grid-template-columns:
        44px
        1fr;

    gap: 14px;
}

.route-marker {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    font-weight: 900;
}

.route-marker.origin {
    color: #2563eb;
    background: #eff6ff;
}

.route-marker.destination {
    color: #059669;
    background: #ecfdf5;
}

.route-line {
    width: 2px;
    height: 19px;

    margin:
        4px 0
        4px 18px;

    background:
        repeating-linear-gradient(
            to bottom,
            #cbd5e1 0,
            #cbd5e1 4px,
            transparent 4px,
            transparent 8px
        );
}

.field-content,
.field-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label,
legend {
    color: #344054;

    font-size: .86rem;
    font-weight: 700;
}

.address-grid {
    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        92px;

    gap: 10px;
}

input,
select {
    width: 100%;
    min-height: 48px;

    padding: 0 14px;

    border:
        1px solid #dfe4ec;

    border-radius: 13px;

    color: #172033;
    background: #fbfcfe;

    outline: none;
}

input:focus,
select:focus {
    border-color: #818cf8;

    background: #fff;

    box-shadow:
        0 0 0 4px
        rgba(99,102,241,.09);
}

.number-field {
    text-align: center;
}

.field-content small,
.option-card small {
    color: #98a2b3;
    font-size: .75rem;
}

.divider {
    height: 1px;
    margin: 26px 0;

    background: #edf0f5;
}

.option-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 24px;
}

fieldset {
    margin: 0;
    padding: 0;
    border: 0;

    display: grid;
    gap: 9px;
}

legend {
    margin-bottom: 7px;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 11px 13px;

    border:
        1px solid #e2e7ef;

    border-radius: 13px;

    cursor: pointer;

    background: #fbfcfe;
}

.option-card:has(input:checked) {
    border-color: #a5b4fc;
    background: #f8f8ff;
}

.option-card input {
    width: 17px;
    min-height: 17px;
    margin: 0;
}

.option-card span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-grid {
    margin-top: 22px;

    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 18px;
}

.input-suffix {
    position: relative;
}

.input-suffix input {
    padding-right: 55px;
}

.input-suffix span {
    position: absolute;

    right: 14px;
    top: 50%;

    transform:
        translateY(-50%);

    color: #98a2b3;
    font-size: .82rem;
}

.primary-button {
    width: 100%;
    min-height: 55px;

    margin-top: 27px;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 0;
    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #111827,
            #293548
        );

    color: white;

    font-weight: 800;

    cursor: pointer;
}

.primary-button:disabled {
    opacity: .6;
    cursor: wait;
}

.progress-box {
    margin-top: 14px;
    padding: 12px 14px;

    display: flex;
    align-items: center;
    gap: 10px;

    border:
        1px solid #e6eaf1;

    border-radius: 13px;

    background: #f8fafc;

    color: #475569;

    font-size: .8rem;
}

.progress-box[hidden] {
    display: none;
}

.spinner {
    width: 15px;
    height: 15px;

    border-radius: 50%;

    border:
        2px solid #cbd5e1;

    border-top-color:
        #4f46e5;

    animation:
        spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform:
            rotate(360deg);
    }
}

.form-message {
    min-height: 20px;
    margin: 13px 0 0;

    color: #667085;

    font-size: .8rem;
    text-align: center;
}

.form-message.error {
    color: #b42318;
}

.form-message.success {
    color: #067647;
}

.result-card {
    align-self: start;
    overflow: hidden;
}

.result-card.ready {
    box-shadow:
        0 24px 65px
        rgba(15,23,42,.13);
}

.result-header {
    padding: 25px 25px 18px;

    display: flex;
    justify-content: space-between;
}

.result-label {
    color: #98a2b3;

    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.result-header h2 {
    margin: 5px 0 0;

    color: #111827;
}

.result-state {
    padding: 6px 9px;

    border-radius: 999px;

    background: #f1f5f9;
    color: #64748b;

    font-size: .65rem;
    font-weight: 800;
}

.result-state.ready {
    background: #ecfdf3;
    color: #067647;
}

.price-block {
    padding: 27px 25px;

    background:
        linear-gradient(
            135deg,
            #111827,
            #26364d
        );

    color: white;
}

.price-block small {
    color: #cbd5e1;
}

.price {
    margin-top: 4px;

    display: flex;
    align-items: baseline;
    gap: 7px;
}

.price span {
    color: #cbd5e1;
    font-size: 1.2rem;
}

.price strong {
    font-size: 3.15rem;
    letter-spacing: -.055em;
}

.metrics {
    padding: 10px 24px;
}

.metric {
    min-height: 62px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid #edf0f4;
}

.metric:last-child {
    border-bottom: 0;
}

.metric span {
    color: #7b8496;
    font-size: .83rem;
}

.metric strong {
    color: #273142;
}

.result-note {
    margin: 8px 20px 20px;
    padding: 15px;

    border-radius: 14px;

    background: #f8fafc;

    border:
        1px solid #edf1f5;
}

.result-note strong {
    color: #334155;
    font-size: .82rem;
}

.result-note p {
    margin: 5px 0 0;

    color: #8490a3;

    font-size: .76rem;
    line-height: 1.5;
}

footer {
    width: min(1280px,92vw);

    margin: 0 auto;
    padding: 0 0 34px;

    display: flex;
    gap: 17px;
    flex-wrap: wrap;

    color: #98a2b3;
    font-size: .72rem;
}

@media (max-width: 900px) {

    .workspace {
        grid-template-columns: 1fr;
    }

    .intro {
        grid-column: auto;
    }

}

@media (max-width: 560px) {

    .option-grid,
    .mini-grid,
    .address-grid {
        grid-template-columns: 1fr;
    }

    .number-field {
        text-align: left;
    }

}
/* GATE 4.12-C2-R1 MOBILE UX MICRO-HOTFIX */
@media (max-width: 560px) {

    .topbar {
        min-height: 70px;

        padding:
            0 14px;

        gap: 10px;
    }

    .brand {
        gap: 9px;
        min-width: 0;
    }

    .brand-mark {
        width: 40px;
        height: 40px;

        flex:
            0 0 40px;

        border-radius: 12px;
    }

    .brand-copy {
        min-width: 0;
    }

    .brand-copy strong {
        font-size: .82rem;
        line-height: 1.05;

        white-space: nowrap;
    }

    .brand-copy small {
        display: none;
    }

    .environment {
        margin-left: auto;

        gap: 0;

        flex:
            0 0 auto;
    }

    .environment #engineStatus,
    .environment .status-dot {
        display: none;
    }

    .version-badge {
        margin-left: 0;

        padding:
            5px 7px;

        white-space: nowrap;

        font-size: .58rem;
    }

    .workspace {
        width:
            calc(
                100% - 24px
            );

        padding:
            34px 0 30px;
    }

    .intro h1 {
        font-size:
            clamp(
                2.10rem,
                10.8vw,
                2.55rem
            );

        line-height: 1.02;
    }

    .intro p {
        font-size: .94rem;
        line-height: 1.55;
    }

    .calculator-card {
        padding:
            20px 16px;

        border-radius:
            22px;
    }

    .result-card {
        border-radius:
            22px;
    }

    footer {
        width:
            calc(
                100% - 24px
            );

        gap: 10px;

        padding-bottom: 24px;
    }
}
