/* ================================================================
   HERMES UNIVERSAL UX SYSTEM // 2026-09-22 // V1

   Intent:
   - One Hermes product shell for every operational/product page.
   - Welcome/First Contact and the astral Hermes AI view remain exceptions.
   - Community retains a familiar three-column chat layout inside the shell.
   - Existing feature CSS remains untouched beneath this compatibility layer.
   ================================================================ */

:root {
    --topbar-height: 60px;
    --hermes-nav-height: 46px;
    --hermes-content-max: 1580px;
    --hermes-page-x: clamp(22px, 2.2vw, 46px);
    --hermes-page-y: 22px;

    --text-meta: clamp(10px, .30vw, 11px);
    --text-small: clamp(12px, .36vw, 13px);
    --text-body: clamp(13px, .42vw, 15px);
    --text-value: clamp(14px, .48vw, 17px);
    --text-card-title: clamp(15px, .56vw, 18px);
    --text-section: clamp(17px, .70vw, 22px);
    --text-page-title: clamp(24px, 1.05vw, 30px);

    --ink: #e0e5e8;
    --muted: #8d989e;
    --line: rgba(225, 232, 238, .13);
    --line-quiet: rgba(225, 232, 238, .075);
    --surface-0: #040607;
    --surface-1: rgba(7, 10, 12, .94);
    --surface-2: rgba(255, 255, 255, .018);
    --surface-3: rgba(255, 255, 255, .028);
    --control-height: 34px;
    --panel-pad: 16px;
    --section-gap: 24px;
    --portal-measure: 100%;
}

/* ---------- Persistent Hermes chrome ---------- */
.topbar {
    height: var(--topbar-height);
    padding: 0 var(--hermes-page-x);
    border-bottom-color: var(--line-quiet);
    background: rgba(3, 5, 6, .97);
}

.brand-mark {
    width: 58px;
    height: 40px;
}

.brand-name {
    font-size: 13px;
    letter-spacing: .20em;
}

.brand-sub {
    margin-top: 2px;
    font-size: 8px;
}

.top-utility-button,
.menu-button {
    width: 34px;
    height: 34px;
}

.hermes-site-nav {
    position: absolute;
    z-index: 46;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    height: var(--hermes-nav-height);
    display: none;
    border-bottom: 1px solid var(--line);
    background: rgba(4, 7, 8, .975);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.hermes-site-nav.active { display: block; }

.hermes-site-nav-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    padding: 0 var(--hermes-page-x);
    overflow: hidden;
}

.hermes-site-home,
.hermes-site-group,
.hermes-site-route {
    position: relative;
    flex: 0 0 auto;
    min-height: var(--hermes-nav-height);
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #7e898f;
    cursor: pointer;
    font-size: 10px;
    letter-spacing: .09em;
    white-space: nowrap;
    transition: color .14s ease, background .14s ease;
}

.hermes-site-home,
.hermes-site-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hermes-site-home {
    margin-left: -12px;
    padding-right: 15px;
}

.hermes-site-home-mark {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--accent-rgb), .26);
    color: rgba(var(--accent-rgb), .82);
    font-size: 9px;
    letter-spacing: 0;
}

.hermes-site-groups,
.hermes-site-routes {
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.hermes-site-routes {
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: none;
}
.hermes-site-routes::-webkit-scrollbar { display: none; }

.hermes-site-divider {
    flex: 0 0 1px;
    align-self: center;
    width: 1px;
    height: 20px;
    margin: 0 9px;
    background: var(--line);
}

.hermes-site-icon {
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    color: #68747a;
}

.hermes-site-icon svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

.hermes-site-home:hover,
.hermes-site-group:hover,
.hermes-site-route:hover {
    color: #c4ccd0;
    background: rgba(255, 255, 255, .018);
}

.hermes-site-group.active,
.hermes-site-route.active {
    color: var(--accent);
}

.hermes-site-group.active::after,
.hermes-site-route.active::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 2px;
    background: rgba(var(--accent-rgb), .72);
}

