/* ==========================================================================
   Modex Help Center (Help Scout Docs) - custom theme
   Tokens from the Modex design system. Fonts load via the header snippet:
   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
   ========================================================================== */

/* ---------- Base ---------- */
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #F3F4F6 !important; /* surface */
    color: #1F2937;                       /* ink */
    font-size: 16px;
}

#main-content {
    background: none;
}

/* ---------- Header / logo ---------- */
.brand {
    width: 65px;
    height: 40px;
    background: transparent url(https://modex.com/images/marketing/modex_logo_on_dark.svg) center center no-repeat;
    background-size: 65px 40px;
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

.brand span {
    display: none;
}

.navbar [class^=icon-],
.navbar [class*=" icon-"],
#searchBar [class^=icon-],
.featherlight-close-icon {
    color: #fff;
}

@media (max-width: 768px) {
    .navbar .btn-navbar {
        top: 12px;
    }

    .navbar .btn-navbar .icon-bar {
        background-color: #fff;
    }
}

@media (min-width: 769px) {
    .navbar .nav {
        position: absolute;
        right: 0;
        left: auto;
        bottom: 0;
        margin-right: 0;
        display: flex;
        align-items: flex-end;
    }

    .navbar .nav a {
        font-weight: 400;
        line-height: 1.5rem;
        font-size: 0.875rem;
        padding-top: calc(1.75rem - 3px) !important; /* offsets the 3px underline below */
        padding-bottom: 1.75rem !important;
        /* every link reserves the underline space, so the active one doesn't shift up */
        border-bottom: 3px solid transparent;
    }

    .navbar .nav .active a {
        font-weight: 500;
        border-bottom-color: #28C1F2; /* accent-rule */
    }

    .navbar .nav .active .caret {
        display: none;
    }
}

/* ---------- Headings ---------- */
.contentWrapper h1,
.contentWrapper h2,
.contentWrapper h3,
#fullArticle h1,
#fullArticle h2,
#fullArticle h3,
#docsSearch h1 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #0E2269; /* ink-heading */
}

#docsSearch h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

#fullArticle .title {
    font-size: 1.5rem;   /* 24px - 1.5x body, like Help Scout's own docs */
    line-height: 1.2;
    margin-bottom: 1.75rem;
}

#fullArticle h2 {
    font-size: 1.125rem; /* 18px */
    line-height: 1.25;
    margin-top: 2rem;
}

#fullArticle h3 {
    font-size: 1rem;     /* 16px - same size as body, set apart by weight */
    line-height: 1.25;
    margin-top: 1.5rem;
}

/* ---------- Article body ---------- */
#fullArticle,
#fullArticle p,
#fullArticle li {
    color: #1F2937; /* ink */
    font-size: 1rem;
    line-height: 1.5;
}

#fullArticle p {
    margin-bottom: 1.25em;
}

#fullArticle a {
    color: #2136A3; /* link */
    text-decoration: underline;
}

#fullArticle a:hover {
    color: #0E2269;
}

#fullArticle img {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

#fullArticle .printArticle {
    top: 35px;
}

/* ---------- Cards & content box ---------- */
.contentWrapper {
    padding: 2rem;
    background-color: #fff; /* surface-raised */
    border: 1px solid #E5E7EB; /* border */
    border-radius: 8px;        /* radius-md */
    box-shadow: none;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.category-list .category,
.category-list.two-col .category {
    width: auto;
    margin: 0;
    background-color: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: none;
}

/* ---------- Home page: collections & category cards ---------- */
.collection-category h2 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 1.5rem;
    color: #0E2269; /* ink-heading */
}

.collection-category h2 a {
    color: inherit; /* heading text is a link with its own gray */
}

.category-list .category h3 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #0E2269;
}

.category-list .category p {
    color: #4B5563; /* ink-muted - old #b3b3b3 was too faint to read */
}

.category-list .category .article-count {
    color: #2136A3; /* link */
    font-weight: 500;
}

.category-list .category:hover {
    border-color: #89B3F4; /* blue-300 */
}

/* ---------- Sidebar ---------- */
#sidebar h3 {
    color: #4B5563; /* ink-muted */
}

#sidebar .active a {
    color: #2136A3;
}

/* ---------- Sort dropdown (category pages) ----------
   Help Scout forces 11px / 24px tall / 145px wide with !important,
   so those three need !important to override. */
