/* ZenoIngress — Scenario pages
   Blueprint diagram conventions + scenario page components.
   Loaded after main.css; reuses its CSS variables (navy/teal palette). */

/* ============================================================
   Blueprint diagrams (technical / schematic SVG)
   ============================================================ */
.blueprint {
  background: #0b1220;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}
.bp-node       { fill: #111c30; stroke: var(--accent-primary, #2dd4bf); stroke-width: 1.5; }
.bp-node-safe  { fill: #0e2018; stroke: var(--accent-success, #34d399); stroke-width: 1.5; }
.bp-node-danger{ fill: #2a1414; stroke: #f87171; stroke-width: 1.5; }
.bp-node-warn  { fill: #241d0c; stroke: #fbbf24; stroke-width: 1.5; }
.bp-node-muted { fill: #0d1525; stroke: rgba(148, 163, 184, 0.45); stroke-width: 1.25; }
.bp-boundary   { fill: none; stroke: rgba(45, 212, 191, 0.5); stroke-width: 1.25; stroke-dasharray: 6 5; }
.bp-boundary-eu{ fill: rgba(45, 212, 191, 0.04); stroke: rgba(45, 212, 191, 0.6); stroke-width: 1.5; stroke-dasharray: 8 5; }

.bp-label  { font-family: 'JetBrains Mono', monospace; font-size: 13px; fill: #e6edf6; font-weight: 500; }
.bp-sub    { font-family: 'JetBrains Mono', monospace; font-size: 11px; fill: #8aa0b4; }
.bp-tag    { font-family: 'JetBrains Mono', monospace; font-size: 10px; fill: #2dd4bf; letter-spacing: 0.02em; }
.bp-tag-red{ font-family: 'JetBrains Mono', monospace; font-size: 10px; fill: #f87171; }
.bp-title  { font-family: 'JetBrains Mono', monospace; font-size: 12px; fill: #cbd5e1; font-weight: 700; letter-spacing: 0.08em; }

.bp-flow        { stroke: var(--accent-primary, #2dd4bf); stroke-width: 1.75; fill: none; marker-end: url(#bp-arrow); }
.bp-flow-safe   { stroke: var(--accent-success, #34d399); stroke-width: 1.75; fill: none; marker-end: url(#bp-arrow-green); }
.bp-flow-blocked{ stroke: #f87171; stroke-width: 1.75; fill: none; stroke-dasharray: 5 4; marker-end: url(#bp-arrow-red); }
.bp-flow-dim    { stroke: rgba(148, 163, 184, 0.55); stroke-width: 1.5; fill: none; stroke-dasharray: 4 4; marker-end: url(#bp-arrow-dim); }

.bp-tick { fill: #34d399; font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; }
.bp-cross{ fill: #f87171; font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; }

/* ============================================================
   Scenario page scaffolding
   ============================================================ */
.scn-eyebrow {
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}
.scn-hero { min-height: auto; padding: 9rem 0 4rem 0; }
.scn-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; }
.scn-hero .hero-content { max-width: 820px; }
.scn-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-secondary); line-height: 1.6; }

.scn-narrow { max-width: 880px; }
.scn-diagram-wrap { max-width: 940px; }
.scn-caption {
  text-align: center;
  color: var(--text-muted);
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-family: var(--font-code);
}

/* Section heading kicker (small mono label above an h2) */
.scn-kicker {
  font-family: var(--font-code);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

/* ============================================================
   Code / manifest cards
   ============================================================ */
.code-card {
  background: #0b1220;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 12px;
  overflow: hidden;
  margin: 1.25rem 0 2rem 0;
  box-shadow: var(--shadow-md);
}
.code-card__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(45, 212, 191, 0.18);
}
.code-card__dots { display: flex; gap: 0.4rem; }
.code-card__dots span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.code-card__dots span:nth-child(1) { background: #f87171; }
.code-card__dots span:nth-child(2) { background: #fbbf24; }
.code-card__dots span:nth-child(3) { background: #34d399; }
.code-card__name {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-left: 0.3rem;
}
.code-card__tag {
  margin-left: auto;
  font-family: var(--font-code);
  font-size: 0.72rem;
  color: var(--accent-primary);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.code-card pre {
  margin: 0;
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
}
.code-card code {
  font-family: var(--font-code);
  font-size: 0.84rem;
  line-height: 1.65;
  color: #e6edf6;
  white-space: pre;
}
/* lightweight YAML/shell token coloring */
.tok-c   { color: #fbbf24; }            /* comments */
.tok-k   { color: #5eead4; }            /* keys / kinds */
.tok-s   { color: #a7f3d0; }            /* strings / values */
.tok-a   { color: #7dd3fc; }            /* annotations / flags */
.tok-d   { color: #f87171; }            /* danger / blocked */
.tok-p   { color: #64748b; }            /* prompt / punctuation */

/* ============================================================
   "What happens" walkthrough (numbered steps)
   ============================================================ */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  position: relative;
  padding: 0 0 1.5rem 3.25rem;
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.6;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 0.95rem;
  color: #06141a;
  background: var(--gradient-primary);
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.05rem;
  top: 2.1rem;
  bottom: 0.2rem;
  width: 2px;
  background: linear-gradient(var(--accent-primary), transparent);
  opacity: 0.4;
}
.steps li strong { color: var(--text-primary); }
.steps li code, .scn-narrow p code, .why code {
  font-family: var(--font-code);
  font-size: 0.86em;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 5px;
  padding: 0.05em 0.4em;
  color: #5eead4;
}
.step-verdict {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.1rem 0.55rem;
  border-radius: 6px;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.step-verdict.allow { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); }
.step-verdict.block { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); }

/* ============================================================
   Outcome metrics row
   ============================================================ */
.scn-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.scn-metric {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  text-align: center;
}
.scn-metric b {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--zeno-teal-light);
  margin-bottom: 0.3rem;
}
.scn-metric span { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   "Why ZenoIngress" one-liner callout
   ============================================================ */
.why {
  border-left: 3px solid var(--accent-primary);
  background: rgba(13, 148, 136, 0.07);
  border-radius: 0 12px 12px 0;
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
}
.why p { margin: 0; color: var(--text-primary); font-size: 1.1rem; }
.why .why-kicker {
  display: block;
  font-family: var(--font-code);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.4rem;
}

/* ============================================================
   "Run this yourself" terminal block
   ============================================================ */
.runit {
  background: #0a0f1a;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 12px;
  overflow: hidden;
  margin: 1.25rem 0;
}
.runit__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(45, 212, 191, 0.16);
  font-family: var(--font-code);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.runit pre { margin: 0; padding: 1.1rem 1.3rem; overflow-x: auto; }
.runit code {
  font-family: var(--font-code);
  font-size: 0.84rem;
  line-height: 1.7;
  color: #e6edf6;
  white-space: pre;
}
.runit .tok-p { color: #34d399; }   /* shell prompt $ */
.runit .out  { color: #8aa0b4; }    /* command output */
.runit .ok   { color: #34d399; }
.runit .bad  { color: #f87171; }

/* ============================================================
   Scenarios index — cards
   ============================================================ */
.scn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}
.scn-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.scn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.scn-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow-2xl);
}
.scn-card:hover::before { opacity: 1; }
.scn-card__num {
  font-family: var(--font-code);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--accent-primary);
  margin-bottom: 0.9rem;
}
.scn-card__icon { font-size: 2rem; margin-bottom: 0.9rem; }
.scn-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.scn-card__desc { color: var(--text-secondary); font-size: 0.98rem; margin-bottom: 1.25rem; flex-grow: 1; }
.scn-card__tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.25rem; }
.scn-card__tag {
  font-family: var(--font-code);
  font-size: 0.7rem;
  color: var(--accent-primary);
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
}
.scn-card__cta {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--accent-primary);
  font-size: 0.95rem;
}
.scn-card:hover .scn-card__cta { color: var(--accent-secondary); }

/* Pager between scenario pages */
.scn-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.scn-pager a {
  font-family: var(--font-code);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.scn-pager a:hover { color: var(--accent-primary); }

@media (max-width: 600px) {
  .code-card code, .runit code { font-size: 0.74rem; }
  .scn-hero { padding: 7rem 0 3rem 0; }
}
