/* Maintenance feature page: faithful copies of the Lockii app screens.
   Values mirror the app's Tailwind tokens (src/index.css) and the class
   strings of each real component, so keep them in step with the app. */

/* ---------- Page layout ---------- */

:is(.sc-maintenance, .sc-ai) .sc-cta-section.section {
  padding-top: clamp(24px, 4vw, 48px);
}

:is(.sc-maintenance, .sc-ai) .sc-faq-section {
  padding-top: clamp(56px, 8vw, 96px);
}

:is(.sc-maintenance, .sc-ai) .sc-stage {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
}

.sc-hero--backdrop {
  position: relative;
  isolation: isolate;
  min-height: clamp(820px, 100vh, 1040px);
}

.sc-hero--backdrop > .container-default {
  position: relative;
  z-index: 1;
}

.sc-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Scaled screens ---------- */

.lk-scaled {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lk-scaled[data-ready] {
  opacity: 1;
}

/* ---------- App tokens ---------- */

.lk-app {
  --lk-fg: #09090b;
  --lk-muted-fg: #71717a;
  --lk-muted: #f4f4f5;
  --lk-border: #e4e4e7;
  --lk-card: #fcfcfc;
  --lk-primary: #18181b;
  --lk-special: #c2b066;
  --lk-special-muted: #dad0a3;
  --lk-green-100: oklch(0.962 0.044 156.743);
  --lk-green-500: oklch(0.723 0.219 149.579);
  --lk-green-600: oklch(0.627 0.194 149.214);
  --lk-green-800: oklch(0.448 0.119 151.328);
  --lk-yellow-50: oklch(0.987 0.026 102.212);
  --lk-yellow-100: oklch(0.973 0.071 103.193);
  --lk-yellow-500: oklch(0.795 0.184 86.047);
  --lk-yellow-800: oklch(0.476 0.114 61.907);
  --lk-red-50: oklch(0.971 0.013 17.38);
  --lk-red-100: oklch(0.936 0.032 17.717);
  --lk-red-500: oklch(0.637 0.237 25.331);
  --lk-red-600: oklch(0.577 0.245 27.325);
  --lk-red-800: oklch(0.444 0.177 26.899);
  --lk-shadow-container:
    0 5px 5px -2.5px rgb(0 0 0 / 3%), 0 3px 3px -1.5px rgb(0 0 0 / 2%),
    0 2px 2px -1px rgb(0 0 0 / 2%), 0 1px 1px -0.5px rgb(0 0 0 / 3%),
    0 0.5px 0.5px 0 rgb(0 0 0 / 4%), 0 0 0 1px rgb(0 0 0 / 6%);
  --lk-shadow-container-bordered:
    0 5px 5px -2.5px rgb(0 0 0 / 3%), 0 3px 3px -1.5px rgb(0 0 0 / 2%),
    0 2px 2px -1px rgb(0 0 0 / 2%);
  --lk-shadow-xs: 0 3px 6px -2px rgb(0 0 0 / 2%), 0 1px 1px rgb(0 0 0 / 4%);
  --lk-shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);

  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--lk-fg);
  text-align: left;
  letter-spacing: normal;
  background: var(--lk-card);
  -webkit-font-smoothing: antialiased;
}

.lk-bare {
  background: transparent;
}

.lk-app svg {
  flex-shrink: 0;
}

:where(.lk-app) :is(h2, p) {
  margin: 0;
}

.lk-special {
  color: var(--lk-special);
}

/* ---------- Buttons ---------- */

.lk-btn {
  display: inline-flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  border-radius: 10px;
}

.lk-btn--ghost {
  color: var(--lk-muted-fg);
}

.lk-btn--secondary {
  color: var(--lk-fg);
  background: #fff;
  border: 1px solid var(--lk-border);
  box-shadow: var(--lk-shadow-container-bordered);
}

.lk-btn--xs {
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 16px;
}

.lk-btn--secondary.lk-btn--xs {
  font-weight: 400;
}

.lk-btn--ghost.lk-btn--xs {
  padding: 0 8px;
}

.lk-btn--company {
  width: 100%;
  color: #fff;
  background: var(--lk-company);
}

.lk-icon-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--lk-muted-fg);
  border-radius: 10px;
}

/* ---------- Badges, gauges, labels ---------- */

.lk-due-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 999px;
}

