.tour__tabs {
  display: flex;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto clamp(28px, 4vw, 44px);
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 0 0 1px var(--color-dark-border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tour__tabs::-webkit-scrollbar {
  display: none;
}

.tour__tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--color-on-dark-muted);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.tour__tab .icon {
  width: 18px;
  height: 18px;
}

.tour__tab:hover {
  color: var(--color-on-dark);
  background: rgba(255, 255, 255, .06);
}

.tour__tab[aria-selected="true"] {
  background: var(--color-bg);
  color: var(--color-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.tour__tab[aria-selected="true"] .icon {
  color: var(--color-secondary-strong);
}

.tour__panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.tour__panel[hidden] {
  display: none;
}

.tour__panel:focus-visible {
  outline-offset: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .tour__panel:not([hidden]) .screen {
    animation: tour-in .45s var(--ease) both;
  }

  .tour__panel:not([hidden]) .tour__copy {
    animation: tour-in .45s var(--ease) both;
  }
}

@keyframes tour-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.tour__title {
  font-size: clamp(1.4rem, 1.2rem + .8vw, 1.85rem);
  letter-spacing: -.02em;
  color: var(--color-on-dark);
}

.tour__points {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.tour__points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--color-on-dark-muted);
  line-height: 1.5;
}

.tour__check {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-secondary) 18%, transparent);
  color: var(--color-secondary);
}

.tour__check .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

.tour__cta {
  margin-top: 28px;
}

.screen {
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 40px 90px -20px rgba(0, 0, 0, .6);
  font-size: 13px;
  line-height: 1.45;
}

.screen__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.screen__dots {
  display: flex;
  gap: 6px;
}

.screen__dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-border-strong);
}

.screen__path {
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen__path b {
  font-weight: 400;
  margin: 0 4px;
  color: var(--color-border-strong);
}

.screen__body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 430px;
}

.screen__side {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 16px 10px;
}

.screen__side-title {
  margin: 0 0 6px 8px;
  font-weight: 600;
  color: var(--color-heading);
}

.screen__side-title:not(:first-child) {
  margin-top: 16px;
}

.screen__side ul {
  list-style: none;
  padding: 0;
}

.screen__side li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.screen__side li.is-active {
  background: var(--color-bg);
  color: var(--color-heading);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--color-border);
}

.screen .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.screen .dot--ok {
  background: var(--color-success);
}

.screen .dot--warn {
  background: var(--color-warning);
}

.screen .dot--danger {
  background: var(--color-danger);
}

.screen__main {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.screen__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.screen__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--color-heading);
  line-height: 1.25;
}

.screen__sub {
  color: var(--color-text-muted);
}

.pill {
  flex: none;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.pill--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.pill--ok {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.panel {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.panel__title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--color-heading);
}

.panel__title span {
  font-weight: 400;
  color: var(--color-text-muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.stat span {
  display: block;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-heading);
}

.stat small {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 2px;
}

.stat--hl {
  background: var(--gradient-brand);
  border-color: transparent;
}

.stat--hl span,
.stat--hl small {
  color: var(--color-on-dark-muted);
}

.stat--hl b {
  color: var(--color-on-dark);
}

.screen__split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.mini-chart {
  width: 100%;
  height: 150px;
  overflow: visible;
}

.mini-chart__grid {
  stroke: var(--color-border);
  vector-effect: non-scaling-stroke;
}

.mini-chart__area {
  fill: color-mix(in srgb, var(--color-primary) 10%, transparent);
}

.mini-chart__line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mini-chart__limit {
  stroke: var(--color-danger);
  stroke-width: 1.25;
  stroke-dasharray: 5 5;
  vector-effect: non-scaling-stroke;
}

.rows {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}

.rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--color-surface);
}

.rows--cards li {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  justify-content: flex-start;
  padding: 10px 12px;
}

.rows__grow {
  flex: 1;
  min-width: 0;
  color: var(--color-heading);
}

.rows__meta,
.rows__time {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.tag {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.tag--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.tag--warn {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.tag--ok {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.chain {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.chain li {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0 9px 22px;
}

.chain li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.chain li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(50% + 6px);
  bottom: calc(-50% + 6px);
  width: 1px;
  background: var(--color-border-strong);
}

.chain li:last-child::before {
  background: var(--color-danger);
  box-shadow: 0 0 0 3px var(--color-danger-soft);
}

.chain b {
  color: var(--color-heading);
}

.chain span {
  color: var(--color-heading);
}

.chain em {
  font-style: normal;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.control__value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-heading);
  margin-bottom: 10px;
}

.control__hint {
  margin-top: 10px;
  color: var(--color-text-muted);
}

.control__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.slider {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
}

.slider i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: var(--gradient-accent);
}

.slider b {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-secondary-end);
}

.switch {
  flex: none;
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--color-border-strong);
}

.switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg);
  transition: left var(--duration) var(--ease);
}

.switch.is-on {
  background: var(--color-success);
}

.switch.is-on::after {
  left: 17px;
}

.week {
  display: grid;
  grid-template-columns: 48px repeat(7, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.week>span {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
}

.week>span:nth-child(-n + 8) {
  min-height: 22px;
  font-weight: 600;
  color: var(--color-heading);
  justify-content: center;
}

.week__time {
  color: var(--color-text-muted);
}

.slot {
  justify-content: center;
  border-radius: 7px;
  font-weight: 600;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
}

.slot--a {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.slot--b {
  background: var(--color-secondary-soft);
  color: var(--color-secondary-strong);
}

.slot--c {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.rule {
  display: grid;
  gap: 8px;
}

.rule__block {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.rule__block b {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rule__block span {
  color: var(--color-text);
}

.rule__block strong {
  color: var(--color-heading);
}

.rule__block--when {
  border-left: 4px solid var(--color-primary);
}

.rule__block--when b {
  color: var(--color-primary);
}

.rule__block--if {
  border-left: 4px solid var(--color-warning);
}

.rule__block--if b {
  color: var(--color-warning);
}

.rule__block--then {
  border-left: 4px solid var(--color-success);
  background: var(--color-success-soft);
}

.rule__block--then b {
  color: var(--color-success);
}

@media (min-width: 1024px) {
  .tour__panel {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 1023.98px) {
  .tour__copy {
    max-width: 560px;
    margin-inline: auto;
    text-align: center;
  }

  .tour__points {
    justify-items: center;
  }

  .tour__points li {
    text-align: left;
  }
}

@media (max-width: 767.98px) {
  .tour__tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .tour__tab {
    height: 42px;
    padding: 0 14px;
    font-size: .9rem;
  }

  .screen__body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .screen__side,
  .screen__dots {
    display: none;
  }

  .screen__main {
    padding: 16px;
  }

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

  .screen__split,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .rows--cards li {
    flex-wrap: wrap;
  }

  .rows--cards .rows__meta {
    width: 100%;
    padding-left: 0;
  }

  .chain li {
    grid-template-columns: 52px 1fr;
  }

  .chain em {
    grid-column: 2;
  }

  .week {
    grid-template-columns: 40px repeat(7, minmax(0, 1fr));
    gap: 3px;
    font-size: 10.5px;
  }

  .slot {
    font-size: 0;
  }

  .slot::before {
    content: "";
    width: 60%;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
  }

  .rule__block {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}