/* ZSky command-center structure: navigation, source integrity, and Wall pulse. */

.workspace {
  margin-left: var(--sidebar);
  transition: margin-left .2s ease;
}

.sidebar {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sidebar .brand-block {
  flex: 0 0 auto;
  padding-bottom: 16px;
}

.sidebar .workspace-chip {
  flex: 0 0 auto;
  margin-bottom: 16px;
}

.sidebar .nav-label {
  flex: 0 0 auto;
  padding-bottom: 6px;
}

.sidebar .side-nav {
  flex: 0 0 auto;
  gap: 2px;
}

.sidebar .side-nav a {
  min-height: 34px;
  border-radius: 9px;
  font-size: 9px;
}

.sidebar .side-nav svg {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.sidebar .sidebar-spacer {
  min-height: 12px;
}

.sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  margin-left: auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text-soft);
  cursor: pointer;
}

.sidebar-close svg {
  width: 15px;
  stroke: currentColor;
}

.sidebar-wall-link {
  display: flex;
  min-height: 52px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(98,217,255,.14);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(98,217,255,.07), rgba(169,145,255,.025));
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.sidebar-wall-link:hover {
  transform: translateY(-1px);
  border-color: rgba(98,217,255,.28);
  background: linear-gradient(135deg, rgba(98,217,255,.1), rgba(169,145,255,.04));
}

.sidebar-wall-link:focus-visible,
.sidebar-close:focus-visible {
  outline: 2px solid rgba(115,245,173,.72);
  outline-offset: 2px;
}

.sidebar-wall-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  place-items: center;
  border-radius: 8px;
  background: var(--cy-soft);
  color: var(--cy);
}

.sidebar-wall-icon svg {
  width: 15px;
  stroke: currentColor;
}

.sidebar-wall-link > span:last-child {
  min-width: 0;
}

.sidebar-wall-link strong,
.sidebar-wall-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-wall-link strong {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 600;
}

.sidebar-wall-link small {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--dp);
  font-size: 8px;
}

.sidebar-system-link {
  border-color: rgba(115,245,173,.14);
  background: linear-gradient(135deg, rgba(115,245,173,.065), rgba(98,217,255,.02));
}

.sidebar-system-link .sidebar-wall-icon {
  background: var(--ph-soft);
  color: var(--ph);
  font-family: var(--dp);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: -.02em;
}

.sidebar-system-link[data-state="partial"] {
  border-color: rgba(255,197,104,.22);
}

.sidebar-system-link[data-state="partial"] .sidebar-wall-icon {
  background: var(--am-soft);
  color: var(--am);
}

.sidebar-system-link[data-state="offline"],
.sidebar-system-link[data-state="error"] {
  border-color: rgba(255,107,121,.2);
}

.sidebar-system-link[data-state="offline"] .sidebar-wall-icon,
.sidebar-system-link[data-state="error"] .sidebar-wall-icon {
  background: var(--rd-soft);
  color: var(--rd);
}

.sidebar .sidebar-status {
  flex: 0 0 auto;
  padding: 11px 12px;
}

.sidebar-status.is-warning .pulse {
  background: var(--am);
  color: var(--am);
  box-shadow: 0 0 11px rgba(255,197,104,.6);
}

.sidebar-status.is-error .pulse {
  background: var(--rd);
  color: var(--rd);
  box-shadow: 0 0 11px rgba(255,107,121,.6);
}

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 780;
  border: 0;
  background: rgba(3, 5, 8, .68);
  cursor: pointer;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.cluster-system-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 13px;
}

.cluster-system-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(115,245,173,.035), transparent 58%),
    rgba(255,255,255,.02);
}

.cluster-system-card[data-machine="isa-cr8"] {
  border-color: rgba(98,217,255,.26);
  background:
    linear-gradient(145deg, rgba(98,217,255,.085), transparent 64%),
    rgba(255,255,255,.022);
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}

.cluster-system-card[data-state="partial"] {
  border-color: rgba(255,197,104,.24);
}

.cluster-system-card[data-state="offline"] {
  border-color: rgba(255,107,121,.18);
}

.cluster-system-head,
.cluster-system-identity {
  display: flex;
  min-width: 0;
  align-items: center;
}

.cluster-system-head {
  justify-content: space-between;
  gap: 8px;
}

.cluster-system-identity {
  gap: 8px;
}

.cluster-system-identity > span:last-child {
  min-width: 0;
}

.cluster-system-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ph);
  box-shadow: 0 0 9px rgba(115,245,173,.65);
}

.cluster-system-card[data-state="partial"] .cluster-system-dot {
  background: var(--am);
  box-shadow: 0 0 9px rgba(255,197,104,.5);
}

.cluster-system-card[data-state="offline"] .cluster-system-dot {
  background: var(--rd);
  box-shadow: none;
}