.lk-due-badge.is-yellow {
  color: var(--lk-yellow-500);
  background: var(--lk-yellow-50);
}

.lk-due-badge.is-red {
  color: var(--lk-red-500);
  background: var(--lk-red-50);
}

.lk-report-label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  color: var(--lk-red-600);
  white-space: nowrap;
}

.lk-gauge {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--lk-fg);
}

.lk-gauge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lk-gauge__track {
  stroke: oklch(0.708 0 0);
}

.lk-gauge__track.is-red,
.lk-gauge__value.is-red {
  stroke: var(--lk-red-500);
}

.lk-gauge__value.is-green {
  stroke: oklch(0.696 0.17 162.48);
}

.lk-gauge__value.is-amber {
  stroke: oklch(0.828 0.189 84.429);
}

/* ---------- Fleet map (FleetHealthLocations + DashboardItemsMap) ---------- */

.lk-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

.lk-map__layer {
  position: absolute;
  inset: 0;
}

.lk-map__layer--base {
  -webkit-mask-image:
    radial-gradient(
      ellipse 36% 46% at 50% 30%,
      transparent 40%,
      #000 100%
    ),
    linear-gradient(to bottom, transparent 10%, #000 64%),
    linear-gradient(to top, transparent, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(
      ellipse 36% 46% at 50% 30%,
      transparent 40%,
      #000 100%
    ),
    linear-gradient(to bottom, transparent 10%, #000 64%),
    linear-gradient(to top, transparent, #000 22%);
  mask-composite: intersect;
}

.lk-map__canvas {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  aspect-ratio: 16 / 9;
  transform: translateX(-50%);
}

.lk-map__tiles {
  display: block;
  width: 100%;
  height: 100%;
  filter: contrast(0.82) brightness(1.06);
}

.lk-map__glow {
  position: absolute;
  width: 168px;
  height: 168px;
  background: radial-gradient(
    closest-side,
    color-mix(in srgb, var(--pin) 24%, transparent),
    transparent
  );
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.lk-pin {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.lk-pin__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  background: var(--pin);
  border: 1px solid var(--lk-border);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
}

.lk-pin__tip {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 4px solid var(--pin);
  border-right: 2px solid transparent;
  border-left: 2px solid transparent;
  transform: translateX(-50%);
}

.lk-pin--location.is-large .lk-pin__dot {
  width: 32px;
  height: 32px;
}

.lk-pin--location.is-large .lk-pin__tip {
  top: 32px;
}

.lk-pin--item .lk-pin__dot {
  width: 32px;
  height: 32px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
}

.lk-pin--item .lk-pin__tip {
  top: 24px;
}

.lk-pin.is-hovered {
  z-index: 2;
}

.lk-pin.is-hovered .lk-pin__dot {
  transform: scale(1.1);
}

.lk-map-card {
  position: absolute;
  bottom: 40px;
  left: 50%;
  min-width: 256px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--lk-shadow-lg);
  transform: translateX(-50%);
}

.lk-map-card__body {
  display: block;
  padding: 8px;
}

.lk-map-card__arrow,
.lk-map-card__arrow::before {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border-top: 4px solid #e5e7eb;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transform: translateX(-50%);
}

.lk-map-card__arrow::before {
  top: -5px;
  border-top-color: #fff;
}

.lk-status-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  border-bottom: 1px solid var(--lk-border);
}

.lk-status-item__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lk-status-item__name {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.lk-status-item__product {
  font-size: 12px;
  line-height: 16px;
  color: var(--lk-muted-fg);
  white-space: nowrap;
}

.lk-map-badge {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 10px;
}

.lk-map-badge.is-yellow {
  color: var(--lk-yellow-800);
  background: var(--lk-yellow-100);
}

.lk-map-badge.is-red {
  color: var(--lk-red-800);
  background: var(--lk-red-100);
}

.lk-status-item:last-child {
  border-bottom: 0;
}

.lk-map-card__parts {
  display: block;
  padding: 8px 0 2px;
}

.lk-map-card__heading {
  display: block;
  padding: 0 4px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--lk-muted-fg);
}

.lk-map-part {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 5px 4px;
}

.lk-map-part__name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
}

.lk-map-part__due {
  font-size: 12px;
  line-height: 16px;
  color: var(--lk-muted-fg);
  white-space: nowrap;
}

/* ---------- Part rules ("Check every" in CreatePartModal) ---------- */

.lk-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lk-field__split {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.lk-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
}

.lk-rules-field {
  gap: 10px;
}

.lk-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  container-type: inline-size;
}

.lk-rule {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  overflow: hidden;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--lk-border);
  border-radius: 999px;
  box-shadow: var(--lk-shadow-xs);
}

