:root {
  --site-shell-bg: rgba(3, 8, 20, 0.94);
  --site-shell-panel: rgba(4, 10, 23, 0.985);
  --site-shell-surface: rgba(8, 19, 39, 0.88);
  --site-shell-line: rgba(104, 157, 219, 0.34);
  --site-shell-line-soft: rgba(104, 157, 219, 0.18);
  --site-shell-text: #f4f7fc;
  --site-shell-muted: #a9bad1;
  --site-shell-soft: #7389a8;
  --site-shell-blue: #55aaff;
  --site-shell-cyan: #5ecff1;
  --site-shell-amber: #ffb52e;
  --site-shell-warning: #ff9f9f;
  --site-shell-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-shell,
.site-shell * {
  box-sizing: border-box;
}

.site-shell {
  position: sticky;
  z-index: 2000;
  top: 0;
  min-width: 320px;
  border-bottom: 1px solid var(--site-shell-line);
  background: var(--site-shell-bg);
  color: var(--site-shell-text);
  font-family: var(--site-shell-font);
  backdrop-filter: blur(18px);
}

.site-shell a {
  color: inherit;
  text-decoration: none;
}

.site-shell button {
  color: inherit;
  font: inherit;
}

.site-shell-inner {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  width: min(1360px, calc(100% - 2.5rem));
  min-height: 4.45rem;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.72rem;
  width: fit-content;
  font-size: 1.06rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-brand-mark {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  overflow: visible;
  color: var(--site-shell-cyan);
  filter: drop-shadow(0 0 0.8rem rgba(94, 207, 241, 0.22));
}

.site-brand-mark circle,
.site-brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.35;
}

.site-brand-mark .site-brand-core {
  fill: currentColor;
  stroke: none;
}

.site-shell-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(4.8rem, auto));
  align-self: center;
  align-items: center;
  justify-self: start;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--site-shell-line-soft);
  border-radius: 7px;
  background: rgba(7, 16, 32, 0.42);
  font-size: 0.82rem;
  font-weight: 680;
}

.site-shell-nav a {
  display: grid;
  min-height: 2.75rem;
  padding: 0.38rem 0.9rem;
  place-items: center;
  color: var(--site-shell-muted);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.site-shell-nav a + a {
  border-left: 1px solid var(--site-shell-line-soft);
}

.site-shell-nav a:hover {
  background: rgba(85, 170, 255, 0.07);
  color: var(--site-shell-text);
}

.site-shell-nav a[aria-current="page"] {
  background: rgba(85, 170, 255, 0.11);
  color: var(--site-shell-blue);
  box-shadow: inset 0 -2px 0 var(--site-shell-blue);
}

.site-source-health {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-height: auto;
  padding: 0 0.72rem;
  color: var(--site-shell-muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.site-source-dot {
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--site-shell-blue);
  box-shadow: 0 0 0.8rem rgba(85, 170, 255, 0.48);
}

.site-shell[data-source-state="partial"] .site-source-dot {
  background: var(--site-shell-amber);
  box-shadow: 0 0 0.8rem rgba(255, 181, 46, 0.34);
}

.site-shell[data-source-state="unavailable"] .site-source-dot {
  background: var(--site-shell-warning);
  box-shadow: none;
}

.site-shell[data-source-state="pending"] .site-source-dot {
  background: var(--site-shell-soft);
  box-shadow: none;
}

.site-alerts {
  position: relative;
  justify-self: end;
}

.site-alert-trigger {
  display: inline-grid;
  grid-template-columns: auto 1px auto;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 2.75rem;
  overflow: hidden;
  border: 1px solid var(--site-shell-line);
  border-radius: 7px;
  padding: 0;
  background: rgba(7, 16, 32, 0.62);
  color: var(--site-shell-muted);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 740;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.site-alert-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--site-shell-line-soft);
}

.site-alert-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.58rem;
  min-height: 2.75rem;
  padding: 0.42rem 0.72rem;
}

.site-alert-trigger:hover,
.site-alert-trigger[aria-expanded="true"] {
  border-color: rgba(85, 170, 255, 0.72);
  color: var(--site-shell-text);
}

