/* ============================================================
   SYSTEM PAGES — /systems/<system>-management-system/
   Section styles shared by the Safety, Quality and Fleet (and later the other
   system) pages. Composes base.css primitives; only the layout deltas live here.
   ============================================================ */

/* == HERO == */
.sys-hero-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sys-hero-copy .button-group {
  margin-top: 0;
}

.sys-hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sys-hero-text > * {
  margin: 0;
}

/* Product + system lockup: the system pill sits inside the product's outline,
   its own border laid over the outline's right edge. Set --sys-accent per page. */
.sys-lockup {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 54px;
  border: 1px solid var(--sm-blue);
  border-radius: 10px;
}

.sys-lockup-product {
  height: 24px;
  width: auto;
  margin: 0 var(--space-3);
}

.sys-lockup-system {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  height: 54px;
  margin: 0 -1px 0 0;
  padding: 0 var(--space-3) 0 var(--space-2);
  border: 1px solid var(--sys-accent, var(--sm-red));
  border-radius: 10px;
  background: var(--sm-white);
  font-family: "Sunflower", sans-serif;
  font-weight: 500;
  font-size: var(--font-sm);
  color: var(--sm-text);
}

.sys-lockup-system img {
  width: 30px;
  height: 30px;
}

.sys-hero-media {
  align-self: center;
}

.sys-hero-video {
  border-radius: var(--space-4);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

/* The play svg carries a 36px shadow margin on each side, so 180px renders a 108px tile. */
.video-facade img.sys-play {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 180px;
  height: 180px;
  object-fit: contain;
  opacity: 0.85;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.video-facade:hover img.sys-play {
  opacity: 1;
}

@media (max-width: 768px) {
  /* Small and bottom-left so the poster's text stays readable. At 80px the shadow margin is 16px,
     so -4px puts the visible tile 12px in from the corner. */
  .video-facade img.sys-play {
    top: auto;
    bottom: -4px;
    left: -4px;
    width: 80px;
    height: 80px;
    transform: none;
  }
}

/* Badges: icon beside title + toggle; tap to reveal the description below.
   <details name> keeps one open. flex-start so only the open badge grows. */
.sys-badges {
  align-items: flex-start;
  margin-top: var(--space-8);
}

.sys-badge summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  list-style: none;
  cursor: pointer;
}

.sys-badge summary::-webkit-details-marker {
  display: none;
}

.sys-badge summary > img {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sys-badge summary:hover > img,
.sys-badge summary:focus-visible > img {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(0, 133, 232, 0.18);
}

.sys-badge-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  min-width: 0;
}

.sys-badge h3 {
  margin: 0;
  font-size: 20px;
}

.sys-badge-toggle {
  position: relative;
  width: 12px;
  height: 12px;
  transition: transform 0.2s ease;
}

.sys-badge-toggle::before,
.sys-badge-toggle::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  width: 2px;
  height: 12px;
  border-radius: 4px;
  background: var(--sm-text);
}

.sys-badge-toggle::after {
  transform: rotate(90deg);
}

.sys-badge[open] .sys-badge-toggle,
.sys-explainer-toggle[aria-expanded="true"] .sys-badge-toggle {
  transform: rotate(45deg);
}

/* Hover/focus nudge: a further 22.5° turn and a slight grow, from whichever state it's in. */
.sys-badge summary:hover .sys-badge-toggle,
.sys-badge summary:focus-visible .sys-badge-toggle,
.sys-explainer-toggle:hover .sys-badge-toggle,
.sys-explainer-toggle:focus-visible .sys-badge-toggle {
  transform: rotate(22.5deg) scale(1.2);
}

.sys-badge[open] summary:hover .sys-badge-toggle,
.sys-badge[open] summary:focus-visible .sys-badge-toggle,
.sys-explainer-toggle[aria-expanded="true"]:hover .sys-badge-toggle,
.sys-explainer-toggle[aria-expanded="true"]:focus-visible .sys-badge-toggle {
  transform: rotate(67.5deg) scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  .sys-badge-toggle,
  .sys-badge summary > img {
    transition: none;
  }
}

.sys-badge p {
  margin: 0;
  padding: var(--space-2);
  font-size: var(--font-sm);
  border: 1px solid var(--sm-blue-light);
  border-radius: 0 0 16px 16px;
  border-top: none;
}

/* Desktop: the open text floats under its badge, over the content below, so nothing moves. */
@media (min-width: 993px) {
  .sys-badge {
    position: relative;
  }

  .sys-badge p {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    background: var(--sm-white);
    box-shadow: var(--soft-shadow);
    /* Clip the shadow at the top edge so the panel joins its badge with no seam. */
    clip-path: inset(0 -16px -16px -16px);
  }
}

@media (max-width: 992px) {
  .sys-badges {
    margin-top: var(--space-5);
  }

  .sys-badge {
    border-bottom: 1px solid var(--sm-blue-light);
  }

  .sys-badge p {
    padding: 0 var(--space-3) var(--space-3) 0;
    border: 0;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .sys-badge summary {
    padding: var(--space-2) 0;
  }

  .sys-badge p {
    padding: 0 0 var(--space-2);
  }
}

/* == ICON + TEXT FEATURE GRID (Why use / Enterprise) == */
.sys-features {
  row-gap: var(--space-5);
}

.sys-features .stack {
  gap: var(--space-1);
  padding-right: var(--space-3);
}

.sys-features .stack > img {
  width: auto;
  height: 40px;
  margin-bottom: var(--space-1);
}

/* == WHAT IS + WHY USE + BOOK A CALL ==
   Two stacked video cards beside the booker (Figma 10:864). Expanding one fills the
   column and hides the other (a view transition in /shared/system-page.js).
   Clarity showed few visitors reached these sections, hence the compact default. */
.sys-explain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 452px;
  gap: var(--space-2);
}

.sys-explainer {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 21px;
  padding: var(--space-1);
  border: 1px solid var(--sm-grey-3);
  border-radius: var(--space-3);
  background: var(--sm-white);
}

/* Collapsed cards are clickable as a whole (system-page.js), with the bento hover. */
.sys-explainer:not(.is-expanded) {
  cursor: pointer;
  transition: box-shadow 0.3s ease;
}

.sys-explainer:not(.is-expanded):hover {
  box-shadow: var(--soft-shadow);
}

.sys-explainer:not(.is-expanded):hover .sys-badge-toggle {
  transform: rotate(22.5deg) scale(1.2);
}

.sys-explainer:nth-child(1) {
  view-transition-name: sys-explainer-1;
}

.sys-explainer:nth-child(2) {
  view-transition-name: sys-explainer-2;
}

/* Size containment lets the video cover-crop off the box (cq units) and keeps the
   iframe from sizing the card. */
.sys-explainer-media {
  position: relative;
  flex: 0 0 333px;
  align-self: stretch;
  border-radius: var(--space-3);
  overflow: hidden;
  background: var(--sm-grey-3);
  container-type: size;
}

.sys-explainer:nth-child(2) .sys-explainer-media {
  order: 1;
}

.sys-explainer-media img,
.sys-explainer-media video,
.sys-explainer-media iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sys-explainer-media img,
.sys-explainer-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A product UI image is fitted, not cropped, since cover would cut off its frame. */
.sys-explainer-media.is-ui {
  background: none;
}

