/* ==========================================================================
   Shared page chrome, loaded after site.css on every page: the top bar
   (from the homepage), and the rounding and rail-free page the homepage
   uses, so the inner pages match it. topbar.js runs the bar.
   ========================================================================== */

:root {
  --tile-bg: #fff;
  --tile-line: #e7e8ec;
  --tile-line-hover: #cfd2d8;
  --ink: #0b0c0f;
  /* Rounded like the homepage (site.css had square panels and buttons). */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 14px;
  --head-h: 64px;
}

html:not([data-theme="light"]) {
  --tile-bg: #131518;
  --tile-line: #24272d;
  --tile-line-hover: #3a3e46;
}

@media (max-width: 880px) {
  :root {
    --head-h: 64px;
  }
}

/* --------------------------------------------------------------- topbar --- */
/* The one header, on every page. On the homepage it floats over the
   painting until the page moves (home.css adds the blur behind it there);
   on the other pages it is a solid bar from the start (.topbar--page). */

.topbar {
  --tb-fg: #fff;
  --tb-dim: rgb(255 255 255 / 0.78);
  --tb-cta-bg: #fff;
  --tb-cta-fg: #0b0c0f;
  position: fixed;
  inset: var(--edge, 8px) var(--edge, 8px) auto;
  z-index: 60;
  border-radius: var(--radius-sky, 22px) var(--radius-sky, 22px) 0 0;
  transition: background-color 250ms ease, box-shadow 250ms ease, border-radius 250ms ease, inset 250ms ease;
}

.topbar.is-scrolled {
  --tb-fg: var(--fg);
  --tb-dim: var(--muted);
  --tb-cta-bg: var(--ink);
  --tb-cta-fg: #fff;
  inset: 0 0 auto;
  border-radius: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  box-shadow: 0 1px 0 var(--tile-line);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

html:not([data-theme="light"]) .topbar.is-scrolled {
  --tb-cta-bg: #fff;
  --tb-cta-fg: #0b0c0f;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: min(1180px, 100% - 40px);
  height: 64px;
  margin-inline: auto;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--tb-fg);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.topbar__brand img {
  border-radius: 7px;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.topbar__nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--tb-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 150ms ease, background-color 150ms ease;
}

.topbar__nav a:hover {
  background: color-mix(in srgb, var(--tb-fg) 10%, transparent);
  color: var(--tb-fg);
}

.topbar__nav .platform-icon {
  width: 15px;
  height: 15px;
}

.topbar__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  background: var(--tb-cta-bg);
  color: var(--tb-cta-fg);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 6px 16px -8px rgb(0 0 40 / 0.45);
  transition: transform 150ms ease, background-color 250ms ease, color 250ms ease;
}

.topbar__cta:hover {
  transform: translateY(-1px);
}

.topbar__cta:active {
  transform: scale(0.97);
}

.dl-glyph,
.sky__glyph {
  width: 14px;
  height: 14px;
  flex: none;
}

[data-asset] > .sky__glyph {
  display: none;
}

.topbar__menu {
  display: none;
  place-items: center;
  width: 40px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: color-mix(in srgb, var(--tb-fg) 12%, transparent);
  cursor: pointer;
}

.topbar__menu span {
  grid-area: 1 / 1;
  width: 16px;
  height: 1.75px;
  border-radius: 2px;
  background: var(--tb-fg);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar__menu span:first-child { transform: translateY(-3.5px); }
.topbar__menu span:last-child { transform: translateY(3.5px); }
.topbar.is-open .topbar__menu span:first-child { transform: rotate(45deg); }
.topbar.is-open .topbar__menu span:last-child { transform: rotate(-45deg); }

.topbar :focus-visible {
  outline-color: var(--tb-fg);
}

@media (max-width: 760px) {
  .topbar__menu {
    display: grid;
  }

  .topbar__nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    left: 10px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--tile-line);
    border-radius: 18px;
    background: var(--tile-bg);
    box-shadow: 0 24px 48px -20px rgb(0 0 40 / 0.35);
  }

  .topbar.is-open .topbar__nav {
    display: flex;
  }

  .topbar__nav a {
    height: 44px;
    color: var(--fg);
    font-size: 1rem;
  }

  .topbar__nav a:hover {
    background: var(--card-2);
    color: var(--fg);
  }

  .topbar__end {
    margin-left: auto;
  }

  .topbar__inner {
    width: calc(100% - 28px);
    gap: 12px;
  }
}


.topbar__nav a[aria-current="page"] {
  color: var(--tb-fg);
}

/* Inner pages: a solid bar in the page's colour, in the flow of the page. */
.topbar--page,
.topbar--page.is-scrolled {
  --tb-fg: var(--fg);
  --tb-dim: var(--muted);
  --tb-cta-bg: var(--fg);
  --tb-cta-fg: var(--bg);
  position: sticky;
  top: 0;
  inset: auto;
  border-radius: 0;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--tile-line);
}

/* ----------------------------------------------------- inner pages --- */
/* No rails down the sides, as on the homepage. */
body::before,
body::after {
  display: none;
}

/* Square things site.css draws, rounded to match the homepage. */
.btn {
  border-radius: 10px;
}

.download-card,
.spec__panel--paper {
  border-radius: 16px;
}

.download-shell .cmd,
.samples__tabs,
.clog-filter {
  border-radius: 12px;
}

.release-switch:not([hidden]) {
  width: max-content;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--tile-line);
  border-radius: 12px;
}

.release-switch button {
  border: 0;
  border-radius: 9px;
}

.release-switch button[aria-pressed="true"] {
  background: var(--tile-line);
}

.subnav a,
.samples__tab,
.clog-filter button,
.spec__tag {
  border-radius: 8px;
}

.rel__ver,
.rel__badge {
  border-radius: 6px;
}
