/* Using Zwischen: three steps, each a short text and a screen (connect, your
   sessions, Zwischen Labs), then the Labs band. Above 960px, with the script
   and motion allowed (.is-pinned, from js/tour.js), the spread pins: the
   copy column holds the heading and the step's text, the pane on the right
   holds one window, and scrolling moves through the steps right to left, the
   incoming screen wiping in on the site's 13deg slant while the outgoing one
   drifts left and dims. Without the pin (reduced motion, no
   script) each step is a row, text beside its screen. At 960px and below the
   steps are a native swipe track, each slide its text over its screen; on
   phones the screens take their own phone layouts. */
.tuning {
  position: relative;
  padding: var(--section-y) 0 var(--section-y) var(--gutter);
  /* The triangle bleeds off the right edge. */
  overflow-x: clip;
}

.tour__spread {
  position: relative;
  isolation: isolate;
}

/* ── The step text ── */
.tour__index {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.tour__index b {
  font-weight: 600;
  color: var(--red);
}

.tour__title {
  margin-top: 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 2vw, 2.375rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.tour__title em {
  display: block;
  font-style: italic;
}

.tour__title + .prose {
  margin-top: 1.25rem;
}

/* ── The window: a bar with the address, over a 16:10 view ── */
.tour__screen {
  position: relative;
  min-width: 0;
}

.tour__window {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--app-chrome);
}

/* The outgoing screen dims under the incoming one (--dim, from the script). */
.tour__window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--dim, 0);
  pointer-events: none;
}

.tour__bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 1rem;
  background: var(--screen-bar);
}

.tour__lights {
  display: flex;
  gap: 0.45rem;
}

.tour__lights i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #ff5f57;
}

.tour__lights i:nth-child(2) {
  background: #febc2e;
}

.tour__lights i:nth-child(3) {
  background: #28c840;
}

.tour__address {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: calc(100% - 9rem);
  padding: 0.3rem 0.9rem;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font: 500 0.75rem/1.2 var(--mono);
  white-space: nowrap;
  color: var(--screen-mute);
  translate: -50% -50%;
}

/* The screens are drawn at 1280x800 and scaled to the view (--s, from the
   script), so type and spacing stay true. */
.tour__view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.tour__view > .lab,
.tour__view > .tty {
  position: absolute;
  top: 0;
  left: 0;
}

