/**
 * Drupal.org look for Material for MkDocs project sites.
 *
 * One stylesheet for documentation hosted at project.pages.drupalcode.org,
 * so each project's pages sit visually inside new.drupal.org: its floating
 * white header, Navy to Drupal Blue gradient heroes, ZT Gatha headings over
 * Noto Sans, square-cornered Navy and Light Blue buttons, and the Navy and
 * Light Blue footer. Colors are the Drupal brand palette from the Drupal
 * Brand Portal; grays and sizes follow the bluecheese theme.
 *
 * To use it in another project:
 *
 * 1. Copy this file to docs/assets/stylesheets/, the fonts to
 *    docs/assets/fonts/ (noto-sans/*.woff2 and zt-gatha/*), and, for the
 *    selector on a home page, docs/assets/javascripts/drupal-pages.js.
 * 2. In mkdocs.yml set theme.font to false, the palette's primary and accent
 *    to custom, list this file under extra_css and the script under
 *    extra_javascript, and enable the md_in_html and attr_list extensions.
 * 3. Optionally copy the home.html template into the theme's custom_dir and
 *    give the home page `template: home.html` with navigation and toc hidden.
 *    The hero, selector and section classes below are documented where they
 *    are defined.
 *
 * The logo in the header is the project's own (theme.logo): the header is
 * white, so use a full-color or Navy mark, not an inverted one.
 */

