/* Fonts: self-hosted, SIL Open Font License (Bricolage Grotesque, Newsreader) */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("./fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Palette: paper, pen ink, ballpoint blue, highlighter */
:root {
  --paper: #f6f7fb;
  --sheet: #ffffff;
  --ink: #0e1a3a;
  --ink-2: #36405b;
  --ink-3: #5e6985;
  --pen: #2540f0;
  --pen-deep: #1b2fc2;
  --marker: #ffe352;
  --mist: #e8ecf6;
  --line: #d2d8e7;
  --sans: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --wrap: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
dt,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--pen);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

/* Text that reads like a letter */
.prose {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.48;
  color: var(--ink-2);
}

/* No single word left alone on the last line of a paragraph */
.prose,
.lead,
.takes dd,
.steps p,
.price p,
.qa p {
  text-wrap: pretty;
}

.link {
  color: var(--ink);
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: var(--pen);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.link:hover {
  color: var(--pen);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--pen);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--pen-deep);
}

.btn:active {
  transform: translateY(1px);
}

.btn-s {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.92rem;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 247, 251, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-in {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.name {
  margin-right: auto;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.nav a:hover {
  color: var(--ink);
}

.nav .nav-other {
  color: var(--pen);
  font-weight: 600;
}

.nav .nav-other:hover {
  color: var(--pen-deep);
}

/* Hero */
.hero {
  padding: 60px 0 92px;
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 60px;
  align-items: center;
}

.who {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.who-photo {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
}

.who-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.who-text {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-wrap: balance;
}

.who-text strong {
  display: block;
  font-size: 1.04rem;
  font-weight: 650;
  color: var(--ink);
}

.who-text a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pen);
  text-underline-offset: 3px;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(2.6rem, 6.2vw, 4.9rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* The wallet page headline is a longer sentence: one step smaller, three lines */
.hero-fin h1 {
  font-size: clamp(2.4rem, 5.1vw, 4rem);
  line-height: 1;
}

.lead {
  max-width: 30em;
  margin-bottom: 32px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.7vw, 1.36rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
}

.note {
  max-width: 34em;
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

/* Text links that stand next to a button get a full-height tap area */
.actions .link,
.ask-actions .link {
  padding: 11px 0;
}

/* Hero object: a brief goes in, one page comes back */
.demo {
  position: relative;
}

.demo-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

.demo-tabs span {
  margin-right: 4px;
}

.demo-tabs label {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sheet);
  color: var(--ink-2);
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.demo-tabs label:hover {
  border-color: var(--ink-3);
}

#demo-1:checked ~ .demo-tabs label[for="demo-1"],
#demo-2:checked ~ .demo-tabs label[for="demo-2"],
#demo-3:checked ~ .demo-tabs label[for="demo-3"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

#demo-1:focus-visible ~ .demo-tabs label[for="demo-1"],
#demo-2:focus-visible ~ .demo-tabs label[for="demo-2"],
#demo-3:focus-visible ~ .demo-tabs label[for="demo-3"] {
  outline: 3px solid var(--pen);
  outline-offset: 3px;
}

.demo-panel {
  display: none;
}

#demo-1:checked ~ .demo-panel-1,
#demo-2:checked ~ .demo-panel-2,
#demo-3:checked ~ .demo-panel-3 {
  display: block;
}

.brief {
  max-width: 410px;
  padding: 15px 18px 17px;
  border-radius: 18px 18px 18px 4px;
  background: var(--mist);
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.42;
}

.brief-from {
  display: block;
  margin-bottom: 5px;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-3);
}

.wait {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin-left: 26px;
  font-size: 0.84rem;
  color: var(--ink-3);
}

.wait::before {
  content: "";
  width: 2px;
  height: 100%;
  background: var(--pen);
  transform-origin: top;
}

.sheet {
  --tilt: -1.1deg;
  position: relative;
  margin-right: 12px;
  padding: 24px 28px 24px;
  border-radius: 3px;
  background: var(--sheet);
  box-shadow:
    0 0 0 1px rgba(14, 26, 58, 0.06),
    0 2px 6px rgba(14, 26, 58, 0.06),
    0 28px 52px -26px rgba(14, 26, 58, 0.4);
  transform: rotate(var(--tilt));
  transform-origin: 20% 0;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sheet-title {
  margin-bottom: 4px;
  font-size: 1.24rem;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.sheet-k {
  margin: 13px 0 5px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.sheet ul {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.38;
}

.sheet li {
  position: relative;
  margin: 3px 0;
  padding-left: 18px;
}

.sheet li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--pen);
}

.sheet .sheet-not li::before {
  background: var(--ink-3);
}

.sheet-rows {
  margin-top: 15px;
  border-top: 1px solid var(--line);
}

.sheet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}

.sheet-row span:nth-child(2) {
  color: var(--ink-3);
}

.sheet-row span:last-child {
  min-width: 4.2em;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sheet-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  font-size: 1.08rem;
  font-weight: 650;
}

.mark {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}

.mark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 3px 9px 4px 10px;
  background: var(--marker);
  transform: skewX(-6deg);
  transform-origin: left center;
}

.demo-cap {
  margin-top: 24px;
  font-size: 0.86rem;
  color: var(--ink-3);
}

/* Wallet page: one transfer, step by step, on the same sheet of paper */
.sheet .log li {
  margin: 0;
  padding: 0 0 13px 26px;
}

.sheet .log li:last-child {
  padding-bottom: 0;
}

.sheet .log li::before {
  left: 0;
  top: 0.36em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pen);
}