.tour__figcap {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* The window's fixed backing, only for the pinned spread. */
.tour__frame {
  display: none;
}

/* ── Pinned: the spread holds the screen while the steps go by ── */
@media (min-width: 961px) {
  .tuning:has(.tour.is-pinned) {
    padding-top: 0;
  }

  /* Two steps between three screens, 45svh each. */
  .tour.is-pinned {
    height: calc(100svh - var(--bar-h) + 90svh);
  }

  .tour.is-pinned .tour__stage {
    position: sticky;
    top: var(--bar-h);
    display: flex;
    align-items: center;
    height: calc(100svh - var(--bar-h));
  }

  /* The heading and the step's text in the copy column; the window and its
     backing stacked in the pane. The window is as wide as its column allows,
     up to 62rem, but no taller than the stage leaves room for (its bar, 16:10
     of its width and a margin above and below), so short laptop screens see
     all of it. */
  .tour.is-pinned .tour__spread {
    --pane-w: min(100%, 62rem, (100svh - var(--bar-h) - 6.5rem) * 1.6);
    display: grid;
    grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      'head pane'
      'text pane';
    column-gap: clamp(3rem, 6vw, 7rem);
    align-items: start;
    width: 100%;
    padding-right: calc(var(--gutter) * 0.9);
  }

  .tour.is-pinned :is(.tour__steps, .tour__step) {
    display: contents;
  }

  .tour.is-pinned .tour__head {
    grid-area: head;
  }

  .tour.is-pinned .tour__text {
    grid-area: text;
    margin-top: clamp(2rem, 3.2vw, 3.25rem);
    will-change: transform, opacity;
  }

  .tour.is-pinned :is(.tour__screen, .tour__frame) {
    grid-area: pane;
  }

  .tour.is-pinned .tour__screen {
    z-index: 1;
    width: var(--pane-w);
    will-change: transform, clip-path;
  }

  .tour.is-pinned .tour__figcap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* The window's shadow and corners stay put while the screens move over it:
     a bar's height, then 16:10. */
  .tour.is-pinned .tour__frame {
    display: block;
    position: relative;
    width: var(--pane-w);
    border-radius: 10px;
    background: var(--app-chrome);
    box-shadow:
      0 0 0 1px rgba(20, 19, 18, 0.08),
      0 2.25rem 3.75rem -1.75rem rgba(24, 18, 10, 0.6);
  }

  .tour.is-pinned .tour__frame::before {
    content: '';
    display: block;
    height: 2.5rem;
  }

  .tour.is-pinned .tour__frame::after {
    content: '';
    display: block;
    aspect-ratio: 16 / 10;
  }
}

/* The triangle behind the window: its left point reaches back under the copy
   column into open paper, its foot rising more steeply than the Labs band's
   top edge below, so the paper between them opens into a wedge. It rises a
   little as the steps go by (--shift, 0 to 1, from the script). */
.tour__underprint {
  position: absolute;
  z-index: -1;
  top: -4.5rem;
  bottom: -7rem;
  left: -42%;
  right: calc(-0.9 * var(--gutter));
  background: var(--stone);
  clip-path: polygon(0 100%, 100% 0, 100% 74%);
  transform: translate3d(0, calc((0.5 - var(--shift, 0.5)) * 48px), 0);
}

/* Narrower desktops give the window more of the width, and set the copy
   longer and lower, so the triangle's point comes out of the gap between the
   columns instead of reaching under the text. */
@media (min-width: 961px) and (max-width: 1500px) {
  .tour.is-pinned .tour__spread {
    grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  }

  .tour__underprint {
    left: calc(-1 * clamp(3rem, 6vw, 7rem));
  }
}

/* ── Listed, above 960px without the pin: each step a row, its text beside
   its screen ── */
@media (min-width: 961px) {
  .tour:not(.is-pinned) .tour__steps {
    display: grid;
    gap: clamp(4rem, 6vw, 6rem);
    margin-top: clamp(3rem, 4vw, 4.5rem);
    padding-right: calc(var(--gutter) * 0.9);
    list-style: none;
  }

  .tour:not(.is-pinned) .tour__step {
    display: grid;
    grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
    column-gap: clamp(3rem, 6vw, 7rem);
    align-items: start;
  }

  .tour:not(.is-pinned) .tour__screen {
    width: min(100%, 62rem);
  }

  .tour:not(.is-pinned) .tour__window {
    box-shadow:
      0 0 0 1px rgba(20, 19, 18, 0.08),
      0 2.25rem 3.75rem -1.75rem rgba(24, 18, 10, 0.6);
  }
}

/* ── The swipe track, 960px and below: each slide its number and name, its
   text over its screen, the screens aligned at the foot; the next slide peeks
   in at the edge. ── */
@media (max-width: 960px) {
  .tuning {
    padding: var(--section-y) var(--gutter);
  }

  .tour__steps {
    display: flex;
    gap: 1rem;
    margin: 2rem calc(-1 * var(--gutter)) 0;
    padding: 0 var(--gutter) 1.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
    list-style: none;
  }

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

  .tour__step {
    display: flex;
    flex: 0 0 min(calc(100% - 2rem), 40rem);
    flex-direction: column;
    scroll-snap-align: start;
  }

  /* Room after the last slide, so it too can come to rest at the start. */
  .tour__steps::after {
    content: '';
    flex: 0 0 calc(100% - min(calc(100% - 2rem), 40rem) - 1rem);
  }

  .tour__screen {
    margin-top: auto;
    padding-top: 1.75rem;
  }

  .tour__window {
    box-shadow:
      0 0 0 1px var(--rule),
      6px 6px 0 var(--char);
  }

  /* Each slide's text says what its screen shows, so its caption is left to
     screen readers. */
  .tour.is-live .tour__figcap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ── Phones: each screen laid out as its own app would lay it out on a
   phone, at full size, in a view of fixed height so the slides' screens line
   up. ── */
@media (max-width: 767px) {
  .tuning {
    padding-bottom: 2.5rem;
  }

  .tour__title {
    font-size: 1.625rem;
  }

  /* The screen leads each slide, so the screens line up across slides; the
     text follows. */
  .tour__screen {
    order: -1;
    margin-top: 0;
    padding-top: 0;
  }

  .tour__text {
    margin-top: 1.5rem;
  }

  .tour__window {
    border-radius: 3px;
  }

  .tour__bar {
    height: 2.25rem;
    padding: 0 0.75rem;
  }

  .tour__lights i {
    width: 0.55rem;
    height: 0.55rem;
  }

  .tour__address {
    max-width: calc(100% - 6rem);
    padding: 0.25rem 0.7rem;
    font-size: 0.6875rem;
  }

  .tour__view {
    aspect-ratio: auto;
    height: 26rem;
  }

  /* A page runs on under the window's foot, fading rather than cut. */
  .tour__view > .lab .lab__page {
    mask-image: linear-gradient(#000 calc(100% - 2rem), transparent);
  }

  .tour__view > .lab,
  .tour__view > .tty {
    position: static;
    width: auto;
    height: 100%;
    transform: none;
  }
}

/* ── The Labs and account screens: zwischen-web's look (dark top bar and
   knight, light panels, Inter and mono kickers, catch red), drawn in HTML and
   SVG at 1280x800. ── */
.lab {
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  width: 1280px;
  height: 800px;
  overflow: hidden;
  background: var(--app-bg);
  color: var(--app-ink);
  font: 400 14px/1.45 var(--sans);
  transform: scale(var(--s, 0.75));
  transform-origin: 0 0;
}

.lab ul,
.lab ol {
  list-style: none;
}

.lab h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.lab h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.lab h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Top bar */
.lab__bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--app-chrome);
  color: #fff;
}

.lab__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lab__brand img {
  width: 15px;
  height: 22px;
}

.lab__brand em {
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--app-brand);
  font: 600 10px var(--mono);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lab__nav {
  display: flex;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
}

.lab__nav > * {
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.66);
}

