/* Compact header destinations: no standalone banner above the conversation. */
body.chat-elite-body .chat-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 20px;
}
body.chat-elite-body .chat-header-actions { grid-column: 1 / -1; }
.primary-gateways {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.feature-gateway {
    --gateway-accent: #79e3d3;
    --gateway-border: #2b5958;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--gateway-border);
    border-radius: 11px;
    background: #14272b;
    color: var(--gateway-accent);
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s ease, background-color .18s ease;
}
.feature-gateway-guide {
    --gateway-accent: #ead49d;
    --gateway-border: #514c37;
    background: #25251e;
}
.feature-gateway:hover { border-color: var(--gateway-accent); background: #1b3538; }
.feature-gateway-guide:hover { background: #343022; }
.feature-gateway:focus-visible, .workspace-guide-entry:focus-visible {
    outline: 2px solid var(--gateway-accent, #ead49d);
    outline-offset: 3px;
}
.feature-gateway-icon {
    flex: 0 0 18px;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--gateway-accent);
}
.feature-gateway-icon svg { width: 18px; height: 18px; }
.feature-gateway-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
/* Keep purpose available to assistive technology without adding visual bulk. */
.feature-gateway-description {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Secondary pages use the same names and visual accents. */
.pn-rail .rail-cases, .pn-rail .rail-help { border: 1px solid #2b5958; background: #14272b; border-radius: 12px; }
.pn-rail .rail-cases .pn-rail-icon, .pn-rail .rail-cases .pn-rail-label { color: #79e3d3; }
.pn-rail .rail-help { background: #25251e; border-color: #514c37; margin-top: 8px; }
.pn-rail .rail-help .pn-rail-icon, .pn-rail .rail-help .pn-rail-label { color: #ead49d; }
.pn-rail .rail-cases:hover, .pn-rail .rail-cases.active { background: #1b3538; border-color: #79e3d3; box-shadow: none; }
.pn-rail .rail-help:hover, .pn-rail .rail-help.active { background: #343022; border-color: #ead49d; box-shadow: none; }
.pn-rail .rail-cases .pn-rail-label { font-size: 9px; letter-spacing: -.2px; overflow-wrap: normal; }

.workspace-guide-entry {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #ead49d;
    border: 1px solid #514c37;
    background: #25251e;
    border-radius: 12px;
    text-decoration: none;
    min-height: 48px;
    transition: border-color .18s ease;
}
.workspace-guide-entry > span { display: flex; flex-direction: column; gap: 3px; }
.workspace-guide-entry strong { font-size: 12px; font-weight: 600; line-height: 1.4; }
.workspace-guide-entry small { color: #bcb598; font-size: 10px; line-height: 1.4; }
.workspace-guide-entry svg { flex-shrink: 0; }
.workspace-guide-entry:hover { border-color: #ead49d; }

@media (max-width: 700px) {
    .workspace-guide-entry { grid-column: 1 / -1; width: 100%; min-width: 0; }
}

@media (max-width: 1100px) {
    .feature-gateway-clinical-prefix, .feature-gateway-guide-suffix { display: none; }
    body.chat-elite-body .chat-header { gap: 10px 12px; }
    body.chat-elite-body .chat-header .workspace-tier-badge,
    body.chat-elite-body .chat-subtitle { display: none; }
    body.chat-elite-body .chat-header-actions {
        min-width: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
    }
    body.chat-elite-body .chat-header-actions > * { flex-shrink: 0; }
}
@media (max-width: 768px) {
    body.chat-elite-body .chat-header { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; gap: 8px; }
    .primary-gateways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature-gateway { min-height: 44px; padding: 8px 10px; }
    body.chat-elite-body .chat-header-actions { flex-wrap: nowrap; }
    .pn-rail .rail-cases .pn-rail-label { font-size: 8px; letter-spacing: -.3px; }
}
/* Landscape / short laptop windows: keep both destinations and the composer
   visible; desktop chat padding must not force the entire header off screen. */
@media (max-height: 600px) and (min-width: 769px) {
    body.chat-elite-body .chat-header { margin-top: 8px; padding: 10px 14px; gap: 8px; }
    body.chat-elite-body .chat-subtitle { display: none; }
    body.chat-elite-body .chat-header-actions { width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; }
    body.chat-elite-body .chat-window { padding-top: 12px; padding-bottom: 12px; }
    body.chat-elite-body .chat-input-wrap { flex-shrink: 0; padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .feature-gateway, .workspace-guide-entry { transition: none; }
}
@media print { .primary-gateways, .workspace-guide-entry { display: none; } }
