:root {
    --knowledge-navy: #17213f;
    --knowledge-navy-soft: #253052;
    --knowledge-teal: #2a9d8f;
    --knowledge-teal-dark: #1f7a6f;
    --knowledge-ink: #17213f;
    --knowledge-body: #5f6675;
    --knowledge-muted: #7b8494;
    --knowledge-border: #dfe5eb;
    --knowledge-soft: #f6f8fa;
    --knowledge-white: #fff;
    --knowledge-container: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.knowledge-body {
    margin: 0;
    overflow-x: hidden;
    background: var(--knowledge-soft);
    color: var(--knowledge-body);
    font-family:
        "Noto Sans JP",
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        sans-serif;
    letter-spacing: normal;
    line-height: 1.8;
}

body.knowledge-body a {
    color: inherit;
}

body.knowledge-body button,
body.knowledge-body input {
    font: inherit;
}

.knowledge-container {
    width: min(var(--knowledge-container), calc(100% - 48px));
    margin: 0 auto;
}

.knowledge-hero {
    background: var(--knowledge-navy);
    color: var(--knowledge-white);
}

.knowledge-hero__inner {
    width: min(1360px, 100%);
    padding: 26px 50px 78px;
}

.knowledge-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 48px;
    color: #d6dce8;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.75;
}

.knowledge-hero__breadcrumb a,
.knowledge-hero__breadcrumb span {
    display: inline-flex;
    align-items: center;
}

.knowledge-hero__breadcrumb-home {
    width: 20px;
    height: 20px;
    color: var(--knowledge-white);
}

.knowledge-hero__breadcrumb-home svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.knowledge-hero__breadcrumb-separator {
    color: #94a3b8;
    font-size: 17px;
    line-height: 1;
}

.knowledge-hero h1 {
    max-width: 780px;
    margin: 0 auto;
    color: var(--knowledge-white);
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-align: center;
}

.knowledge-hero p {
    max-width: 720px;
    margin: 24px auto 0;
    color: #d6dce8;
    font-size: 16px;
    line-height: 2;
    text-align: center;
}

.knowledge-search-section {
    padding: 38px 0 42px;
    border-bottom: 1px solid var(--knowledge-border);
    background: var(--knowledge-white);
}

.knowledge-search-section__heading {
    margin-bottom: 18px;
}

.knowledge-search-section__heading h2 {
    margin: 0;
    color: var(--knowledge-ink);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.knowledge-main {
    padding-bottom: 96px;
}

.knowledge-section {
    padding-top: 82px;
}

.knowledge-section__heading {
    display: block;
    margin-bottom: 30px;
}

.knowledge-section__heading h2 {
    margin: 0;
    color: var(--knowledge-ink);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.knowledge-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 52px 36px;
}

.knowledge-article-card {
    min-width: 0;
}

.knowledge-article-card[hidden] {
    display: none;
}

.knowledge-article-card__link {
    display: block;
    height: 100%;
    text-decoration: none;
}

.knowledge-article-card__media {
    aspect-ratio: 1.9 / 1;
    overflow: hidden;
    background: #eef1f3;
}

.knowledge-article-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.knowledge-article-card__link:hover .knowledge-article-card__media img,
.knowledge-article-card__link:focus-visible .knowledge-article-card__media img {
    transform: scale(1.025);
}

.knowledge-article-card__body {
    padding-top: 17px;
}

.knowledge-article-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--knowledge-muted);
    font-size: 12px;
    line-height: 1.6;
}

.knowledge-article-card__category {
    color: var(--knowledge-teal-dark);
    font-weight: 700;
}

.knowledge-article-card__date {
    white-space: nowrap;
}

.knowledge-article-card h3 {
    margin: 0;
    color: var(--knowledge-ink);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.knowledge-article-card p {
    margin: 10px 0 0;
    color: var(--knowledge-body);
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.knowledge-article-card__link:focus-visible {
    outline: 3px solid rgba(42, 157, 143, 0.42);
    outline-offset: 7px;
}

.knowledge-themes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--knowledge-border);
    border-bottom: 1px solid var(--knowledge-border);
}

.knowledge-theme-link {
    display: flex;
    min-height: 126px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px;
    border-right: 1px solid var(--knowledge-border);
    color: var(--knowledge-ink);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 160ms ease,
        color 160ms ease;
}

.knowledge-theme-link:last-child {
    border-right: 0;
}

.knowledge-theme-link::after {
    color: var(--knowledge-teal);
    content: "→";
    font-family:
        "Noto Sans JP",
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        sans-serif;
    font-size: 20px;
    font-weight: 400;
}

.knowledge-theme-link:hover,
.knowledge-theme-link:focus-visible {
    background: var(--knowledge-white);
    color: var(--knowledge-teal-dark);
}

.knowledge-filter-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.knowledge-search-label,
.knowledge-filter-label {
    display: block;
    margin-bottom: 9px;
    color: var(--knowledge-ink);
    font-size: 12px;
    font-weight: 700;
}

.knowledge-search-box {
    display: flex;
    overflow: hidden;
    border: 1px solid #bac5d0;
    border-radius: 4px;
    background: var(--knowledge-white);
}

.knowledge-search-box input {
    min-width: 0;
    flex: 1;
    padding: 13px 14px;
    border: 0;
    outline: 0;
    color: var(--knowledge-ink);
    font-size: 14px;
}

.knowledge-search-box input::placeholder {
    color: #9aa5b3;
}

