/* ------------------------------------------------------------------
   Locked rules. Loaded after every page's inline <style> so these win.
   Each block cites the rule it enforces. Do not reorder.
   ------------------------------------------------------------------ */

/* LOCKED: images preserve aspect ratio always. No cropping, no stretching.
   Every case study slot is fit="contain" — the former MLS Stats fit="cover"
   exception is retired. The [fit="cover"] escape hatch below now only covers
   the Homepage and Profile portrait/editorial images, which crop on purpose. */
img:not([data-fit-cover]) {
  object-fit: contain;
  width: 100%;
  height: auto;
}
image-slot:not([fit="cover"])::part(img) {
  object-fit: contain;
  width: 100%;
  height: auto;
}

/* LOCKED: animation slot hides below 768px.
   Source hides it at 720px; this supersets that range. */
@media (max-width: 768px) {
  #hero-animation-slot,
  [data-hero-slot] { display: none !important; }
}

/* LOCKED: animation slot is an empty, transparent, absolutely positioned
   container on the right of the hero, 58% of content width, full hero height. */
#hero-animation-slot {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  background: transparent;
  pointer-events: none;
}

/* LOCKED: tools grid inverts on hover, 200ms ease-out.
   Source sets the colours but declares no transition. */
[data-toolcell] {
  transition: background 200ms ease-out, color 200ms ease-out;
}
[data-toolcell]:hover {
  background: #1b1b19 !important;
  color: #f4f1ea !important;
}

/* LOCKED: card labels are a single text node, Archivo Light 16px,
   never wrap to two lines, sit outside and below the card with a 16px gap. */
[data-featcard],
[data-allcard] {
  gap: 16px;
}
[data-featcard] > span:last-child,
[data-allcard] > span:last-child {
  font-size: 16px;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* RETIRED: the Human/Machine toggle was removed with the /machine route.
   Kept as a no-op anchor in case the route is restored. */
[data-hm-toggle] {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 50;
}

/* Production hardening: keep the fixed toggle clear of footer content. */
footer { padding-bottom: 88px; }

/* Rendering polish: avoid layout shift while Archivo loads. */
body { font-synthesis-weight: none; }

@media (prefers-reduced-motion: reduce) {
  [data-toolcell] { transition-duration: 1ms !important; }
}
