/*
  Site header, footer and cookie bar ("site chrome").

  RULE FOR THIS FILE: every selector starts with a class beginning ".mmc-".
  Nothing here may target bare elements (a, button, h1, input ...) or shared class
  names (.btn, .container ...), so loading this file can never restyle a page's own content.
  Each element also sets its own font, colour and spacing, so page styles cannot leak in.
*/

.mmc-header,
.mmc-footer,
.mmc-cookie-bar {
  --mmc-black: #000000;
  --mmc-ink: #111111;
  --mmc-panel: #16181d;
  --mmc-panel-hover: #24272e;
  --mmc-line: #2f323a;
  --mmc-footer-bg: #202229;
  --mmc-footer-line: #4d4e54;
  --mmc-white: #ffffff;
  --mmc-muted: #a3a6ae;
  --mmc-orange: #f88d1d;
  --mmc-orange-strong: #ff8800;
  --mmc-font: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  /* Width of the header's and footer's content. The pages' own content sits in a 1214px
     container with 20px inside each edge, so this lines both up with the page below. */
  --mmc-width: 1174px;

  font-family: var(--mmc-font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}

.mmc-header *,
.mmc-header *::before,
.mmc-header *::after,
.mmc-footer *,
.mmc-footer *::before,
.mmc-footer *::after,
.mmc-cookie-bar *,
.mmc-cookie-bar *::before,
.mmc-cookie-bar *::after {
  box-sizing: border-box;
}

.mmc-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Buttons used inside the chrome ---------- */

.mmc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mmc-btn:focus-visible {
  outline: 2px solid var(--mmc-white);
  outline-offset: 2px;
}

/* The filled orange button: "Try Free" in the header and the footer. */
.mmc-btn.mmc-btn--primary {
  background: var(--mmc-orange);
  border-color: var(--mmc-orange);
  color: var(--mmc-ink);
}

.mmc-btn.mmc-btn--primary:hover {
  background: var(--mmc-orange-strong);
  border-color: var(--mmc-orange-strong);
  color: var(--mmc-ink);
  text-decoration: none;
}

.mmc-btn.mmc-btn--small {
  min-height: 36px;
  padding: 0 18px;
  border-color: var(--mmc-orange);
  background: var(--mmc-orange);
  color: var(--mmc-ink);
  font-size: 14px;
}

.mmc-btn.mmc-btn--small:hover {
  background: var(--mmc-orange-strong);
  border-color: var(--mmc-orange-strong);
}

/* ---------- Header ---------- */

.mmc-header {
  /* Orange is the site's own orange, shared with the footer and cookie bar.
     The greys below are used only by the header and its menus. */
  --mmc-accent: var(--mmc-orange);
  --mmc-bar-line: #1f1f1f;
  --mmc-menu-bg: #1f1f1f;
  --mmc-menu-hover: #2b2b2b;
  --mmc-menu-line: #666666;
  --mmc-menu-divider: #333333;
  --mmc-menu-text: #b0b0b0;
  --mmc-menu-label: #9a9a9a;
  --mmc-sheet-bg: #0b0b0b;
  --mmc-sheet-line: #222222;
  --mmc-sheet-menu-line: #444444;

  position: relative;
  z-index: 50;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--mmc-sheet-line);
  background: var(--mmc-black);
  color: var(--mmc-white);
}

/* The open phone menu must sit above the cookie bar. */
.mmc-header.is-nav-open {
  z-index: 80;
}

.mmc-header .mmc-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--mmc-width);
  height: 64px;
  margin: 0 auto;
  padding: 0;
}

.mmc-header .mmc-header__logo {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
}

.mmc-header .mmc-header__logo img,
.mmc-header .mmc-nav__bar-logo {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
  height: 40px;
  border: 0;
  object-fit: contain;
  object-position: left center;
}

.mmc-header .mmc-header__burger {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mmc-white);
  cursor: pointer;
}

.mmc-header .mmc-header__burger-line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

.mmc-header .mmc-header__burger:focus-visible,
.mmc-header .mmc-nav__close:focus-visible {
  outline: 2px solid var(--mmc-accent);
  outline-offset: 2px;
}

/* Navigation: phone layout first (a full-screen sheet), desktop layout further down. */

.mmc-header .mmc-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: var(--mmc-sheet-bg);
}

.mmc-header .mmc-nav.is-open {
  display: flex;
}

/* Stops the page behind the open phone menu from scrolling. */
.mmc-nav-locked {
  overflow: hidden;
}

