/*
 * WebHostLab Home Design
 * Shared calculator foundation.
 */

* {
    box-sizing: border-box;
}

.calculator-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.tool-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.tool-lead {
    max-width: 720px;
    margin: 0;
    color: #5f6874;
    font-size: 18px;
}

.tool-badge {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid #d7dce5;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.eyebrow {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.calculator-alert {
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid #efb6b6;
    border-left: 5px solid #b42318;
    border-radius: 12px;
    background: #fff4f4;
    color: #861c16;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.calculator-card,
.tips-card,
.calculator-report,
.calculator-content {
    border: 1px solid #e1e5eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

.calculator-form {
    padding: 32px;
}

.card-heading > div {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.card-heading h2 {
    margin: 0 0 4px;
    font-size: 23px;
}

.card-heading p {
    margin: 0;
    color: #68727d;
}

.step-number {
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-weight: 900;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #26313d;
    font-size: 14px;
    font-weight: 800;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfd4da;
    border-radius: 10px;
    background: #ffffff;
    color: #17202a;
    font: inherit;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.input-unit {
    display: flex;
    align-items: stretch;
}

.input-unit input {
    border-radius: 10px 0 0 10px;
}

.input-unit span {
    display: grid;
    min-width: 65px;
    place-items: center;
    padding: 0 11px;
    border: 1px solid #cfd4da;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #f3f4f6;
    color: #505a65;
    font-size: 13px;
    font-weight: 800;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.button,
.calculate-button,
.reset-button,
.print-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button,
.calculate-button {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
}

.reset-button {
    border: 1px solid #cfd4da;
    background: #ffffff;
    color: #293440;
}

.print-button {
    border: 1px solid #111827;
    background: #111827;
    color: #ffffff;
}

.tips-card {
    position: sticky;
    top: 24px;
    padding: 25px;
}

.tips-icon {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 800;
}

.tips-card h2 {
    margin-bottom: 8px;
    font-size: 22px;
}

.tips-card p,
.tips-card li {
    color: #626d78;
}

.tips-card ul {
    padding-left: 19px;
    margin-bottom: 0;
}

.calculator-report {
    margin-top: 34px;
    padding: 34px;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.report-header h2 {
    margin: 5px 0;
    font-size: 32px;
}

.report-header p {
    margin: 0;
    color: #6d7781;
}

.result-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0;
}

.result-highlight {
    min-height: 150px;
    padding: 22px;
    border: 1px solid #e1e5eb;
    border-radius: 16px;
    background: #f8fafc;
}

.result-highlight span,
.result-highlight small {
    display: block;
}

.result-highlight span {
    margin-bottom: 9px;
    color: #596570;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.result-highlight strong {
    display: block;
    color: #17202a;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.result-highlight small {
    margin-top: 8px;
    color: #747e88;
}

.report-note {
    margin-top: 22px;
    padding: 17px 19px;
    border-left: 5px solid #2563eb;
    border-radius: 10px;
    background: #eff6ff;
    color: #334155;
}

.calculator-content {
    margin-top: 34px;
    padding: 30px;
}

.calculator-content h2 {
    font-size: 27px;
}

.calculator-content p {
    color: #626c76;
}

@media (max-width: 980px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .tips-card {
        position: static;
    }

    .result-highlight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tool-intro,
    .report-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .calculator-form,
    .calculator-report {
        padding: 23px;
    }

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

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .calculate-button,
    .reset-button {
        width: 100%;
        text-align: center;
    }
}

@media print {
    .hd-header,
    .hd-footer,
    .no-print {
        display: none !important;
    }

    .calculator-page {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .calculator-report {
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .result-highlight-grid {
        break-inside: avoid;
    }

    .result-highlight {
        break-inside: avoid;
        box-shadow: none;
    }
}
