/*
 * Setup run on /how-it-works (js/how-it-works-wow.js).
 *
 * The page promises "aan de slag in 15 minuten". Screenshots fading in could
 * not make anyone feel that, so this acts the four steps out in one app
 * window: on the left the questions get answered (KVK lookup, btw, IBAN, a
 * colour, a client, two invoice lines, Versturen), on the right the invoice
 * those answers feed builds itself, the way the real /setup shows it, and a
 * clock in the title bar counts the quarter hour. Step 4 is the dashboard
 * the sent invoice lands on.
 *
 * Everything is prefixed hw- and all colour runs through the scoped --hw-*
 * variables below, which follow the landing tokens per theme. The paper is
 * paper in both themes. All mock content is example data.
 */
.hw {
  --hw-surface: #ffffff;
  --hw-surface-2: #f6f7fb;
  --hw-ink: #0f172a;
  --hw-ink-soft: #475569;
  --hw-ink-faint: #64748b;
  --hw-line: #e6e8f0;
  --hw-line-strong: #d5d9e4;
  --hw-accent: #7c3aed;
  --hw-accent-soft: rgba(124, 58, 237, 0.1);
  --hw-green: #059669;
  --hw-green-soft: rgba(5, 150, 105, 0.12);
  --hw-desk: #eef1f7;
  --hw-desk-dot: rgba(15, 23, 42, 0.07);
  --hw-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 24px 48px rgba(76, 29, 149, 0.12);
  --hw-num: ui-monospace, "SF Mono", Menlo, monospace;
  --hw-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --hw-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  max-width: 1080px;
  margin: 0 auto;
}

[data-theme="dark"] .hw {
  --hw-surface: #121a2e;
  --hw-surface-2: #182238;
  --hw-ink: #f1f5f9;
  --hw-ink-soft: #cbd5e1;
  --hw-ink-faint: #94a3b8;
  --hw-line: #232e47;
  --hw-line-strong: #2f3b57;
  --hw-accent: #a78bfa;
  --hw-accent-soft: rgba(167, 139, 250, 0.14);
  --hw-green: #34d399;
  --hw-green-soft: rgba(52, 211, 153, 0.14);
  --hw-desk: #0b1222;
  --hw-desk-dot: rgba(255, 255, 255, 0.05);
  --hw-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 32px 64px rgba(0, 0, 0, 0.45);
}

.hw *,
.hw *::before,
.hw *::after {
  box-sizing: border-box;
}

/* ---------- Rail: the four steps, as tabs ---------- */
.hw-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.hw-rail li {
  display: flex;
}

.hw-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 12px 14px 0;
  background: var(--landing-bg-card);
  border: 1px solid var(--landing-border);
  border-radius: 12px;
  color: var(--landing-text-muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.hw-step:hover,
.hw-step.is-active {
  color: var(--landing-text);
  border-color: var(--landing-border-accent);
}

.hw-step:focus-visible,
.hw-toggle:focus-visible,
.hw-captions:focus-visible {
  outline: 2px solid var(--hw-accent);
  outline-offset: 2px;
}

.hw-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hw-num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--landing-section-badge-bg);
  color: var(--landing-accent);
  font-size: 13px;
  font-weight: 700;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.hw-step.is-active .hw-num,
.hw-step.is-done .hw-num {
  background: var(--landing-accent);
  color: #fff;
}

.hw-bar {
  display: block;
  height: 3px;
  margin: auto -14px 0;
  background: var(--landing-border);
}

.hw-bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--landing-accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.hw-step.is-done .hw-bar i {
  --p: 1;
}

/* ---------- Window ---------- */
.hw-window {
  overflow: hidden;
  background: var(--hw-surface);
  border: 1px solid var(--hw-line-strong);
  border-radius: 18px;
  box-shadow: var(--hw-shadow);
  color: var(--hw-ink);
}

.hw-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--hw-line);
  background: var(--hw-surface);
}

.hw-dots {
  display: flex;
  gap: 6px;
  flex: none;
}

.hw-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hw-line-strong);
}

.hw-url {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 360px;
  margin: 0 auto;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--hw-surface-2);
  color: var(--hw-ink-faint);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The clock: a quarter hour as a ring, the elapsed time beside it. */
.hw-clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  height: 32px;
  padding: 0 12px 0 5px;
  border: 1px solid var(--hw-line);
  border-radius: 999px;
  background: var(--hw-surface-2);
  font-size: 13px;
  color: var(--hw-ink-soft);
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    color 0.4s ease;
}

