/* serveAI site header: Product / Solutions / Resources menus + mobile drawer.
   Self-contained on purpose: it is loaded by the homepage (which has its own
   design system) and by layouts.public, so every rule is namespaced `mk-` and
   its colours live in --mk-* variables scoped to the header. Nothing here
   styles anything outside the header. Behaviour: /assets/site/site.js. */

.mk-nav, .mk-skip, .mk-search {
    --mk-bg: rgba(255, 255, 255, .92);
    --mk-panel: #ffffff;
    --mk-soft: #f5f7fb;
    --mk-tint: #eef3fb;
    --mk-line: #e2e8f0;
    --mk-line-strong: #cbd5e1;
    --mk-text: #0b1b33;
    --mk-text-2: #3f4f66;
    --mk-text-3: #5f6e85;
    --mk-brand: #1d4ed8;
    --mk-brand-hover: #1743bd;
    --mk-brand-soft: #e9f0fd;
    --mk-btn: #1d4ed8;
    --mk-shadow: 0 24px 48px -18px rgba(16, 24, 40, .22);
    --mk-focus: 0 0 0 3px rgba(29, 78, 216, .35);
    --mk-h: 64px;
}
html.dark .mk-nav, html.dark .mk-skip, html.dark .mk-search {
    --mk-bg: rgba(7, 11, 20, .9);
    --mk-panel: #0f1728;
    --mk-soft: #141e33;
    --mk-tint: #0e1830;
    --mk-line: rgba(148, 163, 184, .16);
    --mk-line-strong: rgba(148, 163, 184, .3);
    --mk-text: #e8eef6;
    --mk-text-2: #aab6c8;
    --mk-text-3: #8b98ad;
    --mk-brand: #60a5fa;
    --mk-brand-hover: #93c5fd;
    --mk-brand-soft: rgba(59, 130, 246, .13);
    --mk-btn: #2563eb;
    --mk-shadow: 0 24px 48px -18px rgba(0, 0, 0, .7);
    --mk-focus: 0 0 0 3px rgba(96, 165, 250, .45);
}

.mk-skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--mk-btn); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.mk-skip:focus { top: 12px; }

.mk-nav {
    position: sticky; top: 0; z-index: 60;
    background: var(--mk-bg);
    backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--mk-line);
    font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}
.mk-nav *, .mk-nav *::before, .mk-nav *::after { box-sizing: border-box; }
.mk-nav a { color: inherit; text-decoration: none; }
.mk-nav :focus-visible { outline: none; box-shadow: var(--mk-focus); border-radius: 6px; }
.mk-nav svg { flex-shrink: 0; }
.mk-nav__inner { position: relative; display: flex; align-items: center; gap: 20px; height: var(--mk-h); max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.mk-nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--mk-text); flex-shrink: 0; }
.mk-nav__brand img { width: 30px; height: 30px; display: block; }
.mk-nav__menu { flex: 1; }
.mk-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.mk-nav__link, .mk-nav__trigger {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
    border-radius: 8px; border: 0; background: none; color: var(--mk-text-2);
    font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.mk-nav__link:hover, .mk-nav__trigger:hover, .mk-nav__trigger[aria-expanded="true"] { color: var(--mk-text); background: var(--mk-soft); }
.mk-nav__link[aria-current="page"] { color: var(--mk-text); font-weight: 600; }
.mk-nav__trigger svg { width: 14px; height: 14px; transition: transform .2s; }
.mk-nav__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mk-nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mk-nav__signin { color: var(--mk-text-2); font-weight: 500; font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.mk-nav__signin:hover { color: var(--mk-text); background: var(--mk-soft); }
.mk-nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-panel); color: var(--mk-text); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.mk-nav__burger svg { width: 22px; height: 22px; }
.mk-nav__mobile-cta { display: none; }

.mk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 38px; padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
    background: var(--mk-btn); color: #fff !important; font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2;
    cursor: pointer; box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .7); transition: background .15s, transform .15s;
}
.mk-btn:hover { background: var(--mk-brand-hover); transform: translateY(-1px); }
html.dark .mk-btn:hover { background: #1d4ed8; }
.mk-btn--ghost { background: var(--mk-panel); color: var(--mk-text) !important; border-color: var(--mk-line-strong); box-shadow: none; }
.mk-btn--ghost:hover { background: var(--mk-soft); }
.mk-btn--block { width: 100%; min-height: 46px; }

.mk-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--mk-panel); border: 1px solid var(--mk-line); border-top: 0;
    border-radius: 0 0 18px 18px; box-shadow: var(--mk-shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.mk-panel.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .16s ease; }