/* Top bar of the sheet: same height and logo position as the header it covers. */
.mmc-header .mmc-nav__bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 65px;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--mmc-sheet-line);
  background: var(--mmc-black);
}

.mmc-header .mmc-nav__close {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mmc-white);
  cursor: pointer;
}

.mmc-header .mmc-nav__close::before,
.mmc-header .mmc-nav__close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  margin: -1px 0 0 -10px;
  background: currentColor;
  content: '';
}

.mmc-header .mmc-nav__close::before {
  transform: rotate(45deg);
}

.mmc-header .mmc-nav__close::after {
  transform: rotate(-45deg);
}

.mmc-header .mmc-nav__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 8px 20px;
  list-style: none;
}

.mmc-header .mmc-nav__item {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--mmc-sheet-line);
}

.mmc-header .mmc-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.mmc-header .mmc-nav__link:hover {
  color: var(--mmc-accent);
  text-decoration: none;
}

/* The page being shown: white with an orange underline. Orange text means "this menu is open". */
.mmc-header .mmc-nav__item.is-current > .mmc-nav__link .mmc-nav__label {
  padding: 4px 0 2px;
  border-bottom: 2px solid var(--mmc-accent);
}

.mmc-header .mmc-nav__item.is-open > .mmc-nav__toggle {
  color: var(--mmc-accent);
}

.mmc-header .mmc-nav__link:focus-visible {
  outline: 2px solid var(--mmc-accent);
  outline-offset: 2px;
}

/* Log in always has an orange outline, so its keyboard-focus ring is white, like the buttons'. */
.mmc-header .mmc-nav__login:focus-visible {
  outline: 2px solid var(--mmc-white);
  outline-offset: 2px;
}

.mmc-header .mmc-nav__chevron {
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.mmc-header .mmc-nav__item.is-open > .mmc-nav__toggle .mmc-nav__chevron {
  transform: rotate(180deg);
}

/* Drop-down panel */

.mmc-header .mmc-menu {
  display: none;
  margin: 0 0 10px;
  padding: 6px;
  border: 1px solid var(--mmc-sheet-menu-line);
  border-radius: 12px;
  background: var(--mmc-menu-bg);
}

.mmc-header .mmc-nav__item.is-open > .mmc-menu {
  display: block;
}

.mmc-header .mmc-menu__group {
  margin: 0;
  padding: 0;
}

.mmc-header .mmc-menu__group + .mmc-menu__group {
  border-top: 1px solid var(--mmc-menu-divider);
}

.mmc-header .mmc-menu__title {
  margin: 0;
  padding: 8px 10px 2px;
  color: var(--mmc-menu-label);
  font-family: var(--mmc-font);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mmc-header .mmc-menu__group + .mmc-menu__group .mmc-menu__title {
  padding-top: 10px;
}

.mmc-header .mmc-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mmc-header .mmc-menu__list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mmc-header .mmc-menu__link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: none;
}

.mmc-header .mmc-menu__link-title {
  display: block;
  color: inherit;
  font-size: 15px;
}

.mmc-header .mmc-menu__link-text {
  display: block;
  color: var(--mmc-menu-text);
  font-size: 13px;
  line-height: 1.35;
}

.mmc-header .mmc-menu__link:hover,
.mmc-header .mmc-menu__link:focus-visible {
  background: var(--mmc-menu-hover);
  color: var(--mmc-accent);
  text-decoration: none;
}

.mmc-header .mmc-menu__link:focus-visible {
  outline: 2px solid var(--mmc-accent);
  outline-offset: -2px;
}

/* The page being shown, inside its menu: marked by the background only. */
.mmc-header .mmc-menu__link.is-current {
  background: var(--mmc-menu-hover);
}

/* Log in / Try Free: pinned to the bottom of the phone menu. */

.mmc-header .mmc-nav__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 10px;
  margin: 0;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--mmc-sheet-line);
}

.mmc-header .mmc-nav__login {
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--mmc-accent);
  border-radius: 999px;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.mmc-header .mmc-nav__login:hover {
  color: var(--mmc-accent);
  text-decoration: none;
}

.mmc-header .mmc-nav__actions .mmc-btn {
  flex: 1 1 0;
  min-height: 48px;
  padding: 0 22px;
  font-size: 16px;
}

/* Desktop layout. Keep this width the same as DESKTOP in site-chrome.js. */