.knowledge-search-box:focus-within {
    border-color: var(--knowledge-teal);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.14);
}

.knowledge-search-box button {
    min-width: 82px;
    border: 0;
    background: var(--knowledge-navy);
    color: var(--knowledge-white);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.knowledge-filter-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.knowledge-filter-button {
    padding: 8px 13px;
    border: 1px solid #bac5d0;
    border-radius: 999px;
    background: transparent;
    color: var(--knowledge-body);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.knowledge-filter-button:hover,
.knowledge-filter-button:focus-visible,
.knowledge-filter-button.is-active {
    border-color: var(--knowledge-navy);
    background: var(--knowledge-navy);
    color: var(--knowledge-white);
}

.knowledge-results-status {
    margin: 0 0 28px;
    color: var(--knowledge-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.knowledge-empty-state {
    grid-column: 1 / -1;
    padding: 42px 24px;
    border-top: 1px solid var(--knowledge-border);
    border-bottom: 1px solid var(--knowledge-border);
    color: var(--knowledge-muted);
    text-align: center;
}

.knowledge-reading-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--knowledge-border);
    border-bottom: 1px solid var(--knowledge-border);
}

.knowledge-guide-link {
    display: block;
    min-height: 180px;
    padding: 26px 28px;
    border-right: 1px solid var(--knowledge-border);
    color: var(--knowledge-ink);
    text-decoration: none;
    transition: background 160ms ease;
}

.knowledge-guide-link:last-child {
    border-right: 0;
}

.knowledge-guide-link:hover,
.knowledge-guide-link:focus-visible {
    background: var(--knowledge-white);
}

.knowledge-guide-link__number {
    display: block;
    margin-bottom: 28px;
    color: var(--knowledge-teal);
    font-family:
        "Noto Sans JP",
        -apple-system,
        BlinkMacSystemFont,
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.knowledge-guide-link h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.7;
}

.knowledge-guide-link p {
    margin: 10px 0 0;
    color: var(--knowledge-muted);
    font-size: 13px;
    line-height: 1.8;
}

.knowledge-cta {
    margin-top: 88px;
    padding: 44px 48px;
    background: var(--knowledge-navy);
    color: var(--knowledge-white);
}

.knowledge-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
}

.knowledge-cta h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.6;
}

.knowledge-cta p {
    max-width: 620px;
    margin: 10px 0 0;
    color: #d6dce8;
    font-size: 14px;
    line-height: 1.9;
}

.knowledge-cta__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.knowledge-cta__actions a {
    padding: 12px 17px;
    border: 1px solid var(--knowledge-teal);
    border-radius: 4px;
    background: var(--knowledge-teal);
    color: var(--knowledge-white);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.knowledge-cta__actions a:last-child {
    border-color: rgba(255, 255, 255, 0.58);
    background: transparent;
}

.knowledge-cta__actions a:hover,
.knowledge-cta__actions a:focus-visible {
    background: var(--knowledge-teal-dark);
}

.knowledge-cta__actions a:last-child:hover,
.knowledge-cta__actions a:last-child:focus-visible {
    border-color: var(--knowledge-white);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1024px) {
    .knowledge-hero__inner {
        width: 100%;
        padding-inline: 25px;
    }
}

@media (max-width: 1000px) {
    .knowledge-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px 28px;
    }

    .knowledge-themes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .knowledge-theme-link:nth-child(2) {
        border-right: 0;
    }

    .knowledge-theme-link:nth-child(-n + 2) {
        border-bottom: 1px solid var(--knowledge-border);
    }

    .knowledge-reading-guide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .knowledge-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .knowledge-container {
        width: min(100% - 32px, var(--knowledge-container));
    }

    .knowledge-hero__inner {
        width: 100%;
        padding: 20px 16px 54px;
    }

    .knowledge-hero__breadcrumb {
        margin-bottom: 36px;
    }

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

    .knowledge-hero p {
        font-size: 14px;
    }

    .knowledge-search-section {
        padding: 32px 0 36px;
    }

    .knowledge-search-section__heading h2 {
        font-size: 22px;
    }

    .knowledge-section {
        padding-top: 60px;
    }

    .knowledge-section__heading {
        margin-bottom: 22px;
    }

    .knowledge-section__heading h2 {
        font-size: 25px;
    }

    .knowledge-article-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .knowledge-themes {
        grid-template-columns: 1fr;
    }

    .knowledge-theme-link,
    .knowledge-theme-link:nth-child(2) {
        min-height: 78px;
        border-right: 0;
        border-bottom: 1px solid var(--knowledge-border);
    }

    .knowledge-theme-link:last-child {
        border-bottom: 0;
    }

    .knowledge-filter-panel {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .knowledge-filter-list {
        justify-content: flex-start;
    }

    .knowledge-reading-guide {
        grid-template-columns: 1fr;
    }

    .knowledge-guide-link,
    .knowledge-guide-link:last-child {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--knowledge-border);
    }

    .knowledge-guide-link:last-child {
        border-bottom: 0;
    }

    .knowledge-cta {
        margin-top: 60px;
        padding: 32px 24px;
    }

    .knowledge-cta h2 {
        font-size: 21px;
    }

    .knowledge-cta__actions {
        width: 100%;
    }

    .knowledge-cta__actions a {
        flex: 1 1 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .knowledge-article-card__media img,
    .knowledge-theme-link,
    .knowledge-guide-link,
    .knowledge-cta__actions a {
        transition: none;
    }
}
