/* The field and row heights (--control-h, --control-h-row) are simulator-ui.css's, which every simulator page loads. */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--fg);
  background: var(--surface-2);
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
.shopper-dot {
  fill: var(--info);
  stroke: var(--surface);
  stroke-width: 0.055;
}
.shopper-label {
  fill: var(--info);
  font-weight: 500;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 0.05;
}
.checkout-marker {
  fill: var(--surface-3);
  stroke: var(--fg-deco);
  stroke-width: 0.025;
}
.checkout-marker.open {
  fill: var(--brand-soft);
  stroke: var(--brand-text);
}
.checkout-label {
  fill: var(--fg);
  font-weight: 500;
}
.basket-marker {
  fill: var(--warning-text);
  stroke: var(--surface);
  stroke-width: 0.6;
}
.basket-marker .basket-handle {
  fill: none;
  stroke: var(--warning-text);
  stroke-width: 1.6;
}
.lane-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.lane-card:last-child {
  border: 0;
}
.lane-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lane-card p {
  font-size: var(--text-md);
  color: var(--fg-muted);
  margin: 4px 0;
}
.lane-card strong {
  font-weight: 500;
}
#shopper-form {
  margin-top: 14px;
}
#shopper-detail {
  margin: 0;
}
#shopper-stock-fields {
  display: grid;
  gap: 12px;
}
.topbar {
  min-height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 32px;
  gap: 16px;
}
.identity,
.toolbar,
.transport,
.panel-heading,
.map-key,
.inventory-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}
.identity {
  white-space: nowrap;
}
main {
  max-width: 1800px;
  margin: auto;
  padding: 28px var(--gutter) 16px;
}
.topbar {
  --page-max: 1800px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
h1 {
  font-size: var(--text-3xl);
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0;
}
h2 {
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 0;
}
.subtitle {
  margin: 6px 0 0;
  color: var(--fg-muted);
}
.transport {
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  gap: 8px;
  flex-wrap: wrap;
}
.transport > div {
  padding: 0 16px 0 4px;
}
.caption {
  font-size: var(--text-md);
  color: var(--fg-muted);
}
.transport .caption {
  display: block;
  font-size: var(--text-sm);
}
#clock {
  font-size: var(--numeral-sm);
  font-weight: var(--numeral-weight);
  line-height: var(--numeral-leading);
  letter-spacing: var(--numeral-tracking-sm);
  font-variant-numeric: tabular-nums;
}
.world-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.panel-heading {
  justify-content: space-between;
  gap: 8px;
}
.world-panel > .panel-heading {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.panel-heading p {
  margin: 3px 0 0;
  font-size: var(--text-md);
  color: var(--fg-muted);
}
.tag {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  white-space: nowrap;
}
.map-wrap {
  overflow: auto;
  padding: 24px;
  background: var(--surface-2);
}
#floor {
  letter-spacing: 0;
  min-width: 0;
  width: 100%;
  height: auto;
  display: block;
}
.map-zone {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 0.025;
}
/* The site around the building (ADR-0032 §9): quiet surfaces under the floor, the exterior walls darker than any fixture. */
.site-primitive {
  stroke: none;
}
.site-asphalt {
  fill: var(--surface-3);
}
.site-apron {
  fill: color-mix(in srgb, var(--surface-3) 75%, var(--fg-deco));
}
.site-pavement,
.site-kerb {
  /* Between the floor (--surface) and the asphalt (--surface-3), so the sidewalk reads as neither. */
  fill: var(--surface-2);
}
.site-planting {
  fill: color-mix(in srgb, var(--success) 14%, var(--surface-2));
}
.site-paint {
  /* --line-hi equals --surface-3 in the dark theme, which hid every bay line on the asphalt. */
  fill: var(--fg-deco);
}
.site-accessible {
  fill: color-mix(in srgb, var(--info) 25%, var(--surface-3));
}
/* Vehicles on the simulated site (ADR-0032 §10): parked ones quiet, ones on the move outlined like the people. */
.plan-vehicle {
  stroke-width: 0.06;
}
.plan-vehicle line {
  stroke-linecap: round;
}
.plan-vehicle-name {
  fill: var(--fg);
  stroke: none;
}
.plan-vehicle-parked {
  fill: color-mix(in srgb, var(--fg-deco) 45%, var(--surface-3));
  stroke: var(--fg-deco);
}
.plan-vehicle-moving {
  fill: color-mix(in srgb, var(--info) 30%, var(--surface-3));
  stroke: var(--info);
}
.site-metal,
.site-rubber {
  fill: var(--fg-deco);
}
.site-compactor {
  fill: color-mix(in srgb, var(--success) 28%, var(--surface-3));
}
.site-bollard {
  fill: var(--warning);
}
.site-wall {
  fill: var(--fg-muted);
}
.site-glazing {
  /* Shopfront glass: a thin line where the wall is open, lighter than the wall either side of it. */
  fill: color-mix(in srgb, var(--info) 45%, var(--fg-deco));
}
#floor.hide-site .site-primitive,
#floor.hide-site .site-area-label {
  display: none;
}
.zone-label.site-area-label {
  /* style-exception: SVG user units: metres in the map; the site is several times the floor's size */
  font-size: 0.7px;
}
.zone-label {
  /* style-exception: SVG user units: metres in the map. The plan sets a readable size per render. */
  font-size: 0.28px;
  fill: var(--fg-muted);
  font-weight: 500;
  letter-spacing: 0.03px;
  /* A halo in the floor's colour keeps a caption readable where it crosses a fixture's outline. */
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 0.06px;
  stroke-linejoin: round;
}
.map-link {
  stroke: var(--line-hi);
  stroke-width: 0.05;
  stroke-dasharray: 0.12 0.12;
}
.stock-marker {
  fill: var(--surface-3);
  stroke: var(--fg-deco);
  stroke-width: 0.025;
}
.stock-label {
  fill: var(--fg);
  font-weight: 500;
}
.stock-count {
  fill: var(--fg-muted);
}
.employee-dot {
  fill: var(--brand-text);
  stroke: var(--surface);
  stroke-width: 0.055;
}
.employee-label {
  font-weight: 500;
  fill: var(--brand-text);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 0.06;
}
.employee-carry {
  fill: var(--warning-text);
  stroke: var(--surface);
  stroke-width: 0.04;
}
.map-key {
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.map-key span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-key span:last-child {
  margin-left: auto;
}
.map-key i {
  display: inline-block;
  width: 9px;
  height: 9px;
}
.key-stock {
  background: var(--surface-3);
  border: 1px solid var(--fg-deco);
}
/* The small square by a team member: goods they carry (.employee-carry). Unexplained, it read as an error on the plan (UI review
   2026-11-15). */
.key-goods {
  background: var(--warning-text);
}
.key-route {
  border-top: 1px dashed var(--fg-deco);
  height: 1px !important;
}
.inventory-heading {
  padding: 20px 22px 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}
.inventory-heading .caption {
  font-size: var(--text-sm);
}
.table-scroll {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-md);
}
th,
td {
  padding: 10px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--fg-muted);
  font-weight: 500;
  font-size: var(--text-sm);
}
tr:last-child td {
  border-bottom: none;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.location-kind {
  display: block;
  color: var(--fg-muted);
  font-size: var(--text-sm);
}
.control-section {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.control-section:last-child {
  border-bottom: 0;
}
/* A subsection heading inside a tool panel sits one step below the panel's h2. Without this rule it fell back to
   the browser's h3 (larger than the h2 above it). More specific card headings below still win. */
.control-section h3 {
  font-size: var(--text-base);
  font-weight: 500;
  margin: 24px 0 0;
}
.help {
  font-size: var(--text-md);
  color: var(--fg-muted);
  margin: 8px 0 14px;
}
form {
  display: grid;
  gap: 12px;
}
label {
  display: grid;
  gap: 5px;
  font-size: var(--text-md);
  font-weight: 500;
  min-width: 0;
}
select,
input {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: var(--text-md);
  height: var(--control-h);
  padding: 6px 10px;
}
select {
  appearance: none;
  background-image: var(--chevron);
  background-repeat: no-repeat;
  background-size: 14px;
  background-position: right 8px center;
  padding-right: 27px;
}
/* A pair whose labels wrap to different heights keeps its two inputs on one line (align-items: end). */
.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
/* The price, relabel and search forms end in their one action, full width like every other tool form's. */
#price-form > button,
#relabel-form > *,
#recovery-form > * {
  grid-column: 1 / -1;
}
.quantity-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quantity-field input {
  width: 100px;
}
.quantity-field > span {
  color: var(--fg-muted);
  font-weight: 400;
}
.speed select {
  width: auto;
  font-size: var(--text-md);
}
form > button {
  width: 100%;
  margin-top: 2px;
}
.feedback {
  font-size: var(--text-md);
  color: var(--fg-muted);
  margin: 12px 0 0;
  min-height: 38px;
}
.feedback.error {
  color: var(--danger);
}
.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.staff-card:last-child {
  border: 0;
}
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 500;
}
.staff-detail {
  min-width: 0;
  flex: 1;
}
.staff-detail strong {
  font-weight: 500;
}
.staff-detail p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 2px 0 0;
}
.staff-card button {
  white-space: nowrap;
}
.task,
.work-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.task:last-child,
.work-card:last-child {
  border: 0;
}
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}
.task h3 {
  font-size: var(--text-md);
  margin: 0;
  font-weight: 500;
}
.task p {
  font-size: var(--text-sm);
  margin: 5px 0;
  color: var(--fg-muted);
}
.task-status {
  color: var(--brand-text);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.task-status.blocked {
  color: var(--warning-text);
}
.task progress {
  display: block;
  width: 100%;
  height: 4px;
  margin: 10px 0;
  accent-color: var(--brand-text);
}
.empty {
  color: var(--fg-muted);
  font-size: var(--text-md);
  padding: 12px 0;
}
.work-section {
  max-height: 460px;
  overflow: auto;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  padding: 16px 0;
}
/* A lost connection or a stopped store is a small notice in the header, between the brand and the header's links, out of
   the page's flow: a full-width row pushed the window-high layout down and squeezed the floor and the controls. A phone's
   header has no room, so there it floats just under the header. */
#connection {
  box-sizing: border-box;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--danger-wash-border);
  border-radius: var(--radius-lg);
  background: var(--danger-wash);
  color: var(--danger);
  font-size: var(--text-sm);
  line-height: 1.4;
}
#connection::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  transform: translateY(-1px);
}
@media (max-width: 760px) {
  #connection {
    position: fixed;
    top: 80px;
    left: 16px;
    right: 16px;
    z-index: var(--z-toast, 30);
    max-width: none;
    padding: 8px 14px;
    background: var(--surface);
    box-shadow: var(--shadow-elevated);
    font-size: var(--text-md);
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 12px;
  top: -50px;
  z-index: var(--layer-notice, 1);
  background: var(--surface);
  color: var(--fg);
  padding: 10px;
}
.skip:focus {
  top: 8px;
}
@media (min-width: 1500px) {
  .map-wrap {
    padding: 36px;
  }
}
@media (max-width: 1000px) {
  main {
    padding-block: 22px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
  }
  .control-section {
    padding: 16px;
  }
  .map-wrap {
    padding: 12px;
  }
  .inventory-heading,
  th,
  td {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar {
    gap: 4px;
  }
  .page-heading {
    gap: 16px;
  }
  main {
    padding-block: 20px;
  }
  .transport {
    width: 100%;
    gap: 4px;
  }
  /* The clock takes its own line and the playback controls one row under it. */
  .transport > div {
    flex-basis: 100%;
    padding: 0 0 4px 4px;
  }
  .transport .px-btn {
    padding: 7px 9px;
  }
  .map-wrap {
    padding: 8px;
  }
  #floor {
    min-height: 0;
  }
  .map-key {
    gap: 10px;
    padding: 10px 16px;
  }
  .map-key span:last-child {
    margin-left: 0;
  }
  .work-section {
    max-height: none;
  }
  footer {
    flex-direction: column;
    gap: 4px;
  }
}
.panel-feedback {
  padding: 12px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.activity-section + .activity-section {
  margin-top: 32px;
}
.activity-section ol {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.activity-section li {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.activity-section li p {
  font-size: var(--text-md);
  margin: 0.45rem 0;
}

.map-zoom select {
  font-size: var(--text-md);
  width: auto;
  min-width: 105px;
}
.map-wrap:focus-visible {
  outline: 2px solid var(--brand-text);
  outline-offset: -2px;
}
.map-wrap.zoom-150 #floor {
  width: 150%;
  max-width: none;
}
.map-wrap.zoom-200 #floor {
  width: 200%;
  max-width: none;
}

.sensor-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.sensor-card:first-child {
  padding-top: 0;
}
.sensor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sensor-heading h3 {
  font-size: var(--text-md);
  font-weight: 500;
  margin: 0;
  overflow-wrap: anywhere;
}
.sensor-heading button {
  flex-shrink: 0;
}
.sensor-card p {
  margin: 6px 0 0;
  font-size: var(--text-sm);
}
.sensor-status {
  color: var(--brand-text);
}
.sensor-status.sensor-offline {
  color: var(--warning-text);
}
.sensor-readings {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 420px;
  overflow: auto;
}
.sensor-readings li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.sensor-readings strong {
  font-weight: 500;
  font-size: var(--text-md);
}
.sensor-readings p {
  margin: 4px 0;
  font-size: var(--text-sm);
}

.sensor-settings summary {
  font-size: var(--text-md);
  cursor: pointer;
}
.sensor-settings form {
  margin-top: 12px;
}
.sensor-settings {
  margin-top: 10px;
}
.sensor-settings > p.help {
  margin: 8px 0;
}
.sensor-detach {
  margin-top: 6px;
  color: var(--fg-muted);
}

.toolbar {
  flex-wrap: wrap;
  /* Buttons that wrap onto a second row keep the same space between rows as between buttons. */
  row-gap: 8px;
}
.toolbar a {
  text-decoration: none;
  color: var(--fg);
}

.staff-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#break-control {
  margin-bottom: 12px;
}
#break-minutes {
  max-width: 110px;
}