.mk-panel__inner { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)) 260px; gap: 26px; padding: 20px 24px 22px; }
.mk-panel__inner--nopromo { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.mk-panel__title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-text-3); margin: 0 0 10px; }
.mk-panel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mk-panel__link { display: flex; gap: 12px; padding: 7px 10px; margin: 0 -10px; border-radius: 10px; }
.mk-panel__link:hover, .mk-panel__link:focus-visible { background: var(--mk-soft); }
.mk-panel__icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--mk-brand-soft); color: var(--mk-brand); }
.mk-panel__icon svg { width: 18px; height: 18px; }
.mk-panel__label { display: block; font-weight: 600; font-size: 14.5px; color: var(--mk-text); line-height: 1.35; }
/* At most two lines: full descriptions made the Product menu taller than a
   laptop screen (747 px), so the page had to scroll to reach its last items. */
.mk-panel__blurb {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
    font-size: 12.5px; color: var(--mk-text-3); line-height: 1.4; margin-top: 2px;
}
.mk-panel__promo { background: var(--mk-tint); border: 1px solid var(--mk-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; align-self: start; }
.mk-panel__promo h3 { margin: 0; font-size: 16px; color: var(--mk-text); }
.mk-panel__promo p { margin: 0 0 6px; font-size: 13.5px; color: var(--mk-text-2); }
.mk-panel__foot { grid-column: 1 / -1; border-top: 1px solid var(--mk-line); padding-top: 14px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.mk-panel__foot a { color: var(--mk-brand); font-weight: 600; }
.mk-panel__foot a:hover { text-decoration: underline; }

@media (max-width: 1080px) {
    /* backdrop-filter would make the header the containing block of the
       fixed drawer, so the drawer would only be as tall as the header. */
    .mk-nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--mk-panel); }
    .mk-nav__inner { padding: 0 16px; }
    .mk-nav__burger { display: inline-flex; }
    .mk-nav__actions .mk-nav__signin, .mk-nav__actions .mk-btn { display: none; }
    .mk-nav__menu {
        position: fixed; inset: var(--mk-h) 0 0 0; z-index: 59;
        background: var(--mk-panel); overflow-y: auto; padding: 8px 16px 32px; display: none;
    }
    .mk-nav.is-open .mk-nav__menu { display: block; }
    .mk-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .mk-nav__item { border-bottom: 1px solid var(--mk-line); }
    .mk-nav__link, .mk-nav__trigger { width: 100%; height: 56px; justify-content: space-between; font-size: 17px; color: var(--mk-text); padding: 0 4px; }
    .mk-panel { position: static; box-shadow: none; border: 0; opacity: 1; visibility: visible; transform: none; display: none; transition: none; background: transparent; border-radius: 0; }
    .mk-panel.is-open { display: block; }
    .mk-panel__inner, .mk-panel__inner--nopromo { grid-template-columns: 1fr; gap: 18px; padding: 4px 4px 18px; }
    .mk-panel__blurb, .mk-panel__promo { display: none; }
    .mk-nav__mobile-cta { display: grid; gap: 10px; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .mk-panel, .mk-btn, .mk-nav__trigger svg { transition: none; }
}

/* Channel logo chips under a menu item (e.g. "One inbox for every channel"). */
.mk-chans { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.mk-chan { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 5px; border-radius: 999px;
    border: 1px solid var(--mk-line); background: var(--mk-soft); font-size: 11.5px; font-weight: 600; color: var(--mk-text-2); line-height: 1.6; white-space: nowrap; }
.mk-chan svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--mk-brand); }
.mk-panel__link:hover .mk-chan { background: var(--mk-panel); }
@media (max-width: 1080px) {
    .mk-chans { margin-top: 8px; }
}


