/* ==========================================================================
   calculator.css — styles for the calculator page (calculator.html)
   Split out of style.css. Loaded AFTER style.css, so these rules win on this page.
   Shared blocks are copies here; the originals stay in style.css for other pages.
   ========================================================================== */

/* ========== Calculator ========== */
.calculator {
    padding: clamp(48px, 4.43vw, 85px) 0 clamp(53px, 4.9vw, 94px);
    background: #f3f6f8;
}
.calc-card {
    background: #FFFFFF;
    border: 1px solid #E9D8FF;
    border-radius: 14px;
    padding: 32px 36px;
    max-width: 920px;
    margin: 0 auto;
    color: var(--ink-700);
    box-shadow: 0 12px 40px rgba(123, 63, 228, 0.08);
    position: relative;
}
.calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    position: relative;
}
.calc-grid-full {
    grid-column: 1 / -1;
}
.calc-field {
    margin-bottom: 0;
}
.calc-label {
    font-size: 13px;
    color: var(--ink-700);
    margin-bottom: 8px;
    font-weight: 500;
}
.calc-label strong {
    color: #3a3e5a;
    font-family: var(--font-mono);
    font-weight: 700;
}
.calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.calc-input,
.calc-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #3150ff;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: var(--ink-900);
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.calc-input {
    font-family: var(--font-mono);
}
.calc-input:focus,
.calc-select:focus {
    border-color: var(--brand-purple);
    box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.1);
}
.calc-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%237B3FE4' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}
.calc-slider {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 7px;
    border-radius: 999px;
    outline: none;
    background: linear-gradient(90deg, #83DBF6 0%, #3059FF 100%);
    margin: 6px 0 0;
}
.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #9640EF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(150, 64, 239, 0.35);
}
.calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #9640EF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(150, 64, 239, 0.35);
}
.calc-range-row {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ink-500);
}
.calc-result {
    margin-top: 24px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #E9D8FF;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.calc-result-l {
    font-size: 12px;
    color: var(--ink-500);
}
.calc-result-v {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-mono);
    margin-top: 4px;
}
.calc-blue {
    color: var(--brand-blue);
}
.calc-green {
    color: #21B573;
}
.calc-red {
    color: #E84B4B;
}
.calc-result-v[data-calc-out="days"] {
    color: var(--ink-900);
}
.calc-submit {
    margin-top: 20px;
    width: 100%;
    padding: 16px 0;
    background: #2051ff;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .15s, box-shadow .15s, filter .15s;
    position: relative;
}
.calc-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 28px rgba(123, 63, 228, 0.35);
}
/* ========== Calculator Template ========== */
.calculator-template {
    background: #fff;
}
.calculator-page-hero {
    padding: clamp(74px, 6.88vw, 132px) 0 clamp(32px, 2.92vw, 56px);
    text-align: center;
    background: #f3f6f8;
}
.calculator-page-hero h1 {
    margin: 0 0 clamp(12px, 1.09vw, 21px);
    color: #333333;
    font-size: clamp(26px, 2.4vw, 46px);
    font-weight: 900;
    letter-spacing: 0;
}
.calculator-page-hero p {
    margin: 0;
    color: #7F879F;
    font-size: clamp(14px, 1.25vw, 24px);
    font-weight: 400;
}
.calculator-page-section {
    padding: 0 0 clamp(45px, 4.17vw, 80px);
}
.calculator-page-section .calc-card {
    max-width: 900px;
    padding: 48px 48px;
    background: #fff;
    border: none;
}
.calculator-page-section .calc-result {
    display: none;
}
.calculator-page-section .calc-card.calc-has-result .calc-result {
    display: grid;
}
.calculator-page-section .calc-submit {
    margin-top: 26px;
    min-height: 60px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
}
/* ========== Responsive ========== */
@media (max-width: 860px) {
    .calculator-page-hero {
        padding: 76px 0 34px;
    }

    .calculator-page-hero h1 {
        font-size: 42px;
    }

    .calculator-page-section {
        padding-bottom: 110px;
    }

    .calculator-page-section .calc-card {
        padding: 36px 28px;
    }

    .calc-card {
        padding: 24px 20px;
    }

    .calc-result {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
}
@media (max-width: 560px) {
    .calculator-page-hero {
        padding: 54px 0 28px;
    }

    .calculator-page-hero h1 {
        font-size: 36px;
    }

    .calculator-page-hero p {
        font-size: 15px;
    }

    .calculator-page-section {
        padding-bottom: 76px;
    }

    .calculator-page-section .calc-card {
        padding: 28px 20px;
    }

    .calc-result {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 860px) {
    .calculator {
        padding: 24px 0 48px;
    }

    .calc-grid {
        gap: 16px;
    }

    .calc-input,
    .calc-select {
        font-size: 16px;
        padding: 12px 14px;
        min-height: 44px;
    }

    .calc-select {
        background-position: right 12px center;
        padding-right: 34px;
    }

    .calc-slider {
        height: 10px;
        margin: 10px 0 0;
    }

    .calc-slider::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }

    .calc-slider::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }

    .calc-label-row {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .calc-result-v {
        font-size: 20px;
    }

    .calculator-page-section .calc-submit {
        min-height: 56px;
        font-size: 17px;
        padding: 14px 0;
    }
}
@media (max-width: 560px) {
    .calculator {
        padding: 16px 0 36px;
    }

    .calc-card {
        border-radius: 12px;
    }

    .calc-input,
    .calc-select {
        padding: 11px 12px;
        font-size: 16px;
    }

    .calc-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .calc-result {
        padding: 14px 14px;
        gap: 10px;
    }

    .calc-result>div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .calc-result-v {
        font-size: 18px;
        margin-top: 0;
        text-align: right;
        word-break: break-all;
    }

    .calc-result-l {
        font-size: 12px;
        flex-shrink: 0;
    }

    .calc-range-row {
        font-size: 11px;
    }

    .calculator-page-section .calc-submit {
        min-height: 52px;
        font-size: 16px;
        gap: 8px;
        margin-top: 20px;
    }

    .calculator-page-hero .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}
/* ========== Lanhu page restore: download / contract / academy content only ========== */
@media (max-width: 1080px) {
    body .calculator-template {
        background: #e4eaf9;
    }

    body .calculator-page-hero {
        padding: clamp(28px, 7.5vw, 81px) 0 clamp(19px, 5.19vw, 56px);
        background: #e4eaf9;
    }

    body .calculator-page-hero h1 {
        margin: 0 0 clamp(5px, 1vw, 14px);
        font-size: clamp(19px, 5.19vw, 56px);
        line-height: 1.2;
    }

    body .calculator-page-hero p {
        font-size: clamp(8px, 2.22vw, 24px);
        line-height: 1.4;
        color: #7F879F;
    }

    body .calculator-page-section {
        padding: 0 0 clamp(40px, 10.56vw, 114px);
        background: #e4eaf9;
    }

    body .calculator-page-section .container {
        padding: 0 clamp(10px, 1.11vw, 12px);
    }

    body .calculator-page-section .calc-card {
        max-width: none;
        width: 100%;
        padding: clamp(16px, 3vw, 36px) clamp(15px, 3vw, 34px);
        border-radius: clamp(14px, 3.15vw, 34px);
        background: #fff;
        border: none;
        box-shadow: 0 clamp(8px, 1.5vw, 16px) clamp(20px, 3.7vw, 40px) rgba(80, 120, 200, 0.12);
    }

    body .calc-grid {
        gap: clamp(10px, 1.5vw, 18px);
    }

    body .calc-label {
        font-size: clamp(11px, 1.35vw, 14px);
        margin-bottom: clamp(4px, 0.6vw, 7px);
    }

    body .calc-input,
    body .calc-select {
        padding: clamp(8px, 1.1vw, 12px) clamp(11px, 1.3vw, 14px);
        font-size: clamp(13px, 1.45vw, 16px);
        border-width: 1.5px;
        border-radius: clamp(8px, 0.9vw, 10px);
    }

    body .calc-range-row {
        font-size: clamp(10px, 1.2vw, 13px);
        margin-top: clamp(5px, 0.7vw, 8px);
    }

    body .calc-slider {
        margin-top: clamp(4px, 0.6vw, 6px);
    }

    body .calc-slider::-webkit-slider-thumb {
        width: clamp(14px, 1.7vw, 18px);
        height: clamp(14px, 1.7vw, 18px);
        border-width: 2px;
    }

    body .calc-slider::-moz-range-thumb {
        width: clamp(14px, 1.7vw, 18px);
        height: clamp(14px, 1.7vw, 18px);
        border-width: 2px;
    }

    body .calc-result {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(10px, 2.22vw, 24px);
        margin-top: clamp(14px, 2.5vw, 27px);
        padding: clamp(12px, 2.22vw, 24px);
        border-radius: clamp(8px, 1.11vw, 12px);
        border-color: #E9D8FF;
    }

    body .calc-result>div {
        min-width: 0;
        padding: clamp(10px, 1.85vw, 20px);
        border-radius: clamp(8px, 1.11vw, 12px);
        background: #f8fbff;
        box-sizing: border-box;
    }

    body .calc-result-l {
        font-size: clamp(11px, 1.3vw, 14px);
        line-height: 1.4;
        color: #7F879F;
    }

    body .calc-result-v {
        margin-top: clamp(5px, .74vw, 8px);
        font-size: clamp(16px, 2.04vw, 22px);
        line-height: 1.2;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    body .calculator-page-section .calc-submit {
        margin-top: clamp(12px, 1.8vw, 22px);
        min-height: clamp(42px, 5vw, 58px);
        border-radius: clamp(8px, 0.9vw, 10px);
        font-size: clamp(14px, 1.5vw, 17px);
    }
}

@media (max-width: 560px) {
    body .calc-result {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    body .calc-result>div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px;
    }

    body .calc-result-l {
        flex: 0 0 auto;
        font-size: clamp(11px, 1.35vw, 14px);
    }

    body .calc-result-v {
        margin-top: 0;
        font-size: clamp(11px, 1.35vw, 14px);
        text-align: right;
    }
}