.lab__nav b {
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 -2px var(--app-brand);
}

.lab__follow {
  margin-left: auto;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

/* Page */
.lab__page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 24px 40px 20px;
}

.lab__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.lab__eyebrow {
  margin-bottom: 6px;
  font: 600 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-catch);
}

/* Public scoping: a few quiet dropdowns, nothing that reaches a session. */
.lab__controls {
  display: flex;
  gap: 8px;
}

.lab__controls > span {
  position: relative;
  padding: 5px 30px 6px 12px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}

.lab__controls > span::after {
  content: '';
  position: absolute;
  top: 17px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #9097a2;
  border-bottom: 1.5px solid #9097a2;
  transform: rotate(45deg);
}

.lab__controls small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.lab__controls .is-set {
  border-color: #f1b3b0;
  background: #fff7f6;
}

.lab__controls .is-set small {
  color: var(--app-catch);
}

.lab__card {
  min-width: 0;
  padding: 16px 20px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(5, 5, 7, 0.03);
}

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

.lab__kind {
  margin-bottom: 3px;
  font: 600 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--app-muted);
}

.lab__figure {
  flex: none;
  text-align: right;
}

.lab__figure strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.lab__delta {
  display: inline-block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--app-muted);
}

.lab__legend {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--app-soft);
}

.lab-key {
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 6px;
  border-radius: 1px;
  background: var(--c, var(--app-ink));
  vertical-align: middle;
}

/* The promise every Labs page carries. */
.lab__privacy {
  margin-top: auto;
  padding: 10px 14px;
  border-left: 3px solid var(--app-brand);
  border-radius: 0 8px 8px 0;
  background: #fff;
  font-size: 12px;
  color: var(--app-soft);
}

.lab__privacy b {
  margin-right: 4px;
  color: var(--app-ink);
}

/* Charts: the pair takes the first two series colours. */
.lab .is-over {
  --c: var(--lab-series-1);
}

.lab .is-under {
  --c: var(--lab-series-2);
}

.lab svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.lab-grid {
  fill: none;
  stroke: #eceef1;
}

.lab-base {
  fill: none;
  stroke: #c9ccd3;
}

/* Week boundaries, the week under investigation, and what each week did. */
.lab-weekline {
  stroke: #eceef1;
}

.lab-week {
  fill: var(--app-catch);
  fill-opacity: 0.06;
}

.lab-weeklabel {
  font: 600 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: #8a8f99;
}

.lab-weeklabel.is-hot {
  fill: var(--app-catch);
}

.lab-line {
  fill: none;
  stroke: var(--c, var(--app-ink));
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.lab-end {
  fill: var(--c, var(--app-ink));
  stroke: #fff;
  stroke-width: 2;
}

.lab-tick {
  font: 10.5px var(--mono);
  fill: #8a8f99;
}

.lab__plot {
  margin-top: 12px;
}

/* The Labs page: one model, day by day, and the week its habits shifted. */
.lab__drift {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 324px;
  gap: 12px;
}

.lab__alert {
  border-color: transparent;
  background: radial-gradient(circle at 100% 0%, #4a1d25, transparent 58%), var(--app-dark);
  color: #fff;
}

.lab__flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255, 45, 45, 0.16);
  font: 700 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ff8a84;
}

