/*
 * Shared page shell: header, tabs and banner.
 *
 * Loaded on every page (homepage included) so the top navigation is pixel
 * identical everywhere. Page-specific layers (home.css / docs.css) must not
 * restyle the header or tabs — put such changes here instead.
 */

:root {
    /* Width of the page shell. The header, tabs, banner and main all use
       Material's `.md-grid`, so this governs the whole top bar and the
       content column together. */
    --tx-max: 76rem;
}

.md-grid {
    max-width: var(--tx-max);
}

/* ---------- tabs ----------
 *
 * Material's defaults stay in place: the header and tabs share the red
 * primary background with a white active tab (`color: inherit` ->
 * `--md-primary-bg-color`). Never set the active tab to the accent colour;
 * that renders red on red. Only the hover state and the underline live here.
 */

.md-tabs__link:hover {
    opacity: 1;
}

.md-tabs__item--active {
    position: relative;
}

.md-tabs__item--active::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--md-primary-bg-color);
}

/* ---------- announcement banner ----------
 *
 * The banner text is shell chrome and must read the same on every page.
 * Its inner element carries `md-typeset`, so the docs typography layer
 * (`.md-typeset { font-size: .79rem }` and the underlined `.md-typeset a`)
 * used to restyle the notice on docs pages only, while the homepage kept
 * Material's 0.7rem text and plain link.
 *
 * These selectors are two classes deep on purpose: they must outrank
 * `.md-typeset` and `.md-typeset a` no matter which stylesheet loads last.
 */

.md-banner .md-banner__inner {
    font-size: 0.7rem;
    line-height: 1.6;
}

.md-banner .md-banner__inner a,
.md-banner .md-banner__inner a:hover,
.md-banner .md-banner__inner a:focus {
    color: inherit;
    text-decoration: none;
    border-bottom: 0;
}

.md-banner .md-banner__inner strong {
    font-weight: 700;
}
