:root {
    --sig-white: #F1F8FF;
    --sig-sky: #009EDA;
    --sig-blue: #1588FF;
    --sig-deepblue: #0065D1;
    --sig-navy: #014188;
    --guide-bg: #F4F8FC;
    --guide-card: #FFFFFF;
    --guide-text: #102B45;
    --guide-muted: #667C92;
    --guide-soft: #EAF5FF;
    --guide-line: #D9E8F6;
    --guide-shadow: 0 14px 34px rgba(1, 65, 136, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--guide-bg);
}

.guide-detail-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 76px;
    color: var(--guide-text);
    font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.72;
}

.guide-detail-page *,
.guide-detail-page *::before,
.guide-detail-page *::after {
    box-sizing: border-box;
}

.guide-detail-page a {
    color: inherit;
    text-decoration: none;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 16px;
    padding: 34px;
    border: 1px solid rgba(0, 101, 209, 0.1);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 248, 255, 0.96) 62%, rgba(232, 244, 255, 0.96) 100%);
    box-shadow: var(--guide-shadow);
}

.detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--sig-deepblue);
    font-size: 13px;
    font-weight: 800;
}

.detail-breadcrumb span::before {
    content: "›";
    margin-right: 9px;
    color: #8DBCEB;
}

.detail-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-bottom: 12px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--guide-soft);
    color: var(--sig-deepblue);
    font-size: 13px;
    font-weight: 900;
}

.detail-hero h1 {
    max-width: 670px;
    margin: 0 0 16px;
    color: var(--sig-navy);
    font-size: 38px;
    line-height: 1.22;
    font-weight: 900;
    letter-spacing: 0;
    word-break: keep-all;
}

.detail-hero p {
    max-width: 720px;
    margin: 0;
    color: #526D86;
    font-size: 15px;
    line-height: 1.85;
    word-break: keep-all;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #D7E9FA;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #466784;
    font-size: 13px;
    font-weight: 900;
}

.detail-hero-visual {
    position: relative;
    min-height: 278px;
    margin: 0;
    overflow: hidden;
    border: 1px solid #CFE4F8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(1, 65, 136, 0.06);
}

.detail-hero-visual > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 278px;
    object-fit: cover;
    object-position: 67% center;
}

.detail-hero-visual figcaption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(207, 228, 248, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #31536F;
    font-size: 13px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.detail-hero-visual figcaption img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid rgba(207, 228, 248, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.quick-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.quick-summary article,
.toc-overview,
.detail-section,
.side-card {
    border: 1px solid rgba(0, 101, 209, 0.09);
    border-radius: 8px;
    background: var(--guide-card);
    box-shadow: 0 10px 26px rgba(1, 65, 136, 0.05);
}

.quick-summary article {
    padding: 18px;
}

.quick-summary span,
.toc-heading span,
.section-title span,
.side-title span {
    display: block;
    color: var(--sig-sky);
    font-size: 12px;
    font-weight: 900;
}

.quick-summary strong {
    display: block;
    margin: 6px 0 7px;
    color: #17334F;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: 0;
}

.quick-summary p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 13px;
    line-height: 1.72;
    word-break: keep-all;
}

.toc-overview {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    margin-bottom: 22px;
    padding: 0;
    overflow: hidden;
}

.toc-heading {
    margin: 0;
    padding: 24px;
    border-right: 1px solid #DDECF9;
    background: linear-gradient(180deg, #F7FBFF 0%, #EEF7FF 100%);
}

.toc-heading h2 {
    margin: 5px 0 0;
    color: var(--sig-navy);
    font-size: 24px;
    line-height: 1.3;
    font-weight: 900;
    letter-spacing: 0;
}

.toc-heading p {
    margin: 10px 0 0;
    color: #5A738A;
    font-size: 13px;
    line-height: 1.72;
    font-weight: 800;
    word-break: keep-all;
}

.toc-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
    padding: 14px 24px;
    counter-reset: detail-toc;
    list-style: none;
}

.toc-card-list > li {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid #E7F1FA;
    counter-increment: detail-toc;
}

.toc-card-list > li:last-child {
    border-bottom: 0;
}

.toc-card-list > li::before {
    content: counter(detail-toc);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-top: 1px;
    border-radius: 8px;
    background: #EFF7FF;
    color: var(--sig-deepblue);
    font-size: 13px;
    font-weight: 900;
}

.toc-card-list strong {
    display: block;
    color: #17334F;
    font-size: 15px;
    font-weight: 900;
}

.toc-card-list ul {
    grid-column: 2;
    display: grid;
    gap: 5px;
    margin: -5px 0 0;
    padding: 0;
    list-style: none;
    color: #6C8298;
    font-size: 12px;
    font-weight: 800;
}

.toc-card-list ul a {
    position: relative;
    display: block;
    align-items: center;
    min-height: 0;
    padding: 0 0 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.55;
}

.toc-card-list ul a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9CC9F0;
}