.site-alert-trigger[data-alert-state="active"] {
  border-color: rgba(255, 181, 46, 0.62);
  background: rgba(255, 181, 46, 0.08);
  color: var(--site-shell-amber);
}

.site-alert-trigger[data-alert-state="partial"] {
  border-color: rgba(255, 181, 46, 0.48);
  background: rgba(255, 181, 46, 0.06);
  color: var(--site-shell-amber);
}

.site-alert-trigger[data-alert-state="warning"] {
  border-color: rgba(255, 159, 159, 0.72);
  background: rgba(255, 159, 159, 0.09);
  color: var(--site-shell-warning);
}

.site-alert-trigger[data-alert-state="unavailable"] {
  border-color: rgba(255, 159, 159, 0.34);
  color: var(--site-shell-soft);
}

.site-alert-icon,
.site-alert-chevron,
.site-alert-nav-button svg,
.site-alert-link svg,
.site-source-shield {
  display: block;
  width: 1.16rem;
  height: 1.16rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.site-alert-chevron {
  width: 0.8rem;
  height: 0.8rem;
  margin-left: 0.05rem;
  transition: transform 160ms ease;
}

.site-alert-trigger[aria-expanded="true"] .site-alert-chevron {
  transform: rotate(180deg);
}

.site-alert-count,
.site-alert-panel-count {
  display: inline-grid;
  min-width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 5px;
  background: rgba(85, 170, 255, 0.14);
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
}

.site-alert-count[hidden],
.site-alert-panel-count[hidden] {
  display: none;
}

.site-alert-panel {
  position: absolute;
  z-index: 2010;
  top: calc(100% + 0.62rem);
  right: 0;
  width: min(25rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100svh - 5.8rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(104, 157, 219, 0.46);
  border-radius: 8px;
  background: var(--site-shell-panel);
  box-shadow: 0 1.6rem 4.5rem rgba(0, 0, 0, 0.56);
}

.site-alert-panel::before {
  position: absolute;
  top: -0.42rem;
  right: 2.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 1px solid rgba(104, 157, 219, 0.46);
  border-left: 1px solid rgba(104, 157, 219, 0.46);
  background: var(--site-shell-panel);
  content: "";
  transform: rotate(45deg);
}

.site-alert-panel[hidden],
.site-alert-navigation[hidden],
.site-alert-experimental[hidden] {
  display: none;
}

.site-alert-panel-head {
  display: flex;
  align-items: center;
  gap: 0.52rem;
  padding: 1rem 1rem 0.78rem;
}

.site-alert-panel-head h2 {
  margin: 0;
  color: var(--site-shell-text);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.site-alert-panel-count {
  color: var(--site-shell-muted);
}

.site-alert-list {
  padding: 0 1rem 1rem;
}

.site-alert-list:focus-visible,
.site-alert-trigger:focus-visible,
.site-alert-nav-button:focus-visible,
.site-alert-link:focus-visible,
.site-shell a:focus-visible {
  outline: 2px solid var(--site-shell-blue);
  outline-offset: 3px;
}

.site-alert-card {
  display: grid;
  gap: 0.5rem;
  min-height: 12rem;
  border: 1px solid rgba(104, 157, 219, 0.36);
  border-left: 3px solid var(--site-shell-blue);
  border-radius: 7px;
  padding: 0.95rem;
  background: var(--site-shell-surface);
}

.site-alert-card.is-watch {
  border-left-color: var(--site-shell-amber);
}

.site-alert-card.is-warning {
  border-left-color: var(--site-shell-warning);
}

.site-alert-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-alert-source {
  color: var(--site-shell-text);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-alert-severity {
  border: 1px solid rgba(85, 170, 255, 0.4);
  border-radius: 5px;
  padding: 0.18rem 0.4rem;
  color: var(--site-shell-blue);
  font-size: 0.68rem;
  font-weight: 740;
}

.site-alert-card.is-watch .site-alert-severity {
  border-color: rgba(255, 181, 46, 0.44);
  background: rgba(255, 181, 46, 0.09);
  color: var(--site-shell-amber);
}

.site-alert-card.is-warning .site-alert-severity {
  border-color: rgba(255, 159, 159, 0.48);
  background: rgba(255, 159, 159, 0.09);
  color: var(--site-shell-warning);
}

.site-alert-card h3 {
  margin: 0;
  color: var(--site-shell-text);
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.site-alert-meta,
.site-alert-summary,
.site-alert-empty,
.site-source-detail,
.site-alert-experimental {
  margin: 0;
  color: var(--site-shell-muted);
}

.site-alert-meta {
  font-size: 0.76rem;
}

.site-alert-summary {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.site-alert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  width: fit-content;
  min-height: 2.75rem;
  margin-top: auto;
  color: var(--site-shell-blue) !important;
  font-size: 0.78rem;
  font-weight: 730;
}

.site-alert-link svg {
  width: 1rem;
  height: 1rem;
}

.site-alert-empty {
  padding: 1rem 0 1.15rem;
  font-size: 0.86rem;
  font-weight: 720;
}

.site-alert-empty span {
  color: var(--site-shell-soft);
  font-weight: 480;
}

.site-alert-navigation {
  display: grid;
  grid-template-columns: 2.75rem 1fr 2.75rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0.78rem 1rem;
  border-top: 1px solid var(--site-shell-line-soft);
}

.site-alert-nav-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--site-shell-line);
  border-radius: 6px;
  background: rgba(8, 19, 39, 0.72);
  color: var(--site-shell-text);
  cursor: pointer;
}

.site-alert-next {
  justify-self: end;
}

.site-alert-position {
  color: var(--site-shell-text);
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
}

.site-source-detail,
.site-alert-experimental {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  min-height: 3.25rem;
  padding: 0.72rem 1rem;
  border-top: 1px solid var(--site-shell-line-soft);
  font-size: 0.76rem;
  text-align: center;
}

.site-source-shield {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--site-shell-blue);
}

.site-alert-experimental {
  min-height: 2.75rem;
  color: var(--site-shell-soft);
}

.site-shell-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

@media (max-width: 720px) {
  .site-shell-inner {
    grid-template-areas:
      "brand alerts"
      "nav nav";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 3.9rem 3.2rem;
    gap: 0;
    width: 100%;
    min-height: 7.1rem;
  }

  .site-brand {
    grid-area: brand;
    padding-left: 1rem;
  }

  .site-brand-mark {
    width: 1.85rem;
    height: 1.85rem;
  }

  .site-shell-nav {
    grid-area: nav;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: center;
    justify-self: stretch;
    margin: 0 1rem;
    font-size: 0.82rem;
  }

  .site-alerts {
    position: static;
    grid-area: alerts;
    padding-right: 1rem;
  }

  .site-alert-trigger {
    grid-template-areas:
      "action"
      "source";
    grid-template-columns: auto;
    gap: 0.18rem;
    min-height: 3.2rem;
    padding: 0.34rem 0.68rem;
  }

  .site-alert-action {
    grid-area: action;
    min-height: auto;
    padding: 0;
  }

  .site-source-health {
    grid-area: source;
    justify-content: center;
    padding: 0;
    font-size: 0.64rem;
  }

  .site-alert-divider {
    display: none;
  }

  .site-alert-panel {
    position: fixed;
    top: 7.45rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    max-height: calc(100svh - 8.2rem);
  }

  .site-alert-panel::before {
    display: none;
  }

  .site-alert-panel-head {
    padding: 1.05rem 1rem 0.85rem;
  }
}

@media (max-width: 360px) {
  .site-brand {
    gap: 0.52rem;
    padding-left: 0.75rem;
    font-size: 0.95rem;
  }

  .site-brand-mark {
    width: 1.62rem;
    height: 1.62rem;
  }

  .site-alerts {
    padding-right: 0.75rem;
  }

  .site-alert-trigger {
    gap: 0.14rem;
    padding: 0.32rem 0.5rem;
    font-size: 0.77rem;
  }

  .site-alert-action {
    gap: 0.38rem;
  }

  .site-shell-nav {
    margin: 0 0.75rem;
    font-size: 0.78rem;
  }

  .site-source-health {
    font-size: 0.64rem;
  }

  .site-alert-panel {
    right: 0.5rem;
    left: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-shell *,
  .site-shell *::before,
  .site-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
