/* ============================================================
   Cappybara Help Center — page-specific styles
   Layered on top of the main site's style.css.
   ============================================================ */

:root {
    --help-sidebar-width: 16rem;
    --help-max-width: 90rem;
    --help-radius: 1rem;
    --help-radius-sm: .75rem;
    --help-brown: #652815;
    --help-cream: #FFF9E5;
    --help-shadow: 0 .125rem .5rem rgba(0, 0, 0, .06);
    --help-shadow-lg: 0 .5rem 1.5rem rgba(0, 0, 0, .08);
}

/* Reset main padding from main site for this page */
.help-page main {
    padding: 0 !important;
}

/* Visually hidden (accessible to screen readers, hidden from sight) */
.visually-hidden {
    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;
}

/* ---------- Hero ---------- */
.help-hero {
    padding: 8rem 1rem 2.5rem;
    text-align: center;
}
.help-hero h1 {
    color: var(--help-brown);
    font-family: "Agbalumo", sans-serif;
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: .75rem;
}
.help-hero p {
    color: var(--Color-System-color-System-600);
    font-family: "Outfit", sans-serif;
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 2rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 48rem) {
    .help-hero {
        padding: 6.5rem 1rem 2rem;
    }
    .help-hero h1 {
        font-size: 2.5rem;
    }
    .help-hero p {
        font-size: 1.0625rem;
    }
}

/* ---------- Search ---------- */
.help-search-wrap {
    position: relative;
    max-width: 36rem;
    margin: 0 auto;
}
.help-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.help-search-input-wrap svg {
    position: absolute;
    left: 1rem;
    pointer-events: none;
    color: var(--Color-System-color-System-600);
}
.help-search-input-wrap kbd {
    position: absolute;
    right: .75rem;
    font-family: "Outfit", sans-serif;
    font-size: .875rem;
    padding: .125rem .5rem;
    background: var(--Color-System-color-System-200);
    border-radius: .375rem;
    color: var(--Color-System-color-System-600);
    border: 1px solid var(--Color-System-color-System-300);
}
.help-search {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border-radius: var(--help-radius);
    border: 1px solid var(--Color-System-color-System-300);
    background: #fff;
    font-family: "Outfit", sans-serif;
    font-size: 1.0625rem;
    color: var(--Color-System-color-System-800);
    box-shadow: var(--help-shadow);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.help-search:focus {
    outline: none;
    border-color: var(--Color-Primary-Primary-600);
    box-shadow: 0 0 0 4px rgba(254, 193, 0, .2);
}

.help-search__results {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--help-radius);
    border: 1px solid var(--Color-System-color-System-200);
    box-shadow: var(--help-shadow-lg);
    overflow: hidden;
    z-index: 50;
    text-align: left;
    max-height: 28rem;
    overflow-y: auto;
}
.help-search__result {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .875rem 1.25rem;
    text-decoration: none;
    border-bottom: 1px solid var(--Color-System-color-System-200);
    color: var(--Color-System-color-System-800);
    transition: background .15s ease;
}
.help-search__result:last-child {
    border-bottom: none;
}
.help-search__result:hover {
    background: var(--Color-Primary-Primary-100);
}
.help-search__result-category {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--Color-Primary-Primary-800);
    font-weight: 600;
}
.help-search__result-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--Color-System-color-System-800);
}
.help-search__result-summary {
    font-size: .875rem;
    color: var(--Color-System-color-System-600);
    line-height: 1.4;
}
.help-search__result mark {
    background: var(--Color-Primary-Primary-300);
    color: var(--Color-System-color-System-800);
    padding: 0 .125rem;
    border-radius: .125rem;
}
.help-search__empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--Color-System-color-System-600);
    font-size: .9375rem;
}

/* ---------- Layout ---------- */
.help-layout {
    max-width: var(--help-max-width);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
    display: grid;
    grid-template-columns: var(--help-sidebar-width) 1fr;
    gap: 3rem;
    align-items: flex-start;
}
@media (max-width: 64rem) {
    .help-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem 3rem;
    }
}

/* ---------- Sidebar ---------- */
.help-sidebar-toggle {
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .625rem 1rem;
    background: #fff;
    border: 1px solid var(--Color-System-color-System-300);
    border-radius: var(--help-radius-sm);
    font-family: "Outfit", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--Color-System-color-System-800);
    cursor: pointer;
    box-shadow: var(--help-shadow);
}
@media (max-width: 64rem) {
    .help-sidebar-toggle {
        display: inline-flex;
        margin-bottom: 1rem;
    }
}

