/* Signalfire contrast and responsive refinements */
.dn-header-logo {
  display: inline-block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 0;
  background: #f8fafc;
  -webkit-mask: url("../img/devnull-mark.svg") center / contain no-repeat;
  mask: url("../img/devnull-mark.svg") center / contain no-repeat;
}

.navbar > .container {
  max-width: none;
  width: 100%;
  padding-left: clamp(1rem, 3vw, 2.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
}
.dn-header-brand { margin-right: 1.5rem; }
.dn-header-event { display: none; }

[data-bs-theme="light"] .dn-header-logo { background: #0f172a; }
[data-bs-theme="light"] .dn-header-devnull {
  color: #020617 !important;
  font-weight: 800;
  opacity: 1;
}

.dn-loader {
  display: block;
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 0 10px rgba(248, 250, 252, .6));
}
[data-bs-theme="light"] .dn-loader {
  filter: invert(1) drop-shadow(0 0 8px rgba(15, 23, 42, .2));
}

/* Operation text: white in dark mode, black in light mode */
.ob-home h1,
.ob-home h1 .ob-operation-text,
.ob-home h1 .dn-white-text,
.operation-title .ob-operation-text {
  color: #ffffff !important;
  text-shadow: none !important;
}

[data-bs-theme="light"] .ob-home h1,
[data-bs-theme="light"] .ob-home h1 .ob-operation-text,
[data-bs-theme="light"] .ob-home h1 .dn-white-text,
[data-bs-theme="light"] .operation-title .ob-operation-text {
  color: #000000 !important;
  text-shadow: none !important;
}

/* Event accent word: retains vibrant hue and glow in both themes */
.ob-home h1 .dn-accent-text,
.ob-home h1 span.dn-accent-text,
.operation-title .dn-accent-text {
  color: var(--dn-accent) !important;
  text-shadow: 0 0 18px var(--dn-accent-glow) !important;
}

[data-bs-theme="light"] .ob-home h1 .dn-accent-text,
[data-bs-theme="light"] .ob-home h1 span.dn-accent-text,
[data-bs-theme="light"] .operation-title .dn-accent-text {
  color: var(--dn-accent) !important;
  text-shadow: 0 0 18px var(--dn-accent-glow) !important;
}
[data-bs-theme="light"] body::before {
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  opacity: .16 !important;
}
[data-bs-theme="light"] body::after {
  background-image:
    linear-gradient(rgba(0, 0, 0, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .025) 1px, transparent 1px),
    radial-gradient(circle, rgba(0, 0, 0, .045) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px, 4px 4px;
  opacity: .42 !important;
}
[data-bs-theme="light"] .navbar-brand,
[data-bs-theme="light"] .navbar-brand:hover,
[data-bs-theme="light"] .nav-link:hover,
[data-bs-theme="light"] .nav-link.active { color: #0f172a !important; }
[data-bs-theme="light"] .nav-link { color: #334155 !important; }
[data-bs-theme="light"] .nav-link i,
[data-bs-theme="light"] .navbar i,
[data-bs-theme="light"] button i { color: inherit !important; opacity: 1 !important; }
[data-bs-theme="light"] .text-muted,
[data-bs-theme="light"] .ob-footnote,
[data-bs-theme="light"] .ob-grid p { color: #475569 !important; opacity: 1 !important; }
[data-bs-theme="light"] .ob-grid article { background: #ffffff; }
[data-bs-theme="light"] .ob-home {
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08), transparent 52%), #ffffff !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  border-color: #cbd5e1 !important;
}
[data-bs-theme="light"] .clock-status-caption { color: #334155; }
[data-bs-theme="light"] .clock-status-caption strong { color: #0f172a; }
[data-bs-theme="light"] .btn-tactical { background: #ffffff; color: #0f172a; border-color: #94a3b8; }
[data-bs-theme="light"] .btn-tactical.active { color: #047857; border-color: #059669; background: #ecfdf5; }
[data-bs-theme="light"] .corner-frame { border-color: #94a3b8; }

[data-bs-theme="light"] .navbar-toggler {
  color: #0f172a !important;
  border-color: #64748b !important;
}
[data-bs-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f172a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-bs-theme="light"] .flip-clock-chassis {
  background: #f1f5f9;
  border-color: #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12), 0 12px 28px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
}
[data-bs-theme="light"] .flip-clock-chassis::before,
[data-bs-theme="light"] .flip-clock-chassis::after {
  background: radial-gradient(circle at 35% 35%, #f8fafc 0%, #64748b 80%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.9), 0 1px 2px rgba(15,23,42,.25);
}
[data-bs-theme="light"] .chassis-glass-glare {
  background: none;
}
[data-bs-theme="light"] .clock-telemetry-bar { border-bottom-color: #cbd5e1; }
[data-bs-theme="light"] .telemetry-node { color: #475569; }
[data-bs-theme="light"] .flap-digits-pair {
  background: #cbd5e1;
  border-color: #94a3b8;
  box-shadow: inset 0 2px 5px rgba(15,23,42,.18), 0 1px 0 rgba(255,255,255,.9);
}
[data-bs-theme="light"] .flap-top {
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 90%, #cbd5e1 100%);
  border-color: #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}
[data-bs-theme="light"] .flap-bottom {
  background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 15%, #f8fafc 100%);
  border-color: #94a3b8;
  box-shadow: inset 0 -1px 0 rgba(15,23,42,.12), 0 3px 5px rgba(15,23,42,.12);
}
[data-bs-theme="light"] .flap-glyph { color: #0f172a; text-shadow: 0 1px 1px rgba(255,255,255,.85); }
[data-bs-theme="light"] .split-flap-digit .seam-bar { background: #64748b; box-shadow: 0 0 2px rgba(15,23,42,.3); }
[data-bs-theme="light"] .split-flap-digit::before,
[data-bs-theme="light"] .split-flap-digit::after { background: #e2e8f0; border-color: #64748b; }
[data-bs-theme="light"] .split-flap-digit .escapement-pawl { background: #64748b; box-shadow: 0 1px 2px rgba(15,23,42,.2), inset 0 1px 0 rgba(255,255,255,.55); }
[data-bs-theme="light"] .flap-unit-label { color: #0369a1; }
[data-bs-theme="light"] .flap-separator-dot { background: #94a3b8; box-shadow: inset 0 1px 2px rgba(15,23,42,.2); }

/* Responsive Viewport Fit & Balanced Padding for Landing Page */
html, body {
  height: 100%;
}

body:has(.ob-home) {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body:has(.ob-home) .navbar {
  flex-shrink: 0;
  position: relative !important;
}

body:has(.ob-home) main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(0.75rem, 2vh, 1.75rem) 1.25rem !important;
  margin: 0 !important;
  box-sizing: border-box;
  width: 100%;
}

body:has(.ob-home) .ob-home {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto !important;
  padding: clamp(1.25rem, 3.2vh, 2.6rem) clamp(1.25rem, 3vw, 2.5rem) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  border-radius: 10px;
  box-sizing: border-box;
  min-height: auto !important;
}

.operation-title-row {
  margin: 0.3rem 0 !important;
}

.ob-lede {
  margin: clamp(0.35rem, 1vh, 0.8rem) auto clamp(0.85rem, 2vh, 1.5rem) !important;
}

.ob-countdown {
  margin: 0 auto clamp(0.85rem, 2vh, 1.5rem) !important;
}

.ob-actions {
  margin: clamp(0.25rem, 0.8vh, 0.6rem) 0 !important;
}

.ob-footnote {
  margin: clamp(0.45rem, 1.2vh, 0.9rem) auto 0 !important;
}

body:has(.ob-home) footer.footer {
  flex-shrink: 0;
  height: auto !important;
  min-height: auto !important;
  padding: clamp(0.45rem, 1.1vh, 0.75rem) 0 !important;
  margin-top: 0 !important;
  line-height: 1.4 !important;
}

body:has(.ob-home) footer.footer .container {
  height: auto !important;
  min-height: auto !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

body:has(.ob-home) footer.footer .dn-theme-credit {
  margin-bottom: 0.15rem !important;
}

@media (max-width: 768px) {
  body:has(.ob-home) main {
    justify-content: flex-start;
    padding: 0.5rem 0.5rem 1rem !important;
  }
  body:has(.ob-home) .ob-home {
    padding: 1rem 0.75rem !important;
  }
}

[data-bs-theme="light"] .ob-secondary {
  color: #1e293b;
  border-color: #64748b;
  background: rgba(255, 255, 255, .55);
}

.operation-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  gap: 20px;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
}
.ob-home h1.operation-title {
  margin: 0;
  font-size: 1em;
}
.signal-fire-flame {
  width: .78em;
  height: 1em;
  flex: 0 0 auto;
  transform-origin: 50% 82%;
  animation: signal-fire-breathe 720ms steps(2, end) infinite;
}
.signal-fire-flame-inner {
  width: 100%;
  height: 100%;
  transform-origin: 50% 82%;
  will-change: transform, filter;
  transition: transform 140ms ease-out, filter 140ms ease-out;
  filter: drop-shadow(0 0 2px rgba(255, 145, 0, .42)) drop-shadow(0 0 7px rgba(255, 120, 0, .18));
}
.signal-fire-flame-inner.is-flaring {
  transform: scale(1.11, .97);
  filter: drop-shadow(0 0 3px rgba(255, 145, 0, .55)) drop-shadow(0 0 10px rgba(255, 120, 0, .28));
}
.signal-fire-flame canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
@keyframes signal-fire-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012, .995); }
}
@media (max-width: 768px) {
  .operation-title-row { gap: 14px; font-size: clamp(1.65rem, 8vw, 2.4rem); }
  .operation-title { white-space: nowrap; }
  .signal-fire-flame { width: .74em; height: .95em; }
}
@media (prefers-reduced-motion: reduce) {
  .signal-fire-flame { animation: none; }
  .signal-fire-flame-inner { transition: none; }
}

/* Give the split-flap countdown enough scale and contrast on narrow screens. */
@media (max-width: 650px) {
  .split-flap-board { gap: .18rem; padding: .7rem .15rem; }
  .flap-unit-label { font-size: .58rem; letter-spacing: .09em; }
  .clock-controls-bar { align-items: flex-start; }
  .clock-status-caption { width: 100%; font-size: .72rem; line-height: 1.45; }
}

@media (max-width: 420px) {
  :root { --card-width: 28px; --card-height: 44px; }
  .split-flap-board { transform: none; }
  .flap-separator { margin: 0 .05rem; }
  .flap-unit-label { font-size: .5rem; }
}

/* Prevent global screen strobing / light flickering */
body {
  animation: none !important;
}

[data-bs-theme="light"] .ctf-loading {
  background: #f8fafc !important;
}

/* ============================================
   WATCH DOGS / CTOS TACTICAL BANNER & JUMBOTRON
   ============================================ */
.jumbotron {
  position: relative;
  background-color: #0d131f !important;
  background-image:
    linear-gradient(180deg, rgba(13, 19, 31, 0.72) 0%, rgba(13, 19, 31, 0.90) 100%),
    url("../img/devnull-team-banner.jpg") !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  border-bottom: 1px solid var(--dn-border, rgba(0, 229, 255, 0.25)) !important;
  padding: clamp(2rem, 5vh, 3.5rem) 1.5rem clamp(1.8rem, 4vh, 3rem) !important;
  margin-bottom: 2rem !important;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.jumbotron::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 229, 255, 0.12), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 229, 255, 0.025) 0px, rgba(0, 229, 255, 0.025) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

.jumbotron h1 {
  font-family: var(--dn-font-retro, 'Rajdhani', sans-serif) !important;
  font-size: clamp(2.2rem, 5vw, 3.6rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  text-shadow: 0 0 16px rgba(0, 229, 255, 0.5) !important;
  position: relative;
  z-index: 2;
  margin-bottom: 0.25rem !important;
}

.jumbotron .container {
  position: relative;
  z-index: 2;
}

.jumbotron .container::before {
  content: "CTOS // NETWORK INTELLIGENCE // SECURED ACCESS";
  display: block;
  font-family: var(--dn-font-mono, monospace);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: #00e5ff;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.jumbotron .badge {
  background-color: rgba(0, 229, 255, 0.15) !important;
  color: var(--dn-accent) !important;
  border: 1px solid rgba(0, 229, 255, 0.35) !important;
  font-family: var(--dn-font-mono) !important;
  letter-spacing: 0.12em !important;
  font-weight: 600 !important;
  padding: 0.35em 0.75em !important;
  text-transform: uppercase !important;
}

[data-bs-theme="light"] .jumbotron {
  background-color: #f1f5f9 !important;
  background-image:
    linear-gradient(180deg, rgba(248, 250, 252, 0.82) 0%, rgba(241, 245, 249, 0.94) 100%),
    url("../img/devnull-team-banner.jpg") !important;
  border-bottom: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="light"] .jumbotron h1 {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-bs-theme="light"] .jumbotron .container::before {
  color: #0284c7;
  text-shadow: none;
}

[data-bs-theme="light"] .jumbotron .badge {
  background-color: rgba(2, 132, 199, 0.1) !important;
  color: #0284c7 !important;
  border: 1px solid rgba(2, 132, 199, 0.3) !important;
}

/* Login page: a DEDSEC nod, not corporate placeholder telemetry. */
.dn-login-jumbotron .container::before {
  content: "POWER TO THE SHEEPLE // THE FEED IS OURS // SMART HOME, DUMB SECURITY";
}

[data-bs-theme="light"] .dn-login-jumbotron {
  background-image:
    linear-gradient(180deg, rgba(248, 250, 252, 0.48) 0%, rgba(241, 245, 249, 0.72) 100%),
    url("../img/devnull-team-banner.jpg") !important;
  background-color: #e2e8f0 !important;
  border-bottom-color: #64748b !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.16) !important;
}

[data-bs-theme="light"] .dn-login-jumbotron h1 {
  color: #020617 !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) !important;
}

[data-bs-theme="light"] .dn-login-jumbotron .container::before {
  color: #0369a1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}


