/* Infrastructure and trades activity presentations -------------------- */

.infrastructure-game-shell {
  --infra-a: var(--beta-accent, #4767a8);
  --infra-b: var(--beta-accent-dark, #25365f);
  --infra-soft: var(--beta-soft, #eaf0ff);
  --infra-good: var(--beta-support, #147c73);
  --infra-good-dark: var(--beta-support-dark, #075d56);
}

.infrastructure-activity {
  position: relative;
  margin-block: 1rem;
  padding: clamp(0.8rem, 2.2vw, 1.15rem);
  overflow: hidden;
  color: var(--beta-ink, #35162d);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--infra-a) 14%, transparent), transparent 12rem),
    rgba(255, 255, 255, 0.93);
  border: 2px solid color-mix(in srgb, var(--infra-a) 30%, white);
  border-radius: 20px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--infra-b) 10%, transparent);
}

.infra-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.infra-heading small {
  color: var(--infra-a);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.infra-heading h3 {
  margin: 0.12rem 0 0;
  color: var(--infra-b);
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 1.1;
}

.infra-heading > span {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0.35rem 0.65rem;
  color: var(--infra-b);
  background: var(--infra-soft);
  border: 2px solid color-mix(in srgb, var(--infra-a) 35%, white);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
}

.infrastructure-activity button {
  min-width: 48px;
  min-height: 48px;
  padding: 0.55rem 0.7rem;
  color: var(--infra-b);
  background: white;
  border: 2px solid var(--infra-a);
  border-radius: 12px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--infra-b) 26%, transparent);
  cursor: pointer;
  touch-action: manipulation;
  font-family: var(--font-rounded, ui-rounded, system-ui, sans-serif);
  font-weight: 850;
  line-height: 1.18;
}

.infrastructure-activity button:not(:disabled):hover {
  color: white;
  background: var(--infra-a);
  transform: translateY(-1px);
}

.infrastructure-activity button:not(:disabled):active {
  box-shadow: none;
  transform: translateY(2px);
}

.infrastructure-activity button:is(.is-selected, [aria-pressed="true"]) {
  color: white;
  background: var(--infra-good-dark);
  border-color: var(--infra-good-dark);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--infra-good) 22%, transparent);
}

.infrastructure-activity button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.infrastructure-activity button:focus-visible {
  outline: 4px solid var(--beta-sun, #f0bd4b);
  outline-offset: 3px;
}

.infra-control-bank {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.8rem;
}

.infra-control {
  min-width: 0;
  margin: 0;
  padding: 0.65rem;
  color: var(--infra-b);
  background: var(--infra-soft);
  border: 2px solid color-mix(in srgb, var(--infra-a) 28%, white);
  border-radius: 14px;
}

.infra-control legend {
  padding-inline: 0.3rem;
  font-weight: 950;
}

.infra-control > div {
  display: grid;
  gap: 0.4rem;
}

.infra-setting {
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 0.4rem 0.5rem !important;
  box-shadow: none !important;
}

.infra-sequence-controls {
  margin-top: 0.75rem;
}

.infra-sequence-controls h4 {
  margin: 0 0 0.5rem;
  color: var(--infra-b);
  font-size: 0.88rem;
}

.infra-sequence-track {
  display: grid;
  gap: 0.48rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.infra-sequence-track li {
  display: grid;
  min-height: 105px;
  place-items: center;
  align-content: center;
  gap: 0.3rem;
  padding: 0.5rem;
  color: var(--infra-b);
  background: var(--infra-soft);
  border: 2px dashed color-mix(in srgb, var(--infra-a) 42%, white);
  border-radius: 12px;
  text-align: center;
}

.infra-sequence-track li.is-filled {
  background: color-mix(in srgb, var(--infra-good) 13%, white);
  border-color: var(--infra-good);
  border-style: solid;
}

.infra-sequence-track li > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: white;
  background: var(--infra-b);
  border-radius: 50%;
  font-weight: 900;
}

.infra-sequence-track li button {
  min-height: 48px !important;
  padding: 0.2rem 0.45rem;
  box-shadow: none;
}

.infra-token-tray {
  display: grid;
  gap: 0.48rem;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  margin-top: 0.6rem;
}

.infra-token-tray button {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  text-align: left;
}

.infra-token-tray button > span {
  font-size: 1.35rem;
}

.infra-token-tray p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem;
  background: var(--infra-soft);
  border-radius: 10px;
  text-align: center;
}

/* Agricultural engineering: smart irrigation -------------------------- */

.infra-irrigation {
  --infra-a: #25846b;
  --infra-b: #105548;
  --infra-soft: #e4f7ee;
}

.irrigation-greenhouse {
  position: relative;
  display: grid;
  min-height: 270px;
  place-items: end center;
  overflow: hidden;
  background:
    linear-gradient(105deg, transparent 0 48%, rgba(255,255,255,.7) 49% 52%, transparent 53%),
    linear-gradient(75deg, transparent 0 48%, rgba(255,255,255,.7) 49% 52%, transparent 53%),
    linear-gradient(#c7efff 0 57%, #825c3d 57%);
  border: 6px solid #568c75;
  border-radius: 28px 28px 14px 14px;
}

.irrigation-greenhouse::before {
  position: absolute;
  inset: 15px 12% 38%;
  content: "";
  border: 4px solid rgba(255,255,255,.82);
  border-bottom: 0;
  border-radius: 80px 80px 0 0;
}

.greenhouse-sun {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 8%;
  font-size: 2.8rem;
  filter: drop-shadow(0 0 18px rgba(255,215,76,.75));
}

.greenhouse-sun.is-gentle {
  filter: drop-shadow(0 0 10px rgba(255,215,76,.42));
}

.greenhouse-pipe {
  position: absolute;
  z-index: 3;
  right: 8%;
  bottom: 42%;
  left: 8%;
  height: 11px;
  background: #405b69;
  border: 3px solid #d1e6ed;
  border-radius: 999px;
}

.greenhouse-pipe i {
  position: absolute;
  top: 8px;
  width: 10px;
  height: 10px;
  opacity: 0.35;
  background: #37bced;
  border-radius: 50% 50% 60% 40%;
  transform: rotate(45deg);
}

.greenhouse-pipe i:nth-child(1) { left: 12%; }
.greenhouse-pipe i:nth-child(2) { left: 37%; }
.greenhouse-pipe i:nth-child(3) { left: 62%; }
.greenhouse-pipe i:nth-child(4) { left: 87%; }

.infra-irrigation[data-delivery="drip"] .greenhouse-pipe i {
  opacity: 1;
  animation: infra-drip 1.6s ease-in infinite;
}

.infra-irrigation[data-delivery="spray"] .greenhouse-pipe i {
  width: 22px;
  opacity: .8;
  animation: infra-spray 1.2s ease-in-out infinite alternate;
}

.infra-irrigation[data-delivery="flood"] .soil-bed {
  box-shadow: inset 0 -20px rgba(54, 169, 218, .65);
}

.crop-row {
  position: relative;
  z-index: 2;
  display: grid;
  width: 88%;
  grid-template-columns: repeat(4, 1fr);
  padding-bottom: 18%;
  font-size: 2.7rem;
  text-align: center;
}

.soil-bed {
  position: absolute;
  right: 5%;
  bottom: 7%;
  left: 5%;
  height: 30%;
  background: repeating-linear-gradient(90deg, #6c452f 0 23%, #886348 23% 25%);
  border: 4px solid #573825;
  border-radius: 10px;
}

.soil-sensor {
  position: absolute;
  z-index: 4;
  bottom: 16%;
  left: 5%;
  display: grid;
  gap: .15rem;
  padding: .4rem;
  color: #173e45;
  background: #edf4f5;
  border: 3px solid #5e7a7e;
  border-radius: 9px;
  font-size: .62rem;
}

.soil-sensor.is-on {
  background: #d9fff4;
  border-color: #23846b;
  box-shadow: 0 0 12px #47c7a6;
}

.irrigation-status {
  position: absolute;
  z-index: 4;
  right: .65rem;
  bottom: .55rem;
  padding: .28rem .4rem;
  color: white;
  background: rgba(38,44,51,.72);
  border-radius: 6px;
  font-size: .65rem;
}

/* Aircraft technician: visual hangar hotspots -------------------------- */

.infra-aircraft-hangar {
  --infra-a: #47748e;
  --infra-b: #263f53;
  --infra-soft: #e6f0f5;
}

.aircraft-hangar-scene {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255,255,255,.1) 48% 52%, transparent 52%),
    linear-gradient(#64798b 0 74%, #49535d 74%);
  border: 7px solid #394a58;
  border-radius: 18px;
}

.hangar-door {
  position: absolute;
  inset: 8% 5% 23%;
  background: repeating-linear-gradient(90deg, #8b9aa6 0 14%, #768895 14% 16%);
  border: 5px solid #2d3d49;
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
}

.aircraft-silhouette {
  position: absolute;
  z-index: 2;
  top: 30%;
  right: 12%;
  left: 12%;
  color: #eef8fb;
  text-shadow: 0 6px #405364;
  font-size: clamp(7rem, 22vw, 12rem);
  line-height: 1;
  text-align: center;
  transform: rotate(-3deg);
}

.aircraft-hotspot {
  position: absolute;
  z-index: 4;
  display: grid;
  width: min(190px, 38%);
  min-height: 70px !important;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .4rem;
  padding: .45rem !important;
  color: #243d50 !important;
  background: rgba(255,255,255,.94) !important;
  border-color: #e4c850 !important;
  text-align: left;
}

.aircraft-hotspot > span {
  grid-row: 1 / -1;
  font-size: 1.35rem;
}

.aircraft-hotspot small {
  font-size: .65rem;
}

.aircraft-hotspot.is-selected {
  color: white !important;
  background: #9e3f4d !important;
  border-color: white !important;
}

.hotspot-panel { top: 8%; left: 3%; }
.hotspot-light { top: 8%; right: 3%; }
.hotspot-trace { bottom: 17%; left: 3%; }
.hotspot-paint { right: 3%; bottom: 17%; }

.aircraft-release {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  padding: .55rem;
  color: white;
  background: #36576a;
  font-size: .75rem;
  letter-spacing: .1em;
  text-align: center;
}

.aircraft-release.is-held {
  background: #8b3443;
}

/* Database administrator: schema routing ------------------------------- */

.infra-data-vault {
  --infra-a: #6955a1;
  --infra-b: #3a2c67;
  --infra-soft: #efebfb;
}

.data-schema-board {
  display: grid;
  min-height: 310px;
  grid-template-columns: minmax(180px, .8fr) 55px minmax(210px, 1.2fr);
  align-items: center;
  gap: .5rem;
  padding: .75rem;
  background:
    linear-gradient(rgba(95,78,145,.09) 1px, transparent 1px),
    #f7f9ff;
  background-size: 18px 18px;
  border: 5px solid #657197;
  border-radius: 18px;
}

.data-record-stream,
.data-tables {
  display: grid;
  gap: .5rem;
}

.data-record-stream h4 {
  margin: 0;
  color: var(--infra-b);
  font-size: .82rem;
}

.data-record-card {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .5rem;
  text-align: left;
}

.data-record-card > span {
  grid-row: 1 / -1;
  font-size: 1.35rem;
}

.schema-links {
  display: grid;
  gap: 2.2rem;
}

.schema-links i {
  position: relative;
  height: 5px;
  background: #7c69ad;
  border-radius: 999px;
}

.schema-links i::after {
  position: absolute;
  top: -5px;
  right: -1px;
  content: "▶";
  color: #7c69ad;
  font-size: .75rem;
}

.data-table {
  display: grid;
  min-width: 0;
  padding: 0 !important;
  overflow: hidden;
  border-color: #5f5793 !important;
  text-align: left;
}

.table-title,
.table-row {
  padding: .38rem .5rem;
}

.table-title {
  color: white;
  background: #4b4477;
  font-weight: 900;
}

.table-row {
  border-top: 1px solid #c7c1e0;
  font-size: .72rem;
}

.data-table.is-filled {
  border-color: var(--infra-good) !important;
  box-shadow: inset 5px 0 var(--infra-good);
}

/* Electronics technician: sensor PCB ---------------------------------- */

.infra-sensor-board {
  --infra-a: #4f7485;
  --infra-b: #293f4a;
  --infra-soft: #e8f0f2;
}

.sensor-board-scene {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  color: #e6ffef;
  background:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.13) 2px, transparent 3px),
    #1d674e;
  background-size: 28px 28px;
  border: 8px solid #43565b;
  border-radius: 18px;
  box-shadow: inset 0 0 28px rgba(0,0,0,.24);
}

.board-traces {
  position: absolute;
  inset: 8%;
}

.board-traces i {
  position: absolute;
  height: 5px;
  background: #d7b64a;
  border-radius: 999px;
}

.board-traces i:nth-child(1) { top: 22%; right: 15%; left: 10%; transform: rotate(8deg); }
.board-traces i:nth-child(2) { top: 51%; right: 8%; left: 22%; transform: rotate(-12deg); }
.board-traces i:nth-child(3) { bottom: 18%; right: 26%; left: 7%; }
.board-traces i:nth-child(4) { top: 9%; bottom: 10%; left: 50%; width: 5px; height: auto; }

.board-chip {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 88px;
  min-height: 64px;
  place-items: center;
  align-content: center;
  padding: .35rem;
  color: #15292c;
  background: #b6c3bd;
  border: 4px solid #374a47;
  border-radius: 8px;
  font-size: .62rem;
  text-align: center;
}

.board-chip.is-ready {
  color: #0c4f42;
  background: #baffdb;
  border-color: #2aa27f;
  box-shadow: 0 0 14px rgba(98,255,196,.72);
}

.chip-power { top: 12%; left: 7%; }
.chip-inspect { top: 12%; right: 7%; }
.chip-measure { top: 42%; left: calc(50% - 44px); }
.chip-repair { bottom: 10%; left: 12%; }
.chip-document { right: 12%; bottom: 10%; }

.sensor-board-scene > strong {
  position: absolute;
  right: .55rem;
  bottom: .4rem;
  font-size: .58rem;
  letter-spacing: .1em;
}

/* GIS technician: live map layers ------------------------------------- */

.infra-gis-map {
  --infra-a: #4f66a0;
  --infra-b: #2d3f70;
  --infra-soft: #e9edfb;
}

.gis-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 1.25fr) minmax(180px, .75fr);
  gap: .7rem;
}

