:root {
  color-scheme: dark;
}

body.command-center {
  min-height: 100vh;
  background-color: var(--fors33-bg);
  color: var(--fors33-text);
  margin: 0;
  font-family: var(--fors33-font-sans);
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12) 0%, transparent 35%, transparent 65%, rgba(0, 212, 255, 0.12) 100%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: scanline-pass 3s linear;
  animation-play-state: paused;
  z-index: 0;
}

@keyframes scanline-pass {
  0% {
    opacity: 0;
    transform: translateY(-15%);
  }
  30% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translateY(20%);
  }
}

.scanline-overlay.active {
  animation-play-state: running;
}

.command-bar {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.5rem;
  background: rgba(4, 4, 6, 0.98);
  border-bottom: 1px solid var(--fors33-border);
  font-family: var(--fors33-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 10;
}

.command-bar .breadcrumb {
  color: var(--fors33-text-muted);
}

.command-bar .uptime {
  color: var(--fors33-accent);
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.identity img {
  height: 26px;
}

.identity .divider {
  color: var(--fors33-border);
}

.identity .page-id {
  color: var(--fors33-accent);
  letter-spacing: 0.12em;
}

.nav-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin: 0 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--fors33-text-muted);
  position: relative;
  padding-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.nav-links a.active {
  color: var(--fors33-text);
}

.nav-links a[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -2.2rem;
  background: rgba(10, 10, 16, 0.95);
  color: var(--fors33-text-muted);
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--fors33-border);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  opacity: 1;
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--fors33-accent);
  width: 0;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
  transition: transform 0.25s ease, width 0.25s ease;
}

.vertical-strip {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  display: none;
  justify-content: center;
  gap: 2rem;
  padding: 0.45rem 1rem;
  background: rgba(10, 10, 16, 0.98);
  border-bottom: 1px solid var(--fors33-border);
}

.vertical-strip.active {
  display: flex;
}

.vertical-strip button {
  background: transparent;
  border: none;
  color: var(--fors33-text-muted);
  font-family: var(--fors33-font-mono);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  cursor: pointer;
  text-transform: uppercase;
}

.vertical-strip button span {
  color: var(--fors33-accent);
  margin-right: 0.2rem;
}

.vertical-strip button:focus-visible,
.vertical-strip button:hover {
  color: var(--fors33-text);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--fors33-text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fors33-success);
  animation: fors33-pulse-slow 1.8s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.8);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--fors33-border);
  color: var(--fors33-text-muted);
  font-family: var(--fors33-font-mono);
  padding: 0.25rem 0.75rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.mobile-panel {
  position: fixed;
  top: 0;
  right: -260px;
  width: 240px;
  height: 100vh;
  background: rgba(5, 5, 7, 0.98);
  border-left: 1px solid var(--fors33-border);
  padding: 1.5rem 1rem;
  font-family: var(--fors33-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transition: right 0.3s ease;
  z-index: 20;
}

.mobile-panel.open {
  right: 0;
}

.mobile-panel pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--fors33-text);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 10vw 3rem;
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 960px;
}

.hero .eyebrow {
  font-family: var(--fors33-font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fors33-text-muted);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

.hero .subheading {
  max-width: 720px;
  font-size: 1.15rem;
  color: var(--fors33-text-muted);
  margin-top: 1rem;
}

.hero .mission-line {
  font-family: var(--fors33-font-mono);
  color: var(--fors33-accent);
  margin-top: 1.25rem;
}

.hero .blink {
  animation: cursor-blink 0.8s steps(2, start) infinite;
}

@keyframes cursor-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
}

.intelligence-module {
  position: relative;
  border: 1px solid rgba(0, 212, 255, 0.1);
  background: rgba(20, 20, 30, 0.4);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 220px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.intelligence-module::before,
.intelligence-module::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--fors33-accent);
  border-style: solid;
}

.intelligence-module::before {
  top: -1px;
  left: -1px;
  border-width: 1px 0 0 1px;
}

.intelligence-module::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1px 1px 0;
}

.intelligence-module:hover,
.intelligence-module:focus-within {
  background: rgba(20, 20, 30, 0.85);
  border-color: rgba(0, 212, 255, 0.45);
  color: var(--fors33-text);
}

.intelligence-module header {
  font-family: var(--fors33-font-mono);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--fors33-text-muted);
  transition: color 0.2s ease;
}

.intelligence-module .portal-label {
  color: var(--fors33-accent);
  font-size: 0.75rem;
}

.intelligence-module ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--fors33-font-mono);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.intelligence-module li {
  display: flex;
  justify-content: space-between;
  color: var(--fors33-text);
  transition: color 0.2s ease;
}

.intelligence-module li span {
  color: var(--fors33-text-muted);
  transition: color 0.2s ease;
}

.intelligence-module:hover header,
.intelligence-module:focus-within header,
.intelligence-module:hover li span,
.intelligence-module:focus-within li span {
  color: var(--fors33-accent);
}

.intelligence-module .portal-cta {
  display: inline-block;
  margin-top: auto;
  font-family: var(--fors33-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--fors33-accent);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0.35rem 0.75rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.intelligence-module .portal-cta:hover {
  border-color: var(--fors33-accent);
  color: #fff;
}

.asset-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  margin-top: 1rem;
}

.asset-strip.figure-grid figure {
  margin: 0;
  border: 1px solid var(--fors33-border);
  background: #0a0a12;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 0.25rem;
}

.asset-strip img,
.asset-strip object,
.asset-strip svg {
  width: 100%;
  height: auto;
  display: block;
}

.asset-strip figcaption {
  padding: 0.75rem 1rem;
  font-family: var(--fors33-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fors33-text-muted);
  border-top: 1px solid var(--fors33-border);
  opacity: 0.75;
}

.mission-briefing {
  border: 1px solid var(--fors33-border);
  background: rgba(10, 10, 16, 0.9);
  padding: 2rem;
  max-width: 1024px;
}

.mission-briefing h2 {
  margin-top: 0;
  font-size: 1rem;
  font-family: var(--fors33-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fors33-text-muted);
}

.mission-briefing p {
  margin-bottom: 1rem;
}

.status-bar {
  font-family: var(--fors33-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid var(--fors33-border);
  padding: 0.5rem 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(4, 4, 6, 0.95);
}

.status-bar span {
  margin-right: 1rem;
  color: var(--fors33-text-muted);
}

.status-bar .nominal {
  color: var(--fors33-success);
}

.status-bar .nodes {
  color: var(--fors33-accent);
}

@media (max-width: 1024px) {
  main {
    padding: 2rem 5vw 3rem;
  }
}

@media (max-width: 768px) {
  .command-bar {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .intelligence-grid {
    grid-template-columns: 1fr;
  }

  .asset-strip {
    grid-template-columns: 1fr;
  }

  .mobile-toggle {
    display: inline-flex;
  }
}

@media (min-width: 769px) and (max-width: 1180px) {
  .intelligence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