.hw-clock-ring {
  transform: rotate(-90deg);
  flex: none;
}

.hw-clock-ring circle {
  fill: none;
  stroke: var(--hw-line-strong);
  stroke-width: 4;
}

.hw-clock-ring .hw-clock-arc {
  stroke: var(--hw-accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--clock, 0) * 100);
  transition: stroke 0.4s ease;
}

.hw-clock-lbl > span {
  display: none;
}

.hw-clock-lbl > .hw-clock-run,
.hw-clock.is-done .hw-clock-lbl > .hw-clock-done {
  display: inline;
}

.hw-clock.is-done .hw-clock-lbl > .hw-clock-run {
  display: none;
}

.hw-clock-t {
  min-width: 3.1em;
  font-family: var(--hw-num);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hw-ink);
}

.hw-clock.is-done {
  background: var(--hw-green-soft);
  border-color: transparent;
  color: var(--hw-green);
  animation: hw-pop 0.5s var(--hw-spring);
}

.hw-clock.is-done .hw-clock-arc {
  stroke: var(--hw-green);
}

.hw-clock.is-done .hw-clock-t {
  color: var(--hw-green);
}

.hw-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hw-line);
  border-radius: 999px;
  background: var(--hw-surface);
  color: var(--hw-ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.hw-toggle:hover {
  color: var(--hw-ink);
  border-color: var(--hw-line-strong);
}

.hw-toggle > svg,
.hw-toggle > span {
  display: none;
}

.hw .hw-toggle > .hw-ico-pause,
.hw .hw-toggle > .hw-lbl-pause,
.hw.is-paused .hw-toggle > .hw-ico-play,
.hw.is-paused .hw-toggle > .hw-lbl-play,
.hw.is-ended .hw-toggle > .hw-ico-play,
.hw.is-ended .hw-toggle > .hw-lbl-replay {
  display: inline;
}

.hw.is-paused .hw-toggle > .hw-ico-pause,
.hw.is-paused .hw-toggle > .hw-lbl-pause,
.hw.is-ended .hw-toggle > .hw-ico-pause,
.hw.is-ended .hw-toggle > .hw-lbl-pause,
.hw.is-ended .hw-toggle > .hw-lbl-play {
  display: none;
}

.hw.is-static .hw-toggle {
  display: none;
}

/* ---------- Stage ---------- */
.hw-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  height: 540px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
}

.hw-app {
  position: relative;
  border-right: 1px solid var(--hw-line);
  background: var(--hw-surface);
  transition: opacity 0.45s ease;
}

.hw-pane {
  position: absolute;
  inset: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.5s var(--hw-ease),
    visibility 0s linear 0.4s;
}

.hw-pane.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.4s ease 0.1s,
    transform 0.5s var(--hw-ease) 0.1s,
    visibility 0s;
}

.hw-pane-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hw-ink);
}

/* Inputs: a box, placeholder, typed text and a caret. */
.hw-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hw-line-strong);
  border-radius: 11px;
  background: var(--hw-surface);
  color: var(--hw-ink-faint);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.hw-search.is-focus,
.hw-field.is-focus .hw-input,
.hw-lrow .hw-input.is-focus {
  border-color: var(--hw-accent);
  box-shadow: 0 0 0 3px var(--hw-accent-soft);
}

.hw-search-ico {
  flex: none;
}

.hw-input {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  color: var(--hw-ink);
}

.hw-ph {
  position: absolute;
  left: 0;
  color: var(--hw-ink-faint);
  white-space: nowrap;
  transition: opacity 0.1s;
}

.hw-input.has-text .hw-ph {
  opacity: 0;
}

.hw-caret {
  width: 1.5px;
  height: 1.15em;
  margin-left: 1px;
  background: var(--hw-accent);
  opacity: 0;
}

.is-focus .hw-caret,
.hw-input.is-focus .hw-caret {
  opacity: 1;
  animation: hw-blink 1s steps(1) infinite;
}

.hw.is-paused .hw-stage *,
.hw.is-paused .hw-stage *::before,
.hw.is-paused .hw-stage *::after {
  animation-play-state: paused !important;
}

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

.hw-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: -1px;
  right: -1px;
  z-index: 3;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--hw-surface);
  border: 1px solid var(--hw-line-strong);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.25s var(--hw-ease),
    visibility 0s linear 0.2s;
}