@media (min-width: 992px) {
  .mmc-header {
    border-bottom-color: var(--mmc-bar-line);
  }

  .mmc-header .mmc-header__inner {
    height: 90px;
  }

  .mmc-header .mmc-header__logo {
    flex: 0 0 auto;
  }

  .mmc-header .mmc-header__logo img {
    height: 42px;
  }

  .mmc-header .mmc-header__burger,
  .mmc-header .mmc-nav__bar {
    display: none;
  }

  .mmc-header .mmc-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: stretch;
    align-self: stretch;
    justify-content: flex-end;
    gap: 18px;
    background: transparent;
  }

  .mmc-header .mmc-nav__list {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 18px;
    overflow: visible;
    padding: 0;
  }

  /* Each entry fills the header's height, so its menu hangs from the bottom edge
     and the pointer can travel from the name to the panel without leaving it. */
  .mmc-header .mmc-nav__item {
    display: flex;
    align-items: center;
    border-bottom: 0;
  }

  /* The underline sits on the header's bottom edge. (A drawn bar, not an inset shadow:
     inset shadows leave hairlines at the sides on screens with fractional scaling.) */
  .mmc-header .mmc-nav__item.is-current::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--mmc-accent);
    content: '';
  }

  .mmc-header .mmc-nav__item.is-current > .mmc-nav__link .mmc-nav__label {
    padding: 0;
    border-bottom: 0;
  }

  .mmc-header .mmc-nav__link {
    display: inline-flex;
    justify-content: flex-start;
    width: auto;
    min-height: 44px;
    font-size: 15px;
    white-space: nowrap;
  }

  .mmc-header .mmc-nav__toggle {
    margin: 0 -4px;
    padding: 0 4px;
  }

  .mmc-header .mmc-nav__link:focus-visible {
    outline-offset: 4px;
  }

  .mmc-header .mmc-menu {
    display: block;
    position: absolute;
    top: calc(100% - 10px);
    left: -28px;
    z-index: 60;
    width: 260px;
    margin: 0;
    padding: 10px;
    border-color: var(--mmc-menu-line);
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
  }

  /* A panel with descriptions is as wide as its longest line, within limits,
     so each description stays on one line. */
  .mmc-header .mmc-menu.mmc-menu--described {
    width: max-content;
    min-width: 340px;
    max-width: 400px;
  }

  /* Notch pointing up at the menu name. */
  .mmc-header .mmc-menu::before {
    position: absolute;
    top: -6px;
    left: 64px;
    width: 10px;
    height: 10px;
    border-top: 1px solid var(--mmc-menu-line);
    border-left: 1px solid var(--mmc-menu-line);
    background: var(--mmc-menu-bg);
    transform: rotate(45deg);
    content: '';
  }

  .mmc-header .mmc-nav__item.is-open > .mmc-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s;
  }

  .mmc-header .mmc-menu__group + .mmc-menu__group {
    margin-top: 8px;
  }

  .mmc-header .mmc-menu__title {
    margin-bottom: 2px;
    padding: 8px 12px 4px;
    font-size: 11px;
  }

  .mmc-header .mmc-menu__group + .mmc-menu__group .mmc-menu__title {
    padding-top: 12px;
  }

  .mmc-header .mmc-menu__list li + li {
    margin-top: 2px;
  }

  .mmc-header .mmc-menu__link {
    gap: 2px;
    padding: 10px 12px;
  }

  /* Log in (outlined) and Try Free (filled) sit together as a pair of buttons. */
  .mmc-header .mmc-nav__actions {
    align-items: center;
    gap: 12px;
    padding: 0;
    border-top: 0;
  }

  .mmc-header .mmc-nav__login {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 20px;
    font-size: 15px;
  }

  .mmc-header .mmc-nav__actions .mmc-btn {
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 15px;
  }
}

/* Full-size desktop: the spacing and logo size of the design. */

@media (min-width: 1100px) {
  .mmc-header .mmc-header__logo img {
    height: 50px;
  }

  .mmc-header .mmc-nav,
  .mmc-header .mmc-nav__list {
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mmc-header .mmc-menu,
  .mmc-header .mmc-nav__chevron,
  .mmc-btn {
    transition: none;
  }
}

/* ---------- Footer ---------- */

.mmc-footer {
  margin: 0;
  padding: 0 20px;
  border-radius: 40px 40px 0 0;
  background: var(--mmc-footer-bg);
  color: var(--mmc-white);
}

.mmc-footer .mmc-footer__inner {
  width: 100%;
  max-width: var(--mmc-width);
  margin: 0 auto;
  padding: 0;
}

.mmc-footer .mmc-footer__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.mmc-footer .mmc-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.mmc-footer .mmc-footer__logo-link {
  display: block;
  line-height: 0;
}

/* Same logo sizes as the header at each screen width. */
.mmc-footer .mmc-footer__logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: 40px;
  border: 0;
  object-fit: contain;
}

