:root {
  --desk-shell-height: 88px;
  --desk-shell-bg: rgba(11, 18, 28, 0.84);
  --desk-shell-bg-2: rgba(17, 26, 39, 0.92);
  --desk-shell-line: rgba(255, 154, 58, 0.16);
  --desk-shell-line-strong: rgba(255, 154, 58, 0.34);
  --desk-shell-text: #edf2f7;
  --desk-shell-soft: #d7e1ea;
  --desk-shell-muted: #8c9bad;
  --desk-shell-orange: #ff9a3a;
  --desk-shell-orange-soft: #ffd7a8;
  --desk-shell-shadow: 0 10px 32px rgba(0, 0, 0, 0.26);
}

html {
  scroll-padding-top: calc(var(--desk-shell-height) + 18px);
}

body.desk-shell-ready {
  padding-top: calc(var(--desk-shell-height) + 12px);
}

.desk-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background:
    linear-gradient(180deg, rgba(11, 18, 28, 0.96), rgba(11, 18, 28, 0.82)),
    linear-gradient(90deg, rgba(255, 154, 58, 0.06), transparent 18%, transparent 82%, rgba(255, 154, 58, 0.04));
  border-bottom: 1px solid rgba(255, 154, 58, 0.14);
  box-shadow: var(--desk-shell-shadow);
}

.desk-shell__inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 10px 14px 8px;
  display: grid;
  gap: 8px;
}

.desk-shell__row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.desk-shell__brand {
  min-width: 0;
}

.desk-shell__eyebrow {
  display: block;
  color: var(--desk-shell-muted);
  font: 600 0.62rem "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.desk-shell__title {
  display: block;
  margin-top: 2px;
  color: var(--desk-shell-text);
  font: 700 0.92rem/1.15 "Avenir Next", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-shell__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.desk-shell__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 154, 58, 0.16);
  background: rgba(255, 255, 255, 0.02);
  color: var(--desk-shell-soft);
  font: 600 0.63rem "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.desk-shell__link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 154, 58, 0.34);
  background: rgba(255, 140, 36, 0.10);
  color: #fff0dc;
}

.desk-shell__link.is-active {
  border-color: rgba(255, 154, 58, 0.42);
  background: rgba(255, 140, 36, 0.14);
  color: var(--desk-shell-orange-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 154, 58, 0.10);
}

.desk-shell__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.desk-shell__chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 154, 58, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: var(--desk-shell-muted);
  font: 600 0.62rem "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.desk-shell__chip strong {
  color: var(--desk-shell-soft);
  margin-left: 6px;
  font-weight: 700;
}

.desk-shell__chip.is-live {
  border-color: rgba(255, 154, 58, 0.24);
  color: var(--desk-shell-orange-soft);
}

.desk-shell__subrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.desk-shell__context {
  color: var(--desk-shell-muted);
  font: 500 0.72rem/1.35 "Avenir Next", "Segoe UI", Arial, sans-serif;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desk-shell__status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.desk-shell__status .desk-shell__chip {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 0.6rem;
}

@media (max-width: 1180px) {
  :root {
    --desk-shell-height: 118px;
  }

  .desk-shell__row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .desk-shell__meta,
  .desk-shell__status {
    justify-content: flex-start;
  }

  .desk-shell__subrow {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --desk-shell-height: 144px;
  }

  .desk-shell__inner {
    padding: 9px 10px 8px;
  }

  .desk-shell__nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .desk-shell__link {
    width: 100%;
  }

  .desk-shell__context {
    white-space: normal;
  }
}
