/* ============================================================
   The account corner of the navbar: the sign-in link, the account pill, its
   menu and the notification bell, and the theme switch beside them. Loaded
   by every page that loads js/auth.js, whatever navbar it has.
   (Moved out of css/account.css on 2026-09-27.)
   ============================================================ */
/* ── Navbar right cluster ────────────────────────────────────────────────
   site-nav.css centres the tabs and pins the theme switch to the right of
   the container. The account control belongs in that same right-hand group,
   not in the tab list, so js/auth.js builds a cluster there and moves the
   theme switch into it. Order inside: theme switch, then account.
   ------------------------------------------------------------------------ */

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (min-width: 992px) {
    body .navbar > .container > .nav-right {
        position: absolute;
        right: var(--bs-gutter-x, 0.75rem);
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
    }

    /*
     * Before js/auth.js runs, site-nav.css has the theme switch pinned flush
     * right. Afterwards it sits in the cluster with the account slot to its
     * right. Pre-offsetting it by exactly that slot plus the flex gap means
     * both positions are the same one, so moving it in the DOM shifts nothing.
     */
    body .navbar .theme-picker-nav-item--desktop {
        right: calc(var(--bs-gutter-x, 0.75rem) + var(--qa-slot, 92px) + 12px);
    }

    /* Released from the absolute pin so it can sit in the flex row rather
       than on top of the account control. */
    body .navbar .nav-right .theme-picker-nav-item--desktop {
        position: static;
        transform: none;
        right: auto;
        top: auto;
        margin: 0;
    }
}

@media (max-width: 991.98px) {
    /* The bar reads logo, theme switch, account control, menu button, with
       the menu button in the corner. The theme switch has its own mobile
       toolbar, so only the account control is here. The order is set here
       rather than in the markup, so it holds whatever js/auth.js and
       js/theme-picker.js insert, and it is right on the first frame. */
    body .navbar > .container > .nav-right {
        margin-left: auto;
        margin-right: 0;
        order: 1;
    }
    /* With the theme switch's own mobile toolbar in the bar, that toolbar
       pushes the whole group right. Two pushers split the spare room and
       leave the switch and menu button floating mid-bar on a tablet. */
    body .navbar > .container:has(> .theme-picker-nav-item--toolbar) > .nav-right {
        margin-left: 12px;
    }
    /*
     * The three lines are drawn 4px in from each side of the 30px icon, so
     * with 8px of padding they sit 12px inside the button. Pulling the button
     * out by that much puts the lines on the container's padding edge, the
     * same distance from the right as the logo is from the left, and leaves
     * the 12px inside the button as the gap after the account control. The
     * tap target keeps its full size.
     */
    body .navbar > .container > .navbar-toggler {
        order: 2;
        padding: 6px 8px;
        margin-left: 0;
        margin-right: -12px;
    }
}


/*
 * The account control is filled in only after /api/me answers, which is a
 * network round trip. Left to itself the slot starts at zero width, so the
 * theme switch sits flush right and then jumps left when the button arrives.
 *
 * Reserving the width up front fixes the switch in its final position on the
 * first paint, whatever the answer turns out to be. The signed-out button is
 * the narrowest state, so that is the reservation; the signed-in pill is wider
 * and has its own width capped below so it cannot grow without limit.
 */
.qa-nav {
    display: flex;
    justify-content: flex-end;
    /*
     * js/auth-boot-inline.js sets --qa-slot from the width this control had
     * last time in this tab. The fallback is the signed-out button, which is
     * the narrowest state and all a first visit can assume.
     *
     * min-width, never width: a fixed width cannot grow, so a signed-in pill
     * arriving in a tab with nothing remembered would overflow its slot and
     * sit on top of the theme switch. This reserves the space and still lets
     * the rare wider case push the switch along instead of colliding with it.
     */
    min-width: var(--qa-slot, 92px);
}

/* A long username would otherwise widen the whole cluster and push the theme
   switch off toward the tabs. */
.qa-name {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .qa-nav {
        min-width: 0;
    }

    /* Inter arrives a moment after the first paint, and the fallback font
       draws "Sign In" about 12px narrower. Holding the button at its Inter
       width keeps the theme switch beside it from sliding over when the font
       swaps in. */
    .qa-signin {
        min-width: 78px;
        justify-content: center;
    }
}

/* ── Account control ─────────────────────────────────────────────────────── */

.qa-signin,
.qa-account {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease;
}

.qa-account {
    padding: 5px 14px 5px 5px;
}