/* Fonts ------------------------------------------------------------------ */

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans/noto-sans-latin-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans/noto-sans-latin-ext-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans/noto-sans-latin-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/noto-sans/noto-sans-latin-ext-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* new.drupal.org sets its headings in ZT Gatha Bold. */
@font-face {
  font-family: "ZT Gatha";
  src: url("../fonts/zt-gatha/ZTGatha-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ZT Gatha";
  src: url("../fonts/zt-gatha/ZTGatha-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Tokens ----------------------------------------------------------------- */

:root {
  /* The Drupal brand palette. */
  --drupal-blue: #009cde;
  --drupal-dark-blue: #006aa9;
  --drupal-navy: #12285f;
  --drupal-dark-navy: #091942;
  --drupal-light-blue: #ccedf9;
  --drupal-purple: #ccbaf4;
  --drupal-yellow: #ffc423;
  --drupal-red: #f46351;
  --drupal-green: #397618;
  --drupal-white: #fff;

  /* Grays from new.drupal.org's bluecheese theme. */
  --drupal-gray-dark: #4f5661;
  --drupal-gray-default: #6d7583;
  --drupal-gray-mild: #a2acbe;
  --drupal-gray-milder: #cfd4dd;
  --drupal-gray-pale: #e7ebf3;
  --drupal-gray-mildest: #f8f9fc;
  --drupal-soft-white: #f0f3fa;

  --drupal-gradient: linear-gradient(90deg, var(--drupal-navy), var(--drupal-blue));
  --drupal-gradient-purple: linear-gradient(270deg, var(--drupal-purple) -0.5%, #22a5e5 100.62%);

  --drupal-heading-font: "ZT Gatha", "Noto Sans", system-ui, sans-serif;
  --drupal-button-radius: 6px;
  --drupal-card-radius: 10px;
  --drupal-header-shadow: 0 2px 10px 0 rgb(0 0 0 / 0.05);

  /* Material puts these first in its body and code font stacks. */
  --md-text-font: "Noto Sans";
  --md-code-font: ui-monospace;
}

/* Light: Navy on white, as new.drupal.org. */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--drupal-navy);
  --md-primary-fg-color--light: var(--drupal-dark-blue);
  --md-primary-fg-color--dark: var(--drupal-dark-navy);
  --md-primary-bg-color: var(--drupal-white);
  --md-primary-bg-color--light: rgb(255 255 255 / 0.7);
  --md-accent-fg-color: var(--drupal-dark-blue);
  --md-accent-fg-color--transparent: rgb(0 106 169 / 0.1);
  --md-accent-bg-color: var(--drupal-white);

  --md-default-bg-color: var(--drupal-white);
  --md-default-fg-color: var(--drupal-navy);
  --md-default-fg-color--light: var(--drupal-gray-dark);
  --md-default-fg-color--lighter: var(--drupal-gray-mild);
  --md-default-fg-color--lightest: var(--drupal-gray-pale);
  --md-typeset-color: var(--drupal-navy);
  --md-typeset-a-color: var(--drupal-dark-blue);
  --md-code-fg-color: var(--drupal-navy);
  --md-code-bg-color: var(--drupal-soft-white);
  --md-typeset-table-color: var(--drupal-gray-milder);
  --md-typeset-mark-color: var(--drupal-light-blue);
  --md-footer-fg-color: var(--drupal-white);
  --md-footer-bg-color: var(--drupal-navy);
  --md-footer-bg-color--dark: var(--drupal-light-blue);

  --drupal-surface: var(--drupal-white);
  --drupal-surface-fg: var(--drupal-navy);
  --drupal-band: var(--drupal-soft-white);
  --drupal-line: var(--drupal-gray-pale);
}

/* Dark: white and Light Blue on Dark Navy. new.drupal.org has no dark
   scheme; this one keeps the same structure in the brand's darkest blue. */
[data-md-color-scheme="slate"] {
  --md-hue: 223;
  --md-primary-fg-color: var(--drupal-dark-navy);
  --md-primary-fg-color--light: var(--drupal-navy);
  --md-primary-fg-color--dark: #050d22;
  --md-primary-bg-color: var(--drupal-white);
  --md-primary-bg-color--light: rgb(255 255 255 / 0.7);
  --md-accent-fg-color: var(--drupal-light-blue);
  --md-accent-fg-color--transparent: rgb(204 237 249 / 0.1);
  --md-accent-bg-color: var(--drupal-dark-navy);

  --md-default-bg-color: #0a173a;
  --md-default-fg-color: rgb(255 255 255 / 0.92);
  --md-default-fg-color--light: rgb(255 255 255 / 0.72);
  --md-default-fg-color--lighter: rgb(255 255 255 / 0.36);
  --md-default-fg-color--lightest: rgb(255 255 255 / 0.1);
  --md-typeset-color: rgb(255 255 255 / 0.92);
  --md-typeset-a-color: var(--drupal-light-blue);
  --md-code-fg-color: rgb(255 255 255 / 0.92);
  --md-code-bg-color: var(--drupal-dark-navy);
  --md-typeset-table-color: rgb(255 255 255 / 0.14);
  --md-typeset-mark-color: rgb(204 237 249 / 0.3);
  --md-footer-fg-color: var(--drupal-white);
  --md-footer-bg-color: var(--drupal-dark-navy);
  --md-footer-bg-color--dark: #050d22;

  --drupal-surface: var(--drupal-dark-navy);
  --drupal-surface-fg: var(--drupal-white);
  --drupal-band: var(--drupal-dark-navy);
  --drupal-line: rgb(255 255 255 / 0.14);
}

/* Base ------------------------------------------------------------------- */

body {
  background-color: var(--md-default-bg-color);
}

::selection {
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
}

/* Header: the floating white bar of new.drupal.org ----------------------- */

/* The header leaves the page flow, as on new.drupal.org, so a home page
   hero can run behind it. The container makes room for it everywhere else. */
.md-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 1rem 0.8rem 0;
  color: var(--drupal-surface-fg);
  background-color: transparent;
  box-shadow: none;

  --md-primary-fg-color: var(--drupal-surface);
  --md-primary-bg-color: var(--drupal-surface-fg);
  --md-primary-bg-color--light: var(--drupal-gray-dark);
}

.md-header--shadow {
  box-shadow: none;
}

.md-header__inner {
  max-width: 89rem;
  min-height: 3.6rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--drupal-card-radius);
  background-color: var(--drupal-surface);
  box-shadow: var(--drupal-header-shadow);
}

[data-md-color-scheme="slate"] .md-header {
  --md-primary-bg-color--light: rgb(255 255 255 / 0.72);
}

[data-md-color-scheme="slate"] .md-header__inner {
  border: 1px solid rgb(255 255 255 / 0.12);
}

.md-container {
  padding-top: 4.6rem;
}

/* Material keeps the sidebars clear of a sticky header; this one scrolls
   away, so they stick to the top of the window. */