.hermes-site-group.active .hermes-site-icon { color: var(--accent); }
.hermes-site-route.locked { opacity: .38; }

/* ---------- Product pages occupy one shell ---------- */
body[data-view="portal"] .portal-view,
body[data-view="amp"] .amp-view,
body[data-view="community"] .community-view {
    top: calc(var(--topbar-height) + var(--hermes-nav-height));
    height: calc(100vh - var(--topbar-height) - var(--hermes-nav-height));
}

/* The astral ring belongs to the Hermes AI experience, not every product page. */
body[data-view="portal"] .ring-dock,
body[data-view="amp"] .ring-dock,
body[data-view="community"] .ring-dock {
    display: none !important;
}

/* Legacy return buttons and local route row are superseded by the persistent shell. */
#portalReturnButton,
#returnButton,
#communityReturnButton,
.portal-route-row {
    display: none !important;
}

/* ---------- Universal page geometry ---------- */
.portal-view,
.amp-view,
.community-view {
    background:
        radial-gradient(circle at 82% 10%, rgba(var(--accent-rgb), .018), transparent 28%),
        linear-gradient(180deg, rgba(5, 8, 9, .99), rgba(3, 5, 6, .99));
}

.portal-content,
.amp-content {
    width: min(var(--hermes-content-max), 100%);
    max-width: none;
    margin: 0 auto;
    padding: var(--hermes-page-y) var(--hermes-page-x) 46px;
}

.portal-heading,
.amp-heading {
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 3px 0 18px;
    margin: 0 0 18px;
    border-bottom: 1px solid var(--line);
}

.portal-heading > div:first-child,
.amp-heading > div:first-child { min-width: 0; }

.portal-heading h1,
.amp-heading h1 {
    margin: 7px 0 5px;
    color: #e1e6e8;
    font: 400 var(--text-page-title)/1.12 "Segoe UI", Arial, sans-serif;
    letter-spacing: -.015em;
}

.portal-heading p,
.amp-heading p {
    max-width: 860px;
    margin: 0;
    color: #8a959b;
    font-size: var(--text-small);
    line-height: 1.55;
}

.section-kicker {
    color: #7b868c;
    font-size: var(--text-meta);
    letter-spacing: .12em;
}

.portal-heading-actions {
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
}

.portal-context,
.portal-grid,
.portal-foot {
    width: 100%;
    max-width: none;
}

.portal-context { margin: 0; }
.portal-grid { gap: var(--section-gap); }
.portal-foot { margin-top: 28px; }

/* ---------- Shared component language ---------- */
.outline-button,
.send-button,
.talk-button,
.stop-button,
.portal-heading button,
.server-range-controls button,
.selected-server-heading > button,
.support-quiet-button,
.support-image-chooser button,
.profile-avatar-actions button,
.community-heading-actions button,
.community-message-tools button,
.community-compose-actions button,
.community-drawer button,
.control-actions button,
.admin-instance-maintenance button,
.workspace-tabs button,
.workspace-command button,
.workspace-tools button,
.audio-actions button,
.management-panel button {
    min-height: var(--control-height);
    height: var(--control-height);
    padding: 0 11px;
    border-radius: 0;
    font-size: var(--text-meta);
    letter-spacing: .08em;
}

:is(
    .portal-card,
    .support-ticket-card,
    .support-case-stage,
    .support-create-panel,
    .audio-settings-panel,
    .cosmetic-card,
    .achievement-card,
    .management-panel,
    .server-workspace,
    .cluster-history-panel,
    .selected-server-panel,
    .server-compact-card
) {
    border-color: var(--line);
    border-radius: 0;
    background: var(--surface-2);
    box-shadow: none;
}

.portal-card {
    min-height: 112px;
    padding: var(--panel-pad);
    border: 1px solid var(--line);
}

