/* =========================
   Braking Distance — SmartCalc style
   (like import-cost / шинний стиль)
   All styles are isolated by .bd-page
========================= */

.bd-page {
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f4f6fb;
}

.bd-page * {
    box-sizing: border-box;
}

/* page width */
.bd-page .bd-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 28px;
}

/* ===== TITLE BAR (як у import-cost) ===== */
.bd-page .bd-titlebar {
    background: linear-gradient(180deg, #283b69, #1f2f55);
    color: #fff;
    border-radius: 16px;
    padding: 18px;
    margin: 12px auto 16px;
    box-shadow: 0 10px 25px rgba(16, 24, 40, .08);
}

.bd-page .bd-h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
}

.bd-page .bd-p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    opacity: .95;
}

/* ===== SHELL ===== */
.bd-page .bd-shell {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(20, 30, 60, .06);
}

/* ===== GRID ===== */
.bd-page .bd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

@media (max-width: 900px) {
    .bd-page .bd-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== BOX ===== */
.bd-page .bd-box {
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    padding: 14px;
    background: #fbfcff;
}

.bd-page .bd-box h2 {
    font-size: 15px;
    font-weight: 900;
    color: #1f2f55;
    margin: 0 0 10px;
}

/* ===== FIELDS ===== */
.bd-page .field {
    margin-bottom: 12px;
}

.bd-page .field label {
    font-weight: 900;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
    color: #2b3a55;
}

.bd-page input[type="number"],
.bd-page select {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d4d7de;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.bd-page input[type="number"]:focus,
.bd-page select:focus {
    border-color: rgba(40, 59, 105, .55);
    box-shadow: 0 0 0 3px rgba(40, 59, 105, .12);
}

.bd-page input[type="range"] {
    width: 100%;
}

/* reaction range meta */
.bd-page .range-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.bd-page .chip {
    background: rgba(40, 59, 105, .10);
    border: 1px solid rgba(40, 59, 105, .10);
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 700;
    color: #1f2f55;
}

.bd-page .muted {
    color: #6b7280;
}

.bd-page .small {
    font-size: 12px;
}

/* quick speed buttons */
.bd-page .quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.bd-page .pill {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d4d7de;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
    color: #1f2f55;
}

.bd-page .pill:hover {
    background: #f6f7fb;
    border-color: #b9c2da;
}

/* small link button */
.bd-page .link {
    border: none;
    background: transparent;
    color: #1f2f55;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bd-page .divider {
    height: 1px;
    background: #e6e8ee;
    margin: 12px 0;
}

/* ===== COMPARE GRID ===== */
.bd-page .compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 680px) {
    .bd-page .compare-grid {
        grid-template-columns: 1fr;
    }
}

.bd-page .box {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    padding: 12px;
}

.bd-page .box-title {
    font-weight: 900;
    font-size: 13px;
    color: #1f2f55;
    margin-bottom: 10px;
}

.bd-page .mu-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(40, 59, 105, .18);
}

.bd-page .mu-label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #374151;
    font-weight: 700;
}

.bd-page .mu-val {
    font-size: 13px;
    color: #374151;
}

/* ===== ACTIONS (wide like previous) ===== */
.bd-page .bd-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.bd-page .btn {
    height: 44px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    padding: 0 14px;
    border: 1px solid transparent;
}

.bd-page .bd-btn {
    background: rgba(40, 59, 105, .08);
    border: 1px solid rgba(40, 59, 105, .35);
    color: #1f2f55;
    flex: 1 1 220px;
}

.bd-page .bd-btn:hover {
    background: rgba(40, 59, 105, .14);
}

.bd-page .bd-btn-ghost {
    background: #fff;
    border: 1px solid #d4d7de;
    color: #1f2f55;
    flex: 1 1 220px;
}

.bd-page .bd-btn-ghost:hover {
    background: #f6f7fb;
    border-color: #b9c2da;
    box-shadow: 0 4px 12px rgba(31, 47, 85, .08);
}

@media (max-width: 520px) {
    .bd-page .bd-actions .btn {
        flex: 1 1 100%;
    }
}

/* ===== KPI ===== */
.bd-page .kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .bd-page .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.bd-page .kpi {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
}

.bd-page .kpi-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 900;
    margin-bottom: 6px;
}

.bd-page .kpi-value {
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}

.bd-page .kpi-unit {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
}

/* verdict */
.bd-page .verdict {
    margin-top: 14px;
    background: #f7f8fc;
    border: 1px dashed #cfd6ea;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.bd-page .verdict-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    background: rgba(40, 59, 105, .12);
}

.bd-page .verdict-text {
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}

/* tiles */
.bd-page .tiles-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 0 10px;
}

.bd-page .bd-mini-title {
    font-weight: 900;
    color: #1f2f55;
}

.bd-page .tile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .bd-page .tile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .bd-page .tile-grid {
        grid-template-columns: 1fr;
    }
}

.bd-page .tile {
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .06);
}

.bd-page .t-title {
    font-weight: 900;
    font-size: 13px;
    color: #6b7280;
}

.bd-page .t-val {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
}

.bd-page .t-sub {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== SEO blocks (bottom) ===== */
.bd-page .bd-content {
    max-width: 860px;
    margin: 22px auto 0;
    padding: 0 16px;
    text-align: left;
}

.bd-page .bd-content-title {
    font-size: 22px;
    font-weight: 900;
    color: #283b69;
    margin: 0 0 14px;
}

.bd-page .bd-content-text p {
    font-size: 15px;
    line-height: 1.65;
    color: #223;
    margin: 0 0 14px;
}

.bd-page .bd-content-text ul {
    padding-left: 18px;
    margin: 10px 0 16px;
}

.bd-page .bd-content-text li {
    margin-bottom: 6px;
    font-size: 15px;
}

/* FAQ always open */
.bd-page .bd-faq-item {
    border: 1px solid #e6e8ee;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
}

.bd-page .bd-faq-item h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 900;
    color: #1f2f55;
}

.bd-page .bd-faq-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}
/* KPI: 3 в ряд (A рядок, B рядок) */
.bd-page .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .bd-page .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Win/Lose highlighting */
.bd-page .kpi.kpi-win {
    border-color: rgba(31, 143, 82, .35);
    background: rgba(31, 143, 82, .06);
}

.bd-page .kpi.kpi-lose {
    border-color: rgba(197, 58, 58, .35);
    background: rgba(197, 58, 58, .06);
}
body.home {
    background-color: #f4f6fb;
}