body.meshline-os-v2 .meshline-ux-launcher {
  position: fixed;
  z-index: 76;
  right: 104px;
  bottom: 18px;
  display: flex;
  gap: 7px;
  align-items: center;
}

body.meshline-os-v2 .meshline-ux-launcher[hidden],
body.meshline-os-v2 .meshline-tour-layer[hidden],
body.meshline-os-v2 .meshline-activity-layer[hidden] {
  display: none !important;
}

body.meshline-os-v2 .meshline-ux-launcher-button {
  position: relative;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 6px 11px 6px 7px;
  border: 1px solid #c7c9c2;
  border-radius: 9px;
  color: #27333c;
  background: rgba(255, 255, 252, 0.94);
  box-shadow: 0 10px 24px rgba(17, 28, 39, 0.12);
  backdrop-filter: blur(14px);
  font: 720 0.74rem/1 "Instrument Sans", sans-serif;
}

body.meshline-os-v2 .meshline-ux-launcher-button:hover,
body.meshline-os-v2 .meshline-ux-launcher-button:focus-visible {
  border-color: #8f9993;
  background: #fff;
  transform: translateY(-1px);
}

body.meshline-os-v2 .meshline-ux-launcher-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(145deg, #4d70e8, #825ee4);
  font-size: 0.68rem;
  font-weight: 850;
}

body.meshline-os-v2 .meshline-ux-launcher-button--guide .meshline-ux-launcher-icon {
  color: #503811;
  background: #f5c979;
}

body.meshline-os-v2 .meshline-ux-launcher .meshline-ux-language-control {
  position: static !important;
  inset: auto !important;
  display: inline-flex !important;
  min-height: 42px;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(18, 35, 52, 0.14);
  border-radius: 12px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.96);
}

body.meshline-os-v2 .meshline-ux-launcher .meshline-ux-language-control button {
  min-width: 34px;
  min-height: 32px;
}

body.meshline-os-v2 .meshline-ux-count {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 99px;
  color: #215d45;
  background: #dff4e8;
  font-size: 0.62rem;
}

body.meshline-os-v2 .meshline-ux-count.has-error {
  color: #8d2941;
  background: #ffe6eb;
}

body.meshline-os-v2 .meshline-tour-layer {
  position: fixed;
  z-index: 150;
  inset: 0;
  pointer-events: none;
}

body.meshline-os-v2 .meshline-tour-spotlight {
  position: fixed;
  z-index: 1;
  border: 2px solid #66d4e6;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(7, 13, 24, 0.66), 0 0 0 5px rgba(102, 212, 230, 0.18), 0 18px 60px rgba(0, 0, 0, 0.28);
  transition: inset 220ms ease, width 220ms ease, height 220ms ease, border-radius 220ms ease;
}

body.meshline-os-v2 .meshline-tour-spotlight.is-hidden {
  inset: 0;
  width: 0 !important;
  height: 0 !important;
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 9999px rgba(7, 13, 24, 0.66);
}

