:root {
    --kc-blue: var(--ui-brand);
    --kc-blue-dark: #064d84;
    --kc-ink: #172534;
    --kc-muted: #667584;
    --kc-line: #d9e4ed;
    --kc-soft: #f3f7fa;
}

.knowledge-center-page {
    color: var(--kc-ink);
    background: #fff;
}

.knowledge-center-page main { overflow: hidden; }

/* FAQ and knowledge landing pages open directly with their title and tools. */
.kc-page-heading { padding: 32px 0 28px; background: #fff; }
.kc-page-heading-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.kc-page-heading-inner > div { flex: 1; min-width: 0; }
.kc-page-heading h1 { margin: 0; color: var(--ui-ink); font-size: var(--ui-title); line-height: var(--ui-leading-heading); }
.kc-page-heading p { margin: 10px 0 0; color: var(--kc-muted); font-size: var(--ui-body); line-height: var(--ui-leading-body); }
.kc-page-heading .kc-search { flex: 0 1 360px; min-width: 260px; }
.kc-page-heading .kc-search label { color: var(--kc-muted); }
.kc-page-heading .kc-search input { border: 1px solid var(--kc-line); }
.kc-page-heading .kc-search button { background: var(--kc-blue); }
.kc-page-heading .kc-related-links { min-width: 0; }
.kc-page-heading .kc-related-links a { color: var(--kc-blue); border-color: var(--kc-line); }
.kc-page-heading .kc-related-links a:is(.active,:hover) { color: var(--kc-blue-dark); border-color: var(--kc-blue); background: #edf5fc; }
.kc-page-heading + .kc-section { padding-top: 28px; }
@media(max-width:1024px) {
    .kc-page-heading-inner { flex-direction: column; align-items: stretch; gap: 20px; }
    .kc-page-heading .kc-search { flex-basis: auto; min-width: 0; }
}
@media(max-width:768px) {
    .kc-page-heading { padding: 24px 0; }
    .kc-page-heading + .kc-section { padding-top: 24px; }
}

.kc-hero {
    position: relative;
    padding: 74px 0 70px;
    overflow: hidden;
    background: linear-gradient(118deg, #064f88 0%, #0871ba 62%, #2d93ce 100%);
    color: #fff;
}

.kc-hero::after {
    position: absolute;
    right: -110px;
    bottom: -250px;
    width: 600px;
    height: 600px;
    border: 90px solid rgba(255,255,255,.07);
    border-radius: 50%;
    content: "";
}

.kc-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
}

.kc-eyebrow,
.kc-section-heading span,
.kc-compact-title > div > span,
.kc-detail-card header > span {
    display: block;
    margin-bottom: 12px;
    color: #79c7fa;
    font-size:var(--ui-small);
    font-weight:var(--ui-weight-body);
    letter-spacing: .18em;
}

.kc-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(36px, 4.2vw, 56px);
    font-weight: 700;
    line-height: 1.15;
}

.kc-hero p {
    max-width: 680px;
    margin: 20px 0 0;
    color: rgba(255,255,255,.84);
    font-size: 18px;
    line-height: 1.8;
}

.kc-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: max-content;
}

.kc-related-links a {
    padding: 11px 18px;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 4px;
    color: #fff;
    font-size:var(--ui-body);
    transition: background .2s ease, border-color .2s ease;
}

.kc-related-links a:hover,
.kc-related-links a.active { border-color: #fff; background: #fff; color: var(--kc-blue-dark); }

.kc-section { padding:var(--ui-space) 0; }
.kc-section + .kc-section { padding-top: 0; }

.kc-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 30px;
}

.kc-section-heading span,
.kc-compact-title > div > span,
.kc-detail-card header > span { color: var(--kc-blue); }
.kc-section-heading span { margin-bottom: 7px; font-size:var(--ui-small); }
.kc-section-heading h2 { margin: 0; color: var(--kc-ink); font-size:var(--ui-section); line-height:var(--ui-leading-heading); }
.kc-section-heading > p { margin: 0; color: var(--kc-muted); font-size:var(--ui-body); }