@media screen and (min-width: 76.25em) {
  .md-sidebar {
    top: 0.6rem;
  }
}

.md-header__button.md-logo {
  margin: 0.2rem 0.2rem 0.2rem 0.4rem;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: auto;
  height: 2rem;
}

/* The mobile menu's title is Navy, so it shows the white logo that
   partials/logo.html adds when extra.logo_inverted is set. */
.md-logo img.drupal-logo--inverted,
.md-nav__title .md-logo:has(.drupal-logo--inverted) img:not(.drupal-logo--inverted) {
  display: none;
}

.md-nav__title .md-logo img.drupal-logo--inverted {
  display: block;
}

.md-header__title {
  margin-left: 0.4rem;
}

.md-header__topic:first-child {
  font-family: var(--drupal-heading-font);
  font-size: 0.95rem;
  font-weight: 700;
}

/* The page title that replaces the site name on scroll: the uppercase,
   tracked type of new.drupal.org's main menu. */
.md-header__topic + .md-header__topic {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.075rem;
  text-transform: uppercase;
}

/* Search: a Soft White field with a Navy outline on focus. */
@media screen and (min-width: 60em) {
  .md-search__form {
    border-radius: var(--drupal-button-radius);
    background-color: var(--drupal-soft-white);
  }

  .md-search__form:hover {
    background-color: var(--drupal-gray-pale);
  }

  .md-search__input,
  .md-search__input::placeholder,
  .md-search__input + .md-search__icon {
    color: var(--drupal-navy);
  }

  [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
    border-radius: var(--drupal-button-radius) var(--drupal-button-radius) 0 0;
    background-color: var(--drupal-white);
    box-shadow: inset 0 0 0 2px var(--drupal-navy);
  }

  [data-md-color-scheme="slate"] .md-search__form {
    background-color: rgb(255 255 255 / 0.08);
  }

  [data-md-color-scheme="slate"] .md-search__input,
  [data-md-color-scheme="slate"] .md-search__input::placeholder,
  [data-md-color-scheme="slate"] .md-search__input + .md-search__icon {
    color: var(--drupal-white);
  }

  [data-md-color-scheme="slate"] [data-md-toggle="search"]:checked ~ .md-header .md-search__form {
    background-color: var(--drupal-dark-navy);
    box-shadow: inset 0 0 0 2px var(--drupal-light-blue);
  }
}

/* The repository link in the header: the uppercase, tracked menu type. */
.md-header .md-source {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.075rem;
  text-transform: uppercase;
}

.md-source__facts {
  display: none;
}

.md-header__source {
  width: auto;
  max-width: 16rem;
}

.md-source__repository {
  max-width: none;
}

/* Tabs, when a project enables navigation.tabs: a second row of the
   white bar, in the main menu's type. */
.md-tabs {
  max-width: 89rem;
  margin: 0.4rem auto 0;
  width: calc(100% - 1.6rem);
  border-radius: var(--drupal-card-radius);
  color: var(--drupal-surface-fg);
  background-color: var(--drupal-surface);
  box-shadow: var(--drupal-header-shadow);
}

.md-tabs__link {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.075rem;
  text-transform: uppercase;
  opacity: 1;
}

.md-tabs__item--active .md-tabs__link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

/* Typography ------------------------------------------------------------- */

.md-typeset {
  font-size: 0.8rem;
  line-height: 1.6;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--md-default-fg-color);
  font-family: var(--drupal-heading-font);
  font-weight: 700;
  letter-spacing: 0;
}

.md-typeset h1 {
  margin-bottom: 1em;
  font-size: 2.5em;
  line-height: 1.05;
}

.md-typeset h2 {
  margin-top: 2em;
  font-size: 1.8em;
  line-height: 1.15;
}

.md-typeset h3 {
  font-size: 1.35em;
  line-height: 1.25;
}

.md-typeset h4 {
  font-size: 1.1em;
  line-height: 1.3;
}

.md-typeset h5,
.md-typeset h6 {
  color: var(--md-default-fg-color);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

/* Links in running text are underlined, as on new.drupal.org. */
.md-typeset a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.md-typeset a:hover {
  color: var(--md-default-fg-color);
  text-decoration-thickness: 2px;
}

.md-typeset .headerlink,
.md-typeset .md-button {
  text-decoration: none;
}

/* Focus: new.drupal.org's 3px Drupal Blue ring. */
:is(a, button, input, label, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--drupal-blue);
  outline-offset: 3px;
}

