﻿.image-cell {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.astro-font {
    font-family: Test-Astro;
}

.nav-image-container {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.article-page {
    width: 100%;
    padding: 2rem 1rem 4rem;
    box-sizing: border-box;
}

.article-card {
    width: min(100%, 68rem);
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2.75rem);
    box-sizing: border-box;
    border: 1px solid rgba(89, 106, 202, 0.18);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 0.6rem 1.8rem rgba(22, 17, 38, 0.08);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    color: #6d6875;
    font-size: 0.88rem;
}

    .breadcrumbs a {
        color: #596aca;
        text-decoration: none;
    }

        .breadcrumbs a:hover {
            text-decoration: underline;
        }

.article-header {
    max-width: 52rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e8e6ed;
}

.article-category {
    margin: 0 0 0.5rem;
    color: #596aca;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-header h1 {
    margin: 0;
    color: #171221;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.12;
}

.article-introduction {
    margin: 1rem 0 0;
    color: #55505e;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    line-height: 1.7;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(11rem, 14rem) minmax(0, 1fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 4rem);
    margin-top: 2rem;
}

.table-of-contents {
    position: sticky;
    top: 6rem;
    padding: 1rem;
    border: 1px solid #e5e2eb;
    border-radius: 0.8rem;
    background: #faf9fc;
}

    .table-of-contents h2 {
        margin: 0 0 0.8rem;
        color: #25202d;
        font-size: 1rem;
    }

    .table-of-contents nav {
        display: grid;
        gap: 0.15rem;
    }

    .table-of-contents a {
        padding: 0.45rem 0.5rem;
        border-radius: 0.4rem;
        color: #5d5864;
        font-size: 0.9rem;
        line-height: 1.35;
        text-decoration: none;
        width: 100%;
    }

        .table-of-contents a:hover {
            color: #4658bd;
            background: #efeffb;
        }

.article-content {
    min-width: 0;
    color: #332f38;
    font-size: 1rem;
    line-height: 1.78;
}

    .article-content section {
        scroll-margin-top: 6rem;
    }

        .article-content section + section {
            margin-top: 2.6rem;
        }

    .article-content h2 {
        margin: 0 0 0.75rem;
        color: #211a2d;
        font-size: clamp(1.4rem, 3vw, 1.75rem);
        line-height: 1.25;
    }

    .article-content h3 {
        margin: 0 0 0.45rem;
        color: #2e2738;
        font-size: 1.08rem;
    }

    .article-content p {
        margin: 0.8rem 0;
    }

    .article-content ul {
        margin: 0.8rem 0;
        padding-left: 1.5rem;
    }

    .article-content li {
        margin: 0.35rem 0;
    }

.key-point,
.warning-point {
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    border-radius: 0.7rem;
}

.key-point {
    border-left: 0.3rem solid #596aca;
    background: #f1f2fc;
}

.warning-point {
    border-left: 0.3rem solid #d98d20;
    background: #fff7e8;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 1.4rem 0;
}

.comparison-card {
    padding: 1rem;
    border: 1px solid #e4e1e9;
    border-radius: 0.75rem;
    background: #faf9fc;
}

    .comparison-card p {
        margin-bottom: 0;
        color: #57515e;
        font-size: 0.94rem;
        line-height: 1.65;
    }

.ruler-table-wrapper {
    width: 100%;
    margin-top: 1.25rem;
    overflow-x: auto;
    border: 1px solid #dedbe4;
    border-radius: 0.75rem;
    margin-bottom: .8rem;
}

.ruler-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.94rem;
}

    .ruler-table th,
    .ruler-table td {
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid #ebe8ef;
        text-align: left;
        white-space: nowrap;
    }

    .ruler-table th {
        color: #fff;
        background: #596aca;
        font-weight: 600;
    }

    .ruler-table tbody tr:last-child td {
        border-bottom: none;
    }

    .ruler-table tbody tr:nth-child(even) {
        background: #faf9fc;
    }

.calculator-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem !important;
    padding: clamp(1.25rem, 4vw, 2rem);
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient( 135deg, #342454, #596aca );
}

    .calculator-cta h2 {
        margin: 0.15rem 0 0.5rem;
        color: #fff;
    }

    .calculator-cta p {
        max-width: 34rem;
        margin: 0;
        color: rgba(255, 255, 255, 0.88);
    }

.cta-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cta-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.7rem 1.1rem;
    border-radius: 0.6rem;
    color: #3d356d;
    background: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.18);
}

    .cta-button:hover {
        background: #f0efff;
    }

.related-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2.6rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid rgba(89, 106, 202, 0.22);
    border-radius: 0.9rem;
    background: #f5f6fd;
}

    .related-guide h2 {
        margin: 0.2rem 0 0.55rem;
        font-size: 1.3rem;
    }

    .related-guide p {
        margin: 0;
    }

.related-guide-label {
    color: #596aca;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.related-guide-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    color: #fff;
    background: #596aca;
    font-weight: 700;
    text-decoration: none;
}

    .related-guide-link:hover {
        background: #4658bd;
    }

    .related-guide-link span {
        transition: transform 150ms ease;
    }

    .related-guide-link:hover span {
        transform: translateX(0.2rem);
    }

#extra {
    margin-top:1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-around;
    align-self: center;
}

@media (max-width: 998px) 
{
    #extra {
        justify-content: unset;
    }
}

@media (max-width: 832px) 
{
    #extra {
        justify-content: space-around;
    }
}

@media (max-width: 701px) 
{
    #extra {
        justify-content: unset;
    }
}

@media (max-width: 425px) 
{
    #extra {
        flex-direction:column;
        width:100%;
    }
}

    @media (max-width: 44rem) {
        .related-guide {
            align-items: stretch;
            flex-direction: column;
            gap: 1rem;
        }

        .related-guide-link {
            justify-content: center;
            text-align: center;
        }
    }

    @media (max-width: 52rem) {
        .article-layout {
            grid-template-columns: 1fr;
        }

        .table-of-contents {
            position: static;
        }

            .table-of-contents nav {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

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

    @media (max-width: 40rem) {
        .article-page {
            padding: 1rem 0.65rem 3rem;
        }

        .article-card {
            padding: 1.15rem;
            border-radius: 0.8rem;
        }

        .table-of-contents nav {
            grid-template-columns: 1fr;
        }

        .calculator-cta {
            align-items: stretch;
            flex-direction: column;
            gap: 1.2rem;
        }

        .cta-button {
            width: 100%;
            box-sizing: border-box;
        }
    }
