.product-tour {
  --tour-ink: #182e29;
  --tour-accent: #126653;
  --tour-line: #cfdbd3;
  --tour-dark: #193f35;
  width: min(100% - 80px, 1232px);
  margin-inline: auto;
  padding-block: clamp(64px, 7.5vw, 104px);
  color: var(--tour-ink);
  scroll-margin-top: 70px;
}

.tour-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--tour-accent);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tour-kicker::before {
  content: "";
  width: 25px;
  height: 2px;
  background: currentColor;
}

.product-tour h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.8vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.tour-intro {
  margin: 15px 0 0;
  max-width: 55ch;
  color: #516359;
  font-size: clamp(1rem, 1.7vw, 1.125rem);
  line-height: 1.55;
}

.tour-toolbar {
  margin-block: 30px 13px;
}

.tour-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--tour-line);
  border-radius: 12px;
  background: #eef2eb;
}

.tour-tabs a {
  display: grid;
  min-height: 44px;
  padding: 0 20px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #495b51;
  font-size: .9375rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.tour-tabs a:hover { color: var(--tour-accent); background: #e3eae1; }
.tour-tabs a[aria-selected="true"],
.product-tour:not([data-enhanced]) .tour-tabs a:first-child {
  border-color: var(--tour-dark);
  background: var(--tour-dark);
  color: white;
}

.tour-panel {
  margin: 0;
  scroll-margin-top: 90px;
}

.tour-panel[hidden] { display: none; }
.tour-panel figure { margin: 0; }
.product-tour:not([data-enhanced]) .tour-panel ~ .tour-panel { margin-top: 28px; }

@supports selector(:has(:target)) {
  .product-tour:not([data-enhanced]) .tour-panel:not(:first-of-type):not(:target),
  .product-tour:not([data-enhanced]):has(.tour-panel:target:not(:first-of-type)) .tour-panel:first-of-type { display: none; }
  .product-tour:not([data-enhanced]) .tour-panel:target { margin-top: 0; }
  .product-tour:not([data-enhanced]):has(.tour-panel:target:not(:first-of-type)) .tour-tabs a:first-child {
    border-color: transparent; background: none; box-shadow: none; color: #495b51;
  }
  .product-tour:not([data-enhanced]):has(#tour-register:target) a[href="#tour-register"],
  .product-tour:not([data-enhanced]):has(#tour-mailboxes:target) a[href="#tour-mailboxes"],
  .product-tour:not([data-enhanced]):has(#tour-closing:target) a[href="#tour-closing"] {
    border-color: var(--tour-dark); background: var(--tour-dark); color: white;
  }
}

.tour-frame {
  overflow: hidden;
  border: 1px solid #acbdb2;
  border-radius: 14px;
  background: #eef2ec;
  box-shadow: 0 18px 34px -25px #163b2e66;
}

.tour-titlebar, .tour-dialogbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--tour-dark);
  color: #f4fbf7;
  font-size: .9375rem;
}

.tour-titlebar strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.tour-titlebar strong::before {
  content: "";
  width: 16px;
  height: 12px;
  border: 1.5px solid #b1d8c2;
  border-top-width: 4px;
  border-radius: 2px;
}

.tour-expand, .tour-close, .tour-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 5px;
  color: inherit;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.tour-expand:hover, .tour-close:hover, .tour-size:hover { color: white; text-decoration: underline; }
.tour-expand svg, .tour-close svg { width: 14px; height: 14px; }
.tour-panel img { display: block; width: 100%; height: auto; }
.product-tour :focus-visible { outline: 3px solid #b47a11; outline-offset: 2px; }
.tour-titlebar :focus-visible, .tour-dialogbar :focus-visible { outline-color: #f4cf76; outline-offset: -3px; }

.tour-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 15px 0;
  color: #40564a;
  font-size: 1rem;
  line-height: 1.5;
}

.tour-credit { color: #53675a; font: .8125rem/1.5 var(--mono); }

.tour-dialog {
  width: min(1400px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cbd8d0;
  border-radius: 14px;
  background: #f8f9f6;
  color: #182e29;
  box-shadow: 0 24px 100px #0004;
}

.tour-dialog:not([open]) { display: none; }
.tour-dialog[open] { display: flex; flex-direction: column; }
body:has(.tour-dialog[open]) { overflow: hidden; }
.tour-dialog::backdrop { background: #102b24c7; }
.tour-dialogbar { flex: none; }
.tour-dialogbar strong { margin-right: auto; }
.tour-dismiss { margin: 0; }
.tour-close, .tour-size { flex: none; border: 0; background: transparent; font-family: inherit; cursor: pointer; }
.tour-dialog-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; background: #e3ebe4; }
.tour-dialog-scroll:focus-visible { outline-offset: -3px; }
.tour-dialog-img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 92px); margin-inline: auto; }
.tour-actual .tour-dialog-img { width: 1366px; max-width: none; max-height: none; }
.tour-pan-hint { display: none; }

@media (min-width: 960px) {
  .product-tour { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); column-gap: 3rem; }
  .tour-kicker, .tour-toolbar, .tour-panels { grid-column: 1 / -1; }
  .tour-intro { align-self: end; margin: 0; }
}
@media (max-width: 940px) {
  .product-tour { width: calc(100% - 48px); }
}
@media (max-width: 700px) {
  .product-tour { width: min(100% - 36px, 1232px); }
  .tour-caption { display: grid; gap: 3px; }
  .tour-toolbar { margin-top: 23px; }
  .tour-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(4.25rem, 100%), 1fr)); width: 100%; }
  .tour-tabs a { padding: 0 4px; font-size: .875rem; }
  .tour-titlebar { padding-inline: 10px; }
  .tour-dialog { width: calc(100vw - 20px); max-width: none; max-height: calc(100dvh - 24px); }
  .tour-dialogbar { padding: 3px 9px; gap: 6px; flex-wrap: wrap; }
  .tour-dialogbar strong { font-size: .875rem; }
  .tour-pan-hint { flex: none; margin: 0; padding: 9px 12px; color: #40564a; font-size: .8125rem; }
}
@media (max-width: 700px) and (pointer: coarse) {
  .tour-actual .tour-pan-hint { display: block; }
}

@media (max-width: 360px) {
  .product-tour { width: calc(100% - 28px); }
  .tour-tabs { gap: 1px; }
  .tour-tabs a { padding-inline: 3px; }
}

@media (forced-colors: active) {
  .tour-tabs a[aria-selected="true"] { border: 2px solid Highlight; text-decoration: underline; }
}