.sys-explainer-media.is-ui img {
  object-fit: contain;
}

/* 16:9 player scaled to cover the box, whatever its shape. */
.sys-explainer-media iframe {
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  border: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.sys-explainer-media iframe.is-playing {
  opacity: 1;
}

/* Native loop (data-video): sits exactly on its poster (same crop rules as the img above),
   so the reveal is a pure fade with no shift. */
.sys-explainer-media video {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sys-explainer-media video.is-playing {
  opacity: 1;
}

.sys-explainer-copy {
  display: flex;
  flex: 1 1 0;
  gap: var(--space-1);
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: var(--space-1);
}

.sys-explainer h2,
.sys-booking h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  text-transform: none;
}

.sys-explainer-copy p {
  margin: 0;
  font-size: 18px;
}

.sys-explainer-teaser {
  margin-top: 2px;
}

.sys-explainer-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sm-blue);
  font: inherit;
  font-size: var(--font-sm);
  cursor: pointer;
}

.sys-explainer-toggle .sys-badge-toggle::before,
.sys-explainer-toggle .sys-badge-toggle::after {
  background: currentColor;
}

/* Open, the toggle is the x alone; the label stays for screen readers. */
.sys-explainer.is-expanded .sys-explainer-toggle span:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Expanded: one card fills the column. Close (x) first, then the copy, then the CTAs. */
.sys-explainers.has-expanded .sys-explainer:not(.is-expanded) {
  display: none;
}

.sys-explainer.is-expanded {
  flex-direction: column;
  align-items: stretch;
}

.sys-explainer.is-expanded .sys-explainer-media {
  flex: 1 1 auto;
  order: 0;
  min-height: 216px;
}

.sys-explainer.is-expanded .sys-explainer-copy {
  flex: none;
  padding: var(--space-3);
  border: 1px solid var(--sm-blue);
  border-radius: var(--space-3);
  box-shadow: var(--soft-shadow);
}

/* Open, the x shares the heading's row, top right; everything else spans both columns. */
.sys-explainer.is-expanded .sys-explainer-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3);
  align-content: start;
}

.sys-explainer.is-expanded .sys-explainer-copy > * {
  grid-column: 1 / -1;
}

.sys-explainer.is-expanded .sys-explainer-copy h2 {
  grid-column: 1;
  grid-row: 1;
}

.sys-explainer.is-expanded .sys-explainer-toggle {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
}

.sys-explainer.is-expanded .sys-explainer-teaser {
  display: none;
}

.sys-explainer-more:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2px;
}

.sys-explainer-more .button-group {
  margin-top: 12px;
}

/* Why use: no video once open; the close sits top, the copy settles to the bottom. */
.sys-explainer.is-text-expanded.is-expanded .sys-explainer-media {
  display: none;
}

.sys-explainer.is-text-expanded.is-expanded .sys-explainer-copy {
  flex: 1 1 auto;
}

/* No media to frame, so no inner panel: the copy sits in the card at its collapsed padding. */
.sys-explainer.is-text-expanded.is-expanded .sys-explainer-copy {
  grid-template-rows: auto auto 1fr;
  padding: var(--space-1);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Open, the system chip leads top left with the x beside it, and the heading drops below. */
.sys-explainer.is-text-expanded.is-expanded .sys-explainer-chip {
  display: block;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.sys-explainer.is-text-expanded.is-expanded .sys-explainer-copy h2 {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Spare height splits evenly above the grid and above the buttons: heading top, CTAs bottom.
   The copy's flex-start alignment carries into the grid, so the block is told to stretch. */
.sys-explainer.is-text-expanded.is-expanded .sys-explainer-more {
  align-self: stretch;
}

.sys-explainer.is-text-expanded.is-expanded .sys-explainer-more > * {
  margin-top: auto;
}

.sys-explainer.is-text-expanded.is-expanded .sys-explainer-more {
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.sys-explainer.is-text-expanded .sys-explainer-more .button-group {
  margin-top: 0;
}

.sys-explainer.is-text-expanded.is-expanded .sys-explainer-more .button-group {
  margin-top: auto;
}

.sys-why-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-2);
}

.sys-why-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-right: var(--space-2);
}

.sys-why-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sys-why-head img {
  flex: 0 0 auto;
  width: auto;
  height: 40px;
}

/* One step under the card's 24px h2, so the benefits read as its children. */
.sys-why-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.sys-why-item p {
  color: var(--sm-text-body);
}

/* The card snapshots aren't clipped by default, so a tall open card spilled past the
   shrinking card on collapse. Clip to the card, show snapshots unscaled, and pin each to
   the edge that stays put: the top card grows down, the bottom card grows up. */
::view-transition-group(sys-explainer-1),
::view-transition-group(sys-explainer-2) {
  overflow: clip;
  border-radius: var(--space-3);
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

::view-transition-old(sys-explainer-1),
::view-transition-new(sys-explainer-1),
::view-transition-old(sys-explainer-2),
::view-transition-new(sys-explainer-2) {
  width: 100%;
  height: 100%;
  object-fit: none;
  object-position: top;
}

::view-transition-old(sys-explainer-2),
::view-transition-new(sys-explainer-2) {
  object-position: bottom;
}

/* Desktop, cards stacked beside the booker: both cards keep their rows, and an expanded
   card spans both rows on top of the other. Collapsing reveals the card that was under it
   all along. The toggled card's transition group is lifted so it stays on top mid-animation. */
@media (min-width: 1201px) {
  .sys-explainers {
    display: grid;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }

  .sys-explainer:nth-child(1) {
    grid-area: 1 / 1 / 2 / 2;
  }

  .sys-explainer:nth-child(2) {
    grid-area: 2 / 1 / 3 / 2;
  }

  .sys-explainers.has-expanded .sys-explainer:not(.is-expanded) {
    display: flex;
  }

  .sys-explainer.is-expanded {
    position: relative;
    z-index: 2;
    grid-row: 1 / 3;
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

html[data-explainer-front="1"]::view-transition-group(sys-explainer-1),
html[data-explainer-front="2"]::view-transition-group(sys-explainer-2) {
  z-index: 2;
}

/* Booker: Calendly's narrow layout (404px wide) in a gradient card. Its iframe is
   transparent around Calendly's white card, so the gradient shows through. */
.sys-booking {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--sm-border);
  border-radius: var(--space-3);
  background: var(--sm-white);
  container-type: inline-size;
}

.sys-booking h2 {
  text-align: center;
}


.sys-booking .sys-booking-embed {
  align-self: stretch;
  margin-top: var(--space-2);
}

/* Stacked under the cards, the booker is wide enough for Calendly's two-pane layout,
   which pads ~66px above and below its card inside the iframe; trim most of it. */
@container (min-width: 897px) {
  .sys-booking-embed.is-loaded {
    margin-top: -50px;
    margin-bottom: -38px;
  }
}

@media (max-width: 1200px) {
  .sys-explain-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .sys-explainers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sys-explainers.has-expanded {
    grid-template-columns: minmax(0, 1fr);
  }

  .sys-explainer:not(.is-expanded) {
    flex-direction: column;
    align-items: stretch;
  }

  .sys-explainer:not(.is-expanded) .sys-explainer-media {
    flex: none;
    order: 0;
    aspect-ratio: 16 / 9;
  }

  .sys-explainer:not(.is-expanded) .sys-explainer-copy {
    padding: 0 var(--space-3) var(--space-3);
  }

  .sys-explainer.is-expanded:not(.is-text-expanded) .sys-explainer-media {
    flex: none;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .sys-explainers {
    grid-template-columns: minmax(0, 1fr);
  }

  .sys-explainer:not(.is-expanded) {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1);
    border-radius: var(--space-3);
  }

  .sys-explainer:not(.is-expanded) .sys-explainer-media {
    flex: 0 0 96px;
    height: 96px;
    aspect-ratio: auto;
    align-self: center;
    border-radius: var(--space-3);
  }

  .sys-explainer:not(.is-expanded) .sys-explainer-copy {
    padding: var(--space-1) var(--space-1) var(--space-1) 0;
  }

  .sys-explainer h2 {
    font-size: 20px;
  }

  .sys-why-head h3 {
    font-size: 18px;
  }

  .sys-explainer-copy p {
    font-size: var(--font-sm);
  }

  .sys-explainer.is-expanded .sys-explainer-copy {
    padding: var(--space-2);
  }

  .sys-why-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .sys-booking {
    padding: var(--space-3) var(--space-1) var(--space-1);
  }
}

/* Calendly lightbox. 1000 x 700 is the size where Calendly shows the calendar and the
   time slots side by side; smaller screens get the stacked layout, scrolling inside. */
.calendly-modal {
  width: min(100vw - 32px, 1000px);
  max-width: none;
  height: min(100dvh - 32px, 700px);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--sm-white);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.calendly-modal::backdrop {
  background: rgba(46, 57, 64, 0.6);
}

html:has(.calendly-modal[open]) {
  overflow: hidden;
}

.calendly-modal[open] {
  display: flex;
  flex-direction: column;
}

.calendly-modal-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--gradient-light);
}

/* "Australia and New Zealand. Change region ->": which team's calendar is showing; clicking it
   swaps to the routing form's region question. */
.calendly-region {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sm-text);
  font: inherit;
  font-size: var(--font-sm);
  cursor: pointer;
}

