/* Custom overrides */

/* Brand fonts: DM Sans (primary), DM Serif Display (prominent headings) */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display&display=swap");

body,
input,
button,
select,
textarea {
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
}

/* Prominent headings: hero title, home section headings, page titles */
#docsSearch h1,
h2[id^="collection-"],
#categoryHead h1,
#fullArticle .title {
    font-family: "DM Serif Display", Georgia, serif;
    font-weight: 400;
}

/* Serif display needs a bit more size to breathe */
#docsSearch h1 {
    font-size: 36px;
}

h2[id^="collection-"] {
    font-size: 26px;
}

#categoryHead h1,
#fullArticle .title {
    font-size: 30px;
}

@media (max-width: 768px) {
    .navbar {
        margin: 0 !important;
    }
}

/* Navbar overlays the hero and scrolls away with the page */
#mainNav.navbar {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 96px;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

@media (max-width: 1024px) {
    #mainNav.navbar {
        padding: 24px 48px;
    }
}

/* Frosted glass navbar bar */
#mainNav .navbar-inner {
    background: rgba(255, 255, 255, 0.24) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: none;
    display: flex;
    align-items: center;
    min-height: 96px;
    padding: 0 24px;
}

/* navbar-inner is now a flex bar - let the container fill its width */
#mainNav .container-fluid {
    flex: 1;
    min-width: 0;
}

/* Desktop (above the collapse breakpoint): brand + nav on one row */
@media (min-width: 1201px) {
    #mainNav .container-fluid {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: none;
        width: 100%;
        margin: 0;
    }

    /* clearfix pseudo-elements become stray flex items - hide them */
    #mainNav .container-fluid::before,
    #mainNav .container-fluid::after {
        display: none;
    }

    #mainNav .nav-collapse {
        flex: 0 1 auto;
        width: auto;
    }

    #mainNav .nav {
        /* cancel launch.css's `position: absolute` so flexbox controls layout */
        position: static;
        right: auto;
        left: auto;
        bottom: auto;
        display: flex;
        margin: 0;
        align-items: center;
        gap: 8px;
    }

    #mainNav .nav > li {
        float: none;
    }
}

#mainNav .brand,
#mainNav .nav li a {
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: rgb(32, 32, 32) !important;
    -webkit-font-smoothing: antialiased;
}

#mainNav .brand {
    padding: 12px 20px;
    margin-left: 0;
    float: none;
    display: inline;
}

/* Logo file is 150x150 - scale it down to fit the 96px bar */
#mainNav .brand img {
    display: block;
    width: 48px;
    height: 48px;
}

#mainNav .nav li a:hover,
#mainNav .nav li a:focus {
    opacity: 0.7;
}

#mainNav .caret {
    display: none;
}

/* Theme renders two Kontakt items (#contact + #contactMobile) and our
   forced `display: block` on collapsed nav items un-hides both - keep
   only #contact (both just open the Beacon) */
#mainNav li#contactMobile {
    display: none !important;
}

/* Trim the navbar to the core items: Pierwsze kroki, Subskrypcja,
   Czytanie i słuchanie, Kontakt (all collections stay reachable
   from the home page grid) */
#mainNav li#problemy-techniczne,
#mainNav li#konto-i-dane,
#mainNav li#regulaminy-prawa-i-zgloszenia {
    display: none !important;
}