#roster-form {
  display: grid;
  gap: 12px;
}
#delivery-form {
  display: grid;
  gap: 12px;
}
.delivery-card {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
/* A card's name sits at its top in every screen: Day plan's space above its own headings doesn't reach into a card. */
.delivery-card h3,
#panel-day-plan .delivery-card h3 {
  font-size: var(--text-md);
  margin: 0 0 6px;
}
.delivery-card p {
  margin: 6px 0;
}
.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
#arrival-form {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}
.ingest-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  margin: 14px 0;
}
.ingest-card h3 {
  font-size: var(--text-md);
  margin: 0;
  font-weight: 500;
}
.ingest-card p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 8px 0 0;
}
.ingest-card .panel-heading {
  flex-wrap: wrap;
}
.ingest-attention {
  color: var(--warning-text);
}
.world-panel > .panel-heading {
  flex-wrap: wrap;
}

#delivery-thermal-fields,
#delivery-package-fields,
#delivery-pallet-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
#delivery-thermal-fields legend,
#delivery-package-fields legend,
#delivery-pallet-fields legend {
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0 4px;
}
#delivery-thermal-fields .help,
#delivery-package-fields .help,
#delivery-pallet-fields .help {
  margin: 0;
}
#delivery-thermal-fields select {
  max-width: 100%;
  min-width: 0;
}
#stock-permission-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
#stock-permission-fields legend {
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0 4px;
}
#stock-permissions {
  overflow-wrap: anywhere;
}
#stock-permissions h4 {
  margin: 0 0 6px;
}
#roster-local-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
#roster-local-fields legend {
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0 4px;
}
#roster-local-fields select,
#roster-local-fields input {
  max-width: 100%;
  min-width: 0;
}
#roster-zone {
  overflow-wrap: anywhere;
}

