html {
  scrollbar-gutter: stable;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 18px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.55;
}

.page > .topbar {
  width: 100%;
  margin: 0;
}

.topbar .brand {
  font-size: 1.22rem;
  font-weight: 850;
  white-space: nowrap;
}

.topbar .brand-mark {
  flex: 0 0 auto;
}

.topbar .nav-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar .topbar-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.topbar .topbar-nav a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .topbar-nav a:hover,
.topbar .topbar-nav a:focus-visible {
  color: var(--ink);
}

.topbar .topbar-nav a[aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: oklch(40% 0.12 249);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.topbar .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: var(--amber);
  box-shadow: 0 14px 34px oklch(76% 0.16 74 / 20%);
  font: inherit;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.topbar .button:hover,
.topbar .button:focus-visible {
  background: oklch(72% 0.17 74);
}

.topbar .mobile-menu-toggle,
.topbar .mobile-menu {
  display: none;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.page > main.has-breadcrumbs {
  padding-top: 15px;
  padding-bottom: 56px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--ink);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
}

.tools-view-toolbar {
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.tools-view-toolbar-inner {
  display: grid;
  justify-items: start;
  gap: 0;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: 15px;
}

.tools-view-toolbar .breadcrumbs {
  margin-bottom: 30px;
}

.tools-view-tabs {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 3px;
  width: 100%;
  margin-bottom: -1px;
}

.tools-view-tab {
  display: inline-flex;
  align-items: center;
  height: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px 6px 0 0;
  color: var(--muted);
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
}

.tools-view-tab[aria-current="page"] {
  position: relative;
  border-color: var(--line);
  border-bottom-color: #fff;
  color: var(--ink);
  background: #fff;
}

a.tools-view-tab:hover,
a.tools-view-tab:focus-visible {
  color: var(--ink);
  background: var(--surface);
}

@media (max-width: 720px) {
  .topbar {
    width: min(100% - 24px, 1180px);
    align-items: center;
  }

  .page > .topbar {
    width: 100%;
  }

  .topbar .nav-row {
    display: none;
  }

  .topbar .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel, var(--paper));
    color: var(--blue);
    font: inherit;
    font-weight: 760;
    cursor: pointer;
  }

  .topbar .mobile-menu-toggle:focus-visible,
  .topbar .mobile-menu a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
  }

  .topbar .mobile-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% - 6px);
    right: 0;
    width: min(100%, 340px);
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel, var(--paper));
    box-shadow: 0 18px 42px oklch(36% 0.045 252 / 12%);
  }

  .topbar .mobile-menu:not([hidden]) {
    display: grid;
    gap: 4px;
  }

  .topbar .mobile-menu .topbar-nav {
    display: grid;
    gap: 4px;
  }

  .topbar .mobile-menu .topbar-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
    border-radius: 6px;
    color: var(--ink);
  }

  .topbar .mobile-menu .topbar-nav a:hover {
    background: var(--surface);
  }

  .topbar .mobile-menu .button {
    width: 100%;
    margin-top: 6px;
  }

  .tools-view-toolbar-inner {
    width: min(100% - 24px, 1180px);
  }

  .tools-view-toolbar .breadcrumbs {
    margin-bottom: 24px;
  }

  .tools-view-tabs {
    flex-wrap: nowrap;
  }

  .tools-view-tab {
    height: 42px;
    min-height: 42px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .tools-view-tabs {
    flex-wrap: nowrap;
  }

  .tools-view-tab {
    flex: 1 1 0;
    justify-content: center;
    width: 0;
    height: 58px;
    min-height: 58px;
    padding: 4px;
    font-size: 0.84rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .map-title.tools-view-tab {
    font-size: 0.84rem;
    line-height: 1.2;
  }
}