/* Collapse the navbar into the hamburger toggle earlier (default is 979px) */
@media (max-width: 1200px) {
    /* Show + style the toggle (theme styles it only below 979px) - default values from launch.css */
    #mainNav .btn-navbar {
        display: block;
        position: absolute;
        top: 34px; /* centered in the 96px bar row: (96 - 28) / 2 */
        right: 10px;
        margin-top: 0;
        width: 38px;
        height: 28px;
        text-shadow: none;
        border: 0;
        background: 0 0;
        box-shadow: none;
    }

    #mainNav .btn-navbar .icon-bar {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 1px;
        background: rgb(32, 32, 32);
    }

    #mainNav .btn-navbar .icon-bar + .icon-bar {
        margin-top: 3px;
    }

    #mainNav .btn-navbar:hover .icon-bar {
        background: rgb(32, 32, 32);
        opacity: 0.7;
    }

    #mainNav .btn-navbar:focus,
    #mainNav .btn-navbar:active {
        outline: none;
        box-shadow:
            0 0 0 2px rgba(245, 166, 35, 0.4),
            0 0 0 4px rgba(245, 166, 35, 0.16);
    }

    /* Anchor for the desktop-width popup + fixed-height bar row.
       Pinning the brand to a 96px row lets the mobile menu grow below it
       without re-centering the brand/toggle, and keeps the bar layout
       identical across the whole collapsed range (no jump at 768px). */
    #mainNav .navbar-inner {
        align-items: stretch;
    }

    #mainNav .container-fluid {
        position: relative;
        display: flex;
        flex-direction: column;
    }

    #mainNav .brand {
        display: flex;
        align-items: center;
        align-self: flex-start; /* don't stretch full width in the column - keep click area to the logo */
        min-height: 96px;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Base: in-flow height animation. Mobile keeps this (menu expands the
       frosted bar in place); the desktop-width block below overrides it
       into an absolute white popup. */
    #mainNav .nav-collapse.collapse {
        height: 0 !important;
        overflow: hidden !important;
    }

    #mainNav .nav-collapse.collapse.in {
        height: auto !important;
        overflow: visible !important;
    }

    /* Pad the inner wrapper, not the clipped container, so closed height stays 0 */
    #mainNav .nav-collapse nav {
        padding: 8px;
    }

    /* Theme sets `.nav { position: absolute }`, which escapes the clip - undo it */
    #mainNav .nav-collapse .nav {
        position: static;
        float: none;
        margin: 0;
        clear: both;
    }

    /* Stack the items vertically */
    #mainNav .nav-collapse .nav > li {
        display: block;
        float: none;
        margin: 0;
    }

    #mainNav .nav-collapse .nav li a {
        display: block;
        width: 100%;
        box-sizing: border-box; /* keep padding inside width: 100% */
        padding: 10px 12px;
        border-radius: 8px;
    }

    #mainNav .nav-collapse .nav li a:hover,
    #mainNav .nav-collapse .nav li a:focus {
        opacity: 1;
        background: rgba(0, 0, 0, 0.05);
    }
}

/* Mobile: slimmer bar that scrolls away with the page instead of
   floating over the content */
@media (max-width: 768px) {
    #mainNav.navbar {
        padding: 12px 16px;
    }

    #mainNav .navbar-inner {
        min-height: 64px;
        padding: 0 12px;
    }

    #mainNav .brand {
        min-height: 64px;
    }

    #mainNav .brand img {
        width: 40px;
        height: 40px;
    }

    /* re-center the toggle in the slimmer bar: (64 - 28) / 2 */
    #mainNav .btn-navbar {
        top: 18px;
    }
}

/* Desktop collapsed widths: white popup anchored right (not the frosted bar) */
@media (min-width: 769px) and (max-width: 1200px) {
    #mainNav .nav-collapse.collapse {
        position: absolute;
        top: 100%;
        right: 0;
        width: auto;
        min-width: 200px;
        background: #fff;
        border-radius: 12px;
        margin-top: 8px;
    }

    /* Shadow only when open - on a height:0 container it would paint a line */
    #mainNav .nav-collapse.collapse.in {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
}

/* Hero section - larger with background image */
#docsSearch {
    background:
        linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
        url("https://novelist.cloud/_next/image?url=%2Fimages%2Fsubscription-section.webp&w=2048&q=75")
            center 25% / cover no-repeat;
    min-height: 380px;
    padding: 140px 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* let the search-suggestion dropdown extend below the hero,
       above the content section that follows */
    position: relative;
    z-index: 50;
}