.qa-signin:hover,
.qa-account:hover,
.qa-signin:focus-visible,
.qa-account:focus-visible {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

/* The divider between the name and the caret belongs to the caret, so it has
   to be lit from here or the name lights on three sides and stops dead. */
.qa-account:hover + .qa-caret,
.qa-account:focus-visible + .qa-caret {
    border-left-color: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .qa-account:hover + .qa-caret,
html[data-theme="light"] .qa-account:focus-visible + .qa-caret {
    border-left-color: rgba(30, 39, 72, 0.7);
}

html[data-theme="light"] .qa-signin,
html[data-theme="light"] .qa-account {
    border-color: rgba(30, 39, 72, 0.3);
    color: var(--text-primary, #171b33);
}

html[data-theme="light"] .qa-signin:hover,
html[data-theme="light"] .qa-account:hover {
    border-color: rgba(30, 39, 72, 0.7);
    background: rgba(30, 39, 72, 0.06);
    color: var(--text-primary, #171b33);
}

.qa-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(150, 170, 255, 0.22);
    flex: 0 0 auto;
}

.qa-avatar--letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
}

html[data-theme="light"] .qa-avatar--letter {
    color: var(--text-primary, #171b33);
    background: rgba(30, 39, 72, 0.12);
}

/* ── Sign-in panel ───────────────────────────────────────────────────────── */

.si-shell {
    min-height: calc(100vh - 108px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 60px;
}

.si-card {
    width: min(420px, 100%);
}

.si-body {
    padding: 34px 36px 30px;
    text-align: center;
}

.si-mark {
    width: 46px;
    height: auto;
    margin: 0 auto 22px;
    display: block;
    opacity: 0.9;
}

.si-title {
    font-family: var(--font-display, 'Khand', sans-serif);
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--pr-ink);
    margin: 0 0 8px;
}

.si-sub {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--pr-muted);
    margin: 0 0 26px;
}

/*
 * Google's button, to their brand guidance: white surface, their four-colour
 * mark at 18px, Roboto, and the wording "Sign in with Google" unaltered.
 * Deliberately not restyled to match the site. People are scanning for the
 * button they already recognise, and a bespoke one reads as a phishing page.
 */
.si-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #747775;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    font-family: 'Roboto', var(--font-body, system-ui), sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow .15s ease, background .15s ease;
}

.si-google:hover,
.si-google:focus-visible {
    background: #f7f8f8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    color: #1f1f1f;
    text-decoration: none;
}

.si-google:active {
    background: #f1f3f4;
}

.si-google svg {
    flex: 0 0 auto;
}

.si-google[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* What signing in actually gives you. Three concrete things, not a pitch. */
.si-list {
    list-style: none;
    margin: 26px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--pr-line);
    text-align: left;
}

.si-list li {
    display: grid;
    grid-template-columns: 13px minmax(0, 1fr);
    column-gap: 12px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--pr-muted);
}

.si-list li + li {
    margin-top: 9px;
}

.si-list li::before {
    content: '';
    width: 13px;
    height: 1.55em;
    background: var(--pr-accent);
    -webkit-mask: var(--pr-check) center / 12px 12px no-repeat;
    mask: var(--pr-check) center / 12px 12px no-repeat;
}

.si-fine {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--pr-faint);
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--pr-line);
}

.si-fine a {
    color: var(--pr-muted);
}

.si-error {
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--pr-error);
    margin: 16px 0 0;
    text-align: left;
}

@media (max-width: 480px) {
    .si-body {
        padding: 28px 22px 24px;
    }
}

/* ── Account menu ────────────────────────────────────────────────────────── */

.qa-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* The name and the caret read as one control, so the rounded ends sit on the
   outside of the pair rather than on each half. */
