/* =====================================================================
   Aegis Sentinel — additive overlay styles. Loaded on every rendered
   page after the original _base.html stylesheets, so we cannot
   override anything by accident; we only add helpers for protected
   content scrambling, the violation banner, and a polished lockout
   screen if the JS sentinel runtime trips.

   This file is purely additive — every existing stylesheet from
   web/static/css/ keeps its precedence.
   ===================================================================== */

/* Protected content scramble target — pages can opt into the
   data-aegis="protected" hook and have their text replaced with
   binary-noise scramble while Sentinel is in tripped state. The bot
   can also flip this class on body when continuous behavioural drift
   is detected. */
body.aegis-tripped [data-aegis="protected"] {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  color: transparent;
  text-shadow: 0 0 12px rgba(196, 106, 90, 0.35);
}

/* Violation banner — server-rendered when the bot's web component
   ever wants to surface a "you have a soft warning" notice without
   tearing down the page entirely. Hidden by default; the bot adds
   .is-visible to reveal. */
.aegis-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 99999;
  background: linear-gradient(
    180deg,
    rgba(196, 106, 90, 0.95),
    rgba(120, 32, 22, 0.95)
  );
  color: #fbeae3;
  font-family: 'JetBrains Mono', Consolas, ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  text-align: center;
  display: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.aegis-banner.is-visible { display: block; }
.aegis-banner b {
  color: #fff;
  letter-spacing: 0.15em;
  margin-right: 12px;
}
.aegis-banner a {
  color: #fbeae3;
  text-decoration: underline;
}

/* Honeypot link styling — invisible <a class="aegis-honey"> tags get
   sprinkled into pages by the bot. Only crawlers / scrapers chasing
   every link discover them. The href returns a 444 from the FastAPI
   honeypot route which logs the source for the violation ledger. */
a.aegis-honey {
  display: inline-block;
  width: 1px;
  height: 1px;
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Reduced-motion / print: never reveal aegis controls */
@media print {
  .aegis-banner { display: none !important; }
  [data-aegis="protected"] { color: transparent !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.aegis-tripped [data-aegis="protected"] {
    filter: blur(6px);
    text-shadow: none;
  }
}