#docsSearch h1 {
    color: #ffffff !important;
}

/* Hero-like banner on pages without #docsSearch.
   The fixed body::before banner is 200px tall, so start the content
   below it (plus a small gap) instead of overlapping its lower edge.
   Scoped to pages without the real hero - when #docsSearch exists it
   already provides the top spacing and this padding would double it. */
body:not(:has(#docsSearch)) #contentArea {
    padding-top: 224px;
}

body::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),
        url("https://novelist.cloud/_next/image?url=%2Fimages%2Fsubscription-section.webp&w=2048&q=75")
            center 25% / cover no-repeat;
    z-index: -1;
}

/* The fixed banner is a fallback for pages without the real hero.
   When #docsSearch exists, both render and the fixed one ghosts behind
   the scrolling hero - hide it. */
body:has(#docsSearch)::before {
    display: none;
}

/* Give the sidebar search input the hero input's look (pages without
   #docsSearch put the search box in #sidebar, where launch.css's
   `#sidebar form .search-query` shrinks it). Match the hero styling. */
#sidebar #searchBar input.search-query {
    border-radius: 5px;
    line-height: 22px;
    width: 100%;
    height: 50px;
    padding-right: 14px;
    padding-left: 14px;
    border: 1px solid #d0d0d0;
    box-sizing: border-box;
}

#sidebar #searchBar input.search-query:focus,
#sidebar #searchBar input.search-query:focus:invalid {
    border-color: rgba(245, 166, 35, 0.4);
    box-shadow:
        0 0 0 2px rgba(245, 166, 35, 0.4),
        0 0 0 4px rgba(245, 166, 35, 0.16);
    outline: none;
}

/* Golden outline keeps the hero search prominent.
   On the input, not the form: the form has 2em vertical padding so its
   box is much taller than the visible bar, and the button overlays the
   input's right edge - the input box IS the bar. The :focus rule below
   overrides this with the regular focus ring while typing. */
#docsSearch #searchBar input.search-query {
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.9);
}

/* Search button - only in hero */
#docsSearch #searchBar button {
    background: rgb(32, 32, 32) !important;
    color: rgb(255, 255, 255) !important;
    border: none;
    outline: none;
}

#docsSearch #searchBar button:focus {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(245, 166, 35, 0.4),
        0 0 0 4px rgba(245, 166, 35, 0.16);
}

#docsSearch #searchBar button .icon-search {
    color: rgb(255, 255, 255) !important;
}

#docsSearch #searchBar input.search-query:focus {
    box-shadow:
        0 0 0 2px rgba(245, 166, 35, 0.4),
        0 0 0 4px rgba(245, 166, 35, 0.16);
    outline: none;
}

/* Content container width - matches --container-width from the
   hs-docs-site-2024 reference (its nav collapses just under 1140px). */
:root {
    --container-width: 1400px;
}

#contentArea.container-fluid {
    width: var(--container-width);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Category cards - aligned with the hs-docs-site-2024 reference design */
.collection-category .category-list,
.category-list.two-col {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;
    margin: 0 0 40px;
}

.category-list .category {
    --category--icon-circle-size: 52px;
    --category--icon-size: 32px;
    position: relative;
    /* override launch.css float-based two-col widths */
    flex: 0 0 100%;
    width: auto;
    float: none;
    margin: 0;
    box-sizing: border-box;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    /* leave room at the top for the icon */
    padding: calc(40px + var(--category--icon-circle-size) + 16px) 28px 32px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    transition: box-shadow 0.3s;
}

/* Icon circle */
.category-list .category::before {
    content: "";
    display: block;
    width: var(--category--icon-circle-size);
    height: var(--category--icon-circle-size);
    position: absolute;
    top: 32px;
    left: calc(50% - var(--category--icon-circle-size) / 2);
    border-radius: 100%;
    background: #f3ead9;
}

