.typ-tool {
    max-width: 880px;
    color: #0F284D;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: visible;
}

.typ-tool * {
    box-sizing: border-box;
}

.typ-tool .typ-layout {
    display: grid;
    grid-template-columns: minmax(0, 335px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.typ-tool .leftinput,
.typ-tool .rightresult {
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    min-width: 0;
}

.typ-tool .typ-input {
    padding: 18px;
    border-radius: 3px;
}

.typ-tool .typ-result {
    border: 1px solid #d7e4e8;
    border-radius: 3px;
    background: #ffffff;
    overflow: hidden;
    scroll-margin-top: 22px;
}

.typ-tool .typ-result h2 {
    margin: 0;
    padding: 7px 10px;
    background: #228B22;
    color: #ffffff;
    text-align: center;
    font-size: 18px;
}

.typ-tool .typ-intro {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.55;
    color: #304753;
}

.typ-tool .typ-field {
    margin-bottom: 12px;
}

.typ-tool label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #0F284D;
}

.typ-tool input[type="number"] {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
    color: #0F284D;
    background-color: #ffffff;
    border: 1px solid #0F284D;
    border-radius: 0;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    font-family: 'Segoe UI', sans-serif;
}

.typ-tool input::placeholder {
    color: #999;
}

.typ-tool input:focus,
.typ-tool button:focus-visible,
.typ-tool summary:focus-visible {
    border-color: #0F284D;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 40, 77, 0.2);
}

.typ-tool [aria-invalid="true"] {
    border-color: #d9534f !important;
    background: #fff5f5;
}

.typ-tool [data-error] {
    display: block;
    min-height: 14px;
    margin-top: 4px;
    color: #a61b1b;
    font-size: 11px;
    line-height: 1.3;
}

.typ-tool .typ-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.typ-tool .typ-presets button,
.typ-tool .typ-actions button {
    width: auto;
    margin: 0;
    padding: 5px 9px;
    font-size: 11px;
    line-height: 1.2;
    color: #0F284D;
    background: #ffffff;
    border: 1px solid #c9d8de;
    border-radius: 2px;
    cursor: pointer;
}

.typ-tool .typ-presets button:hover,
.typ-tool .typ-actions button:hover {
    background: #eef5f7;
    opacity: 1;
}

.typ-tool .typ-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.typ-tool .typ-buttons .btn-style {
    width: 48%;
    font-size: 16px !important;
}

.typ-tool .typ-rating {
    margin-top: 8px;
    text-align: center;
}

.typ-tool .typ-empty {
    padding: 22px 14px;
    text-align: center;
    color: #556772;
    font-size: 13px;
    line-height: 1.6;
}

.typ-tool .typ-output {
    padding: 12px;
}

.typ-tool .typ-output[hidden] {
    display: none !important;
}

.typ-tool .typ-hero {
    display: grid;
    gap: 3px;
    padding: 14px 10px;
    border-radius: 5px;
    background: linear-gradient(145deg, #0F284D, #1e4b73);
    color: #ffffff;
    text-align: center;
}

.typ-tool .typ-hero span {
    font-size: 11px;
    opacity: 0.96;
}

.typ-tool .typ-hero strong {
    display: block;
    color: #ffffff !important;
    font-size: 34px !important;
    line-height: 1.05;
}

.typ-tool .typ-syringe-card {
    margin-top: 10px;
    padding: 10px 10px 8px;
    background: #f5f9fb;
    border: 1px solid #d8e4e8;
    border-radius: 4px;
}

.typ-tool .typ-syringe {
    display: block;
    width: 100%;
    height: auto;
}

.typ-tool .typ-liquid,
.typ-tool .typ-marker,
.typ-tool .typ-plunger-front {
    transition: all 0.6s ease;
}

.typ-tool .typ-scale-readout {
    margin-top: 3px;
    text-align: center;
    font-size: 12px;
    color: #344b57;
}

.typ-tool .typ-scale-readout strong {
    color: #0F284D !important;
    font-size: 13px !important;
}

.typ-tool .typ-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.typ-tool .typ-metrics > div {
    padding: 10px 8px;
    background: #f4f9fa;
    border-left: 4px solid #228B22;
    border-radius: 3px;
    min-width: 0;
}

.typ-tool .typ-metrics span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: #556773;
}

.typ-tool .typ-metrics strong {
    display: block;
    color: #0F284D !important;
    font-size: 17px !important;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.typ-tool .typ-status {
    margin-top: 10px;
    padding: 10px 12px;
    background: #e1eff0;
    border-left: 4px solid #0F284D;
    color: #1d2d3a;
    font-size: 12px;
    line-height: 1.55;
}

.typ-tool .typ-status.is-warning {
    background: #fff3cd;
    border-left-color: #f0ad4e;
    color: #856404;
}

.typ-tool .typ-steps {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #d9e5e9;
    border-radius: 4px;
    background: #ffffff;
    font-size: 12px;
}

.typ-tool .typ-steps summary {
    cursor: pointer;
    font-weight: 700;
    color: #0F284D;
}

.typ-tool .typ-steps p {
    margin: 8px 0 0;
    white-space: pre-line;
    line-height: 1.65;
}

.typ-tool .typ-actions {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
}

.typ-tool .typ-info {
    margin-top: 20px;
}

.typ-tool .typ-info h2 {
    font-size: 18px;
}

.typ-tool .typ-info p,
.typ-tool .typ-info li,
.typ-tool .typ-info summary {
    font-size: 15px;
}

@media (max-width: 768px) {
    .typ-tool .typ-layout {
        grid-template-columns: 1fr;
    }

    .typ-tool .typ-input,
    .typ-tool .typ-result {
        width: 100%;
        max-width: 375px;
        margin: 0 auto 18px;
    }
}

@media (max-width: 480px) {
    .typ-tool .typ-metrics {
        grid-template-columns: 1fr;
    }

    .typ-tool .typ-hero strong {
        font-size: 29px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .typ-tool .typ-liquid,
    .typ-tool .typ-marker,
    .typ-tool .typ-plunger-front {
        transition: none;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    .typ-tool .typ-result,
    .typ-tool .typ-result * {
        visibility: visible !important;
    }

    .typ-tool .typ-result {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 0;
    }

    .typ-tool .typ-actions {
        display: none !important;
    }
}