.portal-card small { color: #7d888e; font-size: var(--text-meta); }
.portal-card b { margin-top: 9px; color: #cbd2d5; font-size: var(--text-value); }
.portal-card p { margin-top: 7px; color: #8b969c; font-size: var(--text-small); }

:is(
    .portal-heading input,
    .profile-field input,
    .profile-field textarea,
    .support-field input,
    .support-field textarea,
    .support-field select,
    .support-reply-form textarea,
    .community-composer textarea,
    .community-drawer-form input,
    .community-drawer-form textarea,
    .community-drawer-form select,
    .workspace-command input,
    .workspace-tools select,
    .workspace-editor,
    .management-panel input,
    .management-panel select,
    .management-panel textarea
) {
    border-radius: 0;
    background: rgba(255, 255, 255, .018);
}

/* ---------- Server overview / player presence ---------- */
.server-overview-compact,
.player-presence-workspace { padding-bottom: 34px; }

.overview-summary,
.presence-summary-strip {
    margin: 0 0 18px;
}

.overview-summary .server-summary-metric,
.presence-summary-strip .server-summary-metric {
    min-height: 68px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.overview-summary .server-summary-metric b,
.presence-summary-strip .server-summary-metric b {
    font-size: var(--text-section);
}

.overview-trend,
.presence-section { margin-top: 18px; }

.presence-section > header,
.server-fleet > header {
    min-height: 58px;
    padding-bottom: 12px;
}

.presence-section > header h2,
.server-fleet > header h2,
.cluster-history-panel h2,
.selected-server-title h2,
.ui-colour-section > header h2,
.audio-settings-panel header h2,
.cosmetic-section > header h2,
.achievement-card > header h2,
.management-panel h2,
.support-case-heading h2 {
    font-size: var(--text-section);
}

.presence-player-row { min-height: 72px; }
.presence-player-row b { font-size: var(--text-value); }
.presence-player-row small { margin-top: 5px; }

/* ---------- Admin / AMP uses the same header and density ---------- */
.amp-content { overflow-y: auto; }

.amp-heading .return-button { display: none !important; }

.host-strip {
    min-height: 56px;
    margin: 0 0 14px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.instance-toolbar {
    min-height: 38px;
    margin-bottom: 10px;
}

.instance-grid { gap: 8px; }

.instance-card {
    border-radius: 0;
    background: rgba(255,255,255,.012);
}

.instance-detail,
.instance-controls,
.admin-maintenance,
.instance-activity,
.server-workspace {
    border-color: var(--line);
}

.instance-detail { min-height: 58px; }
.instance-controls { min-height: 54px; }

/* ---------- Community keeps familiar chat anatomy, now inside Hermes ---------- */
.community-view {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(210px, 250px);
    padding: 0;
}

.community-channel-rail,
.community-member-rail {
    background: rgba(5, 8, 9, .72);
    border-color: var(--line);
}

.community-channel-rail { padding-top: 16px; }

.community-channel-rail header {
    padding: 0 14px 14px;
    border-bottom: 1px solid var(--line-quiet);
}

.community-channel-rail .section-kicker { display: none; }

.community-channel-rail h1 {
    margin: 0 0 5px;
    color: #cbd2d5;
    font: 400 16px/1.2 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

.community-channel-rail header p {
    color: #818c92;
    font-size: 11px;
    line-height: 1.45;
}

.community-stage { background: rgba(3, 5, 6, .30); }

.community-channel-heading {
    min-height: 70px;
    padding: 11px 18px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(4, 7, 8, .72);
}

.community-channel-heading small { font-size: 9px; }
.community-channel-heading h2 {
    margin: 4px 0 2px;
    font-size: 18px;
    font-weight: 400;
}
.community-channel-heading p { font-size: 11px; }

.community-message-stream { padding-top: 8px; }
.community-message { border-color: var(--line-quiet); }
.community-message-copy { font-size: 14px; line-height: 1.55; }
.community-message-meta b { font-size: 13px; }
.community-message-meta span { font-size: 10px; }
.community-composer { border-top-color: var(--line); }
.community-composer textarea { font-size: 13px; }

/* ---------- Direct messages: same shell, dense workspace ---------- */
.portal-grid.direct-messages-active {
    min-height: 0;
}

.portal-grid.direct-messages-active ~ .portal-foot { display: none; }

.direct-message-workspace {
    border-color: var(--line);
    background: rgba(4, 7, 8, .42);
}

/* ---------- First Contact remains exceptional; AI now uses the universal shell ---------- */
body[data-view="assistant"] .assistant-view {
    margin-top: var(--hermes-nav-height);
    height: calc(
        100vh
        - var(--topbar-height)
        - var(--hermes-nav-height)
    );
}

body[data-view="assistant"] .ring-dock {
    top: calc(
        var(--topbar-height)
        + var(--hermes-nav-height)
        + 1vh
    );
    height: calc(
        100vh
        - var(--topbar-height)
        - var(--hermes-nav-height)
        - 3vh
    );
}

.hermes-site-home.active {
    color: var(--accent);
}

.hermes-site-home.active::after {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 0;
    height: 2px;
    background: rgba(
        var(--accent-rgb),
        .72
    );
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .hermes-site-home span:last-child { display: none; }
    .hermes-site-group { padding-inline: 9px; }
    .hermes-site-group > span:last-child { display: none; }
    .hermes-site-divider { margin-inline: 5px; }
    .community-view {
        grid-template-columns: 220px minmax(0, 1fr);
    }
    .community-member-rail { display: none; }
}

@media (max-width: 760px) {
    :root {
        --topbar-height: 56px;
        --hermes-nav-height: 44px;
        --hermes-page-x: 14px;
        --hermes-page-y: 14px;
    }

    .brand-mark { width: 50px; height: 34px; }
    .brand-name { font-size: 11px; }

    .hermes-site-nav-inner { padding-inline: 10px; }
    .hermes-site-home { display: none; }
    .hermes-site-group { padding-inline: 8px; }
    .hermes-site-divider { margin-inline: 2px; }
    .hermes-site-route { padding-inline: 9px; font-size: 9px; }

    .portal-heading,
    .amp-heading {
        display: block;
        padding-bottom: 13px;
        margin-bottom: 13px;
    }

    .portal-heading-actions { margin-top: 10px; }

    .community-view { grid-template-columns: 1fr; }
    .community-channel-rail { display: none; }
    .community-channel-heading { padding-inline: 12px; }

    .overview-summary,
    .presence-summary-strip,
    .selected-server-metrics,
    .server-truth-strip {
        grid-template-columns: 1fr;
    }
}

/* Confirmed legacy encoding artefacts are corrected at the system layer. */
.work-line::before { content: "› "; }
.portal-context[open] > summary::before,
.server-source-disclosure[open] > summary::before,
.server-fleet-more[open] > summary::before { content: "−"; }

/* HERMES BACKGROUND VEIL V1 */

/*
   Let earned backgrounds actually exist.

   The old views were effectively opaque:
   Portal    ~98%
   AMP       ~97%
   Community ~99%

   These values retain a dark Hermes working surface
   while allowing the cosmetic layer underneath to breathe.
*/


/* STANDARD ACCOUNT / SERVERS / SETTINGS / ETC */

.portal-view {
    background:
        radial-gradient(
            circle at 88% 15%,
            rgba(var(--accent-rgb), .010),
            transparent 25%
        ),
        rgba(3, 5, 6, .72) !important;
}


/* ADMIN / AMP WORKSPACES */

.amp-view {
    background:
        rgba(3, 5, 6, .76) !important;
}


/* COMMUNITY
   Keep slightly more structure because chat benefits
   from a stable reading surface.
*/

.community-view {
    background:
        radial-gradient(
            circle at 77% 40%,
            rgba(var(--accent-rgb), .008),
            transparent 34%
        ),
        linear-gradient(
            105deg,
            rgba(5, 9, 10, .80),
            rgba(3, 5, 6, .74) 38%,
            rgba(2, 4, 5, .80)
        ) !important;
}


/* ================================================================
   HERMES QUICK QUESTIONS UI V1
   ================================================================ */

.hermes-quick-input-shell {
    position: relative;
    min-width: 0;
    width: 100%;
}

.hermes-quick-input-shell > #textInput {
    width: 100%;
    padding-right: 132px;
}

.hermes-quick-questions {
    position: absolute;
    z-index: 18;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    transition:
        opacity .12s ease,
        visibility .12s linear;
}

.hermes-quick-questions.typing-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hermes-quick-trigger {
    height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 5px;
    border: 0;
    background: transparent;
    color: rgba(var(--accent-rgb), .58);
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    letter-spacing: .07em;
    white-space: nowrap;
}

.hermes-quick-trigger:hover,
.hermes-quick-questions.open
.hermes-quick-trigger {
    color: rgba(var(--accent-rgb), .92);
}

.hermes-quick-chevron {
    position: relative;
    top: -1px;
    font-size: 11px;
    line-height: 1;
    transition: transform .12s ease;
}

.hermes-quick-questions.open
.hermes-quick-chevron {
    transform: rotate(180deg);
}

.hermes-quick-menu {
    position: absolute;
    right: -5px;
    bottom: calc(100% + 10px);
    width: 190px;
    display: none;
    padding: 5px;
    border: 1px solid var(--line);
    background: rgba(4, 7, 8, .985);
    box-shadow:
        0 12px 34px rgba(0, 0, 0, .34);
}

.hermes-quick-questions.open
.hermes-quick-menu {
    display: grid;
}

.hermes-quick-option {
    min-height: 32px;
    width: 100%;
    padding: 0 10px;
    border: 0;
    border-bottom: 1px solid
        rgba(225, 232, 238, .055);
    background: transparent;
    color: #8d989e;
    cursor: pointer;
    text-align: left;
    font-size: 10px;
    letter-spacing: .055em;
}

.hermes-quick-option:last-child {
    border-bottom: 0;
}

.hermes-quick-option:hover,
.hermes-quick-option:focus-visible {
    outline: none;
    color: var(--accent);
    background: rgba(
        var(--accent-rgb),
        .055
    );
}

.hermes-quick-label-short {
    display: none;
}

@media (max-width: 760px) {
    .hermes-quick-input-shell > #textInput {
        padding-right: 82px;
    }

    .hermes-quick-label-full {
        display: none;
    }

    .hermes-quick-label-short {
        display: inline;
    }

    .hermes-quick-menu {
        width: min(
            190px,
            calc(100vw - 36px)
        );
    }
}


/* HERMES_QUICK_CHEVRON_DRAWN_V2 */
.hermes-quick-chevron {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    margin-left: 2px !important;
    border: 0 !important;
    border-right: 1px solid currentColor !important;
    border-bottom: 1px solid currentColor !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transform: translateY(-2px) rotate(45deg) !important;
    transform-origin: center !important;
    transition: transform .12s ease !important;
}

.hermes-quick-questions.open .hermes-quick-chevron {
    transform: translateY(2px) rotate(225deg) !important;
}


/* HERMES_LATENCY_DETAILS_CSS_V1 */

#assistantTurnStatus[data-mode="timing"] {
    overflow: visible;
}

.hermes-turn-timing-summary {
    white-space: nowrap;
}

.hermes-turn-details {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.hermes-turn-details > summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    opacity: .72;
    white-space: nowrap;
}

.hermes-turn-details > summary::-webkit-details-marker {
    display: none;
}

.hermes-turn-details > summary::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform:
        translateY(-1px)
        rotate(45deg);
    transform-origin: center;
    transition: transform .12s ease;
}

.hermes-turn-details[open] > summary::after {
    transform:
        translateY(2px)
        rotate(225deg);
}

.hermes-turn-details-panel {
    position: absolute;
    z-index: 40;
    right: 0;
    top: calc(100% + 6px);
    min-width: 230px;
    padding: 9px 11px;
    border:
        1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(5,10,18,.96);
    box-shadow:
        0 10px 28px rgba(0,0,0,.35);
    font-size: 11px;
    line-height: 1.55;
    white-space: nowrap;
}

.hermes-turn-details-note {
    margin-top: 5px;
    padding-top: 5px;
    border-top:
        1px solid rgba(255,255,255,.08);
    opacity: .64;
}


/* HERMES_LATENCY_DETAILS_CLICK_V1 */

/*
 * The timing rail is normally display-only.
 * Re-enable pointer interaction only for the Details control.
 */
#assistantTurnStatus[data-mode="timing"] {
    pointer-events: none;
}

#assistantTurnStatus[data-mode="timing"]
.hermes-turn-details {
    pointer-events: auto !important;
}

#assistantTurnStatus[data-mode="timing"]
.hermes-turn-details > summary {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 2;
}

#assistantTurnStatus[data-mode="timing"]
.hermes-turn-details-panel {
    pointer-events: auto !important;
}


/* ================================================================
   HERMES MAIN NAV HIERARCHY V2 // 2026-10-02
   Main categories only. Child routes live in hover/click menus.
   ================================================================ */

.hermes-site-nav-v2 .hermes-site-nav-inner {
    overflow: visible;
}

.hermes-site-nav-v2 .hermes-site-groups {
    flex: 0 1 auto;
    overflow: visible;
}

.hermes-site-nav-v2 .hermes-site-divider,
.hermes-site-nav-v2 .hermes-site-routes {
    display: none !important;
}

.hermes-site-group-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.hermes-site-group-wrap[hidden] {
    display: none !important;
}

.hermes-site-group-chevron {
    margin-left: 1px;
    color: #526067;
    font-size: 9px;
    line-height: 1;
    transform: translateY(-1px);
}

.hermes-site-group.active .hermes-site-group-chevron,
.hermes-site-group-wrap.open .hermes-site-group-chevron,
.hermes-site-group-wrap:hover .hermes-site-group-chevron {
    color: var(--accent);
}

.hermes-site-menu {
    position: absolute;
    z-index: 160;
    top: calc(100% - 1px);
    left: 0;
    width: 250px;
    display: none;
    padding: 5px;
    border: 1px solid var(--line);
    background: rgba(4, 7, 8, .992);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.hermes-site-group-wrap.align-right > .hermes-site-menu {
    left: auto;
    right: 0;
}

.hermes-site-group-wrap.open > .hermes-site-menu,
.hermes-site-group-wrap:hover > .hermes-site-menu,
.hermes-site-group-wrap:focus-within > .hermes-site-menu {
    display: block;
}

.hermes-site-menu-item {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 11px;
    border: 0;
    border-bottom: 1px solid rgba(225, 232, 238, .055);
    background: transparent;
    color: #89949a;
    cursor: pointer;
    text-align: left;
    font-size: 10px;
    letter-spacing: .075em;
}

.hermes-site-menu > :last-child,
.hermes-site-menu > :last-child > .hermes-site-menu-item,
.hermes-site-submenu > .hermes-site-menu-item:last-child {
    border-bottom: 0;
}

.hermes-site-menu-item:hover,
.hermes-site-menu-item:focus-visible,
.hermes-site-menu-item.active {
    outline: none;
    color: var(--accent);
    background: rgba(var(--accent-rgb), .052);
}

.hermes-site-menu-item.locked,
.hermes-site-menu-item:disabled {
    opacity: .38;
    cursor: default;
}

.hermes-site-parent-wrap {
    position: relative;
}

.hermes-site-menu-arrow {
    color: #5d696f;
    font-size: 14px;
    line-height: 1;
}

.hermes-site-parent.active,
.hermes-site-parent-wrap.parent-open > .hermes-site-parent {
    color: var(--accent);
}

.hermes-site-submenu {
    position: absolute;
    z-index: 170;
    top: -5px;
    left: calc(100% + 5px);
    width: 230px;
    display: none;
    padding: 5px;
    border: 1px solid var(--line);
    background: rgba(4, 7, 8, .995);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.hermes-site-parent-wrap:hover > .hermes-site-submenu,
.hermes-site-parent-wrap:focus-within > .hermes-site-submenu,
.hermes-site-parent-wrap.parent-open > .hermes-site-submenu {
    display: block;
}

/* The shell now owns every page choice; no persistent page row is needed. */
.portal-route-row {
    display: none !important;
}

@media (max-width: 1180px) {
    .hermes-site-nav-v2 .hermes-site-home span:last-child {
        display: inline;
    }

    .hermes-site-nav-v2 .hermes-site-group {
        padding-inline: 10px;
    }

    .hermes-site-nav-v2 .hermes-site-group > span:nth-child(2) {
        display: inline;
    }
}

@media (max-width: 760px) {
    .hermes-site-nav-v2 .hermes-site-nav-inner {
        padding-inline: 7px;
    }

    .hermes-site-nav-v2 .hermes-site-home {
        display: none;
    }

    .hermes-site-nav-v2 .hermes-site-groups {
        width: 100%;
        justify-content: flex-start;
    }

    .hermes-site-nav-v2 .hermes-site-group {
        min-width: 0;
        padding-inline: 8px;
        gap: 4px;
        font-size: 8px;
        letter-spacing: .055em;
    }

    .hermes-site-nav-v2 .hermes-site-icon {
        display: none;
    }

    .hermes-site-nav-v2 .hermes-site-group-chevron {
        font-size: 8px;
    }

    .hermes-site-menu {
        width: min(260px, calc(100vw - 16px));
    }

    .hermes-site-group-wrap.align-right > .hermes-site-menu {
        right: 0;
    }

    .hermes-site-submenu {
        position: static;
        width: auto;
        margin: 0 5px 5px 14px;
        padding: 0 0 0 7px;
        border: 0;
        border-left: 1px solid rgba(var(--accent-rgb), .18);
        background: transparent;
        box-shadow: none;
    }

    .hermes-site-parent-wrap:hover > .hermes-site-submenu {
        display: none;
    }

    .hermes-site-parent-wrap.parent-open > .hermes-site-submenu,
    .hermes-site-parent-wrap:focus-within > .hermes-site-submenu {
        display: block;
    }

    .hermes-site-submenu-item {
        min-height: 35px;
        padding-left: 12px;
    }
}


/* HERMES_COMPACT_TEXT_CHAT_V1
   Compact conversational text chat:
   avatar | name | time | message
   actions float at far right on hover/focus.
*/

.community-message {
    position: relative;
    grid-template-columns: 30px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 5px 132px 5px 0 !important;
    min-height: 34px;
}

.community-message-avatar,
.community-message-avatar-stack {
    width: 30px !important;
    height: 30px !important;
}

.community-message-body {
    min-width: 0;
    display: grid;
    grid-template-columns: max-content max-content minmax(0, 1fr);
    align-items: baseline;
    column-gap: 7px;
    row-gap: 3px;
}

.community-message-meta {
    display: contents !important;
}

.community-message-meta b {
    grid-column: 1;
    color: #d8dde0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
}

.community-message-meta span {
    grid-column: 2;
    color: #687378 !important;
    font-size: 10px !important;
    letter-spacing: 0 !important;
    white-space: nowrap;
}

.community-message-copy {
    grid-column: 3;
    margin: 0 !important;
    color: #c5cbce !important;
    font: 13px/1.45 "Segoe UI", Arial, sans-serif !important;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-width: 0;
}

.community-message-image {
    grid-column: 1 / -1;
    margin-top: 5px !important;
}

/* Existing reactions + message actions become a small floating strip. */
.community-message-tools {
    position: absolute !important;
    top: 3px;
    right: 5px;
    z-index: 8;
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 2px !important;
    margin: 0 !important;
    min-height: 0 !important;
    padding: 2px;
    border: 1px solid rgba(225,232,238,.08);
    background: rgba(9,14,16,.94);
    box-shadow: 0 3px 12px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition:
        opacity .12s ease,
        transform .12s ease,
        visibility .12s ease;
}

.community-message:hover .community-message-tools,
.community-message:focus-within .community-message-tools {
    opacity: 1 !important;
    visibility: visible;
    transform: translateY(0);
}

.community-message-tools button {
    width: 26px !important;
    min-width: 26px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    background: transparent !important;
    color: #9ba5aa !important;
    font: 13px/1 "Segoe UI Symbol", "Segoe UI Emoji", "Segoe UI", sans-serif !important;
    letter-spacing: 0 !important;
}

.community-message-tools button:hover,
.community-message-tools button:focus-visible {
    color: #dffffc !important;
    background: rgba(var(--accent-rgb),.10) !important;
    outline: none;
}

/* Reaction-count buttons may need a little extra width. */
.community-message-tools .community-reaction {
    width: auto !important;
    min-width: 26px !important;
    padding-inline: 5px !important;
}

/* Picker opens below the compact hover strip. */
.community-reaction-picker {
    top: calc(100% + 4px);
    right: 0;
}

/* Mobile/touch: controls must remain reachable without hover. */
@media (hover: none), (max-width: 760px) {
    .community-message {
        padding-right: 4px !important;
    }

    .community-message-tools {
        position: static !important;
        grid-column: 1 / -1;
        width: max-content;
        margin-top: 3px !important;
        opacity: .82 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none;
        background: transparent;
        border-color: transparent;
    }

    .community-message-body {
        grid-template-columns: max-content max-content minmax(0, 1fr);
    }
}


/* HERMES_CHAT_ORIGIN_BARS_V1
   Game-origin cue for Global Chat / Live Events.
   Hot vertical rail + weak 15% horizontal fade.
*/

.community-message.hermes-origin-message {
    position: relative;
    overflow: hidden;
}

.community-message.hermes-origin-message::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    z-index: 0;
    pointer-events: none;
    background: var(--hermes-origin-hot);
    box-shadow:
        0 0 5px var(--hermes-origin-hot),
        0 0 11px var(--hermes-origin-glow);
}

.community-message.hermes-origin-message::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 15%;
    min-width: 110px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        var(--hermes-origin-wash-strong) 0%,
        var(--hermes-origin-wash-mid) 45%,
        var(--hermes-origin-wash-clear) 100%
    );
}

