.cms-mm-calculator {
    max-width: 860px;
    margin: 40px auto;
    padding: 36px 48px 32px;
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(0, 39, 78, 0.10);
    font-family: inherit;
}

.cms-mm-calculator h2 {
    margin: 0 0 28px;
    text-align: center;
    color: #333333;
    font-size: 46px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.cms-calc-field {
    margin-bottom: 18px;
}

.cms-calc-field label {
    display: block;
    margin-bottom: 8px;
    color: #222222;
    font-size: 17px;
    font-weight: 800;
}

.cms-input-row {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 68px;
    border: 3px solid #dce5ee;
    border-radius: 9px;
    overflow: hidden;
    background: #f9fbfd;
}

.cms-input-row:focus-within {
    border-color: #003f73;
    box-shadow: 0 0 0 3px rgba(0, 63, 115, 0.12);
}

.cms-input-row input {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    height: 68px;
    padding: 0 22px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #003f73 !important;
    font-size: 23px;
    font-weight: 700;
    cursor: text;
    pointer-events: auto;
}

.cms-input-row input::placeholder {
    color: #777777;
    opacity: 1;
}

.cms-unit {
    width: 76px;
    min-width: 76px;
    background: #003f73;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    line-height: 1.45;
    font-weight: 800;
    text-align: center;
}

.cms-swap-btn {
    width: 42px;
    height: 42px;
    margin: 6px auto 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce5ee;
    border-radius: 50%;
    background: #f1f6fb;
    color: #003f73;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.cms-swap-btn:hover {
    background: #e7f0f8;
}

.cms-result-box {
    margin-top: 20px;
    padding: 26px 20px;
    background: #003f73;
    border-radius: 7px;
    color: #ffffff;
    text-align: center;
    font-family: "Courier New", monospace;
}

.cms-result-line {
    font-size: 21px;
    line-height: 1.65;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

.cms-result-primary {
    color: #ff7a1a;
}

.cms-calc-footer {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cms-brand {
    color: #8b8f94;
    font-size: 15px;
    font-weight: 800;
}

.cms-actions {
    display: flex;
    gap: 12px;
}

.cms-actions button {
    min-width: 108px;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.cms-reset-btn {
    background: #eef1f4;
    color: #555555;
}

.cms-copy-btn {
    background: #ef7a1a;
    color: #ffffff;
}

.cms-actions button:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .cms-mm-calculator {
        margin: 28px auto;
        padding: 28px 18px 24px;
    }

    .cms-mm-calculator h2 {
        font-size: 34px;
        margin-bottom: 24px;
    }

    .cms-calc-field {
        margin-bottom: 16px;
    }

    .cms-calc-field label {
        font-size: 15px;
    }

    .cms-input-row {
        min-height: 60px;
    }

    .cms-input-row input {
        height: 60px;
        padding: 0 16px;
        font-size: 20px;
    }

    .cms-unit {
        width: 62px;
        min-width: 62px;
        font-size: 18px;
    }

    .cms-swap-btn {
        margin: 4px auto 14px;
    }

    .cms-result-box {
        padding: 22px 12px;
    }

    .cms-result-line {
        font-size: 17px;
    }

    .cms-calc-footer {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 20px;
        padding-top: 18px;
    }

    .cms-actions {
        width: 100%;
    }

    .cms-actions button {
        flex: 1;
    }
}
.cms-calc-field label .mc-unit-lower {
    text-transform: none !important;
}


/* Material & Weight Calculators */
.cms-input-row select {
    flex: 1;
    min-width: 0;
    height: 68px;
    padding: 0 22px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #003f73 !important;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
}

.cms-input-row select option {
    color: #222222;
}

/*Tolerance / Fit Calculator*/
.mc-section-title {
    margin: 28px 0 16px;
    color: #222;
    font-size: 26px;
    font-weight: 800;
}

.mc-output-list {
    margin: 0 0 28px;
    border-top: 1px solid #e2e8f0;
}

.mc-output-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mc-output-list span {
    color: #6b7280;
    font-size: 14px;
}

.mc-output-list strong {
    color: #111827;
    font-size: 16px;
    font-weight: 800;
    text-align: right;
}

/*Press Fit Calculator*/
.mc-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 28px;
}

.mc-preset-row button {
    padding: 10px 16px;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    background: #ffffff;
    color: #003f73;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.mc-preset-row button:hover {
    background: #f1f6fb;
}

.mc-press-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 28px 0;
}

.mc-result-card {
    padding: 18px 20px;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    background: #ffffff;
}

.mc-result-card-wide {
    grid-column: 1 / -1;
    border-color: #ef7a1a;
}

.mc-result-card span {
    display: block;
    margin-bottom: 8px;
    color: #7b8490;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mc-result-card strong {
    display: block;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
}

.mc-result-card-wide strong {
    color: #ef7a1a;
}

@media (max-width: 768px) {
    .mc-press-results {
        grid-template-columns: 1fr;
    }
}

/*GD&T Calculator*/
.mc-gdt-calculator .cms-result-box {
    margin-top: 28px;
}

.mc-gdt-calculator .cms-result-primary {
    font-size: 24px;
}

.mc-gdt-calculator .mc-output-list strong {
    color: #003f73;
}

/* Material Grade Finder*/
.mc-data-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 26px 0;
}

.mc-data-card {
    padding: 20px;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 39, 78, 0.06);
}

.mc-data-card h3 {
    margin: 0 0 12px;
    color: #003f73;
    font-size: 24px;
    font-weight: 800;
}

.mc-data-card p {
    margin: 7px 0;
    color: #333333;
    font-size: 15px;
    line-height: 1.55;
}

.mc-data-card strong {
    color: #111827;
}

.mc-data-empty {
    padding: 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}

.mc-data-link {
    display: inline-block;
    margin-top: 12px;
    padding: 9px 16px;
    border-radius: 5px;
    background: #003f73;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none !important;
}

.mc-data-link:hover {
    background: #ef7a1a;
    color: #ffffff !important;
}

/*Alloy Comparison Tool*/
.mc-comparison-table-wrap {
    margin: 26px 0;
    overflow-x: auto;
}

.mc-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #dce5ee;
    border-radius: 8px;
    overflow: hidden;
}

.mc-comparison-table th,
.mc-comparison-table td {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
    font-size: 15px;
    line-height: 1.55;
}

.mc-comparison-table th {
    background: #003f73;
    color: #ffffff;
    font-weight: 800;
}

.mc-comparison-table td:first-child {
    width: 130px;
    background: #f8fafc;
    color: #111827;
    font-weight: 800;
}

.mc-data-link-small {
    margin-top: 0;
    padding: 7px 12px;
    font-size: 13px;
}

/*PREN Calculator*/
.mc-formula-box {
    margin: 0 0 28px;
    padding: 18px 20px;
    border-radius: 10px;
    background: #f1f6fb;
    color: #1f2937;
    font-family: "Courier New", monospace;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

/*Pipe Schedule Calculator*/
.mc-pipe-schedule-calculator .cms-result-box .cms-result-primary {
    font-size: 34px;
    letter-spacing: 2px;
}

.mc-pipe-schedule-calculator .cms-calc-field label {
    border-left: 4px solid #ef7a1a;
    padding-left: 12px;
    color: #003f73;
}