/* ============================================================
   Knowledge Center · knowledge-center/index
   Search header, category index, and one themed Bootstrap
   accordion per category. Tokens + light/dark come from
   guest.css; Bootstrap 5 handles the collapse behaviour.
   ============================================================ */

.gk-wrap {
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.gk-breadcrumb {
    --bs-breadcrumb-divider-color: var(--g-text-faint);
    margin: 0;
    font-size: .82rem;
}

.gk-breadcrumb a { color: var(--g-text-muted); text-decoration: none; }
.gk-breadcrumb a:hover { color: var(--g-accent-ink); }
.gk-breadcrumb .active { color: var(--g-text); }

/* ---------- Search header ----------
   A single tinted band, centred. The accent wash sits top-centre so the
   search field reads as the focal point of the page. */
.gk-hero {
    position: relative;
    overflow: hidden;
    margin-top: 1.25rem;
    padding: clamp(2rem, 5vw, 3.25rem) clamp(1.25rem, 4vw, 3rem);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-xl);
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--g-accent) 9%, transparent), transparent 62%),
        var(--g-surface);
    text-align: center;
}

.gk-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--g-text-faint);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gk-hero__eyebrow i { color: var(--g-accent-ink); opacity: .85; }

.gk-hero__title {
    margin: .7rem 0 .5rem;
    color: var(--g-text);
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 780;
    letter-spacing: -.04em;
}

.gk-hero__lead {
    max-width: 44ch;
    margin: 0 auto;
    color: var(--g-text-muted);
    font-size: .94rem;
    line-height: 1.6;
}

/* Search field — same state language as .g-control, at hero scale. */
.gk-search {
    position: relative;
    display: flex;
    max-width: 38rem;
    align-items: center;
    margin: 1.75rem auto 0;
    border: 1px solid var(--g-border);
    border-radius: 999px;
    background: var(--g-surface);
    box-shadow: var(--g-shadow-sm);
    transition: border-color .18s var(--g-ease), box-shadow .18s var(--g-ease);
}

.gk-search:hover { border-color: var(--g-border-strong); }

.gk-search:focus-within {
    border-color: var(--g-accent);
    box-shadow: inset 0 0 0 1px var(--g-accent), 0 0 0 4px color-mix(in srgb, var(--g-accent) 13%, transparent);
}

.gk-search__icon {
    display: flex;
    flex: none;
    align-items: center;
    margin-left: 1.1rem;
    color: var(--g-text-faint);
    font-size: .95rem;
    pointer-events: none;
    transition: color .18s var(--g-ease);
}

.gk-search:focus-within .gk-search__icon { color: var(--g-accent-ink); }

.gk-search__input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 0 .85rem;
    border: 0;
    background: none;
    color: var(--g-text);
    font-size: .92rem;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}

.gk-search__input::placeholder { color: var(--g-text-faint); opacity: 1; }
/* The native clear affordance duplicates .gk-search__clear */
.gk-search__input::-webkit-search-cancel-button { display: none; }

.gk-search__clear {
    display: grid;
    width: 30px;
    height: 30px;
    flex: none;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--g-surface-2);
    color: var(--g-text-muted);
    font-size: .7rem;
    cursor: pointer;
    transition: background-color .16s var(--g-ease), color .16s var(--g-ease);
}

.gk-search__clear:hover { background: var(--g-border); color: var(--g-text); }
.gk-search__clear:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gk-search__clear[hidden] { display: none; }

.gk-search__submit {
    flex: none;
    margin: 4px;
    padding: .62rem 1.3rem;
    border: 0;
    border-radius: 999px;
    background: var(--g-gradient);
    color: #fff;
    font-size: .84rem;
    font-weight: 650;
    cursor: pointer;
    transition: filter .18s var(--g-ease);
}

.gk-search__submit:hover { filter: saturate(1.06) brightness(1.03); }
.gk-search__submit:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* Shortcut row under the search field */
.gk-shortcuts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.5rem;
}