.lab__flag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--app-brand);
}

.lab__alert h3 {
  margin-top: 10px;
  font-size: 16px;
}

.lab__alert > p:not([class]) {
  margin-top: 8px;
  font-size: 12px;
  color: #b9bcc4;
}

.lab__sub {
  margin-top: 16px;
  font: 600 9.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d828c;
}

/* What else changed that week, so a model's swing isn't read as its weights. */
.lab__checks {
  margin-top: 4px;
}

.lab__checks li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #b9bcc4;
}

.lab__checks b {
  font-weight: 600;
  color: #fff;
}

.lab__checks li.is-hit b {
  color: #ff8a84;
}

.lab__alert .lab__action {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-ink);
}

/* The same behavior that week, for the models beside it. */
.lab__strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}

.lab__strip li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--app-soft);
}

.lab__strip i {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2;
  height: 8px;
  border-radius: 3px;
  background: #f1f2f4;
}

.lab__strip i::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: inherit;
  background: #c9ccd3;
}

.lab__strip b {
  font-variant-numeric: tabular-nums;
  color: var(--app-ink);
}

.lab__strip li.is-on {
  font-weight: 600;
  color: var(--app-ink);
}

.lab__strip li.is-on i::after {
  background: var(--lab-series-2);
}

/* ── The account: zwischen-web's Overview, cut to its aggregates: the 30-day
   totals in the app's dark activity hero, the AI summary's top reasons as the
   page's main panel, and the rate by kind of work beside it. Catch, flag and
   plan, and the kinds of work, wear the app's own colours. ── */
.lab--web {
  --catch: #b4232c;
  --flag: #e8601c;
  --plan: #d9a300;
  --tool: #2a78d6;
  --edit: #1baf7a;
  --finish: #7b3fbf;
}

.web__user {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 50%;
  background: #2a2c33;
  font-size: 12px;
  font-weight: 600;
}

.web__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.web__title span {
  color: var(--app-brand);
}

/* The time range, 30 days chosen. */
.web__period {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-muted);
}

.web__period > * {
  padding: 5px 12px;
  border-radius: 6px;
}

.web__period b {
  font-weight: 600;
  background: var(--app-dark);
  color: #fff;
}

/* The totals, dark as the app's own activity hero. */
.web__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 40px;
  align-items: end;
  padding: 22px 26px 24px;
  border-radius: 12px;
  background: var(--app-dark);
  color: #fff;
}

.web__hero .lab__eyebrow {
  color: #ff8a84;
}

.web__big {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.web__big small {
  font-size: 13px;
  color: #b9bcc4;
}

.web__big strong {
  font-size: 72px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.web__big span {
  font-size: 14px;
  color: #b9bcc4;
}

.web__big b {
  color: #fff;
}

.web__mix {
  display: flex;
  gap: 2px;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
}

.web__mix i {
  flex: var(--w) 1 0;
  transform-origin: 0 50%;
}

.web .is-catch {
  background: var(--catch);
}

.web .is-flag {
  background: var(--flag);
}

.web .is-plan {
  background: var(--plan);
}

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

.web__kinds li {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.web__kinds span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #d1d2d7;
}

.web__kinds span i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.web__kinds b {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.web__kinds small {
  font-size: 11px;
  color: #9a9ea8;
}

/* The reasons lead; the rates by kind of work sit beside them. */
.web__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
}

.lab .web__themes h3 {
  margin-bottom: 4px;
  font-size: 19px;
}

/* Each reason over its bar, the top two with their why; the two that lead
   in full catch red, the rest a shade lighter. */
.web__bars {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.web__bars li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  font-size: 14px;
  font-weight: 500;
  --bar: var(--catch);
}

.web__bars li:nth-child(n + 3) {
  --bar: #dfa5a9;
}

.web__bars span,
.web__bars b {
  grid-row: 1;
}

.web__bars li::after {
  content: '';
  grid-column: 1 / -1;
  grid-row: 2;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(var(--bar), var(--bar)) 0 0 / var(--w) 100% no-repeat, #f1f2f4;
}

.web__bars b {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--app-muted);
}

.web__bars small {
  grid-column: 1 / -1;
  grid-row: 3;
  font-size: 12px;
  color: var(--app-soft);
}

.web__other {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--app-border);
  font-size: 12.5px;
  color: var(--app-muted);
}

.web__other b {
  font-weight: 600;
}