.sheet .log li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.36em + 13px);
  bottom: -0.2em;
  width: 2px;
  background: var(--line);
}

.sheet .log li:last-child::after {
  display: none;
}

.log b {
  display: block;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.log span {
  display: block;
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* A step with no clear answer yet: an open dot */
.sheet .log .log-open::before {
  background: var(--sheet);
  box-shadow: inset 0 0 0 2px var(--pen);
}

.log + .sheet-total {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

/* Statement */
.say {
  padding: 0 0 96px;
}

.say p {
  max-width: 31em;
  font-family: var(--serif);
  font-size: clamp(1.42rem, 2.6vw, 2.05rem);
  line-height: 1.33;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* Bands: heading left, content right */
.band {
  padding: 80px 0;
  border-top: 1px solid var(--line);
}

.band-in {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 40px;
}

.band h2 {
  font-size: 2rem;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.band-white {
  background: var(--sheet);
}

/* Featured case */
.case {
  padding: 40px 40px 44px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--sheet);
}
.case-top {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 40px;
}

.case-top h3 {
  margin-bottom: 14px;
  font-size: 2.4rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.case-more {
  margin-top: 14px;
}

.facts {
  font-size: 0.97rem;
}

.facts li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.facts li:last-child {
  border-bottom: 1px solid var(--line);
}

/* Demo video inside the featured case */
.case-video {
  margin: 0 0 40px;
}

.case-video-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.case-video-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-3);
}

.case-video-cap span {
  max-width: 62ch;
}

.case-video-full {
  font-weight: 600;
  white-space: nowrap;
}

/* System diagram, built from boxes so the text keeps its size on a phone */
.sys {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0 36px;
  align-items: stretch;
  font-size: 0.9rem;
  line-height: 1.25;
}

.sys ul {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
}

.sys li {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 14px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--sheet);
}

.sys b {
  display: block;
  font-weight: 650;
  text-wrap: balance;
}

.sys li span {
  font-size: 0.82rem;
  color: var(--ink-3);
  text-wrap: balance;
}

.sys-in li::after,
.sys-out li::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 36px;
  height: 2px;
  margin-top: -1px;
  background: var(--pen);
}

.sys-in li::after {
  left: calc(100% + 1.5px);
}

.sys-out li::before {
  right: calc(100% + 1.5px);
}

.sys-core {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 170px;
  padding: 18px 18px;
  border-radius: 14px;
  background: var(--pen);
  color: #ffffff;
  text-align: center;
}

.sys-core span {
  margin-top: 4px;
  font-size: 0.82rem;
  color: #d9defc;
  text-wrap: balance;
}

/* Plain rows of work */
.rows {
  border-top: 1px solid var(--line);
}

.case + .rows {
  margin-top: 60px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 44px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.row h3 {
  font-size: 1.24rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.row-tag {
  display: block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* What I take on */
.takes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 44px;
}

.takes > div {
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
}

.takes dt {
  margin-bottom: 4px;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.takes dd {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.takes-note {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 550;
}

/* How it works: a real sequence, so it is numbered */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 46px;
  counter-increment: step;
}

.steps li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: -28px;
  height: 2px;
  background: var(--line);
}

.steps li:last-child::before {
  display: none;
}

.steps li::after {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 650;
}

.step-when {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--pen);
}

.steps h3 {
  margin-bottom: 6px;
  font-size: 1.14rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.steps p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: balance;
}

/* Prices */
.prices {
  border-top: 2px solid var(--ink);
}

.price {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(8.5rem, auto);
  gap: 28px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.price h3 {
  font-size: 1.3rem;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.price-when {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
}

.price p {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.price .price-n {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.price-n small {
  display: block;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
}

.fine {
  margin-top: 20px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

/* Fair questions */
.qa {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 44px;
}

.qa h3 {
  margin-bottom: 6px;
  font-size: 1.14rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.qa p {
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.45;
  color: var(--ink-2);
}

/* The ask */
.ask {
  padding: 24px 0 64px;
}

.ask-in {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: end;
  padding: 64px 64px 60px;
  border-radius: 28px;
  background: var(--ink);
  color: #ffffff;
}

.ask h2 {
  margin-bottom: 24px;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.ask-mail {
  display: inline-block;
  padding: 7px 0;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px;
  overflow-wrap: anywhere;
}

.ask-mail:hover {
  color: var(--marker);
}

.ask-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 34px;
}

.ask .btn {
  background: #ffffff;
  color: var(--ink);
}

.ask .btn:hover {
  background: var(--marker);
}

.ask .link {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.ask .link:hover {
  color: var(--marker);
}

.ask :focus-visible {
  outline-color: var(--marker);
}

.ask-k {
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #a3aed2;
}

.ask-hints {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.4;
  color: #dfe4f5;
}

.ask-hints li {
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.ask-hints li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

/* Footer */
.foot {
  padding: 4px 0 44px;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
}

.foot a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--ink);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

/* Plain text pages: imprint, privacy */
.doc {
  padding: 64px 0 88px;
}

.doc-in {
  max-width: 35rem;
}

.doc h1 {
  margin-bottom: 30px;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1.02;
}

.doc h2 {
  margin: 38px 0 8px;
  font-size: 1.24rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc p,
.doc address {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-style: normal;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.doc p + p {
  margin-top: 12px;
}

.doc-facts {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.doc-facts div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.doc-facts dt {
  color: var(--ink-3);
}

.doc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--pen);
  text-underline-offset: 3px;
}

.doc a:hover {
  color: var(--pen);
}

.doc-date {
  margin-top: 40px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

/* One orchestrated moment: the brief arrives, the page comes back, the price is marked.
   It also replays when a person picks another example. */
@media (prefers-reduced-motion: no-preference) {
  .demo-panel .brief {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .demo-panel .wait::before {
    animation: draw 0.3s ease-out 0.4s both;
  }

  .demo-panel .wait span {
    animation: fade 0.3s ease-out 0.55s both;
  }

  .demo-panel .sheet {
    animation: land 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.7s both;
  }

  .demo-panel .mark::before {
    animation: swipe 0.45s ease-out 1.35s both;
  }

  /* Wallet page: the steps arrive one by one, then "Settled" is marked */
  .demo-panel .log li {
    animation: rise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.95s both;
  }

  .demo-panel .log li:nth-child(2) {
    animation-delay: 1.1s;
  }

  .demo-panel .log li:nth-child(3) {
    animation-delay: 1.25s;
  }

  .demo-panel .log li:nth-child(4) {
    animation-delay: 1.4s;
  }

  .demo-panel .log li:nth-child(5) {
    animation-delay: 1.55s;
  }

  .demo-panel .log + .sheet-total .mark::before {
    animation-delay: 1.95s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes land {
  from {
    opacity: 0;
    transform: translateY(26px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: rotate(var(--tilt));
  }
}

@keyframes swipe {
  from {
    transform: scaleX(0) skewX(-6deg);
  }
  to {
    transform: scaleX(1) skewX(-6deg);
  }
}

/* Desktop: the hero object keeps one height, whichever example is open */
@media (min-width: 981px) {
  .demo {
    min-height: 750px;
  }
}

/* Short laptop screens: the left column starts at the top, so the note stays above the fold */
@media (min-width: 981px) and (max-height: 820px) {
  .hero {
    padding-top: 44px;
  }

  .hero-in {
    align-items: start;
  }
}

/* Tablet */
@media (max-width: 980px) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 52px;
  }

  .demo {
    max-width: 540px;
  }

  .band-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .case-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

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

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 28px;
  }

  .steps li:nth-child(2)::before {
    display: none;
  }

  .case {
    padding: 32px 28px 34px;
  }

  .ask-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding: 48px 40px;
  }
}

/* Phone */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 16px;
  }

  .wrap {
    padding: 0 20px;
  }

  .top {
    position: static;
  }

  .top-in {
    flex-wrap: wrap;
    gap: 0 16px;
    min-height: 0;
    padding-top: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    padding: 12px 0 13px;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.9rem;
    scrollbar-width: none;
  }

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

  .nav {
    padding: 2px 0 3px;
  }

  .nav a {
    padding: 10px 0;
  }

  .demo-tabs span {
    flex-basis: 100%;
  }

  .demo-tabs label {
    padding: 11px 12px;
  }

  .case {
    padding: 24px 18px 22px;
    border-radius: 16px;
  }

  .foot a {
    display: inline-block;
    padding: 10px 0;
  }

  .hero {
    padding: 36px 0 64px;
  }

  .who {
    margin-bottom: 26px;
  }

  .sheet {
    --tilt: -0.6deg;
    padding: 20px 20px 20px;
  }

  .say {
    padding-bottom: 64px;
  }

  .band {
    padding: 56px 0;
  }

  .case-top h3 {
    font-size: 2rem;
  }

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

  .sys ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sys ul li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .sys-in li::after,
  .sys-out li::before {
    display: none;
  }

  .sys-core {
    position: relative;
    width: auto;
    margin: 22px 0;
  }

  .sys-core::before,
  .sys-core::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 2px;
    height: 22px;
    margin-left: -1px;
    background: var(--pen);
  }

  .sys-core::before {
    bottom: 100%;
  }

  .sys-core::after {
    top: 100%;
  }

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

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

  .steps li {
    padding: 0 0 30px 48px;
  }

  .steps li:last-child {
    padding-bottom: 0;
  }

  .steps li::before,
  .steps li:nth-child(2)::before {
    display: block;
    top: 0;
    bottom: 0;
    left: 14px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .steps li:last-child::before {
    display: none;
  }

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

  .price .price-n {
    margin-top: 4px;
    text-align: left;
  }

  .price-n small {
    display: inline;
    margin-right: 6px;
  }

  .qa {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .ask {
    padding: 8px 0 48px;
  }

  .ask-in {
    padding: 36px 24px 34px;
    border-radius: 20px;
  }

  .foot-in {
    flex-direction: column;
  }
}