.kc-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.kc-filter a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid #cfdae4;
    border-radius: 5px;
    background: #fff;
    color: #405365;
    font-size:var(--ui-body);
    transition: .2s ease;
}
.kc-filter a:hover,
.kc-filter a.active { border-color: var(--kc-blue); background: var(--kc-blue); color: #fff; }
.kc-filter small { margin-left: 7px; font-size:var(--ui-small); opacity: .75; }

.faq-list { border-top: 1px solid var(--kc-line); }
.faq-item { border-bottom: 1px solid var(--kc-line); background: #fff; }
.faq-item summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 88px;
    padding: 20px 62px 20px 12px;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary strong { color: var(--kc-ink); font-size:var(--ui-card); font-weight:var(--ui-weight-card); line-height:var(--ui-leading-card); }
.faq-question-mark,
.faq-answer > span {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #e8f3fb;
    color: var(--kc-blue);
    font-weight:var(--ui-weight-body);
}
.faq-item summary i,
.faq-item summary i::after {
    position: absolute;
    right: 22px;
    width: 16px;
    height: 2px;
    background: var(--kc-blue);
    content: "";
    transition: transform .2s ease;
}
.faq-item summary i::after { top: 0; right: 0; transform: rotate(90deg); }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-item[open] summary { background: #f8fbfd; }
.faq-answer {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 18px;
    padding: 0 62px 28px 12px;
    background: #f8fbfd;
}
.faq-answer > span { background: var(--kc-blue); color: #fff; }

.kc-richtext { color: #4f6070; font-size:var(--ui-body); line-height:var(--ui-leading-body); }
.kc-richtext p, .kc-richtext div { margin: 0 0 1em; }
.kc-richtext > :last-child { margin-bottom: 0; }
.kc-richtext img { display: block; max-width: 100%; height: auto; margin: 26px auto; }
.kc-richtext ul, .kc-richtext ol { padding-left: 1.5em; }
.kc-richtext a { color: var(--kc-blue); text-decoration: underline; }

.kc-search { width: min(440px, 100%); }
.kc-search label { display: block; margin-bottom: 10px; color: rgba(255,255,255,.78); font-size:var(--ui-small); }
.kc-search > div { display: grid; grid-template-columns: 1fr auto; }
.kc-search input,
.kc-inline-search input {
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 5px 0 0 5px;
    background: #fff;
    color: var(--kc-ink);
    font-size:var(--ui-control);
    outline: none;
}
.kc-search button,
.kc-inline-search button {
    height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 0 5px 5px 0;
    background: #103b5c;
    color: #fff;
    font-size:var(--ui-control);
    font-weight:var(--ui-weight-control);
    cursor: pointer;
}
.kc-category-section { background: var(--kc-soft); }
.kc-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap:var(--ui-gap); }
.kc-category-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid #dbe5ec;
    border-radius:var(--ui-radius);
    background: #fff;
    color: var(--kc-ink);
    transition: transform .25s ease, box-shadow .25s ease;
}
.kc-category-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(31,69,96,.10); }
.kc-category-card .photo { display: grid; overflow: hidden; place-items: center; background: #e9f0f4; }
.kc-category-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.kc-category-card:hover .photo img { transform: scale(1.04); }
.kc-category-card .photo span { color: #9cb1c0; font-size:var(--ui-section); font-weight:var(--ui-weight-heading); }
.kc-category-card > div:last-child { align-self: center; padding: 24px 22px; }
.kc-category-card h2{ margin: 0 0 10px;   }
.kc-category-card p { margin: 0 0 22px; color: var(--kc-muted); font-size:var(--ui-small); }
.kc-category-card em { color: var(--kc-blue); font-size:var(--ui-small); font-style: normal; font-weight:var(--ui-weight-body); }
.kc-category-card em b { margin-left: 7px; transition: margin .2s ease; }
.kc-category-card:hover em b { margin-left: 12px; }

.kc-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap:var(--ui-gap); }
.kc-article-card { overflow: hidden; border: 1px solid #dce5ec; border-radius:var(--ui-radius); background: #fff; }
.kc-article-card .photo { display: grid; height: 220px; overflow: hidden; place-items: center; background: linear-gradient(135deg,#e8f2f8,#f6f9fb); }
.kc-article-card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.kc-article-card:hover .photo img { transform: scale(1.04); }
.kc-article-card .photo span { color: #86a5b9; font-size:var(--ui-small); font-weight:var(--ui-weight-body); letter-spacing: .18em; }
.kc-article-card .content { padding: 24px; }
.kc-article-card .content > p { margin: 0 0 10px; color: var(--kc-blue); font-size:var(--ui-small); }
.kc-article-card h2,.kc-article-card h3{ min-height: 3em; margin: 0 0 24px;   }
.kc-article-card h2 a,
.kc-article-card h3 a { color: var(--kc-ink); }
.kc-article-card .more { color: var(--kc-blue); font-size:var(--ui-control); font-weight:var(--ui-weight-control); }
.kc-article-card .more span { margin-left: 5px; }
.kc-clear { color: var(--kc-blue); font-size:var(--ui-small); }

.kc-empty { padding: 64px 28px; border: 1px dashed #cbd9e4; border-radius: 10px; background: #f8fbfd; text-align: center; }
.kc-empty strong { display: block; color: var(--kc-ink); font-size:var(--ui-card); }
.kc-empty p { margin: 12px 0 0; color: var(--kc-muted); line-height:var(--ui-leading-body); }
.kc-empty a { display: inline-block; margin-top: 22px; padding: 10px 20px; border-radius: 4px; background: var(--kc-blue); color: #fff; }

.kc-compact-hero { padding: 34px 0 46px; background: linear-gradient(180deg,#f4f8fb,#fff); border-bottom: 1px solid #e5edf2; }
.kc-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 36px; color: #7a8791; font-size:var(--ui-small); }
.kc-breadcrumb a { color: #5c6d7b; }
.kc-breadcrumb em { font-style: normal; }
.kc-compact-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.kc-compact-title h1 { margin: 0; color: var(--kc-ink); font-size:var(--ui-title); }
.kc-compact-title p { margin: 14px 0 0; color: var(--kc-muted); font-size:var(--ui-body); }
.kc-compact-title > strong { color: var(--kc-blue); font-size:var(--ui-section); }
.kc-compact-title > strong small { color: var(--kc-muted); font-size:var(--ui-small); font-weight:var(--ui-weight-body); }
.kc-list-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.kc-list-tools .kc-filter { margin-bottom: 0; }
.kc-inline-search { display: grid; flex: 0 0 330px; grid-template-columns: 1fr auto; }
.kc-inline-search input { height: 44px; border: 1px solid #cfdae4; }
.kc-inline-search button { height: 44px; padding: 0 18px; background: var(--kc-blue); }
.kc-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.kc-pagination a, .kc-pagination span { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #d2dee7; border-radius: 4px; color: #526575; }
.kc-pagination span { border-color: var(--kc-blue); background: var(--kc-blue); color: #fff; }

.kc-detail-main { padding: 34px 0 80px; background: #f5f8fa; }
.kc-detail-card { width: min(920px,100%); margin: 0 auto; padding: 54px 70px 70px; border-radius:var(--ui-radius); background: #fff; box-shadow: 0 12px 38px rgba(32,61,80,.07); }
.kc-detail-card header { padding-bottom: 30px; border-bottom: 1px solid var(--kc-line); text-align: center; }
.kc-detail-card header h1 { margin: 0; color: var(--kc-ink); font-size:var(--ui-title); line-height:var(--ui-leading-heading); }
.kc-detail-card header p { margin: 14px 0 0; color: var(--kc-muted); font-size:var(--ui-small); }
.kc-detail-cover { display: block; max-width: 100%; height: auto; margin: 38px auto; border-radius: 8px; }
.kc-detail-content { padding-top: 38px; color: #3e4f5c; font-size:var(--ui-body); }
.kc-article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; width: min(920px,100%); margin: 24px auto 0; }
.kc-article-nav div { padding: 20px 22px; border-radius: 7px; background: #fff; }
.kc-article-nav div:last-child { text-align: right; }
.kc-article-nav small { display: block; margin-bottom: 5px; color: #83909a; }
.kc-article-nav a { color: var(--kc-ink); font-weight:var(--ui-weight-control); }
.kc-article-nav span { color: #89949c; }
.kc-back { display: block; width: min(920px,100%); margin: 24px auto 0; color: var(--kc-blue); }

@media (max-width: 1024px) {
    .kc-category-grid, .kc-article-grid { grid-template-columns: repeat(2, 1fr); }
    .kc-hero-inner { align-items: flex-start; flex-direction: column; gap: 34px; }
    .kc-list-tools { flex-direction: column; }
    .kc-inline-search { width: min(440px,100%); flex-basis: auto; }
}

@media (max-width: 768px) {
    .kc-hero { padding: 48px 0; }
    .kc-hero p { font-size: 16px; }
    .kc-related-links { min-width: 0; }
    .kc-related-links a { padding: 9px 12px; font-size:var(--ui-small); }
    .kc-section { padding:var(--ui-space) 0; }
    .kc-section-heading { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 22px; }
    .kc-category-grid, .kc-article-grid { grid-template-columns: 1fr; }
    .kc-category-card { grid-template-columns: 120px 1fr; min-height: 160px; }
    .kc-category-card > div:last-child { padding: 18px; }
    .kc-category-card p { margin-bottom: 14px; }
    .faq-item summary { min-height: 76px; padding: 16px 46px 16px 4px; gap: 12px; }
    .faq-item summary strong { font-size:var(--ui-card); }
    .faq-item summary i { right: 12px; }
    .faq-answer { grid-template-columns: 30px 1fr; gap: 12px; padding: 0 12px 24px 4px; }
    .faq-question-mark, .faq-answer > span { width: 30px; height: 30px; flex-basis: 30px; }
    .kc-compact-title { align-items: flex-start; flex-direction: column; }
    .kc-compact-title > strong { font-size:var(--ui-card); }
    .kc-detail-card { padding: 36px 22px 44px; }
    .kc-detail-content { padding-top: 28px; font-size:var(--ui-body); }
    .kc-article-nav { grid-template-columns: 1fr; gap: 12px; }
    .kc-article-nav div:last-child { text-align: left; }
}

@media (max-width: 480px) {
    .kc-category-card { grid-template-columns: 100px 1fr; }
    .kc-search > div, .kc-inline-search { grid-template-columns: 1fr 74px; }
    .kc-search button, .kc-inline-search button { padding: 0 12px; }
    .kc-article-card .photo { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
    .kc-category-card, .kc-category-card img, .kc-article-card img { transition: none; }
}