.toc-card-list a:hover,
.toc-card-list a:focus {
    color: var(--sig-deepblue);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.detail-article {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.detail-section {
    scroll-margin-top: 18px;
    padding: 28px;
}

.guide-detail-page [id] {
    scroll-margin-top: 18px;
}

.section-title {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.section-title img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 7px 8px rgba(1, 65, 136, 0.1));
    border: 1px solid rgba(207, 228, 248, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.section-title h2 {
    margin: 4px 0 0;
    color: var(--sig-navy);
    font-size: 25px;
    line-height: 1.32;
    font-weight: 900;
    letter-spacing: 0;
}

.detail-section p {
    margin: 0 0 14px;
    color: #4F667D;
    font-size: 15px;
    line-height: 1.86;
    word-break: keep-all;
}

.detail-section .guide-inline-link,
.comparison-table .guide-inline-link {
    color: var(--sig-deepblue);
    font-weight: 900;
    text-decoration: underline;
    text-decoration-color: rgba(0, 158, 218, 0.34);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.detail-section .guide-inline-link:hover,
.detail-section .guide-inline-link:focus,
.comparison-table .guide-inline-link:hover,
.comparison-table .guide-inline-link:focus {
    color: var(--sig-sky);
    text-decoration-color: currentColor;
}

.detail-section p:last-child {
    margin-bottom: 0;
}

.info-callout,
.check-panel {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #D6E8F8;
    border-radius: 8px;
    background: #F7FBFF;
}

.info-callout strong,
.check-panel strong {
    display: block;
    margin-bottom: 8px;
    color: var(--sig-navy);
    font-size: 17px;
    font-weight: 900;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.icon-grid article {
    padding: 16px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: #fff;
}

.icon-grid img {
    width: 54px;
    height: 54px;
    margin-bottom: 10px;
    object-fit: contain;
    border: 1px solid rgba(207, 228, 248, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.icon-grid strong {
    display: block;
    margin-bottom: 6px;
    color: #17334F;
    font-size: 15px;
    font-weight: 900;
}

.icon-grid p {
    margin: 0;
    font-size: 13px;
    line-height: 1.68;
}

.comparison-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid #DCEBFA;
    border-radius: 8px;
    background: #fff;
}

.comparison-table-wrap,
.market-product-panel,
.extra-products-panel,
.apartment-credit-panel {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #E4EFF9;
    color: #4F667D;
    font-size: 14px;
    line-height: 1.65;
    text-align: left;
    vertical-align: top;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.comparison-table thead th {
    background: #EFF7FF;
    color: var(--sig-navy);
    font-weight: 900;
}

.comparison-table tbody th {
    width: 152px;
    color: var(--sig-deepblue);
    font-weight: 900;
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: 0;
}

.table-loan-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.table-loan-list li {
    position: relative;
    padding-left: 13px;
}

.table-loan-list li::before {
    content: "";
    position: absolute;
    top: 12px;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--sig-sky);
}

.subsection-heading {
    margin: 28px 0 14px;
}

.subsection-heading span,
.apartment-credit-panel span {
    display: block;
    color: var(--sig-sky);
    font-size: 12px;
    font-weight: 900;
}

.subsection-heading h3,
.apartment-credit-panel h3 {
    margin: 4px 0 8px;
    color: var(--sig-navy);
    font-size: 20px;
    line-height: 1.34;
    font-weight: 900;
    letter-spacing: 0;
}

.market-product-panel,
.extra-products-panel,
.apartment-credit-panel,
.process-safety-panel {
    margin-top: 22px;
}

.market-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.market-product-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFDFF 100%);
}

.market-product-card h4 {
    margin: 0;
    color: var(--sig-deepblue);
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: 0;
}

.product-stat-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    min-width: 0;
}

.product-stat-list div {
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: #F2F8FE;
}

.product-stat-list dt {
    margin: 0 0 3px;
    color: #6A8298;
    font-size: 11px;
    font-weight: 900;
}

.product-stat-list dd {
    margin: 0;
    color: #213D56;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 900;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.market-product-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.extra-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.extra-products-grid article {
    padding: 16px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: #fff;
}

.extra-products-grid strong {
    display: block;
    margin-bottom: 7px;
    color: #17334F;
    font-size: 15px;
    font-weight: 900;
}

.extra-products-grid p {
    margin: 0;
    font-size: 13px;
    line-height: 1.72;
}

.apartment-credit-panel,
.process-safety-panel {
    padding: 18px;
    border: 1px solid #D6E8F8;
    border-radius: 8px;
    background: #F7FBFF;
}

.apartment-credit-panel ul,
.process-safety-panel ul {
    display: grid;
    gap: 9px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.apartment-credit-panel li,
.process-safety-panel li {
    position: relative;
    padding-left: 21px;
    color: #5F768C;
    font-size: 14px;
    line-height: 1.72;
    font-weight: 800;
    word-break: keep-all;
}

.apartment-credit-panel li::before,
.process-safety-panel li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 8px;
    height: 8px;
    border: 2px solid var(--sig-sky);
    border-radius: 50%;
    background: #fff;
}

.process-safety-panel strong {
    display: block;
    margin-bottom: 8px;
    color: var(--sig-navy);
    font-size: 17px;
    font-weight: 900;
}

.check-panel ul,
.side-check-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-panel li,
.side-check-list li {
    position: relative;
    padding-left: 18px;
    color: #5F768C;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
}

.check-panel li::before,
.side-check-list li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sig-sky);
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pros-cons-grid h3 {
    margin: 0 0 10px;
    color: var(--sig-navy);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0;
}

.pros-cons-grid > div {
    display: grid;
    align-content: start;
    gap: 10px;
}

.pros-cons-grid article {
    padding: 16px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: #fff;
}

.pros-cons-grid article strong {
    display: block;
    margin-bottom: 6px;
    color: #17334F;
    font-size: 15px;
    font-weight: 900;
}

.pros-cons-grid article p {
    margin: 0;
    font-size: 13px;
    line-height: 1.72;
}

.step-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.step-list li {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: #fff;
}

.step-list li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--sig-deepblue);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.step-list strong {
    display: block;
    margin-bottom: 5px;
    color: #17334F;
    font-size: 16px;
    font-weight: 900;
}

.step-list p {
    margin: 0;
    font-size: 14px;
    line-height: 1.72;
}

.company-recommend-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
}