.gk-shortcuts__label {
    color: var(--g-text-faint);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.gk-shortcut {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .38rem .8rem;
    border: 1px solid var(--g-border);
    border-radius: 999px;
    background: var(--g-surface);
    color: var(--g-text-muted);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .16s var(--g-ease), color .16s var(--g-ease), background-color .16s var(--g-ease);
}

.gk-shortcut i { color: var(--g-text-faint); font-size: .8rem; transition: color .16s var(--g-ease); }
.gk-shortcut:hover { border-color: var(--g-border-strong); background: var(--g-surface-2); color: var(--g-text); }
.gk-shortcut:hover i { color: var(--g-accent-ink); }
.gk-shortcut:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* ---------- Search aids ---------- */
/* Popular searches: one-tap queries under the box (and in the empty state). */
.gk-popular {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: 1rem;
}
.gk-chip {
    padding: .3rem .75rem;
    border: 1px solid color-mix(in srgb, var(--g-accent) 22%, var(--g-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--g-accent) 6%, var(--g-surface));
    color: var(--g-accent-ink);
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s var(--g-ease), background-color .16s var(--g-ease);
}
.gk-chip:hover {
    border-color: color-mix(in srgb, var(--g-accent) 40%, var(--g-border));
    background: color-mix(in srgb, var(--g-accent) 12%, var(--g-surface));
}
.gk-chip:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* ---------- Answer footer: related questions + copy link ---------- */
.gk-item__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px dashed var(--g-border);
}
.gk-related {
    display: flex;
    min-width: 0;
    flex: 1 1 20rem;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .35rem .9rem;
    font-size: .8rem;
}
.gk-related__label {
    color: var(--g-text-faint);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.gk-related__link {
    color: var(--g-accent-ink);
    font-weight: 600;
    text-decoration: none;
}
.gk-related__link:hover { text-decoration: underline; text-underline-offset: 2px; }
.gk-related__link:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; border-radius: 3px; }
.gk-copy {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border: 1px solid var(--g-border);
    border-radius: 999px;
    background: var(--g-surface);
    color: var(--g-text-muted);
    font: inherit;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s var(--g-ease), background-color .16s var(--g-ease), color .16s var(--g-ease);
}
.gk-copy:hover {
    border-color: color-mix(in srgb, var(--g-accent) 28%, var(--g-border));
    background: color-mix(in srgb, var(--g-accent) 8%, var(--g-surface));
    color: var(--g-accent-strong);
}
.gk-copy:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gk-copy.is-copied {
    border-color: color-mix(in srgb, var(--g-success) 40%, var(--g-border));
    background: color-mix(in srgb, var(--g-success) 10%, var(--g-surface));
    color: var(--g-success-ink);
}

/* Matched words (the typed word and its synonyms), in questions and
   answers: the theme's soft accent, as on the rest of the portal. */
mark.gk-mark {
    padding: 0 .1em;
    border-radius: 3px;
    background: color-mix(in srgb, var(--g-accent) 16%, transparent);
    color: var(--g-accent-strong);
}

/* While searching, the category cards shrink to one scrollable row of
   compact chips with live counts, so the results move up into view.
   Categories with no matches drop out; a chip still jumps to (and clears
   the search for) its category. */
.is-searching .gk-cats {
    display: flex;
    gap: .5rem;
    margin-top: 1.25rem;
    padding-bottom: .35rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}
.is-searching .gk-cat {
    flex: none;
    align-items: center;
    gap: .5rem;
    padding: .35rem .7rem .35rem .4rem;
    border-radius: 999px;
    scroll-snap-align: start;
}
.is-searching .gk-cat:hover { transform: none; box-shadow: none; }
.is-searching .gk-cat[data-gk-muted] { display: none; }
.is-searching .gk-cat__icon { width: 1.6rem; height: 1.6rem; border-radius: 999px; font-size: .78rem; }
.is-searching .gk-cat__body { flex: none; }
.is-searching .gk-cat__title { font-size: .8rem; white-space: nowrap; }
.is-searching .gk-cat__blurb { display: none; }
.is-searching .gk-cat__count { position: static; margin: 0 0 0 .1rem; }
/* Selected filter chip: the soft accent, as on the rest of the portal. */
.is-searching .gk-cat:hover { border-color: var(--g-border-strong); }
.is-searching .gk-cat.is-filter {
    border-color: color-mix(in srgb, var(--g-accent) 45%, var(--g-border));
    background: color-mix(in srgb, var(--g-accent) 9%, var(--g-surface));
}
.is-searching .gk-cat.is-filter .gk-cat__title { color: var(--g-accent-strong); }
.is-searching .gk-cat.is-filter .gk-cat__icon,
.is-searching .gk-cat.is-filter .gk-cat__count {
    background: color-mix(in srgb, var(--g-accent) 16%, var(--g-surface));
    color: var(--g-accent-ink);
}

