:root {
  --osp-accent: #d8262f;
  --osp-text: #171717;
  --osp-muted: #747474;
  --osp-line: #ececec;
  --osp-surface: #fff;
  --osp-soft-surface: #fafafa;
  --osp-active-surface: #fff2f2;
  --osp-max-width: 1280px;
}

.osp-core-active #masthead,
.osp-core-active #site-navigation {
  display: none !important;
}

.osp-core-active {
  padding-top: 0;
}

.osp-header,
.osp-header * {
  box-sizing: border-box;
}

.osp-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--osp-surface);
  border-bottom: 1px solid var(--osp-line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .035);
}

.osp-header__inner {
  width: min(calc(100% - 40px), var(--osp-max-width));
  height: 75px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}

.osp-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.osp-brand .custom-logo-link {
  display: flex;
  align-items: center;
}

.osp-brand .custom-logo {
  display: block;
  width: auto;
  max-width: 245px;
  max-height: 56px;
}

.osp-brand__text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: var(--osp-text);
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.3px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.osp-brand__text strong {
  color: var(--osp-accent);
  font-size: .72em;
  font-weight: 800;
  letter-spacing: -.35px;
}

.osp-navigation {
  min-width: 0;
  flex: 1 1 auto;
}

.osp-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 1.4vw, 23px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.osp-menu > li {
  margin: 0;
  padding: 0;
}

.osp-menu > li > a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 75px;
  color: var(--osp-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.35px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.osp-menu > li > a:hover,
.osp-menu > li > a:focus-visible,
.osp-menu > .current-menu-item > a,
.osp-menu > .current-category-ancestor > a {
  color: var(--osp-accent);
}

.osp-menu > .current-menu-item > a::after,
.osp-menu > .current-category-ancestor > a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--osp-accent);
  content: '';
}

.osp-header__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.osp-social-link {
  width: 30px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--osp-text);
  text-decoration: none;
}

.osp-social-link:hover,
.osp-social-link:focus-visible {
  color: var(--osp-accent);
}

.osp-social-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.osp-social-link[href*="x.com"] svg,
.osp-social-link[href*="twitter.com"] svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.osp-social-link .osp-youtube-play {
  fill: var(--osp-surface);
}

.osp-theme-icon {
  display: inline-flex;
}

.osp-theme-icon--sun {
  display: none;
}

.osp-icon-button {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--osp-text);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.osp-icon-button:hover,
.osp-icon-button:focus-visible {
  color: var(--osp-accent);
  background: #fff4f4;
}

.osp-icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.osp-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.osp-menu-toggle span {
  width: 21px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.osp-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.osp-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.osp-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.osp-search-panel {
  border-top: 1px solid var(--osp-line);
  background: var(--osp-soft-surface);
}

html[data-osp-theme="dark"] {
  color-scheme: dark;
  --osp-text: #f2f2f2;
  --osp-muted: #b8b8b8;
  --osp-line: #333;
  --osp-surface: #181818;
  --osp-soft-surface: #222;
  --osp-active-surface: #322124;
}

html[data-osp-theme="dark"] body,
html[data-osp-theme="dark"] #page,
html[data-osp-theme="dark"] .site-content {
  color: #e8e8e8;
  background-color: #121212;
}

html[data-osp-theme="dark"] .osp-theme-icon--moon {
  display: none;
}

html[data-osp-theme="dark"] .osp-theme-icon--sun {
  display: inline-flex;
}

html[data-osp-theme="dark"] .osp-icon-button:hover,
html[data-osp-theme="dark"] .osp-icon-button:focus-visible,
html[data-osp-theme="dark"] .osp-menu > .current-menu-item > a,
html[data-osp-theme="dark"] .osp-menu > .current-category-ancestor > a {
  background: var(--osp-active-surface);
}

html[data-osp-theme="dark"] .osp-search-panel input[type="search"] {
  color: #f2f2f2;
  background: #181818;
  border-color: #444;
}

.osp-search-panel[hidden] {
  display: none;
}

.osp-search-panel__inner {
  width: min(calc(100% - 40px), 720px);
  margin: 0 auto;
  padding: 18px 0;
}

.osp-search-panel form {
  display: flex;
  margin: 0;
}

.osp-search-panel input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 7px 0 0 7px;
  font-size: 16px;
}

.osp-search-panel input[type="submit"],
.osp-search-panel button[type="submit"] {
  min-width: 82px;
  height: 46px;
  padding: 0 18px;
  color: #fff;
  background: var(--osp-accent);
  border: 1px solid var(--osp-accent);
  border-radius: 0 7px 7px 0;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .osp-header__inner {
    gap: 20px;
  }

  .osp-brand .custom-logo {
    max-width: 155px;
  }

  .osp-brand__text {
    font-size: 22px;
  }

  .osp-menu {
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .osp-menu::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .osp-header__inner {
    width: min(calc(100% - 28px), var(--osp-max-width));
    min-height: 64px;
    gap: 12px;
  }

  .osp-brand .custom-logo {
    max-width: 150px;
    max-height: 38px;
  }

  .osp-navigation {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--osp-surface);
    border-top: 1px solid var(--osp-line);
    border-bottom: 1px solid var(--osp-line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .09);
  }

  .osp-social-link {
    display: none;
  }

  .osp-navigation.is-open {
    display: block;
  }

  .osp-menu {
    width: min(calc(100% - 28px), 720px);
    margin: 0 auto;
    padding: 10px 0 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 8px;
    overflow: visible;
  }

  .osp-menu > li > a {
    min-height: 45px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 15px;
  }

  .osp-menu > .current-menu-item > a,
  .osp-menu > .current-category-ancestor > a {
    background: var(--osp-active-surface);
  }

  .osp-menu > .current-menu-item > a::after,
  .osp-menu > .current-category-ancestor > a::after {
    display: none;
  }

  .osp-header__actions {
    margin-left: auto;
  }

  .osp-menu-toggle {
    display: inline-flex;
  }

  .osp-search-panel__inner {
    width: calc(100% - 28px);
  }
}

@media (max-width: 480px) {
  .osp-brand__text {
    font-size: 19px;
    letter-spacing: -1px;
  }

  .osp-brand .custom-logo {
    max-width: 132px;
  }

  .osp-icon-button {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .osp-header * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
