.context-navigation {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.context-back {
  min-height: var(--wr-control-size);
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0.625rem 0.625rem;
  padding: 0.3125rem 0.5rem;
  color: var(--wr-paper-on-forest);
  border: var(--wr-rule-width) solid var(--wr-rule-dark);
  border-radius: var(--wr-shell-radius);
  font-size: 0.875rem;
  font-weight: 600;
}

.context-back:hover {
  color: var(--wr-paper);
  background: var(--wr-forest-bright);
}

.context-back .icon {
  width: 1.125rem;
  height: 1.125rem;
  transform: rotate(90deg);
}

.context-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.625rem;
  margin: 0 0.625rem 0.625rem;
  padding: 0.75rem 0.625rem;
  color: var(--wr-paper);
  background: var(--wr-forest-bright);
  border-left: var(--wr-national-rule-size) solid var(--wr-brass);
}

.context-heading-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  color: var(--wr-night);
  background: var(--wr-brass);
  border-radius: var(--wr-shell-radius);
}

.context-heading-icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.context-heading > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1875rem;
}

.context-heading small {
  color: var(--wr-muted-on-forest);
  font-size: 0.8125rem;
  font-weight: 600;
}

.context-heading strong {
  font-family: var(--wr-font-serif);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sidebar-collapsed .context-back,
.sidebar-collapsed .context-heading {
  grid-template-columns: 1fr;
  margin-inline: 0.375rem;
  padding-inline: 0;
  justify-items: center;
}

.sidebar-collapsed .context-back span,
.sidebar-collapsed .context-heading > span:last-child {
  display: none;
}

.context-bottom-tabs > a,
.context-bottom-tabs > button,
.mobile-context-menu > summary {
  min-width: 0;
  min-height: var(--wr-control-size);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.1875rem;
  padding: 0.25rem;
  color: var(--wr-muted-on-night);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
}

.context-bottom-tabs .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.context-bottom-tabs > :is(a, button):hover,
.mobile-context-menu > summary:hover,
.context-bottom-tabs > :is(a, button).active,
.context-bottom-tabs > a[aria-current='page'],
.mobile-context-menu[open] > summary {
  color: var(--wr-brass);
  background: var(--wr-night-raised);
}

.mobile-context-menu {
  min-width: 0;
}

.mobile-context-menu > summary {
  height: 100%;
  list-style: none;
  cursor: pointer;
}

.mobile-context-menu > summary::-webkit-details-marker {
  display: none;
}

.mobile-context-panel {
  position: fixed;
  z-index: 115;
  right: 0;
  bottom: var(--wr-bottom-nav-height);
  left: 0;
  max-height: calc(100dvh - var(--wr-topbar-height) - var(--wr-bottom-nav-height));
  padding: 0.625rem 0 1rem;
  overflow-y: auto;
  color: var(--wr-paper);
  background: var(--wr-forest);
  border-top: var(--wr-national-rule-size) solid var(--wr-brass);
  box-shadow: var(--wr-shadow);
}

.mobile-context-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem 0.75rem;
  border-bottom: var(--wr-rule-width) solid var(--wr-rule-dark);
}

.mobile-context-panel-head > span {
  display: grid;
  gap: 0.1875rem;
}

.mobile-context-panel-head small {
  color: var(--wr-muted-on-forest);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mobile-context-panel-head strong {
  font-family: var(--wr-font-serif);
  font-size: 1rem;
}

.mobile-context-panel-head button {
  min-width: var(--wr-control-size);
  min-height: var(--wr-control-size);
  display: grid;
  place-items: center;
  color: var(--wr-paper);
  background: transparent;
  border: var(--wr-rule-width) solid var(--wr-rule-dark);
  border-radius: var(--wr-shell-radius);
}

.mobile-context-panel .nav-label {
  padding-inline: 0.875rem;
}

.mobile-context-panel .nav-item {
  padding-inline: 0.875rem;
}

.report-scope-gateway {
  align-items: end;
  justify-content: space-between;
}

.report-scope-gateway > div {
  min-width: 0;
  flex: 1 1 24rem;
}

.report-scope-gateway h2,
.report-scope-gateway strong,
.report-card h3 a {
  color: var(--wr-paper);
}

.report-scope-gateway p,
.report-card-body p {
  color: var(--wr-paper-on-forest);
}

.report-scope-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
}

.report-card-foot {
  min-width: 0;
  flex-wrap: wrap;
}

.report-card-foot > *,
.report-card-foot .export-menu,
.report-card-foot .export-menu > summary {
  max-width: 100%;
}

.report-scope-gateway .segmented {
  max-width: 100%;
  flex-wrap: wrap;
}

.report-scope-gateway .segmented a {
  gap: 0.375rem;
}

.report-scope-gateway .segmented .icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

@media (max-width: 48rem) {
  .report-scope-gateway {
    position: static;
    display: grid;
  }

  .report-scope-gateway .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-scope-gateway .segmented a {
    min-width: 0;
    justify-content: flex-start;
    padding-inline: 0.5rem;
  }
}

@media (max-width: 18rem) {
  .report-scope-gateway .segmented {
    grid-template-columns: 1fr;
  }

  .report-card-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .report-card-foot .btn,
  .report-card-foot .export-menu,
  .report-card-foot .export-menu > summary {
    width: 100%;
    min-width: 0;
  }
}
