:root {
  --topbar-height: 59px;
  --bg-main: #020406;
  --bg-panel: #030507;
  --bg-panel-soft: #05080b;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.18);
  --text-main: #f2f2f2;
  --text-muted: #a4a4a4;
  --text-dim: #7b8187;
  --inactive-route: rgba(170, 170, 170, 0.18);
  --inactive-node: rgba(170, 170, 170, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-main);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--text-main);
  background: var(--bg-main);
  font-family:
    "IBM Plex Sans Condensed",
    "Roboto Condensed",
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hub-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-main);
}

.network-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(300px, 640px) minmax(150px, 1fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
  min-height: var(--topbar-height);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(3, 5, 7, 0.96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.network-topbar-actions {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: minmax(300px, 640px) minmax(32px, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.network-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: 0;
  color: var(--text-main);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #f2f2f2;
  background: rgba(255, 255, 255, 0.035);
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.network-brand:hover .brand-mark,
.network-brand:focus-visible .brand-mark {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.07);
}

.network-brand:focus-visible {
  border-radius: 4px;
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-copy strong {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
}

.brand-copy small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--text-dim);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.status-dot {
  display: block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aec35;
  box-shadow: 0 0 8px rgba(154, 236, 53, 0.7);
}

.service-search-trigger {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 5px 9px 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.54);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.service-search-trigger:hover,
.service-search-trigger:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  outline: 0;
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 12px rgba(255, 255, 255, 0.06);
}

.search-glyph {
  position: relative;
  width: 13px;
  height: 13px;
  border: 2px solid #dcdcdc;
  border-radius: 50%;
  opacity: 0.92;
}

.search-glyph::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: #dcdcdc;
  transform: rotate(45deg);
}

.service-search-copy {
  display: grid;
  min-width: 0;
}

.service-search-copy strong,
.service-search-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-search-copy strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}

.service-search-copy small {
  margin-top: 1px;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 1.15;
}

.service-search-trigger kbd {
  min-width: 76px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: #a9adb0;
  background: rgba(255, 255, 255, 0.04);
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.topbar-account {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 32px;
  height: 32px;
}

/* The home directory gives its project cards visual priority. These scoped
   overrides leave the canonical chrome on every other xjk surface untouched. */
html.xjk-home .xjk-global-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.045) !important;
  background: rgba(2, 4, 6, 0.7) !important;
  box-shadow: none;
}

html.xjk-home .xjk-global-topbar__mark {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

html.xjk-home .xjk-global-topbar__mark::after {
  opacity: 0.5;
}

html.xjk-home .xjk-global-topbar__context small {
  color: #737b83;
}

html.xjk-home .xjk-global-topbar__search {
  max-width: 240px !important;
}

html.xjk-home .xjk-global-topbar .xjk-topbar-search {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: none;
}

html.xjk-home .xjk-topbar-search__copy small,
html.xjk-home .xjk-global-topbar .xjk-topbar-search kbd {
  display: none;
}

html.xjk-home .xjk-global-topbar .xjk-topbar-search {
  grid-template-columns: 18px minmax(0, 1fr);
}

@media (min-width: 881px) {
  html.xjk-home.xjk-has-sidenav[data-xjk-sidenav="collapsed"] {
    --xjk-sidenav-w: 52px;
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav {
    /* Keep the route line and every grid icon on the exact midpoint of the
       52px compact rail. A 28px station then has matching 12px side gutters. */
    --xjk-rail: 26px;
    --xjk-pad: 6px;
    padding-inline: var(--xjk-pad);
    border-right-color: rgba(255, 255, 255, 0.035);
    background: rgba(4, 5, 7, 0.62);
    box-shadow: none;
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav::before {
    width: 1px;
    opacity: 0.2;
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav-line {
    opacity: 0.24;
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav-node {
    border-color: rgba(255, 255, 255, 0.18);
    color: #68717a;
    background: rgba(5, 7, 9, 0.72);
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav-item:hover .xjk-sidenav-node,
  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav-item:focus-visible .xjk-sidenav-node {
    border-color: rgba(255, 255, 255, 0.46);
    color: #e8eaed;
  }

  html.xjk-home[data-xjk-sidenav="collapsed"] .xjk-sidenav-item.is-active .xjk-sidenav-node {
    box-shadow: 0 0 10px color-mix(in srgb, var(--xjk-accent, #d8d8d8) 20%, transparent);
  }
}

@media (max-width: 880px) {
  html.xjk-home .xjk-sidenav-mobile-toggle {
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(4, 6, 8, 0.48);
    box-shadow: none;
    backdrop-filter: blur(10px);
  }

  html.xjk-home[data-xjk-sidenav-mobile="open"] .xjk-sidenav {
    background: linear-gradient(180deg, rgba(10, 12, 14, 0.98), rgba(4, 5, 7, 0.98));
  }
}