.gis-canvas {
  position: relative;
  min-height: 315px;
  overflow: hidden;
  background:
    linear-gradient(35deg, transparent 45%, #d4cfb5 46% 54%, transparent 55%),
    linear-gradient(-42deg, transparent 46%, #d4cfb5 47% 53%, transparent 54%),
    #e9e2c6;
  border: 6px solid #66717d;
  border-radius: 14px;
}

.map-blocks {
  position: absolute;
  inset: 8%;
  display: grid;
  gap: .65rem;
  grid-template-columns: repeat(3, 1fr);
}

.map-blocks i {
  background: #c5d4b6;
  border: 3px solid #869579;
  border-radius: 7px;
}

.flood-layer,
.transit-layer,
.canopy-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .25s;
}

.flood-layer.is-visible,
.transit-layer.is-visible,
.canopy-layer.is-visible {
  opacity: 1;
}

.flood-layer {
  clip-path: polygon(0 68%, 22% 61%, 40% 69%, 61% 56%, 82% 64%, 100% 53%, 100% 100%, 0 100%);
  background: rgba(38,154,219,.48);
}

.transit-layer span,
.canopy-layer span {
  position: absolute;
  font-size: 1.5rem;
}

.transit-layer span:nth-child(1) { top: 22%; left: 20%; }
.transit-layer span:nth-child(2) { top: 46%; left: 58%; }
.transit-layer span:nth-child(3) { right: 15%; bottom: 18%; }
.canopy-layer span:nth-child(1) { top: 15%; right: 22%; }
.canopy-layer span:nth-child(2) { bottom: 25%; left: 29%; }
.canopy-layer span:nth-child(3) { top: 52%; right: 38%; }

.gis-canvas > strong {
  position: absolute;
  z-index: 4;
  top: .5rem;
  left: .6rem;
  padding: .25rem .35rem;
  color: white;
  background: rgba(45,63,112,.78);
  border-radius: 5px;
  font-size: .62rem;
  letter-spacing: .08em;
}

.gis-layer-panel {
  display: grid;
  align-content: start;
  gap: .48rem;
}

.gis-layer-panel h4 {
  margin: 0;
  color: var(--infra-b);
  font-size: .82rem;
}

.gis-layer,
.gis-question {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .48rem;
  text-align: left;
}

.gis-layer > span,
.gis-question > span {
  grid-row: 1 / -1;
  font-size: 1.3rem;
}

.gis-question-dock {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: .7rem;
}

.gis-question.is-filled {
  color: var(--infra-good-dark);
  background: #e2fff7;
  border-color: var(--infra-good);
}

/* HVAC technician: airflow path --------------------------------------- */

.infra-hvac {
  --infra-a: #447894;
  --infra-b: #294c61;
  --infra-soft: #e7f2f7;
}

.hvac-system {
  display: grid;
  min-height: 230px;
  grid-template-columns: minmax(110px, .8fr) 35px minmax(90px, .65fr) 35px minmax(100px, .7fr) 35px minmax(90px, .65fr);
  align-items: center;
  gap: .25rem;
  padding: .75rem;
  color: #23485e;
  background:
    linear-gradient(rgba(57,117,146,.08) 1px, transparent 1px),
    #f0f9fc;
  background-size: 18px 18px;
  border: 5px solid #6f8e9f;
  border-radius: 18px;
}

.hvac-classroom,
.hvac-thermostat,
.hvac-filter,
.hvac-vent {
  display: grid;
  min-height: 115px;
  place-items: center;
  align-content: center;
  gap: .2rem;
  padding: .45rem;
  background: white;
  border: 3px solid #77929e;
  border-radius: 12px;
  text-align: center;
}

.hvac-classroom > span {
  font-size: 2.2rem;
}

.hvac-classroom small,
.hvac-classroom strong,
.hvac-thermostat strong,
.hvac-filter strong,
.hvac-vent strong {
  font-size: .66rem;
}

.hvac-thermostat > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  background: #d9e0e1;
  border: 4px solid #65747b;
  border-radius: 50%;
  font-weight: 950;
}