/* Buttons: Navy, 3px border, 6px corners; hover turns them white. */
.md-typeset .md-button {
  padding: 0.6rem 0.85rem;
  border: 3px solid var(--drupal-navy);
  border-radius: var(--drupal-button-radius);
  color: var(--drupal-navy);
  background-color: var(--drupal-white);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
}

.md-typeset .md-button--primary {
  color: var(--drupal-white);
  background-color: var(--drupal-navy);
}

.md-typeset .md-button:hover,
.md-typeset .md-button:focus-visible {
  border-color: var(--drupal-navy);
  color: var(--drupal-white);
  background-color: var(--drupal-navy);
}

.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus-visible {
  color: var(--drupal-navy);
  background-color: var(--drupal-white);
}

.md-typeset .md-button:active {
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
}

/* Light Blue, for buttons on Navy or the gradient. */
.md-typeset .md-button--light {
  border-color: var(--drupal-light-blue);
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
}

.md-typeset .md-button--light:hover,
.md-typeset .md-button--light:focus-visible {
  border-color: var(--drupal-white);
  color: var(--drupal-navy);
  background-color: var(--drupal-white);
}

[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--light) {
  border-color: var(--drupal-light-blue);
  color: var(--drupal-light-blue);
  background-color: transparent;
}

[data-md-color-scheme="slate"] .md-typeset .md-button--primary:not(.md-button--light),
[data-md-color-scheme="slate"] .md-typeset .md-button:not(.md-button--light):hover {
  color: var(--drupal-dark-navy);
  background-color: var(--drupal-light-blue);
}

/* Code, tables and other content ----------------------------------------- */

.md-typeset code,
.md-typeset pre > code {
  border-radius: var(--drupal-button-radius);
}

[data-md-color-scheme="default"] .md-typeset :not(pre) > code {
  background-color: var(--drupal-gray-pale);
}

