:root {
  --chrome-bg: #ffffff;
  --chrome-ink: #09090b;
  --chrome-muted: #71717a;
  --chrome-line: #e4e4e7;
  --chrome-accent: #3b6dff;
  --chrome-accent-dark: #1d4ed8;
  --chrome-shadow: 0 1px 0 rgba(9, 9, 11, 0.04), 0 1px 3px rgba(9, 9, 11, 0.06);
  --chrome-paper: #ffffff;
  --chrome-surface-2: #f4f4f5;
}

html,
body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

body > .siteFooter {
  flex-shrink: 0;
  margin-top: auto;
}

.skipLink {
  position: absolute;
  left: 14px;
  top: 10px;
  z-index: 40;
  transform: translateY(-160%);
  padding: 8px 12px;
  border: 1px solid var(--chrome-line);
  border-radius: 8px;
  background: #fff;
  color: var(--chrome-ink);
  box-shadow: var(--chrome-shadow);
}

.skipLink:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 60px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--chrome-line);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--chrome-ink);
  font-family: var(--font-sans, -apple-system, sans-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brandMark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  overflow: visible;
}

/* Scope desktop nav layout to ≥821px. The mobile hamburger (defined in
   globals.css) owns the ≤820px breakpoint; without this scoping, the
   align-items:center / flex-wrap:wrap rules below leak into the mobile
   media query and override globals.css's `.topbar > nav` hamburger
   dropdown layout (same specificity, but site-chrome.css loads after
   so it wins on source order). */
@media (min-width: 821px) {
  .topbar nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex-wrap: wrap;
  }
}

/* All `.topbar nav a*` styling below is desktop-specific (inline-flex
   link bar with hover underlines and pill CTAs). Wrapped in min-width:821px
   so it doesn't leak into the mobile hamburger dropdown owned by
   globals.css. The unscoped `.navSignin / .navCta` selectors (without
   the `.topbar nav` prefix) stay outside the media query because they
   are used elsewhere too. */
@media (min-width: 821px) {
  .topbar nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
    color: var(--chrome-muted);
    font-family: var(--font-sans, sans-serif);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-decoration: none;
    position: relative;
    transition: color 0.15s ease;
  }

  .topbar nav a:not(.navCta):hover {
    color: var(--chrome-ink);
  }

  .topbar nav a:not(.navCta)[aria-current="page"],
  .topbar nav a:not(.navCta).active {
    color: var(--chrome-ink);
  }

  .topbar nav a:not(.navCta)[aria-current="page"]::after,
  .topbar nav a:not(.navCta).active::after {
    content: "";
    position: absolute;
    inset: auto 0 8px;
    height: 2px;
    background: var(--chrome-accent);
  }

  .topbar nav a.navSignin {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid var(--chrome-line);
    border-radius: 6px;
    background: var(--chrome-bg);
    color: var(--chrome-ink);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.005em;
    transition: background 0.15s ease, border-color 0.15s ease;
  }

  .topbar nav a.navSignin::after { display: none; }

  .topbar nav a.navSignin:hover {
    background: var(--chrome-surface-2);
    color: var(--chrome-ink);
    border-color: var(--chrome-ink);
  }

  .topbar nav a.navCta {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid var(--chrome-accent-dark);
    border-radius: 6px;
    background: var(--chrome-accent);
    color: #ffffff;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -0.005em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 0 rgba(9, 9, 11, 0.05);
    transition: background 0.15s ease;
  }

  .topbar nav a.navCta::after { display: none; }

  .topbar nav a.navCta:hover {
    color: #ffffff;
    background: var(--chrome-accent-dark);
    border-color: var(--chrome-accent-dark);
  }
}

.siteFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(100%, 1380px);
  margin: 0 auto;
  padding: 36px clamp(20px, 4vw, 56px) 48px;
  border-top: 1px solid var(--chrome-line);
  color: var(--chrome-muted);
  font-family: var(--font-sans, sans-serif);
}

.siteFooter div {
  display: grid;
  gap: 4px;
}

.siteFooter strong {
  color: var(--chrome-ink);
  font-family: var(--font-sans, sans-serif);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
}

.siteFooter span,
.siteFooter a {
  color: var(--chrome-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.005em;
}

.siteFooter a:hover {
  color: var(--chrome-ink);
}

.siteFooter nav {
  position: static;
  min-height: 0;
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 18px;
    min-height: 68px;
    /* overflow:visible — the absolute-positioned mobile dropdown menu
       (anchored inside .topbarMenu) needs to overflow the topbar's
       vertical bounds; the old `overflow-x:auto` clipped it. */
    overflow: visible;
    padding-block: 0;
  }

  /* `.topbar nav` mobile horizontal-scroll-strip was the pre-hamburger
     pattern; deleted here because globals.css now owns the mobile nav
     via the `.topbar > nav` flex-column dropdown. */

  .siteFooter {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding-inline: 16px;
  }
}