.help-sidebar {
    position: sticky;
    top: 7.5rem;
    align-self: start;
    background: #fff;
    border: 1px solid var(--Color-System-color-System-200);
    border-radius: var(--help-radius);
    padding: 1.5rem 1rem;
    max-height: calc(100vh - 8.5rem);
    overflow-y: auto;
}
.help-sidebar__group {
    margin-bottom: 1.5rem;
}
.help-sidebar__group:last-child {
    margin-bottom: 0;
}
.help-sidebar__group-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: "Agbalumo", sans-serif;
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--help-brown);
    margin: 0 .5rem .5rem;
    line-height: 1.4;
}
.help-sidebar__group-icon {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--Color-Primary-Primary-800);
}
.help-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .125rem;
}
.help-sidebar__link {
    display: block;
    padding: .5rem .75rem;
    text-decoration: none;
    font-family: "Outfit", sans-serif;
    font-size: .9375rem;
    color: var(--Color-System-color-System-600);
    border-radius: .5rem;
    transition: background .15s ease, color .15s ease;
    line-height: 1.35;
}
.help-sidebar__link:hover {
    background: var(--Color-Primary-Primary-100);
    color: var(--Color-System-color-System-800);
}
.help-sidebar__link--active {
    background: var(--Color-Primary-Primary-300);
    color: var(--Color-System-color-System-800);
    font-weight: 500;
}

/* Mobile drawer */
@media (max-width: 64rem) {
    .help-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 80vw;
        max-width: 22rem;
        max-height: 100vh;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform .25s ease;
        border-radius: 0 var(--help-radius) var(--help-radius) 0;
        padding-top: 4.5rem;
    }
    .help-sidebar--open {
        transform: translateX(0);
        box-shadow: var(--help-shadow-lg);
    }
}

.help-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(34, 36, 36, .4);
    z-index: 1050;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.help-sidebar-backdrop--visible {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Main content area ---------- */
.help-main {
    min-width: 0;
}
.help-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
    font-family: "Outfit", sans-serif;
    font-size: .875rem;
    color: var(--Color-System-color-System-600);
    margin-bottom: 1.5rem;
}
.help-breadcrumb a {
    color: var(--Color-Primary-Primary-800);
    text-decoration: none;
}
.help-breadcrumb a:hover {
    text-decoration: underline;
}
.help-breadcrumb__sep {
    color: var(--Color-System-color-System-300);
}

/* ---------- Welcome view ---------- */
.help-welcome__title {
    font-family: "Agbalumo", sans-serif;
    color: var(--help-brown);
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: .5rem;
}
.help-welcome__lead {
    color: var(--Color-System-color-System-600);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.help-welcome__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.25rem;
}
.help-card {
    background: #fff;
    border: 1px solid var(--Color-System-color-System-200);
    border-radius: var(--help-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    box-shadow: var(--help-shadow);
}
.help-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--help-shadow-lg);
    border-color: var(--Color-Primary-Primary-600);
}
.help-card__icon {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    background: var(--Color-Primary-Primary-100);
    color: var(--Color-Primary-Primary-800);
    align-items: center;
    justify-content: center;
}
.help-card__title {
    font-family: "Agbalumo", sans-serif;
    font-weight: 400;
    color: var(--help-brown);
    font-size: 1.375rem;
    margin: 0;
    line-height: 1.3;
}
.help-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.help-card__list li {
    color: var(--Color-System-color-System-600);
    font-size: .9375rem;
    padding-left: 1rem;
    position: relative;
}
.help-card__list li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: var(--Color-Primary-Primary-600);
    font-weight: 600;
}
.help-card__more {
    color: var(--Color-Primary-Primary-800) !important;
    font-weight: 500;
}

/* ---------- Article view ---------- */
.help-article {
    background: #fff;
    border: 1px solid var(--Color-System-color-System-200);
    border-radius: var(--help-radius);
    padding: 2.5rem 3rem;
    box-shadow: var(--help-shadow);
}
@media (max-width: 48rem) {
    .help-article {
        padding: 1.5rem 1.25rem;
    }
}

.help-article__title {
    font-family: "Agbalumo", sans-serif;
    color: var(--help-brown);
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 .75rem;
}
.help-article__summary {
    color: var(--Color-System-color-System-600);
    font-size: 1.125rem;
    line-height: 1.6;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--Color-System-color-System-200);
}
@media (max-width: 48rem) {
    .help-article__title {
        font-size: 1.875rem;
    }
}

/* Body content typography */
.help-article__body {
    font-family: "Outfit", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--Color-System-color-System-800);
}
.help-article__body .lead {
    font-size: 1.1875rem;
    color: var(--Color-System-color-System-800);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.help-article__body h3 {
    font-family: "Agbalumo", sans-serif;
    color: var(--help-brown);
    font-size: 1.625rem;
    font-weight: 400;
    margin: 2rem 0 .75rem;
    line-height: 1.3;
}
.help-article__body h4 {
    font-family: "Outfit", sans-serif;
    color: var(--Color-System-color-System-800);
    font-size: 1.1875rem;
    font-weight: 600;
    margin: 1.5rem 0 .5rem;
    line-height: 1.4;
}
.help-article__body p {
    margin: 0 0 1rem;
}
.help-article__body ul, .help-article__body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}
.help-article__body li {
    margin-bottom: .375rem;
}
.help-article__body a {
    color: var(--Color-Primary-Primary-800);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.help-article__body a:hover {
    color: var(--help-brown);
}
.help-article__body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: var(--Color-Primary-Primary-100);
    color: var(--Color-Primary-Primary-800);
    padding: .125rem .375rem;
    border-radius: .25rem;
    font-size: .9375em;
    border: 1px solid var(--Color-Primary-Primary-300);
}
.help-article__body strong {
    color: var(--Color-System-color-System-800);
    font-weight: 600;
}