.hw-search.is-open .hw-suggest {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.2s ease,
    transform 0.25s var(--hw-ease),
    visibility 0s;
}

.hw-opt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--hw-ink);
  transition: background 0.15s ease;
}

.hw-opt b {
  font-weight: 600;
}

.hw-opt small {
  color: var(--hw-ink-faint);
  font-size: 12px;
}

.hw-opt.is-hover {
  background: var(--hw-accent-soft);
}

/* The fields KVK fills in. */
.hw-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.hw-from-kvk {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hw-green-soft);
  color: var(--hw-green);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.3s ease,
    transform 0.4s var(--hw-spring);
}

.hw-from-kvk.is-on {
  opacity: 1;
  transform: none;
}

.hw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hw-field--wide {
  grid-column: 1 / -1;
}

.hw-field small,
.hw-colors small,
.hw-chip small,
.hw-kpi small,
.hw-list-h {
  color: var(--hw-ink-faint);
  font-size: 12px;
  font-weight: 500;
}

.hw-field > .hw-val,
.hw-field > .hw-input,
.hw-lrow .hw-input {
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--hw-line);
  border-radius: 9px;
  background: var(--hw-surface-2);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.6s ease;
}

.hw-field > .hw-val {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: transparent;
}

.hw-field.is-on > .hw-val {
  color: var(--hw-ink);
  animation: hw-filled 0.9s ease;
}

@keyframes hw-filled {
  0% {
    background: var(--hw-green-soft);
    border-color: var(--hw-green);
  }
}

.hw-colors {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hw-swatches {
  display: flex;
  gap: 8px;
}

.hw-swatches i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c);
  box-shadow:
    0 0 0 2px var(--hw-surface),
    0 0 0 3px transparent;
  transition:
    box-shadow 0.25s ease,
    transform 0.3s var(--hw-spring);
}

.hw-swatches i.is-picked {
  box-shadow:
    0 0 0 2px var(--hw-surface),
    0 0 0 4px var(--c);
}

.hw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--hw-accent);
  color: #fff;
  font-weight: 600;
  transition: transform 0.15s ease;
}

[data-theme="dark"] .hw-btn {
  background: #7c3aed;
}

.hw-btn.is-press,
.hw-swatches i.is-press,
.hw-opt.is-press {
  transform: scale(0.95);
}

.hw-btn--send {
  align-self: stretch;
  margin-top: auto;
}

.hw-sent-lbl,
.hw-stage.is-sent .hw-send-lbl {
  display: none;
}

.hw-stage.is-sent .hw-sent-lbl {
  display: inline;
}

.hw-stage.is-sent .hw-btn--send {
  background: var(--hw-green);
  transition: background 0.3s ease;
}

[data-theme="dark"] .hw-stage.is-sent .hw-btn--send {
  background: #059669;
}

.hw-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hw-line);
  border-radius: 11px;
  background: var(--hw-surface-2);
}

.hw-chip b {
  font-weight: 600;
}

.hw-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-lhead,
.hw-lrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.hw-lhead {
  color: var(--hw-ink-faint);
  font-size: 12px;
  font-weight: 500;
}

.hw-lhead span:last-child {
  text-align: right;
}

.hw-lrow .hw-input {
  display: flex;
}

.hw-num-in {
  justify-content: flex-end;
  font-family: var(--hw-num);
}

.hw-num-in .hw-typed::before {
  content: "€ ";
  color: var(--hw-ink-faint);
}

.hw-sum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px dashed var(--hw-line-strong);
  color: var(--hw-ink-soft);
  font-weight: 600;
}

.hw-sum b {
  font-family: var(--hw-num);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  color: var(--hw-ink);
}

/* ---------- The desk and the paper ---------- */
.hw-desk {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-color: var(--hw-desk);
  background-image: radial-gradient(var(--hw-desk-dot) 1px, transparent 1px);
  background-size: 18px 18px;
  transition: opacity 0.45s ease;
}

.hw-paper-wrap {
  container-type: inline-size;
  width: min(80%, 392px);
  transform: translateY(var(--pan, 0%));
  transition: transform 0.8s var(--hw-ease);
}