body.meshline-os-v2 .meshline-tour-bubble {
  position: fixed;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: min(390px, calc(100vw - 28px));
  padding: 18px;
  pointer-events: auto;
  border: 1px solid rgba(81, 104, 140, 0.25);
  border-radius: 14px;
  color: #17222d;
  background: #fff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

body.meshline-os-v2 .meshline-tour-bubble:focus {
  outline: none;
}

body.meshline-os-v2 .meshline-tour-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

body.meshline-os-v2 .meshline-tour-kicker {
  display: block;
  margin-bottom: 5px;
  color: #3d6d83;
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.meshline-os-v2 .meshline-tour-head h2 {
  margin: 0;
  color: #17222d;
  font: 740 clamp(1.25rem, 2vw, 1.55rem)/1.12 "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
}

body.meshline-os-v2 .meshline-tour-close,
body.meshline-os-v2 .meshline-activity-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d4d7d1;
  border-radius: 8px;
  color: #56616a;
  background: #f7f8f5;
  font-size: 0.72rem;
}

body.meshline-os-v2 .meshline-tour-bubble > p {
  margin: 0;
  color: #53606a;
  font-size: 0.9rem;
  line-height: 1.58;
}

body.meshline-os-v2 .meshline-tour-progress {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

body.meshline-os-v2 .meshline-tour-progress span {
  height: 4px;
  border-radius: 99px;
  background: #e2e5df;
}

body.meshline-os-v2 .meshline-tour-progress span.done {
  background: #83bea0;
}

body.meshline-os-v2 .meshline-tour-progress span.active {
  background: linear-gradient(90deg, #28bdd5, #4d70e8);
}

body.meshline-os-v2 .meshline-tour-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

body.meshline-os-v2 .meshline-tour-actions > div {
  display: flex;
  gap: 7px;
}

body.meshline-os-v2 .meshline-tour-actions button {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 740;
}

body.meshline-os-v2 .meshline-tour-skip,
body.meshline-os-v2 .meshline-tour-back {
  border: 1px solid #d3d7d1;
  color: #4f5b64;
  background: #fff;
}

body.meshline-os-v2 .meshline-tour-back:disabled {
  opacity: 0.45;
}

body.meshline-os-v2 .meshline-tour-next {
  border: 1px solid #365bc1;
  color: #fff;
  background: linear-gradient(180deg, #5879da, #3f60be);
  box-shadow: 0 7px 16px rgba(63, 96, 190, 0.2);
}

body.meshline-os-v2 .meshline-activity-layer {
  position: fixed;
  z-index: 140;
  inset: 0;
}

body.meshline-os-v2 .meshline-activity-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(7, 13, 24, 0.5);
  backdrop-filter: blur(2px);
}

body.meshline-os-v2 .meshline-activity-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  width: min(480px, 100vw);
  height: 100dvh;
  overflow: hidden;
  border-left: 1px solid #cfd3cd;
  color: #17222d;
  background: #f7f7f3;
  box-shadow: -22px 0 70px rgba(6, 14, 25, 0.24);
}

body.meshline-os-v2 .meshline-activity-drawer:focus {
  outline: none;
}

body.meshline-os-v2 .meshline-activity-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #d9dcd6;
  background: #fff;
}

body.meshline-os-v2 .meshline-activity-header span {
  color: #2f7b63;
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.meshline-os-v2 .meshline-activity-header h2 {
  margin: 4px 0 3px;
  color: #17222d;
  font: 760 1.45rem/1.1 "Space Grotesk", sans-serif;
  letter-spacing: -0.035em;
}

body.meshline-os-v2 .meshline-activity-header p {
  margin: 0;
  color: #68737b;
  font-size: 0.78rem;
}

body.meshline-os-v2 .meshline-activity-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 12px 14px 0;
}

body.meshline-os-v2 .meshline-activity-summary > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #d9dcd6;
  border-radius: 9px;
  background: #fff;
}

body.meshline-os-v2 .meshline-activity-summary span {
  color: #747e78;
  font-size: 0.61rem;
  font-weight: 760;
  text-transform: uppercase;
}

body.meshline-os-v2 .meshline-activity-summary strong {
  color: #1f2b35;
  font-size: 1.08rem;
}

body.meshline-os-v2 .meshline-activity-summary .has-error {
  border-color: #e4b7c0;
  background: #fff4f5;
}

body.meshline-os-v2 .meshline-activity-summary .has-error strong {
  color: #9b3049;
}

body.meshline-os-v2 .meshline-activity-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #dedfd9;
}

body.meshline-os-v2 .meshline-activity-filters {
  display: flex;
  gap: 5px;
}

body.meshline-os-v2 .meshline-activity-filters button,
body.meshline-os-v2 .meshline-activity-refresh,
body.meshline-os-v2 .meshline-run-actions button,
body.meshline-os-v2 .meshline-activity-operations,
body.meshline-os-v2 .meshline-activity-empty button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #d1d5cf;
  border-radius: 7px;
  color: #49555e;
  background: #fff;
  font-size: 0.7rem;
  font-weight: 720;
}