.equipment-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 12px;
  margin: 12px 0;
}
.equipment-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 14px 16px;
  min-width: 0;
}
.equipment-card h3 {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-weight: 500;
}
.equipment-air {
  display: block;
  font-size: var(--text-lg);
  font-weight: 500;
  margin: 6px 0 2px;
  font-variant-numeric: tabular-nums;
}
.equipment-label {
  margin: 12px 0 6px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg-muted);
}
.equipment-card .caption {
  margin: 2px 0;
}
.equipment-setpoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0;
}
.equipment-setpoint label {
  grid-column: 1 / -1;
}
.equipment-setpoint input {
  width: 100%;
  min-width: 0;
}
.equipment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* The open day plan: what it holds, the ways to add to it, then its actions, one row apart. */
#day-plan-draft:not([hidden]) {
  display: grid;
  gap: 16px;
}
#day-plan-draft > * {
  margin: 0;
}
.plan-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.plan-entry p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 6px 0;
}
.plan-entry button {
  margin-top: 6px;
}
#day-plan-banner {
  color: var(--brand-text);
  font-weight: 500;
}
#day-plan-draft > button {
  margin-top: 8px;
}
#panel-day-plan h3 {
  margin-top: 24px;
}
#day-plan-label {
  margin-bottom: 6px;
}

