@charset "UTF-8";

/*
 * 2026 responsive compatibility layer.
 * This file only adjusts layout, overflow and input sizing. The original
 * calculator palettes, backgrounds, borders and advertising markup remain in
 * their existing stylesheets and templates.
 */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

iframe,
object,
embed,
canvas {
    max-width: 100%;
}

.mathmod_form,
.intro_area,
.result_area,
.box_con,
.test_content {
    overflow-wrap: anywhere;
}

pre,
.formula,
.math-expression {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 990px) {
    html,
    body {
        min-width: 0 !important;
        max-width: 100%;
    }

    body {
        overflow-x: hidden;
    }

    #header,
    #logo,
    .wrapper,
    .main,
    .cont,
    .footer,
    .footerCon,
    .footbar,
    .top_in,
    .header,
    .nav ul {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .cont .col_left,
    .cont .col_right,
    #col_right,
    .col_left,
    .col_right {
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mod_box_t1,
    .mod_box_t2,
    .mod_box_t3,
    .fn_part,
    .fn_box,
    .bd,
    .box_con,
    .mathmod_form,
    .intro_area,
    .result_area,
    .test_center,
    .test_content {
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mathmod_form,
    .result_area,
    .test_content,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table[width],
    img[width],
    iframe[width],
    canvas[width],
    object[width],
    embed[width] {
        max-width: 100% !important;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
        box-sizing: border-box;
    }

    .menu_xy,
    .menu_xy_inner,
    .menu_xy ul {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .menu_xy ul {
        display: flex;
        flex-wrap: wrap;
    }

    .menu_xy li {
        float: none;
    }

    .qiehuankuang_1 {
        width: 300px;
        max-width: calc(100% - 24px);
    }

    #jisuan,
    .calculator_main,
    .calculator_con {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    #logo {
        height: auto !important;
        min-height: 65px;
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    #logo img {
        width: min(326px, 88vw);
    }

    .fn_part .result_area p strong,
    .fn_part .result_area p span {
        float: none;
        display: block;
        width: auto !important;
        max-width: 100%;
    }

    .indexlist ul li {
        width: calc(50% - 20px) !important;
        max-width: calc(50% - 20px);
    }

    textarea,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    select {
        font-size: 16px;
    }
}

@media (max-width: 359px) {
    .indexlist ul li {
        width: 100% !important;
        max-width: 100%;
        margin-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Online calculator logo 20261113: preserve original 326x60 header slot. */
#logo a {
  display:block;position:relative;width:326px;max-width:100%;height:60px;overflow:hidden;
}
#logo img[src*="logo.png?v=848b4b4a7586"] {
  position:absolute!important;left:-65.895954px!important;top:-31.560694px!important;
  width:376.647399px!important;height:125.549133px!important;max-width:none!important;
  margin:0!important;object-fit:fill!important;
}

/* Directory pagination and full tool names, 20261113. */
.fn_part .mod_txt li {height:auto;min-height:27px;overflow:visible;white-space:normal;line-height:1.7;margin-bottom:4px;box-sizing:border-box;}
.fn_part .mod_txt li a,.indexlist ul li a {white-space:normal;overflow-wrap:anywhere;}
.indexlist ul li {height:auto;min-height:30px;white-space:normal;overflow:visible;line-height:1.7;}
.matrix-2000-directory-summary>p:last-child {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.matrix-2000-directory-summary>p:last-child>a {display:inline-block;padding:8px 10px;border:1px solid #ddbb95;background:#fff8e9;line-height:1.6;white-space:normal;}
.directory-pagination {display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:14px 0 18px;padding:10px 0;border-top:1px solid #e4c9aa;border-bottom:1px solid #e4c9aa;}
.directory-pagination a,.directory-pagination button {display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0 9px;box-sizing:border-box;border:1px solid #ddbb95;background:#fff8e9;color:#824616;font:inherit;text-decoration:none;cursor:pointer;}
.directory-pagination [aria-current="page"] {background:#a4672e;border-color:#a4672e;color:white;}
.directory-pagination a:focus-visible,.directory-pagination button:focus-visible,.directory-pagination select:focus-visible {outline:2px solid #824616;outline-offset:2px;}
.directory-pagination label {display:flex;align-items:center;gap:5px;flex-wrap:wrap;color:#70401d;}
.directory-pagination select {max-width:140px;min-height:40px;border:1px solid #ddbb95;background:#fffaf3;color:#70401d;font:inherit;}
.directory-browser [data-directory-status] {line-height:1.8;color:#70401d;}
.directory-browser .algebra-calculator-grid a {min-height:42px;box-sizing:border-box;}
@media(max-width:640px){.directory-pagination{gap:5px}.directory-pagination label{width:100%;margin-top:4px}.matrix-2000-directory-summary>p:last-child>a{box-sizing:border-box;max-width:100%}}

.fn_part .hd h1.legacy-page-title {display:block!important;position:static!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;text-indent:0!important;overflow:visible!important;background:none!important;padding:0!important;margin:14px auto!important;font-size:24px!important;font-weight:400!important;line-height:1.3!important;text-align:center!important;}

/* Let long legacy page titles wrap on mobile instead of clipping. */
.fn_part .hd {height:auto!important;min-height:54px;overflow:visible!important;}
.fn_part .hd>h2 {height:auto!important;max-height:none!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;line-height:1.4!important;}
@media(max-width:640px){.fn_part .hd>h2,.fn_part .hd h1.legacy-page-title{font-size:21px!important;}}

.fn_part>.hd>h1 {height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;line-height:1.4!important;}
@media(max-width:640px){.fn_part>.hd>h1{font-size:21px!important;}}

/* Directory pagination and full tool names, 20261113. */
.fn_part .mod_txt li {height:auto;min-height:27px;overflow:visible;white-space:normal;line-height:1.7;margin-bottom:4px;box-sizing:border-box;}
.fn_part .mod_txt li a,.indexlist ul li a {white-space:normal;overflow-wrap:anywhere;}
.indexlist ul li {height:auto;min-height:30px;white-space:normal;overflow:visible;line-height:1.7;}
.matrix-2000-directory-summary>p:last-child {display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.matrix-2000-directory-summary>p:last-child>a {display:inline-block;padding:8px 10px;border:1px solid #ddbb95;background:#fff8e9;line-height:1.6;white-space:normal;}
.directory-pagination {display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:14px 0 18px;padding:10px 0;border-top:1px solid #e4c9aa;border-bottom:1px solid #e4c9aa;}
.directory-pagination a,.directory-pagination button {display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0 9px;box-sizing:border-box;border:1px solid #ddbb95;background:#fff8e9;color:#824616;font:inherit;text-decoration:none;cursor:pointer;}
.directory-pagination [aria-current="page"] {background:#a4672e;border-color:#a4672e;color:white;}
.directory-pagination a:focus-visible,.directory-pagination button:focus-visible,.directory-pagination select:focus-visible {outline:2px solid #824616;outline-offset:2px;}
.directory-pagination label {display:flex;align-items:center;gap:5px;flex-wrap:wrap;color:#70401d;}
.directory-pagination select {max-width:140px;min-height:40px;border:1px solid #ddbb95;background:#fffaf3;color:#70401d;font:inherit;}
.directory-browser [data-directory-status] {line-height:1.8;color:#70401d;}
.directory-browser .algebra-calculator-grid a {min-height:42px;box-sizing:border-box;}
@media(max-width:640px){.directory-pagination{gap:5px}.directory-pagination label{width:100%;margin-top:4px}.matrix-2000-directory-summary>p:last-child>a{box-sizing:border-box;max-width:100%}}

/* Remaining legacy titles and long explanatory lines. */
h1.legacy-page-title{height:auto!important;max-height:none!important;text-indent:0!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;line-height:1.4!important;}
.fn_part .intro_area,.fn_part .intro_area p,.fn_part .help_area{white-space:normal;overflow-wrap:anywhere;}
@media(max-width:640px){h1.legacy-page-title{font-size:21px!important;} .fn_part .bd>div{max-width:100%;box-sizing:border-box;}}
