/* Responsive and cross-browser hardening for Siftlink pages. */
:root {
  --site-header-mobile-height: 65px;
  --site-surface: #121317;
  --site-surface-raised: #191a20;
  --site-ink: #edeae2;
  --site-muted: rgba(237, 234, 226, 0.72);
  --site-hairline: rgba(237, 234, 226, 0.13);
  --site-accent: #c8102e;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; }

.site-header__inner {
  flex-wrap: nowrap !important;
}

.site-nav {
  flex-wrap: nowrap !important;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.site-menu-toggle,
.legal-toc-toggle {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--site-hairline);
  border-radius: 2px;
  background: transparent;
  color: var(--site-ink);
  min-height: 44px;
  cursor: pointer;
}

.site-menu-toggle {
  display: none;
  min-width: 82px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
}

.site-menu-toggle::after {
  content: "";
  width: 16px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}

.site-menu-toggle:focus-visible,
.legal-toc-toggle:focus-visible {
  outline: 2px solid #e5233b;
  outline-offset: 2px;
}

.legal-toc-toggle {
  display: none;
  width: 100%;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.legal-toc-toggle::after {
  content: "+";
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}

.legal-aside[data-toc-open="true"] .legal-toc-toggle::after {
  content: "−";
}

.legal-toc a {
  overflow-wrap: anywhere;
}

.hero-video {
  object-position: center center;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .site-header__inner {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    gap: 16px !important;
  }
  .site-logo-image { height: 68px !important; }
  .site-nav { gap: 16px !important; }
}

@media (max-width: 1179px) {
  .hero-section {
    display: flex !important;
    flex-direction: column;
  }
  .hero-content { order: 1; width: 100%; }
  .hero-copy { max-width: 680px !important; padding-right: 0 !important; }
  .hero-media {
    position: relative !important;
    inset: auto !important;
    order: 2;
    width: 100% !important;
    max-width: none !important;
    height: clamp(240px, 48vw, 480px);
    border-top: 1px solid var(--site-hairline);
  }
  .hero-media-overlay {
    background: linear-gradient(180deg, rgba(18,19,23,.28) 0%, rgba(18,19,23,.08) 50%, rgba(18,19,23,.34) 100%) !important;
  }
  .hero-meta { order: 3; }
}

@media (max-width: 900px) {
  .site-header__inner {
    position: relative;
    min-height: var(--site-header-mobile-height);
    padding: 6px 16px !important;
    gap: 12px !important;
  }
  .site-logo-image { height: 52px !important; }
  .site-menu-toggle { display: inline-flex; margin-left: auto; }
  .responsive-ready .site-nav {
    display: none !important;
    position: absolute;
    z-index: 60;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    padding: 10px 16px 16px;
    flex-direction: column;
    align-items: stretch !important;
    gap: 4px !important;
    background: rgba(18, 19, 23, 0.98);
    border-bottom: 1px solid var(--site-hairline);
    box-shadow: 0 18px 36px rgba(0,0,0,.28);
  }
  .responsive-ready .site-header[data-menu-open="true"] .site-nav {
    display: flex !important;
  }
  .site-nav a {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px !important;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(237,234,226,.08) !important;
  }
  .site-nav a:last-child {
    justify-content: center;
    margin-top: 5px;
    border-bottom: 0 !important;
  }

  .legal-layout { gap: 24px !important; }
  .legal-aside {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
  .legal-toc-panel {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 14px !important;
  }
  .legal-toc-toggle { display: flex; }
  .responsive-ready .legal-toc { display: none !important; }
  .responsive-ready .legal-aside[data-toc-open="true"] .legal-toc {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px !important;
    max-height: 55vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    margin-top: 10px;
    border: 1px solid var(--site-hairline);
    padding: 4px 12px;
  }
  .legal-toc a {
    min-height: 44px;
    display: flex !important;
    align-items: center;
    padding: 7px 3px;
    border-bottom: 1px solid rgba(237,234,226,.08);
  }

  section[id], [data-screen-label] { scroll-margin-top: 78px !important; }
}

@media (max-width: 620px) {
  .responsive-ready .legal-aside[data-toc-open="true"] .legal-toc {
    grid-template-columns: 1fr;
  }
  .hero-media { height: clamp(220px, 66vw, 340px); }
  .hero-content { padding-top: 0; }
  .hero-meta > div { gap: 8px 14px !important; }
}

@media (max-width: 360px) {
  .site-header__inner { padding-left: 12px !important; padding-right: 12px !important; }
  .site-logo-image { height: 48px !important; }
  .site-menu-toggle { min-width: 74px; padding-left: 11px; padding-right: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none !important; }
  .hero-media {
    background: #121317 url("./hero-poster.jpg") center / cover no-repeat !important;
  }
}

@media print {
  .site-menu-toggle,
  .legal-toc-toggle { display: none !important; }
  .site-nav,
  .legal-toc { display: flex !important; }
  .legal-toc-panel { position: static !important; max-height: none !important; overflow: visible !important; }
  .hero-video { display: none !important; }
}

@media (max-width: 900px) {
  .legal-toc-label { display: none !important; }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px !important;
  }

  footer a,
  .team-pagination a,
  a[href^="mailto:"],
  a[style*="display:inline-flex"],
  a[style*="display:inline-block"],
  a[style*="border-bottom"] {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
  }

  footer a[href*="linkedin.com"] {
    min-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    justify-content: center;
  }
}