.hw-paper {
  isolation: isolate;
  --hw-brand: #64748b;
  --hw-ink-p: #1e293b;
  --hw-faint-p: #64748b;
  --hw-sk: #e8ebf1;

  position: relative;
  aspect-ratio: 1 / 1.3;
  padding: 8cqw 7.5cqw 6cqw;
  border-radius: 1.4cqw;
  background: #fff;
  color: var(--hw-ink-p);
  font-size: 2.75cqw;
  line-height: 1.5;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.08),
    0 18px 40px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .hw-paper {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 24px 50px rgba(0, 0, 0, 0.55);
}

/* House-style bar along the top edge, in the picked colour */
.hw-paper::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1.4cqw;
  background: var(--hw-brand);
  transition: background 0.7s ease;
}

.hw-paper.is-branded {
  --hw-brand: #0d9488;
}

.hw-tag {
  position: absolute;
  top: 3.6cqw;
  right: 4cqw;
  padding: 0.3cqw 1.8cqw;
  border-radius: 99px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 2.2cqw;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hw-p-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6cqw;
}

.hw-logo {
  display: grid;
  place-items: center;
  width: 11cqw;
  height: 11cqw;
  border-radius: 3cqw;
  background: var(--hw-sk);
  color: transparent;
  font-size: 4cqw;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition:
    background 0.7s ease,
    color 0.3s ease,
    transform 0.5s var(--hw-spring);
}

.hw-logo.is-on {
  background: var(--hw-brand);
  color: #fff;
  animation: hw-pop 0.55s var(--hw-spring);
}

@keyframes hw-pop {
  0% {
    transform: scale(0.6);
  }
}

.hw-p-title {
  font-size: 6.4cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hw-brand);
  transition: color 0.7s ease;
}

.hw-p-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4cqw;
  margin-bottom: 5cqw;
}

.hw-p-block {
  display: flex;
  flex-direction: column;
}

.hw-p-from {
  text-align: right;
  align-items: flex-end;
}

.hw-p-block small,
.hw-p-meta small {
  display: block;
  color: var(--hw-faint-p);
  font-size: 2.2cqw;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* A line on the paper: a grey bar until its answer arrives. */
.hw-ln {
  position: relative;
  display: block;
  min-height: 1.5em;
  white-space: nowrap;
}

.hw-ln::before {
  content: "";
  position: absolute;
  top: 0.38em;
  height: 0.78em;
  width: var(--w, 60%);
  border-radius: 99px;
  background: var(--hw-sk);
  transition: opacity 0.3s ease;
}

.hw-p-from .hw-ln::before {
  right: 0;
}

.hw-ln > * ,
.hw-ln {
  color: transparent;
}

.hw-ln b {
  font-weight: 700;
}

.hw-ln.is-on {
  color: var(--hw-ink-p);
  animation: hw-ink 0.7s ease;
}

.hw-ln.is-on > * {
  color: inherit;
}

.hw-ln.is-on::before {
  opacity: 0;
}

@keyframes hw-ink {
  0% {
    color: transparent;
    transform: translateY(0.25em);
  }
  100% {
    transform: none;
  }
}

/* A marker sweep behind a line the moment it lands, so the eye goes from
   the field on the left to the spot it filled on the paper. */
.hw-ln::after {
  content: "";
  position: absolute;
  inset: 0 -1.2cqw;
  z-index: -1;
  border-radius: 0.8cqw;
  background: color-mix(in srgb, var(--hw-brand) 18%, transparent);
  opacity: 0;
  pointer-events: none;
}

.hw-ln.is-on::after {
  animation: hw-mark 1.4s ease-out;
}

@keyframes hw-mark {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  18% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 0);
  }
}

.hw-p-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 2cqw;
  padding: 2.4cqw 0;
  margin-bottom: 4cqw;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  font-family: var(--hw-num);
  font-size: 2.5cqw;
}

.hw-p-meta small {
  font-family: inherit;
}

.hw-p-table {
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
}

.hw-p-th,
.hw-p-tr {
  display: flex;
  justify-content: space-between;
  gap: 3cqw;
}

.hw-p-th {
  padding-bottom: 1.4cqw;
  margin-bottom: 1cqw;
  border-bottom: 0.5cqw solid var(--hw-brand);
  color: var(--hw-faint-p);
  font-size: 2.2cqw;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.7s ease;
}

.hw-p-tr {
  padding: 0.8cqw 0;
}

.hw-p-tr .hw-money,
.hw-p-totals .hw-money {
  font-family: var(--hw-num);
  font-variant-numeric: tabular-nums;
}

