@view-transition {
  navigation: auto;
}

.shell-bar {
  position: relative;
  z-index: 1000;
  width: 100%;
  height: var(--shell-h);
  border-bottom: 1px solid var(--line);
  background: var(--field);
  view-transition-name: shell-bar;
}

.read-page .shell-bar {
  position: sticky;
  top: 0;
}

.shell-bar__inner {
  display: flex;
  width: min(100%, 82.5rem);
  height: calc(var(--shell-h) - 1px);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.shell-bar__identity {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(0.56rem, 2.3vw, 0.68rem);
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.22;
  text-transform: uppercase;
  white-space: nowrap;
}

.shell-bar__wordmark {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.03em;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-transform: lowercase;
  white-space: nowrap;
}

.shell-bar__dot {
  width: 0.48em;
  height: 0.48em;
  margin: 0 0.08em 0.08em;
  border-radius: 50%;
  background: var(--volt);
}

.shell-switch {
  display: inline-flex;
  overflow: hidden;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--field);
  view-transition-name: shell-switch;
}

.shell-switch__tab {
  display: inline-flex;
  min-width: 54px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

button.shell-switch__tab {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.shell-switch__tab + .shell-switch__tab {
  border-left: 1px solid var(--line);
}

.shell-switch__tab.is-active {
  background: var(--volt);
  color: var(--field);
}

::view-transition-group(root),
::view-transition-group(shell-bar),
::view-transition-group(shell-switch) {
  animation-duration: 200ms;
}

::view-transition-old(shell-bar),
::view-transition-new(shell-bar),
::view-transition-old(shell-switch),
::view-transition-new(shell-switch) {
  animation: none;
  mix-blend-mode: normal;
}

body:not(.read-page) .loading-shell,
body:not(.read-page) .fatal-shell {
  min-height: calc(100vh - var(--shell-h));
  min-height: calc(100dvh - var(--shell-h));
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-group(shell-bar),
  ::view-transition-group(shell-switch),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