/* ── Site search: header button + dialog ───────────────────────────── */
.mk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mk-nav__search {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 11px;
    border: 1px solid var(--mk-line); border-radius: 10px; background: var(--mk-soft); color: var(--mk-text-3);
    font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.mk-nav__search:hover { color: var(--mk-text); border-color: var(--mk-line-strong); background: var(--mk-panel); }
.mk-nav__search svg { width: 17px; height: 17px; }
.mk-nav__search-label { min-width: 140px; text-align: left; }
.mk-nav__search-key, .mk-search kbd {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
    border: 1px solid var(--mk-line); border-bottom-width: 2px; background: var(--mk-panel); color: var(--mk-text-3);
    font: 600 11.5px/1 'Inter', system-ui, sans-serif;
}
@media (max-width: 1240px) {
    .mk-nav__search { width: 36px; padding: 0; justify-content: center; }
    .mk-nav__search-label, .mk-nav__search-key { display: none; }
}
@media (max-width: 1080px) {
    .mk-nav__search { width: 44px; height: 44px; background: var(--mk-panel); color: var(--mk-text); }
    .mk-nav__search svg { width: 21px; height: 21px; }
}

.mk-search { position: fixed; inset: 0; z-index: 80; font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.5; }
.mk-search[hidden] { display: none; }
.mk-search *, .mk-search *::before, .mk-search *::after { box-sizing: border-box; }
.mk-search__backdrop { position: absolute; inset: 0; background: rgba(8, 15, 30, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s ease; }
.mk-search__box {
    position: relative; display: flex; flex-direction: column; width: min(680px, calc(100% - 32px)); max-height: min(620px, calc(100vh - 120px));
    margin: 84px auto 0; background: var(--mk-panel); color: var(--mk-text); border: 1px solid var(--mk-line); border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(8, 15, 30, .45), 0 0 0 1px rgba(255, 255, 255, .03);
    opacity: 0; transform: translateY(-10px) scale(.985); transition: opacity .18s ease, transform .2s cubic-bezier(.2, .8, .2, 1); overflow: hidden;
}
.mk-search.is-open .mk-search__backdrop { opacity: 1; }
.mk-search.is-open .mk-search__box { opacity: 1; transform: none; }
.mk-search__field { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--mk-line); }
.mk-search__field > svg { width: 20px; height: 20px; color: var(--mk-brand); }
.mk-search__input {
    flex: 1; min-width: 0; height: 62px; border: 0; outline: 0; background: transparent; color: var(--mk-text);
    font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
}
/* The page-wide :focus-visible ring in site.css (a 3px glow, rounded) wraps
   this borderless 62px input in a big outlined box on every page except the
   homepage, which does not load site.css. The open dialog already shows where
   typing goes, so the input keeps the homepage look everywhere. */
.mk-search__input:focus,
.mk-search__input:focus-visible { outline: 0; box-shadow: none; border-radius: 0; }
.mk-search__input::placeholder { color: var(--mk-text-3); }
.mk-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.mk-search__close { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 4px; cursor: pointer; color: var(--mk-text-3); border-radius: 8px; }
.mk-search__close svg { display: none; width: 22px; height: 22px; }
.mk-search__close:focus-visible, .mk-search__item:focus-visible { outline: none; box-shadow: var(--mk-focus); }
.mk-search__body { overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 12px; }
.mk-search__heading { margin: 6px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mk-text-3); }
.mk-search__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mk-search__item {
    display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px;
    color: var(--mk-text); text-decoration: none; border: 1px solid transparent;
    animation: mk-search-in .22s ease both; animation-delay: calc(var(--i, 0) * 22ms);
}
.mk-search__item:hover, [aria-selected="true"] > .mk-search__item { background: var(--mk-soft); border-color: var(--mk-line); }
.mk-search__icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: var(--mk-brand-soft); color: var(--mk-brand); }
.mk-search__icon svg { width: 20px; height: 20px; }
.mk-search__text { flex: 1; min-width: 0; }
.mk-search__title { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.mk-search__blurb { display: block; margin-top: 2px; font-size: 13px; color: var(--mk-text-3); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.mk-search__title mark, .mk-search__blurb mark { background: transparent; color: var(--mk-brand); font-weight: 700; }
.mk-search__type { flex-shrink: 0; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--mk-line); font-size: 11.5px; font-weight: 600; color: var(--mk-text-3); white-space: nowrap; }
.mk-search__arrow { flex-shrink: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--mk-text-3); transition: transform .18s ease, color .18s ease, background .18s ease; }
.mk-search__arrow svg { width: 17px; height: 17px; }
.mk-search__item:hover .mk-search__arrow, [aria-selected="true"] > .mk-search__item .mk-search__arrow { color: #fff; background: var(--mk-btn); transform: translateX(2px); }
.mk-search__empty { padding: 26px 14px 18px; text-align: center; color: var(--mk-text-2); font-size: 14px; }
.mk-search__empty p { margin: 0 0 6px; }
.mk-search__empty-title { font-weight: 600; color: var(--mk-text); font-size: 15.5px; }
.mk-search__empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.mk-search__foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--mk-line); background: var(--mk-soft); font-size: 12.5px; color: var(--mk-text-3); }
.mk-search__foot span { display: inline-flex; align-items: center; gap: 4px; }
@keyframes mk-search-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
    .mk-search__box { width: 100%; max-height: 100%; height: 100%; margin: 0; border-radius: 0; border: 0; }
    .mk-search__input { height: 60px; font-size: 16px; } /* 16px stops iOS zooming in on focus */
    .mk-search__close kbd { display: none; }
    .mk-search__close svg { display: block; }
    .mk-search__close { width: 44px; height: 44px; }
    .mk-search__type { display: none; }
    .mk-search__blurb { -webkit-line-clamp: 2; }
    .mk-search__foot { display: none; }
    .mk-search__item { padding: 12px 10px; }
}
@media (hover: none) { .mk-search__foot { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .mk-search__backdrop, .mk-search__box, .mk-search__arrow { transition: none; }
    .mk-search__item { animation: none; }
}