.hw-p-totals {
  display: flex;
  flex-direction: column;
  gap: 0.6cqw;
  align-self: flex-end;
  width: 54%;
  margin-top: 4cqw;
  padding-top: 2cqw;
  border-top: 1px solid #edf0f5;
  color: var(--hw-faint-p);
}

.hw-p-totals > span {
  display: flex;
  justify-content: space-between;
}

.hw-p-totals .hw-p-total {
  margin-top: 1cqw;
  padding: 1.6cqw 2cqw;
  border-radius: 1.4cqw;
  background: color-mix(in srgb, var(--hw-brand) 10%, #fff);
  color: var(--hw-ink-p);
  font-weight: 700;
  font-size: 3.1cqw;
  transition: background 0.7s ease;
}

.hw-p-total .hw-money {
  color: var(--hw-brand);
  transition: color 0.7s ease;
}

.hw-p-foot {
  margin-top: auto;
  padding-top: 3cqw;
  font-size: 2.3cqw;
  white-space: normal;
}

.hw-p-foot.hw-ln::before {
  top: 3.4cqw;
}

/* Versturen: the paper folds down into the mail that carries it. */
.hw-desk.is-sending .hw-paper-wrap {
  animation: hw-fold 0.7s cubic-bezier(0.5, 0, 0.75, 0.3) forwards;
}

@keyframes hw-fold {
  0% {
    transform: translateY(var(--pan, 0%));
  }
  25% {
    transform: translateY(calc(var(--pan, 0%) - 2%)) scale(1.02);
  }
  100% {
    transform: translateY(8%) scale(0.32);
    opacity: 0;
  }
}

.hw-desk.is-sent .hw-paper-wrap {
  visibility: hidden;
}

.hw-sent {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}

.hw-mail {
  width: min(100%, 360px);
  padding: 18px 20px;
  border: 1px solid var(--hw-line-strong);
  border-radius: 14px;
  background: var(--hw-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  color: var(--hw-ink);
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition:
    opacity 0.3s ease,
    transform 0.55s var(--hw-spring);
}

[data-theme="dark"] .hw-mail {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.hw-desk.is-sending .hw-mail {
  opacity: 1;
  transform: none;
  transition-delay: 0.4s;
}

.hw-mail p {
  margin: 0;
}

.hw-mail-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px !important;
  font-size: 16px;
}

.hw-sent-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hw-green);
  color: #fff;
  box-shadow: 0 0 0 5px var(--hw-green-soft);
}

[data-theme="dark"] .hw-sent-ico {
  color: #04261b;
}

.hw-mail-row {
  display: grid;
  grid-template-columns: 5.6em minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--hw-line);
  font-size: 13px;
}

.hw-mail-row small {
  color: var(--hw-ink-faint);
  font-size: 12px;
}

.hw-mail-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 500;
}

.hw-mail-body {
  padding-top: 10px;
  border-top: 1px solid var(--hw-line);
  color: var(--hw-ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.hw-mail-body b {
  color: var(--hw-ink);
  font-family: var(--hw-num);
  font-weight: 600;
}

/* ---------- Step 4: the dashboard over the whole window ---------- */
.hw-dash {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px;
  padding: 28px 30px;
  background: var(--hw-surface);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.45s ease,
    visibility 0s linear 0.45s;
}

.hw-stage[data-step="4"] .hw-dash {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.45s ease,
    visibility 0s;
}

.hw-dash-main,
.hw-dash-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.hw-dash-side {
  padding-left: 28px;
  border-left: 1px solid var(--hw-line);
  padding-top: 42px;
}

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

.hw-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--hw-line);
  border-radius: 12px;
  background: var(--hw-surface-2);
}

.hw-kpi b {
  font-family: var(--hw-num);
  font-size: min(24px, 2.2vw);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.hw-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hw-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--hw-line);
  border-radius: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s ease 0.15s,
    transform 0.5s var(--hw-ease) 0.15s;
}

.hw-stage[data-step="4"] .hw-row {
  opacity: 1;
  transform: none;
}

.hw-row-no {
  font-family: var(--hw-num);
  font-size: 12px;
  color: var(--hw-ink-faint);
}

.hw-row-who {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-row-amt {
  font-family: var(--hw-num);
  font-variant-numeric: tabular-nums;
}

.hw-badge {
  display: inline-grid;
  justify-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--hw-accent-soft);
  color: var(--hw-accent);
  font-size: 12px;
  font-weight: 600;
  transition:
    background 0.35s ease,
    color 0.35s ease;
}