.lk-rule__segment {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: stretch;
  border-right: 1px solid var(--lk-border);
}

.lk-rule__select {
  gap: 8px;
  padding: 0 10px;
}

.lk-rule__select svg {
  color: var(--lk-muted-fg);
  opacity: 0.5;
}

.lk-rule__text {
  padding: 0 10px;
  color: var(--lk-muted-fg);
}

.lk-rule__text.lk-special {
  color: var(--lk-special);
}

.lk-rule__number {
  justify-content: center;
  min-width: 56px;
  padding: 0 10px;
  color: var(--lk-special);
  font-variant-numeric: tabular-nums;
}

.lk-rule__tail {
  display: contents;
}

.lk-rule__remove {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 12px 0 10px;
  color: var(--lk-muted-fg);
}

.lk-rule-add {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  color: rgb(107 114 128 / 65%);
  white-space: nowrap;
  background: #fff;
  border: 1px dashed var(--lk-border);
  border-radius: 999px;
}

.lk-rule-add svg {
  color: var(--lk-muted-fg);
}

/* A narrow column can't hold a meter rule on one line. Wrap it into the
   same rounded card the app uses below `sm`, with dividers that stop at
   the last cell of each row instead of leaving a clipped sliver. */
@container (max-width: 640px) {
  .lk-rule {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    border-radius: 16px;
  }

  .lk-rule__segment,
  .lk-rule__remove {
    height: 36px;
    margin-top: -1px;
    margin-left: -1px;
    border-right: 0;
    box-shadow:
      inset 1px 0 0 var(--lk-border),
      inset 0 1px 0 var(--lk-border);
  }

  .lk-rule__segment {
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: max-content;
  }

  .lk-rule__remove {
    flex: 0 0 auto;
    min-width: 40px;
    margin-left: -1px;
  }

  .lk-rule__number {
    min-width: 0;
  }

  /* Keep the reading, the status, and the remove control on one row so
     the trash icon never lands on a line by itself. */
  .lk-rule__tail {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: stretch;
    min-width: min(100%, max-content);
    max-width: 100%;
    height: 36px;
    margin-top: -1px;
    margin-left: -1px;
    box-shadow:
      inset 1px 0 0 var(--lk-border),
      inset 0 1px 0 var(--lk-border);
  }

  .lk-rule__tail .lk-rule__segment,
  .lk-rule__tail .lk-rule__remove {
    margin: 0;
    box-shadow: none;
    border-right: 1px solid var(--lk-border);
  }

  .lk-rule__tail .lk-rule__remove {
    flex: 0 0 auto;
    border-right: 0;
  }
}

/* ---------- Work order main column ---------- */

.lk-workorder__head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.lk-workorder__status {
  color: var(--lk-yellow-500);
}

.lk-workorder__title {
  margin-bottom: -2px;
  font-size: 30px;
  font-weight: 600;
  line-height: 38px;
  color: var(--lk-yellow-500);
  letter-spacing: -0.025em;
}

.lk-workorder__subtitle {
  font-size: 16px;
  line-height: 24px;
  color: var(--lk-muted-fg);
}

.lk-workorder__note {
  padding: 8px;
}

.lk-inspections {
  margin-top: 12px;
}

.lk-settings-group {
  margin: 1px;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--lk-shadow-container);
}

.lk-inspection {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
}

.lk-inspection + .lk-inspection {
  border-top: 1px solid var(--lk-border);
}

.lk-inspection__icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.lk-inspection__icon.is-done {
  color: var(--lk-green-500);
}

.lk-inspection__name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}

.lk-inspection__name--checked {
  flex: 0 0 auto;
  max-width: 160px;
}

.lk-inspection__note {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
}

.lk-inspection__note::placeholder {
  color: rgb(113 113 122 / 50%);
}

.lk-inspection--enter {
  animation: lk-row-swap var(--icon-swap-dur) var(--icon-swap-ease);
}

@keyframes lk-row-swap {
  from {
    opacity: 0;
    filter: blur(var(--icon-swap-blur));
  }
}

.lk-due-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--lk-muted-fg);
  white-space: nowrap;
}

