/* This stylesheet is loaded only by knowledgebasecat.tpl. The shared
   Knowledgebase shell still declares a two-column grid even when its sidebar
   is not rendered; collapse that empty track before styling the page. */
body.gm-knowledgebase-page #main-body.gm-kb-main-body,
body.gm-knowledgebase-page #main-body.gm-kb-main-body > .gm-kb-shell,
body.gm-knowledgebase-page .gm-kb-shell > .gm-kb-layout,
body.gm-knowledgebase-page .gm-kb-primary-content.gm-kb-primary-content--full {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.gm-knowledgebase-page .gm-kb-shell > .gm-kb-layout {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
}
body.gm-knowledgebase-page .gm-kb-primary-content.gm-kb-primary-content--full {
    min-width: 0 !important;
    grid-column: 1 / -1 !important;
}

body.gm-knowledgebase-page .gm-kb-primary-content > .ghkb-page.ghkbc-page {
    --ghkbc-navy: #0c2345;
    --ghkbc-navy-2: #173860;
    --ghkbc-orange: #ff7200;
    --ghkbc-text: #10233f;
    --ghkbc-muted: #52657f;
    --ghkbc-border: #dce5f0;
    width: 85% !important;
    max-width: 1760px !important;
    margin: 0 auto !important;
    padding: 22px 0 10px !important;
    color: var(--ghkbc-text) !important;
    font-family: var(--gh-font-family, 'Grabby Lato', 'Segoe UI', Arial, sans-serif) !important;
    font-size: var(--gh-type-body, 1.0625rem) !important;
    line-height: var(--gh-reading-leading, 1.65) !important;
}

.ghkbc-page, .ghkbc-page * { box-sizing: border-box; }
.ghkbc-page h1, .ghkbc-page h2, .ghkbc-page h3 {
    font-family: var(--gh-font-heading, 'Grabby Poppins', 'Segoe UI', Arial, sans-serif);
}
.ghkbc-page a { text-decoration: none; }

body.grabby-modern-page .ghkbc-page :is(
    .ghkbc-hero h1,
    .ghkbc-panel h2,
    .ghkbc-article__content strong,
    .ghkbc-subcategory__content strong,
    .ghkbc-summary strong,
    .ghkbc-support h2
) {
    font-family: var(--gh-font-heading, 'Grabby Poppins', 'Segoe UI', Arial, sans-serif) !important;
    font-weight: 600 !important;
}

body.grabby-modern-page .ghkbc-page :is(
    p, a, button, input, select, label, small, span
) {
    font-family: var(--gh-font-family, 'Grabby Lato', 'Segoe UI', Arial, sans-serif);
}

.ghkbc-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 32%);
    align-items: stretch;
    gap: 18px;
    margin-bottom: 18px;
}