.hw-badge > span {
  grid-area: 1 / 1;
  transition: opacity 0.25s ease;
}

.hw-badge-open,
.hw-badge.is-on .hw-badge-sent {
  opacity: 0;
}

.hw-badge.is-on .hw-badge-open {
  opacity: 1;
}

.hw-badge.is-on {
  background: var(--hw-green-soft);
  color: var(--hw-green);
  animation: hw-pop 0.45s var(--hw-spring);
}

.hw-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--hw-green-soft);
  color: var(--hw-ink);
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.35s ease,
    transform 0.5s var(--hw-spring);
}

.hw-event svg {
  flex: none;
  color: var(--hw-green);
}

.hw-event small {
  margin-left: auto;
  flex: none;
  color: var(--hw-ink-faint);
  font-size: 12px;
}

.hw-event.is-on {
  opacity: 1;
  transform: none;
}

.hw-next {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--hw-line);
  border-radius: 12px;
  opacity: 0;
  transform: translateX(10px);
  transition:
    opacity 0.4s ease,
    transform 0.5s var(--hw-ease);
}

.hw-next.is-on {
  opacity: 1;
  transform: none;
}

.hw-next-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--hw-accent-soft);
  color: var(--hw-accent);
}

.hw-next-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--hw-ink-soft);
  font-size: 13px;
}

.hw-next-txt b {
  color: var(--hw-ink);
  font-size: 14px;
}

.hw-next-txt b small {
  margin-left: 4px;
  color: var(--hw-ink-faint);
  font-size: 12px;
  font-weight: 500;
}

/* The run in one line: where the quarter hour went. */
.hw-recap {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--hw-line);
}

.hw-recap-track {
  position: relative;
  height: 6px;
  margin: 0 0 34px;
  border-radius: 99px;
  background: var(--hw-surface-2);
  box-shadow: inset 0 0 0 1px var(--hw-line);
}

.hw-recap-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 77.8%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hw-accent), var(--hw-green));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s var(--hw-ease) 0.3s;
}

.hw-recap-mark {
  position: absolute;
  top: 50%;
  left: var(--at);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  max-width: 21%;
  padding-left: 10px;
  margin-left: -6px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.35s ease var(--d, 0s);
}

.hw-recap-mark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--hw-surface);
  box-shadow: inset 0 0 0 3px var(--hw-accent);
}

.hw-recap-mark.is-last::before {
  box-shadow: inset 0 0 0 3px var(--hw-green);
}

.hw-recap-mark b,
.hw-recap-mark span {
  position: absolute;
  left: 18px;
  white-space: nowrap;
}

.hw-recap-mark b {
  bottom: 12px;
  font-family: var(--hw-num);
  font-size: 13px;
  color: var(--hw-ink);
}

.hw-recap-mark span {
  top: 12px;
  font-size: 12px;
  color: var(--hw-ink-faint);
}

.hw-recap-mark.is-last b {
  color: var(--hw-green);
}

.hw-recap-end {
  position: absolute;
  right: 0;
  bottom: 15px;
  font-family: var(--hw-num);
  font-size: 13px;
  color: var(--hw-ink-faint);
}

.hw-stage[data-step="4"] .hw-recap-fill {
  transform: none;
}

.hw-stage[data-step="4"] .hw-recap-mark {
  opacity: 1;
}

/* ---------- The pointer ---------- */
.hw-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--cx, 50%), var(--cy, 80%));
  transition:
    transform 0.7s cubic-bezier(0.45, 0, 0.2, 1),
    opacity 0.3s ease;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.25));
}

.hw-cursor.is-on {
  opacity: 1;
}

.hw-cursor svg {
  display: block;
  transition: transform 0.12s ease;
}

.hw-cursor::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 3px;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--hw-accent);
  opacity: 0;
}

.hw-cursor.is-click svg {
  transform: scale(0.84);
}

.hw-cursor.is-click::after {
  animation: hw-ripple 0.5s ease-out;
}