.lk-btn--button,
.lk-icon-btn--button {
  font-family: inherit;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}

.lk-icon-btn--button {
  background: transparent;
  border: 0;
}

.lk-icon-btn--button:hover {
  color: var(--lk-fg);
  background: var(--lk-muted);
}

.lk-btn--secondary.lk-btn--button:hover {
  background: var(--lk-muted);
}

.lk-btn--button:active {
  transform: scale(0.97);
}

.lk-btn--button:disabled {
  cursor: default;
  opacity: 0.5;
  transform: none;
}

.lk-inspection__aside {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  align-items: center;
}

/* ---------- Customer "Report Issue" dialog ---------- */

.lk-modal-stage {
  margin: 0 auto;
  overflow: visible;
}

.lk-modal-stage .lk-scaled__screen {
  position: relative;
}

.lk-dialog__grid--enter {
  animation: lk-row-swap var(--duration-slow, 400ms) ease-in-out;
}

.lk-dialog {
  overflow: hidden;
  background: var(--lk-card);
  border: 1px solid var(--lk-border);
  border-radius: 16px;
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 10%),
    0 4px 6px -4px rgb(0 0 0 / 10%),
    0 24px 48px -16px rgb(26 25 37 / 18%);
}

.lk-dialog--customer {
  --lk-company: #2f6fde;

  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.lk-dialog__header {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--lk-border);
}

.lk-dialog__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
}

.lk-dialog__x {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  opacity: 0.7;
}

.lk-dialog__grid {
  display: grid;
  gap: 20px;
  padding: 8px 0;
}

.lk-dialog__actions {
  display: flex;
  padding-top: 16px;
  border-top: 1px solid var(--lk-border);
}

.lk-part-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lk-part-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
  color: var(--lk-muted-fg);
  background: var(--lk-card);
  border: 1px solid var(--lk-border);
  border-radius: 999px;
}

.lk-part-chip.is-active {
  color: var(--lk-fg);
  background: color-mix(in srgb, var(--lk-company) 10%, transparent);
  border-color: var(--lk-company);
  box-shadow: 0 0 0 1px var(--lk-company);
}

.lk-textarea {
  display: block;
  width: 100%;
  min-height: 100px;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
  resize: none;
  background: #fff;
  border: 1px solid var(--lk-border);
  border-radius: 10px;
  outline: none;
  box-shadow: var(--lk-shadow-xs);
  transition: box-shadow 150ms ease;
}

label.lk-field {
  margin: 0;
  font-weight: inherit;
}

.lk-textarea::placeholder {
  color: var(--lk-muted-fg);
}

.lk-textarea:focus {
  box-shadow:
    0 0 0 2px var(--lk-company),
    var(--lk-shadow-xs);
}

.lk-attach {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--lk-muted-fg);
  border: 1px solid var(--lk-border);
  border-radius: 999px;
}

.lk-attach.is-active {
  color: var(--lk-company);
  border-color: var(--lk-company);
}

.lk-thumbs {
  display: flex;
  gap: 8px;
}

.lk-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  background-color: var(--lk-muted);
  background-position: center;
  background-size: cover;
  border: 1px solid var(--lk-border);
  border-radius: 12px;
}

