/* Shared menu for pages that still use nav.main.
   Loaded after nav-fit.css. The homepage uses nav.main-nav and is unchanged.
   Labels stay in the HTML, so the menu works with JavaScript off. */

html body nav.main#main-nav ul {
  gap: .35rem;
  margin: 0;
  padding: 0;
  line-height: 1.65;
}
html body nav.main#main-nav li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  line-height: 0;
}
html body nav.main#main-nav a,
html.js body nav.main#main-nav.open a,
html.js body nav.main#main-nav.open a[class^="e-"] {
  display: inline-block;
  box-sizing: border-box;
  background: #E3F4FA;
  color: #005F80;
  border: 0;
  border-bottom: 0;
  border-radius: 999px;
  box-shadow: none;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.65;
  min-height: 0;
  margin: 0;
  padding: .35rem .7rem;
  text-decoration: none;
}
html[data-theme="dark"] body nav.main#main-nav a,
html[data-theme="dark"] body nav.main#main-nav.open a[class^="e-"] {
  background: #1a2a3a;
  color: #cfefff;
}
html body nav.main#main-nav a[aria-current="page"] {
  background: #00739A;
  color: #fff;
}
html body nav.main#main-nav a:focus-visible {
  outline: 3px solid #F59E0B;
  outline-offset: 2px;
}

/* The article shell caps .header-inner at 1320px. The homepage bar is full width.
   Only the shared header changes. Article text and the card column stay capped. */
html body .site-header > .header-inner {
  max-width: min(120rem, 100%);
  width: 100%;
  box-sizing: border-box;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* At 1600px the teaser row is repeat(5, 1fr). The 1fr minimum is the card content,
   so the row painted to the viewport edge and opened a horizontal scrollbar.
   minmax(0, 1fr) keeps those five columns inside the existing article measure. */
@media (min-width: 1600px) {
  html body main:has(.teaser-grid) .prose {
    max-width: 100%;
  }
  html body main .teaser-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
  }
  html body main .teaser-grid > li {
    min-width: 0;
  }
  html body main .teaser-grid img {
    max-width: 100%;
    height: auto;
  }
}

/* Match the homepage: pills from 821px up, dropdown only below that. */
@media (min-width: 821px) {
  html.js nav.main#main-nav {
    display: block;
    position: static;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    z-index: auto;
  }
  html.js nav.main#main-nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .35rem;
    white-space: normal;
    width: auto;
    margin: 0;
    padding: 0;
  }
  html.js .site-header .menu-btn {
    display: inline-flex;
  }
}
@media (max-width: 820px) {
  html.js nav.main#main-nav {
    padding: .35rem .75rem .75rem;
    border-top: 0;
    border-bottom: 1px solid var(--line, #d9d3c5);
    box-sizing: border-box;
  }
  html.js nav.main#main-nav.open ul {
    flex-wrap: nowrap;
    padding: 0;
  }
  html.js nav.main#main-nav.open a,
  html.js nav.main#main-nav.open a[class^="e-"] {
    display: block;
    width: 100%;
    border-radius: 999px;
  }
}

/* The menu backdrop is part of menu.js. Live pages do not load nav-fit.css, so it lives here too. */
.mrh-menu-backdrop{display:none;position:fixed;inset:0;z-index:45;background:transparent}
html.mrh-menu-open .mrh-menu-backdrop{display:block}
html.mrh-menu-open .site-header{z-index:60}

/* Matrix Live is desk HTML. This bar is the public site menu, not desk chrome. */
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(/fonts/atkinson-hyperlegible-bold.woff2) format("woff2")}
@font-face{font-family:"Archivo Black";font-style:normal;font-weight:400;font-display:swap;src:url(/fonts/archivo-black.woff2) format("woff2")}
.mrh-live-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #FAF9F5;
  color: #1A1D1B;
  border-bottom: 1px solid #d9d3c5;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html.mrh-menu-open .mrh-live-nav { z-index: 60; }
.mrh-live-nav nav.main ul,
.mrh-live-nav nav.main li { list-style: none; margin: 0; padding: 0; }
html body .mrh-live-nav .header-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  box-sizing: border-box;
  width: 100%;
  max-width: min(120rem, 100%);
  margin: 0 auto;
  padding: .65rem 1rem;
}
html body .mrh-live-nav nav.main#main-nav {
  flex: 1 0 100%;
  width: 100%;
  max-width: none;
}
html body .mrh-live-nav nav.main#main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  width: 100%;
}
html body .mrh-live-nav nav.main#main-nav a {
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.65;
  min-height: 0;
  margin: 0;
  padding: .35rem .7rem;
}
.mrh-live-nav .header-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-left: auto; }
.mrh-live-nav .header-share { position: relative; order: 0; }
.mrh-live-nav .header-tools .search-wrap { order: 0; }
.mrh-live-nav .theme-btn { order: 2; }
.mrh-live-nav .menu-btn { order: 3; }
.mrh-live-nav .header-share .share-panel {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
  background: var(--surface, var(--bg, #fff));
  border: 1px solid var(--line, #c9d0d4);
  border-radius: 10px; padding: .5rem; min-width: 160px;
  flex: 0 0 auto; width: auto; max-width: min(260px, calc(100vw - 2rem));
}
@media (max-width: 720px) {
  .mrh-live-nav .header-tools { width: 100%; margin-left: 0; flex-wrap: nowrap; }
  .mrh-live-nav .header-tools .search-wrap { max-width: none; flex: 1 1 auto; min-width: 0; }
}
.mrh-live-nav .brand {
  display: flex;
  gap: .65rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.mrh-live-nav .brand-name {
  font-family: "Archivo Black", "Arial Black", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  display: block;
}
.mrh-live-nav .brand-strap {
  display: block;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem;
  color: #565D66;
}
.mrh-live-nav .wm-matrix { color: #0098C7; }
.mrh-live-nav .wm-re { color: #E01484; }
.mrh-live-nav .wm-com { color: #F57C00; }
.mrh-live-nav .menu-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid #d9d3c5;
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: .45rem .8rem;
  font: 700 .9rem/1 Archivo, system-ui, sans-serif;
  cursor: pointer;
}
.mrh-live-nav .mb-icon,
.mrh-live-nav .mb-icon::before,
.mrh-live-nav .mb-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.mrh-live-nav .mb-icon::before,
.mrh-live-nav .mb-icon::after { content: ""; position: absolute; left: 0; }
.mrh-live-nav .mb-icon::before { top: -5px; }
.mrh-live-nav .mb-icon::after { top: 5px; }
.mrh-live-nav .menu-btn[aria-expanded="true"] .mb-icon { background: transparent; }
.mrh-live-nav .menu-btn[aria-expanded="true"] .mb-icon::before { top: 0; transform: rotate(45deg); }
.mrh-live-nav .menu-btn[aria-expanded="true"] .mb-icon::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 820px) {
  html.js .mrh-live-nav nav.main {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    margin: 0;
    padding: .35rem .75rem .75rem;
    background: #fff;
    border-bottom: 1px solid #d9d3c5;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
  }
  html.js .mrh-live-nav nav.main.open {
    display: block;
    max-height: calc(100dvh - 5.5rem);
    overflow: auto;
  }
  html.js .mrh-live-nav nav.main.open ul { flex-direction: column; }
}
@media (min-width: 821px) {
  .mrh-live-nav .mb-icon,
  .mrh-live-nav .mb-icon::before,
  .mrh-live-nav .mb-icon::after { display: none; }
}