@keyframes hw-ripple {
  0% {
    opacity: 0.8;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

/* ---------- Captions ---------- */
.hw-captions {
  display: grid;
  margin-top: 22px;
}

.hw-caption {
  grid-area: 1 / 1;
  max-width: 720px;
  margin: 0 auto;
  color: var(--landing-text-secondary);
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.hw-caption.is-active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Phone ---------- */
@media (max-width: 768px) {
  /* Four numbered tabs; the active one opens up to show its title. */
  .hw-rail {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
  }

  .hw-rail li {
    flex: 0 0 48px;
    transition: flex-basis 0.4s var(--hw-ease);
  }

  .hw-rail li:has(.is-active) {
    flex: 1 1 auto;
  }

  .hw-rail li,
  .hw-step,
  .hw-step-head {
    min-width: 0;
  }

  .hw-step {
    padding: 10px 11px 0;
    font-size: 14px;
  }

  .hw-step-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .hw-step:not(.is-active) .hw-step-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .hw-bar {
    margin: auto -11px 0;
  }

  .hw-window {
    border-radius: 16px;
  }

  .hw-chrome {
    gap: 8px;
    height: 46px;
    padding: 0 8px 0 12px;
  }

  .hw-dots,
  .hw-url {
    display: none;
  }

  .hw-clock {
    margin-right: auto;
  }

  .hw-stage {
    display: block;
    height: 590px;
    font-size: 13px;
  }

  .hw-desk {
    position: absolute;
    inset: 0;
    align-items: start;
    padding-top: 18px;
  }

  .hw-paper-wrap {
    width: 84%;
  }

  /* Keep the sent mail above the sheet. */
  .hw-sent {
    padding: 16px 16px 322px;
  }

  /* The app is a sheet over the lower part of the desk. */
  .hw-app {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    height: 300px;
    border: 1px solid var(--hw-line-strong);
    border-radius: 16px;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.14);
  }

  [data-theme="dark"] .hw-app {
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  }

  .hw-pane {
    inset: 16px;
    gap: 10px;
  }

  .hw-pane > * {
    flex-shrink: 0;
  }

  /* The totals sit on the paper right above the sheet. */
  .hw-pane[data-pane="3"] .hw-sum,
  .hw-pane[data-pane="3"] .hw-lhead {
    display: none;
  }

  .hw-stage[data-step="4"] .hw-app {
    opacity: 0;
  }

  .hw-dash {
    z-index: 4;
  }

  .hw-pane-title {
    font-size: 16px;
  }

  .hw-search,
  .hw-chip {
    height: 40px;
  }

  .hw-fields {
    gap: 8px 10px;
  }

  .hw-field > .hw-val,
  .hw-field > .hw-input,
  .hw-lrow .hw-input {
    height: 34px;
  }

  /* The paper above already shows name and address; the sheet keeps the
     fields still being typed. */
  .hw-pane[data-pane="1"] .hw-field:not([data-fill="s-vat"]):not([data-fill="s-iban"]),
  .hw-pane[data-pane="2"] .hw-field:not([data-fill="c-mail"]) {
    display: none;
  }

  .hw-pane[data-pane="1"] [data-fill="s-iban"] {
    grid-column: 1 / -1;
  }

  .hw-pane[data-pane="1"] .hw-colors {
    margin-top: 2px;
  }

  .hw-sum b {
    font-size: 19px;
  }

  .hw-btn {
    height: 38px;
  }

  .hw-dash {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    overflow: hidden;
  }

  .hw-dash-side {
    padding: 0;
    border: 0;
    gap: 10px;
  }

  .hw-dash-side .hw-next + .hw-next {
    display: none;
  }

  .hw-recap {
    display: none;
  }

  .hw-kpis {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--hw-line);
    border-radius: 12px;
    background: var(--hw-surface-2);
  }

  .hw-kpi {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    padding: 10px 14px;
    border: 0;
    border-radius: 0;
    background: none;
  }

  .hw-kpi + .hw-kpi {
    border-top: 1px solid var(--hw-line);
  }

  .hw-kpi b {
    font-size: 17px;
  }

  .hw-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 10px 12px;
  }

  .hw-row-no {
    grid-column: 1 / -1;
  }

  .hw-row-amt {
    grid-row: 3;
  }

  .hw-badge {
    grid-row: 2 / 4;
    grid-column: 2;
    align-self: center;
  }

  .hw-event {
    font-size: 13px;
    padding: 10px 12px;
  }

  .hw-caption {
    font-size: 15px;
  }
}

/* ---------- Reduced motion: still pictures of each step, no autoplay ---------- */
@media (prefers-reduced-motion: reduce) {
  .hw *,
  .hw *::before,
  .hw *::after {
    animation: none !important;
    transition: none !important;
  }

  .hw-cursor {
    display: none;
  }
}