.company-recommend-grid a {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px 16px;
    align-items: center;
    min-height: 86px;
    padding: 16px 46px 16px 20px;
    border: 1px solid rgba(0, 158, 218, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(0, 101, 209, 0.12) 0%, rgba(241, 248, 255, 0.98) 42%, #FFFFFF 100%);
    box-shadow: 0 12px 28px rgba(1, 65, 136, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.company-recommend-grid a div {
    display: contents;
}

.company-recommend-grid a::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--sig-sky), var(--sig-deepblue), var(--sig-navy));
}

.company-recommend-grid a::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--sig-deepblue);
    border-right: 2px solid var(--sig-deepblue);
    opacity: 0.62;
    transform: translateY(-50%) rotate(45deg);
    transition: right 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.company-trust-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: 52px;
    height: 52px;
    grid-row: 1 / span 2;
    border: 1px solid rgba(0, 158, 218, 0.3);
    border-radius: 16px;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.98) 0 16%, rgba(255, 255, 255, 0) 17%),
        linear-gradient(145deg, #FFFFFF 0%, #EAF6FF 54%, #D5ECFF 100%);
    box-shadow: 0 12px 22px rgba(1, 65, 136, 0.14);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.company-trust-icon::before {
    content: "";
    width: 26px;
    height: 30px;
    border: 3px solid var(--sig-deepblue);
    border-radius: 12px 12px 15px 15px;
    background: linear-gradient(180deg, rgba(0, 158, 218, 0.1), rgba(21, 136, 255, 0.08));
    clip-path: polygon(50% 0, 92% 16%, 86% 67%, 50% 100%, 14% 67%, 8% 16%);
}

.company-trust-icon::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 8px;
    margin-top: 1px;
    border-left: 3px solid var(--sig-sky);
    border-bottom: 3px solid var(--sig-sky);
    transform: rotate(-45deg);
}