/* While searching, the browse aids above the results step aside (the empty
   state keeps its own popular chips), and answers open/close instantly, so
   typing never triggers a cascade of slide animations. */
.is-searching .gk-popular,
.is-searching .gk-shortcuts { display: none; }
.is-searching .gk-item__panel.collapsing,
.gk-instant .gk-item__panel.collapsing { transition: none; }

/* "Best matches": the flat, ranked list shown while searching. Each row
   carries its category tag, which is hidden in the normal grouped view. */
.gk-results { margin-top: 1rem; }
.gk-results[hidden] { display: none; }
.gk-item__cat { display: none; }
.is-searching .gk-item__cat {
    display: inline-block;
    flex: none;
    margin-left: .75rem;
    padding: .12rem .5rem;
    border-radius: 999px;
    background: var(--g-surface-2);
    color: var(--g-text-faint);
    font-size: .68rem;
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .is-searching .gk-item__cat { display: none; }
}

/* ---------- Category index ---------- */
/* Six categories, so the column count is pinned rather than left to
   auto-fit — three across fills two even rows instead of stranding two
   cards on a half-empty second row. */
.gk-cats {
    display: grid;
    gap: .85rem;
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .gk-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
    .gk-cats { grid-template-columns: minmax(0, 1fr); }
}

.gk-cat {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1.1rem;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
    text-decoration: none;
    transition: transform .18s var(--g-ease), border-color .18s var(--g-ease), box-shadow .18s var(--g-ease);
}

.gk-cat:hover {
    transform: translateY(-2px);
    border-color: var(--g-border-strong);
    box-shadow: var(--g-shadow);
}

.gk-cat:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* Dimmed by knowledge.js when a search leaves the category with no hits. */
.gk-cat[data-gk-muted] {
    opacity: .4;
    pointer-events: none;
}

.gk-cat__icon {
    display: grid;
    width: 2.3rem;
    height: 2.3rem;
    flex: none;
    place-items: center;
    border-radius: 11px;
    background: var(--g-surface-2);
    box-shadow: inset 0 0 0 1px var(--g-border);
    color: var(--g-text-muted);
    font-size: 1rem;
    transition: color .18s var(--g-ease);
}

.gk-cat:hover .gk-cat__icon { color: var(--g-accent-ink); }

.gk-cat__body { flex: 1; min-width: 0; }

.gk-cat__title {
    display: block;
    color: var(--g-text);
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.gk-cat__blurb {
    display: block;
    margin-top: .2rem;
    color: var(--g-text-muted);
    font-size: .78rem;
    line-height: 1.5;
}

.gk-cat__count {
    flex: none;
    min-width: 1.7rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: var(--g-surface-2);
    color: var(--g-text-faint);
    font-size: .72rem;
    font-weight: 700;
    text-align: center;
}

/* ---------- Toolbar ---------- */
.gk-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 1.1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--g-border);
}

.gk-toolbar__count {
    margin: 0;
    color: var(--g-text-muted);
    font-size: .82rem;
}

.gk-toolbar__count b { color: var(--g-text); font-weight: 700; }

.gk-toolbar__toggle {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .44rem .9rem;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-surface);
    color: var(--g-text-muted);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s var(--g-ease), color .16s var(--g-ease), background-color .16s var(--g-ease);
}

.gk-toolbar__toggle:hover { border-color: var(--g-border-strong); background: var(--g-surface-2); color: var(--g-text); }
.gk-toolbar__toggle:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gk-toolbar__toggle i { font-size: .78rem; color: var(--g-text-faint); }

.gk-toolbar__toggle:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.gk-toolbar__toggle:disabled:hover {
    border-color: var(--g-border);
    background: var(--g-surface);
    color: var(--g-text-muted);
}

/* ---------- Category block ---------- */
.gk-group {
    margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
    /* Offset for the sticky header when a category link jumps here. */
    scroll-margin-top: 5.5rem;
}

.gk-group[hidden] { display: none; }

.gk-group__head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .9rem;
}

.gk-group__icon {
    display: grid;
    width: 1.75rem;
    height: 1.75rem;
    flex: none;
    place-items: center;
    border-radius: 8px;
    background: var(--g-surface-2);
    box-shadow: inset 0 0 0 1px var(--g-border);
    color: var(--g-text-muted);
    font-size: .82rem;
}