.md-typeset table:not([class]) {
  border: 1px solid var(--md-typeset-table-color);
  border-radius: var(--drupal-button-radius);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

.md-typeset table:not([class]) th {
  color: var(--md-default-fg-color);
  background-color: var(--md-code-bg-color);
  font-weight: 700;
}

.md-typeset .admonition,
.md-typeset details {
  border-width: 0 0 0 4px;
  border-radius: var(--drupal-button-radius);
  font-size: 0.75rem;
  box-shadow: none;
}

.md-typeset .admonition:is(.note, .info, .tip, .abstract),
.md-typeset details:is(.note, .info, .tip, .abstract) {
  border-color: var(--drupal-blue);
  background-color: rgb(204 237 249 / 0.35);
}

.md-typeset .admonition:is(.warning, .caution, .attention),
.md-typeset details:is(.warning, .caution, .attention) {
  border-color: var(--drupal-yellow);
  background-color: rgb(255 196 35 / 0.12);
}

.md-typeset .admonition:is(.danger, .error, .failure, .bug),
.md-typeset details:is(.danger, .error, .failure, .bug) {
  border-color: var(--drupal-red);
  background-color: rgb(244 99 81 / 0.1);
}

.md-typeset .admonition:is(.success, .check, .done),
.md-typeset details:is(.success, .check, .done) {
  border-color: var(--drupal-green);
  background-color: rgb(57 118 24 / 0.08);
}

.md-typeset .admonition-title,
.md-typeset summary {
  background-color: transparent !important;
  font-weight: 700;
}

/* Images in the docs folder get a hairline and the card corners. */
.md-typeset img[src*="images/"] {
  border: 1px solid var(--drupal-line);
  border-radius: var(--drupal-card-radius);
}

/* Pages that show a light and a dark version of a video show the one for
   the color scheme; Material does the same for images by their #only-light
   and #only-dark fragments. */
[data-md-color-scheme="default"] .only-dark,
[data-md-color-scheme="slate"] .only-light {
  display: none;
}

/* Navigation ------------------------------------------------------------- */

.md-nav {
  font-size: 0.72rem;
}

.md-nav__title {
  color: var(--md-default-fg-color);
}

.md-nav--primary .md-nav__item--section > .md-nav__link {
  color: var(--md-default-fg-color);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.075rem;
  text-transform: uppercase;
}

.md-nav__link--active,
.md-nav__item .md-nav__link--active {
  color: var(--md-default-fg-color);
  font-weight: 700;
}

/* The current page carries new.drupal.org's Drupal Blue rule in the
   sidebar; the mobile menu keeps Material's own marking. */
@media screen and (min-width: 76.25em) {
  .md-nav--primary .md-nav__link--active {
    margin-left: -0.6rem;
    padding-left: 0.45rem;
    border-left: 3px solid var(--drupal-blue);
  }
}

/* Footer: Navy, then a Light Blue strip, as new.drupal.org ends. ---------- */

.md-footer {
  color: var(--md-footer-fg-color);
  background-color: var(--md-footer-bg-color);
}

.md-footer__title {
  font-family: var(--drupal-heading-font);
  font-weight: 700;
}

.md-footer-meta {
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
}

.md-footer-meta,
.md-footer-meta .md-copyright,
.md-footer-meta .md-copyright__highlight,
.md-footer-meta .md-social__link {
  color: var(--drupal-navy);
}

html .md-footer-meta.md-typeset a,
html .md-footer-meta.md-typeset a:hover {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

[data-md-color-scheme="slate"] .md-footer-meta,
[data-md-color-scheme="slate"] .md-footer-meta .md-copyright,
[data-md-color-scheme="slate"] .md-footer-meta .md-copyright__highlight,
[data-md-color-scheme="slate"] .md-footer-meta .md-social__link {
  color: rgb(255 255 255 / 0.8);
  background-color: var(--md-footer-bg-color--dark);
}

/* Home page -------------------------------------------------------------- */

/* home.html renders the page content full width in .drupal-home; each
   section sets its own width with .drupal-width. */
.md-main:has(.drupal-home) .md-main__inner {
  max-width: none;
  margin-top: 0;
}

.drupal-home.md-content__inner {
  margin: 0;
  padding: 0;
}

.drupal-home.md-content__inner::before {
  display: none;
}

.drupal-home .headerlink {
  display: none;
}

.drupal-width {
  width: calc(100% - 3.2rem);
  max-width: 64rem;
  margin-right: auto;
  margin-left: auto;
}

/* Hero: the gradient band at the top of new.drupal.org. It starts under
   the floating header. Two columns: .drupal-hero__copy and
   .drupal-hero__media. */
.md-container:has(.drupal-hero) {
  padding-top: 0;
}

.drupal-hero {
  color: var(--drupal-white);
  background: var(--drupal-gradient);
}

.drupal-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
  max-width: 76rem;
  padding-top: 8rem;
  padding-bottom: 4.5rem;
}

.md-typeset .drupal-hero h1 {
  margin: 0 0 1.2rem;
  color: var(--drupal-white);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1;
}

.drupal-hero__copy > p {
  max-width: 30ch;
  margin: 0;
  color: var(--drupal-white);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

.drupal-hero__copy .drupal-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  max-width: none;
  margin-top: 2rem;
}

.md-typeset .drupal-hero__actions .md-button {
  margin: 0;
}

.md-typeset .drupal-hero__actions .md-button:not(.md-button--light) {
  border-color: var(--drupal-navy);
  color: var(--drupal-navy);
  background-color: var(--drupal-white);
}

.md-typeset .drupal-hero__actions .md-button:not(.md-button--light):hover {
  border-color: var(--drupal-white);
  color: var(--drupal-white);
  background-color: var(--drupal-navy);
}

.drupal-hero__copy .drupal-hero__note {
  margin-top: 1.6rem;
  color: rgb(255 255 255 / 0.82);
  font-size: 0.7rem;
}

.drupal-hero__media {
  min-width: 0;
}

/* Selector: a segmented control that shows one of several panels.

   <div class="drupal-switch">
     <fieldset class="drupal-switch__options">
       <legend class="drupal-visually-hidden">…</legend>
       <input type="radio" name="x" id="x-1" checked><label for="x-1">…</label>
       <input type="radio" name="x" id="x-2"><label for="x-2">…</label>
     </fieldset>
     <div class="drupal-switch__panel">…</div>
     <div class="drupal-switch__panel">…</div>
   </div>

   The nth option shows the nth panel, for up to four. drupal-pages.js
   pauses any video in a panel that is hidden. */
.drupal-switch__options {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 3px;
  border: 0;
  border-radius: var(--drupal-button-radius);
  background-color: rgb(9 25 66 / 0.45);
}

.drupal-switch__options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drupal-switch__options label {
  padding: 0.55rem 0.9rem;
  border-radius: calc(var(--drupal-button-radius) - 2px);
  color: var(--drupal-white);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.075rem;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}

.drupal-switch__options label:hover {
  background-color: rgb(255 255 255 / 0.12);
}

.drupal-switch__options input:checked + label {
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
}

.drupal-switch__options input:focus-visible + label {
  outline: 3px solid var(--drupal-white);
  outline-offset: 2px;
}

.drupal-switch__panel + .drupal-switch__panel {
  display: none;
}

@supports selector(:has(a)) {
  .drupal-switch__panel {
    display: none;
  }

  .drupal-switch:has(input:nth-of-type(1):checked) .drupal-switch__panel:nth-of-type(1),
  .drupal-switch:has(input:nth-of-type(2):checked) .drupal-switch__panel:nth-of-type(2),
  .drupal-switch:has(input:nth-of-type(3):checked) .drupal-switch__panel:nth-of-type(3),
  .drupal-switch:has(input:nth-of-type(4):checked) .drupal-switch__panel:nth-of-type(4) {
    display: block;
  }
}

.drupal-switch__panel video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--drupal-card-radius);
  background-color: var(--drupal-dark-navy);
  box-shadow: 0 1rem 2.5rem rgb(9 25 66 / 0.35);
}

