.simulator-summary-card {
  min-height: 100%;
}

/* ===========================================================
   Landing tiles styled as obvious buttons
   The v0.3 tile read as a dark card. These rules promote it to
   a clearly-clickable button with a corner badge containing a
   shape-based affordance (arrow / play glyph) that remains
   distinguishable for colorblind viewers. The badge label
   differs per action: "Start" for the two scenario tiles,
   "Open ->" for the comparison tile.
   =========================================================== */

.simulator-tile {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 22px 110px 22px 22px;
  border: 1px solid rgba(140, 200, 255, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(24, 44, 70, 0.85) 0%, rgba(12, 22, 38, 0.85) 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow:
    inset 0 0 0 1px rgba(140, 200, 255, 0.05),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.simulator-tile::after {
  content: ">";
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4dd2e0;
  border: 1px solid rgba(77, 210, 224, 0.58);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 28, 48, 0.9);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    color 0.2s ease;
}

.simulator-tile[data-action="show-ivd-n"]::after,
.simulator-tile[data-action="show-ivd-acp"]::after {
  content: ">";
}

.simulator-tile:hover,
.simulator-tile:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 240, 255, 0.85);
  box-shadow:
    inset 0 0 0 1px rgba(140, 240, 255, 0.22),
    0 14px 30px rgba(0, 0, 0, 0.32);
  outline: none;
}

.simulator-tile:hover::after,
.simulator-tile:focus-visible::after {
  background: rgba(77, 210, 224, 0.2);
  border-color: rgba(180, 240, 255, 0.95);
  color: #d2f8ff;
  transform: translateX(3px);
}

.simulator-tile strong {
  font-size: 1.08rem;
}

.simulator-tile span {
  color: var(--muted-strong);
  line-height: 1.6;
}