.shopper-selection {
  fill: none;
  stroke: var(--info);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
.map-inspection {
  padding: 10px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-inspection .help {
  flex-basis: 100%;
  margin: 0;
}
.map-inspection .caption {
  overflow-wrap: anywhere;
}

#demand-segments fieldset {
  min-width: 0;
  display: grid;
  gap: 12px;
}
#demand-segments legend {
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0 4px;
}
#demand-assumptions {
  width: 100%;
  min-width: 0;
  min-height: 90px;
  resize: vertical;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-md);
  font: inherit;
  padding: 8px 10px;
}

#forecast-form {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}
#forecast-schedule {
  overflow-wrap: anywhere;
}

#opening-hours-form {
  display: grid;
  gap: 12px;
}
.opening-window {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.opening-window legend {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0 4px;
}
#opening-hours-control {
  overflow-wrap: anywhere;
}
#opening-hours-review button {
  margin: 6px 4px 6px 0;
}
#trading-status:empty,
#store-place:empty {
  display: none;
}
/* Where the store is sits close under its trading line. */
#trading-status + #store-place {
  margin-top: 2px;
}
#opening-hours-review {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 12px;
}

/* Observer schedule, bounded pages with semantic chronological rows. */
#day-briefing {
  overflow-wrap: anywhere;
}
.timeline-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}
.timeline-navigation button {
  flex: 1;
  white-space: nowrap;
}
#day-timeline {
  list-style: none;
  margin: 16px 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--line);
}
.timeline-entry {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  margin: 0 0 12px;
  background: var(--surface);
}
.timeline-entry::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: -18px;
  top: 18px;
  border-radius: 50%;
  background: var(--fg-muted);
}
.timeline-entry[data-status="active"]::before {
  background: var(--brand-text);
}
.timeline-entry[data-status="waiting"] {
  border-color: var(--warning-text);
}
.timeline-entry strong {
  display: block;
  font-size: var(--text-md);
}
.timeline-status {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--brand-text);
  margin: 6px 0;
}
.timeline-entry p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 6px 0 0;
}
#timeline-more {
  width: 100%;
}

#fitting-form {
  display: grid;
  gap: 8px;
}
#fitting-preference-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
#fitting-preference {
  width: auto;
  min-height: 24px;
}
.fitting-marker {
  fill: var(--surface);
  stroke: var(--fg-muted);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.fitting-marker.occupied {
  stroke: var(--brand-text);
  stroke-width: 2px;
}
.fitting-map-label {
  fill: var(--fg);
  pointer-events: none;
}

.branch-context {
  overflow-wrap: anywhere;
}
#branches-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface);
  color: var(--fg);
}
#branches-dialog::backdrop {
  background: var(--scrim-strong);
}
#branches-dialog .panel-heading {
  padding: 0;
}
#branches-dialog form {
  display: grid;
  gap: 12px;
}
.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.branch-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.branch-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.branch-card h4 {
  margin: 0;
}
.branch-card .branch-actions + .branch-actions {
  margin-top: 8px;
}
@media (max-width: 600px) {
  #branches-dialog {
    padding: 16px;
  }
}
#branch-feedback:empty {
  display: none;
}

.physical-fixture {
  fill: var(--surface-3);
  stroke: var(--fg-deco);
  stroke-width: 0.05;
}
.stock-anchor {
  fill: var(--brand-text);
  stroke: var(--surface);
  stroke-width: 0.03;
}
.stock-access {
  stroke: var(--fg-deco);
  stroke-width: 0.025;
  stroke-dasharray: 0.07 0.09;
}

