:root {
  --mc-sidebar-width: 252px;
}

body.mc-sidebar-layout {
  overflow-x: hidden;
}

@media (min-width: 901px) {
  body.mc-sidebar-layout > .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--mc-sidebar-width);
    height: 100vh;
    z-index: 1000;
    background: #10151b;
    border-right: 1px solid #303a46;
    border-bottom: 0;
    overflow-y: auto;
  }

  body.mc-sidebar-layout > .site-header .nav {
    width: 100%;
    min-height: 100%;
    padding: 28px 22px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  body.mc-sidebar-layout > .site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 38px;
    color: #f5f7f9;
    font-size: 1.2rem;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .brand img {
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px;
  }

  .mc-nav-label {
    margin: 0 12px 10px;
    color: #737d89;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  body.mc-sidebar-layout > .site-header .nav-links {
    width: 100%;
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }

  body.mc-sidebar-layout > .site-header .nav-links > a,
  body.mc-sidebar-layout > .site-header .nav-dropdown-toggle {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #aeb6c1;
    background: transparent;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  body.mc-sidebar-layout > .site-header .nav-links > a:hover,
  body.mc-sidebar-layout > .site-header .nav-links > a:focus-visible,
  body.mc-sidebar-layout > .site-header .nav-dropdown-toggle:hover,
  body.mc-sidebar-layout > .site-header .nav-dropdown-toggle:focus-visible,
  body.mc-sidebar-layout > .site-header .nav-links > a[aria-current="page"] {
    color: #f5f7f9;
    background: #1c222a;
    border-left-color: #369eff;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    display: block;
    flex: 0 0 auto;
    align-items: initial;
    overflow: hidden;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown-menu {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100%;
    min-width: 0;
    max-height: 0;
    margin: 0;
    padding: 0 0 0 15px;
    display: block;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none !important;
    background: transparent;
    border: 0;
    box-shadow: none;
    transition: max-height .25s ease, padding .25s ease;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown.open .nav-dropdown-menu {
    max-height: 520px;
    padding-top: 5px;
    padding-bottom: 8px;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown-menu a {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    color: #aeb6c1;
    background: transparent;
    border-left: 2px solid transparent;
    font-size: .78rem;
    line-height: 1.25;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown-menu a:hover,
  body.mc-sidebar-layout > .site-header .nav-dropdown-menu a:focus-visible {
    color: #f5f7f9;
    background: #1c222a;
    border-left-color: #369eff;
  }

  .mc-sidebar-bottom {
    margin-top: auto;
    padding-top: 22px;
    display: grid;
    gap: 14px;
  }

  body.mc-sidebar-layout > .site-header .language-switcher {
    position: relative;
    width: 100%;
  }

  body.mc-sidebar-layout > .site-header .language-button {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #f5f7f9;
    background: #1c222a;
    border: 1px solid #303a46;
    border-radius: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  body.mc-sidebar-layout > .site-header .language-menu {
    position: static;
    width: 100%;
    margin-top: 6px;
    padding: 0;
    display: none;
    background: #1c222a;
    border: 1px solid #303a46;
    box-shadow: none;
  }

  body.mc-sidebar-layout > .site-header .language-switcher.open .language-menu {
    display: grid;
  }

  body.mc-sidebar-layout > .site-header .language-menu a {
    padding: 9px 12px;
    color: #aeb6c1;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .language-menu a:hover,
  body.mc-sidebar-layout > .site-header .language-menu a:focus-visible,
  body.mc-sidebar-layout > .site-header .language-menu a[aria-current="page"] {
    color: #f5f7f9;
    background: #222a34;
  }

  body.mc-sidebar-layout > .site-header .mc-sidebar-demo {
    width: 100%;
    min-height: 48px;
    display: grid;
    place-items: center;
    color: #07131e;
    background: #369eff;
    border: 0;
    border-radius: 0;
    font-weight: 800;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .menu-button {
    display: none;
  }

  body.mc-sidebar-layout > main,
  body.mc-sidebar-layout > footer {
    margin-left: var(--mc-sidebar-width);
  }

  html[dir="rtl"] body.mc-sidebar-layout > .site-header .nav-links > a,
  html[dir="rtl"] body.mc-sidebar-layout > .site-header .nav-dropdown-toggle {
    text-align: right;
  }

  html[dir="rtl"] body.mc-sidebar-layout > .site-header .nav-dropdown-menu {
    padding-right: 15px;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  body.mc-sidebar-layout > .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #10151b;
    border-bottom: 1px solid #303a46;
  }

  body.mc-sidebar-layout > .site-header .nav {
    min-height: 68px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  body.mc-sidebar-layout > .site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f5f7f9;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .brand img {
    width: 36px !important;
    height: 36px !important;
  }

  .mc-nav-label { display: none; }

  body.mc-sidebar-layout > .site-header .menu-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #f5f7f9;
    background: #1c222a;
    border: 1px solid #303a46;
    border-radius: 0;
    font-size: 1.35rem;
    cursor: pointer;
  }

  body.mc-sidebar-layout > .site-header .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - 68px);
    padding: 14px 20px 20px;
    display: none;
    overflow-y: auto;
    background: #10151b;
    border-bottom: 1px solid #303a46;
  }

  body.mc-sidebar-layout > .site-header .nav-links.open {
    display: grid;
    gap: 5px;
  }

  body.mc-sidebar-layout > .site-header .nav-links > a,
  body.mc-sidebar-layout > .site-header .nav-dropdown-toggle {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #aeb6c1;
    background: transparent;
    border: 0;
    border-left: 2px solid transparent;
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown {
    width: 100%;
    min-width: 0;
    height: auto;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown-menu {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100%;
    min-width: 0;
    max-height: 0;
    padding: 0 0 0 16px;
    display: block;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transform: none !important;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown.open .nav-dropdown-menu {
    max-height: 560px;
    padding-top: 5px;
    padding-bottom: 8px;
  }

  body.mc-sidebar-layout > .site-header .nav-dropdown-menu a {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    color: #aeb6c1;
    font-size: .84rem;
    line-height: 1.3;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: none;
  }

  .mc-sidebar-bottom {
    display: grid;
    gap: 12px;
    margin-top: 10px;
  }

  body.mc-sidebar-layout > .site-header .language-button,
  body.mc-sidebar-layout > .site-header .mc-sidebar-demo {
    width: 100%;
    min-height: 46px;
  }

  body.mc-sidebar-layout > .site-header .language-button {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    color: #f5f7f9;
    background: #1c222a;
    border: 1px solid #303a46;
    font: inherit;
    font-weight: 700;
  }

  body.mc-sidebar-layout > .site-header .language-menu {
    display: none;
    background: #1c222a;
    border: 1px solid #303a46;
  }

  body.mc-sidebar-layout > .site-header .language-switcher.open .language-menu {
    display: grid;
  }

  body.mc-sidebar-layout > .site-header .language-menu a {
    padding: 10px 12px;
    color: #aeb6c1;
    text-decoration: none;
  }

  body.mc-sidebar-layout > .site-header .mc-sidebar-demo {
    display: grid;
    place-items: center;
    color: #07131e;
    background: #369eff;
    font-weight: 800;
    text-decoration: none;
  }
}

/* Refined homepage hierarchy from the approved concept. */
body.mc-sidebar-layout.mc-homepage .hero-copy h1 span {
  display: block;
  margin-top: .22em;
  font-size: .67em;
  line-height: 1.08;
  letter-spacing: -.035em;
}

@media (max-width: 520px) {
  body.mc-sidebar-layout.mc-homepage .hero-copy h1 span {
    font-size: .72em;
  }
}

/* Typography refinement: calmer headings across the sidebar website. */
body.mc-sidebar-layout h1 {
  font-size: clamp(2.15rem, 3vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

body.mc-sidebar-layout.mc-homepage .hero-copy h1 {
  font-size: clamp(2.25rem, 3.15vw, 3.4rem);
  max-width: 720px;
}

body.mc-sidebar-layout.mc-homepage .hero-copy h1 span {
  font-size: .62em;
  line-height: 1.12;
  letter-spacing: -.025em;
}

body.mc-sidebar-layout .resource-hero h1,
body.mc-sidebar-layout .business-hero h1,
body.mc-sidebar-layout .localized-hero h1 {
  font-size: clamp(2.1rem, 2.8vw, 3.15rem);
  max-width: 820px;
}

@media (max-width: 900px) {
  body.mc-sidebar-layout h1,
  body.mc-sidebar-layout.mc-homepage .hero-copy h1,
  body.mc-sidebar-layout .resource-hero h1,
  body.mc-sidebar-layout .business-hero h1,
  body.mc-sidebar-layout .localized-hero h1 {
    font-size: clamp(2rem, 7vw, 2.65rem);
    line-height: 1.1;
  }

  body.mc-sidebar-layout.mc-homepage .hero-copy h1 span {
    font-size: .68em;
  }
}

@media (max-width: 520px) {
  body.mc-sidebar-layout h1,
  body.mc-sidebar-layout.mc-homepage .hero-copy h1,
  body.mc-sidebar-layout .resource-hero h1,
  body.mc-sidebar-layout .business-hero h1,
  body.mc-sidebar-layout .localized-hero h1 {
    font-size: 2.05rem;
    letter-spacing: -.03em;
  }

  body.mc-sidebar-layout.mc-homepage .hero-copy h1 span {
    font-size: .7em;
  }

  /* Older resource articles use inline horizontal screenshot rows. */
  body.mc-sidebar-layout main div[style*="display:flex"][style*="justify-content:center"] {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 14px !important;
  }
}

body.mc-sidebar-layout main img {
  max-width: 100%;
  height: auto;
}
