:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  background: #000;
  color: #f5f5f7;
  --surface: #101014;
  --muted: #a6a6b0;
  --line: #2b2b32;
  --accent: #D94610;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary, a, input { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 16px;
  padding: 12px 18px;
  transform: translateY(-160%);
  background: var(--accent);
  color: #000;
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid #242429;
  background: var(--surface);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1920px;
  min-height: 80px;
  margin-inline: auto;
  padding-inline: 32px;
}
.brand {
  display: flex;
  flex: 0 0 192px;
  align-items: center;
  width: 192px;
  height: 44px;
  border-radius: 2px;
}
.brand img {
  display: block;
  width: 100%;
  height: auto;
}
.header-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}
.nav-list, .nav-dropdown-panel ul, .footer-column ul { margin: 0; padding: 0; list-style: none; }
.nav-list { display: flex; align-items: center; gap: 8px; }
.nav-item { flex-shrink: 0; }
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 10px;
  border-radius: 6px;
  color: #c9c9d0;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  transition: color 160ms, background-color 160ms;
}
.nav-link:hover, .nav-link.is-active, .nav-dropdown[open] .nav-link { color: #fff; }
.nav-link:hover, .nav-dropdown[open] .nav-link { background: #25252c; }
summary.nav-link { list-style: none; }
summary.nav-link::-webkit-details-marker { display: none; }
.chevron { flex-shrink: 0; color: #9696a1; transition: transform 160ms; }
.nav-dropdown[open] .chevron { transform: rotate(180deg); }
.nav-dropdown { position: relative; }
.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 20px);
  left: -10px;
  width: 264px;
  padding: 22px 12px 12px;
  border: 1px solid #383840;
  border-radius: 10px;
  background: #1c1c22;
  box-shadow: 0 18px 50px #0008;
}
.dropdown-label {
  margin: 0 12px 14px;
  color: #9494a0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 16px;
  text-transform: uppercase;
}
.nav-dropdown-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 5px;
  color: #e0e0e6;
  font-size: 14px;
  line-height: 22px;
  transition: color 160ms, background-color 160ms;
}
.nav-dropdown-panel a span { color: #8d8d9b; opacity: 0; }
.nav-dropdown-panel a:hover, .nav-dropdown-panel a:focus-visible { background: #2a2a33; color: #fff; }
.nav-dropdown-panel a:hover span, .nav-dropdown-panel a:focus-visible span { opacity: 1; }
.header-actions { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  transition: background-color 160ms;
}
.button-secondary { background: #2b2b32; color: #f0f0f3; }
.button-secondary:hover { background: #3a3a43; }
.button-primary { background: var(--accent); color: #000; }
.button-primary:hover { background: #ed5a23; }
.site-search { position: relative; width: 180px; margin: 0 6px 0 0; }
.search-icon { position: absolute; top: 11px; left: 12px; color: #b7b7c1; pointer-events: none; }
.site-search input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 9px 12px 9px 39px;
  border: 1px solid #3b3b43;
  border-radius: 7px;
  background: #1b1b21;
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  transition: border-color 160ms;
}
.site-search input::placeholder { color: #a6a6b0; opacity: 1; }
.site-search input:hover { border-color: #666671; }
.site-search input:focus { border-color: var(--accent); }
.search-results {
  position: absolute;
  z-index: 2;
  top: calc(100% + 20px);
  right: 0;
  width: 320px;
  max-height: min(430px, 65vh);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #383840;
  border-radius: 10px;
  background: #1c1c22;
  box-shadow: 0 18px 50px #0008;
}
.search-result { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: 5px; }
.search-result:hover, .search-result:focus-visible { background: #2a2a33; }
.search-result-title { color: #ededf2; font-size: 14px; line-height: 20px; }
.search-result-section, .search-empty { color: var(--muted); font-size: 12px; line-height: 18px; }
.search-empty { margin: 10px 12px; }
.icon-button {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
}
.menu-toggle, .close-icon { display: none; }

.site-main { flex: 1; min-height: 38vh; min-height: 38svh; background: #000; }
.site-main:focus { outline: none; }

.site-footer { border-top: 1px solid #222227; background: var(--surface); }
.footer-inner { width: 100%; max-width: 1440px; margin-inline: auto; padding: 58px 56px 28px; }
.footer-navigation {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.35fr 1.3fr 0.8fr;
  gap: 40px;
  padding-bottom: 56px;
}
.footer-brand .brand { width: 192px; height: 44px; margin: -2px 0 0; }
.footer-column h2 { margin: 0 0 20px; color: #f5f5f7; font-size: 14px; font-weight: 600; line-height: 20px; }
.footer-column li + li { margin-top: 13px; }
.footer-column a { display: inline-block; color: var(--muted); font-size: 13px; line-height: 20px; transition: color 160ms; }
.footer-column a:hover, .footer-utility a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: #8f8f9b;
  font-size: 12px;
  line-height: 20px;
}
.footer-bottom p { margin: 0; }
.footer-bottom p a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-utility { display: flex; align-items: center; gap: 28px; }
.back-to-top { display: inline-flex; align-items: center; gap: 12px; margin-left: 20px; }

@media (1200px <= width < 1400px) {
  .header-inner { gap: 16px; padding-inline: 24px; }
  .brand { flex-basis: 168px; width: 168px; height: 40px; }
  .header-content { gap: 16px; }
  .nav-list { gap: 2px; }
  .nav-link { padding-inline: 8px; font-size: 12px; }
  .site-search { width: 145px; margin-right: 0; }
  .button { padding-inline: 15px; font-size: 12px; }
}

@media (width < 1200px) {
  .header-inner { justify-content: space-between; min-height: 76px; padding-inline: 24px; }
  .menu-toggle { display: inline-flex; }
  .header-content {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    padding: 16px 24px 24px;
    border-bottom: 1px solid #383840;
    background: var(--surface);
    box-shadow: 0 20px 40px #0008;
  }
  .navigation-open .header-content { display: block; }
  .navigation-open .menu-icon { display: none; }
  .navigation-open .close-icon { display: block; }
  .nav-list { display: block; }
  .nav-item + .nav-item { margin-top: 4px; }
  .nav-link { width: 100%; min-height: 48px; padding-inline: 12px; font-size: 14px; }
  .nav-dropdown-panel {
    position: static;
    width: auto;
    margin: 4px 0 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #19191f;
    box-shadow: none;
  }
  .dropdown-label { display: none; }
  .nav-dropdown-panel a { min-height: 46px; }
  .header-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
  .site-search { grid-column: 1 / -1; width: 100%; margin: 0 0 4px; }
  .site-search input { height: 46px; font-size: 16px; }
  .search-icon { top: 14px; }
  .search-results { position: static; width: 100%; max-height: 260px; margin-top: 8px; box-shadow: none; }
  .button { min-height: 46px; font-size: 14px; }
  .footer-inner { padding: 48px 32px 26px; }
  .footer-navigation { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 28px; padding-bottom: 40px; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 2px; }
}

@media (width < 640px) {
  .header-inner { min-height: 72px; padding-inline: 20px; }
  .brand { flex-basis: 176px; width: 176px; height: 40px; }
  .header-content { max-height: calc(100dvh - 72px); padding-inline: 20px; }
  .footer-inner { padding: 42px 24px 24px; }
  .footer-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 18px; padding-bottom: 36px; }
  .footer-brand { margin-bottom: 0; }
  .footer-brand .brand { width: 184px; height: 40px; }
  .footer-column h2 { margin-bottom: 16px; }
  .footer-column a { font-size: 12px; }
  .footer-column li + li { margin-top: 12px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 20px; padding-top: 24px; }
  .footer-utility { justify-content: space-between; gap: 18px; width: 100%; font-size: 11px; }
  .back-to-top { gap: 7px; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
