/* public/assets/css/knowledge-centre.css
 *
 * Styles for the real, database-backed Knowledge Centre (/knowledge/).
 * Everything here is scoped under body.knowledge-centre, and reuses the
 * site's own colours (#5e87eb / #2563eb accent, #505060 heading/body
 * text, #6a6c72 secondary text, #ebebeb borders, #f8f8f8 panel
 * background) and the Cabin font already loaded by style.css rather than
 * redeclaring typography here.
 *
 * The page heading/breadcrumb reuse the real site's own .page-title-area
 * hero verbatim (same markup as e.g. public/forOrganisations.php) rather
 * than a bespoke heading block - body.public-interior (alongside
 * body.knowledge-centre) gets its compact height/spacing from the
 * existing public/assets/css/public-interior.css, exactly like every
 * other interior content page. Reusing the real hero also means the
 * navbar's default white nav-link text already has the dark backdrop it
 * assumes - no colour override needed here for that, unlike an earlier
 * plain-white-background version of these pages.
 */

/* public-interior.css's hero is a fixed 200px tall above its own 991px
   breakpoint, and only becomes content-aware (auto height) below it -
   safe for the ten pages it was built for, since a fixed short page name
   ("Contact", "FAQ", "Pricing"...) never wraps at that width. A
   Knowledge Centre title is arbitrary content (an article's own
   question, or a topic name) and a long one CAN still wrap to two lines
   well above 991px, which overflowed that fixed-height strip and
   clipped into the breadcrumb below it. Keeping the hero content-aware
   at every width - not just public-interior.css's own <=991px range -
   means a wrapped title simply grows the strip instead, same mechanism
   that file's own comment on its 991px rule already relies on. */
body.knowledge-centre .page-title-area {
    height: auto;
    min-height: 200px;
}

@media (max-width: 991px) {
    body.knowledge-centre .page-title-area {
        min-height: 150px;
    }
}

/* A second, earlier size step (public-interior.css only has the one
   30px/24px cliff either side of 991px) so a long title is less likely
   to need two lines at all in this range, rather than relying solely on
   the auto-height fix above to absorb it. */
@media (min-width: 992px) and (max-width: 1200px) {
    body.knowledge-centre .page-title-content h2 {
        font-size: 24px;
    }
}

/* Consistent content rhythm across all three pages - same top/bottom
   padding regardless of what the section contains. Matches the 36px/24px
   "first content gap" convention public-interior.css already uses for
   its other approved pages' own section classes. */
body.knowledge-centre .kc-section {
    padding: 36px 0 90px;
}

@media (max-width: 767px) {
    body.knowledge-centre .kc-section {
        padding: 24px 0 60px;
    }
}

/* ---- Landing page: two-column Browse by topic / Featured article ---- */

body.knowledge-centre .kc-col-heading {
    font-size: 20px;
    font-weight: 700;
    color: #505060;
    margin: 0 0 20px;
}

body.knowledge-centre .kc-topics {
    border-top: 1px solid #ebebeb;
}

body.knowledge-centre .kc-topic {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 4px;
    border-bottom: 1px solid #ebebeb;
    color: inherit;
}

body.knowledge-centre .kc-topic:hover {
    background-color: #f8f8f8;
}

body.knowledge-centre .kc-topic:hover .kc-topic-title {
    color: #5e87eb;
}

body.knowledge-centre .kc-topic-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0f4ff;
    color: #5e87eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

body.knowledge-centre .kc-topic-body {
    flex: 1 1 auto;
    min-width: 0;
}

body.knowledge-centre .kc-topic-title {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #505060;
    margin-bottom: 3px;
}

body.knowledge-centre .kc-topic-desc {
    display: block;
    font-size: 14px;
    color: #6a6c72;
}

body.knowledge-centre .kc-topic-arrow {
    flex: 0 0 auto;
    color: #c7cedb;
    font-size: 13px;
}

body.knowledge-centre .kc-featured {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 24px;
}

body.knowledge-centre .kc-featured-label {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5e87eb;
}

body.knowledge-centre .kc-featured h3 {
    margin: 0 0 12px;
    font-size: 19px;
    line-height: 1.4;
}

body.knowledge-centre .kc-featured h3 a {
    color: #505060;
}

body.knowledge-centre .kc-featured h3 a:hover {
    color: #5e87eb;
}

body.knowledge-centre .kc-featured p {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.7;
    color: #505060;
}

body.knowledge-centre .kc-featured p:last-child {
    margin-bottom: 0;
}

body.knowledge-centre .kc-featured .kc-read-more {
    font-size: 14px;
    font-weight: 600;
    color: #5e87eb;
}

/* Topic-page variant: a soft blue tint rather than the landing page's
   neutral grey, so the two "Featured article" boxes read as the same
   component used in two different contexts rather than identical twins. */
body.knowledge-centre .kc-featured-blue {
    background: #eaf1fd;
}

/* ---- Topic page: "What happened when you scanned?" diagnostic links ---- */

body.knowledge-centre .kc-diagnose-row {
    margin-bottom: 45px;
}

body.knowledge-centre .kc-diagnose-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid #ebebeb;
}

body.knowledge-centre .kc-diagnose-list li {
    border-bottom: 1px solid #ebebeb;
}

