:root{
  --controls-strip-radius: 14px;
  --controls-border: rgba(255,255,255,.05);
  --controls-bg:
    linear-gradient(180deg, rgba(13,15,20,.76), rgba(9,11,15,.90));

  --page-rail-link-border: rgba(255,255,255,.055);
  --page-rail-link-border-hover: rgba(184,154,92,.18);
  --page-rail-link-text: rgba(255,255,255,.92);

  --shell-rail-gap: 7px;
  --shell-rail-pad: 6px;

  --shell-control-height: 31px;
  --shell-control-pad-x: 9px;
  --shell-control-radius: 10px;
  --shell-control-font-size: 10px;
  --shell-control-letter: .03em;
  --shell-control-font-weight: 700;

  --shell-section-title-size: 10px;
  --shell-section-title-letter: .12em;
  --shell-section-title-color: rgba(210,220,235,.62);

  --shell-command-band-gap: 12px;
  --shell-command-band-top: 8px;

  --shell-dock-stack-gap: 8px;
  --shell-module-radius: 15px;
  --shell-module-border: rgba(255,255,255,.05);
  --shell-module-bg:
    linear-gradient(180deg, rgba(12,14,18,.76), rgba(9,11,15,.91));
  --shell-module-shadow:
    inset 0 1px 0 rgba(255,255,255,.022),
    inset 0 0 0 1px rgba(255,255,255,.008),
    0 8px 18px rgba(0,0,0,.15);

  --shell-dock-button-border: rgba(255,255,255,.055);
  --shell-dock-button-bg:
    linear-gradient(180deg, rgba(255,255,255,.014), rgba(255,255,255,.004)),
    linear-gradient(180deg, rgba(11,13,17,.88), rgba(8,10,14,.95));
  --shell-dock-button-shadow:
    inset 0 1px 0 rgba(255,255,255,.026),
    inset 0 0 0 1px rgba(255,255,255,.008);

  --hover-workspace-bg: linear-gradient(180deg, #5f7287, #46586b);
  --hover-workspace-border: rgba(190,215,240,.28);

  --hover-engine-bg: linear-gradient(180deg, #c8a12b, #a88433);
  --hover-engine-border: rgba(255,230,140,.30);

  --hover-pattern-bg: linear-gradient(180deg, #6f5331, #4f3920);
  --hover-pattern-border: rgba(184,154,92,.28);
}

/* =========================================================
   LOWER DOCK
   Desktop-oriented secondary routing band
   ========================================================= */

.shell-command-band{
  width: 100%;
  min-width: 0;
  margin-top: var(--shell-command-band-top);
}

.shell-command-band__inner{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--shell-command-band-gap);
  align-items: start;
  width: 100%;
  min-width: 0;
}

.shell-command-band__left{
  display: grid;
  gap: var(--shell-dock-stack-gap);
  min-width: 0;
}

.shell-command-band__right{
  width: auto;
  min-width: 0;
  justify-self: end;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.shell-section{
  width: 100%;
  min-width: 0;
}

.shell-section--site-nav{
  min-width: 0;
}

.shell-section--controls{
  min-width: 0;
  width: auto;
  justify-self: end;
}

.shell-section__head{
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0 6px 6px;
}

.shell-section__head::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  right: 6px;
  height: 1px;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .44;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.02) 0%,
      rgba(184,154,92,.12) 20%,
      rgba(255,255,255,.045) 52%,
      rgba(184,154,92,.07) 78%,
      rgba(255,255,255,0) 100%
    );
}

.shell-section__label{
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 0;
  color: var(--shell-section-title-color);
  font-size: var(--shell-section-title-size);
  font-weight: 700;
  letter-spacing: var(--shell-section-title-letter);
  text-transform: uppercase;
  white-space: nowrap;
}

/* =========================================================
   MODULE CONTAINERS
   ========================================================= */