.cluster-system-identity strong,
.cluster-system-identity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-system-identity strong {
  color: var(--text-soft);
  font-family: var(--dp);
  font-size: 12px;
  font-weight: 650;
}

.cluster-system-identity small,
.cluster-system-checked {
  color: var(--dim);
  font-size: 7px;
}

.cluster-system-identity small {
  margin-top: 2px;
}

.cluster-system-state {
  flex: 0 0 auto;
  color: var(--ph);
  font-size: 6px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cluster-system-card[data-state="partial"] .cluster-system-state {
  color: var(--am);
}

.cluster-system-card[data-state="offline"] .cluster-system-state {
  color: var(--rd);
}

.cluster-system-hardware {
  min-height: 26px;
  margin-top: 12px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--dp);
  font-size: 9px;
  line-height: 1.35;
}

.cluster-system-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 9px;
}

.cluster-system-metrics > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.018);
}

.cluster-system-metrics span,
.cluster-system-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cluster-system-metrics span {
  color: var(--dim);
  font-size: 6px;
  text-transform: uppercase;
}

.cluster-system-metrics strong {
  margin-top: 4px;
  color: var(--text-soft);
  font-family: var(--dp);
  font-size: 11px;
  font-weight: 620;
}

.cluster-system-checked {
  margin-top: 8px;
}

.overview-system-grid {
  display: grid;
  grid-template-columns: minmax(340px, .85fr) minmax(520px, 1.35fr);
  gap: 12px;
  margin-top: 12px;
}

.winback-health {
  position: relative;
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(520px, 1.5fr);
  gap: 14px 20px;
  align-items: center;
  margin-top: 12px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(115,245,173,.055), transparent 42%),
    var(--surface);
  box-shadow: 0 18px 52px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.03);
}

.winback-health[data-state="healthy"] {
  border-color: rgba(115,245,173,.2);
}

.winback-health[data-state="degraded"] {
  border-color: rgba(255,197,104,.38);
  background:
    linear-gradient(145deg, rgba(255,197,104,.09), transparent 44%),
    var(--surface);
}

.winback-health[data-state="offline"] {
  border-color: rgba(255,107,121,.42);
  background:
    linear-gradient(145deg, rgba(255,107,121,.1), transparent 44%),
    var(--surface);
}

.winback-health-intro {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding-right: 72px;
}

.winback-health-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(115,245,173,.18);
  border-radius: 12px;
  background: var(--ph-soft);
  color: var(--ph);
}

.winback-health[data-state="degraded"] .winback-health-mark {
  border-color: rgba(255,197,104,.22);
  background: var(--am-soft);
  color: var(--am);
}

.winback-health[data-state="offline"] .winback-health-mark {
  border-color: rgba(255,107,121,.24);
  background: var(--rd-soft);
  color: var(--rd);
}

.winback-health-mark svg {
  width: 20px;
  stroke: currentColor;
}

.winback-health-intro h3,
.winback-health-intro p {
  margin: 0;
}

.winback-health-intro h3 {
  color: var(--text);
  font-family: var(--dp);
  font-size: 16px;
  font-weight: 630;
  letter-spacing: -.015em;
}

.winback-health-intro p {
  margin-top: 4px;
  color: var(--dim);
  font-family: var(--dp);
  font-size: 9px;
  line-height: 1.45;
}

#winback-health-badge {
  position: absolute;
  top: 15px;
  right: 16px;
}

.winback-health-signals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.winback-health-signal {
  position: relative;
  min-width: 0;
  padding: 9px 9px 9px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.018);
}

.winback-health-signal::before {
  position: absolute;
  top: 13px;
  left: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dim);
  content: '';
}

.winback-health-signal[data-state="ready"]::before {
  background: var(--ph);
  box-shadow: 0 0 8px rgba(115,245,173,.58);
}

.winback-health-signal[data-state="attention"]::before {
  background: var(--rd);
}

.winback-health-signal dt,
.winback-health-signal dd,
.winback-health-signal small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winback-health-signal dt {
  color: var(--dim);
  font-size: 6px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.winback-health-signal dd {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-family: var(--dp);
  font-size: 10px;
  font-weight: 620;
}

.winback-health-signal[data-state="attention"] dd {
  color: var(--rd);
}

.winback-health[data-state="degraded"] .winback-health-signal[data-state="attention"] dd {
  color: var(--am);
}

.winback-health-signal small {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--dp);
  font-size: 7px;
}

.winback-health-foot {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.045);
  color: var(--dim);
  font-family: var(--dp);
  font-size: 8px;
}

#winback-health-issue {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.winback-health[data-state="degraded"] #winback-health-issue {
  color: var(--am);
}

.winback-health[data-state="offline"] #winback-health-issue {
  color: var(--rd);
}

#winback-health-checked {
  flex: 0 0 auto;
}