#sortBy {
    -webkit-appearance: none;
    appearance: none;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem !important;
    font-weight: 400;
    color: #1F2937; /* ink */
    height: 36px !important;
    width: auto !important;
    line-height: normal !important;
    padding: 0 2.25rem 0 0.75rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%234B5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    border: 1px solid #D1D5DB; /* gray-300 */
    border-radius: 8px;        /* radius-md */
    box-shadow: none;
    cursor: pointer;
}

#sortBy:hover {
    border-color: #89B3F4; /* blue-300 */
}

#sortBy:focus {
    border-color: #5693EF; /* action-blue */
    outline: 2px solid #BBD4F9; /* blue-200 */
    outline-offset: 0;
}

/* ---------- Search ---------- */
#searchBar .search-query {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1F2937;
    border: 1px solid #D1D5DB; /* gray-300 */
    border-radius: 8px 0 0 8px;
    box-shadow: none;
}

#searchBar .search-query:focus {
    border-color: #5693EF; /* action-blue */
    outline: none;
}

#searchBar button {
    color: #fff;
    text-shadow: none;
    background: #5693EF; /* action-blue */
    border: 1px solid #5693EF;
    border-radius: 0 8px 8px 0;
    font-size: 18px;
    font-weight: 700;
    padding: 0 1.5em;
    height: 50px;
    position: absolute;
    top: auto;
    right: 0; /* was -1px, which let the box's square corner show past the button */
}

/* The search box runs under the button: round all its corners so none peek out
   behind the button's rounded ones, and keep typed text clear of the button */
#docsSearch #searchBar .search-query {
    border-radius: 8px;
    padding-right: 8rem;
}

@media (max-width: 480px) {
    #docsSearch #searchBar .search-query {
        padding-right: 4rem; /* button shrinks to an icon on phones */
    }
}

#searchBar button:hover {
    background-color: #2136A3;
    border-color: #2136A3;
}

/* ---------- Type scale (applies across all page types) ----------
   Modeled on Help Scout's own docs: semibold headings, gentle steps.
   48 home hero / 24 page titles, home sections / 18 article h2, card titles
   16 body, article h3, article lists / 14 nav, small text / 12 labels */

/* Collection, category and search titles match the article title */
.contentWrapper h1 {
    font-size: 1.5rem;
    line-height: 1.2;
}

/* Article lists on collection, category and search pages
   (were 20.8px on some pages and 18px on others, in old Bootstrap blue) */
.articleList a,
.articleList a span {
    font-size: 1rem;
    color: #2136A3; /* link */
}

/* List spacing: the old margin was sized for 20.8px text (29px gaps).
   Search results get more room since each has a snippet under it. */
.articleList li {
    margin: 0 0 1rem;
}

#serp .articleList li {
    margin-bottom: 1.5rem;
}

/* Space under page titles (the old list margin was doing this job) */
.contentWrapper h1 {
    margin-bottom: 1.5rem;
}

/* Category pages: description hugs the title, then the gap */
#categoryHead h1 {
    margin-bottom: 0.5rem;
}

#categoryHead .descrip {
    margin-bottom: 1.5rem;
}

/* Small supporting text - one size instead of 14 / 14.4 / 15px */
.category-list .category p,
#categoryHead .descrip,
.articleList li p,
#serp .articlesFound,
footer p {
    font-size: 0.875rem;
}

#categoryHead .descrip,
.articleList li p,
#serp .articlesFound {
    color: #4B5563; /* ink-muted */
}

/* Sidebar: links were 17.6px - larger than body text */
#sidebar .nav-list a {
    font-size: 1rem;
    color: #4B5563; /* ink-muted - old #858585 was too faint */
}

#sidebar .nav-list .active a {
    color: #2136A3; /* keeps the current category highlighted */
}

#sidebar h3 {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Buttons don't inherit fonts by default - they were in Helvetica Neue */
button,
input,
select {
    font-family: inherit;
}

/* ==========================================================================
   Cleanup from the full-site audit (2026-11-05)
   ========================================================================== */