/* Icon glyph (masked SVG), centered in the circle */
.category-list .category::after {
    content: "";
    display: block;
    width: var(--category--icon-size);
    height: var(--category--icon-size);
    position: absolute;
    top: calc(
        32px +
            (var(--category--icon-circle-size) - var(--category--icon-size)) / 2
    );
    left: calc(50% - var(--category--icon-size) / 2);
    background: #8a6d3b;
    mask-image: url("https://www.helpscout.com/icons/help-circle.svg");
    mask-size: 100% 100%;
    -webkit-mask-image: url("https://www.helpscout.com/icons/help-circle.svg");
    -webkit-mask-size: 100% 100%;
}

/* Per-category icons (fallback above is help-circle) */

/* Ebooki i audiobooki */
.category-list .category#category-20::after {
    mask-image: url("https://www.helpscout.com/icons/books.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/books.svg");
}

/* Półka i offline */
.category-list .category#category-21::after {
    mask-image: url("https://www.helpscout.com/icons/download.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/download.svg");
}

/* Konto i logowanie */
.category-list .category#category-16::after {
    mask-image: url("https://www.helpscout.com/icons/user.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/user.svg");
}

/* Podstawy aplikacji */
.category-list .category#category-15::after {
    mask-image: url("https://www.helpscout.com/icons/smartphone.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/smartphone.svg");
}

/* Coś nie działa */
.category-list .category#category-22::after {
    mask-image: url("https://www.helpscout.com/icons/wrench.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/wrench.svg");
}

/* Kontakt z pomocą */
.category-list .category#category-23::after {
    mask-image: url("https://www.helpscout.com/icons/headphones.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/headphones.svg");
}

/* Pakiety */
.category-list .category#category-18::after {
    mask-image: url("https://www.helpscout.com/icons/shopping-basket.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/shopping-basket.svg");
}

/* Płatności */
.category-list .category#category-17::after {
    mask-image: url("https://www.helpscout.com/icons/credit-card.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/credit-card.svg");
}

/* Anulowanie */
.category-list .category#category-19::after {
    mask-image: url("https://www.helpscout.com/icons/close.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/close.svg");
}

/* Moje konto */
.category-list .category#category-27::after {
    mask-image: url("https://www.helpscout.com/icons/settings-2.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/settings-2.svg");
}

/* Prywatność i zgody */
.category-list .category#category-28::after {
    mask-image: url("https://www.helpscout.com/icons/shield.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/shield.svg");
}

/* Regulaminy i dokumenty */
.category-list .category#category-32::after {
    mask-image: url("https://www.helpscout.com/icons/file-text.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/file-text.svg");
}

/* Reklamacje, zwroty i odstąpienie */
.category-list .category#category-33::after {
    mask-image: url("https://www.helpscout.com/icons/undo.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/undo.svg");
}

/* Zgłaszanie treści i naruszeń */
.category-list .category#category-34::after {
    mask-image: url("https://www.helpscout.com/icons/flag.svg");
    -webkit-mask-image: url("https://www.helpscout.com/icons/flag.svg");
}

.category-list .category:hover {
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Stack the children full-width */
.category-list .category h3,
.category-list .category p,
.category-list .category .article-count {
    flex: 0 0 100%;
    margin: 0;
}

.category-list .category h3 {
    color: #202020;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2;
}

.category-list .category p {
    font-size: 14px;
    line-height: 1.6;
    color: #585858;
}

.category-list .category p:first-of-type {
    align-self: start;
}

/* Article count pinned to the bottom, muted */
.category-list .category .article-count {
    align-self: end;
    font-size: 14px;
    color: #9b9b9b;
}

.category-list .category:hover .article-count {
    color: #7d7d7d;
}

/* 2 columns on tablets, 4 on desktop */
@media (min-width: 768px) {
    .category-list .category {
        flex: 0 0 calc(50% - 24px / 2);
    }
}

@media (min-width: 1024px) {
    .category-list .category {
        flex: 0 0 calc(25% - 24px * 3 / 4);
        padding-left: 28px;
        padding-right: 28px;
    }
}

/* ============================================================
   Category page (and other sidebar pages)
   ============================================================ */

/* Two-column layout: content card + sidebar, flex instead of
   bootstrap float spans. Scoped to pages that have a sidebar so
   the home page grid is untouched. */
#contentArea .row-fluid:has(#sidebar) {
    display: flex;
    flex-direction: row-reverse; /* sidebar (last in DOM) on the left */
    align-items: flex-start;
    gap: 32px;
}