body.meshline-os-v2 .meshline-activity-filters button.active {
  border-color: #9bb5a8;
  color: #225f48;
  background: #e9f5ef;
}

body.meshline-os-v2 .meshline-activity-list {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  padding: 12px 14px 20px;
  overflow: auto;
}

body.meshline-os-v2 .meshline-run-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #d8dbd5;
  border-left: 3px solid #95a09a;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(18, 29, 39, 0.045);
}

body.meshline-os-v2 .meshline-run-card.is-active {
  border-left-color: #4d70e8;
}

body.meshline-os-v2 .meshline-run-card.is-failed {
  border-color: #e3b8c0;
  border-left-color: #b83e58;
}

body.meshline-os-v2 .meshline-run-card > header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

body.meshline-os-v2 .meshline-run-card > header > div > span {
  color: #747e78;
  font-size: 0.61rem;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

body.meshline-os-v2 .meshline-run-card h3 {
  margin: 3px 0 0;
  color: #1e2a34;
  font: 720 0.86rem/1.3 "Space Grotesk", sans-serif;
}

body.meshline-os-v2 .meshline-run-status {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid #d6d9d3;
  border-radius: 99px;
  color: #59656e;
  background: #f5f6f2;
  font-size: 0.61rem;
  font-weight: 760;
}

body.meshline-os-v2 .is-active .meshline-run-status {
  border-color: #b9c8eb;
  color: #36549e;
  background: #edf1fb;
}

body.meshline-os-v2 .is-failed .meshline-run-status {
  border-color: #e1b3bd;
  color: #922c44;
  background: #fff0f2;
}

body.meshline-os-v2 .meshline-run-progress-copy {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #657078;
  font-size: 0.7rem;
}

body.meshline-os-v2 .meshline-run-progress-copy strong {
  color: #26323b;
}

body.meshline-os-v2 .meshline-run-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8ebe6;
}

body.meshline-os-v2 .meshline-run-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #28bdd5, #4d70e8);
}

body.meshline-os-v2 .is-failed .meshline-run-progress > span {
  background: #c9546c;
}

body.meshline-os-v2 .meshline-run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #747f87;
  font-size: 0.64rem;
}

body.meshline-os-v2 .meshline-run-meta span,
body.meshline-os-v2 .meshline-run-meta code {
  padding: 4px 6px;
  border-radius: 5px;
  background: #f2f3ef;
}

body.meshline-os-v2 .meshline-run-meta code {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.meshline-os-v2 .meshline-run-error {
  padding: 10px;
  border: 1px solid #edc8cf;
  border-radius: 7px;
  color: #6f2436;
  background: #fff4f5;
}

body.meshline-os-v2 .meshline-run-error strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

body.meshline-os-v2 .meshline-run-error p {
  margin: 0;
  font-size: 0.73rem;
  line-height: 1.45;
}

body.meshline-os-v2 .meshline-run-evidence {
  border-top: 1px solid #e3e5df;
  padding-top: 8px;
}

body.meshline-os-v2 .meshline-run-evidence summary {
  color: #44515a;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 740;
}

body.meshline-os-v2 .meshline-run-evidence > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

body.meshline-os-v2 .meshline-run-evidence p {
  display: grid;
  grid-template-columns: 90px minmax(80px, 0.45fr) minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  padding: 7px;
  border-radius: 6px;
  background: #f6f7f3;
  color: #657078;
  font-size: 0.65rem;
}

body.meshline-os-v2 .meshline-run-evidence strong {
  color: #34414a;
}

body.meshline-os-v2 .meshline-run-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

body.meshline-os-v2 .is-failed .meshline-run-actions button:last-child {
  border-color: #d7a5b0;
  color: #8e2d44;
  background: #fff7f8;
}

body.meshline-os-v2 .meshline-activity-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 220px;
  padding: 24px;
  color: #68737b;
  text-align: center;
  border: 1px dashed #cfd4cd;
  border-radius: 10px;
  background: #fff;
}