/* ---------- Header ---------- */
/* Same gradient and link colors as the modex.com header */
.navbar .navbar-inner {
    background: linear-gradient(to right, #0E2369, #2136A3, #0E2369);
    box-shadow: none;
}

@media (min-width: 769px) {
    .navbar .nav > li > a {
        color: #D1D5DB; /* gray-300 */
    }

    .navbar .nav > li > a:hover {
        color: #fff;
    }

    .navbar .nav > .active > a {
        color: #fff;
        font-weight: 600;
    }
}

/* ---------- Home: search band ---------- */
#docsSearch {
    background-color: #fff;               /* was #f5f5f5 */
    border-bottom: 1px solid #E5E7EB;     /* was #dfdfdf */
}

/* ---------- Sidebar search + autocomplete ---------- */
#sidebar #searchBar.sm .search-query {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1F2937;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    box-shadow: none;
}

#sidebar #searchBar.sm .search-query:focus {
    border-color: #5693EF;
    outline: none;
}

#serp-dd {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
    overflow: hidden;
}

#serp-dd .result a {
    font-size: 0.875rem;
    color: #2136A3;
}

#serp-dd .result li.active,
#serp-dd .result li:hover {
    background-color: #EEF4FD; /* blue-50 */
}

/* ---------- Article content ---------- */
#fullArticle strong,
#fullArticle b {
    color: inherit; /* was #494949 */
}

#fullArticle h4 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0E2269;
    margin-top: 1.25rem;
}

#fullArticle img {
    max-width: 100%;
    height: auto; /* some images have fixed pixel widths */
}

#fullArticle .video {
    border-radius: 8px;
    overflow: hidden;
}

#fullArticle table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
}

#fullArticle table th,
#fullArticle table td {
    color: #1F2937;
    padding: 0.625rem 0.75rem;
    border: 0;
    border-top: 1px solid #E5E7EB;
    vertical-align: top;
    text-align: left;
}

#fullArticle table tr:first-child th,
#fullArticle table tr:first-child td {
    border-top: 0;
}

#fullArticle th,
#fullArticle tr:first-child td {
    background-color: #F3F4F6; /* gray-100 */
    font-weight: 600;
}

/* ---------- Article footer: "Still need help?" + last updated ---------- */
.contentWrapper .articleFoot,
.contentWrapper .articleFoot p,
.contentWrapper .articleFoot time {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* was Georgia italic */
    font-style: normal;
    font-size: 0.875rem;
    color: #4B5563;
}

.contentWrapper .articleFoot a,
.contentWrapper .articleFoot p.help a#sbContact {
    color: #2136A3;
    border-bottom: 1px solid #BBD4F9;
}

/* ---------- Article ratings ("Did this answer your question?") ---------- */
.articleRatings {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.875rem;
    color: #4B5563;            /* ink-muted (was #858585) */
    background-color: #fff;
    border: 1px solid #E5E7EB; /* border (was #e9e5e5) */
    border-radius: 8px;        /* radius-md (was 4px) */
}

.articleRatings .articleRatings-actions button.rateAction {
    background-color: #EEF4FD; /* blue-50 (was #e3e8eb) */
    border-color: #fff;
    transition: background-color 0.15s ease;
}

.articleRatings .articleRatings-actions button.rateAction:hover,
.articleRatings .articleRatings-actions button.rateAction:focus {
    background-color: #BBD4F9; /* blue-200 */
}

.articleRatings .rateAction:focus-visible {
    outline: 2px solid #5693EF; /* action-blue */
    outline-offset: 1px;
}

.articleRatings-feedback-message {
    color: #1F2937;
}

/* ---------- Related articles ---------- */
.related {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background-color: #fff;
}

.related h3 {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0E2269;
}

.related ul li a,
.related ul li a span {
    font-size: 1rem;
    color: #2136A3;
}

/* ---------- Search results snippets (Help Scout's rule was more specific) ---------- */
#serp .articleList li p {
    color: #4B5563;
}

/* ---------- 404 page ---------- */
#errorContainer p {
    font-size: 1.125rem;
    color: #4B5563; /* was 20.8px #757575 */
}

/* ---------- Footer ---------- */
footer p,
footer p a {
    color: #4B5563; /* was #9b9b9b - too faint to read */
}

/* ---------- Screen-reader-only text ----------
   Help Scout's version wasn't fully hidden and made phone pages 4px too wide */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
    #docsSearch h1 {
        font-size: 2rem; /* 48px hero is oversized on phones */
    }
}

@media (max-width: 600px) {
    .category-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #searchBar button .icon-search {
        display: inline-block;
    }
}