#layout-dialog {
  width: min(1160px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: var(--surface);
  color: var(--fg);
}
#layout-dialog::backdrop {
  background: var(--scrim-strong);
}
#layout-dialog > .panel-heading {
  padding: 0;
  align-items: flex-start;
}
#layout-dialog label {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  min-width: 0;
}
#layout-dialog input,
#layout-dialog select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background-color: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-hi);
  border-radius: 6px;
  font: inherit;
  padding: 8px;
}
#layout-dialog input[readonly] {
  color: var(--fg-muted);
  background: var(--surface-2);
}
.layout-topline {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  align-items: center;
  gap: 24px;
  margin: 20px 0;
}
.layout-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
  gap: 20px;
  align-items: start;
}
.layout-preview-panel {
  position: sticky;
  top: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
  min-width: 0;
}
.layout-preview-panel .panel-heading {
  padding: 14px 16px;
}
.layout-preview-panel > .help,
.layout-review-result {
  padding: 0 16px 14px;
  margin: 0;
}
#layout-preview {
  width: 100%;
  height: 340px;
  display: block;
}
.layout-zone {
  fill: var(--surface);
  stroke: var(--line-hi);
  stroke-width: 0.025;
}
.layout-solid {
  fill: var(--surface-3);
  stroke: var(--fg-deco);
  stroke-width: 0.05;
  cursor: pointer;
}
.layout-point {
  fill: var(--brand-text);
  stroke: var(--surface);
  stroke-width: 0.05;
  cursor: pointer;
}
.layout-point.staffOnly {
  fill: var(--warning-text);
}
.layout-point.fittingRoom {
  fill: var(--fg-muted);
}
#layout-preview .selected {
  stroke: var(--info);
  stroke-width: 0.12;
}
.layout-properties {
  min-width: 0;
}
.layout-properties fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 14px;
}
.layout-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.layout-field-note,
.layout-fields > label:has(input[readonly]) {
  grid-column: 1/-1;
}
.layout-fields .layout-check {
  grid-column: 1/-1;
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
}
.layout-check input {
  width: 18px !important;
  height: 18px;
  flex-shrink: 0;
}
.layout-review-result:empty,
#layout-feedback:empty {
  display: none;
}
.layout-review-result details {
  font-size: var(--text-sm);
}
.layout-review-result ul {
  max-height: 180px;
  overflow: auto;
  padding-left: 20px;
}
.layout-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}
#layout-feedback {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  #layout-dialog {
    padding: 16px;
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .layout-topline {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 16px 0;
  }
  .layout-studio-grid {
    grid-template-columns: 1fr;
  }
  .layout-preview-panel {
    position: static;
  }
  #layout-preview {
    height: 240px;
  }
  .layout-footer {
    display: grid;
    gap: 12px;
  }
  .layout-fields {
    gap: 12px;
  }
  .layout-footer .branch-actions {
    flex-wrap: wrap;
  }
}
.layout-zone {
  cursor: pointer;
}
.layout-zone-label {
  fill: var(--fg-muted);
  /* style-exception: SVG user units: metres in the map */
  font-size: 0.26px;
  pointer-events: none;
}
.layout-bounds {
  fill: none;
  pointer-events: none;
}
#layout-preview .stock-anchor {
  cursor: pointer;
}
#layout-selection {
  color: var(--fg);
  font-weight: 500;
}
.layout-zone-label {
  /* style-exception: SVG user units: metres in the map */
  font-size: 0.48px;
}
.layout-review-result {
  overflow-wrap: anywhere;
}
@media (min-width: 900px) and (min-height: 650px) {
  #layout-dialog[open] {
    height: min(900px, calc(100dvh - 32px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #layout-dialog > .panel-heading,
  #layout-dialog > .help,
  .layout-topline,
  .layout-footer,
  #layout-feedback {
    flex-shrink: 0;
  }
  .layout-topline {
    margin: 12px 0 16px;
  }
  .layout-studio-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  .layout-properties {
    overflow: auto;
    /* Room for a field's focus ring, outside the column's own edge. */
    margin-right: -4px;
    padding: 0 4px 8px 0;
  }
  .layout-preview-panel {
    position: static;
    display: flex;
    flex-direction: column;
  }
  .layout-preview-panel > .panel-heading,
  .layout-preview-panel > .help {
    flex-shrink: 0;
  }
  #layout-preview {
    height: auto;
    flex: 1;
    min-height: 140px;
  }
  .layout-review-result {
    max-height: 180px;
    overflow: auto;
    flex-shrink: 0;
  }
  .layout-footer {
    margin-top: 12px;
    padding-top: 12px;
  }
  #layout-feedback {
    margin: 10px 0 0;
  }
}
.layout-preview-panel h3 {
  margin: 0;
}
.layout-properties > .layout-review-result:not(:empty) {
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  max-height: none;
  overflow: visible;
}
.layout-access-boundary {
  fill: none;
  stroke: var(--warning-text);
  stroke-width: 0.09;
  stroke-dasharray: 0.2 0.12;
  pointer-events: none;
}