.overview-signal.is-error .signal-orbit {
  border-color: rgba(255,107,121,.3);
}

.overview-signal.is-error .signal-orbit::before {
  background: var(--rd);
  box-shadow: 0 0 12px rgba(255,107,121,.75);
}

.overview-signal.is-error .signal-orbit::after {
  border-top-color: var(--rd);
}

.connection-center,
.wall-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.032), transparent 38%),
    var(--surface);
  box-shadow: 0 18px 52px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.03);
}

.connection-center.is-warning {
  border-color: rgba(255,197,104,.2);
}

.connection-center.is-error {
  border-color: rgba(255,107,121,.25);
}

.system-card-head {
  display: flex;
  min-height: 82px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.system-card-head .section-kicker {
  margin-bottom: 5px;
}

.system-card-head h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--dp);
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -.018em;
}

.system-card-head p {
  max-width: 470px;
  margin: 4px 0 0;
  color: var(--dim);
  font-family: var(--dp);
  font-size: 9px;
  line-height: 1.45;
}

.connection-body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  min-height: 118px;
  align-items: center;
  padding: 14px 16px;
}

.connection-score {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.022);
}

.connection-score strong {
  color: var(--ph);
  font-family: var(--dp);
  font-size: 34px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.connection-score span {
  margin-top: 7px;
  color: var(--dim);
  font-size: 7px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.connection-score b {
  color: var(--muted);
  font-weight: 500;
}

.connection-issues {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.connection-issue,
.connection-clear,
.connection-unavailable {
  position: relative;
  min-width: 0;
  padding: 8px 10px 8px 23px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}

.connection-issue::before,
.connection-clear::before,
.connection-unavailable::before {
  position: absolute;
  top: 12px;
  left: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--am);
  content: '';
}

.connection-issue[data-state="error"]::before,
.connection-unavailable::before {
  background: var(--rd);
}

.connection-clear::before {
  background: var(--ph);
}

.connection-issue strong,
.connection-issue span,
.connection-clear strong,
.connection-clear span,
.connection-unavailable strong,
.connection-unavailable span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-issue strong,
.connection-clear strong,
.connection-unavailable strong {
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 600;
}

.connection-issue span,
.connection-clear span,
.connection-unavailable span {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--dp);
  font-size: 8px;
}

.connection-details {
  border-top: 1px solid rgba(255,255,255,.045);
}

.connection-details summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

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

.connection-details summary:focus-visible {
  outline: 2px solid rgba(115,245,173,.72);
  outline-offset: -3px;
}

.connection-details[open] summary span {
  transform: rotate(45deg);
}

.connection-details summary span {
  color: var(--ph);
  font-size: 15px;
  transition: transform .16s ease;
}

.connection-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0 12px 12px;
}

.connection-source {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--dp);
  font-size: 8px;
}

.connection-source::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--ph);
  content: '';
}

.connection-source[data-state="partial"]::before,
.connection-source[data-state="stale"]::before {
  background: var(--am);
}

.connection-source[data-state="error"]::before,
.connection-source[data-state="unavailable"]::before {
  background: var(--rd);
}

.connection-source span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.wall-preview-nav {
  display: flex;
  gap: 4px;
}

.wall-preview-nav button {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease, opacity .16s ease;
}

.wall-preview-nav button:hover:not(:disabled) {
  border-color: rgba(115,245,173,.28);
  background: var(--ph-soft);
  color: var(--ph);
}

.wall-preview-nav button:disabled {
  opacity: .28;
  cursor: not-allowed;
}

.wall-preview-nav button:focus-visible {
  outline: 2px solid rgba(115,245,173,.75);
  outline-offset: 2px;
}

.wall-preview-nav svg {
  width: 15px;
  stroke: currentColor;
}

.wall-preview-action {
  display: inline-flex;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(98,217,255,.2);
  border-radius: 9px;
  background: var(--cy-soft);
  color: var(--cy);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.wall-preview-action:hover {
  border-color: rgba(98,217,255,.34);
}

.wall-preview-action:focus-visible,
.wall-preview-tile:focus-visible,
.wall-preview-grid:focus-visible {
  outline: 2px solid rgba(115,245,173,.75);
  outline-offset: 2px;
}

.wall-preview-action svg {
  width: 13px;
  stroke: currentColor;
}

.wall-preview-grid {
  display: grid;
  grid-auto-columns: clamp(118px, 24%, 174px);
  grid-auto-flow: column;
  grid-template-columns: none;
  gap: 7px;
  min-height: 132px;
  padding: 10px 11px 9px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 11px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(115,245,173,.34) transparent;
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
}

.wall-preview-grid::-webkit-scrollbar {
  height: 5px;
}

.wall-preview-grid::-webkit-scrollbar-track {
  background: transparent;
}

.wall-preview-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(115,245,173,.3);
}