.company-recommend-grid strong {
    color: var(--sig-deepblue);
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.company-recommend-grid span {
    color: var(--guide-muted);
    font-size: 13px;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.company-recommend-grid a:hover,
.company-recommend-grid a:focus {
    border-color: rgba(0, 158, 218, 0.48);
    background: linear-gradient(90deg, rgba(0, 158, 218, 0.16) 0%, rgba(241, 248, 255, 0.98) 46%, #FFFFFF 100%);
    box-shadow: 0 18px 34px rgba(1, 65, 136, 0.14);
    outline: none;
    transform: translateY(-1px);
}

.company-recommend-grid a:hover::after,
.company-recommend-grid a:focus::after {
    right: 16px;
    opacity: 1;
    border-color: var(--sig-sky);
}

.company-recommend-grid a:hover .company-trust-icon,
.company-recommend-grid a:focus .company-trust-icon {
    border-color: rgba(0, 158, 218, 0.48);
    box-shadow: 0 16px 28px rgba(1, 65, 136, 0.18);
    transform: scale(1.04);
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-item {
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: #fff;
}

.faq-question {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 16px;
    border: 0;
    background: transparent;
    color: #17334F;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    text-align: left;
}

.faq-question b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #EFF7FF;
    color: var(--sig-deepblue);
    font-size: 20px;
    line-height: 1;
}

.faq-question[aria-expanded="true"] b {
    background: var(--sig-deepblue);
    color: #fff;
}

.faq-answer {
    padding: 0 16px 16px;
}

.faq-answer p {
    margin: 0;
    font-size: 14px;
}

.related-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 0;
    padding: 0;
}

.related-guide-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 118px;
    padding: 16px 16px 16px 18px;
    border: 1px solid #E0EDF9;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFDFF 100%);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.related-guide-card::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 0;
    width: 4px;
    height: 34px;
    border-radius: 0 999px 999px 0;
    background: var(--sig-sky);
}

.related-guide-card:hover,
.related-guide-card:focus {
    border-color: rgba(0, 158, 218, 0.48);
    box-shadow: 0 12px 24px rgba(1, 65, 136, 0.07);
    transform: translateY(-1px);
}

.related-guide-card strong {
    color: var(--sig-deepblue);
    font-size: 15px;
    font-weight: 900;
}

.related-guide-card span {
    color: var(--guide-muted);
    font-size: 13px;
    line-height: 1.68;
    word-break: keep-all;
}

.detail-sidebar {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 18px;
}

.side-card {
    padding: 20px;
}

.side-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.side-title h2 {
    margin: 4px 0 0;
    color: var(--sig-navy);
    font-size: 17px;
    line-height: 1.32;
    font-weight: 900;
    letter-spacing: 0;
}

.toc-side-card nav {
    display: grid;
    gap: 8px;
}

.toc-side-card nav a {
    display: block;
    padding: 9px 10px;
    border-radius: 8px;
    color: #647B92;
    font-size: 13px;
    font-weight: 900;
}

.toc-side-card nav a:hover,
.toc-side-card nav a:focus,
.toc-side-card nav a.is-active {
    background: #EFF7FF;
    color: var(--sig-deepblue);
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.related-links a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #D7E8F8;
    border-radius: 999px;
    background: #F7FBFF;
    color: #466784;
    font-size: 12px;
    font-weight: 900;
}

.related-links a:hover,
.related-links a:focus {
    border-color: var(--sig-deepblue);
    background: var(--sig-deepblue);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 1120px) {
    .detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toc-side-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .guide-detail-page {
        width: min(100% - 22px, 1180px);
        padding-top: 18px;
    }

    .detail-hero {
        padding: 24px 18px;
    }

    .detail-hero h1 {
        font-size: 30px;
    }

    .detail-hero p,
    .detail-section p {
        font-size: 14px;
    }

    .quick-summary,
    .icon-grid,
    .pros-cons-grid,
    .company-recommend-grid,
    .market-product-grid,
    .extra-products-grid,
    .related-guide-grid,
    .detail-sidebar {
        grid-template-columns: 1fr;
    }

    .toc-overview {
        grid-template-columns: 1fr;
    }

    .toc-heading {
        border-right: 0;
        border-bottom: 1px solid #DDECF9;
    }

    .toc-card-list {
        padding: 10px 18px;
    }

    .detail-section,
    .toc-overview {
        padding: 0;
    }

    .detail-section {
        padding: 20px;
    }

    .section-title {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .section-title img {
        width: 50px;
        height: 50px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .comparison-table,
    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table th,
    .comparison-table td {
        display: block;
        width: 100%;
    }

    .comparison-table thead {
        display: none;
    }

    .comparison-table tr {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid #DCEBFA;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 18px rgba(1, 65, 136, 0.04);
    }

    .comparison-table tr:last-child {
        margin-bottom: 0;
    }

    .comparison-table tbody th {
        width: 100%;
        padding: 14px 15px;
        border-bottom: 1px solid #E4EFF9;
        background: #EFF7FF;
    }

    .comparison-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        border-bottom: 0;
    }

    .comparison-table td::before {
        content: attr(data-label);
        color: var(--sig-navy);
        font-weight: 900;
    }

    .company-recommend-grid a {
        grid-template-columns: 58px minmax(0, 1fr);
        min-height: 82px;
    }
}

@media (max-width: 500px) {
    .detail-hero,
    .detail-section,
    .side-card {
        padding: 16px;
    }

    .toc-overview {
        padding: 0;
    }

    .toc-heading {
        padding: 18px;
    }

    .toc-card-list {
        padding: 8px 16px;
    }

    .toc-card-list > li {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
    }

    .toc-card-list > li::before {
        width: 30px;
        height: 30px;
    }

    .detail-hero-visual {
        min-height: 230px;
    }

    .detail-hero-visual > img {
        min-height: 230px;
    }

    .step-list li {
        grid-template-columns: 1fr;
    }

    .comparison-table td {
        grid-template-columns: 1fr;
    }

    .company-recommend-grid a {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 8px 12px;
    }

    .company-trust-icon {
        width: 48px;
        height: 48px;
    }

    .product-stat-list {
        grid-template-columns: 1fr;
    }

    .market-product-card,
    .extra-products-grid article,
    .apartment-credit-panel,
    .process-safety-panel {
        padding: 14px;
    }
}