.community-message.hermes-origin-message > * {
    position: relative;
    z-index: 1;
}

/* ARK — blues */
.community-message.hermes-origin-ark {
    --hermes-origin-hot: #38aaff;
    --hermes-origin-glow: rgba(56,170,255,.48);
    --hermes-origin-wash-strong: rgba(56,170,255,.18);
    --hermes-origin-wash-mid: rgba(56,170,255,.09);
    --hermes-origin-wash-clear: rgba(56,170,255,0);
}

/* PALWORLD — hot yellow / mellow wash */
.community-message.hermes-origin-palworld {
    --hermes-origin-hot: #ffd83d;
    --hermes-origin-glow: rgba(255,216,61,.48);
    --hermes-origin-wash-strong: rgba(255,216,61,.18);
    --hermes-origin-wash-mid: rgba(255,216,61,.09);
    --hermes-origin-wash-clear: rgba(255,216,61,0);
}

/* SCUM — oranges */
.community-message.hermes-origin-scum {
    --hermes-origin-hot: #ff8a2f;
    --hermes-origin-glow: rgba(255,138,47,.48);
    --hermes-origin-wash-strong: rgba(255,138,47,.18);
    --hermes-origin-wash-mid: rgba(255,138,47,.09);
    --hermes-origin-wash-clear: rgba(255,138,47,0);
}

/* CONAN — purples */
.community-message.hermes-origin-conan {
    --hermes-origin-hot: #ad63ff;
    --hermes-origin-glow: rgba(173,99,255,.48);
    --hermes-origin-wash-strong: rgba(173,99,255,.18);
    --hermes-origin-wash-mid: rgba(173,99,255,.09);
    --hermes-origin-wash-clear: rgba(173,99,255,0);
}

/* HERMES — aqua */
.community-message.hermes-origin-hermes {
    --hermes-origin-hot: #35e6e6;
    --hermes-origin-glow: rgba(53,230,230,.48);
    --hermes-origin-wash-strong: rgba(53,230,230,.18);
    --hermes-origin-wash-mid: rgba(53,230,230,.09);
    --hermes-origin-wash-clear: rgba(53,230,230,0);
}