/* Observer-only matched layout comparisons. */
:is(#experiments-dialog, #control-experiments-dialog) {
  box-sizing: border-box;
  width: min(1400px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 24px;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}
:is(#experiments-dialog, #control-experiments-dialog)::backdrop {
  background: var(--scrim-strong);
}
:is(#experiments-title, #control-experiments-title) {
  font-size: var(--text-xl);
}
:is(#experiments-dialog, #control-experiments-dialog) h3 {
  font-size: var(--text-lg);
  margin: 12px 0;
}
:is(#experiments-dialog, #control-experiments-dialog) h4 {
  margin: 8px 0;
  font-size: var(--text-md);
}
:is(#experiments-dialog, #control-experiments-dialog) input,
:is(#experiments-dialog, #control-experiments-dialog) textarea,
:is(#experiments-dialog, #control-experiments-dialog) select {
  box-sizing: border-box;
}
:is(#experiments-dialog, #control-experiments-dialog) textarea {
  width: 100%;
  resize: vertical;
  padding: 10px;
  font: inherit;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-md);
}
.experiment-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}
.experiment-workspace > section {
  min-width: 0;
}
.experiment-workspace fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 16px;
}
.experiment-workspace section > h3 {
  margin-top: 20px;
}
.experiment-results {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.experiment-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.experiment-fields .help {
  grid-column: 1/-1;
}
.experiment-card {
  padding: 14px;
  margin: 12px 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.experiment-card > .panel-heading {
  margin-bottom: 12px;
}
.experiment-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control-h);
}
.experiment-check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.experiment-comparison {
  margin-top: 24px;
}
.experiment-results td,
.experiment-results th {
  padding: 10px 12px;
}
.experiment-results td:first-child {
  min-width: 150px;
}
.experiment-results progress {
  width: 100%;
  accent-color: var(--brand-text);
  margin: 8px 0 12px;
}
.experiment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 12px;
}
.experiment-footer .help {
  margin: 0;
  max-width: 520px;
}
:is(#experiment-feedback, #control-feedback) {
  overflow-wrap: anywhere;
}
:is(#experiment-feedback, #control-feedback):empty {
  display: none;
}
@media (min-width: 1000px) and (min-height: 650px) {
  :is(#experiments-dialog, #control-experiments-dialog)[open] {
    height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  :is(#experiments-dialog, #control-experiments-dialog) > .panel-heading,
  :is(#experiments-dialog, #control-experiments-dialog) > .help,
  .experiment-footer,
  :is(#experiment-feedback, #control-feedback) {
    flex-shrink: 0;
  }
  .experiment-workspace {
    flex: 1;
    min-height: 0;
  }
  .experiment-workspace > section {
    overflow: auto;
    padding-right: 8px;
  }
}
@media (max-width: 999px) {
  .experiment-workspace {
    grid-template-columns: 1fr;
  }
  .experiment-results {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
  .experiment-footer {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  :is(#experiments-dialog, #control-experiments-dialog) {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
  }
  .experiment-fields,
  .experiment-workspace .field-pair {
    grid-template-columns: 1fr;
  }
  .experiment-workspace .panel-heading {
    flex-wrap: wrap;
  }
  .experiment-footer .branch-actions {
    flex-wrap: wrap;
  }
  .experiment-card {
    padding: 12px;
  }
}
#inherited-execution-list li {
  overflow-wrap: anywhere;
}

.control-decision-inspection {
  scroll-margin-top: 16px;
  overflow-wrap: anywhere;
}
.control-decision-inspection h5,
.control-decision-inspection h6 {
  font-size: var(--text-base);
  line-height: 1.5;
  margin: 16px 0 8px;
}
.control-decision-card > summary {
  flex-wrap: wrap;
  padding-block: 6px;
}
.control-decision-card > summary strong {
  font-weight: 500;
}
.control-decision-card > summary span {
  display: block;
  flex-basis: 100%;
  margin: 2px 0 0 calc(1em + var(--space-2));
  color: var(--fg-muted);
}
.control-decision-inspection .experiment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.control-outcome-inspection {
  scroll-margin-top: 16px;
  overflow-wrap: anywhere;
  margin: 16px 0;
}
.control-outcome-inspection:empty {
  display: none;
}
.control-outcome-inspection h5,
.control-outcome-inspection h6 {
  font-size: var(--text-xl);
  margin: 16px 0 8px;
}
.control-outcome-chart {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.control-outcome-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 150px;
}
.control-outcome-chart text {
  fill: var(--fg-muted);
  font-size: var(--text-md);
}
.outcome-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.outcome-line {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.outcome-queue {
  color: var(--brand-text);
  stroke: var(--brand-text);
}
.outcome-lanes {
  color: var(--fg);
  stroke: var(--fg);
}
.outcome-line.outcome-lanes {
  stroke-dasharray: 6 4;
}
.outcome-sales {
  color: var(--fg-muted);
  stroke: var(--fg-muted);
}
.outcome-line.outcome-sales {
  stroke-dasharray: 2 4;
}
.outcome-dot {
  fill: var(--surface);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.control-outcome-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--text-sm);
  margin-top: 8px;
}
.control-outcome-legend span::before {
  content: "";
  display: inline-block;
  width: 18px;
  border-top: 2px solid currentColor;
  vertical-align: middle;
  margin-right: 6px;
}
.control-outcome-legend .outcome-lanes::before {
  border-top-style: dashed;
}
.control-outcome-legend .outcome-sales::before {
  border-top-style: dotted;
}
.control-outcome-events {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}
.outcome-event {
  border-left: 2px solid var(--line-hi);
  padding: 4px 0 12px 14px;
  margin: 0 0 8px;
}
.outcome-event > strong {
  display: block;
  font-size: var(--text-base);
}
.outcome-event p {
  margin: 4px 0;
}
.outcome-event .help {
  display: block;
}
.control-outcome-inspection .table-scroll {
  max-height: 320px;
  overflow: auto;
}

.control-outcome-time-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
}

.renderer-card {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 16px 20px;
  margin: 16px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow-wrap: anywhere;
}
.renderer-card h2 {
  font-size: var(--text-base);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.renderer-card .help {
  margin: 0;
  max-width: 560px;
}
.renderer-attach {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: 520px;
}
.renderer-attach code {
  display: block;
  overflow-wrap: anywhere;
  font-size: var(--text-md);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  user-select: all;
}
.renderer-attach .caption {
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.renderer-attach button {
  justify-self: start;
}
.renderer-developer {
  display: grid;
  gap: 8px;
  font-size: var(--text-md);
  color: var(--fg-muted);
}
.renderer-developer[open] {
  padding-bottom: 4px;
}
@media (max-width: 760px) {
  .renderer-card {
    flex-direction: column;
  }
  .renderer-attach {
    max-width: none;
  }
}

.plan-presets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 12px;
  align-items: end;
  margin: 0 0 14px;
}
.plan-presets label {
  display: block;
  font-size: var(--text-md);
  font-weight: 500;
}
.plan-presets select {
  display: block;
  margin-top: 5px;
}
.plan-presets .help {
  grid-column: 1/-1;
  margin: 0;
}

/* Store control is a screen of Store actions, the whole sheet, so it has no card frame of its own. */
#panel-activity .controller-panel {
  border: 0;
  padding: 12px 0;
  margin: 0;
  background: none;
}

/* The operating Three.js view shares the workbench and authoritative world. */
.operating-3d {
  height: max(320px, min(70dvh, 720px));
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}
.operating-3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.operating-3d[hidden],
.map-wrap[hidden],
.map-key[hidden],
.map-inspection[hidden],
.map-zoom[hidden] {
  display: none !important;
}
.operating-3d-status {
  margin: 8px 20px;
}
.operating-3d-status:empty {
  display: none;
}

/* The disclosure borrows the decision list's look; in the tool panel it sits on the panel's own left edge. */
#admit-profile-fields {
  padding-inline: 0;
  padding-bottom: 0;
}
#admit-profile-fields[open] {
  padding-bottom: 12px;
}
/* A checkbox or radio starts on the panel's left edge like every other control, without the browser's own inset. */

.tool-sheet :is(input[type="checkbox"], input[type="radio"]) {
  margin-inline-start: 0;
}
#admit-profile-fields > label,
#admit-profile-fields > .field-pair {
  margin-top: 12px;
}
#admit-description {
  width: 100%;
  min-width: 0;
  min-height: 120px;
  resize: vertical;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line-hi);
  border-radius: var(--radius-md);
  font: inherit;
  line-height: 1.5;
  padding: 8px 10px;
}
#shopper-intent {
  overflow-wrap: anywhere;
}

