/* Carbon's UI shell header (g100) over a white page; everything else is Carbon
   classes. Only the layout glue and the user menu panel are custom. */
body { margin: 0; background: var(--cds-background, #fff); }
.cds--header { position: sticky; top: 0; }
/* Home button: a 48px square like Carbon's header actions, divided from the brand. */
.header-home-btn { display: grid; place-items: center; inline-size: 48px; block-size: 48px; flex: none;
                   color: var(--cds-icon-primary, #f4f4f4); border-inline-end: 1px solid var(--cds-border-subtle, #393939); }
.header-home-btn svg { fill: currentColor; }
.header-home-btn:hover { background: var(--cds-background-hover, #353535); }
.header-home-btn:focus-visible, .header-brand:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
/* Brand: the wordmark and the section name read as one line of text. They sit on an
   ordinary inline line (not flex baseline alignment, where browsers differ on whether
   an image's margin counts): inline, every browser puts an image's baseline at its
   bottom margin edge. --wm-descender is how far the Q's tail drops below the
   wordmark's text baseline, as a fraction of the image height (8.75%, measured from
   the rendered SVG); the negative bottom margin raises the image's baseline by that
   much, so the section name lands on the wordmark's letters. */
/* Vertical placement centres the letters (their x-height band), not the image box,
   whose top includes the leaf above the "i": the lift moves the band's middle onto
   the bar's middle (measured from a 4x screenshot). */
.header-brand { --wm-h: 24px; --wm-descender: .0875;
                display: block; align-self: center; white-space: nowrap; line-height: 1;
                padding-inline: 16px; position: relative; inset-block-start: -4px;
                text-decoration: none; }
.header-wordmark { block-size: var(--wm-h); inline-size: auto; display: inline-block;
                   vertical-align: baseline; margin-inline-end: 6px;
                   margin-block-end: calc(var(--wm-h) * var(--wm-descender) * -1); }
.header-section { color: var(--cds-text-secondary, #c6c6c6); font-size: 1.0625rem; vertical-align: baseline;
                  letter-spacing: .01em; white-space: nowrap; }
.header-brand:hover .header-section { color: var(--cds-text-primary, #f4f4f4); }
/* The header's controls (role menus, user menu) never shrink; when they and the brand don't fit, the brand gives
   way, its section name cut short with an ellipsis (clip, not hidden, so the Q's tail still shows below). */
.header-brand { flex: 0 1 auto; min-inline-size: 0; overflow-x: clip; text-overflow: ellipsis; }
.header-spacer { flex: 1; }
.role-menus, .user-wrap { flex: none; }
.user-wrap { position: relative; height: 100%; }
.user-button { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; margin: 0;
               border: 0; background: none; cursor: pointer; font: inherit;
               color: var(--cds-text-primary, #f4f4f4); }
.user-button:hover, .user-button[aria-expanded="true"] { background: var(--cds-background-hover, #353535); }
.user-button:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.user-button svg { fill: currentColor; flex: none; }
.user-name { font-size: .875rem; max-inline-size: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; top: 48px; right: 0; inline-size: min(20rem, 100vw); z-index: 8000;
             max-block-size: calc(100vh - 48px); overflow-y: auto;
             background: var(--cds-layer, #262626); color: var(--cds-text-primary, #f4f4f4);
             box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.user-menu-section { padding: 1rem; border-bottom: 1px solid var(--cds-border-subtle, #393939); }
.user-menu-label { font-size: .75rem; color: var(--cds-text-secondary, #c6c6c6); margin: 0 0 .5rem; }
.user-menu-email { font-size: .875rem; overflow-wrap: anywhere; margin: 0; }
.user-menu .cds--tag { margin: 0 .25rem .25rem 0; }
.user-menu-section .user-menu-label[for] { display: block; }
.view-as { inline-size: 100%; block-size: 2rem; padding: 0 .5rem; border: 0; border-bottom: 1px solid var(--cds-border-strong, #8d8d8d);
           background: var(--cds-field, #393939); color: inherit; font: inherit; font-size: .875rem; }
.view-as:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.view-as-error { margin: .5rem 0 0; font-size: .75rem; color: var(--cds-text-error, #ff8389); }
/* The role menus, left of the user menu: a header button per role the user has, each opening the list of
   what that role can do (its group's pages, then its API docs). Like the user menu, a list taller than the
   window scrolls, since the sticky header keeps page scrolling from reaching it. */
.role-menus { display: flex; height: 100%; }
.role-menu-wrap { position: relative; height: 100%; }
.role-menu-btn { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 12px 0 16px; margin: 0;
                 border: 0; background: none; cursor: pointer; font: inherit; font-size: .875rem;
                 color: var(--cds-text-secondary, #c6c6c6); }
.role-menu-btn:hover, .role-menu-btn[aria-expanded="true"] { background: var(--cds-background-hover, #353535);
                                                            color: var(--cds-text-primary, #f4f4f4); }
.role-menu-btn[data-current] { color: var(--cds-text-primary, #f4f4f4); box-shadow: inset 0 -3px 0 var(--cds-border-interactive, #4589ff); }
.role-menu-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.role-menu-chevron { fill: currentColor; transition: transform .15s ease; }
.role-menu-btn[aria-expanded="true"] .role-menu-chevron { transform: rotate(180deg); }
.role-menu { position: absolute; top: 48px; right: 0; min-inline-size: 14rem; z-index: 8000; list-style: none;
             max-block-size: calc(100vh - 48px); overflow-y: auto; margin: 0; padding: .5rem 0;
             background: var(--cds-layer, #262626); color: var(--cds-text-primary, #f4f4f4);
             box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.role-menu a { display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem;
               color: inherit; text-decoration: none; font-size: .875rem; white-space: nowrap; }
.role-menu a:hover, .role-menu a[aria-current="page"] { background: var(--cds-layer-hover, #333); }
.role-menu svg { inline-size: 16px; block-size: 16px; fill: currentColor; flex: none; }
.role-menu-docs { margin-block-start: .5rem; padding-block-start: .5rem; border-top: 1px solid var(--cds-border-subtle, #393939); }
.user-menu-link { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem 0; font-size: .875rem;
                  color: inherit; text-decoration: none; }
.user-menu-link:hover { text-decoration: underline; }
.user-menu-link svg { fill: currentColor; }
.user-menu-logout { display: flex; align-items: center; gap: .5rem; padding: 1rem; font-size: .875rem;
                    color: inherit; text-decoration: none; }
.user-menu-logout:hover { background: var(--cds-layer-hover, #333); }
.user-menu-logout svg { fill: currentColor; }
.user-menu-version { margin: 0; padding: .5rem 1rem; font-size: .75rem; color: var(--cds-text-secondary, #c6c6c6);
                     border-top: 1px solid var(--cds-border-subtle, #393939); }
/* The switch-off warning under the header, shown in the auto-stop's last 10 minutes. */
.stop-warning { position: sticky; top: 48px; z-index: 7000; display: flex; align-items: center; gap: .75rem;
                padding: .75rem 1rem; font-size: .875rem; background: var(--cds-notification-background-warning, #fef8dd);
                border-inline-start: 3px solid var(--cds-support-warning, #f1c21b); color: var(--cds-text-primary, #161616); }
.stop-warning[hidden] { display: none; }
.stop-warning svg { flex: none; fill: #8e6a00; }
.stop-warning p { flex: 1; margin: 0; }
.stop-warning button { flex: none; border: 0; background: none; cursor: pointer; padding: .25rem; line-height: 0; }
main { max-inline-size: 66rem; margin-inline: auto; padding: 2rem 1rem; }
h1 { margin: 0 0 1.5rem; }
/* Home: groups of large icon tiles, one tile per function the user's roles allow. */
.app-group + .app-group { margin-block-start: 2rem; }
.app-group-title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 600; margin: 0 0 1rem; }
.app-group-docs { display: inline-flex; color: var(--cds-icon-secondary, #525252); line-height: 0; border-radius: 2px; }
.app-group-docs:hover, .app-group-docs:focus-visible { color: var(--cds-link-primary, #0f62fe); }
.app-group-docs svg { inline-size: 18px; block-size: 18px; fill: currentColor; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1rem; }
.app-tile { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1;
            padding: 1.5rem; }
.app-tile:hover { background: var(--cds-layer-hover, #e8e8e8); }
.app-tile svg { inline-size: 4rem; block-size: 4rem; fill: var(--cds-icon-primary, #161616); }
.app-tile-name { font-size: 1.25rem; }
/* The shared info popup (openInfo in base.js), rendered from templates/info/*.md. */
.info-body > * + * { margin-block-start: 1rem; }
.info-body ul, .info-body ol { padding-inline-start: 1.25rem; }
.info-body ul { list-style: disc; }
.info-body ol { list-style: decimal; }
.info-body h2 { font-size: 1rem; font-weight: 600; }
.info-body strong { font-weight: 600; }
/* Markdown table column alignment (|--:|), as classes: info.py turns the inline style into these. */
.info-body .align-left { text-align: start; }
.info-body .align-right { text-align: end; }
.info-body .align-center { text-align: center; }
/* Long cells wrap (Carbon's data table and panes.css keep cells on one line), so a wide
   table fits the popup instead of being cut off at its edge; the first column stays whole. */
/* (.info-body .cds--data-table outranks panes.css's .cds--data-table td, which loads later.) */
.info-body .cds--data-table td, .info-body .cds--data-table th { white-space: normal; overflow-wrap: break-word; vertical-align: top; }
.info-body .cds--data-table td:first-child, .info-body .cds--data-table th:first-child { white-space: nowrap; overflow-wrap: normal; }
.info-body td em { font-style: normal; color: var(--cds-text-secondary, #525252); }
.info-body .small-print p { font-size: .6875rem; line-height: 1.5; color: var(--cds-text-secondary, #525252); }
.info-body .small-print > * + * { margin-block-start: .25rem; }
/* Below 64rem the email leaves the bar (it's in the user menu, and the button's title), so three role menus fit. */
@media (max-width: 64rem) { .user-name { display: none; } }
@media (max-width: 40rem) { .header-section { display: none; } .role-menu-btn { padding: 0 8px; } }
/* On a phone the wordmark gives way to the role menus (Home stays, on the left). */
@media (max-width: 30rem) { .header-brand { display: none; } .role-menu { position: fixed; left: 0; right: 0; } }
/* The narrowest phones (320px): tighter buttons, so home, three role menus and the user button still fit. */
@media (max-width: 24rem) { .role-menu-btn { padding: 0 6px; } .user-button { padding: 0 10px; } }