.hvac-thermostat.is-ready > span {
  color: #075d56;
  background: #d8fff5;
  border-color: #2a9a82;
}

.hvac-filter {
  grid-template-columns: repeat(3, 7px);
  justify-content: center;
}

.hvac-filter i {
  width: 7px;
  height: 62px;
  background: #8a765d;
}

.hvac-filter.is-ready i {
  background: #b7dce5;
}

.hvac-filter strong {
  grid-column: 1 / -1;
}

.hvac-vent > span {
  color: #82969e;
  font-size: 2.5rem;
}

.hvac-vent.is-flowing > span {
  color: #41a9d2;
  animation: infra-airflow 1.1s ease-in-out infinite alternate;
}

.hvac-duct {
  height: 22px;
  background: #9aaab0;
  border: 3px solid #61737a;
  border-radius: 5px;
}

.hvac-system:has(.hvac-vent.is-flowing) .hvac-duct {
  background: repeating-linear-gradient(90deg, #8edbf1 0 10px, #d6f5fc 10px 18px);
  animation: infra-current .8s linear infinite;
}

/* Industrial machinery: live sensor wall ------------------------------- */

.infra-factory-line {
  --infra-a: #65717b;
  --infra-b: #343e47;
  --infra-soft: #edf0f2;
}

.factory-scene {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  color: #f2f7fa;
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    #313a42;
  background-size: 20px 20px;
  border: 7px solid #4e5d68;
  border-radius: 18px;
}

.factory-machine {
  position: absolute;
  top: 13%;
  left: 6%;
  display: grid;
  width: 170px;
  min-height: 150px;
  place-items: center;
  align-content: center;
  background: #687985;
  border: 6px solid #9aabb5;
  border-radius: 14px;
}

.factory-machine > span {
  font-size: 4rem;
  animation: infra-gear 2.5s linear infinite;
}

.infra-factory-line[data-flags]:not([data-flags="0"]) .factory-machine > span {
  animation-play-state: paused;
}

.factory-machine i {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 15px;
  height: 15px;
  background: #42d29c;
  border-radius: 50%;
  box-shadow: 0 0 10px #42d29c;
}

.infra-factory-line[data-flags]:not([data-flags="0"]) .factory-machine i {
  background: #f15c6d;
  box-shadow: 0 0 10px #f15c6d;
}

.factory-conveyor {
  position: absolute;
  right: 5%;
  bottom: 14%;
  left: 5%;
  display: flex;
  height: 55px;
  align-items: center;
  justify-content: space-around;
  background: repeating-linear-gradient(90deg, #55636d 0 22px, #84939d 22px 26px);
  border: 5px solid #a3afb6;
  border-radius: 10px;
}

.factory-conveyor span {
  font-size: 2rem;
  animation: infra-conveyor 2.6s linear infinite;
}

.infra-factory-line[data-flags]:not([data-flags="0"]) .factory-conveyor span {
  animation-play-state: paused;
}

.factory-sensors {
  position: absolute;
  top: 8%;
  right: 4%;
  display: grid;
  width: min(55%, 430px);
  gap: .45rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.factory-sensor {
  display: grid;
  min-width: 0;
  min-height: 82px !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .4rem;
  text-align: left;
}

.factory-sensor > span {
  grid-row: 1 / -1;
  font-size: 1.25rem;
}

.factory-sensor > i {
  width: 12px;
  height: 12px;
  background: #39c795;
  border-radius: 50%;
  box-shadow: 0 0 8px #39c795;
}

.factory-sensor.is-selected > i {
  background: #ffdf65;
  box-shadow: 0 0 8px #ffdf65;
}

.factory-stop {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: .5rem;
  color: white;
  background: #3b6560;
  font-size: .68rem;
  letter-spacing: .1em;
  text-align: center;
}

.factory-stop.is-paused {
  background: #943b49;
}

/* IT support: interactive desktop ------------------------------------- */

.infra-help-desk {
  --infra-a: #5e60a3;
  --infra-b: #353660;
  --infra-soft: #edecfb;
}

.help-desk-desktop {
  overflow: hidden;
  color: #263651;
  background: #dce8f1;
  border: 7px solid #3b4656;
  border-radius: 17px;
}

.desktop-topbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: .35rem;
  padding: .4rem .6rem;
  color: white;
  background: #343d53;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.desktop-topbar span {
  margin-right: auto;
}

.desktop-topbar i {
  width: 12px;
  height: 12px;
  background: #e1bd4f;
  border-radius: 50%;
}

.desktop-topbar i:nth-of-type(2) { background: #53bd92; }
.desktop-topbar i:nth-of-type(3) { background: #df6574; }

.ticket-windows {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: .75rem;
}

.support-ticket {
  display: grid;
  min-width: 0;
  min-height: 150px !important;
  align-content: center;
  gap: .25rem;
  text-align: left;
}

.support-ticket > span {
  font-size: 2rem;
}

.support-ticket small {
  margin-top: .25rem;
  padding: .25rem;
  background: color-mix(in srgb, var(--infra-soft) 72%, white);
  border-radius: 5px;
}

.support-toolbar {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: .75rem;
  background: #c3d2df;
  border-top: 3px solid #697a8a;
}

.support-tool {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .45rem;
  text-align: left;
}

.support-tool > span {
  grid-row: 1 / -1;
  font-size: 1.25rem;
}

.support-tool.is-filled {
  color: var(--infra-good-dark);
  background: #e1fff7;
  border-color: var(--infra-good);
}

/* Logistician: shipment control tower --------------------------------- */

.infra-supply-chain {
  --infra-a: #4f7194;
  --infra-b: #2b4864;
  --infra-soft: #e8f0f6;
}

.supply-map {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, rgba(76,142,92,.24), transparent 17%),
    radial-gradient(circle at 75% 70%, rgba(76,142,92,.2), transparent 20%),
    #e7e1c7;
  border: 6px solid #6d7d84;
  border-radius: 18px;
}

.supply-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: .15rem;
  font-size: 2.5rem;
}

.supply-node small {
  padding: .2rem .3rem;
  color: white;
  background: #314c63;
  border-radius: 5px;
  font-size: .62rem;
}

.warehouse { top: 17%; left: 8%; }
.rail { top: 42%; left: 45%; }
.center { right: 8%; bottom: 13%; }

.supply-route {
  position: absolute;
  height: 7px;
  background: repeating-linear-gradient(90deg, #4d6575 0 12px, transparent 12px 18px);
  transform-origin: left center;
}

.route-one { top: 36%; left: 19%; width: 37%; transform: rotate(16deg); }
.route-two { top: 58%; left: 55%; width: 33%; transform: rotate(17deg); }

.supply-truck {
  position: absolute;
  z-index: 3;
  top: 43%;
  left: 34%;
  font-size: 2rem;
  animation: infra-truck 5s ease-in-out infinite alternate;
}

.supply-control-grid {
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .7rem;
}

.supply-control-grid > div {
  display: grid;
  align-content: start;
  gap: .45rem;
}

.supply-control-grid h4 {
  margin: 0;
  color: var(--infra-b);
  font-size: .82rem;
}

.supply-alert,
.supply-team {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: .12rem .45rem;
  text-align: left;
}

.supply-alert > span,
.supply-team > span {
  grid-row: 1 / -1;
  font-size: 1.3rem;
}

.supply-team.is-filled {
  color: var(--infra-good-dark);
  background: #e1fff7;
  border-color: var(--infra-good);
}

/* Packaging engineer: cutaway and drop rig ----------------------------- */

.infra-drop-lab {
  --infra-a: #b66a30;
  --infra-b: #69411f;
  --infra-soft: #fff0df;
}

.drop-test-rig {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  background:
    linear-gradient(rgba(182,106,48,.07) 1px, transparent 1px),
    #f7f3e9;
  background-size: 20px 20px;
  border: 6px solid #8b755f;
  border-radius: 18px;
}

.drop-scale {
  position: absolute;
  top: 10%;
  bottom: 16%;
  left: 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  padding-left: .6rem;
  border-left: 4px solid #6e6258;
  font-size: .65rem;
  font-weight: 900;
}

.drop-scale i {
  width: 15px;
  flex: 1;
  background: repeating-linear-gradient(0deg, #6e6258 0 2px, transparent 2px 20px);
}

.package-cutaway {
  position: absolute;
  top: 17%;
  left: 50%;
  display: grid;
  place-items: center;
  gap: .35rem;
  transform: translateX(-50%);
  transition: transform .3s;
}

.infra-drop-lab[data-fit="tight"] .package-cutaway { transform: translateX(-50%) scale(.78); }
.infra-drop-lab[data-fit="oversize"] .package-cutaway { transform: translateX(-50%) scale(1.18); }

.package-shell {
  display: grid;
  width: 190px;
  height: 180px;
  place-items: center;
  background: #bd8a52;
  border: 8px solid #76502e;
  border-radius: 8px;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.16);
}

.infra-drop-lab[data-shell="mixed"] .package-shell {
  background: linear-gradient(135deg, #9b789b, #688b99);
}

.infra-drop-lab[data-shell="open"] .package-shell {
  background: transparent;
  border-style: dashed;
}

.package-cushion {
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 22px;
}

.infra-drop-lab[data-cushion="paper"] .package-cushion {
  background: repeating-linear-gradient(45deg, #ded3b7 0 8px, #c2b594 8px 12px);
  border: 6px double #8c7c5c;
}

.infra-drop-lab[data-cushion="loose"] .package-cushion {
  background: radial-gradient(circle, #e9d989 0 8px, transparent 9px);
  background-size: 24px 24px;
  border: 3px dashed #ad9148;
}

.package-cushion b {
  font-size: 3.3rem;
}

.package-cutaway > strong {
  padding: .25rem .4rem;
  color: white;
  background: #604c38;
  border-radius: 5px;
  font-size: .68rem;
}

.package-shadow {
  position: absolute;
  bottom: 12%;
  left: 50%;
  width: 210px;
  height: 25px;
  background: rgba(70,53,39,.28);
  border-radius: 50%;
  transform: translateX(-50%);
}

.drop-result {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: .55rem;
  color: white;
  background: #6c625a;
  font-size: .68rem;
  letter-spacing: .1em;
  text-align: center;
}

.drop-result.is-ready {
  background: var(--infra-good-dark);
}

/* Structural engineer: dynamic frame ---------------------------------- */

.infra-bridge-frame {
  --infra-a: #4b7089;
  --infra-b: #29475b;
  --infra-soft: #e7f0f4;
}

.bridge-frame-scene {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  background: linear-gradient(#b9e8fb 0 65%, #71bfd9 65%);
  border: 6px solid #587080;
  border-radius: 18px;
}

.frame-deck {
  position: absolute;
  z-index: 4;
  top: 47%;
  right: 10%;
  left: 10%;
  height: 24px;
  background: #4d5960;
  border: 5px solid #262f34;
  transition: height .25s, top .25s;
}

.infra-bridge-frame[data-beam="shallow"] .frame-deck { height: 12px; top: 50%; }
.infra-bridge-frame[data-beam="deep"] .frame-deck { height: 38px; top: 43%; }

.frame-braces {
  position: absolute;
  z-index: 3;
  top: 23%;
  right: 12%;
  left: 12%;
  height: 110px;
}

.frame-braces i {
  position: absolute;
  bottom: 0;
  width: 7px;
  height: 100%;
  background: #56656c;
  transform-origin: bottom;
}

.frame-braces i:nth-child(1) { left: 12%; }
.frame-braces i:nth-child(2) { left: 38%; }
.frame-braces i:nth-child(3) { right: 38%; }
.frame-braces i:nth-child(4) { right: 12%; }

.infra-bridge-frame[data-brace="none"] .frame-braces i {
  opacity: 0;
}

.infra-bridge-frame[data-brace="diagonal"] .frame-braces i:nth-child(odd) {
  transform: rotate(51deg);
}

.infra-bridge-frame[data-brace="diagonal"] .frame-braces i:nth-child(even) {
  transform: rotate(-51deg);
}

.frame-support {
  position: absolute;
  z-index: 3;
  top: 55%;
  width: 36px;
  height: 105px;
  background: #6c6b65;
  border: 5px solid #3f413f;
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
}

.support-left { left: 12%; }
.support-center { left: calc(50% - 18px); }
.support-right { right: 12%; }

.infra-bridge-frame[data-support="one-end"] :is(.support-center, .support-right),
.infra-bridge-frame[data-support="center"] :is(.support-left, .support-right),
.infra-bridge-frame[data-support="both"] .support-center {
  display: none;
}

.frame-river {
  position: absolute;
  right: 0;
  bottom: 5%;
  left: 0;
  color: rgba(255,255,255,.7);
  font-size: 2rem;
  letter-spacing: 1rem;
  white-space: nowrap;
  animation: infra-river 2s linear infinite;
}

.bridge-frame-scene > strong {
  position: absolute;
  top: .55rem;
  left: .65rem;
  padding: .25rem .35rem;
  color: white;
  background: rgba(41,71,91,.78);
  border-radius: 5px;
  font-size: .62rem;
  letter-spacing: .1em;
}

/* Traffic engineer: street audit route -------------------------------- */

.infra-street-audit {
  --infra-a: #258071;
  --infra-b: #12554d;
  --infra-soft: #e4f5f0;
}

.street-audit-layout {
  display: grid;
  align-items: start;
  gap: .75rem;
  grid-template-columns: minmax(250px, 1fr) minmax(180px, .48fr);
}

.street-grid {
  display: grid;
  width: min(100%, 520px);
  justify-self: center;
  gap: 5px;
  grid-template-columns: repeat(var(--street-grid), minmax(48px, 1fr));
  padding: .65rem;
  background: #4f555b;
  border: 6px solid #707b72;
  border-radius: 18px;
}

.street-cell {
  position: relative;
  display: grid;
  min-width: 48px;
  min-height: 70px;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  overflow: hidden;
  color: #344b3d;
  background:
    linear-gradient(90deg, transparent 47%, rgba(255,255,255,.75) 47% 53%, transparent 53%),
    #667077;
  border: 3px solid transparent;
  border-radius: 8px;
}

.street-cell::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 19%;
  content: "";
  background: #8eb67d;
}

.street-cell small,
.street-cell strong {
  position: relative;
  z-index: 2;
}

.street-cell small {
  padding: .1rem .25rem;
  color: white;
  background: rgba(0,0,0,.45);
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 900;
}

.street-cell strong {
  font-size: 1.25rem;
}

.street-cell.is-goal {
  border-color: #f0bd4b;
}

.street-cell.is-closed {
  background: #77444b;
  border-color: white;
}

.street-cell.is-visited {
  background: var(--infra-good-dark);
}

.street-cell.is-current {
  z-index: 2;
  background: var(--infra-a);
  border-color: white;
  box-shadow: 0 0 0 4px #f0bd4b;
  animation: infra-pulse 1.3s ease-in-out infinite;
}

.street-audit-console {
  display: grid;
  gap: .65rem;
}

.street-audit-console ol {
  display: grid;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.street-audit-console li {
  display: grid;
  min-height: 52px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  padding: .45rem;
  color: var(--infra-b);
  background: var(--infra-soft);
  border: 2px solid color-mix(in srgb, var(--infra-a) 26%, white);
  border-radius: 10px;
}

.street-audit-console li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  background: var(--infra-b);
  border-radius: 50%;
  font-weight: 900;
}

.street-audit-console li.is-complete {
  background: #e0fff7;
  border-color: var(--infra-good);
}

.street-dpad {
  display: grid;
  width: min(100%, 210px);
  justify-self: center;
  gap: .35rem;
  grid-template-areas:
    ". up ."
    "left . right"
    ". down .";
  grid-template-columns: repeat(3, minmax(52px, 1fr));
}

.street-dpad button {
  padding: .3rem;
  font-size: 1.35rem;
}

.street-dpad button[data-direction="up"] { grid-area: up; }
.street-dpad button[data-direction="left"] { grid-area: left; }
.street-dpad button[data-direction="right"] { grid-area: right; }
.street-dpad button[data-direction="down"] { grid-area: down; }

/* Animation and responsive safeguards --------------------------------- */

@keyframes infra-drip {
  from { opacity: 0; transform: translateY(-4px) rotate(45deg); }
  40% { opacity: 1; }
  to { opacity: 0; transform: translateY(29px) rotate(45deg); }
}

@keyframes infra-spray {
  from { transform: translate(-5px, 4px) rotate(45deg); }
  to { transform: translate(7px, 18px) rotate(45deg); }
}

@keyframes infra-current {
  to { background-position-x: 18px; }
}

@keyframes infra-airflow {
  from { transform: translateX(-4px); opacity: .55; }
  to { transform: translateX(6px); opacity: 1; }
}

@keyframes infra-gear {
  to { transform: rotate(360deg); }
}

@keyframes infra-conveyor {
  from { transform: translateX(-16px); }
  to { transform: translateX(16px); }
}

@keyframes infra-truck {
  from { transform: translate(-20px, -12px); }
  to { transform: translate(95px, 32px); }
}

@keyframes infra-river {
  to { transform: translateX(35px); }
}

@keyframes infra-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@media (max-width: 850px) {
  .infra-control-bank,
  .gis-question-dock,
  .ticket-windows,
  .support-toolbar {
    grid-template-columns: 1fr;
  }

  .data-schema-board {
    grid-template-columns: 1fr;
  }

  .schema-links {
    display: none;
  }

  .gis-workspace,
  .supply-control-grid,
  .street-audit-layout {
    grid-template-columns: 1fr;
  }

  .hvac-system {
    grid-template-columns: 1fr;
  }

  .hvac-duct {
    width: 24px;
    height: 34px;
    justify-self: center;
  }

  .hvac-classroom,
  .hvac-thermostat,
  .hvac-filter,
  .hvac-vent {
    width: min(100%, 340px);
    justify-self: center;
  }

  .factory-scene {
    min-height: 520px;
  }

  .factory-sensors {
    top: 5%;
    right: 5%;
    left: 5%;
    width: auto;
  }

  .factory-machine {
    top: 46%;
  }
}

@media (max-width: 580px) {
  .infra-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .infra-heading > span {
    align-self: flex-start;
  }

  .aircraft-hangar-scene {
    min-height: 520px;
  }

  .aircraft-hotspot {
    width: 44%;
  }

  .hotspot-panel,
  .hotspot-light {
    top: 5%;
  }

  .hotspot-trace,
  .hotspot-paint {
    bottom: 8%;
  }

  .aircraft-silhouette {
    top: 37%;
  }

  .factory-sensors {
    grid-template-columns: 1fr;
  }

  .factory-scene {
    min-height: 690px;
  }

  .factory-machine {
    top: 57%;
    left: calc(50% - 85px);
  }

  .supply-map {
    min-height: 310px;
  }

  .supply-node {
    font-size: 2rem;
  }

  .street-grid {
    gap: 3px;
    padding: .4rem;
  }

  .street-cell {
    min-width: 38px;
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .infrastructure-activity *,
  .infrastructure-activity *::before,
  .infrastructure-activity *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .infrastructure-activity,
  .infrastructure-activity button,
  .irrigation-greenhouse,
  .aircraft-hangar-scene,
  .data-schema-board,
  .sensor-board-scene,
  .gis-canvas,
  .hvac-system,
  .factory-scene,
  .help-desk-desktop,
  .supply-map,
  .drop-test-rig,
  .bridge-frame-scene,
  .street-grid {
    border: 2px solid CanvasText;
    forced-color-adjust: auto;
  }

  .infrastructure-activity button:is(.is-selected, [aria-pressed="true"]),
  .street-cell:is(.is-current, .is-visited) {
    color: HighlightText;
    background: Highlight;
    border-color: Highlight;
  }
}