.ghkbc-hero {
    position: relative;
    display: flex;
    min-height: 230px;
    align-items: center;
    overflow: hidden;
    padding: 22px 50px;
    color: #fff;
    background:
        radial-gradient(circle at 96% 4%, rgba(255, 114, 0, .26) 0 82px, transparent 83px),
        radial-gradient(circle at 90% 56%, rgba(255, 255, 255, .07) 0 70px, transparent 71px),
        linear-gradient(135deg, #10284b 0%, #173963 62%, #112b50 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(16, 35, 63, .13);
}
.ghkbc-hero__note {
    position: absolute;
    z-index: 1;
    right: 52px;
    top: 42px;
    color: rgba(255, 255, 255, .86);
    font-family: var(--gh-font-family, 'Grabby Lato', 'Segoe UI', Arial, sans-serif);
    font-size: var(--gh-type-small, 1rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transform: rotate(-7deg);
}
.ghkbc-hero::after {
    position: absolute;
    right: 60px;
    bottom: 35px;
    width: 82px;
    height: 4px;
    content: '';
    background: var(--ghkbc-orange);
    border-radius: 99px;
    transform: rotate(-14deg);
}
.ghkbc-hero__content { position: relative; z-index: 1; width: min(100%, 760px); }
.ghkbc-eyebrow, .ghkbc-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ghkbc-orange);
    font-size: var(--gh-type-label, .875rem);
    font-weight: var(--gh-weight-label, 600);
    line-height: 1.3;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ghkbc-hero h1 {
    margin: 9px 0 3px !important;
    color: #fff !important;
    font-size: clamp(2.25rem, 2.05rem + .8vw, 2.75rem) !important;
    font-weight: 600 !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em !important;
}
.ghkbc-hero p {
    max-width: 700px;
    margin: 0 !important;
    color: #d9e4f1 !important;
    font-size: var(--gh-type-body, 1.0625rem) !important;
    line-height: var(--gh-reading-leading, 1.65) !important;
}

.ghkbc-search {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 132px;
    min-height: 56px;
    margin-top: 20px;
    overflow: hidden;
    background: #fff;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 11px;
    box-shadow: 0 9px 25px rgba(1, 15, 35, .18);
}
.ghkbc-search__icon { align-self: center; justify-self: center; color: #71829a; font-size: 17px; }
.ghkbc-search input.form-control {
    width: 100% !important;
    height: 52px !important;
    padding: 0 10px !important;
    color: var(--ghkbc-text) !important;
    background: #fff !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: var(--gh-font-family, 'Grabby Lato', 'Segoe UI', Arial, sans-serif) !important;
    font-size: var(--gh-type-small, 1rem) !important;
}
.ghkbc-search__button.btn {
    min-height: 52px !important;
    margin: 0 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #ff820f, #ff6500) !important;
    border: 0 !important;
    border-radius: 0 8px 8px 0 !important;
    font-size: var(--gh-type-small, 1rem) !important;
    font-weight: 700 !important;
}

.ghkbc-quick {
    min-height: 230px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--ghkbc-border);
    border-radius: 16px;
    box-shadow: 0 13px 35px rgba(16, 35, 63, .07);
}
.ghkbc-account {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 18px;
    min-height: 36px;
    align-items: center;
    gap: 8px;
    margin: 7px 0 8px;
    padding: 7px 11px;
    color: #30445f !important;
    background: #f7f9fc;
    border: 1px solid var(--ghkbc-border);
    border-radius: 9px;
    font-size: var(--gh-type-small, 1rem);
    font-weight: 700;
}
.ghkbc-account > i:last-child { justify-self: end; }
.ghkbc-quick__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ghkbc-quick-link {
    display: grid;
    grid-template-columns: 37px minmax(0, 1fr);
    min-height: 58px;
    align-items: center;
    gap: 9px;
    padding: 6px 9px;
    color: var(--ghkbc-text) !important;
    background: #fff;
    border: 1px solid var(--ghkbc-border);
    border-radius: 10px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ghkbc-quick-link__icon {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    color: var(--ghkbc-orange);
    background: #fff1e7;
    border-radius: 50%;
    font-size: 16px;
}
.ghkbc-quick-link strong, .ghkbc-quick-link small { display: block; }
.ghkbc-quick-link strong { color: var(--ghkbc-text); font-size: var(--gh-type-small, 1rem); font-weight: 600; line-height: 1.35; }
.ghkbc-quick-link small { margin-top: 2px; color: var(--ghkbc-muted); font-size: var(--gh-type-meta, .9375rem); line-height: 1.4; }

.ghkbc-summary {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(170px, .72fr));
    min-height: 92px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 26px;
    background: #fff;
    border: 1px solid var(--ghkbc-border);
    border-radius: 15px;
    box-shadow: 0 9px 27px rgba(16, 35, 63, .045);
}
.ghkbc-summary--two { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(170px, .72fr)); }
.ghkbc-summary__about, .ghkbc-summary__stat { display: flex; min-width: 0; align-items: center; gap: 15px; }
.ghkbc-summary__stat { min-height: 58px; padding-left: 28px; border-left: 1px solid var(--ghkbc-border); }
.ghkbc-summary__icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 50%;
    font-size: 21px;
}
.ghkbc-summary__icon--green { color: #0aa858; background: #def9e9; }
.ghkbc-summary__icon--purple { color: #7134ed; background: #eee7ff; }
.ghkbc-summary__icon--blue { color: #1976d2; background: #e4f1ff; }
.ghkbc-summary__icon--orange { color: #f97316; background: #fff0e4; }
.ghkbc-summary strong, .ghkbc-summary small { display: block; }
.ghkbc-summary strong { color: var(--ghkbc-text); font-size: var(--gh-type-small, 1rem); line-height: 1.35; }
.ghkbc-summary__stat strong { font-size: var(--gh-type-body, 1.0625rem); }
.ghkbc-summary small { margin-top: 2px; color: var(--ghkbc-muted); font-size: var(--gh-type-meta, .9375rem); line-height: 1.45; }

body.gm-knowledgebase-page .ghkbc-page > .ghkbc-panel {
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 17px 20px 19px !important;
    background: #fff !important;
    border: 1px solid var(--ghkbc-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 32px rgba(16, 35, 63, .055) !important;
}
.ghkbc-panel__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.ghkbc-panel__header h2 {
    margin: 3px 0 0 !important;
    color: var(--ghkbc-text) !important;
    font-size: clamp(1.375rem, 1.25rem + .4vw, 1.75rem) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
}
.ghkbc-panel__eyebrow { font-size: var(--gh-type-label, .875rem); }
.ghkbc-sort {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 14px;
    min-width: 158px;
    height: 40px;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    color: #38506c;
    background: #fff;
    border: 1px solid #ccd8e6;
    border-radius: 9px;
}
.ghkbc-sort select { width: 100%; color: #38506c; background: transparent; border: 0; outline: 0; font-family: var(--gh-font-family, 'Grabby Lato', 'Segoe UI', Arial, sans-serif); font-size: var(--gh-type-label, .875rem); font-weight: 600; appearance: none; }

.ghkbc-article-list, .ghkbc-subcategory-grid { display: grid; gap: 6px; }
.ghkbc-subcategory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ghkbc-article, .ghkbc-subcategory { position: relative; min-width: 0; }
.ghkbc-article > a, .ghkbc-subcategory > a {
    display: grid;
    min-width: 0;
    align-items: center;
    color: var(--ghkbc-text) !important;
    background: #fff;
    border: 1px solid var(--ghkbc-border);
    border-radius: 11px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ghkbc-article > a { grid-template-columns: 48px minmax(0, 1fr) 18px; min-height: 68px; gap: 14px; padding: 8px 14px 8px 8px; }
.ghkbc-subcategory > a { grid-template-columns: 44px minmax(0, 1fr) auto 18px; min-height: 72px; gap: 12px; padding: 9px 13px 9px 9px; }
.ghkbc-article__icon, .ghkbc-subcategory__icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--ghkbc-orange);
    background: #fff0e6;
    border-radius: 11px;
    font-size: 17px;
}
.ghkbc-subcategory__icon { color: #245fbe; background: #eaf2ff; }
.ghkbc-article__content, .ghkbc-subcategory__content { min-width: 0; }
.ghkbc-article__content strong, .ghkbc-article__content small, .ghkbc-subcategory__content strong, .ghkbc-subcategory__content small { display: block; }
.ghkbc-article__content strong, .ghkbc-subcategory__content strong { color: var(--ghkbc-text); font-size: var(--gh-type-card-title, 1.125rem); font-weight: 600; line-height: 1.35; }
.ghkbc-article__content small, .ghkbc-subcategory__content small { overflow: hidden; margin-top: 2px; color: var(--ghkbc-muted); font-size: var(--gh-type-meta, .9375rem); line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.ghkbc-subcategory__count { color: var(--ghkbc-muted); font-size: var(--gh-type-label, .875rem); white-space: nowrap; }
.ghkbc-row-arrow { justify-self: end; color: #607895; font-size: 13px; }
.ghkbc-edit.btn { position: absolute; z-index: 2; top: 50%; right: 38px; min-height: 34px; padding: 6px 9px; transform: translateY(-50%); background: #fff !important; border: 1px solid #ccd8e6 !important; border-radius: 8px !important; }
.ghkbc-empty { padding: 35px 20px; text-align: center; }
.ghkbc-empty .ghkbc-article__icon { margin: 0 auto 12px; }
.ghkbc-empty h2 { color: var(--ghkbc-text) !important; font-size: 20px !important; }

body.gm-knowledgebase-page .ghkbc-page > .ghkbc-support {
    display: grid !important;
    grid-template-columns: 58px minmax(0, 1fr) auto !important;
    min-height: 86px !important;
    align-items: center !important;
    gap: 18px !important;
    margin: 0 !important;
    padding: 13px 18px !important;
    color: var(--ghkbc-text) !important;
    background: linear-gradient(100deg, #fff5ed, #fff) !important;
    border: 1px solid #ffd6b7 !important;
    border-radius: 15px !important;
    box-shadow: 0 9px 27px rgba(16, 35, 63, .04) !important;
}
.ghkbc-support__icon { display: grid; width: 58px; height: 58px; place-items: center; color: #fff; background: linear-gradient(135deg, #ff8a22, #ff5b00); border-radius: 14px; font-size: 22px; box-shadow: 0 8px 20px rgba(255, 104, 0, .22); }
.ghkbc-support h2 { margin: 1px 0 0 !important; color: var(--ghkbc-text) !important; font-size: var(--gh-type-card-title, 1.125rem) !important; font-weight: 600 !important; line-height: 1.35 !important; }
.ghkbc-support p { margin: 1px 0 0 !important; color: var(--ghkbc-muted) !important; font-size: var(--gh-type-card-copy, 1rem) !important; line-height: var(--gh-card-leading, 1.62) !important; }
.ghkbc-support__button.btn { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 10px; padding: 10px 20px; color: #fff !important; background: var(--ghkbc-navy) !important; border: 1px solid var(--ghkbc-navy) !important; border-radius: 10px !important; font-size: var(--gh-type-small, 1rem) !important; font-weight: 600 !important; }
.ghkbc-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 8px 0 0; }
.ghkbc-secondary.btn { min-height: 39px; padding: 8px 14px; color: #344b66 !important; background: #fff !important; border: 1px solid #ccd8e6 !important; border-radius: 9px !important; font-size: var(--gh-type-label, .875rem) !important; font-weight: 600 !important; }

.ghkbc-quick-link:hover, .ghkbc-article > a:hover, .ghkbc-subcategory > a:hover { border-color: #aebfd2; box-shadow: 0 8px 20px rgba(16, 35, 63, .07); transform: translateY(-1px); }
.ghkbc-page a:focus-visible, .ghkbc-page button:focus-visible, .ghkbc-page select:focus-visible, .ghkbc-page input:focus-visible { outline: 3px solid rgba(255, 114, 0, .38) !important; outline-offset: 2px !important; }

body.gh-dark-mode .ghkbc-page { --ghkbc-text:#eef5ff; --ghkbc-muted:#aebdd0; --ghkbc-border:rgba(148,163,184,.22); }
body.gh-dark-mode .ghkbc-page .ghkbc-quick,
body.gh-dark-mode .ghkbc-page .ghkbc-summary,
body.gh-dark-mode .ghkbc-page .ghkbc-panel,
body.gh-dark-mode .ghkbc-page .ghkbc-article > a,
body.gh-dark-mode .ghkbc-page .ghkbc-subcategory > a,
body.gh-dark-mode .ghkbc-page .ghkbc-account,
body.gh-dark-mode .ghkbc-page .ghkbc-quick-link { color:var(--ghkbc-text)!important; background:#0d2038!important; border-color:var(--ghkbc-border)!important; }
body.gh-dark-mode .ghkbc-page :is(.ghkbc-summary strong,.ghkbc-article__content strong,.ghkbc-subcategory__content strong,.ghkbc-quick-link strong,.ghkbc-panel h2,.ghkbc-support h2){color:var(--ghkbc-text)!important}
body.gh-dark-mode .ghkbc-page :is(.ghkbc-summary small,.ghkbc-article__content small,.ghkbc-subcategory__content small,.ghkbc-quick-link small,.ghkbc-support p){color:var(--ghkbc-muted)!important}

@media (max-width: 1280px) {
    body.gm-knowledgebase-page .gm-kb-primary-content > .ghkb-page.ghkbc-page { width: 90% !important; }
    .ghkbc-top { grid-template-columns: minmax(0, 1fr) 400px; }
    .ghkbc-hero { padding-inline: 36px; }
}

@media (max-width: 1500px) {
    .ghkbc-hero__note { display: none; }
    .ghkbc-summary, .ghkbc-summary--two { grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(145px, .7fr)); }
}

@media (max-width: 1060px) {
    .ghkbc-top { grid-template-columns: 1fr; }
    .ghkbc-hero { min-height: 220px; }
    .ghkbc-quick { min-height: auto; }
    .ghkbc-summary, .ghkbc-summary--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ghkbc-summary__about { grid-column: 1 / -1; padding-bottom: 13px; border-bottom: 1px solid var(--ghkbc-border); }
}

@media (max-width: 820px) {
    body.gm-knowledgebase-page .gm-kb-primary-content > .ghkb-page.ghkbc-page { width: calc(100% - 32px) !important; padding: 18px 0 8px !important; }
    .ghkbc-summary { grid-template-columns: 1fr 1fr; gap: 12px; }
    .ghkbc-summary__about { grid-column: 1 / -1; padding-bottom: 13px; border-bottom: 1px solid var(--ghkbc-border); }
    .ghkbc-summary__stat { min-height: 48px; padding-left: 0; border-left: 0; }
    .ghkbc-subcategory-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body.gm-knowledgebase-page .gm-kb-primary-content > .ghkb-page.ghkbc-page { width: calc(100% - 24px) !important; padding: 12px 0 6px !important; font-size: 16px !important; }
    .ghkbc-top, .ghkbc-summary, body.gm-knowledgebase-page .ghkbc-page > .ghkbc-panel { margin-bottom: 12px !important; }
    .ghkbc-hero { min-height: 0; padding: 25px 20px 23px; border-radius: 14px; }
    .ghkbc-hero::after { display: none; }
    .ghkbc-hero h1 { font-size: 30px !important; }
    .ghkbc-hero p { font-size: 16px !important; }
    .ghkbc-search { grid-template-columns: 42px minmax(0, 1fr); margin-top: 17px; }
    .ghkbc-search__button.btn { grid-column: 1 / -1; min-height: 48px !important; border-radius: 0 0 8px 8px !important; }
    .ghkbc-quick { padding: 16px; border-radius: 14px; }
    .ghkbc-quick__grid { grid-template-columns: 1fr; }
    .ghkbc-quick-link { min-height: 64px; }
    .ghkbc-summary { grid-template-columns: 1fr; padding: 17px; }
    .ghkbc-summary__about { grid-column: auto; }
    .ghkbc-summary__stat { padding-top: 11px; border-top: 1px solid var(--ghkbc-border); }
    body.gm-knowledgebase-page .ghkbc-page > .ghkbc-panel { padding: 15px 13px 14px !important; border-radius: 14px !important; }
    .ghkbc-panel__header--articles { align-items: stretch; flex-direction: column; }
    .ghkbc-sort { width: 100%; }
    .ghkbc-article > a { grid-template-columns: 44px minmax(0, 1fr) 14px; min-height: 72px; gap: 10px; padding: 9px 10px 9px 8px; }
    .ghkbc-article__content small, .ghkbc-subcategory__content small { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .ghkbc-subcategory > a { grid-template-columns: 44px minmax(0, 1fr) 14px; }
    .ghkbc-subcategory__count { grid-column: 2; font-size: 13px; }
    .ghkbc-subcategory .ghkbc-row-arrow { grid-column: 3; grid-row: 1 / span 2; }
    .ghkbc-edit.btn { position: static; width: 100%; margin-top: 5px; transform: none; }
    body.gm-knowledgebase-page .ghkbc-page > .ghkbc-support { grid-template-columns: 52px minmax(0, 1fr) !important; padding: 16px !important; }
    .ghkbc-support__icon { width: 52px; height: 52px; }
    .ghkbc-support__button.btn { grid-column: 1 / -1; width: 100%; }
    .ghkbc-actions { align-items: stretch; flex-direction: column; margin-top: 10px; }
    .ghkbc-secondary.btn { width: 100%; }
}

@media print {
    .ghkbc-quick, .ghkbc-search, .ghkbc-support, .ghkbc-actions, .ghkbc-sort, .ghkbc-edit { display: none !important; }
    body.gm-knowledgebase-page .gm-kb-primary-content > .ghkb-page.ghkbc-page { width: 100% !important; padding: 0 !important; }
    .ghkbc-top { display: block; }
    .ghkbc-hero { min-height: 0; padding: 20px; color: #000; background: #fff; border: 1px solid #ccc; box-shadow: none; }
    .ghkbc-hero h1, .ghkbc-hero p { color: #000 !important; }
}