body.meshline-os-v2 .meshline-activity-empty strong {
  color: #26323b;
}

body.meshline-os-v2 .meshline-activity-empty p {
  max-width: 310px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
}

body.meshline-os-v2 .meshline-activity-empty.is-error {
  border-color: #e3b7c0;
  background: #fff7f8;
}

body.meshline-os-v2 .meshline-activity-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #dce2dc;
  border-top-color: #4d70e8;
  border-radius: 50%;
  animation: meshline-ux-spin 900ms linear infinite;
}

body.meshline-os-v2 .meshline-activity-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid #d9dcd6;
  background: #fff;
}

body.meshline-os-v2 .meshline-activity-footer span {
  color: #7a847e;
  font-size: 0.64rem;
}

body.meshline-os-v2 .meshline-activity-operations {
  border-color: #365bc1;
  color: #fff;
  background: #4667c7;
}

body.meshline-os-v2 .meshline-ux-live-region {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

@media (max-width: 760px) {
  body.meshline-os-v2 .meshline-ux-launcher {
    right: auto;
    left: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  body.meshline-os-v2 .meshline-ux-launcher-button {
    width: 38px;
    min-width: 38px;
    padding: 6px;
    overflow: visible;
  }

  body.meshline-os-v2 .meshline-ux-launcher-button > span:not(.meshline-ux-launcher-icon):not(.meshline-ux-count) {
    display: none;
  }

  body.meshline-os-v2 .meshline-ux-count {
    position: absolute;
    top: -6px;
    right: -5px;
  }

  body.meshline-os-v2 .meshline-tour-bubble {
    max-height: calc(100dvh - 104px);
    overflow: auto;
    padding: 16px;
  }

  body.meshline-os-v2 .meshline-tour-actions {
    align-items: stretch;
  }

  body.meshline-os-v2 .meshline-tour-actions button {
    padding-inline: 10px;
  }

  body.meshline-os-v2 .meshline-activity-drawer {
    width: 100vw;
  }

  body.meshline-os-v2 .meshline-activity-header {
    padding: 16px;
  }

  body.meshline-os-v2 .meshline-activity-toolbar {
    align-items: stretch;
  }

  body.meshline-os-v2 .meshline-activity-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1;
  }

  body.meshline-os-v2 .meshline-activity-filters button {
    padding-inline: 5px;
  }

  body.meshline-os-v2 .meshline-run-evidence p {
    grid-template-columns: 1fr;
  }

  body.meshline-os-v2 .meshline-activity-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.meshline-os-v2 .meshline-tour-spotlight,
  body.meshline-os-v2 .meshline-ux-launcher-button {
    transition: none;
  }

  body.meshline-os-v2 .meshline-activity-spinner {
    animation: none;
  }
}

/* Mobile audit refinements — keep launchers clear of primary content and nav. */
@media (max-width: 760px) {
  body.meshline-os-v2 .meshline-ux-launcher {
    right: 12px !important;
    left: auto !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    flex-direction: column;
    gap: 6px;
  }

  body.meshline-os-v2 .meshline-ux-launcher-button {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px;
    padding: 5px !important;
    box-shadow: 0 8px 22px rgba(18, 32, 48, 0.18);
  }

  body.meshline-os-v2 .meshline-activity-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.meshline-os-v2 .meshline-activity-filters {
    width: 100%;
  }

  body.meshline-os-v2 .meshline-activity-filters button,
  body.meshline-os-v2 .meshline-activity-refresh {
    min-height: 44px;
  }

  body.meshline-os-v2 .meshline-activity-refresh {
    width: 100%;
  }

  body.meshline-os-v2 .meshline-activity-footer {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  body.meshline-os-v2 .meshline-activity-footer span {
    display: none;
  }

  body.meshline-os-v2 .meshline-activity-operations {
    width: 100%;
    min-height: 44px;
  }
}