#contentArea .row-fluid:has(#sidebar)::before,
#contentArea .row-fluid:has(#sidebar)::after {
    content: none;
}

#contentArea .row-fluid:has(#sidebar) #main-content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    float: none;
    margin: 0;
}

#contentArea .row-fluid:has(#sidebar) #sidebar {
    flex: 0 0 280px;
    width: 280px;
    float: none;
    margin: 0;
    padding-top: 8px;
}

@media (max-width: 768px) {
    #contentArea .row-fluid:has(#sidebar) {
        flex-direction: column;
        gap: 40px;
    }

    #contentArea .row-fluid:has(#sidebar) #sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Content card - same surface as the category cards on home */
.contentWrapper {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 40px 44px 32px;
    min-height: 0;
    color: #585858;
}

@media (max-width: 768px) {
    .contentWrapper {
        padding: 28px 24px 20px;
        border: none;
    }
}

/* Category header: title left, sort control right */
#categoryHead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 24px;
}

#categoryHead h1 {
    color: #202020;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    margin: 0;
}

#categoryHead p.descrip {
    flex: 0 0 100%;
    order: 3;
    font-size: 15px;
    line-height: 1.6;
    color: #585858;
    margin: 0;
}

#categoryHead p.descrip:empty {
    display: none;
}

#categoryHead .sort {
    position: static;
    margin: 0;
}

#categoryHead .sort form {
    margin: 0;
}

#categoryHead .sort select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    height: 40px;
    line-height: 38px;
    margin: 0;
    padding: 0 36px 0 14px;
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-size: 14px;
    color: #585858;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23585858' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#categoryHead .sort select:hover {
    border-color: #b0b0b0;
}

#categoryHead .sort select:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.4);
    box-shadow:
        0 0 0 2px rgba(245, 166, 35, 0.4),
        0 0 0 4px rgba(245, 166, 35, 0.16);
}

/* Article list - divided rows with a doc icon and a hover chevron */
.articleList {
    margin: 0;
    padding: 0;
    font-size: 16px;
    border-top: 1px solid #f0ebe6;
}

.articleList > li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0ebe6;
}

.articleList > li a {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 16px 4px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #202020;
    transition: color 0.2s;
}

.articleList > li a span {
    flex: 1 1 auto;
}

.articleList > li a:hover,
.articleList > li a:focus {
    color: #202020;
    text-decoration: none;
}

.articleList > li a:hover span,
.articleList > li a:focus span {
    text-decoration: none;
}

/* Doc icon in a cream circle, matching the home-page category icons */
.articleList a .icon-article-doc {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 100%;
    background: #f3ead9;
    position: relative;
}

.articleList a .icon-article-doc::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    position: absolute;
    top: 9px;
    left: 9px;
    margin: 0;
    background: #8a6d3b;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
}

/* Chevron that appears and slides in on hover */
.articleList > li a::after {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    background: #202020;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    mask-size: 100% 100%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}

.articleList > li a:hover::after,
.articleList > li a:focus::after {
    opacity: 1;
    transform: translateX(0);
}

/* Sidebar */
#sidebar form {
    margin: 0 0 32px;
}

#sidebar #searchBar button {
    top: 50%;
    height: auto;
    transform: translateY(-50%);
    right: 14px;
}

#sidebar h3 {
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a8a8a;
    margin: 0 0 10px;
}