.gk-group__title {
    margin: 0;
    color: var(--g-text);
    font-size: 1.02rem;
    font-weight: 740;
    letter-spacing: -.02em;
}

.gk-group__count {
    padding: .1rem .45rem;
    border-radius: 999px;
    background: var(--g-surface-2);
    color: var(--g-text-faint);
    font-size: .7rem;
    font-weight: 700;
}

/* ---------- Accordion ----------
   Bootstrap's own variables carry the theme, so no !important fights.
   The chevron is redeclared because the stock icon has a baked-in colour.

   The rounded frame belongs to the container, which clips its children, so
   items stay square and a filtered list can never leave a stray corner or
   a doubled hairline behind. */
.gk-accordion {
    --bs-accordion-color: var(--g-text);
    --bs-accordion-bg: var(--g-surface);
    --bs-accordion-border-color: var(--g-border);
    --bs-accordion-btn-color: var(--g-text);
    --bs-accordion-btn-bg: transparent;
    --bs-accordion-btn-padding-x: 1.15rem;
    --bs-accordion-btn-padding-y: 1.05rem;
    --bs-accordion-btn-focus-box-shadow: none;
    /* The open question keeps the normal text colour: the state is told by the
       grey header and the accent chevron, so tinting the text too would be a
       third signal and pull the row away from the soft grey treatment. */
    --bs-accordion-active-color: var(--g-text);
    /* Left transparent so Bootstrap's own open background never lands; the
       grey is applied on .gk-item__button further down, and a value here would
       fight that rule. */
    --bs-accordion-active-bg: transparent;
    --bs-accordion-body-padding-x: 1.15rem;
    --bs-accordion-body-padding-y: 1.15rem;
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    /* Near-black (matches --g-text) rather than accent: the open row is a grey
       tone shift, so a coloured chevron was the last thing breaking that. */
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    --bs-accordion-btn-icon-width: .85rem;

    overflow: hidden;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-lg);
    background: var(--g-surface);
}

/* Separators only; the container draws the outline. No left edge: the open
   state is carried by the question's own tone and the arrow, so there is no
   accent rail to reserve a gutter for. */
.gk-accordion .gk-item {
    position: relative;
    border: 0;
    border-top: 1px solid var(--g-border);
    border-radius: 0;
    background: transparent;
    transition: background-color .18s var(--g-ease);
}

/* `--first` is set by knowledge.js on the first *visible* item of a group, so
   the top separator disappears even when the items above are filtered out. */
.gk-accordion .gk-item.gk-item--first { border-top: 0; }
.gk-accordion .gk-item > .accordion-header .accordion-button { border-radius: 0; }
.gk-item[hidden] { display: none; }
/* Deep-linked question (#faq-…): a short accent wash that fades out, so the
   eye lands on it after the scroll. Clears the sticky header when scrolled. */
.gk-accordion .gk-item { scroll-margin-top: 6rem; }
.gk-accordion .gk-item.is-target { animation: gk-target 2.2s var(--g-ease); }
@keyframes gk-target {
    0%, 35% { background: color-mix(in srgb, var(--g-accent) 9%, var(--g-surface)); }
    100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .gk-accordion .gk-item.is-target { animation: none; }
}

/* The open item itself stays on the plain surface. Only the question changes
   tone — to the same soft grey as its hover state — so opening an item reads
   as a quiet shift rather than a coloured panel, and the answer sits on clean
   surface for reading. The arrow carries the rest of the state. */

.gk-item__button {
    gap: .75rem;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
}

/* Three grey steps, light to dark: idle (plain surface) → hover
   (--g-surface-2) → open. Open has to land past hover or the two states look
   identical and the row stops telling you anything; this sits between
   surface-2 and --g-border, which is a clear step without becoming a slab. */
.gk-item__button:not(.collapsed) {
    background: color-mix(in srgb, var(--g-border) 60%, var(--g-surface-2));
    font-weight: 650;
}

.gk-item__button:hover { background: var(--g-surface-2); }
/* Hovering an already-open question goes one step deeper again, or the row
   would give no feedback at all. */
.gk-item:has(.accordion-button:not(.collapsed)) .gk-item__button:hover {
    background: var(--g-border);
}
.gk-item__button:focus-visible { outline: 2px solid var(--g-accent); outline-offset: -2px; }