/* Figures (article screenshots) — kept compact and centered so they
   illustrate without dominating the article body. */
.help-article__body figure {
    margin: 1.5rem auto 2rem;
    padding: 0;
    max-width: 28rem;
    border-radius: var(--help-radius-sm);
    overflow: hidden;
    background: var(--Color-Primary-Primary-100);
    border: 1px solid var(--Color-Primary-Primary-300);
}
.help-article__body figure img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}
.help-article__body figcaption {
    padding: .5rem .875rem;
    font-size: .8125rem;
    color: var(--Color-System-color-System-600);
    text-align: center;
    background: var(--Color-Primary-Primary-100);
    border-top: 1px solid var(--Color-Primary-Primary-300);
}
@media (max-width: 48rem) {
    .help-article__body figure {
        max-width: 100%;
    }
}
.help-article__body figure img {
    cursor: zoom-in;
    transition: filter .15s ease;
}
.help-article__body figure img:hover {
    filter: brightness(.97);
}

/* Lightbox overlay */
.help-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(34, 36, 36, .82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.help-lightbox--open {
    opacity: 1;
    pointer-events: auto;
}
.help-lightbox__img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: var(--help-radius-sm);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .4);
    background: #fff;
    transform: scale(.95);
    transition: transform .2s ease;
}
.help-lightbox--open .help-lightbox__img {
    transform: scale(1);
}
.help-lightbox__caption {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: "Outfit", sans-serif;
    font-size: .9375rem;
    background: rgba(0, 0, 0, .5);
    padding: .5rem 1rem;
    border-radius: .5rem;
    max-width: calc(100vw - 4rem);
    text-align: center;
}
.help-lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s ease;
}
.help-lightbox__close:hover {
    background: rgba(255, 255, 255, .25);
}
body.help-lightbox-open {
    overflow: hidden;
}

/* Callouts */
.help-article__body .callout {
    border-radius: var(--help-radius-sm);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-left: 4px solid var(--Color-Primary-Primary-600);
    background: var(--Color-Primary-Primary-100);
    color: var(--Color-System-color-System-800);
}
.help-article__body .callout--warning {
    border-left-color: #C97A14;
    background: #FFF3DB;
}
.help-article__body .callout--highlight {
    border-left-color: var(--help-brown);
    background: #FCEDE6;
    font-size: 1.125rem;
}
.help-article__body .callout strong {
    color: var(--help-brown);
}

/* Info-grid inside articles */
.help-article__body .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}
.help-article__body .info-card {
    background: var(--Color-Primary-Primary-100);
    border: 1px solid var(--Color-Primary-Primary-300);
    border-radius: var(--help-radius-sm);
    padding: 1rem 1.125rem;
}
.help-article__body .info-card h4 {
    margin: 0 0 .375rem;
    color: var(--help-brown);
    font-family: "Outfit", sans-serif;
    font-size: 1rem;
    font-weight: 600;
}
.help-article__body .info-card p {
    margin: 0;
    color: var(--Color-System-color-System-600);
    font-size: .9375rem;
    line-height: 1.5;
}

/* ---------- Pager (prev / next) ---------- */
.help-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}
@media (max-width: 32rem) {
    .help-pager {
        grid-template-columns: 1fr;
    }
}
.help-pager__link {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--Color-System-color-System-200);
    border-radius: var(--help-radius-sm);
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease;
    color: var(--Color-System-color-System-800);
}
/* The native `hidden` attribute is `display: none`, but `.help-pager__link`
   sets `display: flex` and would otherwise win. Force-respect `[hidden]` so
   first/last article pagers don't leave a phantom clickable slot. */
.help-pager__link[hidden] {
    display: none !important;
}
.help-pager__link:hover {
    border-color: var(--Color-Primary-Primary-600);
    transform: translateY(-1px);
}
.help-pager__link--next {
    text-align: right;
    grid-column-start: 2;
}
@media (max-width: 32rem) {
    .help-pager__link--next {
        grid-column-start: auto;
        text-align: left;
    }
}
.help-pager__label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--Color-Primary-Primary-800);
    font-weight: 600;
}
.help-pager__title {
    font-size: 1.0625rem;
    font-weight: 500;
}

/* ---------- Mobile search affordance ---------- */
@media (max-width: 48rem) {
    .help-search-input-wrap kbd {
        display: none;
    }
}

/* ---------- Print ---------- */
@media print {
    .header, .footer, .help-sidebar, .help-sidebar-toggle,
    .help-search-wrap, .help-pager, .help-sidebar-backdrop {
        display: none !important;
    }
    .help-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .help-article {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
