:root {
  --tactical-charcoal: #171a1c;
  --deep-steel: #0d4f73;
  --signal-blue: #087fb5;
  --field-olive: #53633a;
  --safety-red: #c23b2e;
  --forum-gray: #e6ebef;
  --panel-white: #ffffff;
  --border-steel: #b6c4ce;
  --muted-slate: #5f6f7a;
  --surface: #111416;
  --surface-2: #191c1e;
  --surface-3: #22272a;
  --text-main: #e6ebef;
  --text-muted: #b6c4ce;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #171A1C;
  color: var(--text-main);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
a { color: #087FB5; text-decoration: none; }
a:hover, a:focus { color: #0D4F73; text-decoration: underline; }
.skip-link { position: fixed; z-index: 2000; left: 1rem; top: 1rem; }

.site-header {
  border-bottom: 1px solid #B6C4CE;
}
.tactical-topbar {
  min-height: 64px;
  background: #171A1C;
  backdrop-filter: blur(10px);
}
.navbar-toggler {
  border-color: #53633A;
  background: #53633A;
}
.navbar-toggler-icon { filter: invert(1); }
.tactical-brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #087FB5;
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
}
.brand-mark {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 2px solid #087FB5;
  background: var(--field-olive);
}
.navbar .nav-link {
  color: var(--text-muted);
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: .78rem;
  font-weight: 600;
}
.navbar .nav-link:hover { color: var(--text-main); }
.search-compact .form-control {
  width: 180px;
  background: #FFFFFF;
  border-color: #B6C4CE;
  color: #171A1C;
}
.search-compact .form-control::placeholder {
  color: #5F6F7A;
}

.btn-primary, button.btn-primary {
  --bs-btn-bg: #C23B2E;
  --bs-btn-border-color: #C23B2E;
  --bs-btn-hover-bg: #0D4F73;
  --bs-btn-hover-border-color: #0D4F73;
  --bs-btn-color: #FFFFFF;
}

.search-compact .form-control:focus {
  border-color: #087FB5;
  box-shadow: 0 0 0 .2rem rgba(8, 127, 181, .18);
  color: var(--text-main);
}

.site-layout {
  min-height: 100vh;
  padding-top: 64px;
}
.tactical-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 260px;
  overflow-y: auto;
  background: #171A1C;
  border-right: 1px solid #B6C4CE;
  padding: 1rem;
}
.operator-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: #FFFFFF;
  color: #171A1C;
  border: 1px solid #B6C4CE;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.operator-card img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}
.operator-card strong { display: block; font-size: .9rem; }
.operator-card span, .sidebar-kicker {
  display: block;
  color: #bbcd9b;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: .72rem;
  text-transform: uppercase;
}
.sidebar-nav .nav-link {
  color: #B6C4CE;
  border-left: 3px solid transparent;
  padding: .65rem .75rem;
  border-radius: 0 4px 4px 0;
  font-weight: 600;
}
.sidebar-nav .nav-link:hover {
  background: #53633A;
  border-left-color: #087FB5;
  color: var(--text-main);
  text-decoration: none;
}
.sidebar-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-top: 1rem;
}
.sidebar-stats div {
  background: #FFFFFF;
  color: #171A1C;
  border: 1px solid #B6C4CE;
  border-radius: 4px;
  padding: .7rem;
  text-align: center;
}
.sidebar-stats span {
  display: block;
  color: #5F6F7A;
  font-size: .7rem;
  text-transform: uppercase;
}
.sidebar-stats strong {
  font-family: "IBM Plex Mono", Menlo, monospace;
  color: #d7e9b5;
}

.content-shell {
  margin-left: 260px;
  padding: 2rem;
  min-height: calc(100vh - 64px);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, .8fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.hero-briefing {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #B6C4CE;
  border-radius: 8px;
  background: #0D4F73;
}
.hero-briefing img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .62;
}
.hero-briefing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,20,22,.1), rgba(17,20,22,.94));
}
.hero-copy {
  position: absolute;
  z-index: 1;
  left: 2rem;
  right: 2rem;
  bottom: 1.7rem;
}
h1, h2, h3, h4, h5, h6 {
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}
.hero-copy h1 {
  max-width: 800px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}