.web__stages h4 {
  margin-top: 2px;
}

.web__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.web__tiles li {
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
}

.web__tiles span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-soft);
}

.web__tiles span i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--k);
}

.web__tiles strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.web__tiles small {
  font-size: 11.5px;
  color: var(--app-muted);
}

/* Plans are counted on work requests; named so, the tile stays clear of the
   plan swatch's fill. */
.web__tiles .is-request {
  --k: var(--plan);
}

.web__tiles .is-tool {
  --k: var(--tool);
}

.web__tiles .is-edit {
  --k: var(--edit);
}

.web__tiles .is-finish {
  --k: var(--finish);
}

/* ── The install: Zwischen's own terminal session, shortened to what the
   user does (zwischen-client ui.py's gutter, markers and colours), then
   Claude Code starting as it really looks; and beside it, on paper, the two
   things the user does and the line that says the rest is ours. ── */
.tty {
  width: 1280px;
  height: 800px;
  overflow: hidden;
  background: var(--screen);
  transform: scale(var(--s, 0.75));
  transform-origin: 0 0;
}

/* Newest at the foot once the screen is full: older lines leave over the top. */
.tty__term {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 28px 36px 30px;
  overflow: hidden;
  font: 400 13.5px/1.55 var(--mono);
  color: var(--cc-text);
}

/* Until then the lines fill down from the top, as in a cleared terminal: this
   spacer takes the room left below them, and has none once they overflow.
   Phones keep the foot, since their card covers the top of the window. */
@media (min-width: 768px) {
  .tty__term::after {
    content: '';
    flex: none;
    margin-top: auto;
  }
}

/* Lines keep their height; the overflow leaves over the top, never squeezed. */
.tty__line {
  flex: none;
  min-height: 1.55em;
  white-space: pre;
}

.tty__line b {
  font-weight: 700;
}

.tty__ps {
  color: var(--cc-ok);
}

.tty__g,
.tty__dim {
  color: #666;
}

.tty__title {
  font-weight: 700;
  color: #5f5fff;
}

.tty__info {
  color: #5f5fff;
}

.tty__mark {
  color: #5fff87;
}

.tty__mark.is-active {
  color: #5f5fff;
}

/* Claude Code's launch: its pixel mascot beside the version, the model and
   the folder, then Zwischen's startup line, the input between two rules, and
   the mode under it. */
.tty__launch {
  display: flex;
  align-items: center;
  gap: 1.4em;
  white-space: normal;
}

.tty__mascot {
  flex: none;
  width: auto;
  height: 4.4em;
  fill: var(--cc-accent);
}

.tty__mascot .tty__eye {
  fill: var(--screen);
}

.tty__launch span + span {
  display: block;
}

.tty__hook {
  color: var(--cc-dim);
}

.tty__line.tty__rule {
  min-height: 0;
  margin: 0.55em 0;
  border-top: 1px solid var(--cc-rule);
}

.tty__mode span:first-child {
  color: #e8b13e;
}

.tty__cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--cc-text);
}

@media (prefers-reduced-motion: no-preference) {
  .tty__cursor {
    animation: tty-blink 1.1s step-end infinite;
  }
}

@keyframes tty-blink {
  50% {
    opacity: 0;
  }
}

/* The card, set as the page sets itself: paper on a soft shadow, the eyebrow
   and its rule, two ruled lines of serif with the step numbers in the red
   tracked caps of the page's own indexes, then the line that matters with
   its turn in italic. */
.handled {
  position: absolute;
  top: 48px;
  right: 48px;
  width: 404px;
  padding: 32px 36px 36px;
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgba(20, 19, 18, 0.06),
    0 28px 56px -24px rgba(0, 0, 0, 0.6);
  color: var(--ink);
}