.population-intents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.population-intents legend {
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0 4px;
}
.population-intents .help {
  grid-column: 1/-1;
  margin: 0;
}
/* The mix in words takes the whole row; its shares, under Advanced, keep the two-a-row grid. */
.population-intents > :is(label, details) {
  grid-column: 1/-1;
}
.population-shares {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 14rem));
  gap: 12px 16px;
  align-items: end;
  margin-top: 8px;
}
#admit-cart-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
}
#admit-cart {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex-shrink: 0;
  padding: 0;
}
#shopper-search-fields,
#shopper-surface-fields {
  display: grid;
  gap: 12px;
}
#misplaced-goods .warning-text {
  color: var(--warning-text);
  font-weight: 500;
}
#sensor-comparison .comparison-gap {
  color: var(--warning-text);
  font-weight: 500;
}
#sensor-comparison tbody + tbody {
  border-top: 1px solid var(--line);
}
#sensor-comparison .comparison-group th {
  border-bottom: 0;
  padding-top: 14px;
  color: var(--fg);
  font-size: var(--text-md);
  font-weight: 400;
  text-align: left;
}
#sensor-comparison tbody:first-of-type .comparison-group th {
  padding-top: 8px;
}
#sensor-comparison .comparison-group th {
  background: var(--surface-2);
}
#sensor-comparison .comparison-title {
  font-weight: 500;
}
#sensor-comparison .comparison-counts {
  margin-left: 10px;
  color: var(--fg-muted);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
#sensor-comparison .comparison-group .location-kind {
  margin-top: 2px;
}

#recovery-list {
  padding: 0;
  list-style: none;
}
#recovery-list .recovery-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
/* Plan annotations are optional; actor poses and true stock markers remain unchanged. */
.plan-layers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-width: 0;
  border: 0;
  padding: 0 20px;
  margin: 8px 0 12px;
}
.plan-layers label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--control-h);
  cursor: pointer;
  font-size: var(--text-base);
}
.plan-layers input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-text);
}
.plan-layers .help {
  flex-basis: 100%;
  margin: 0;
}
.plan-layers[hidden],
#floor.hide-walking-network #walking-network,
#floor.hide-walking-network .stock-access,
#floor.hide-stock-labels .stock-anchor,
#floor.hide-stock-labels .stock-marker,
#floor.hide-stock-labels .stock-label,
#floor.hide-stock-labels .stock-count,
#floor.hide-stock-labels .stock-label-leader {
  display: none;
}
#receiving-case-list {
  overflow-wrap: anywhere;
}

/* Keep each selector with its own live description, including narrow screens. */

#layout-dialog .layout-navigation-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0 16px;
  min-height: var(--control-h);
  font-size: var(--text-sm);
  cursor: pointer;
}
#layout-dialog .layout-navigation-toggle input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  flex: 0 0 1rem;
  margin: 0;
  accent-color: var(--brand-text);
}