.qa-wrap .qa-account {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.qa-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    padding-right: 3px;
    line-height: 0;
    align-self: stretch;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.qa-caret:hover,
.qa-caret[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
}

.qa-caret svg {
    transition: transform .15s ease;
}

.qa-caret[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

html[data-theme="light"] .qa-caret {
    border-color: rgba(30, 39, 72, 0.3);
    color: var(--text-primary, #171b33);
}

html[data-theme="light"] .qa-caret:hover,
html[data-theme="light"] .qa-caret[aria-expanded="true"] {
    border-color: rgba(30, 39, 72, 0.7);
    background: rgba(30, 39, 72, 0.06);
}

.qa-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    border: 1px solid var(--pr-line-strong, rgba(150, 170, 255, 0.34));
    border-radius: 10px;
    background: var(--pr-surface, #0d0e1f);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    z-index: 1200;
}

html[data-theme="light"] .qa-menu {
    background: #fff;
    box-shadow: 0 14px 40px rgba(20, 30, 70, 0.16);
}

.qa-menu-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--pr-ink, #eef1fb);
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.qa-menu-item:hover,
.qa-menu-item:focus-visible {
    background: var(--pr-current-bg, rgba(150, 170, 255, 0.08));
    color: var(--pr-ink, #eef1fb);
    text-decoration: none;
}

/* Shown on a private profile, which only its owner can reach. */
/* Plain text flow, not flex: a gap between inline items pushes the full stop
   away from the link it belongs to. */
.pf-private {
    padding: 11px 16px;
    line-height: 1.5;
    margin: 0 0 14px;
    border: 1px solid var(--pr-line-strong);
    border-radius: 8px;
    font-size: 0.86rem;
    color: var(--pr-muted);
}

.pf-private a {
    color: var(--pr-accent);
}


/* ── Notification bell ───────────────────────────────────────────────────── */

/* Left of the name, in the same outline as the pill; the count sits on its
   bottom-right edge, as bells do. Filled in by js/notifications.js. */
.qa-bell {
    position: relative;
    margin-right: 8px;
    align-self: stretch;
    display: flex;
}

.qa-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.qa-bell-btn:hover,
.qa-bell-btn:focus-visible,
.qa-bell-btn[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .qa-bell-btn {
    border-color: rgba(30, 39, 72, 0.3);
    color: var(--text-primary, #171b33);
}

html[data-theme="light"] .qa-bell-btn:hover,
html[data-theme="light"] .qa-bell-btn[aria-expanded="true"] {
    border-color: rgba(30, 39, 72, 0.7);
    background: rgba(30, 39, 72, 0.06);
}

.qa-bell-count {
    position: absolute;
    right: -5px;
    bottom: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 2px var(--qa-bell-ring, #0a0a1a);
    color: #fff;
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.qa-bell-count[hidden] {
    display: none;
}

html[data-theme="light"] .qa-bell-count {
    --qa-bell-ring: #fff;
}

.qa-bell-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: -60px;
    width: 360px;
    max-width: calc(100vw - 24px);
    border: 1px solid var(--pr-line-strong, rgba(150, 170, 255, 0.34));
    border-radius: 12px;
    background: var(--pr-surface, #0d0e1f);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    color: var(--pr-ink, #eef1fb);
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    text-align: left;
    overflow: hidden;
    z-index: 1200;
}

.qa-bell-menu[hidden] {
    display: none;
}

html[data-theme="light"] .qa-bell-menu {
    background: #fff;
    box-shadow: 0 14px 40px rgba(20, 30, 70, 0.16);
    color: #151932;
    --pr-ink: #151932;
    --pr-muted: #5b6285;
    --pr-faint: #8189a8;
    --pr-line: rgba(40, 50, 120, 0.12);
    --pr-current-bg: rgba(40, 50, 120, 0.06);
}

.qa-note-head {
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--pr-line, rgba(150, 170, 255, 0.16));
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pr-faint, #6c749a);
}

.qa-note-list {
    max-height: min(420px, 60vh);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.qa-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 11px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--pr-line, rgba(150, 170, 255, 0.16));
    color: inherit;
    text-decoration: none;
    line-height: 1.4;
}

.qa-note:hover,
.qa-note:focus-visible {
    background: var(--pr-current-bg, rgba(150, 170, 255, 0.08));
    color: inherit;
    text-decoration: none;
}

.qa-note-pic {
    position: relative;
    display: inline-flex;
}

.qa-note-av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(150, 170, 255, 0.22);
}

.qa-note-av--letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.qa-note-kind {
    position: absolute;
    right: -4px;
    bottom: -3px;
    width: 17px;
    height: 17px;
    padding: 2px;
    border-radius: 50%;
    background: var(--pr-surface, #0d0e1f);
    color: #7dd3fc;
}

html[data-theme="light"] .qa-note-kind {
    background: #fff;
    color: #2563eb;
}

.qa-note--like .qa-note-kind { color: #f43f5e; }
.qa-note--solution .qa-note-kind { color: #22c55e; }
.qa-note--announcement .qa-note-kind { color: #a78bfa; }

.qa-note-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.qa-note-text {
    font-size: 0.86rem;
}

.qa-note-detail {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--pr-muted, #99a1c4);
}

.qa-note-time {
    font-size: 0.74rem;
    color: var(--pr-faint, #6c749a);
    white-space: nowrap;
}

.qa-note-empty {
    margin: 0;
    padding: 22px 16px;
    font-size: 0.88rem;
    text-align: center;
    color: var(--pr-muted, #99a1c4);
}

.qa-note-dismiss {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    background: transparent;
    color: var(--pr-ink, #eef1fb);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.qa-note-dismiss:hover,
.qa-note-dismiss:focus-visible {
    background: var(--pr-current-bg, rgba(150, 170, 255, 0.08));
}

@media (max-width: 991.98px) {
    .qa-bell-menu {
        position: fixed;
        top: 64px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}


/*
 * Phones: signed in, the bar holds the logo, theme switch, bell, account
 * button and menu. The name never fits beside them, so below 768px the button
 * is the picture alone on every page (the menu under it still says who you
 * are). At full size the row needs about 391px, so up to 400px everything
 * tightens a little (about 322px), and the skinniest phones (a folded Galaxy
 * Fold is 280px) get a further step below. Otherwise the bell and account
 * button wrap onto a second row that covers the top of the page.
 */
@media (max-width: 767.98px) {
    .qa-name {
        display: none;
    }
}

@media (max-width: 399.98px) {
    body .navbar .navbar-brand img {
        width: 78px !important;
        max-width: 78px !important;
    }

    body .navbar > .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    body .navbar > .container:has(> .theme-picker-nav-item--toolbar) > .nav-right {
        margin-left: 10px;
    }

    .qa-bell {
        margin-right: 4px;
    }

    .qa-bell-btn {
        width: 34px;
        min-height: 34px;
    }

    .qa-account {
        padding: 4px 8px 4px 4px;
    }

    .qa-caret {
        width: 26px;
    }

    /* 4px of padding puts the lines 8px inside the button: 2px of margin
       makes a 10px gap after the account control, matching the one before
       it, and the lines land 10px from the edge, like the logo. */
    body .navbar > .container > .navbar-toggler {
        padding: 6px 4px;
        margin-left: 2px;
        margin-right: -8px;
    }
}

/* The skinniest phones: a smaller logo and theme switch, and the account
   controls a few pixels slimmer, all still comfortable to tap. */
@media (max-width: 329.98px) {
    body .navbar .navbar-brand img {
        width: 58px !important;
        max-width: 58px !important;
    }

    body .navbar > .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    body .navbar > .container > .nav-right,
    body .navbar > .container:has(> .theme-picker-nav-item--toolbar) > .nav-right {
        margin-left: 6px;
    }

    /* Lines 5px inside the button: a 6px gap and an 8px edge. */
    body .navbar > .container > .navbar-toggler {
        padding: 6px 1px;
        margin-left: 1px;
        margin-right: -5px;
    }

    body .navbar .theme-picker-nav-item--toolbar {
        zoom: 0.85;
    }

    .qa-bell {
        margin-right: 3px;
    }

    .qa-bell-btn {
        width: 32px;
        min-height: 32px;
    }

    .qa-account {
        gap: 6px;
        padding: 3px 6px 3px 3px;
    }

    .qa-caret {
        width: 24px;
    }
}

/*
 * The tabs are centred on the page and the account corner is pinned right,
 * so they only clear each other when the bar is wide enough. The name in the
 * account button costs up to ~150px; below 1440px it is the picture alone
 * (the menu under it still says who you are), and below 1200px the tabs
 * are a little smaller too. Below 992px the bar collapses to the menu.
 */
@media (min-width: 992px) and (max-width: 1439.98px) {
    .qa-name {
        display: none;
    }

    .qa-account {
        padding: 5px 8px 5px 5px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    body .navbar-dark .navbar-nav .nav-link {
        font-size: 1.12em !important;
        margin: 0 5px;
    }
}

/* ── Verified badge ──────────────────────────────────────────────────────── */

/* Here, with the navbar, rather than in css/account.css: the badge sits next to
   the account name in the navbar on every page, and pages that do not load
   account.css (the blog, careers, /ai…) showed the name without it. */

/*
 * Sized in em so it scales with whatever it sits beside: large next to the
 * 2.2rem name on a profile, small next to the 0.9rem name in the navbar, no
 * separate rules for either.
 *
 * vertical-align keeps it on the text baseline rather than the bottom of the
 * line box, which is where an inline svg would otherwise land and drag the
 * line height with it.
 */
.qb-verified {
    position: relative;
    display: inline-block;
    width: 0.82em;
    height: 0.82em;
    /*
     * Fixed colours, not the theme accent. The accent is pale on the dark
     * theme and considerably darker on the light one, so the badge used to
     * change colour with the page. A badge is a fixed thing and should look
     * the same wherever it appears, and both of these are legible on either
     * background.
     *
     * Blue is verification, which is the colour everybody already reads that
     * way. Purple is the house colour, and an employee outranks a verified
     * account, so it is the one that gets it.
     */
    --qb-seal: #1d9bf0;
    /* The seal is drawn with about 13% clear space inside its own box, so the
       margin here is smaller than the gap you actually see. */
    margin-left: 0.14em;
    vertical-align: baseline;
    color: var(--qb-seal);
    flex: 0 0 auto;
}

.qb-verified--employee {
    --qb-seal: #6B5FC7;
}

.qb-verified-mark {
    display: block;
    width: 100%;
    height: 100%;
}

/*
 * In the navbar the pill is a flex row with a 9px gap, which the badge was
 * collecting on top of its own margin and sitting a clear 16px off the name.
 * The negative margin takes that gap back: it is meant for the space between
 * the avatar and the name, not for punctuation hanging off the end of it.
 */
.qa-account .qb-verified {
    align-self: center;
    margin-left: -6px;
    width: 14px;
    height: 14px;
}

/* ── Hover bubble ────────────────────────────────────────────────────────── */

/*
 * position: fixed, with the coordinates handed in by js/auth.js.
 *
 * Absolute positioning put the bubble inside whatever the badge sits in, and
 * on a profile that is the name heading, which clamps to two lines and so
 * clips anything that overflows it. A fixed box is laid out against the
 * viewport instead, which no ancestor's overflow can cut off, and the script
 * is then free to keep it on screen near the window edges.
 *
 * Sized in rem, not em: the badge takes its size from whatever it sits beside,
 * and next to a 2.2rem heading a bubble in em would come out enormous.
 */
.qb-verified::after,
.qb-tip::after {
    content: attr(data-tip);
    position: fixed;
    left: var(--qb-tip-x, -9999px);
    top: var(--qb-tip-y, -9999px);
    transform: translateX(-50%);
    z-index: 2200;
    padding: 7px 12px;
    border: 1px solid var(--pr-line-strong, rgba(150, 170, 255, 0.34));
    border-radius: 7px;
    background: var(--pr-surface, #0d0e1f);
    color: var(--pr-ink, #eef1fb);
    font-family: var(--font-body, 'Inter', system-ui, sans-serif);
    font-size: 0.78rem;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
    white-space: nowrap;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease;
}

/* The arrow stays on the badge even when the bubble has been nudged sideways
   to clear a window edge, so it is given its own coordinate. A rotated square,
   so it borrows the bubble's border and background and cannot fall out of
   step with them. */
.qb-verified::before,
.qb-tip::before {
    content: "";
    position: fixed;
    left: var(--qb-arrow-x, -9999px);
    top: var(--qb-arrow-y, -9999px);
    z-index: 2201;
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg);
    border-left: 1px solid var(--pr-line-strong, rgba(150, 170, 255, 0.34));
    border-top: 1px solid var(--pr-line-strong, rgba(150, 170, 255, 0.34));
    background: var(--pr-surface, #0d0e1f);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease;
}

.qb-verified.is-tipped::after,
.qb-verified.is-tipped::before,
.qb-tip.is-tipped::after,
.qb-tip.is-tipped::before {
    opacity: 1;
    visibility: visible;
}

.qb-verified:focus-visible {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .qb-verified::after,
    .qb-verified::before { transition: none; }
}

/*
 * Below 992px the bar is one row: logo, theme switch, menu button, bell and
 * account. The sizes above fit it on every phone width we test, but a phone
 * can still end up a few pixels short (larger text or display zoom, a long
 * badge), and then flex wrapping drops the bell and account onto a second
 * row. So while the menu is closed the row may not wrap at all: the spare
 * gaps close first and the logo gives up the last few pixels. When the menu
 * is open (or opening) wrapping is allowed again, since that is how the
 * collapsed menu takes the full width under the bar.
 */
@media (max-width: 991.98px) {
    body .navbar > .container:not(:has(> .navbar-collapse.show, > .navbar-collapse.collapsing)) {
        flex-wrap: nowrap;
    }

    body .navbar > .container > .navbar-brand {
        flex: 0 1 auto;
        min-width: 44px;
    }

    body .navbar > .container > .navbar-brand img {
        max-width: 100% !important;
        height: auto;
    }

    body .navbar > .container > .nav-right,
    body .navbar > .container > .theme-picker-nav-item--toolbar,
    body .navbar > .container > .navbar-toggler {
        flex-shrink: 0;
    }

    /* The open menu comes after everything in the bar. The account cluster
       and the menu button are ordered after the logo and theme switch
       (order: 1 and 2, above), so with the menu at the default order it would
       sit in front of them. */
    body .navbar > .container > .navbar-collapse {
        order: 3;
    }
}