.calendly-region-change {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: 0.3em;
}

@media (max-width: 768px) {
  .calendly-region {
    flex-direction: column;
    gap: 2px;
  }

  .calendly-region-change {
    margin-left: 0;
  }
}

.calendly-region img {
  width: 15px;
  height: auto;
  transition: transform 0.2s ease;
}

.calendly-region:hover img,
.calendly-region:focus-visible img {
  transform: translateX(4px);
}

.calendly-modal .calendly-region {
  align-self: center;
  margin: 0;
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-2);
}

.calendly-modal[open] {
  background: var(--gradient-light);
}

/* widget.js injects an unstyled spinner beside the iframe (we don't load Calendly's CSS). */
.calendly-modal-frame .calendly-spinner {
  display: none;
}

.calendly-modal-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--sm-white);
}

.calendly-modal-status {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--sm-text);
}

.calendly-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sm-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.calendly-modal-close::before,
.calendly-modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  border-radius: 4px;
  background: var(--sm-text);
  transform: translate(-50%, -50%) rotate(45deg);
}

.calendly-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.calendly-modal-close:hover,
.calendly-modal-close:focus-visible {
  transform: rotate(90deg) scale(1.1);
}

@media (max-width: 768px) {
  .calendly-modal {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .calendly-modal-close {
    transition: none;
  }
}

/* Fixed height: Calendly's later steps (times, details) scroll inside its iframe rather
   than resizing the card, which made the row jump around. Sized to the calendar step. */
.sys-booking-embed {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 610px;
}

/* Stacked full width, Calendly shows calendar and times side by side (as in the lightbox). */
@media (max-width: 1200px) {
  .sys-booking-embed {
    height: 700px;
  }
}

@media (max-width: 768px) {
  .sys-booking-embed {
    height: 640px;
  }
}

.sys-booking-embed.is-loading,
.sys-booking-embed.is-loaded {
  display: block;
}

.sys-booking-embed.is-loading .blue-buttons {
  visibility: hidden;
}

.sys-booking-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.sys-booking-embed .calendly-spinner {
  display: none;
}

/* == USE CASES (alternating copy + form preview) == */
/* Sized so the first sentence ends the line ("…safety workflows."). */
.sys-usecases-intro {
  max-width: 940px;
}

.sys-usecase {
  margin-bottom: var(--space-5);
}

.sys-usecase .split {
  align-items: flex-start;
  margin-top: var(--space-4);
}

/* A live form matches the copy column's height and scrolls inside. Its scroll box has a
   zero flex basis, so the copy alone sets the row height. */
.sys-usecase .split:has(.form-preview) {
  align-items: stretch;
}

.sys-usecase .image-card-frame:has(.form-preview) {
  display: flex;
  flex-direction: column;
  border-radius: var(--space-2);
}

.sys-usecase .form-preview {
  flex: 1 1 0;
  min-height: 0;
  border-radius: var(--space-1);
}

.sys-usecase .form-preview-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
}

/* Once the split wraps to one column there's no copy beside it, so it gets a set height. */
@media (max-width: 820px) {
  .sys-usecase .form-preview,
  .sys-usecase .form-preview-scroll {
    flex: none;
  }

  .sys-usecase .form-preview-scroll {
    height: 520px;
  }
}

@media (max-width: 768px) {
  .sys-usecase .form-preview-scroll {
    height: 440px;
  }
}

.sys-usecase-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.sys-usecase-points h4 {
  font-size: var(--font-body);
  margin: 0 0 var(--space-1);
}

.sys-usecase-points p {
  margin: 0;
}

/* height:auto, or the img height attribute holds 633px while max-width narrows it. */
.sys-usecase-snippet {
  max-width: 520px;
}

.sys-usecase .grey-buttons {
  align-self: flex-start;
  margin-top: var(--space-4);
}

.sys-usecase .grey-buttons img {
  width: 14px;
}

.sys-usecase .image-card-frame > img {
  height: 560px;
  object-position: top center;
}

/* Desktop only: even rows put the form on the left. Below the split's wrap point
   the copy always comes first. */
@media (min-width: 993px) {
  .sys-usecase.is-flipped .image-card-frame {
    order: -1;
  }
}

/* == TESTIMONIAL BAND == */
.sys-quote {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  align-items: center;
}

.sys-quote-logos {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sys-quote-logos img {
  height: 28px;
  width: auto;
}

.sys-quote-logos .sys-quote-divider {
  width: 1px;
  height: 40px;
  background: var(--sm-grey-4);
}

/* base.css gives blockquote the blog's left rule; the testimonial is centred and bare. */
.sys-quote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 32px;
  line-height: 1.5;
  color: var(--sm-text);
}

/* == FEATURE BENTO (Figma 34:4690) == */
/* UI mocks and photos are flat exports; the shadow lives here because Figma bakes it into the export size. */
.sys-bento .bento-col {
  gap: var(--space-4);
  padding: var(--space-3);
  overflow: hidden;
}