.hero-copy p { max-width: 680px; color: var(--text-muted); }
.briefing-panel, .content-panel, .section-heading {
  background: #FFFFFF;
  color: #171A1C;
  border: 1px solid #B6C4CE;
  border-radius: 8px;
}
.briefing-panel {
  padding: 1.25rem;
}
.briefing-panel strong {
  display: block;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: 3rem;
  color: #087FB5;
}
.panel-label, .status-chip {
  display: inline-block;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #bbcd9b;
}
.status-chip {
  padding: .25rem .5rem;
  background: #53633A;
  border-radius: 4px;
  margin-bottom: .7rem;
}
.status-red { color: #FFFFFF; background: #C23B2E; }
.section-heading {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.section-heading h1 { margin: 0; }
.content-panel {
  padding: 1.25rem;
}
.narrow-copy { max-width: 920px; }
.breadcrumb-wrap .breadcrumb {
  --bs-breadcrumb-divider-color: #5f6f7a;
  margin-bottom: .75rem;
  font-size: .85rem;
}
.breadcrumb-item.active { color: #5F6F7A; }

.forum-row-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: center;
  padding: .9rem;
  margin-bottom: .65rem;
  background: #E6EBEF;
  color: #171A1C;
  border: 1px solid #B6C4CE;
  border-radius: 6px;
}
.forum-row-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #53633A;
  border: 1px solid #53633A;
  border-radius: 4px;
}
.forum-row-icon span {
  width: 12px;
  height: 12px;
  border: 2px solid #bbcd9b;
  display: block;
}
.forum-row-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.forum-row-body h2 {
  margin: 0;
  font-size: 1rem;
}
.forum-row-body p { margin: .25rem 0 0; color: #5F6F7A; }
.forum-row-meta {
  color: #5F6F7A;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: .75rem;
}

.forum-table-wrap {
  margin: 1rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #B6C4CE;
}
.forum-table {
  --bs-table-bg: #FFFFFF;
  --bs-table-color: #171A1C;
  --bs-table-border-color: #B6C4CE;
  --bs-table-hover-bg: #E6EBEF;
  margin: 0;
  font-size: .95rem;
}
.forum-table th {
  background: #0D4F73;
  color: #FFFFFF;
  font-family: "IBM Plex Mono", Menlo, monospace;
  font-size: .78rem;
  text-transform: uppercase;
}
.cell-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.content-image img, .gallery-grid img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #B6C4CE;
}
.media-placeholder {
  min-height: 84px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(13,79,115,.38), rgba(83,99,58,.25)),
    #E6EBEF;
  border: 1px dashed #53633A;
  border-radius: 6px;
}
.media-placeholder span {
  width: 24px;
  height: 24px;
  border: 2px solid #bbcd9b;
  display: block;
  transform: rotate(45deg);
}
blockquote {
  border-left: 4px solid #087FB5;
  padding-left: 1rem;
  color: #5F6F7A;
}
pre {
  background: #171A1C;
  border: 1px solid #B6C4CE;
  color: #d7e9b5;
  padding: 1rem;
  border-radius: 6px;
}
.content-list { padding-left: 1.25rem; }
.utility-panel { max-width: 900px; }
.article-main-image { max-width: min(34%, 320px); border-radius: 6px; }

.site-footer {
  margin-left: 260px;
  padding: 2rem;
  border-top: 1px solid #B6C4CE;
  background: #171A1C;
  color: #B6C4CE;
}
.footer-title {
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  color: var(--text-main);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1rem;
  justify-content: flex-end;
}
.footer-links a { color: var(--text-muted); font-weight: 600; }
.footer-copy { max-width: 480px; }

@media (max-width: 991.98px) {
  .tactical-sidebar {
    position: static;
    width: auto;
    margin-top: 64px;
    border-right: 0;
    border-bottom: 1px solid #3f484f;
  }
  .site-layout { padding-top: 0; }
  .content-shell, .site-footer { margin-left: 0; }
  .content-shell { padding: 1rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .hero-briefing { min-height: 300px; }
  .article-main-image { max-width: 100%; float: none !important; margin-left: 0 !important; }
}

@media (max-width: 575.98px) {
  .content-panel, .section-heading { padding: 1rem; }
  .forum-row-card { grid-template-columns: 36px minmax(0, 1fr); }
  .forum-row-meta { display: none; }
  .hero-copy { left: 1rem; right: 1rem; }
}

@media print {
  .tactical-topbar, .tactical-sidebar, .site-footer { display: none; }
  .content-shell { margin: 0; padding: 0; }
  body { background: #fff; color: #000; }
}