/* Chevron. Bootstrap renders it as a background image on ::after sized by
   --bs-accordion-btn-icon-width; widening the box and centring the image
   turns it into a tile, which gives the control a visible hit area instead of
   a bare floating glyph. Open gets a filled grey tile and, via Bootstrap's
   active icon, the accent chevron — the one spot of colour in the open state
   now that the rail and tint are gone. */
.gk-item__button::after {
    width: 1.65rem;
    height: 1.65rem;
    background-position: center;
    background-size: var(--bs-accordion-btn-icon-width);
    border-radius: 50%;
    transition: background-color .18s var(--g-ease), transform .2s var(--g-ease);
}
.gk-item__button:hover::after { background-color: var(--g-border); }
.gk-item__button:not(.collapsed)::after {
    background-color: color-mix(in srgb, var(--g-border) 70%, var(--g-surface));
}

.gk-item__q { flex: 1; }

/* The answer stays on the plain surface, so the grey question above reads as
   the only thing that changed. Extra bottom padding keeps the last line off
   the next item's separator, which the old 1.15rem left looking cramped. */
.gk-item__body {
    padding-top: .9rem;
    padding-bottom: 1.4rem;
    background: transparent;
    color: var(--g-text-muted);
    font-size: .86rem;
    line-height: 1.68;
}

.gk-item__a { margin: 0; }

.gk-steps {
    margin: .85rem 0 0;
    padding-left: 1.3rem;
    display: grid;
    gap: .45rem;
}

.gk-steps li { padding-left: .2rem; }
.gk-steps li::marker { color: var(--g-accent-ink); font-weight: 700; }

/* The answer's call to action. A bordered pill rather than a plain inline
   link: it is the one actionable thing in a block of prose, and as bare text
   it disappeared into the paragraph above it. Outlined rather than filled so
   it stays secondary to the page's real primary buttons. */
.gk-item__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1.1rem;
    padding: .45rem .9rem;
    border: 1px solid color-mix(in srgb, var(--g-accent) 35%, var(--g-border));
    border-radius: 999px;
    background: var(--g-surface);
    color: var(--g-accent-ink);
    font-size: .8rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color .16s var(--g-ease), background-color .16s var(--g-ease), color .16s var(--g-ease);
}

.gk-item__link:hover {
    border-color: var(--g-accent);
    background: color-mix(in srgb, var(--g-accent) 8%, var(--g-surface));
    color: var(--g-accent-strong);
}
.gk-item__link:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gk-item__link i { font-size: .72rem; transition: transform .16s var(--g-ease); }
.gk-item__link:hover i { transform: translateX(2px); }

[data-guest-theme="dark"] .gk-item__link {
    border-color: color-mix(in srgb, var(--g-accent) 45%, var(--g-border));
    background: transparent;
    color: var(--g-accent);
}
[data-guest-theme="dark"] .gk-item__link:hover {
    border-color: var(--g-accent);
    background: color-mix(in srgb, var(--g-accent) 16%, transparent);
    color: var(--g-ink-on-navy);
}

.gk-note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: .95rem 0 0;
    padding: .65rem .75rem;
    border: 1px solid var(--g-border);
    border-radius: 9px;
    background: var(--g-surface-2);
    color: var(--g-text-muted);
    font-size: .78rem;
    line-height: 1.55;
}

.gk-note i { margin-top: .12rem; flex: none; color: var(--g-text-faint); }

/* ---------- Empty search result ---------- */
.gk-empty {
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    border: 1px dashed var(--g-border-strong);
    border-radius: var(--g-r-xl);
    background: var(--g-surface);
    text-align: center;
}

.gk-empty[hidden] { display: none; }

.gk-empty__icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: var(--g-surface-2);
    color: var(--g-text-faint);
    font-size: 1.15rem;
}

.gk-empty h2 {
    margin: 0 0 .5rem;
    color: var(--g-text);
    font-size: 1.1rem;
    font-weight: 740;
    letter-spacing: -.02em;
}

.gk-empty h2 span { color: var(--g-accent-ink); }

.gk-empty p {
    max-width: 38ch;
    margin: 0 auto;
    color: var(--g-text-muted);
    font-size: .86rem;
    line-height: 1.6;
}

.gk-empty__reset {
    margin-top: 1.25rem;
    padding: .55rem 1.1rem;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-surface);
    color: var(--g-text);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .16s var(--g-ease), background-color .16s var(--g-ease);
}