.sys-bento .bento-col:hover {
  box-shadow: none;
}

.sys-bento .stack {
  gap: var(--space-1);
}

.sys-bento .stack > * {
  margin: 0;
}

.sys-bento .is-small h3 {
  font-size: 20px;
}

.sys-bento-ui,
.sys-bento-media {
  display: block;
  max-width: 100%;
  height: auto;
}

.sys-bento-media {
  box-shadow: var(--soft-shadow);
}

/* The mocks carry their own rounded corners, which shrink when the image scales down. A CSS radius
   would clip their border, so the shadow follows the image's shape instead (same values as --soft-shadow). */
.sys-bento-ui {
  filter: drop-shadow(var(--soft-shadow));
}

/* Photo cards: the photo bleeds off the card's bottom edge. */
.sys-bento .is-bleed {
  padding-bottom: 0;
}

/* 608:237 is what the desktop card shows; cropping to it everywhere hides the export's rounded bottom corners. */
.sys-bento-media {
  width: 100%;
  margin-top: auto;
  aspect-ratio: 608 / 237;
  object-fit: cover;
  object-position: top;
  border-radius: var(--space-3) var(--space-3) 0 0;
}

.sys-bento-media.is-flush {
  border-radius: var(--space-4) var(--space-4) 0 0;
}

/* Small cards: copy and mock pushed to opposite ends. */
.sys-bento .is-small {
  justify-content: space-between;
}

/* Split cards: copy on the left, a mock on the right. */
.sys-bento .is-split {
  flex-direction: row;
  gap: var(--space-5);
}

.sys-bento .is-split.is-bottom {
  align-items: flex-end;
}

.sys-bento .is-split > .stack,
.sys-bento-side {
  flex: 1 1 0;
  min-width: 0;
}

.sys-bento .is-split > .sys-bento-ui {
  flex: 0 1 auto;
  width: 327px;
  align-self: flex-start;
}

.sys-bento .is-split.is-bottom > .sys-bento-ui {
  align-self: auto;
}

.sys-bento-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Wallet or Purse: the tile swaps between the two names' icons, as on /software/sitemate/. */
.wallet-tile {
  position: relative;
  display: block;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 13px;
  background: var(--sm-white);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.05);
}

.wallet-swap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 29px;
  height: 29px;
  transform: translate(-50%, -50%);
  animation: wallet-swap 5s ease-in-out infinite;
}

.wallet-swap.is-purse {
  animation-delay: -2.5s;
}

@keyframes wallet-swap {
  0%,
  42% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  50%,
  92% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-swap {
    animation: none;
  }

  .wallet-swap.is-purse {
    opacity: 0;
  }
}

/* The wallet runs off the bottom of its card. */
.sys-bento-ui.is-wallet {
  width: 312px;
  margin-bottom: -48px;
}

@media (min-width: 1325px) {
  .sys-bento .custom-col-6 {
    height: 393px;
  }

  .sys-bento .is-small {
    height: 445px;
  }
}

/* Two columns: the wide cards take a row each so their split layout holds, and the
   export card takes the row the two small cards leave. */
@media (min-width: 769px) and (max-width: 1324px) {
  .sys-bento .custom-col-6,
  .sys-bento .is-small + .is-small + .is-small {
    flex: 0 0 100%;
  }

  .sys-bento .custom-col-6 {
    height: 393px;
  }
}

@media (max-width: 768px) {
  .sys-bento .bento-col {
    gap: var(--space-3);
  }

  .sys-bento .is-split {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .sys-bento .is-split > .stack,
  .sys-bento-side {
    flex: none;
  }

  .sys-bento-side {
    gap: var(--space-3);
  }
}

/* == ART PANEL (compliance badges) == */
.sys-art-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  border-radius: var(--space-2);
  background: var(--sm-blue-light);
}

.sys-art-panel img {
  width: 100%;
  max-width: 360px;
}

/* == FLOWSITE / API / MCP == */
.sys-flowsite-card {
  flex-direction: row;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4);
}

.sys-flowsite-card > * {
  flex: 1 1 0;
  min-width: 0;
}

.sys-flowsite-card lottie-player {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* Fleet's Flowsite diagram: Gearbelt -> Flowsite -> the destinations Gearbelt supports.
   The shared Lottie shows Dashpivot's connectors, which Gearbelt doesn't have. */
.sys-flow {
  margin: 0;
  padding: var(--space-2);
  border-radius: var(--space-3);
}

.sys-flow svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.sys-flow-line {
  fill: none;
  stroke: var(--sm-blue);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  opacity: 0.5;
  animation: sys-flow-dash 1.2s linear infinite;
}

@keyframes sys-flow-dash {
  to {
    stroke-dashoffset: -20;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sys-flow-line,
  .sys-flow.animated-gradient-light {
    animation: none;
  }
}

/* SVG can't take box-shadow; same values as --soft-shadow. */
.sys-flow-card rect,
.sys-flow svg > image {
  filter: drop-shadow(var(--soft-shadow));
}

.sys-flow-card rect {
  fill: var(--sm-white);
  stroke: var(--sm-blue);
}

.sys-flow-card text {
  fill: var(--sm-text);
  font-family: "Sunflower", sans-serif;
  font-size: var(--font-xs);
  font-weight: 500;
  dominant-baseline: central;
}

@media (max-width: 768px) {
  .sys-flowsite-card {
    flex-direction: column;
    padding: var(--space-2);
  }
}

.sys-code-art {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 8px;
}

/* Open API code window, built in HTML so the example can be per system. Colours are the
   dark palette the old SVG used. */
.sys-code {
  width: 100%;
  max-width: 360px;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #1e1e2e;
  color: var(--sm-grey-4);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
}

.sys-code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #181825;
}

.sys-code-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f38ba8;
}

.sys-code-bar span:nth-child(2) {
  background: #f9e2af;
}

.sys-code-bar span:nth-child(3) {
  background: #fab387;
}

.sys-code-bar code {
  margin-left: var(--space-1);
  font: inherit;
  font-size: 12px;
  color: #c1daf4;
}

.sys-code pre {
  margin: 0;
  padding: var(--space-2) 18px 20px;
  overflow-x: auto;
  font: inherit;
  white-space: pre;
}

.sys-code pre code {
  font: inherit;
}

.sys-code-req {
  color: var(--sm-blue-light);
}

.sys-code-ok,
.sys-code-str {
  color: var(--sm-yellow);
}

.sys-code-key {
  color: #c1daf4;
}

.sys-code-num {
  color: #fab387;
}

/* == CUSTOMER STORIES == */
.sys-story {
  padding: var(--space-1);
  gap: var(--space-3);
}

/* height:auto, or the img height attribute beats aspect-ratio and leaves a tall blank box. */
.sys-story img.sys-story-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Product logo and industry share one line. */
.sys-story-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.sys-story-meta > * {
  margin: 0;
}

.sys-story .card-body .product-logo {
  width: auto;
  height: 24px;
  margin: 0;
}

/* The | between logo and industry. */
.sys-story-meta .eyebrow-sm {
  padding-left: var(--space-2);
  border-left: 1px solid var(--sm-border);
}

.sys-story .card-body > * {
  margin: 0;
}

