/* =========================
   RESET
========================= */

* {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;

    background: #080808;
    color: #f5f5f5;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
}



/* =========================
   TOP BAR
========================= */

.topbar {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 3vw;

    border-bottom: 1px solid #1c1c1c;

    background: #080808;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.brand h1 {
    margin: 0;

    font-size: 19px;
    font-weight: 650;

    letter-spacing: -0.02em;
}

.brand span {
    font-size: 12px;
    color: #666;
}

.language-switch {
    display: flex;
    gap: 6px;
}

.language-switch button {
    padding: 7px 11px;

    border: 1px solid #292929;
    border-radius: 8px;

    background: #111;
    color: #aaa;

    font-size: 12px;

    cursor: pointer;

    transition: 0.2s;
}

.language-switch button:hover {
    border-color: #555;
    color: #fff;
}



/* =========================
   GENERAL MAIN
========================= */

main {
    width: 100%;
}



/* =========================
   HOMEPAGE
========================= */

.hero {
    max-width: 1400px;

    margin: 0 auto;

    padding: 90px 5vw 55px;
}

.eyebrow {
    margin: 0 0 10px;

    font-size: 11px;

    letter-spacing: 0.15em;

    color: #666;
}

.hero h2 {
    max-width: 900px;

    margin: 0;

    font-size: clamp(42px, 6vw, 78px);

    line-height: 1.02;

    letter-spacing: -0.05em;
}

.hero > p:last-child {
    max-width: 700px;

    margin: 28px 0 0;

    color: #888;

    font-size: 16px;

    line-height: 1.7;
}



/* =========================
   HOMEPAGE TOOL GRID
========================= */

.tools {
    max-width: 1400px;

    margin: 0 auto;

    padding: 20px 5vw 90px;
}

.tools > h3 {
    margin: 0 0 22px;

    color: #888;

    font-size: 13px;
    font-weight: 600;

    letter-spacing: 0.04em;
}

.tool-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.tool-card {
    min-height: 240px;

    display: flex;
    flex-direction: column;

    padding: 28px;

    border: 1px solid #1f1f1f;

    border-radius: 18px;

    background: #0e0e0e;

    transition:
        transform 0.2s,
        border-color 0.2s,
        background 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);

    border-color: #333;

    background: #111;
}

.tool-number {
    margin-bottom: 34px;

    font-size: 11px;

    color: #555;

    letter-spacing: 0.1em;
}

.tool-card h4 {
    margin: 0 0 12px;

    font-size: 22px;
    font-weight: 600;
}

.tool-card p {
    margin: 0;

    color: #777;

    line-height: 1.6;
}

.tool-card button {
    align-self: flex-start;

    margin-top: auto;

    padding: 10px 16px;

    border: 1px solid #303030;

    border-radius: 9px;

    background: #151515;

    color: #ddd;

    cursor: pointer;
}

.tool-card button:hover {
    border-color: #555;
    color: #fff;
}



/* =========================
   FOOTER
========================= */

footer {
    max-width: 1400px;

    margin: 0 auto;

    padding: 0 5vw 40px;

    color: #444;

    font-size: 11px;
}



/* =========================
   CALCULATOR PAGE
========================= */

.calculator-section {
    width: min(1880px, 96vw);

    margin: 0 auto;

    padding: 24px 0 40px;
}

.back-link {
    display: inline-block;

    margin-bottom: 20px;

    color: #777;

    text-decoration: none;

    font-size: 14px;
}

.back-link:hover {
    color: #fff;
}

.calculator-section > h2 {
    margin: 0;

    font-size: clamp(30px, 3vw, 46px);

    letter-spacing: -0.04em;
}

.calculator-description {
    max-width: 800px;

    margin: 10px 0 20px;

    color: #777;

    font-size: 15px;

    line-height: 1.6;
}



/* =========================
   SHEAR WORKSPACE
========================= */

.shear-workspace {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(340px, 1.35fr)
        minmax(190px, 0.60fr)
        minmax(300px, 1.05fr);

    gap: 12px;

    align-items: stretch;
}



/* =========================
   MAIN WORKSPACE PANELS
========================= */

.workspace-panel {
    min-width: 0;

    min-height: 860px;

    padding: 32px;

    border: 1px solid #202020;

    border-radius: 18px;

    background: #0f0f0f;
}

.workspace-panel-title {
    margin: 0 0 28px;

    color: #999;

    font-size: 14px;
    font-weight: 600;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}



/* =========================
   INPUT PANEL
========================= */

.calculator-panel {
    display: flex;
    flex-direction: column;
}

.input-group {
    margin-bottom: 28px;
}

.input-group label {
    display: block;

    margin-bottom: 10px;

    color: #999;

    font-size: 15px;
}

