.inline-simulator {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid rgba(15, 31, 48, .14);
  background: #fff;
  box-shadow: 0 28px 70px rgba(28, 42, 60, .08);
}
.sim-stage {
  min-height: 680px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(15, 31, 48, .12);
  background:
    linear-gradient(175deg, transparent 0 58%, rgba(93, 112, 132, .08) 59% 60%, transparent 61%),
    repeating-linear-gradient(90deg, rgba(10, 29, 51, .035) 0 1px, transparent 1px 92px),
    #f6f4ef;
}
.sim-stage::after {
  content: "LIVE STATUS";
  position: absolute;
  left: 26px;
  bottom: 22px;
  color: #8492a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}
.sim-tower {
  width: 128px;
  text-align: center;
  filter: drop-shadow(0 24px 18px rgba(24, 39, 55, .22));
}
.sim-cap {
  height: 48px;
  margin: 0 7px -4px;
  position: relative;
  z-index: 3;
  border: 1px solid #d8dede;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, #cdd3d7, #fff 38%, #f2f3ef 66%, #aeb6ba);
  box-shadow: inset -7px 0 10px rgba(30,40,48,.18);
}
.sim-lamp {
  height: 82px;
  margin: 0 8px;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(13,18,23,.8);
  border-radius: 2px;
  background: #121820;
  box-shadow: inset 0 0 20px #05070a, 0 -1px 0 rgba(255,255,255,.2);
}
.sim-lens {
  position: absolute;
  inset: 0;
  opacity: .13;
  transition: opacity .18s, filter .18s;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 3px, transparent 3px 9px),
    var(--sim-color);
}
.sim-lens::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.36) 48%, transparent 62%);
  transform: skewX(-10deg);
}
.sim-lamp.on .sim-lens {
  opacity: 1;
  filter: saturate(1.2) brightness(1.2);
  box-shadow: 0 0 38px var(--sim-color), inset 0 0 24px rgba(255,255,255,.35);
}
.sim-red { --sim-color: #ff3d57; background-color: #2b1118; }
.sim-yellow { --sim-color: #ffc83d; background-color: #2b2512; }
.sim-green { --sim-color: #34e28b; background-color: #102a20; }
.sim-separator {
  height: 6px;
  margin: -2px 5px;
  position: relative;
  z-index: 2;
  background: linear-gradient(#242a30, #090c10);
}
.sim-controller {
  height: 96px;
  margin: -1px 7px 0;
  position: relative;
  z-index: 2;
  border: 1px solid #d9dede;
  border-radius: 3px 3px 10px 10px;
  background: linear-gradient(90deg, #b8c1c4, #fff 34%, #eef1ed 67%, #a9b3b7);
  box-shadow: inset -9px 0 13px rgba(50,62,68,.18);
}
.sim-controller::after {
  content: "AGENT BEACON";
  position: absolute;
  inset: 39px 0 auto;
  color: #647079;
  font: 700 7px/1 system-ui, sans-serif;
  letter-spacing: .12em;
}
.sim-buzzer {
  position: absolute;
  left: 50%;
  bottom: 15px;
  display: flex;
  gap: 3px;
  transform: translateX(-50%);
}
.sim-buzzer i { width: 3px; height: 3px; border-radius: 50%; background: #68737a; }
.sim-collar {
  width: 68px;
  height: 25px;
  margin: -4px auto 0;
  position: relative;
  z-index: 3;
  border: 1px solid #858f94;
  border-radius: 5px 5px 9px 9px;
  background: linear-gradient(90deg, #757f84, #e5e8e6 38%, #aeb6b8 72%, #606a70);
}
.sim-stem {
  width: 44px;
  height: 76px;
  margin: auto;
  border-left: 1px solid #eef1f1;
  border-right: 1px solid #626d73;
  background: linear-gradient(90deg, #576268, #d8dedd 20%, #f5f6f3 43%, #abb4b7 68%, #505b61);
}
.sim-base {
  height: 29px;
  border: 1px solid #727d83;
  border-radius: 7px 7px 12px 12px;
  background: linear-gradient(90deg, #5a656b, #d7dddc 30%, #f1f2ef 52%, #919b9f 78%, #4d585e);
  box-shadow: 0 14px 22px rgba(0,0,0,.18);
}
.sim-thinking .sim-yellow .sim-lens { animation: sim-breathe 1.35s ease-in-out infinite; }
.sim-approval .sim-red .sim-lens { animation: sim-approval-pulse .8s ease-in-out infinite; }
.sim-approval.sim-approving .sim-yellow .sim-lens { animation: sim-approval-out .85s ease-in-out forwards !important; }
.sim-error .sim-red .sim-lens { animation: sim-blink .62s ease-in-out infinite; }
.sim-done .sim-green .sim-lens { animation: sim-done 4.8s ease-in-out infinite; }
.sim-offline .sim-red .sim-lens { animation: sim-offline 2.2s ease-in-out infinite; }
.sim-all .sim-red .sim-lens { animation: sim-test-red 7.4s linear infinite; }
.sim-all .sim-yellow .sim-lens { animation: sim-test-yellow 7.4s linear infinite; }
.sim-all .sim-green .sim-lens { animation: sim-test-green 7.4s linear infinite; }
.sim-tower.sim-booting .sim-lamp.on .sim-lens { animation: sim-boot 1.1s cubic-bezier(.22,.75,.25,1) both !important; }
@keyframes sim-breathe { 0%,100% { opacity:.16; } 50% { opacity:1; } }
@keyframes sim-approval-pulse { 0%,100% { opacity:.22; } 50% { opacity:1; } }
@keyframes sim-approval-out { from { opacity:1; } to { opacity:.16; } }
@keyframes sim-blink { 0%,100% { opacity:.12; } 50% { opacity:1; } }
@keyframes sim-done {
  0%,12.5%,25% { opacity:.12; }
  6.25%,18.75%,31.25%,37.5%,100% { opacity:1; }
}
@keyframes sim-offline {
  0%,100% { opacity:.28; filter:saturate(1.05) brightness(.9); }
  50% { opacity:.88; filter:saturate(1.25) brightness(1.18); }
}
@keyframes sim-test-red {
  0%,13.514% { opacity:1; }
  20.27%,36.486%,68.919%,71.622%,74.324%,77.027%,93.243% { opacity:.12; }
  28.378%,70.27%,72.973%,75.676%,100% { opacity:1; }
}
@keyframes sim-test-yellow {
  0%,13.514% { opacity:1; }
  20.27%,36.486%,52.703%,77.027%,79.73%,82.432%,85.135%,93.243% { opacity:.12; }
  44.595%,78.378%,81.081%,83.784%,100% { opacity:1; }
}
@keyframes sim-test-green {
  0%,13.514% { opacity:1; }
  20.27%,52.703%,68.919%,85.135%,87.838%,90.541%,93.243% { opacity:.12; }
  60.811%,86.486%,89.189%,91.892%,100% { opacity:1; }
}
@keyframes sim-boot {
  0% { opacity:.16; filter:saturate(.7) brightness(.65); }
  100% { opacity:1; filter:saturate(1.2) brightness(1.2); }
}
.sim-panel {
  align-self: center;
  padding: 54px;
  color: #0b1420;
}
.sim-panel h3 { margin: 0 0 8px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.sim-intro { margin: 0 0 28px; color: #617084; line-height: 1.8; font-size: 14px; }
.sim-status-card {
  padding: 22px;
  margin-bottom: 24px;
  border: 1px solid rgba(15,31,48,.14);
  border-left: 4px solid #215bff;
  background: #f7f8fa;
}
.sim-eyebrow { color: #68778b; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
#simStatusName { margin: 8px 0 5px; font-size: 28px; font-weight: 900; }
#simStatusDesc { min-height: 44px; margin: 0; color: #617084; line-height: 1.65; }
.sim-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sim-buttons button {
  padding: 13px 12px;
  color: #1b2a3b;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(15,31,48,.16);
  border-radius: 4px;
  background: #fff;
  transition: transform .12s, border-color .12s, box-shadow .12s, background .12s;
}
.sim-buttons button i { font-style: normal; }
.sim-state-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 9px;
  border-radius: 50%;
  background: #7f8b99;
  box-shadow: 0 0 0 3px rgba(127,139,153,.1);
}
.sim-state-mark { margin-right: 8px; font-size: 12px; }
.dot-green { background: #28b874; }
.dot-yellow { background: #dcae2d; }
.dot-red { background: #df4057; }
.dot-approval { background: linear-gradient(90deg, #dcae2d 0 50%, #df4057 50%); }
.dot-offline { background: #526070; }
.sim-buttons button:hover { transform: translateY(-2px); border-color: #215bff; box-shadow: 0 8px 20px rgba(33,91,255,.1); }
.sim-buttons button.active { color: #fff; border-color: #215bff; background: #215bff; }
.sim-buttons button:disabled { cursor: not-allowed; opacity: .38; transform: none; box-shadow: none; }
#simApprove:not(:disabled) { color: #fff; border-color: #e04459; background: #e04459; }
.sim-wide { grid-column: 1 / -1; }
.sim-hint { margin: 20px 0 0; color: #68778b; font-size: 12px; line-height: 1.7; }
@media (max-width: 850px) {
  .inline-simulator { grid-template-columns: 1fr; }
  .sim-stage { min-height: 570px; border-right: 0; border-bottom: 1px solid rgba(15,31,48,.12); }
  .sim-panel { padding: 38px 30px 44px; }
}
@media (max-width: 520px) {
  .inline-simulator {
    grid-template-columns: minmax(132px, 38%) minmax(0, 62%);
    min-height: 560px;
  }
  .sim-stage {
    min-height: 560px;
    border-right: 1px solid rgba(15,31,48,.12);
    border-bottom: 0;
  }
  .sim-stage::after { display: none; }
  .sim-tower { transform: scale(.62); }
  .sim-panel {
    min-width: 0;
    padding: 18px 10px;
  }
  .sim-panel h3 {
    margin-bottom: 12px;
    font-size: 21px;
    line-height: 1.2;
  }
  .sim-intro,
  .sim-hint { display: none; }
  .sim-status-card {
    padding: 13px 12px;
    margin-bottom: 12px;
    border-left-width: 3px;
  }
  .sim-eyebrow { font-size: 9px; }
  #simStatusName {
    margin: 5px 0 3px;
    font-size: 18px;
    line-height: 1.25;
  }
  #simStatusDesc {
    min-height: 0;
    font-size: 10px;
    line-height: 1.45;
  }
  .sim-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .sim-buttons button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 5px;
    font-size: 12px;
    line-height: 1.25;
  }
  .sim-state-dot {
    width: 6px;
    height: 6px;
    margin-right: 5px;
    box-shadow: none;
  }
  .sim-state-mark { margin-right: 4px; font-size: 10px; }
  .sim-wide { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .sim-lens,
  .sim-tower.sim-booting .sim-lamp.on .sim-lens {
    animation: none !important;
    transition: none !important;
  }
}