/* Hang the opening quotation mark so the quote's text lines up with the heading. */
.sys-story .card-body > p {
  text-indent: -0.4em;
  hanging-punctuation: first;
}

@supports (hanging-punctuation: first) {
  .sys-story .card-body > p {
    text-indent: 0;
  }
}

.sys-story .eyebrow-sm {
  font-size: var(--font-xs);
}

.sys-story.is-row {
  flex-direction: row;
  align-items: center;
}

/* Fills the card's height whatever the row grows to; object-fit crops. */
.sys-story.is-row img.sys-story-photo {
  flex: 0 0 auto;
  align-self: stretch;
  width: 40%;
  min-height: 0;
  aspect-ratio: auto;
}

.sys-story.is-row .card-body {
  flex: 1 1 0;
  min-width: 0;
}

/* 16:9 is the floor; the photo takes any height the stretched card has spare. */
.sys-story.is-tall img.sys-story-photo {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

/* Equal rows: both cards take the taller one's height, and the tall card beside them stretches to match. */
.sys-stories-col {
  display: grid;
  grid-auto-rows: 1fr;
  gap: var(--space-2);
}

@media (max-width: 768px) {
  .sys-story.is-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sys-story.is-row img.sys-story-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* == SET-UP STEPS (vertical timeline) == */
.sys-steps {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.sys-steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 var(--space-5) var(--space-6);
  color: inherit;
}

/* The line runs from this dot to the next, so the last step has none. */
.sys-steps > li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: -14px;
  width: 2px;
  background: var(--sm-blue-light);
}

.sys-steps > li:last-child::before {
  display: none;
}

.sys-steps > li::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sm-blue);
  box-shadow: 0 0 0 4px var(--sm-white);
}

.sys-steps h3 {
  margin: 0 0 var(--space-1);
}

.sys-steps ul {
  margin-top: var(--space-2);
}

.sys-steps .checklist-tick li {
  margin-bottom: 0;
}

/* == DIGITAL VS LEGACY COMPARISON == */
.sys-compare-wrap {
  padding: var(--space-3);
  border: 1px solid var(--sm-border);
  border-radius: var(--space-3);
  background: var(--sm-white);
}

.sys-compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.sys-compare th,
.sys-compare td {
  padding: var(--space-3) var(--space-2);
  text-align: center;
  font-size: var(--font-sm);
  color: var(--sm-text-body);
  border-bottom: 1px solid var(--sm-border);
}

.sys-compare th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--sm-text);
}

.sys-compare thead th {
  font-size: var(--font-h3);
  font-weight: 500;
  color: var(--sm-text);
}

.sys-compare tbody tr:last-child > * {
  border-bottom: 0;
}

.sys-compare thead th:first-child {
  width: 30%;
}

.sys-compare thead .product-logo {
  height: 28px;
  margin: 0;
}

/* The highlighted product column: side borders on every cell, capped top and bottom. */
.sys-compare .is-ours {
  border-left: 1px solid var(--sm-blue);
  border-right: 1px solid var(--sm-blue);
  background: var(--sm-blue-pale);
}

.sys-compare thead .is-ours {
  border-top: 1px solid var(--sm-blue);
  border-radius: var(--space-2) var(--space-2) 0 0;
}

.sys-compare tbody tr:last-child .is-ours {
  border-bottom: 1px solid var(--sm-blue);
  border-radius: 0 0 var(--space-2) var(--space-2);
}

@media (max-width: 768px) {
  .sys-compare-wrap {
    padding: var(--space-1);
  }

  .sys-compare th,
  .sys-compare td {
    padding: var(--space-2) var(--space-1);
    font-size: var(--font-xs);
  }

  .sys-compare thead th {
    font-size: var(--font-sm);
  }

  .sys-compare thead .product-logo {
    height: 18px;
  }
}

/* Trusted-by logos sit inside the hero, on its white. */
.sys-hero-logos {
  margin-top: var(--space-8);
}

/* == PHONES: CTA swap, floating CTA bar, lighter hero and explainers ==
   On phones every Try for free / Watch demo pair becomes Watch demo + Book a call. */
.sys-cta-mobile,
.sys-mobile-cta {
  display: none;
}