.input-group select,
.input-group input {
    width: 100%;

    height: 52px;

    padding: 0 15px;

    border: 1px solid #292929;

    border-radius: 10px;

    outline: none;

    background: #151515;

    color: #eee;

    font-size: 16px;
}

.input-group select:focus,
.input-group input:focus {
    border-color: #555;
}

.input-row {
    display: grid;

    grid-template-columns: 1fr auto;

    align-items: center;

    gap: 10px;
}

.input-row span {
    min-width: 40px;

    color: #777;

    font-size: 14px;
}

.calculate-button {
    width: 100%;

    min-height: 52px;

    margin-top: auto;

    padding: 12px 18px;

    border: 1px solid #e6e6e6;

    border-radius: 10px;

    background: #eeeeee;

    color: #090909;

    font-size: 16px;
    font-weight: 650;

    cursor: pointer;

    transition:
        transform 0.15s,
        background 0.15s;
}

.calculate-button:hover {
    background: #fff;
}

.calculate-button:active {
    transform: scale(0.99);
}



/* =========================
   RESULT PANEL
========================= */

.result-panel {
    display: flex;
    flex-direction: column;
}

.result-primary {
    display: flex;

    align-items: baseline;

    gap: 7px;

    margin-top: 10px;
}

.result-primary span {
    font-size: clamp(44px, 4vw, 68px);

    font-weight: 650;

    letter-spacing: -0.055em;
}

.result-primary small {
    color: #888;

    font-size: 17px;
}

.result-secondary {
    display: flex;

    align-items: baseline;

    gap: 6px;

    margin-top: 10px;

    color: #999;
}

.result-secondary span {
    font-size: 25px;
}

.result-secondary small {
    font-size: 14px;
}

.formula-box {
    margin-top: 40px;

    padding: 20px;

    border: 1px solid #202020;

    border-radius: 12px;

    background: #131313;
}

.formula-box p {
    margin: 0 0 10px;

    color: #777;

    font-size: 13px;
}

.formula-box code {
    color: #ddd;

    font-size: 15px;
}



/* =========================
   CALCULATION DETAILS
========================= */

.calculation-details {
    margin-top: 30px;

    padding-top: 22px;

    border-top: 1px solid #202020;

    color: #888;
}

.calculation-details summary {
    color: #aaa;

    font-size: 14px;

    cursor: pointer;
}

.calculation-details p {
    margin: 10px 0;

    font-size: 13px;

    line-height: 1.6;
}

.calculation-details hr {
    margin: 14px 0;

    border: 0;

    border-top: 1px solid #202020;
}



/* =========================
   INFORMATION PANEL
========================= */

.info-panel {
    display: flex;

    flex-direction: column;

    gap: 0;
}

.info-section {
    min-width: 0;
}



/* =========================
   MATERIAL INFORMATION
========================= */

.material-info-section {
    padding-bottom: 34px;
}

.info-material-name {
    margin: -4px 0 20px;

    color: #f2f2f2;

    font-size: 24px;
    font-weight: 600;

    letter-spacing: -0.025em;
}

.info-data-list {
    border: 1px solid #202020;

    border-radius: 12px;

    overflow: hidden;

    background: #131313;
}

.info-data-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 14px;

    padding: 16px 15px;
}

.info-data-row + .info-data-row {
    border-top: 1px solid #202020;
}

.info-data-label {
    color: #888;

    font-size: 14px;
}

.info-data-value {
    color: #e2e2e2;

    font-size: 15px;
    font-weight: 550;

    text-align: right;
}

.info-note {
    margin: 16px 0 0;

    color: #707070;

    font-size: 13px;

    line-height: 1.65;
}



/* =========================
   DIVIDER
========================= */

.info-divider {
    width: 100%;

    height: 1px;

    flex-shrink: 0;

    background: #303030;
}



/* =========================
   SAFETY FACTOR INFORMATION
========================= */

.safety-info-section {
    padding-top: 34px;
}

.safety-heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 12px;
}

.safety-heading .workspace-panel-title {
    margin-bottom: 22px;
}

.safety-current {
    flex-shrink: 0;

    padding: 6px 10px;

    border: 1px solid #303030;

    border-radius: 999px;

    background: #171717;

    color: #bbb;

    font-size: 13px;
}

.safety-level {
    margin: 0 0 14px;

    color: #e2e2e2;

    font-size: 17px;

    font-weight: 600;
}

.safety-description {
    margin: 0;

    padding: 18px 17px;

    border: 1px solid #202020;

    border-radius: 12px;

    background: #131313;

    color: #999;

    font-size: 14px;

    line-height: 1.7;
}

.safety-warning {
    margin: 16px 0 0;

    color: #707070;

    font-size: 12px;

    line-height: 1.65;
}



/* =========================
   COMPACT DESKTOP
========================= */