.layout-service-area {
  fill: var(--info);
  fill-opacity: 0.07;
  stroke: var(--info);
  stroke-width: 0.04;
  stroke-dasharray: 0.15 0.1;
  cursor: pointer;
}
.layout-service-area.selected {
  fill-opacity: 0.18;
  stroke-width: 0.09;
}

#admit-visit-intent {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
#admit-visit-intent .help {
  margin: 0;
}

/* One connection surface for ordinary and full-window use. */

.connection-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.connection-progress > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  min-width: 0;
}
.connection-progress dt {
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.connection-progress dd {
  margin: 6px 0 0;
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.connection-sources {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}
.connection-sources li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
}
.connection-sources small {
  color: var(--fg-muted);
}
#ingest-destination {
  overflow-wrap: anywhere;
}

.map-key .key-equipment {
  background: var(--map-equipment);
  border: 1px solid var(--map-equipment-edge);
  border-radius: 2px;
}
.map-key .key-pallet {
  background: var(--map-pallet);
  border: 1px solid var(--map-pallet-edge);
  border-radius: 2px;
}
#floor .stock-annotation:focus .stock-marker {
  stroke: var(--brand-text);
  stroke-width: 0.08;
}
#floor.hide-stock-labels .stock-annotation {
  display: none;
}

#delivery-package-control > .help {
  margin: 0 0 12px;
}
.help.error:not(:empty) {
  color: var(--danger);
}

.external-sales-history {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.external-sales-history li {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-wrap: anywhere;
  min-width: 0;
}
.external-sales-history small {
  color: var(--fg-muted);
}
.inventory-filter {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.inventory-filter .experiment-check {
  margin: 0;
}
.inventory-scroll {
  max-height: 560px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.inventory-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}
.control-section > .panel-heading + label {
  margin-top: 12px;
}
@media (max-width: 760px) {
  .operating-3d {
    height: clamp(260px, 85vw, 55vh);
  }
}

.shopper-arrival-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#decision-budget[data-level="low"] {
  color: var(--warning-text);
}
#decision-budget[data-level="exhausted"] {
  color: var(--danger);
}

/* Stacked fields in the tool panel's block containers (the sections, the action field groups, the disclosures). These
   are block flow, not grid, so nothing put space between one control and the next field's label: a select's border
   touched the label under it. Margins collapse with any larger margin already there. */
.control-section
  > :is(label, .field-pair, details, form, .px-btn, .shopper-arrival-actions)
  + :is(label, .field-pair, details, form, .shopper-arrival-actions, .plan-presets, [id$="-windows"]),
.control-section :is(div, fieldset)[id$="-fields"] > :is(label, .field-pair) + :is(label, .field-pair),
.control-section [id$="-control"] > :is(form, label, .field-pair) + :is(form, label, .field-pair) {
  margin-top: 12px;
}

/* Plan labels that would collide are hidden until their marker is hovered or focused (StorePlanLabels). One the keyboard is on always
   shows: it is never somewhere that can't be seen. */
.plan-label-collided {
  opacity: 0;
}
.plan-label-collided:focus-visible {
  opacity: 1;
}
.plan-label-group:hover .plan-label-collided,
.plan-label-group:focus-within .plan-label-collided {
  opacity: 1;
}

/* The day plan's three actions sit in one row of like buttons; an entry's Remove sits on the card's content edge. */
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.plan-entry-remove {
  margin-top: 8px;
}

@media (max-width: 760px) {
  /* After the base rule, so the inspection row lines up with the map key above it. */
  .map-inspection {
    padding: 10px 16px;
  }
}

/* A help line inside a tool form sits in the form's grid gap; its own margins doubled the space around it. */
.control-section form > p.help {
  margin: 0;
}
@media (max-width: 760px) {
  .topbar {
    flex-wrap: nowrap;
  }
  .identity {
    min-width: 0;
  }
}

/* Why a tool's work is locked while LumicIQ holds store control, with the way back to it. */
.control-lock-note {
  margin: 4px 0 14px;
  padding: 10px 12px;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.control-lock-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.control-lock-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 2px;
}

/* The Advanced tools' reports keep a few read-only lists folded (the inputs a comparison used, each replica seed, the evaluation
   manifest). Each fold reads as a button that says what it holds, with a chevron that turns, and opens into an outlined panel,
   so it is clear what opened and where it ends. Settings never fold (the tool windows show them as screens). */
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details {
  margin: 12px 0;
  border: 1px solid var(--surface-3);
  border-radius: var(--radius-md);
  background: transparent;
}
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 14px;
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  color: var(--fg);
}
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog)
  details
  > summary::-webkit-details-marker {
  display: none;
}
/* The glyph is the shared disclosure's (simulator-ui.css): one way to show and hide a section on every page. */
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details[open] {
  background: var(--surface-2);
}
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details[open] > summary {
  border-bottom: 1px solid var(--surface-3);
}
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details[open] > :not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}
:is(#experiments-dialog, #control-experiments-dialog, #layout-dialog, #branches-dialog) details[open] > :last-child {
  margin-bottom: 14px;
}

/* Pallets and handling equipment on the plan, in the map colours the 3D view uses. */
.map-pallet {
  fill: var(--map-pallet);
  stroke: var(--map-pallet-edge);
}
.map-equipment {
  fill: var(--map-equipment);
  stroke: var(--map-equipment-edge);
}