@media (max-width: 768px) {
  .sys-cta-desktop,
  .sys-lockup,
  .sys-explainer:not(.is-expanded) .sys-explainer-media {
    display: none;
  }

  /* The hero video leads on phones, above the H1. */
  .sys-hero-media {
    order: -1;
  }

  /* base.css gives the first section 64px at every width; with the video leading that reads as a gap. */
  main > section:first-of-type {
    padding-top: var(--space-1);
  }

  .sys-cta-mobile {
    display: flex;
  }

  .sys-explainer:not(.is-expanded) .sys-explainer-copy {
    padding: var(--space-1);
  }

  .sys-mobile-cta {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    gap: var(--space-1);
    padding: 12px var(--space-2) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--sm-border);
    background: var(--sm-white);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .sys-mobile-cta.is-visible {
    transform: none;
  }

  .sys-mobile-cta a {
    flex: 1 1 0;
    justify-content: center;
    margin: 0;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .sys-mobile-cta {
    transition: none;
  }
}

/* Digital signatures bento card: a live Sign to approve button (system-page.js). */
.sys-sign-mock {
  width: 298px;
  max-width: 100%;
  padding: 17px;
  border: 1px solid var(--sm-blue);
  border-radius: var(--space-1);
  background: var(--sm-white);
  filter: drop-shadow(var(--soft-shadow));
}

.sys-sign {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 76px;
  padding: 0 var(--space-2);
  border: 1px solid #8ed590;
  border-radius: 6px;
  background: #8ed590;
  color: var(--sm-white);
  font: 500 24px/1 var(--font-body, Roboto, sans-serif);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sys-sign:hover,
.sys-sign:focus-visible {
  background: #7ccb7f;
}

.sys-sign-label {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.sys-sign-label img {
  width: 24px;
  height: auto;
}

.sys-sign-ink,
.sys-sign-done {
  display: none;
}

.sys-sign[aria-pressed="true"] {
  border-color: var(--sm-blue);
  background: var(--sm-white);
}

.sys-sign[aria-pressed="true"] .sys-sign-label {
  display: none;
}

/* Shown again on each sign, so the draw animation replays. */
.sys-sign[aria-pressed="true"] .sys-sign-ink {
  display: block;
  width: 56px;
  height: auto;
  animation: form-preview-sign 0.7s ease-out;
}

.sys-sign[aria-pressed="true"] .sys-sign-done {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: block;
  color: #3f9d43;
  font-size: 11px;
}

/* Photo card: the stamped photo runs off the bottom of the card. */
.sys-bento .is-split > .sys-bento-ui.is-photo {
  width: 312px;
  height: auto;
  align-self: center;
}

/* Relationship card: three steps cross-fade, as on /software/dashpivot/. Each frame carries its own
   border and background, so it is fitted whole (never cropped) into the space under the copy. */
.sys-bento-anim {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.sys-bento-anim img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left bottom;
  animation: sys-step 9s ease-in-out infinite;
}

@media (max-width: 1324px) {
  .sys-bento-anim {
    flex: none;
    aspect-ratio: 2464 / 1156;
  }
}

.sys-bento-anim img:nth-child(2) {
  animation-delay: -6s;
}

.sys-bento-anim img:nth-child(3) {
  animation-delay: -3s;
}

@keyframes sys-step {
  0%,
  30% {
    opacity: 1;
  }

  34%,
  96% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sys-bento-anim img {
    animation: none;
    opacity: 0;
  }

  .sys-bento-anim img:last-child {
    opacity: 1;
  }
}

/* Loops whose Storm overlay sits on the left: anchor the crop to the right so the square card hides it. */
.sys-explainer:not(.is-expanded) .sys-explainer-media.is-crop-right img,
.sys-explainer:not(.is-expanded) .sys-explainer-media.is-crop-right video {
  object-position: right center;
  transform: translate(-50%, -50%) scale(1.12);
  transform-origin: right center;
}

.sys-explainer:not(.is-expanded) .sys-explainer-media.is-crop-right iframe {
  left: auto;
  right: 0;
  width: max(112cqw, 199.1cqh);
  height: max(112cqh, 63cqw);
  transform: translateY(-50%);
}

/* Wide explainers (Figma 31:1728): the collapsed card shows a 3:2 crop of the loop, beside the
   heading and the + alone. Why use mirrors it, copy right-aligned. Desktop only; below 1200px
   the cards already stack with a full-width 16:9 video. */
.sys-explainer-chip {
  display: none;
  width: 40px;
  height: 40px;
  align-self: flex-start;
  margin-bottom: var(--space-2);
}

.sys-explainer:nth-child(2) .sys-explainer-chip {
  align-self: flex-end;
}

@media (min-width: 1201px) {
  .sys-explain-row.is-wide .sys-explainers,
  .sys-explain-row.is-wide .sys-explainer {
    min-width: 0;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media {
    flex: 0 1 auto;
    aspect-ratio: 3 / 2;
    min-width: 0;
    max-width: calc(100% - 320px);
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-toggle span:first-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-chip {
    display: block;
  }

  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-copy {
    align-items: flex-end;
    text-align: right;
  }

  /* Centred crop, with no is-crop-right zoom (that is for the square card). */
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media img,
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media video {
    transform: none;
    top: 0;
    left: 0;
    object-position: center;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media iframe {
    left: 50%;
    right: auto;
    width: max(100cqw, 177.78cqh);
    height: max(100cqh, 56.25cqw);
    transform: translate(-50%, -50%);
  }
}

/* From 1325px the box is near 3:2, so the crop can lean toward the loop's Storm overlay
   (is-overlay-left / -right) and keep it whole without losing the people. */
@media (min-width: 1325px) {
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media.is-overlay-left img {
    object-position: left center;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media.is-overlay-right img {
    object-position: right center;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media.is-overlay-left iframe {
    left: 0;
    right: auto;
    transform: translateY(-50%);
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media.is-overlay-right iframe {
    left: auto;
    right: 0;
    transform: translateY(-50%);
  }
}

.sys-stories-heading {
  max-width: 775px;
}

/* 13.5em fits "When The Inspection Finishes" (12.75em) but not "...That Finish When" (14.4em). */
.sys-h1-quality {
  max-width: 13.5em;
}

/* 14em fits "End-to-end fleet management" (13.45em) but not "...for" (15.09em). */
.sys-h1-fleet {
  max-width: 14em;
}

/* site-header.js loads at the end of <body>; until it upgrades, the empty element would collapse and shift <main> by the nav height. */
site-header:not(:defined) {
  display: block;
  height: var(--nav-h);
}

/* Phone mock runs off the bottom edge of its card. */
.sys-bento .is-split > .sys-bento-ui.is-phone {
  width: 200px;
  height: auto;
  align-self: flex-end;
  margin-bottom: -48px;
  filter: none;
}

/* Operator checks: a full-width bento card under the explainer and booking row. */
.sys-operator {
  margin-top: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--sm-grey-3);
  border-radius: var(--space-3);
}

.sys-operator:hover {
  box-shadow: none;
}

/* The card is a flex column, where the split's auto margins would shrink it to its content. */
.sys-operator .split {
  width: 100%;
  align-items: center;
}

.sys-operator h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  text-transform: none;
}

.sys-operator .sys-why-item + .sys-why-item {
  margin-top: var(--space-2);
}

@media (max-width: 767px) {
  .sys-operator h2 {
    font-size: 20px;
  }
}

/* Fleet use cases (Figma MKTGSITE-81 6003:4568): a fixed-height horizontal card, the UI
   preview bleeding off the bottom of a gradient panel, copy and link on the right. */
.sys-uc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.sys-uc-card {
  display: flex;
  gap: var(--space-3);
  height: 259px;
  overflow: hidden;
  border: 1px solid var(--sm-grey-3);
  border-radius: 32px;
  background: var(--sm-white);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.3s ease;
}

/* The whole card is the link: bento hover, and the arrow opens out as the link does. */
.sys-uc-card:hover {
  box-shadow: var(--soft-shadow);
}

.sys-uc-card:hover .learn-more-btn {
  gap: var(--space-2);
}

.sys-uc-media {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
  padding: 21px var(--space-3) 0;
  border-radius: 32px 32px 0 0;
  /* The Figma panel is 480px tall and the card clips it at 259, so the fade only gets
     about halfway to the end colour. */
  background: linear-gradient(180deg, var(--sm-grey-1) 0%, #c6eef3 185%);
}

.sys-uc-media img {
  align-self: flex-start;
  width: 252px;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 2.5px 10px rgba(110, 133, 158, 0.25);
}

.sys-uc-copy {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
}

.sys-uc-copy .stack {
  gap: 12px;
}

.sys-uc-copy h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.sys-uc-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.sys-uc-copy .learn-more-btn {
  align-self: flex-start;
  font-weight: 500;
}

/* Two across stops fitting the 300px panel plus copy below 1200px; one per row instead. */
@media (max-width: 1200px) {
  .sys-uc-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Phone: panel on top, copy below, card grows to its content. */
@media (max-width: 600px) {
  .sys-uc-card {
    flex-direction: column;
    height: auto;
    gap: 0;
  }

  .sys-uc-media {
    flex-basis: auto;
    height: 220px;
    overflow: hidden;
  }

  .sys-uc-copy {
    gap: var(--space-3);
    padding: var(--space-3);
  }
}

/* Fleet platform grid (Figma 765 60:7133): 2-3-2 bento on a 6-column track. Wide cards are
   650x368 rows, narrow cards 429x340 columns. */
.sys-feat {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
}

.sys-feat-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 340px;
  padding: var(--space-3);
  overflow: hidden;
  border: 1px solid var(--sm-grey-3);
  border-radius: 32px;
  background: var(--sm-white);
}

.sys-feat-card.is-wide {
  grid-column: span 3;
  flex-direction: row;
  gap: var(--space-3);
  height: 368px;
}

.sys-feat-card.is-stacked {
  flex-direction: column;
  gap: 20px;
}

.sys-feat-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.sys-feat-card.is-wide h3 {
  font-size: 24px;
}

.sys-feat-card p {
  margin: 0;
  font-size: 18px;
}

.sys-feat-card .stack {
  gap: 12px;
}

.sys-feat-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
}

.sys-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border: 1px solid var(--sm-grey-1);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
}

.sys-feat-icon img {
  width: 40px;
  height: 40px;
}

.sys-feat-photo {
  flex: 0 0 46%;
  width: 46%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: var(--space-2);
}

.sys-feat-ui {
  display: block;
  width: 100%;
  height: auto;
}

/* Asset history: the phone runs off the card's bottom edge, so the card drops its bottom
   padding and the copy column carries it instead. */
.sys-feat-card.is-phone {
  gap: var(--space-4);
  padding: var(--space-4) var(--space-3) 0;
}

.sys-feat-card.is-phone .sys-feat-col {
  padding-bottom: var(--space-3);
}

.sys-feat-phone {
  flex: 0 0 228px;
  align-self: flex-start;
}

.sys-feat-phone img {
  display: block;
  width: 228px;
  height: auto;
}

@media (max-width: 1024px) {
  .sys-feat {
    grid-template-columns: minmax(0, 1fr);
  }

  .sys-feat-card,
  .sys-feat-card.is-wide {
    grid-column: auto;
    height: auto;
    min-height: 0;
  }

  .sys-feat-card.is-wide:not(.is-stacked):not(.is-phone) {
    min-height: 340px;
  }
}

@media (max-width: 767px) {
  .sys-feat-card.is-wide {
    flex-direction: column;
  }

  /* Photo cards: photo on top as a banner, whichever side it sits on at desktop. */
  .sys-feat-photo {
    order: -1;
    flex: none;
    width: 100%;
    height: 240px;
  }

  .sys-feat-col {
    gap: var(--space-3);
  }

  .sys-feat-card.is-phone .sys-feat-col {
    padding-bottom: 0;
  }

  .sys-feat-phone {
    flex: none;
    align-self: center;
    height: 300px;
    overflow: hidden;
  }

  .sys-feat-card.is-wide h3 {
    font-size: 20px;
  }
}

/* The logo strip runs edge to edge: cancel the section's side padding (base.css section). */
section > .logo-marquee {
  margin-inline: calc(-1 * var(--space-3));
}

@media (max-width: 768px) {
  section > .logo-marquee {
    margin-inline: calc(-1 * var(--space-2));
  }
}

/* Mobile: the customer quote comes before the use cases (conversion: proof before detail).
   Visual order only; Use cases and Enterprise swap backgrounds so the bands still alternate. */
@media (max-width: 768px) {
  main:has(> .sys-quote-section) {
    display: flex;
    flex-direction: column;
  }

  main > .sys-uc-section,
  main > .sys-uc-section ~ * {
    order: 2;
  }

  main > .sys-quote-section {
    order: 1;
  }

  main > .sys-uc-section {
    background: var(--gradient-light);
  }

  main > .sys-ent-section {
    background: var(--sm-white);
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .sys-quote blockquote {
    font-size: 26px;
  }
}

/* In-page videos (not the hero): posters carry a centred title, so the play button sits
   bottom-left at every size (the hero only does this on mobile). */
.video-facade:not(.sys-hero-video) img.sys-play {
  top: auto;
  bottom: -4px;
  left: -4px;
  width: 96px;
  height: 96px;
  transform: none;
}

@media (max-width: 768px) {
  .video-facade:not(.sys-hero-video) img.sys-play {
    width: 72px;
    height: 72px;
  }
}

/* Hero video: same bottom-left button on desktop (several hero posters carry a centred title). */
@media (min-width: 769px) {
  .video-facade.sys-hero-video img.sys-play {
    top: auto;
    bottom: -4px;
    left: -4px;
    width: 120px;
    height: 120px;
    transform: none;
  }
}

/* Explainer layout v2 (Figma 92:23291), desktop, collapsed cards in the wide row: the loop and
   a copy card side by side. The copy card holds the icon top left and the heading, teaser and
   "Read more +" at its foot, left-aligned in both cards. */
@media (min-width: 1201px) {
  /* No outer card: the loop and the copy card sit as two separate cards (Figma edit, 16 Nov). */
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) {
    align-items: stretch;
    gap: var(--space-2);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media {
    flex: 0 0 62%;
    max-width: none;
    aspect-ratio: 520 / 349;
    border-radius: var(--space-3);
    box-shadow: none;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-copy,
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-copy {
    flex: 1 1 0;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
    padding: var(--space-3);
    border: 1px solid var(--sm-grey-3);
    border-radius: var(--space-3);
    background: var(--sm-white);
    box-shadow: none;
    text-align: left;
  }

  /* The icon takes the spare height, so the text stack sits at the card's foot. */
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-chip,
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-chip {
    width: 30px;
    height: 30px;
    align-self: flex-start;
    margin-bottom: auto;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-chip + h2 {
    margin-top: var(--space-4);
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-teaser {
    font-size: 18px;
    line-height: 1.5;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-toggle {
    margin-top: 12px;
  }

  /* "Read more" shows beside the + (the label was visually hidden in the earlier layout). */
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-toggle span:first-child {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: nowrap;
  }
}

/* Crop anchor so each loop's Storm UI stays in frame: the top loops carry it on the right,
   the bottom ones on the left (Quality's framing loop), so top anchors right, bottom left.
   Later and as specific as the is-overlay-* rules, so it wins in this layout. */
@media (min-width: 1201px) {
  .sys-explain-row.is-wide .sys-explainer:nth-child(1):not(.is-expanded) .sys-explainer-media img,
  .sys-explain-row.is-wide .sys-explainer:nth-child(1):not(.is-expanded) .sys-explainer-media video {
    object-position: right center;
  }

  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-media img,
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-media video {
    object-position: left center;
  }

  /* A bottom loop whose Storm UI sits on the right (Field Reporting) opts out with is-overlay-right. */
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-media.is-overlay-right img,
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded) .sys-explainer-media.is-overlay-right video {
    object-position: right center;
  }
}

/* Video boxes carry a 1px white border, collapsed and expanded. */
.sys-explainer-media.video-loop {
  border: 1px solid var(--sm-white);
}

/* A product screenshot (is-ui) fills its own bordered frame and is cropped by the radius; the
   image carries its own background, which the frame matches. Specific enough to beat the
   wide-row crop rules, so it holds in every state. */
.sys-explainer .sys-explainer-media.is-ui {
  background: #f5f9fc;
  border: 1px solid var(--sm-grey-3);
}

.sys-explainer .sys-explainer-media.is-ui img,
.sys-explain-row.is-wide .sys-explainer:nth-child(n):not(.is-expanded) .sys-explainer-media.is-ui img {
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
}

/* Hovering a collapsed card lifts both halves with the bento shadow (the whole card toggles). */
@media (min-width: 1201px) {
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media,
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-copy {
    transition: box-shadow 0.2s ease;
  }

  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded):hover .sys-explainer-media,
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded):hover .sys-explainer-copy,
  .sys-explain-row.is-wide .sys-explainer:nth-child(2):not(.is-expanded):hover .sys-explainer-copy {
    box-shadow: var(--soft-shadow);
  }
}

@media (min-width: 1201px) and (prefers-reduced-motion: reduce) {
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-media,
  .sys-explain-row.is-wide .sys-explainer:not(.is-expanded) .sys-explainer-copy {
    transition: none;
  }
}

/* Mobile: the stacked split cards (Actions, Photos) and Fleet's Asset history phone sit bottom
   left. The desktop is-bottom rule (align-items: flex-end) would otherwise right-align them. */
@media (max-width: 768px) {
  .sys-bento .is-split.is-bottom > .sys-bento-ui,
  .sys-bento .is-split > .sys-bento-ui.is-photo {
    align-self: flex-start;
    margin-top: auto;
  }
}

@media (max-width: 767px) {
  .sys-feat-phone {
    align-self: flex-start;
  }

  /* Flowsite diagram: no inner inset, and stretched (the card keeps its desktop
     align-items: center when it stacks, which shrank the figure to its content). */
  .sys-flow {
    align-self: stretch;
    width: 100%;
    padding: 0;
  }
}

/* Field Reporting mocks: Dashpivot field components rebuilt in HTML (values from Figma Components - Web). */
.sys-field-mock {
  width: 298px;
  max-width: 100%;
  padding: var(--space-2);
  border: 1px solid var(--sm-blue);
  border-radius: var(--space-1);
  background: var(--sm-white);
  color: var(--sm-text);
  font: 400 14px/1.4 Roboto, sans-serif;
  filter: drop-shadow(var(--soft-shadow));
}

.sys-field-mock.is-wide {
  width: 100%;
  max-width: 480px;
}

.sys-bento .is-split > .sys-field-mock {
  flex: 0 1 auto;
  width: 300px;
}

.sys-field-mock p {
  margin: 0;
}

.sys-field-mock-note {
  margin-top: 10px !important;
  color: var(--sm-slate);
  font-size: 12px;
}

/* Out-specifies base.css .eyebrow-sm.is-pill / .is-xs. */
.sys-field-mock .sys-field-mock-status.is-pill {
  display: flex;
  width: fit-content;
  margin-left: auto;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
}

.sys-field-mock-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.sys-field-mock-list li {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-1) 0;
  border-top: 1px solid var(--sm-grey-3);
  color: var(--sm-text);
  line-height: 1.4;
}

.sys-field-mock-list li span:first-of-type {
  flex: 1;
}

.sys-pill {
  padding: 2px var(--space-1);
  border-radius: 999px;
  background: #eaf6ea;
  color: #3f9d43;
  font-size: 12px;
  font-weight: 500;
}

.sys-pill.is-muted {
  background: var(--sm-grey-1);
  color: var(--sm-slate);
}

/* Weather field: Observed / Forecast columns, as in the product. */
.sys-weather {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  text-align: center;
}

.sys-weather th,
.sys-weather td {
  padding: 5px 4px;
  border: 0;
  border-right: 1px solid var(--sm-grey-3);
  border-bottom: 1px solid var(--sm-grey-3);
  font-weight: 400;
}

/* Left-aligned labels get room from the cell edge. */
.sys-weather th {
  padding-left: 12px;
}

.sys-weather th:first-child {
  width: 26%;
  background: var(--sm-grey-1);
  font-weight: 500;
  text-align: left;
}

.sys-weather-kind th {
  border-top: 1px solid var(--sm-grey-3);
  font-size: 12px;
  font-weight: 500 !important;
  text-align: left;
}

.sys-weather-kind th:first-child {
  border: 0;
  background: none;
}

.sys-weather-kind th:nth-child(2) {
  border-left: 1px solid var(--sm-grey-3);
  border-top-left-radius: 6px;
}

.sys-weather-kind th:last-child {
  border-top-right-radius: 6px;
}

.sys-weather thead tr:last-child th {
  border-top: 1px solid var(--sm-grey-3);
  border-top-left-radius: 6px;
}

.sys-weather tr > th:first-child {
  border-left: 1px solid var(--sm-grey-3);
}

.sys-weather .sys-weather-kind > th:first-child {
  border-left: 0;
}

.sys-weather tbody tr:last-child th {
  border-bottom-left-radius: 6px;
}

.sys-weather tbody tr:last-child td:last-child {
  border-bottom-right-radius: 6px;
}

.sys-weather-kind .is-forecast {
  background: var(--sm-blue-light);
  color: var(--sm-blue-dark);
}

.sys-weather td strong {
  display: block;
  font-weight: 700;
}

.sys-weather td img {
  display: block;
  width: 26px;
  height: auto;
  margin: 2px auto;
}

.sys-weather .is-split {
  border-left: 2px solid #c1daf4;
}

.sys-weather td:has(+ .is-split) {
  border-right: 0;
}

.sys-weather .is-num {
  font-weight: 500;
}

.sys-bento .bento-col:has(.is-weather) {
  justify-content: space-between;
}

.sys-field-mock.is-weather {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.sys-field-mock.is-weather .sys-weather {
  height: 100%;
}

/* Location field: map with the capture details below it. */
.sys-field-mock.is-location {
  padding: 0;
  overflow: hidden;
}

/* Fills the card's height; the map crops around the pin, which sits on the point the Figma marker marks. */
.sys-bento .is-split > .sys-field-mock.is-location {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.sys-location-map {
  position: relative;
  flex: 1 1 auto;
  min-height: 160px;
}

.sys-location-map img:first-child {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 59%;
}

.sys-location-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 27px;
  height: auto;
  transform: translate(-50%, -91%);
}

.sys-location-meta {
  padding: 10px 12px;
  background: var(--sm-white);
  color: var(--sm-slate);
}

.sys-location-meta .is-name {
  color: var(--sm-text);
}

@media (max-width: 767px) {
  .sys-field-mock.is-weather {
    padding: 12px;
    font-size: 12px;
  }

  .sys-weather th:first-child {
    width: 30%;
  }

  .sys-weather th {
    padding-left: var(--space-1);
  }

  .sys-weather td strong {
    white-space: nowrap;
  }

  .sys-weather td img {
    width: 22px;
  }
}

/* Activity feed in the audit panel (rows added by system-page.js). */
.sys-art-panel:has(.sys-feed) {
  padding: var(--space-4);
}

.sys-feed {
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  border: 1px solid var(--sm-blue);
  border-radius: var(--space-2);
  background: var(--sm-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sys-feed-header {
  margin: 0;
  padding: 14px var(--space-2) 10px;
  font-size: 15px;
  font-weight: 500;
}

/* Fixed height, so rows sliding in and out never move the section. */
.sys-feed-list {
  height: 220px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sys-feed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 44px;
  margin: 0;
  padding: 11px var(--space-2);
  color: var(--sm-text);
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--sm-blue-light);
  font-size: 15px;
  line-height: 22px;
  transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease, padding 0.4s ease;
}

.sys-feed-row.is-entering {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-8px);
}

.sys-feed-row.is-leaving {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.sys-feed-avatar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--sm-white);
  font-size: 10px;
  font-weight: 600;
}

.sys-feed-name {
  color: var(--sm-blue);
  font-family: var(--font-heading, Sunflower, sans-serif);
  font-weight: 500;
  white-space: nowrap;
}

.sys-feed-action {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sys-feed-time {
  flex: 0 0 auto;
  color: var(--sm-text-body);
  font-size: var(--font-xs);
  white-space: nowrap;
}