.lk-thumb__remove {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: var(--lk-fg);
  border: 0;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.lk-thumb:hover .lk-thumb__remove,
.lk-thumb__remove:focus-visible {
  opacity: 1;
}

/* Sonner's success toast, pinned over the dialog footer. */
.lk-toast {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 16px;
  margin-left: -170px;
  width: 340px;
  font-size: 13px;
  line-height: 18px;
  color: var(--lk-fg);
  pointer-events: none;
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}

.lk-toast svg {
  flex-shrink: 0;
  color: var(--lk-green-600);
}

:root {
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
  .lk-inspection--enter,
  .lk-dialog__grid--enter {
    animation: none;
  }
}

/* ---------- Maintenance report (AnalyticsOverviewHero) ---------- */

.lk-report-crop {
  -webkit-mask-image:
    linear-gradient(to right, #000 74%, transparent 100%),
    linear-gradient(to bottom, #000 48%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, #000 74%, transparent 100%),
    linear-gradient(to bottom, #000 48%, transparent 100%);
  mask-composite: intersect;
}

.lk-report-crop .lk-overview {
  width: 820px;
  border-radius: 12px 0 0;
}

.lk-overview {
  overflow: hidden;
  background: var(--lk-card);
  border: 1px solid var(--lk-border);
  border-radius: 12px;
}

.lk-overview__stats {
  display: flex;
  border-bottom: 1px solid rgb(228 228 231 / 50%);
}

.lk-hero-stat {
  min-width: 176px;
  padding: 16px 20px;
  margin-left: -1px;
  background: var(--lk-card);
  border-left: 1px solid rgb(228 228 231 / 40%);
}

.lk-report-title {
  overflow: hidden;
  font-size: 14.4px;
  font-weight: 450;
  line-height: 21.6px;
  color: rgb(48 48 48);
  text-decoration: underline 2px dashed rgb(229 229 229);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-underline-offset: 2px;
}

.lk-stat-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 6px;
}

.lk-stat-value {
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  letter-spacing: -0.025em;
}

.lk-trend {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.lk-trend.is-up {
  color: var(--lk-green-600);
}

.lk-trend.is-down {
  color: var(--lk-red-600);
}

.lk-overview__chart {
  padding: 8px 16px 16px;
}

.lk-chart {
  display: block;
  width: 100%;
  height: auto;
}

.lk-chart__grid {
  stroke: var(--lk-border);
  stroke-dasharray: 3 3;
}

.lk-chart__tick {
  font-size: 12px;
  fill: var(--lk-muted-fg);
}

.lk-chart__bar {
  fill: var(--lk-special-muted);
}

.lk-chart__line {
  fill: none;
  stroke: var(--lk-special);
  stroke-linecap: round;
  stroke-width: 3;
}

/* ---------- Transitions (transitions.dev) ---------- */

:root {
  --stream-gap: 60ms;
  --stream-fade: 350ms;
  --stream-blur: 1px;
  --stream-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --icon-swap-dur: 250ms;
  --icon-swap-blur: 2px;
  --icon-swap-start-scale: 0.25;
  --icon-swap-ease: ease-in-out;
  --stagger-dur: 500ms;
  --stagger-distance: 12px;
  --stagger-stagger: 40ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --acc-expand: 250ms;
  --acc-collapse: 250ms;
  --acc-chevron: 250ms;
  --acc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --resize-dur: 300ms;
  --resize-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --check-box: 150ms;
  --check-draw: 350ms;
  --check-delay: 0ms;
  --check-uncheck: 150ms;
  --check-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --check-len: 15;
}

.t-stream-w {
  opacity: 0;
  filter: blur(var(--stream-blur));
  transition:
    opacity var(--stream-fade) var(--stream-ease),
    filter var(--stream-fade) var(--stream-ease);
}
.t-stream-w.is-in {
  opacity: 1;
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .t-stream-w { transition: none !important; filter: none !important; opacity: 1 !important; }
}

.t-icon-swap {
  position: relative;
  display: inline-grid;
}
.t-icon-swap .t-icon {
  grid-area: 1 / 1;
  transition:
    opacity   var(--icon-swap-dur) var(--icon-swap-ease),
    filter    var(--icon-swap-dur) var(--icon-swap-ease),
    transform var(--icon-swap-dur) var(--icon-swap-ease);
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="a"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="b"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.t-icon-swap[data-state="a"] .t-icon[data-icon="b"],
.t-icon-swap[data-state="b"] .t-icon[data-icon="a"] {
  opacity: 0;
  filter: blur(var(--icon-swap-blur));
  transform: scale(var(--icon-swap-start-scale));
}

@media (prefers-reduced-motion: reduce) {
  .t-icon-swap .t-icon { transition: none !important; }
}

/* A third face for the recorder: c is "Applying inspections…". */
.t-icon-swap[data-state="c"] .t-icon[data-icon="c"] {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}
.t-icon-swap[data-state="c"] .t-icon:not([data-icon="c"]),
.t-icon-swap:not([data-state="c"]) .t-icon[data-icon="c"] {
  opacity: 0;
  filter: blur(var(--icon-swap-blur));
  transform: scale(var(--icon-swap-start-scale));
}

.t-stagger-line {
  display: block;
  opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
  transition:
    opacity   var(--stagger-dur) var(--stagger-ease),
    transform var(--stagger-dur) var(--stagger-ease),
    filter    var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.t-stagger-line--2 { transition-delay: var(--stagger-stagger); }

.t-stagger.is-shown .t-stagger-line {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.t-stagger.is-hiding .t-stagger-line {
  opacity: 0;
  transform: translateY(0);
  filter: blur(0);
  transition:
    opacity 200ms ease,
    transform 0s linear,
    filter 0s linear;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .t-stagger-line { transition: none !important; }
}

/* Accordion snippet, scoped so it doesn't restyle the FAQ's `t-acc` markup. */
:is(.ios-voice, .lk-policies) .t-acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--acc-collapse) var(--acc-ease);
}
:is(.ios-voice, .lk-policies) .t-acc[data-open="true"] .t-acc-panel {
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--acc-expand) var(--acc-ease);
}
:is(.ios-voice, .lk-policies) .t-acc-panel-inner {
  overflow: hidden;
  opacity: 0;
  filter: blur(2px);
  transition:
    opacity var(--acc-collapse) var(--acc-ease),
    filter var(--acc-collapse) var(--acc-ease);
}
:is(.ios-voice, .lk-policies) .t-acc[data-open="true"] .t-acc-panel-inner {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity var(--acc-expand) var(--acc-ease),
    filter var(--acc-expand) var(--acc-ease);
}

@media (prefers-reduced-motion: reduce) {
   :is(.ios-voice, .lk-policies) .t-acc-panel,
  :is(.ios-voice, .lk-policies) .t-acc-panel-inner {
    transition: none !important;
  }
}

/* ---------- Native voice inspection ---------- */

.ios-app {
  --ios-gold: #c2b066;
  --ios-secondary: #7f7f7f;

  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", ui-sans-serif, system-ui,
    sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #000;
  text-align: left;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}

:where(.ios-app) p {
  margin: 0;
}

.ios-secondary {
  color: var(--ios-secondary);
}

.ios-voice {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.ios-voice.is-snapping,
.ios-voice.is-snapping * {
  transition: none !important;
}

.ios-voice__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 200ms ease;
}

.ios-voice[data-phase="resetting"] .ios-voice__body {
  opacity: 0;
}

/* GlassButton: secondary at rest, destructive while recording. */
.ios-recorder {
  display: grid;
  min-height: 48px;
  padding: 14px 24px;
  color: #111827;
  background: rgb(255 255 255 / 80%);
  border-radius: 24px;
  box-shadow:
    0 8px 24px rgb(0 0 0 / 8%),
    0 1px 2px rgb(0 0 0 / 6%),
    inset 0 0 0 0.5px rgb(0 0 0 / 8%);
  transition: background-color var(--icon-swap-dur) var(--icon-swap-ease);

  --icon-swap-start-scale: 0.92;
}

button.ios-recorder {
  width: 100%;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  border: 0;
  transition:
    background-color var(--icon-swap-dur) var(--icon-swap-ease),
    transform 150ms ease;
}

button.ios-recorder:active:not(:disabled) {
  transform: scale(0.98);
}

button.ios-recorder:disabled {
  cursor: default;
}

.ios-recorder[data-state="b"] {
  background: #fff5f5;
}

.ios-recorder__face {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.ios-recorder__face--recording {
  justify-content: space-between;
  color: #b91c1c;
}

.ios-recorder__label {
  font-size: 17px;
  font-weight: 600;
  line-height: 20px;
}

.ios-recorder__stop {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin: 0 1.5px;
  background: #b91c1c;
  border-radius: 3px;
}

/* VoiceRecordingWaveform: 24 bars, 4px to 20px, one 900ms cycle. */
.ios-waveform {
  display: flex;
  flex: 1;
  gap: 2px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 20px;
}

.ios-waveform__bar {
  flex-grow: 1;
  min-width: 2px;
  max-width: 3px;
  height: 4px;
  background: #b91c1c;
  border-radius: 1px;
  animation: ios-waveform 900ms linear infinite;
}

@keyframes ios-waveform {
  0%,
  100% {
    height: 7px;
  }

  50% {
    height: 20px;
  }
}

.ios-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgb(17 24 39 / 15%);
  border-top-color: #111827;
  border-radius: 999px;
  animation: ios-spin 0.8s linear infinite;
}

@keyframes ios-spin {
  to {
    transform: rotate(360deg);
  }
}

.ios-transcript {
  position: relative;
  padding: 0 4px;
}

.ios-transcript__hint {
  position: absolute;
  inset: 0 4px auto;
  font-size: 17px;
  line-height: 24px;
  color: rgb(127 127 127 / 70%);
  pointer-events: none;
}

.ios-interpretation {
  font-size: 17px;
  line-height: 24px;
  color: var(--ios-secondary);
}

.ios-interpretation .is-part {
  font-weight: 600;
  color: #000;
}

.ios-interpretation__caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-right: -2px;
  vertical-align: -3px;
  background: var(--ios-gold);
  border-radius: 1px;
  animation: ios-caret 1s steps(1) infinite;
}

@keyframes ios-caret {
  50% {
    opacity: 0;
  }
}

.ios-section {
  overflow: hidden;
  background: #fff;
  border-radius: 26px;
  box-shadow:
    0 8px 24px rgb(0 0 0 / 5%),
    inset 0 0 0 0.5px rgb(0 0 0 / 6%);
}

.ios-section__head {
  padding: 12px 16px 4px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.ios-list > * {
  position: relative;
}

.ios-list > * + *::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  content: "";
  background: #e0e1e6;
  transition: opacity var(--acc-expand) var(--acc-ease);
}

.ios-list > .ios-new-finding[data-open="false"]::before {
  opacity: 0;
}

.ios-inspected {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
}

.ios-inspected__title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 28px;
}

.ios-check-fill {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: #22c55e;
  border-radius: 999px;
}

.ios-inspected__name {
  flex: 1;
  min-width: 0;
}

.ios-part-aside {
  justify-items: end;
}

.ios-part-aside__due {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ios-part-aside__camera {
  display: flex;
  align-items: center;
}

.ios-due {
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}

.ios-due.is-warning {
  color: #facc15;
}

.ios-due.is-muted {
  color: var(--ios-secondary);
}

/* `StockPartListItem` prompt chip. */
.ios-prompt-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #000;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

.ios-inspected__note {
  padding-top: 2px;
  margin-left: 32px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ios-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .ios-waveform__bar,
  .ios-spinner,
  .ios-interpretation__caret {
    animation: none;
  }
}

.lk-map-card--wide {
  min-width: 320px;
}

/* ---------- Late return map (StockMap line + booking task) ---------- */

.feature-detail-hero__media .sc-stage--map {
  display: block;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
}

.lk-late-scene {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.lk-late-scene__map {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--lk-shadow-container);
}

.lk-late .lk-map__canvas {
  inset: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  transform: none;
}

.lk-late .lk-map__tiles {
  object-fit: cover;
  object-position: 36% 42%;
}

.lk-late__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.lk-late__line line {
  stroke: hsl(210 10% 45%);
  stroke-width: 2px;
  stroke-dasharray: 6 8;
}

.lk-late__updated {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  font-size: 12px;
  line-height: 16px;
  color: var(--lk-muted-fg);
}

.lk-late__travel {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 16px;
  background: rgb(255 255 255 / 95%);
  border: 1px solid var(--lk-border);
  border-radius: 8px;
  box-shadow: var(--lk-shadow-lg);
}

.lk-late__travel-icon {
  color: var(--lk-muted-fg);
}

.lk-late__strong {
  font-weight: 500;
}

.lk-late__muted {
  color: var(--lk-muted-fg);
}

.lk-late__divider {
  flex: none;
  width: 1px;
  height: 12px;
  background: var(--lk-border);
}

.lk-ongoing__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.lk-ongoing__head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--lk-fg);
}

.lk-ongoing__head span {
  font-size: 12px;
  line-height: 16px;
  color: var(--lk-muted-fg);
}

.lk-task {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
}

.lk-task__icon {
  flex: none;
  color: oklch(0.646 0.222 41.116);
}

.lk-task__title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.375;
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
  .lk-late-scene__map {
    height: 460px;
  }

  .lk-map-card--wide {
    min-width: 280px;
  }

  .sc-hero--backdrop {
    min-height: 0;
    padding-bottom: 440px;
  }

  .sc-hero--backdrop .lk-map {
    top: auto;
    height: 520px;
  }

  .lk-map__layer--base {
    -webkit-mask-image:
      linear-gradient(to bottom, transparent, #000 60%),
      linear-gradient(to top, transparent, #000 18%);
    mask-image:
      linear-gradient(to bottom, transparent, #000 60%),
      linear-gradient(to top, transparent, #000 18%);
  }

  .lk-map-card {
    display: none;
  }

  .lk-late .lk-map-card {
    display: block;
  }
}