.gk-empty__reset:hover { border-color: var(--g-border-strong); background: var(--g-surface-2); }
.gk-empty__reset:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* Empty state extras: did-you-mean, popular chips, next-step links. */
.gk-empty__suggest[hidden] { display: none; }
.gk-empty__suggest-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--g-accent-ink);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.gk-empty__suggest-btn:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
.gk-empty__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem;
    margin: .5rem 0 1rem;
}
/* The row owns the spacing; both buttons share one size and baseline (the
   reset button's own top margin used to drop it below its neighbour). */
.gk-empty__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.25rem;
}
.gk-empty__actions .gk-empty__reset { margin-top: 0; }
.gk-empty__actions .gk-empty__reset,
.gk-empty__link {
    min-height: 2.4rem;
    line-height: 1.2;
}
.gk-empty__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.1rem;
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-md);
    background: var(--g-surface);
    color: var(--g-text);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
}
.gk-empty__link:hover {
    border-color: color-mix(in srgb, var(--g-accent) 28%, var(--g-border));
    background: color-mix(in srgb, var(--g-accent) 8%, var(--g-surface));
    color: var(--g-accent-strong);
}
.gk-empty__link:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* ---------- Support panel ---------- */
.gk-support {
    /* Accent glow in the band corner (always-dark surface). */
    --gk-support-glow: rgba(37, 99, 235, .20);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    overflow: hidden;
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    border: 1px solid var(--g-border);
    border-radius: var(--g-r-xl);
    background:
        radial-gradient(circle at 100% 0%, var(--gk-support-glow), transparent 45%),
        var(--g-navy);
    color: #fff;
    box-shadow: var(--g-shadow-lg);
}

.gk-support__copy { flex: 1 1 22rem; min-width: 0; }

.gk-support__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--g-ink-on-navy);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.gk-support h2 {
    margin: .6rem 0 .5rem;
    color: #fff;
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 740;
    letter-spacing: -.025em;
}

.gk-support p {
    max-width: 48ch;
    margin: 0;
    color: rgba(255, 255, 255, .64);
    font-size: .86rem;
    line-height: 1.65;
}

.gk-support__links {
    display: grid;
    flex: 0 1 15rem;
    gap: .5rem;
}

.gk-support__link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem .9rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--g-r-md);
    background: rgba(255, 255, 255, .05);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s var(--g-ease), border-color .18s var(--g-ease);
}

.gk-support__link:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; }
.gk-support__link:focus-visible { outline: 2px solid var(--g-ink-on-navy); outline-offset: 2px; }
.gk-support__link i { flex: none; color: var(--g-ink-on-navy); font-size: .95rem; }

/* ---------- Dark theme ---------- */
[data-guest-theme="dark"] .gk-accordion {
    --bs-accordion-active-color: var(--g-text);
    --bs-accordion-active-bg: transparent;
    --bs-accordion-btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b7a95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
    /* Matches --g-text on dark, mirroring the light theme's near-black. */
    --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e8edf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
}

/* Open question, dark: --g-surface-2 is only a few points off --g-surface on
   the near-black card, so a plain white lift is used instead of the token to
   keep the same gentle step the light theme gets. The item and the answer body
   stay on the plain surface, as in light mode. */
[data-guest-theme="dark"] .gk-item__button:not(.collapsed) {
    background: rgba(255, 255, 255, .08);
}

[data-guest-theme="dark"] .gk-item__button:hover { background: rgba(255, 255, 255, .045); }
[data-guest-theme="dark"] .gk-item:has(.accordion-button:not(.collapsed)) .gk-item__button:hover {
    background: rgba(255, 255, 255, .115);
}

[data-guest-theme="dark"] .gk-item__button:hover::after {
    background-color: rgba(255, 255, 255, .09);
}
[data-guest-theme="dark"] .gk-item__button:not(.collapsed)::after {
    background-color: rgba(255, 255, 255, .12);
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    .gk-search {
        flex-wrap: wrap;
        border-radius: var(--g-r-lg);
    }

    .gk-search__input { min-height: 48px; }

    .gk-search__submit {
        width: calc(100% - 8px);
        margin: 0 4px 4px;
        border-radius: var(--g-r-md);
    }

    .gk-support__links { flex-basis: 100%; }
}
