.qm-tools {
    font-family: Cairo, Tahoma, sans-serif;
    color: #1c1c1c;
    padding-bottom: 48px;
}
.qm-tools-hero {
    background: #f7f4ef;
    padding: 28px 0 22px;
}
.qm-tools-hero h1 {
    margin: 8px 0;
    font-size: 32px;
    font-weight: 700;
}
.qm-tools-hero p,
.qm-tools-back {
    color: #5c564e;
}
.qm-tools-back {
    display: inline-block;
    margin-bottom: 8px;
    text-decoration: none;
}
.qm-tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding-top: 24px;
}
.qm-tool-card {
    display: block;
    background: #fff;
    border: 1px solid #e6e1d8;
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: inherit;
}
.qm-tool-card h2 {
    margin: 8px 0;
    font-size: 22px;
}
.qm-tool-kicker {
    color: #8a3b2a;
    font-size: 13px;
    font-weight: 700;
}
.qm-steps,
.qm-result {
    background: #fff;
    border: 1px solid #e6e1d8;
    border-radius: 16px;
    padding: 18px;
    margin-top: 20px;
}
.qm-step-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 18px;
    list-style: none;
}
.qm-step-nav li {
    background: #f3efe8;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
}
.qm-step-nav li.is-on {
    background: #1f3b34;
    color: #fff;
}
.qm-step { display: none; }
.qm-step.is-on { display: block; }
.qm-step label,
.qm-steps label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    font-weight: 600;
}
.qm-step input,
.qm-step select {
    height: 44px;
    width: 100%;
    margin-bottom: 0;
    border: 1px solid #d9d3c8;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    font: inherit;
    color: inherit;
}
.qm-step input.is-invalid,
.qm-step select.is-invalid {
    border-color: #ce021d;
}
.qm-step-actions,
.qm-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.qm-step-actions {
    justify-content: flex-end;
}
html[dir="rtl"] .qm-step-actions {
    justify-content: flex-start;
}
.qm-step-error {
    margin: 12px 0 0;
    color: #ce021d;
    font-size: 14px;
    font-weight: 600;
}
.qm-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid #1f3b34;
    background: #1f3b34;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.qm-tool-btn-ghost {
    background: #fff;
    color: #1f3b34;
}
.qm-note,
.qm-disclaimer {
    background: #f7f4ef;
    border-radius: 12px;
    padding: 12px 14px;
    color: #3d3832;
}
.qm-disclaimer {
    margin: 18px 0 0;
}
.qm-field-hint {
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    color: #878a99;
    font-size: 0.875em;
    font-weight: 400;
    line-height: 1.5;
}
.qm-estate {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}
.qm-estate p {
    margin: 0;
    background: #f7f4ef;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.qm-chart {
    display: flex;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    margin: 16px 0;
    background: #efeae2;
}
.qm-chart span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #fff;
    font-size: 12px;
    background: #1f3b34;
}
.qm-chart span:nth-child(2n) { background: #8a3b2a; }
.qm-chart span:nth-child(3n) { background: #3d5a4c; }
.qm-chart b { font-weight: 600; white-space: nowrap; overflow: hidden; }
.qm-table-wrap { overflow-x: auto; }
.qm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.qm-table th,
.qm-table td {
    border-bottom: 1px solid #eee;
    padding: 10px 8px;
    text-align: start;
    vertical-align: top;
}
.qm-table tr.is-blocked { color: #8a8176; }
.qm-consult {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: #1f3b34;
    color: #fff;
}
.qm-consult .qm-tool-btn {
    background: #fff;
    color: #1f3b34;
}
@media print {
    .qm-tools-hero .qm-tools-back,
    .qm-result-actions,
    .qm-consult,
    header,
    footer,
    .navbar,
    .qm-footer {
        display: none !important;
    }
    .qm-result { border: 0; }
}