.shell-controls-strip,
.page-rail.page-rail--shell{
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

.page-rail.page-rail--shell{
  width: 100%;
  max-width: none;
}

.shell-controls-strip{
  width: auto;
  display: inline-block;
}

.shell-section--site-nav .page-rail,
.shell-section--controls .shell-controls-strip{
  padding: 6px;
  border-radius: var(--shell-module-radius);
  background: var(--shell-module-bg);
  border: 1px solid var(--shell-module-border);
  box-shadow: var(--shell-module-shadow);
}

/* =========================================================
   TRACKS
   ========================================================= */

.shell-controls-strip__track,
.page-rail__track{
  position: relative;
  min-width: 0;
  box-sizing: border-box;
  isolation: isolate;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.shell-controls-strip__track{
  width: auto;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: end;
  align-items: center;
  gap: var(--shell-rail-gap);
}

.page-rail__track{
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--shell-rail-gap);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.shell-controls-strip__track::before,
.page-rail__track::before,
.page-rail__track::after{
  content: none;
}

.page-rail__track::-webkit-scrollbar{
  display: none;
}

/* =========================================================
   BUTTON BASE
   ========================================================= */

.shell-controls-strip .btn,
.shell-controls-strip a.btn,
.shell-controls-strip button.btn{
  position: relative;
  z-index: 1;
  width: auto;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  color: inherit;
  font: inherit;
}

.shell-controls-strip .btn__face,
.page-rail__link{
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--shell-control-height);
  padding: 0 var(--shell-control-pad-x);
  white-space: nowrap;
  text-align: center;
  font-size: var(--shell-control-font-size);
  font-weight: var(--shell-control-font-weight);
  letter-spacing: var(--shell-control-letter);
  line-height: 1;
  text-transform: uppercase;
  border-radius: var(--shell-control-radius);
  border: 1px solid var(--shell-dock-button-border);
  background: var(--shell-dock-button-bg);
  box-shadow: var(--shell-dock-button-shadow);
  color: var(--page-rail-link-text);
  transition:
    transform .14s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}

.shell-controls-strip .btn__face{
  width: auto;
  min-width: 0;
}

.page-rail__link{
  flex: 0 0 auto;
  min-width: max-content;
  text-decoration: none;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================================================
   HOVER / ACTIVE STATES
   ========================================================= */

.shell-controls-strip .btn:hover .btn__face,
.shell-controls-strip .btn:focus-visible .btn__face,
.page-rail__link:hover,
.page-rail__link:focus-visible{
  transform: translateY(-1px);
  outline: none;
}

.shell-utility--login:hover .btn__face,
.shell-utility--login:focus-visible .btn__face,
.shell-utility--nav:hover .btn__face,
.shell-utility--nav:focus-visible .btn__face,
.page-rail__link:hover,
.page-rail__link:focus-visible{
  background: var(--hover-pattern-bg);
  border-color: var(--hover-pattern-border);
  color: rgba(255,255,255,.96);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 6px 14px rgba(0,0,0,.14);
}

.shell-utility--credits:hover .btn__face,
.shell-utility--credits:focus-visible .btn__face{
  background: var(--hover-engine-bg);
  border-color: var(--hover-engine-border);
}

.shell-control--workspace:hover .btn__face,
.shell-control--workspace:focus-visible .btn__face{
  background: var(--hover-workspace-bg);
  border-color: var(--hover-workspace-border);
}

.page-rail__link:active{
  transform: translateY(0);
}

.page-rail__link[aria-current="true"]{
  border-color: rgba(184,154,92,.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.016)),
    linear-gradient(180deg, rgba(101,79,42,.28), rgba(91,71,38,.18));
  color: rgba(255,255,255,.98);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    inset 0 0 0 1px rgba(255,255,255,.012),
    0 0 0 1px rgba(184,154,92,.08);
}

/* =========================================================
   BREAKPOINTS
   ========================================================= */

@media (max-width: 980px){
  .shell-command-band__inner{
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .shell-section--controls{
    width: 100%;
    justify-self: stretch;
  }

  .shell-command-band__right{
    width: 100%;
    justify-self: stretch;
  }

  .shell-controls-strip{
    width: 100%;
    display: block;
  }

  .shell-controls-strip__track{
    width: 100%;
    justify-content: start;
  }
}

/* =========================================================
   Mobile command band is no longer primary.
   windows.css should own mobile trigger behavior.
   Keep this band desktop/tablet oriented.
   ========================================================= */

@media (max-width: 820px){
  .shell-command-band{
    margin-top: 6px;
  }

  .shell-section__head{
    padding: 0 4px 5px;
  }

  .shell-section__label{
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .shell-section--site-nav .page-rail,
  .shell-section--controls .shell-controls-strip{
    padding: 5px;
    border-radius: 12px;
  }

  .page-rail__link,
  .shell-controls-strip .btn__face{
    min-height: 28px;
    padding-inline: 8px;
    font-size: 9px;
    letter-spacing: 0.02em;
    border-radius: 9px;
  }
}

@media (max-width: 560px){
  .page-rail__link,
  .shell-controls-strip .btn__face{
    min-height: 27px;
    padding-inline: 7px;
    font-size: 8.5px;
  }
}

@media (prefers-reduced-motion: reduce){
  .page-rail__link,
  .shell-controls-strip .btn__face{
    transition: none !important;
  }
}