.handled__label {
  display: flex;
  align-items: center;
  gap: 16px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.handled__label::after {
  content: '';
  width: 48px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.handled__list {
  margin-top: 20px;
  border-bottom: 1px solid var(--rule);
  list-style: none;
}

.handled__list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  font: 400 20px/1.3 var(--serif);
  letter-spacing: -0.005em;
}

.handled__list b {
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.2em;
  color: var(--red);
}

.handled__rest {
  margin-top: 22px;
  font: 400 28px/1.1 var(--serif);
  letter-spacing: -0.015em;
}

/* Typed out (js/tour.js arms it): lines show one after another; each thing
   to do waits in grey until it is done, and the last line arrives once both
   are. */
.tty.is-armed .tty__line:not(.is-shown) {
  display: none;
}

.tty.is-armed .handled__list li,
.tty.is-armed .handled__list b {
  color: var(--ink-mute);
  transition: color 0.5s var(--ease);
}

.tty.is-armed .handled__rest {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}

.tty.is-armed .handled__list li.is-done {
  color: var(--ink);
}

.tty.is-armed .handled__list li.is-done b {
  color: var(--red);
}

.tty.is-armed .handled__rest.is-done {
  opacity: 1;
  transform: none;
}

/* On a phone: narrower type and wrapping lines, the card across the top of
   the window over the oldest lines, the newest still in view under it. */
@media (max-width: 767px) {
  .tty {
    position: relative;
  }

  .tty__term {
    padding: 12px 12px 14px;
    font-size: 10.5px;
  }

  .tty__line {
    white-space: pre-wrap;
  }

  .tty__launch {
    gap: 1em;
  }

  .tty__mascot {
    height: 3.6em;
  }

  /* The model line wraps to two here and would push the launch under the card. */
  .tty__launch span:nth-child(3) {
    display: none;
  }

  .handled {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    padding: 14px 16px 16px;
  }

  .handled__label {
    gap: 12px;
    font-size: 9.5px;
  }

  .handled__label::after {
    width: 32px;
  }

  .handled__list {
    margin-top: 10px;
  }

  .handled__list li {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 6px 0;
    font-size: 15px;
  }

  .handled__list b {
    font-size: 9.5px;
  }

  .handled__rest {
    margin-top: 10px;
    font-size: 18px;
  }

  /* The phone's Labs bar: the active tab alone, its right end on 13deg. */
  .tour .lab {
    display: block;
    overflow: hidden;
  }

  .tour .lab__bar {
    gap: 0.75rem;
    height: 2.5rem;
    padding: 0 0.875rem;
    clip-path: polygon(0 0, calc(100% - 0.575rem) 0, 100% 100%, 0 100%);
  }

  .tour .lab__brand {
    font-size: 15px;
  }

  .tour .lab__nav > :not(b),
  .tour .lab__follow {
    display: none;
  }

  .tour .lab__nav b {
    font-size: 12.5px;
  }

  /* The page is the window's height under its bar, its content running on
     past the foot. */
  .tour .lab__page {
    gap: 8px;
    height: calc(100% - 2.5rem);
    overflow: hidden;
    padding: 12px 12px 14px;
  }

  .tour .lab__page > * {
    flex-shrink: 0;
  }

  .tour .lab__card {
    padding: 12px;
  }

  .tour :is(.lab__kind, .lab__sub, .lab__eyebrow) {
    font-size: 11px;
  }

  /* The account, as the desktop sets it but in one column: the title and
     its week, the totals with the number and its rate side by side over the
     catch, flag and plan split, then the top reasons. */
  .tour .web__user {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .tour :is(.web__stages, .web__period > span, .web__hero .lab__eyebrow, .web__kinds small, .web__themes > .lab__eyebrow, .web__other, .web__bars small, .web__bars li:nth-child(n + 5)) {
    display: none;
  }

  .lab .web__title {
    font-size: 19px;
  }

  .tour .web__period {
    padding: 2px;
    font-size: 10.5px;
  }

  .tour .web__period b {
    padding: 3px 8px;
  }

  .tour .web__hero {
    display: block;
    padding: 12px 14px 14px;
  }

  .tour .web__big {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    column-gap: 12px;
    margin-top: 0;
  }

  .tour .web__big small {
    grid-column: 1 / -1;
    font-size: 11.5px;
  }

  .tour .web__big strong {
    font-size: 42px;
  }

  .tour .web__big span {
    padding-bottom: 5px;
    font-size: 11px;
    line-height: 1.35;
  }

  .tour .web__mix {
    height: 6px;
    margin-top: 12px;
  }

  .tour .web__kinds {
    gap: 6px;
    margin-top: 8px;
  }

  .tour .web__kinds li {
    padding: 0;
    border: 0;
    background: none;
  }

  .tour .web__kinds span {
    font-size: 10.5px;
  }

  .tour .web__kinds b {
    margin-top: 1px;
    font-size: 17px;
  }

  .tour .web__grid {
    display: block;
  }

  .lab .web__themes h3 {
    font-size: 14.5px;
  }

  .tour .web__bars {
    gap: 7px;
    margin-top: 8px;
  }

  .tour .web__bars li {
    gap: 4px 8px;
    font-size: 12px;
  }

  .tour .web__bars b {
    font-size: 11px;
  }

  .tour .web__bars li::after {
    height: 5px;
  }

  /* The Labs page: the model's chart over the week's alert and Frank's
     reaction to it. */
  .tour .lab__head,
  .tour .lab__drift .lab__kind,
  .tour .lab__figure,
  .tour .lab__week,
  .tour .lab__privacy,
  .tour .lab__alert > p:not([class]),
  .tour .lab__alert .lab__sub,
  .tour .lab__checks {
    display: none;
  }

  .tour .lab__drift {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .tour .lab__card h3 {
    font-size: 15px;
  }

  .tour .lab__alert h3 {
    margin-top: 8px;
  }

  .tour .lab__alert .lab__action {
    margin-top: 10px;
    font-size: 12.5px;
  }

  .tour .lab__legend {
    gap: 14px;
    margin-top: 4px;
    font-size: 12px;
  }

  /* The plot stretches to the card at a fixed height; its own text and dots
     give way to the script's HTML ones, which keep their size. Inset by the
     value labels, which hang left of the axis. */
  .tour .lab__plot {
    position: relative;
    margin: 8px 0 0 0.875rem;
  }

  .tour .lab__plot.has-labels svg {
    height: 7rem;
  }

  .tour .lab__plot.has-labels :is(text, circle) {
    display: none;
  }

  .tour .lab__plot.has-labels :is(.lab-line, .lab-grid, .lab-base, .lab-weekline) {
    vector-effect: non-scaling-stroke;
  }

  .tour .lab__plot [data-overlay] {
    position: absolute;
    line-height: 1;
    white-space: nowrap;
  }

  /* Left out where it would run into a label that ranks above it. */
  .tour .lab__plot [data-crowded] {
    visibility: hidden;
  }

  .tour .lab__plot .lab-tick {
    font: 11px var(--mono);
    color: #8a8f99;
    transform: translate(var(--tx), -80%);
  }

  .tour .lab__plot .lab-weeklabel {
    font: 600 11px var(--sans);
    letter-spacing: 0;
    text-transform: none;
    color: #8a8f99;
    transform: translate(var(--tx), -80%);
  }

  .tour .lab__plot .lab-weeklabel.is-hot {
    color: var(--app-catch);
  }

  .tour .lab__plot span.lab-end {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--c, var(--app-ink));
    box-shadow: 0 0 0 2px #fff;
  }
}

/* ── The build: a screen assembles as it comes forward. js/tour.js arms the
   tour and marks the screen in front .is-on; one losing .is-on snaps back to
   unbuilt with no transition, out of sight, so it builds again next time.
   Lines draw from their own length (pathLength 1), and list items stagger
   on --i, their place in the list. ── */
@media (prefers-reduced-motion: no-preference) {
  .tour.is-armed .lab-line {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }

  .tour.is-armed .lab-end {
    opacity: 0;
    transform: scale(0);
    transform-box: fill-box;
    transform-origin: center;
  }

  .tour.is-armed .lab-week {
    transform: scaleX(0);
    transform-box: fill-box;
    transform-origin: 0 50%;
  }

  .tour.is-armed .lab-weeklabel {
    opacity: 0;
  }

  .tour.is-armed :is(.lab__checks > li, .lab__strip > li, .web__kinds > li, .web__bars > li, .web__tiles > li) {
    opacity: 0;
    transform: translateY(8px);
  }

  .tour.is-armed .lab__strip i::after,
  .tour.is-armed .web__mix i {
    transform: scaleX(0);
    transform-origin: 0 50%;
  }

  .tour.is-armed .web__bars li::after {
    background-size: 0 100%;
  }

  /* Rows come in first, one after another. */
  .tour.is-armed .is-on :is(.lab__checks > li, .lab__strip > li, .web__kinds > li, .web__bars > li, .web__tiles > li) {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.5s var(--ease) var(--at),
      transform 0.6s var(--ease) var(--at);
  }

  .tour.is-armed .is-on .lab__checks > li {
    --at: calc(0.55s + var(--i) * 110ms);
  }

  .tour.is-armed .is-on .lab__strip > li {
    --at: calc(0.7s + var(--i) * 80ms);
  }

  /* The totals land, then the reasons rank down, then the kinds of work. */
  .tour.is-armed .is-on .web__kinds > li {
    --at: calc(0.3s + var(--i) * 90ms);
  }

  .tour.is-armed .is-on .web__bars > li {
    --at: calc(0.5s + var(--i) * 110ms);
  }

  .tour.is-armed .is-on .web__tiles > li {
    --at: calc(1.1s + var(--i) * 90ms);
  }

  .tour.is-armed .is-on .web__bars li::after {
    background-size: var(--w) 100%;
    transition: background-size 0.9s var(--ease) calc(var(--at) + 0.3s);
  }

  .tour.is-armed .is-on .web__mix i {
    transform: none;
    transition: transform 0.8s var(--ease) calc(0.2s + var(--i) * 0.15s);
  }

  /* Then the lines draw through them. */
  .tour.is-armed .is-on .lab-line {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.7s cubic-bezier(0.45, 0, 0.2, 1) var(--from, 0.2s);
  }

  .tour.is-armed .is-on .lab-line.is-under {
    --from: 0.4s;
  }

  /* End points land once their line arrives. */
  .tour.is-armed .is-on .lab-end {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.2s linear var(--land, 1.85s),
      transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) var(--land, 1.85s);
  }

  .tour.is-armed .is-on .lab-end.is-under {
    --land: 2.05s;
  }

  /* The week under investigation sweeps in as the lines cross it. */
  .tour.is-armed .is-on .lab-week {
    transform: none;
    transition: transform 0.7s var(--ease) 0.9s;
  }

  .tour.is-armed .is-on .lab-weeklabel {
    opacity: 1;
    transition: opacity 0.6s var(--ease) 1.2s;
  }

  .tour.is-armed .is-on .lab__strip i::after {
    transform: none;
    transition: transform 0.9s var(--ease) calc(0.8s + var(--i) * 80ms);
  }

  /* The one thing that changed flashes once, after the list settles. */
  .tour.is-armed .is-on .lab__checks li.is-hit {
    animation: lab-hit 1.4s var(--ease) 1.2s both;
  }

  @keyframes lab-hit {
    0%,
    100% {
      background: transparent;
    }

    30% {
      background: rgba(255, 45, 45, 0.18);
    }
  }
}

/* ── Zwischen Labs closes the section as a graphite band, lifting from left
   to right so it reads apart from How Frank works' charcoal while sharing its
   ink, its top and foot rising together on that field's shallow slant, bled
   off the page edge. On the spread's own grid: the lead under the
   heading's column, the six dials under the screens. ── */
.tuning__more {
  --rise: 3.2vw;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
  column-gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
  margin-top: clamp(4rem, 6vw, 6rem);
  padding: calc(var(--rise) + clamp(3.5rem, 5vw, 5.5rem)) var(--gutter);
  padding-left: 0;
  color: var(--on-char);
}

.tuning__more::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: calc(-1 * var(--gutter));
  right: 0;
  background: linear-gradient(100deg, var(--graphite), var(--graphite-lift));
  clip-path: polygon(0 var(--rise), 100% 0, 100% calc(100% - var(--rise)), 0 100%);
}