.drupal-switch__panel p {
  margin: 0.9rem 0 0;
  color: rgb(255 255 255 / 0.85);
  font-size: 0.68rem;
  line-height: 1.55;
}

/* Sections below the hero. .drupal-section--band gives one the Soft White
   ground new.drupal.org alternates with white. */
.drupal-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.drupal-section--band {
  background-color: var(--drupal-band);
}

/* Code on a band takes the page ground, so it stands out from the band. */
.drupal-section--band {
  --md-code-bg-color: var(--md-default-bg-color);
}

[data-md-color-scheme="default"] .drupal-section--band .md-typeset :not(pre) > code,
[data-md-color-scheme="default"] .md-typeset .drupal-section--band :not(pre) > code {
  background-color: var(--drupal-white);
}

.md-typeset .drupal-section h2 {
  margin-top: 0;
}

.drupal-section .drupal-lead {
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.6;
}

/* Panel: a card for the hero's second column, around a code block.

   <div class="drupal-panel">
     <div class="drupal-panel__heading"><img …><span>…</span></div>
     ```lang title="file name"
     …
     ```
     <div class="drupal-panel__status">…</div>
     <p class="drupal-panel__note">…</p>
   </div> */
.drupal-panel__heading {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.drupal-panel__heading img {
  width: 2rem;
  height: 2rem;
}

.md-typeset .drupal-panel .highlight,
.md-typeset .drupal-panel .highlight pre {
  margin: 0;
}

.md-typeset .drupal-panel .highlight .filename {
  margin: 0;
  padding: 0.6rem 0.9rem;
  border-radius: var(--drupal-card-radius) var(--drupal-card-radius) 0 0;
  color: var(--drupal-white);
  background-color: var(--drupal-navy);
  font-size: 0.62rem;
  font-weight: 700;
}

.md-typeset .drupal-panel .highlight pre > code {
  padding: 1rem 0.9rem;
  border-radius: 0;
  color: var(--drupal-light-blue);
  background-color: var(--drupal-dark-navy);
  font-size: 0.62rem;
  line-height: 1.8;
}

.md-typeset .drupal-panel .highlight :is(.p, .w) {
  color: rgb(204 237 249 / 0.75);
}

.md-typeset .drupal-panel .highlight .nt {
  color: var(--drupal-light-blue);
}

.md-typeset .drupal-panel .highlight :is(.s, .s1, .s2, .m, .mi, .mf) {
  color: var(--drupal-yellow);
}

.md-typeset .drupal-panel .highlight :is(.c, .c1, .cm, .ch) {
  color: rgb(204 237 249 / 0.6);
}

/* A panel without a status bar rounds the bottom of its code instead. */
.md-typeset .drupal-panel .highlight:last-child pre > code {
  border-radius: 0 0 var(--drupal-card-radius) var(--drupal-card-radius);
}

.md-typeset .drupal-panel .md-code__button {
  color: var(--drupal-light-blue);
}

.drupal-panel__status {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 0 0 var(--drupal-card-radius) var(--drupal-card-radius);
  color: var(--drupal-navy);
  background-color: var(--drupal-light-blue);
  font-size: 0.68rem;
  font-weight: 700;
}

.drupal-panel__status::before {
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background-color: var(--drupal-green);
  content: "";
}

.drupal-panel .drupal-panel__note {
  margin: 0.7rem 0 0;
  color: rgb(255 255 255 / 0.82);
  font-size: 0.62rem;
}

/* Steps: equal columns, each under new.drupal.org's Drupal Blue rule.
   <div class="drupal-steps"><div class="drupal-step">…</div>…</div> */
.drupal-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.drupal-step {
  padding-top: 1rem;
  border-top: 3px solid var(--drupal-blue);
}

.md-typeset .drupal-step h3 {
  margin: 0 0 0.6rem;
}

.md-typeset .drupal-step p {
  margin: 0 0 0.8rem;
}

/* Columns: two equal columns, stacked on narrow screens. */
.drupal-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  align-items: center;
}