.claim-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(101, 153, 255, 0.2);
  background: rgba(9, 18, 31, 0.64);
  color: var(--muted-strong);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.claim-badge-controlled { border-color: rgba(77, 163, 255, 0.34); color: #cfe3ff; }
.claim-badge-governance { border-color: rgba(243, 171, 67, 0.34); color: #ffe2ba; }
.claim-badge-roadmap    { border-color: rgba(217, 126, 255, 0.34); color: #f2d0ff; }
.claim-badge-illustrative { border-color: rgba(98, 210, 162, 0.34); color: #d0f3e6; }
.claim-badge-1 { border-color: rgba(98, 210, 162, 0.34); color: #d0f3e6; }
.claim-badge-2 { border-color: rgba(77, 163, 255, 0.34); color: #cfe3ff; }
.claim-badge-3 { border-color: rgba(243, 171, 67, 0.34); color: #ffe2ba; }

.scenario-selector-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(101, 153, 255, 0.22);
  border-radius: 18px;
  background: rgba(7, 15, 28, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.scenario-selector-copy {
  display: grid;
  gap: 4px;
}

.scenario-selector-heading {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.scenario-selector-copy p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.94rem;
  line-height: 1.5;
}

.scenario-button {
  min-height: 46px;
  padding: 10px 18px;
  border: 2px solid rgba(101, 153, 255, 0.38);
  border-radius: 14px;
  background: rgba(12, 24, 42, 0.96);
  color: #f3f7fd;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.scenario-button:hover {
  border-color: rgba(77, 163, 255, 0.82);
  background: rgba(20, 42, 70, 0.98);
  color: #fff;
}

.scenario-button:focus-visible {
  border-color: rgba(77, 210, 224, 0.95);
  background: rgba(17, 38, 66, 0.98);
  color: #fff;
  outline: 3px solid rgba(77, 210, 224, 0.42);
  outline-offset: 3px;
}

.scenario-button.is-active {
  border-color: rgba(77, 163, 255, 0.98);
  background: linear-gradient(135deg, rgba(34, 92, 178, 0.98), rgba(26, 132, 220, 0.94));
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 12px 24px rgba(24, 108, 226, 0.22);
}

.simulator-boundary {
  color: var(--muted);
}

/* ===========================================================
   Authority lanes - colorblind-friendly with luminance contrast
   Brightened from v0.2. Each lane has a clear, non-color
   indicator via the shape glyphs rendered by visualCanvas.js.
   =========================================================== */

.authority-lane {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(101, 153, 255, 0.16);
  background: rgba(9, 18, 31, 0.58);
}

.authority-lane strong { font-size: 0.96rem; }
.authority-lane span { color: var(--muted-strong); line-height: 1.55; }

.authority-lane.is-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 14px 30px rgba(0, 0, 0, 0.24);
}

/* ALLOW - bright green, solid border, high luminance text */
.lane-allow {
  border-color: rgba(98, 210, 162, 0.55);
  border-left: 4px solid rgba(98, 210, 162, 0.95);
}
.lane-allow strong { color: #b8f5d4; }
rect.lane-allow {
  fill: rgba(28, 78, 56, 0.92);
  stroke: rgba(98, 210, 162, 0.85);
  stroke-width: 1.8;
}
.lane-allow.is-active {
  background: rgba(40, 110, 78, 0.95);
  border-color: rgba(98, 210, 162, 0.95);
}

/* READ_ONLY - bright blue, dashed border style */
.lane-read-only {
  border-color: rgba(77, 163, 255, 0.55);
  border-left: 4px dashed rgba(77, 163, 255, 0.95);
}
.lane-read-only strong { color: #c6dfff; }
rect.lane-read-only {
  fill: rgba(24, 56, 96, 0.92);
  stroke: rgba(77, 163, 255, 0.85);
  stroke-width: 1.8;
}
.lane-read-only.is-active {
  background: rgba(40, 80, 130, 0.95);
  border-color: rgba(77, 163, 255, 0.95);
}

/* SANDBOX - bright amber, doubled border */
.lane-sandbox {
  border-color: rgba(243, 171, 67, 0.55);
  border-left: 4px double rgba(243, 171, 67, 0.95);
}
.lane-sandbox strong { color: #ffd690; }
rect.lane-sandbox {
  fill: rgba(80, 54, 18, 0.92);
  stroke: rgba(243, 171, 67, 0.85);
  stroke-width: 1.8;
}
.lane-sandbox.is-active {
  background: rgba(110, 76, 26, 0.95);
  border-color: rgba(243, 171, 67, 0.95);
}

/* QUARANTINE - bright coral, heavy border for visual weight */
.lane-quarantine {
  border-color: rgba(255, 118, 100, 0.6);
  border-left: 5px solid rgba(255, 118, 100, 0.95);
}
.lane-quarantine strong { color: #ffc4b6; }
rect.lane-quarantine {
  fill: rgba(96, 36, 28, 0.94);
  stroke: rgba(255, 118, 100, 0.95);
  stroke-width: 2;
}
.lane-quarantine.is-active {
  background: rgba(132, 50, 38, 0.95);
  border-color: rgba(255, 118, 100, 1);
}

.lane-reject {
  border-color: rgba(255, 87, 87, 0.58);
  border-left: 5px solid rgba(255, 87, 87, 0.95);
}
.lane-reject strong { color: #ffd0d0; }
rect.lane-reject {
  fill: rgba(92, 28, 34, 0.94);
  stroke: rgba(255, 87, 87, 0.95);
  stroke-width: 2;
}
.lane-reject.is-active {
  background: rgba(125, 38, 46, 0.95);
  border-color: rgba(255, 87, 87, 1);
}

/* REVIEW_REQUIRED - muted purple, dotted border to read as roadmap */
.lane-review-required {
  border-color: rgba(217, 126, 255, 0.3);
  border-left: 3px dotted rgba(217, 126, 255, 0.7);
}
.lane-review-required strong { color: #e4c2f5; }
rect.lane-review-required {
  fill: rgba(54, 30, 64, 0.7);
  stroke: rgba(217, 126, 255, 0.55);
  stroke-width: 1.4;
}

.roadmap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(217, 126, 255, 0.18);
  color: #f2d0ff;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ===========================================================
   Audit entries
   =========================================================== */

.audit-entry {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(101, 153, 255, 0.14);
  background: rgba(9, 18, 31, 0.58);
}

.audit-entry + .audit-entry { margin-top: 12px; }

.audit-entry strong {
  display: block;
  margin-bottom: 6px;
}

.audit-entry-empty { border-style: dashed; }

.simulator-audit-copy { margin-top: 0; }

.simulator-stage-note {
  color: var(--muted-strong);
  line-height: 1.6;
}

/* ===========================================================
   Simulation canvas SVG primitives
   =========================================================== */

.sim-canvas-node {
  fill: rgba(10, 21, 38, 0.94);
  stroke: rgba(91, 147, 255, 0.34);
  stroke-width: 1.1;
}

.sim-canvas-node-default { fill: rgba(10, 21, 38, 0.94); }

.sim-canvas-node-active {
  stroke: rgba(140, 210, 255, 0.95);
  stroke-width: 1.8;
  filter: drop-shadow(0 0 10px rgba(120, 200, 255, 0.35));
}

.sim-canvas-label {
  fill: #e3edff;
  font-size: 11px;
  font-weight: 600;
}

.sim-canvas-flow {
  stroke: rgba(77, 163, 255, 0.32);
  stroke-width: 1.5;
  fill: none;
}

.sim-canvas-flow-active {
  stroke: rgba(140, 220, 255, 0.92);
  stroke-width: 1.8;
}

.sim-canvas-firewall-shell {
  fill: rgba(54, 60, 72, 0.94);
  stroke: rgba(196, 205, 220, 0.72);
  stroke-width: 1.2;
}

.sim-canvas-firewall-brick {
  fill: rgba(102, 112, 128, 0.88);
  stroke: rgba(22, 30, 44, 0.48);
  stroke-width: 0.5;
}

.sim-canvas-firewall-label {
  fill: #d7e1f0;
  font-size: 10px;
  font-weight: 700;
}

.sim-canvas-dashed { stroke-dasharray: 4 4; }

.sim-canvas-dot { transition: opacity 0.15s ease; }

.sim-canvas-dot-benign  { fill: rgba(113, 221, 163, 0.88); }
.sim-canvas-dot-hostile { fill: rgba(255, 117, 91, 0.95); }

.sim-canvas-relief-flow {
  stroke: rgba(98, 210, 162, 0.92);
  stroke-width: 2.2;
  stroke-dasharray: 6 4;
}

.sim-canvas-relief-dot {
  fill: rgba(98, 210, 162, 0.96);
  stroke: rgba(230, 255, 242, 0.95);
  stroke-width: 1.5;
}

.sim-canvas-accepted-panel {
  fill: rgba(18, 64, 46, 0.96);
  stroke: rgba(98, 210, 162, 0.7);
  stroke-width: 1.3;
}

.sim-canvas-boundary-line {
  stroke: rgba(255, 210, 122, 0.86);
  stroke-width: 2;
  stroke-dasharray: 8 6;
}

.sim-canvas-boundary-label {
  fill: #ffe6ad;
  font-size: 11px;
  font-weight: 700;
}

.sim-canvas-muted-flow {
  opacity: 0.22;
}

.sim-canvas-reject-ring {
  fill: rgba(255, 87, 87, 0.16);
  stroke: rgba(255, 87, 87, 0.95);
  stroke-width: 2.8;
}

.sim-canvas-reject-text {
  fill: #ffd7d7;
  font-size: 15px;
  font-weight: 800;
}

.sim-canvas-reject-label {
  fill: #ffd0d0;
  font-size: 11px;
  font-weight: 800;
}

.sim-canvas-rejected-panel {
  fill: rgba(74, 24, 31, 0.96);
  stroke: rgba(255, 87, 87, 0.75);
  stroke-width: 1.3;
}

.sim-canvas-envelope {
  fill: rgba(78, 166, 255, 0.08);
  stroke: rgba(110, 200, 255, 0.78);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
}

.sim-canvas-callout {
  fill: #e6f0ff;
  font-size: 11px;
  font-weight: 700;
}

.sim-canvas-panel {
  fill: rgba(9, 18, 31, 0.92);
  stroke: rgba(101, 153, 255, 0.32);
  stroke-width: 1;
}

.sim-canvas-panel-title {
  fill: #e3edff;
  font-size: 11px;
  font-weight: 700;
}

.sim-canvas-panel-text {
  fill: #b8caea;
  font-size: 10px;
}

.sim-canvas-lane-box {
  filter: drop-shadow(0 0 8px rgba(120, 190, 255, 0.12));
}

.sim-canvas-lane-box.is-active {
  stroke-width: 3;
  filter: drop-shadow(0 0 16px rgba(120, 210, 255, 0.42));
}

.sim-canvas-lane-label {
  fill: #f6faff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.sim-canvas-workflow-state {
  fill: rgba(9, 18, 31, 0.86);
  stroke: rgba(101, 153, 255, 0.28);
  stroke-width: 1.1;
}

.sim-canvas-workflow-state.is-active {
  stroke-width: 1.8;
}

.sim-canvas-workflow-state.is-permitted {
  fill: rgba(18, 54, 43, 0.94);
  stroke: rgba(98, 210, 162, 0.62);
}

.sim-canvas-workflow-state.is-blocked {
  fill: rgba(50, 28, 34, 0.94);
  stroke: rgba(255, 118, 100, 0.62);
}

.sim-canvas-audit-chip {
  fill: rgba(18, 48, 38, 0.96);
  stroke: rgba(98, 210, 162, 0.55);
  stroke-width: 1.2;
}

.sim-canvas-audit-text {
  fill: #d3f7e8;
  font-size: 11px;
  font-weight: 700;
}

.sim-canvas-roadmap {
  opacity: 0.62;
  stroke-dasharray: 5 4;
}

.sim-canvas-roadmap-text {
  fill: #f2d0ff;
  font-size: 10px;
  font-weight: 700;
}

.sim-canvas-legend {
  fill: #9fb3d8;
  font-size: 10px;
}

.sim-canvas-artifact {
  stroke: rgba(240, 248, 255, 0.95);
  stroke-width: 1.5;
}

.sim-canvas-artifact-allow       { fill: rgba(98, 210, 162, 0.98); }
.sim-canvas-artifact-read-only   { fill: rgba(77, 163, 255, 0.98); }
.sim-canvas-artifact-sandbox     { fill: rgba(243, 171, 67, 0.98); }
.sim-canvas-artifact-quarantine  { fill: rgba(255, 118, 100, 0.98); }
.sim-canvas-artifact-reject      { fill: rgba(255, 87, 87, 0.98); }

.trace-step.is-complete {
  border-color: rgba(98, 210, 162, 0.25);
  background: rgba(12, 24, 37, 0.78);
}

.trace-step-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.noscript-fallback { padding-top: 0; }

/* ===========================================================
   HIGH-CONTRAST PLAYBACK CONTROLS
   The faded buttons in v0.2 read as inactive against the dark
   background. These rules promote them to clearly interactive
   elements with WCAG-friendly contrast.
   =========================================================== */

/* Controlbar sits inside the canvas card, above the SVG.
   This keeps Play visible whenever the canvas is visible. */
.simulator-inline-toggle {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  white-space: nowrap;
}

.simulator-controls {
  align-items: center;
}

.simulator-controls .button-secondary {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(140, 200, 255, 0.55);
  background: rgba(20, 38, 64, 0.95);
  color: #f0f6ff;
  font-weight: 600;
  font-size: 0.84rem;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.simulator-controls .button-secondary:hover {
  background: rgba(32, 60, 100, 1);
  border-color: rgba(180, 220, 255, 0.85);
}

.simulator-controls .button-secondary:focus-visible {
  outline: 2px solid #8cd2ff;
  outline-offset: 2px;
}

.simulator-controls .button-secondary:active {
  transform: translateY(1px);
}

/* Play / Pause: still visually primary but not oversized */
.simulator-controls .button-secondary[data-action="play-pause"] {
  background: linear-gradient(180deg, #4dd2e0 0%, #2ba9b8 100%);
  border-color: rgba(140, 240, 255, 0.95);
  color: #001824;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(140, 240, 255, 0.22), 0 4px 12px rgba(45, 200, 220, 0.18);
}

.simulator-controls .button-secondary[data-action="play-pause"]:hover {
  background: linear-gradient(180deg, #6de2ed 0%, #34c2d2 100%);
  border-color: #b8f3ff;
}

.simulator-controls .button-secondary[data-action="play-pause"]::before {
  content: ">";
  display: inline-block;
  margin-right: 5px;
  font-size: 0.78rem;
}


/* Same treatment for the toolbar buttons at the top of the simulator */
.simulator-toolbar .simulator-toolbar-button,
.simulator-toolbar .simulator-toolbar-link {
  border: 1px solid rgba(140, 200, 255, 0.45);
  background: rgba(20, 38, 64, 0.85);
  color: #f0f6ff;
  font-weight: 600;
}

.simulator-toolbar .simulator-toolbar-button:hover,
.simulator-toolbar .simulator-toolbar-link:hover {
  background: rgba(32, 60, 100, 0.95);
  border-color: rgba(180, 220, 255, 0.7);
}

/* ===========================================================
   reduced motion respect
   =========================================================== */

@media (prefers-reduced-motion: reduce) {
  .simulator-controls .button-secondary,
  .simulator-toolbar .simulator-toolbar-button,
  .simulator-tile,
  .scenario-button,
  .authority-lane {
    transition: none;
  }
}

@media (max-width: 500px) {
  .simulator-tile {
    padding: 56px 20px 20px;
  }
  .simulator-tile::after {
    top: 16px;
    left: 18px;
    right: auto;
  }
}