/* Keyboard focus looks the same as in the header. */
.mmc-footer .mmc-footer__logo-link:focus-visible,
.mmc-footer .mmc-footer__social-link:focus-visible,
.mmc-footer .mmc-footer__link:focus-visible {
  outline: 2px solid var(--mmc-orange);
  outline-offset: 2px;
  border-radius: 6px;
}

.mmc-footer .mmc-footer__social {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mmc-footer .mmc-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  color: var(--mmc-muted);
  text-decoration: none;
}

.mmc-footer .mmc-footer__social-link:hover {
  color: var(--mmc-orange);
}

.mmc-footer .mmc-footer__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
  padding: 32px 0;
  border-top: 1px solid var(--mmc-footer-line);
  border-bottom: 1px solid var(--mmc-footer-line);
}

.mmc-footer .mmc-footer__col {
  margin: 0;
  padding: 0;
}

.mmc-footer .mmc-footer__col.mmc-footer__col--newsletter {
  grid-column: 1 / -1;
  max-width: 380px;
}

.mmc-footer .mmc-footer__title {
  margin: 0 0 12px;
  padding: 0;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}

.mmc-footer .mmc-footer__text {
  margin: 0 0 16px;
  padding: 0;
  color: var(--mmc-muted);
  font-family: var(--mmc-font);
  font-size: 14px;
  line-height: 1.8;
}

.mmc-footer .mmc-footer__newsletter {
  display: block;
  width: 100%;
  height: 66px;
  border: 0;
}

.mmc-footer .mmc-footer__list,
.mmc-footer .mmc-footer__legal {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mmc-footer .mmc-footer__list li,
.mmc-footer .mmc-footer__legal li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mmc-footer .mmc-footer__link {
  display: inline-block;
  padding: 5px 0;
  color: var(--mmc-muted);
  font-family: var(--mmc-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
}

.mmc-footer .mmc-footer__link:hover {
  color: var(--mmc-orange);
  text-decoration: none;
}

.mmc-footer .mmc-footer__link.mmc-footer__link--small {
  font-size: 12px;
}

.mmc-footer .mmc-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0 26px;
}

.mmc-footer .mmc-footer__copyright {
  margin: 0;
  padding: 0;
  color: var(--mmc-muted);
  font-family: var(--mmc-font);
  font-size: 12px;
  line-height: 1.5;
}

.mmc-footer .mmc-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

@media (min-width: 768px) {
  .mmc-footer {
    border-radius: 80px 80px 0 0;
  }

  .mmc-footer .mmc-footer__top,
  .mmc-footer .mmc-footer__brand {
    flex-direction: row;
  }

  .mmc-footer .mmc-footer__brand {
    gap: 40px;
  }

  .mmc-footer .mmc-footer__columns {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 44px 0;
  }

  .mmc-footer .mmc-footer__col.mmc-footer__col--newsletter {
    grid-column: auto;
  }

  .mmc-footer .mmc-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* The logo size follows the header's at each screen width. */

@media (min-width: 992px) {
  .mmc-footer .mmc-footer__logo {
    height: 42px;
  }
}

@media (min-width: 1100px) {
  .mmc-footer .mmc-footer__logo {
    height: 50px;
  }
}

/* ---------- Cookie bar ---------- */

/* A slim strip along the bottom edge: it covers as little of the page as possible. */
.mmc-cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 7px 16px;
  border-top: 1px solid var(--mmc-line);
  background: var(--mmc-panel);
  color: var(--mmc-white);
}

.mmc-cookie-bar .mmc-btn.mmc-btn--small {
  min-height: 30px;
  padding: 0 16px;
  font-size: 13px;
}

.mmc-cookie-bar[hidden] {
  display: none;
}

.mmc-cookie-bar .mmc-cookie-bar__text {
  margin: 0;
  padding: 0;
  color: var(--mmc-white);
  font-family: var(--mmc-font);
  font-size: 13px;
  line-height: 1.4;
}

.mmc-cookie-bar .mmc-cookie-bar__link {
  color: var(--mmc-orange);
  font-weight: 500;
  text-decoration: underline;
}

.mmc-cookie-bar .mmc-cookie-bar__link:hover {
  color: var(--mmc-white);
}