.tuning__more .eyebrow {
  color: var(--on-char-soft);
}

.tuning__labs-title {
  margin-top: clamp(1.25rem, 2vw, 1.875rem);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 2.6vw, 3.125rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.tuning__claim {
  max-width: 34em;
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.1vw, 1.25rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--on-char-soft);
  text-wrap: pretty;
}

.dials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 2.5vw, 2.5rem) clamp(2rem, 4vw, 4rem);
  list-style: none;
}

.dial {
  padding-top: 1rem;
  border-top: 1px solid var(--on-char-rule);
}

.dial h4 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.3vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.dial p {
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--on-char-soft);
}

.tuning__plan {
  grid-column: 2;
  margin-top: clamp(2rem, 3vw, 3rem);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--on-char);
}

/* A small laptop's screens column is too narrow for two columns of dials
   beside the lead, so the lead goes over them. */
@media (min-width: 961px) and (max-width: 1299px) {
  .tuning__more {
    grid-template-columns: minmax(0, 1fr);
  }

  .dials {
    margin-top: 2.5rem;
  }

  .tuning__plan {
    grid-column: 1;
  }
}

/* Stacked: the lead over the dials, the band bleeding off both edges. */
@media (max-width: 960px) {
  .tuning__more {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }

  .tuning__more::before {
    right: calc(-1 * var(--gutter));
  }

  .dials {
    margin-top: 2.5rem;
  }

  .tuning__plan {
    grid-column: 1;
  }
}

/* The band in one column, its slant a little steeper so it reads at phone
   width, the dials one to a row. */
@media (max-width: 767px) {
  .tuning__more {
    --rise: 1.5rem;
    margin-top: 3rem;
  }

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