body.knowledge-centre .kc-diagnose-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 4px;
    font-size: 16px;
    font-weight: 600;
    color: #505060;
}

body.knowledge-centre .kc-diagnose-list a:hover {
    color: #5e87eb;
}

body.knowledge-centre .kc-diagnose-list a::after {
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    flex: 0 0 auto;
    color: #c7cedb;
    font-size: 13px;
}

/* ---- Topic page / related-articles list: simple left-aligned list ---- */

body.knowledge-centre .kc-article-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

body.knowledge-centre .kc-article-list li {
    padding: 16px 0;
    border-bottom: 1px solid #ebebeb;
}

body.knowledge-centre .kc-article-list li:first-child {
    border-top: 1px solid #ebebeb;
}

body.knowledge-centre .kc-article-list a {
    font-size: 17px;
    font-weight: 600;
    color: #505060;
}

body.knowledge-centre .kc-article-list a:hover {
    color: #5e87eb;
}

body.knowledge-centre .kc-article-list p {
    margin: 5px 0 0;
    font-size: 14.5px;
    color: #6a6c72;
}

body.knowledge-centre .kc-article-list .kc-read-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    color: #5e87eb;
}

body.knowledge-centre .kc-article-list .kc-read-more:hover,
body.knowledge-centre .kc-article-list .kc-read-more:focus-visible {
    text-decoration: underline;
}

/* Matches .account-shell .account-breadcrumb (public/assets/css/account-
   shell.css, used by e.g. the Profile page's "My Account › Profile" line)
   - same sizing/colours, scoped for this page family instead since
   account-shell.css is not loaded here. */
body.knowledge-centre .kc-context-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

body.knowledge-centre .kc-context-breadcrumb a {
    color: #5e87eb;
    font-weight: 600;
    text-decoration: none;
}

body.knowledge-centre .kc-context-breadcrumb a:hover {
    text-decoration: underline;
}

body.knowledge-centre .kc-context-breadcrumb-sep {
    color: #98a2b3;
}

body.knowledge-centre .kc-context-breadcrumb-current {
    color: #667085;
    font-weight: 500;
}

/* style.css resets outline to 0 on every <a> with !important (see its
   own "a { outline: 0 !important; }" rule) - these pages' links need a
   visible keyboard-focus indicator back, so this matches that
   specificity/!important to win the cascade regardless of load order. */
body.knowledge-centre a:focus-visible {
    outline: 2px solid #5e87eb !important;
    outline-offset: 2px !important;
    border-radius: 2px;
}

/* ---- Article page: body rendered from Markdown via CommonMark, so
   these target the plain semantic elements it produces (h2/h3/p/ol)
   directly - there is nowhere upstream to attach a custom class, since
   raw HTML in the Markdown source is deliberately disabled. ---- */

body.knowledge-centre .article-content p {
    font-size: 16px;
    line-height: 1.75;
    color: #333;
}

body.knowledge-centre .article-content h2 {
    font-size: 21px;
    margin: 36px 0 14px;
    color: #505060;
}

body.knowledge-centre .article-content h3 {
    font-size: 17px;
    margin: 28px 0 6px;
    color: #505060;
}

body.knowledge-centre .article-content ol {
    margin: 0 0 10px;
    padding-left: 0;
    counter-reset: kc-step;
    list-style: none;
}

body.knowledge-centre .article-content ol li {
    position: relative;
    counter-increment: kc-step;
    padding-left: 44px;
    margin-bottom: 18px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

body.knowledge-centre .article-content ol li::before {
    content: counter(kc-step);
    position: absolute;
    left: 0;
    top: -1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #5e87eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.knowledge-centre .article-content ol li strong {
    display: block;
    color: #505060;
}

/* The security-warning callout is a standard Markdown blockquote in the
   article source (the one place the copy needs a visually distinct
   notice box) rather than raw HTML, which the renderer strips. */
body.knowledge-centre .article-content blockquote {
    border-left: 4px solid #5e87eb;
    padding: 14px 20px;
    margin: 28px 0;
}

body.knowledge-centre .article-content blockquote p {
    margin: 0;
    font-size: 15px;
}

/* .entry-meta is reused from the real .blog-details-desc component, but
   this page always stacks its items (rather than the real component's
   inline-with-dot-separator layout) so there is no wrap point to fix at
   any width. */
body.knowledge-centre .article-content .entry-meta {
    margin-bottom: 20px;
}

body.knowledge-centre .article-content .entry-meta ul li {
    display: block;
    margin: 0 0 4px;
}

body.knowledge-centre .article-content .entry-meta ul li::before {
    display: none;
}

body.knowledge-centre .kc-sidebar-heading {
    font-size: 16px;
    font-weight: 700;
    color: #505060;
    margin: 0 0 16px;
}

body.knowledge-centre .kc-sidebar-topics {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

body.knowledge-centre .kc-sidebar-topics li {
    margin-bottom: 10px;
    font-size: 15px;
}

body.knowledge-centre .kc-sidebar-topics a {
    color: #505060;
}

body.knowledge-centre .kc-sidebar-topics a:hover {
    color: #5e87eb;
}

body.knowledge-centre .kc-related {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #ebebeb;
}

body.knowledge-centre .kc-related h2 {
    margin-top: 0;
}