#sidebar .nav-list {
    margin: 0;
    padding: 0;
}

#sidebar .nav-list li {
    margin: 0;
}

#sidebar .nav-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    margin: 0 -12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #585858;
    transition: color 0.2s, background-color 0.2s;
}

#sidebar .nav-list a:hover,
#sidebar .nav-list a:focus {
    color: #202020;
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

#sidebar .nav-list .active a,
#sidebar .nav-list .active a:hover,
#sidebar .nav-list .active a:focus {
    font-weight: 600;
    color: #202020;
    background: #f3ead9;
}

#sidebar .nav-list .icon-arrow:before {
    color: #8a6d3b;
}

/* Footer - quiet, centered, on the page background.
   Pinned to the bottom of the viewport on short pages: body becomes a
   full-height column, #contentArea stretches, and margin-top: auto
   pushes the footer (last child of #contentArea) down. */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#contentArea.container-fluid {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

#contentArea .row-fluid {
    width: 100%;
}

footer {
    background: transparent;
    border-top: none;
    box-shadow: none;
    margin-top: auto;
    padding: 40px 0;
}

footer p,
footer p a {
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-size: 13px;
    color: #9b9b9b;
    text-align: center;
    margin: 0;
}

footer p a {
    text-decoration: underline;
}

footer p a:hover {
    color: #585858;
}

/* ============================================================
   Article page
   ============================================================ */

#fullArticle {
    margin: 0;
}

#fullArticle .title {
    color: #202020;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 20px;
}

#fullArticle,
#fullArticle p,
#fullArticle ul,
#fullArticle ol,
#fullArticle li,
#fullArticle div,
#fullArticle blockquote,
#fullArticle dd,
#fullArticle table {
    font-size: 16px;
    line-height: 1.7;
    color: #585858;
}

#fullArticle p {
    margin: 0 0 16px;
}

#fullArticle h2,
#fullArticle h3,
#fullArticle h4 {
    color: #202020;
    font-weight: 600;
    line-height: 1.3;
}

#fullArticle h2 {
    font-size: 20px;
    margin: 32px 0 12px;
}

#fullArticle h3 {
    font-size: 17px;
    margin: 24px 0 10px;
}

#fullArticle a {
    color: #4381b5;
}

#fullArticle a:hover {
    color: #356391;
}

#fullArticle img {
    max-width: 100%;
    border-radius: 8px;
}

#fullArticle ul,
#fullArticle ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

#fullArticle li {
    margin-bottom: 6px;
}

#fullArticle blockquote {
    margin: 0 0 16px;
    padding: 12px 20px;
    background: #fcf8f6;
    border-left: 3px solid #8a6d3b;
    border-radius: 0 8px 8px 0;
}

/* No print button */
.contentWrapper .printArticle {
    display: none;
}

/* Article footer - flat flex row, no more italic serif */
.articleFoot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0ebe6;
}

/* Contact icon in a cream circle, like the article-list doc icons */
.articleFoot .icon-contact {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100%;
    background: #f3ead9;
    color: #8a6d3b;
    font-size: 15px;
}

.articleFoot .icon-contact:before {
    margin: 0;
}

.articleFoot p,
.articleFoot time {
    font-family: "DM Sans", "DM Sans Fallback", sans-serif;
    font-style: normal;
    font-size: 14px;
    line-height: 1.5;
    color: #8a8a8a;
    margin: 0;
}

.articleFoot p.help {
    flex: 1 1 auto;
}

/* Theme styles these by id (#sbContact), so match the ids to win */
.articleFoot .contactUs,
#sbContact,
#sbContactMobile {
    color: #4381b5;
    font-weight: 500;
    border-bottom: none;
}

.articleFoot .contactUs:hover,
#sbContact:hover,
#sbContactMobile:hover {
    color: #356391;
    text-decoration: none;
}

/* No "Last updated on ..." dates */
.articleFoot time.lu,
.articleFoot p.lu {
    display: none;
}