.md-typeset .drupal-columns h2 {
  margin-top: 0;
}

/* Rows: a heading beside a description, between hairlines.
   <div class="drupal-row">### [Title](…)\n\nDescription</div> */
.drupal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid var(--drupal-line);
}

.drupal-row:last-child {
  border-bottom: 1px solid var(--drupal-line);
}

.md-typeset .drupal-row :is(h3, p) {
  margin: 0;
}

.md-typeset .drupal-row h3 {
  font-size: 1.15em;
}

/* Close: a Navy band of project links above the footer.
   <section class="drupal-close"><div class="drupal-width drupal-close__grid">
     <div class="drupal-close__brand"><img …><span>…</span></div>
     <div class="drupal-close__links">[…](…) …</div>
   </div></section> */
.drupal-close {
  color: var(--drupal-white);
  background-color: var(--drupal-navy);
}

[data-md-color-scheme="slate"] .drupal-close {
  background-color: var(--drupal-dark-navy);
}

.drupal-close__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.drupal-close__brand {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--drupal-heading-font);
  font-size: 0.9rem;
  font-weight: 700;
}

.drupal-close__brand img {
  width: 2rem;
  height: 2rem;
}

.md-typeset .drupal-close__links p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 0;
}

.md-typeset .drupal-close__links a {
  color: var(--drupal-white);
  font-size: 0.7rem;
  font-weight: 700;
}

/* With navigation.tabs, the tabs float over the hero as the header's
   second row, as new.drupal.org's menu sits over its hero. */
@media screen and (min-width: 76.25em) {
  .md-container:has(.drupal-hero) .md-tabs {
    position: absolute;
    z-index: 3;
    top: 5rem;
    right: 0.8rem;
    left: 0.8rem;
    margin-top: 0;
  }

  .md-container:has(.drupal-hero):has(.md-tabs) .drupal-hero__grid {
    padding-top: 10.5rem;
  }
}

.drupal-visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

@media screen and (max-width: 60em) {
  .md-header {
    padding: 0.6rem 0.6rem 0;
  }

  .md-container {
    padding-top: 4.2rem;
  }

  .drupal-width {
    width: calc(100% - 1.6rem);
  }

  .drupal-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.4rem;
    padding-top: 6.5rem;
    padding-bottom: 3rem;
  }

  .drupal-section {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .drupal-columns,
  .drupal-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .drupal-row {
    gap: 0.3rem;
  }
}

@media screen and (max-width: 30em) {
  .drupal-switch__options {
    display: flex;
  }

  .drupal-switch__options label {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding-inline: 0.5rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