@media (max-width: 1199px) and (min-width: 900px) {

    .calculator-section {
        width: 98vw;
    }

    .shear-workspace {
        grid-template-columns:
            minmax(300px, 1.35fr)
            minmax(180px, 0.60fr)
            minmax(280px, 1.05fr);

        gap: 8px;
    }

    .workspace-panel {
        min-height: 800px;

        padding: 26px;
    }

    .input-group {
        margin-bottom: 24px;
    }

    .input-group select,
    .input-group input {
        height: 48px;

        font-size: 15px;
    }

    .material-info-section {
        padding-bottom: 28px;
    }

    .safety-info-section {
        padding-top: 28px;
    }

}



/* =========================
   TABLET
========================= */

@media (max-width: 899px) and (min-width: 601px) {

    .calculator-section {
        width: 96vw;
    }

    .shear-workspace {
        grid-template-columns:
            1.35fr
            0.65fr;
    }

    .workspace-panel {
        min-height: 720px;
    }

    .info-panel {
        grid-column: 1 / -1;

        min-height: auto;
    }

}



/* =========================
   MOBILE ONLY
========================= */

@media (max-width: 600px) {

    .topbar {
        padding: 16px 18px;
    }

    .brand span {
        display: none;
    }

    .hero {
        padding:
            55px 18px
            36px;
    }

    .hero h2 {
        font-size: clamp(36px, 11vw, 52px);
    }

    .tools {
        padding:
            10px 18px
            60px;
    }

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

    .calculator-section {
        width: auto;

        padding:
            24px 16px
            45px;
    }

    .back-link {
        margin-bottom: 24px;
    }

    .calculator-description {
        margin-bottom: 20px;
    }

    .shear-workspace {
        grid-template-columns: 1fr;
    }

    .workspace-panel {
        min-height: auto;

        padding: 20px;
    }

    .input-group {
        margin-bottom: 22px;
    }

    .input-group select,
    .input-group input {
        height: 48px;
    }

    .result-primary span {
        font-size: 52px;
    }

}
/* =========================
   SITE FOOTER
========================= */

.site-footer {
    max-width: none;

    margin: 0;

    padding: 0;

    border-top: 1px solid #1c1c1c;

    color: #666;
}

.footer-inner {
    max-width: 1400px;

    margin: 0 auto;

    padding: 30px 5vw 38px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 24px;
}

.footer-brand {
    margin: 0;

    flex-shrink: 0;

    color: #555;

    font-size: 11px;
}

.footer-links {
    display: flex;

    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 10px 22px;
}

.footer-links a {
    color: #777;

    font-size: 12px;

    text-decoration: none;

    transition: color 0.2s;
}

.footer-links a:hover {
    color: #f2f2f2;
}



/* =========================
   INFORMATION / POLICY PAGES
========================= */

.info-page {
    width: min(960px, 90vw);

    margin: 0 auto;

    padding: 64px 0 90px;
}

.info-page-header {
    margin-bottom: 34px;
}

.info-page-header h2 {
    max-width: 820px;

    margin: 0;

    font-size: clamp(36px, 5vw, 64px);

    line-height: 1.05;

    letter-spacing: -0.045em;
}

.info-page-lead {
    max-width: 760px;

    margin: 20px 0 0;

    color: #888;

    font-size: 16px;

    line-height: 1.8;
}

.info-content {
    border: 1px solid #202020;

    border-radius: 18px;

    overflow: hidden;

    background: #0f0f0f;
}

.info-content-section {
    padding: 30px 32px;
}

.info-content-section + .info-content-section {
    border-top: 1px solid #202020;
}

.info-content-section h3 {
    margin: 0 0 14px;

    color: #f0f0f0;

    font-size: 20px;

    letter-spacing: -0.02em;
}

.info-content-section p,
.info-content-section li {
    color: #999;

    font-size: 14px;

    line-height: 1.85;
}

.info-content-section p {
    margin: 0;
}

.info-content-section p + p {
    margin-top: 12px;
}

.info-content-section ul {
    margin: 12px 0 0;

    padding-left: 20px;
}

.info-content-section a {
    color: #d4d4d4;

    text-underline-offset: 3px;
}

.info-content-section strong {
    color: #dcdcdc;

    font-weight: 600;
}

.info-page-meta {
    margin-top: 22px;

    color: #555;

    font-size: 12px;

    line-height: 1.7;
}

.lang-block[hidden] {
    display: none;
}



/* =========================
   FOOTER + INFO PAGE RWD
========================= */

@media (max-width: 700px) {

    .footer-inner {
        padding:
            26px 18px
            34px;

        flex-direction: column;

        align-items: flex-start;
    }

    .footer-links {
        justify-content: flex-start;

        gap: 12px 18px;
    }

    .info-page {
        width: auto;

        padding:
            42px 18px
            64px;
    }

    .info-content-section {
        padding: 24px 20px;
    }

}