.wall-preview-grid.is-empty {
  grid-auto-flow: row;
  grid-template-columns: 1fr;
  overflow-x: hidden;
}

.wall-preview-loading {
  display: contents;
}

.wall-preview-loading span,
.wall-preview-tile {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.03);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.wall-preview-loading span {
  background:
    linear-gradient(100deg, transparent 15%, rgba(255,255,255,.055) 45%, transparent 72%),
    rgba(255,255,255,.025);
  background-size: 230% 100%;
  animation: wall-preview-shimmer 1.3s linear infinite;
}

@keyframes wall-preview-shimmer {
  to { background-position: -230% 0; }
}

.wall-preview-tile {
  display: block;
  color: inherit;
}

.wall-preview-tile img,
.wall-preview-motion {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease, opacity .18s ease;
}

.wall-preview-tile:hover img,
.wall-preview-tile:hover .wall-preview-motion {
  transform: scale(1.035);
}

.wall-preview-motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  background: #050608;
  pointer-events: none;
}

.wall-preview-tile.is-motion-ready .wall-preview-motion {
  opacity: 1;
}

.wall-preview-tile.is-motion-ready img {
  opacity: 0;
}

.wall-preview-video {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  display: grid;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(5,7,11,.72);
  transition: opacity .18s ease, transform .18s ease;
}

.wall-preview-tile.is-motion-ready .wall-preview-video {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.78);
}

.wall-preview-tile.is-motion-ready:hover .wall-preview-video,
.wall-preview-tile.is-motion-ready:focus-visible .wall-preview-video {
  opacity: 1;
  transform: translate(-50%, -50%) scale(.9);
}

.wall-preview-video svg {
  width: 10px;
  transform: translateX(1px);
  fill: #fff;
}

.wall-preview-kind {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 14px 5px 4px;
  overflow: hidden;
  background: linear-gradient(transparent, rgba(4,6,9,.78));
  color: #e8edf5;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.wall-preview-empty {
  display: grid;
  min-height: 100px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-family: var(--dp);
  font-size: 10px;
  text-align: center;
}

.wall-preview-foot {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border-top: 1px solid rgba(255,255,255,.045);
  color: var(--dim);
  font-family: var(--dp);
  font-size: 8px;
}

@media (max-width: 1440px) {
  .cluster-system-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-system-grid {
    grid-template-columns: minmax(320px, .9fr) minmax(440px, 1.2fr);
  }

}

@media (max-width: 1180px) {
  .workspace {
    margin-left: 0;
  }

  .sidebar {
    width: min(var(--sidebar), calc(100vw - 48px));
    transform: translateX(-105%);
    box-shadow: 24px 0 60px rgba(0,0,0,.35);
    transition: transform .2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-button {
    display: grid;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 980px) {
  .winback-health {
    grid-template-columns: 1fr;
  }

  .overview-system-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 720px) {
  .winback-health {
    gap: 12px;
    padding: 13px;
  }

  .winback-health-signals {
    grid-template-columns: 1fr 1fr;
  }

  .cluster-system-grid {
    grid-template-columns: 1fr 1fr;
    padding: 9px;
  }

  .overview-system-grid {
    gap: 9px;
  }

  .system-card-head {
    min-height: 0;
    padding: 13px;
  }

  .connection-body {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .connection-score {
    min-height: 82px;
  }

  .connection-score strong {
    font-size: 30px;
  }

  .connection-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall-preview-grid {
    grid-auto-columns: clamp(150px, 68%, 220px);
    padding: 8px;
    scroll-padding-inline: 8px;
  }

  .wall-preview-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding-block: 8px;
  }
}

@media (max-width: 420px) {
  .winback-health-intro {
    align-items: flex-start;
    padding-right: 62px;
  }

  .winback-health-signals {
    grid-template-columns: 1fr;
  }

  .winback-health-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #winback-health-issue {
    overflow: visible;
    white-space: normal;
  }

  .cluster-system-grid {
    grid-template-columns: 1fr;
  }

  .system-card-head p {
    max-width: 230px;
  }

  .connection-body {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .connection-issue,
  .connection-clear,
  .connection-unavailable {
    padding-right: 7px;
  }

  .connection-map {
    grid-template-columns: 1fr 1fr;
  }

  .wall-preview-action {
    position: relative;
    width: 36px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: transparent;
  }

  .wall-preview-action svg {
    position: absolute;
    color: var(--cy);
  }

  .wall-preview-actions {
    gap: 5px;
  }

  .wall-preview-nav {
    gap: 3px;
  }

  .wall-preview-nav button {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wall-preview-loading span {
    animation: none;
  }

  .sidebar,
  .workspace,
  .wall-preview-nav button,
  .wall-preview-tile img,
  .wall-preview-motion,
  .wall-preview-video {
    transition: none;
  }
}
