/* Twixia v4: your side / Twixia's side.
   The page is split on its centre line. Paper on the left is the client's side,
   black on the right is Twixia's. Sage is where the two meet. */
:root {
  --black: #000;
  --paper: #efefed;
  --white: #fff;
  --graphite: #676767;
  --mist: #c9c9c9;
  --sage: #c7dbcc;
  --sage-deep: #3f6150;

  --font: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 3.2vw, 52px);   /* distance from the centre line */
  --bar: 60px;
  --sec: clamp(64px, 11vh, 120px);   /* space above and below each section; larger on phones */
  --pebble: 46% 54% 42% 58% / 52% 44% 56% 48%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 3px; }
.us :focus-visible, .why :focus-visible, .footer :focus-visible { outline-color: var(--sage); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* The split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(90deg, var(--paper) 50%, var(--black) 50%);
}
.you { color: var(--black); text-align: right; padding-inline: var(--gutter) var(--gap); }
.us { color: var(--white); padding-inline: var(--gap) var(--gutter); }

.h2 { margin: 0; font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.6rem); font-weight: 600; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.lede { margin: 0; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); color: var(--mist); line-height: 1.2; }

.btn { display: inline-block; padding: .75em 1.3em; border-radius: 999px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn--sage { background: var(--sage); color: var(--black); }
.btn--sage:hover { background: var(--white); }
.btn--black { background: var(--black); color: var(--white); }
.btn--black:hover { background: var(--sage-deep); }

/* Bar */
.bar { position: sticky; top: 0; z-index: 10; height: var(--bar); font-size: .92rem; border-bottom: 1px solid var(--graphite); }
.bar .you, .bar .us { display: flex; align-items: center; gap: 14px; height: 100%; }
.bar .you { justify-content: flex-end; }
.bar__logo { margin-right: auto; }
.bar__logo img { height: 24px; width: auto; filter: brightness(0); }
.bar__label { color: var(--graphite); }
.us .bar__label { color: #9a9a9a; }
.bar__clock { font-weight: 600; white-space: nowrap; }
.bar__clock time { font-variant-numeric: tabular-nums; }
.bar__cta { margin-left: auto; padding: .55em 1.1em; }

/* Opening skyline: pinned for a short scroll while the tower grows in front of the headline.
   --p (0 to 1) is set from scroll in main.js. */
.sky { height: 165svh; background: var(--black); }
.sky__stage { position: sticky; top: var(--bar); height: calc(100svh - var(--bar)); overflow: clip; }
/* The scene keeps the photo's 4:3 ratio and covers the stage, so the planes stay registered */
.sky__scene {
  --fx: .5;
  position: absolute; top: 50%;
  width: max(100vw, 133.34svh); aspect-ratio: 4 / 3;
  left: calc(50vw - var(--fx) * max(100vw, 133.34svh));
  translate: 0 -50%;
}
.sky__back { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform-origin: 76% 84%; scale: calc(1.03 + var(--p, 0) * .03); translate: 0 calc(var(--p, 0) * -24px); }
.sky__title {
  position: absolute; left: 23%; top: 31%; z-index: 2; margin: 0;
  font-size: clamp(3.4rem, 10.6vw, 12rem); font-weight: 600; line-height: .9; letter-spacing: -.045em; color: var(--white);
  opacity: clamp(0, calc((1 - var(--p, 0)) * 5), 1);
}
/* scrim only where the headline sits */
.sky__title::before { content: ""; position: absolute; inset: -30% -12% -30% -20%; z-index: -1; background: radial-gradient(closest-side, #000e 40%, #0000); }
/* The tower sits at its measured place in the photo and grows from its base, so it never leaves the ground */
.sky__tower {
  position: absolute; z-index: 3; left: 72.57%; top: 24.26%; width: 6.6%; height: auto; max-width: none;
  transform-origin: 50% 100%; scale: calc(1 + var(--p, 0) * .16); translate: 0 calc(var(--p, 0) * -24px);
  filter: drop-shadow(0 18px 30px #0009);
}
.sky__floor { position: absolute; inset: auto 0 0; height: 46%; z-index: 4; background: linear-gradient(#0000, #000d 55%, #000); pointer-events: none; }
.sky__sub {
  position: absolute; z-index: 5; left: var(--gutter); bottom: clamp(2rem, 9vh, 6rem); margin: 0; max-width: 40ch;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); line-height: 1.4; color: #e6e6e3;
  opacity: clamp(0, calc((var(--p, 0) - .2) * 5), 1);
}

/* Hero */
.hero__top {
  row-gap: clamp(12px, 2.2vh, 22px);
  padding-block: clamp(24px, 4vh, 52px) clamp(20px, 3.4vh, 40px);
}
.hero__h { margin: 0; font-size: clamp(2.2rem, 5vw, 5rem); font-weight: 600; line-height: .96; letter-spacing: -.04em; }
.hero__p { margin: 0; font-size: 1.1rem; line-height: 1.4; }
.hero__p.you { padding-left: max(var(--gutter), calc(50vw - var(--gap) - 34ch)); color: #333; }
.hero__p.us { padding-right: max(var(--gutter), calc(50vw - var(--gap) - 36ch)); color: var(--mist); }

/* City picker */
.cities { margin: clamp(8px, 2vh, 20px) 0 0; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.cities__label { margin-right: 8px; color: var(--graphite); font-size: .95rem; }
.cities input { position: absolute; opacity: 0; pointer-events: none; }
.cities label span { display: block; padding: .42em .95em; border: 1px solid var(--black); border-radius: 999px; font-size: .95rem; font-weight: 600; cursor: pointer; }
.cities label span:hover { background: var(--white); }
.cities input:checked + span { background: var(--black); color: var(--white); }
.cities input:focus-visible + span { outline: 2px solid var(--sage-deep); outline-offset: 2px; }
.hero__ahead { margin: clamp(8px, 2vh, 20px) 0 0; align-self: center; color: var(--sage); font-weight: 600; }

/* The clocks are the hero's one loud thing */
.hero__clock { margin: 0; }
.hero__clock time { display: block; font-size: clamp(4.4rem, min(11.5vw, 18svh), 11rem); font-weight: 600; line-height: .88; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.hero__clock span { display: block; margin-top: 10px; font-size: 1.3rem; font-weight: 600; }

/* Both working days on the visitor's own clock, on the posts' graphite caption bar */
.day { padding: clamp(18px, 3vh, 28px) 0 clamp(16px, 2.6vh, 24px); background: var(--graphite); color: var(--white); }
.day__note { margin: 0 0 14px; font-size: 1.15rem; }
.day__note b { color: var(--sage); }
.day__row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 6px; }
.day__name { font-size: .92rem; font-weight: 600; }
.day__track { position: relative; height: 26px; border-radius: 6px; background: #7d7d7d; overflow: hidden; }
.day__block { position: absolute; top: 0; bottom: 0; background: var(--paper); transition: left .5s cubic-bezier(.3, .7, 0, 1), width .5s cubic-bezier(.3, .7, 0, 1); }
[data-track-lk] .day__block { background: var(--black); }
.day__track .day__block--shared { background: var(--sage); }
.day__scale { margin-top: 8px; font-size: .8rem; color: #e2e2e2; }
.day__scale .day__name { font-weight: 400; font-size: .8rem; }
.day__scale div { display: flex; justify-content: space-between; }

/* Any role */
.roles { border-top: 1px solid var(--graphite); }
.roles__top .you, .roles__top .us { padding-block: var(--sec) clamp(28px, 5vh, 48px); }
.roles__top { align-items: end; }
.roles__top .h2 { margin-left: auto; max-width: 12ch; }
.roles__top .lede { max-width: 22ch; }
.belt { padding-block: clamp(12px, 2vh, 24px); background: linear-gradient(90deg, var(--paper) 50%, var(--black) 50%); overflow: hidden; }
/* White text blended by difference: near-black over the paper half, white over the black half */
.belt__row {
  list-style: none; margin: 0; padding: 0;
  display: flex; width: max-content;
  color: var(--white); mix-blend-mode: difference;
  font-size: clamp(2rem, 5.6vw, 5.2rem); font-weight: 600; line-height: 1.22; letter-spacing: -.035em; white-space: nowrap;
  animation: belt var(--t, 50s) linear infinite;
}
.belt__row li { padding-right: 1.1em; }
.belt:hover .belt__row { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }
.roles__foot .you, .roles__foot .us { padding-block: clamp(28px, 5vh, 48px) var(--sec); }
.roles__q { margin: 0; font-size: 1.3rem; font-weight: 600; }
.roles__foot .us p { margin: 0; max-width: 44ch; color: var(--mist); }

/* Move the line */
.line__top { padding-block: var(--sec) clamp(28px, 5vh, 48px); border-top: 1px solid var(--graphite); }
.line__top .h2 { margin-left: auto; max-width: 14ch; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button {
  padding: .6em 1.1em; border-radius: 999px;
  border: 1px solid #ffffff66; background: none; color: var(--white);
  font: 600 1rem/1 var(--font); cursor: pointer;
}
.tabs button:hover { border-color: var(--white); }
.tabs button[aria-selected="true"] { background: var(--sage); border-color: var(--sage); color: var(--black); }
.line__desc { margin: 22px 0 0; max-width: 46ch; min-height: 7.5em; color: var(--mist); }
.line__desc b { display: block; color: var(--white); }

.board {
  list-style: none; margin: 0; padding: 4px 0;
  background: linear-gradient(90deg, var(--paper) 50%, var(--black) 50%);
}
.board li { position: relative; height: 58px; }
/* Each job hangs off the centre line and slides to whichever side holds it */
.board span {
  position: absolute; left: 50%; top: 50%;
  padding: .55em 1.15em; border-radius: 999px;
  border: 1px solid var(--black); background: var(--white); color: var(--black);
  font-weight: 600; white-space: nowrap;
  transform: translate(calc(-100% - var(--gap)), -50%);
  transition: transform .6s cubic-bezier(.3, .7, 0, 1), background-color .3s, border-color .3s;
  transition-delay: calc(var(--i, 0) * 40ms);
}
.board li[data-side="us"] span { transform: translate(var(--gap), -50%); background: var(--sage); border-color: var(--sage); }
.line__tally { padding-block: 18px clamp(56px, 9vh, 96px); font-size: 1.05rem; }
.line__tally p { margin: 0; }
.line__tally .you { color: var(--graphite); }
.line__tally .us { color: #9a9a9a; }
.line__tally b { font-size: 1.5rem; color: var(--black); font-variant-numeric: tabular-nums; }
.line__tally .us b { color: var(--sage); }

/* Ledger */
.ledger__intro { padding-block: var(--sec) clamp(56px, 9vh, 96px); border-top: 1px solid var(--graphite); align-items: end; }
.ledger__intro .h2 { margin-left: auto; max-width: 13ch; }
.row { position: relative; }
.row .you, .row .us { padding-block: clamp(56px, 9vh, 100px); }
.row .you { border-top: 1px solid #cfcfcc; }
.row .us { border-top: 1px solid #2c2c2c; }
/* The topic sits on the line itself, in sage: the one thing both sides share */
.row__topic {
  position: absolute; left: 50%; top: 0; z-index: 1;
  transform: translate(-50%, -50%);
  margin: 0; padding: .35em 1.1em; border-radius: 999px;
  background: var(--sage); color: var(--black);
  font-size: 1rem; font-weight: 600; white-space: nowrap;
}
.row__you { margin: 0 0 0 auto; max-width: 17ch; font-size: clamp(1.5rem, 1rem + 2vw, 2.6rem); font-weight: 600; line-height: 1.06; letter-spacing: -.025em; text-wrap: balance; }
.row .us p { margin: 0 0 1em; max-width: 50ch; color: var(--mist); }
.row .us p b { color: var(--white); }
.row__img { margin-top: 30px; width: min(100%, 440px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--pebble); }

/* What goes wrong: the problem on the client's side, the fix on Twixia's */
.wrong { border-top: 1px solid var(--graphite); }
.wrong__top { align-items: end; }
.wrong__top .you, .wrong__top .us { padding-block: var(--sec) clamp(36px, 6vh, 64px); }
.wrong__top .h2 { margin-left: auto; max-width: 15ch; }
.wrong__top .lede { max-width: 18ch; }
.wrong__list { margin: 0; }
.wrong__list dt, .wrong__list dd { margin: 0; padding-block: clamp(22px, 3.6vh, 34px); }
.wrong__list dt { border-top: 1px solid #cfcfcc; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; color: var(--black); }
.wrong__list dd { border-top: 1px solid #2c2c2c; color: var(--mist); align-self: stretch; }
.wrong__list dd::before { content: "The fix: "; color: var(--sage); font-weight: 600; }
.wrong__list dd { padding-right: max(var(--gutter), calc(50vw - var(--gap) - 50ch)); }
.wrong__list > div:last-child dt, .wrong__list > div:last-child dd { padding-bottom: var(--sec); }

/* Merge */
.merge { padding: clamp(88px, 16vh, 180px) var(--gutter); background: var(--sage); color: var(--black); text-align: center; }
.merge h2 { margin: 0; font-size: clamp(3rem, 9vw, 8.5rem); font-weight: 600; line-height: .92; letter-spacing: -.045em; }
.merge p { margin: 28px auto 32px; max-width: 34ch; font-size: 1.25rem; line-height: 1.35; }

/* Enquiry form */
.book { border-top: 1px solid var(--graphite); }
.book .you, .book .us { padding-block: var(--sec); }
.book .h2 { margin-left: auto; max-width: 12ch; }
.book__lede { margin: 20px 0 0 auto; max-width: 26ch; font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); line-height: 1.25; color: var(--graphite); }
.book__form { display: grid; gap: 16px; max-width: 30rem; }
.book__form[hidden] { display: none; }
.book__form label { display: grid; gap: 6px; font-size: .95rem; color: var(--mist); }
.book__form input, .book__form textarea, .book__form select {
  width: 100%; padding: .7em .85em; border: 1px solid #555; border-radius: 6px; background: #111; color: var(--white);
  font: 400 1rem/1.4 var(--font);
}
.book__form input:focus, .book__form textarea:focus, .book__form select:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
.book__form textarea { resize: vertical; }
.book__trap { position: absolute !important; left: -9999px; }
.book__form .btn { justify-self: start; border: 0; cursor: pointer; font: 600 1rem/1 var(--font); }
.book__form .btn:disabled { opacity: .45; cursor: default; }
.book__status { margin: 0; min-height: 1.5em; color: var(--mist); }
.book__status a { color: var(--sage); font-weight: 600; }
.book__done-h { margin: 0 0 8px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 600; color: var(--sage); letter-spacing: -.02em; }
.book__done p { margin: 0; max-width: 34ch; color: var(--mist); }

/* WhatsApp chat button */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 9;
  display: inline-flex; align-items: center; gap: 8px;
  padding: .7em 1.1em; border-radius: 999px;
  background: var(--sage); color: var(--black); border: 1px solid var(--black);
  font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 18px -6px #0008;
}
.wa:hover { background: var(--white); }

/* Proof: post cards in a swipeable row, the same format as the social posts */
.proof { padding: clamp(72px, 12vh, 130px) 0; background: var(--white); color: var(--black); }
.feed__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(32px, 6vh, 56px); }
.feed__nav { display: flex; gap: 10px; }
.feed__nav button { width: 48px; height: 48px; border: 1px solid var(--black); border-radius: 50%; background: none; color: var(--black); font-size: 1.2rem; cursor: pointer; }
.feed__nav button:hover { background: var(--black); color: var(--white); }
.feed__nav button:disabled { opacity: .3; cursor: default; background: none; color: var(--black); }
.feed {
  --edge: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter)));
  list-style: none; margin: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(440px, 84vw); gap: 20px;
  padding: 0 var(--edge) 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--edge);
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.post { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto; aspect-ratio: 4 / 5; background: var(--black); color: var(--white); overflow: hidden; }
.post__title { margin: 0; padding: 26px 26px 0; font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); font-weight: 500; line-height: 1.12; letter-spacing: -.02em; }
.post__visual { display: grid; place-items: center; padding: 18px 22px; min-height: 0; }
.post__visual img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--pebble); }
.post__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; background: var(--graphite); color: #f2f2f0; font-size: .84rem; line-height: 1.35; }
.post__bar p { margin: 0; }
.post__who { width: 17ch; padding-left: 14px; border-left: 1px solid #ffffff80; font-size: .78rem; }
.post__who b { display: block; font-size: .9rem; line-height: 1.15; margin-bottom: 2px; }
.post__who em { display: block; margin-top: 4px; font-style: normal; color: var(--sage); font-weight: 600; }
.bot { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 8px; }
.bot li { padding: 10px 14px; border: 1px solid #444; border-radius: 10px; color: var(--mist); font-size: .9rem; }
.bot span { display: block; margin-bottom: 2px; color: var(--white); font-size: 1.15rem; font-weight: 600; }
.bot .bot__on { background: var(--sage); border-color: var(--sage); color: #2b3b31; }
.bot .bot__on span { color: var(--black); }
.post__visual--route { grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.post__visual--route span { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 600; color: var(--mist); }
.post__visual--route .on { color: var(--sage); }
.post__visual--route i { height: 2px; background: repeating-linear-gradient(90deg, var(--mist) 0 6px, #0000 6px 12px); }
.post__visual--route small { grid-column: 1 / -1; justify-self: center; color: #9a9a9a; font-size: .85rem; }

/* Why */
.why { padding: clamp(72px, 12vh, 130px) 0; }
.why__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); }
.why .h2 { max-width: 14ch; }
.why img { margin-top: 32px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--pebble); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 22px 0; border-top: 1px solid #333; color: var(--mist); }
.facts b { display: block; margin-bottom: 4px; color: var(--white); font-size: 1.25rem; line-height: 1.25; }

/* Footer */
.footer { padding: 44px 0; border-top: 1px solid #222; color: #9a9a9a; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: start; }
.footer img { height: 24px; width: auto; }
.footer p { margin: 0; }

/* Phone: the halves stack, light block then dark block. The board keeps its two columns. */
@media (max-width: 760px) {
  :root { --sec: 104px; }
  .split:not(.split--keep) { display: block; background: none; }
  .split:not(.split--keep) > .you { background: var(--paper); text-align: left; padding-inline: var(--gutter); }
  .split:not(.split--keep) > .us { background: var(--black); padding-inline: var(--gutter); }

  .bar { font-size: .82rem; }
  .bar .you, .bar .us { gap: 8px; }
  .bar__label, .bar__cta { display: none; }
  .bar__logo img { height: 20px; }

  .sky__scene { --fx: .66; }
  .sky__title { left: 50.5%; top: 30%; font-size: clamp(3rem, 15vw, 5rem); }
  .hero__top.split { display: grid; grid-template-columns: 1fr; row-gap: 0; padding-block: 0; }
  .hero__top > * { padding-block: 0 16px; }
  /* close sub-pixel seams between the stacked blocks */
  .hero__top > .you { box-shadow: 0 1px 0 var(--paper); }
  .hero__top > .us { box-shadow: 0 1px 0 var(--black); }
  .hero__h.you { order: 1; padding-top: 48px; }
  .hero__p.you { order: 2; padding-left: var(--gutter); }
  .cities { order: 3; margin: 0; justify-content: flex-start; }
  .cities__label { width: 100%; margin: 0 0 2px; }
  .hero__clock.you { order: 4; padding-bottom: 48px; }
  .hero__h.us { order: 5; padding-top: 48px; }
  .hero__p.us { order: 6; padding-right: var(--gutter); }
  .hero__clock.us { order: 7; padding-bottom: 6px; }
  .hero__ahead { order: 8; margin: 0; padding-bottom: 48px; }
  .day__row { grid-template-columns: 1fr; gap: 4px; margin-top: 10px; }
  .day__scale .day__name { display: none; }

  .roles__top .you { padding-block: 48px 12px; }
  .roles__top .us { padding-block: 12px 32px; }
  .roles__top .h2 { margin-left: 0; }
  .roles__foot .you { padding-block: 28px 8px; }
  .roles__foot .us { padding-block: 8px 44px; }
  .line__top { padding-block: 0; }
  .line__top .you { padding-block: 48px 28px; }
  .line__top .us { padding-block: 28px 24px; }
  .line__top .h2, .ledger__intro .h2, .row__you { margin-left: 0; }
  .line__desc { min-height: 11em; }
  .board li { height: 62px; }
  .board span { padding: .5em .8em; font-size: .8rem; line-height: 1.15; white-space: normal; text-align: center; max-width: calc(50vw - var(--gap) - 8px); }

  .wrong__top .you { padding-block: var(--sec) 12px; }
  .wrong__top .us { padding-block: 12px 36px; }
  .wrong__top .h2 { margin-left: 0; }
  .wrong__list dt { padding-block: 22px 12px; border-top: 0; }
  .wrong__list dd { padding-block: 12px 26px; border-top: 0; padding-right: var(--gutter); }
  .wrong__list > div:last-child dt { padding-bottom: 12px; }
  .book .you { padding-block: var(--sec) 36px; }
  .book .us { padding-block: 40px var(--sec); }
  .book .h2, .book__lede { margin-left: 0; }
  .wa span { display: none; }
  .wa { padding: .8em; }
  .ledger__intro { padding-block: 0; }
  .ledger__intro .you { padding-block: var(--sec) 16px; }
  .ledger__intro .us { padding-block: 16px 48px; }
  .row .you { padding-block: 36px; border-top: 0; }
  .row .us { padding-block: 36px 60px; border-top: 0; }
  .row__topic { position: static; transform: none; display: block; border-radius: 0; padding: 10px var(--gutter); }

  .feed__nav { display: none; }
  .proof, .why { padding-block: var(--sec); }
  .merge { padding-block: calc(var(--sec) * 1.3); }
  .bot { gap: 6px; }
  .bot li { padding: 6px 10px; font-size: .76rem; }
  .bot span { font-size: .95rem; }
  .why__grid, .footer__grid { grid-template-columns: 1fr; }
  .footer__grid { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .board span, .day__block { transition: none; }
  /* no pin: the skyline is one static screen with its caption showing */
  .sky { height: auto; }
  .sky__stage { position: relative; top: 0; }
  .sky__sub { opacity: 1; }
  .belt__row { animation: none; width: auto; flex-wrap: wrap; justify-content: center; white-space: normal; }
  .belt__row [aria-hidden] { display: none; }
}

/* Phone, second pass: the roles and move-the-line sections */
@media (max-width: 760px) {
  /* Roles: one light block (heading + sentence), the belt, one dark block (question + answer) */
  .roles .roles__top.split > .us { background: var(--paper); padding-block: 0 40px; }
  .roles .roles__top .lede { color: var(--graphite); max-width: none; font-size: 1.2rem; }
  .roles .roles__top.split > .you { padding-block: var(--sec) 10px; box-shadow: 0 1px 0 var(--paper); }
  .roles .roles__foot.split > .you { background: var(--black); color: var(--white); padding-block: 40px 6px; }
  .roles .roles__foot.split > .us { padding-block: 0 var(--sec); }
  .roles__q { color: var(--sage); }
  .belt__row { font-size: 1.9rem; }

  /* Move the line: heading, buttons, board and tally fit one screen; the description follows */
  .line { display: flex; flex-direction: column; background: var(--black); border-top: 1px solid var(--graphite); }
  .line .line__top.split { display: contents; }
  .line .line__top.split > .us { display: contents; }
  .line .line__top.split > .you { order: 1; padding-block: var(--sec) 28px; }
  .line .tabs { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px var(--gutter); }
  .line .tabs button { padding: .7em .4em; font-size: .88rem; }
  .line .board { order: 3; }
  .line .line__tally { order: 4; padding-block: 10px 16px; font-size: .95rem; }
  .line .line__desc { order: 5; min-height: 9.5em; margin: 0; padding: 22px var(--gutter) var(--sec); max-width: none; border-top: 1px solid #2c2c2c; }
  .board li { height: 44px; }
  .board span { font-size: .78rem; padding: .45em .7em; }

  /* Keep the chat button clear of the content it floats over */
  .wa { right: 12px; bottom: 12px; padding: .65em; }
}

/* Phone: the ledger keeps its two sides. A narrow light column holds the client's one line,
   pinned in view, while Twixia's long column scrolls past it. */
@media (max-width: 760px) {
  .ledger .row.split { display: grid; grid-template-columns: 34% 66%; background: linear-gradient(90deg, var(--paper) 34%, var(--black) 34%); }
  .ledger .row__topic { grid-column: 1 / -1; }
  .ledger .row.split > .you { background: none; padding: 28px 10px 40px var(--gutter); }
  .ledger .row.split > .us { background: none; padding: 28px var(--gutter) 64px 16px; }
  .ledger .row__you {
    position: sticky; top: calc(var(--bar) + 20px);
    margin: 0; max-width: none;
    font-size: 1.02rem; line-height: 1.18; letter-spacing: -.01em; text-wrap: pretty;
  }
  .ledger .row__you::before, .ledger .row .us::before { display: block; margin-bottom: 10px; font-size: .78rem; font-weight: 600; letter-spacing: 0; }
  .ledger .row__you::before { content: "You"; color: var(--graphite); }
  .ledger .row .us::before { content: "Twixia"; color: var(--sage); }
  .ledger .row .us p { font-size: .95rem; }
  .ledger .row__img { width: 100%; margin-top: 22px; }
}

/* Phone: what goes wrong. Each problem sits beside its fix, and is crossed off once scrolled past
   (.is-done is set in main.js). */
@media (max-width: 760px) {
  .wrong .wrong__top.split > .you { padding-block: var(--sec) 10px; box-shadow: 0 1px 0 var(--paper); }
  .wrong .wrong__top.split > .us { background: var(--paper); padding-block: 0 36px; }
  .wrong .wrong__top .lede { color: var(--graphite); max-width: none; font-size: 1.2rem; }

  .wrong__list { counter-reset: wrong; }
  .wrong__list > div.split { display: grid; grid-template-columns: 44% 56%; background: linear-gradient(90deg, var(--paper) 44%, var(--black) 44%); }
  .wrong .wrong__list > .split > dt { background: none; padding: 22px 12px 24px var(--gutter); border-top: 1px solid #cfcfcc; font-size: 1.05rem; line-height: 1.2;
    text-decoration: line-through transparent 2px; transition: color .5s, text-decoration-color .5s; }
  .wrong .wrong__list > .split > dd { background: none; padding: 22px var(--gutter) 24px 14px; border-top: 1px solid #2c2c2c; font-size: .92rem; line-height: 1.45; }
  .wrong .wrong__list > .split:last-child > dt, .wrong .wrong__list > .split:last-child > dd { padding-bottom: var(--sec); }
  .wrong__list dt::before { counter-increment: wrong; content: counter(wrong); display: inline-block; width: 100%; margin-bottom: 6px; font-size: .8rem; color: var(--sage-deep); }
  .wrong__list dd::before { display: block; margin-bottom: 4px; font-size: .8rem; }
  .wrong .wrong__list > .split.is-done > dt { color: #8a8a88; text-decoration-color: var(--sage-deep); }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .wrong .wrong__list > .split > dt { transition: none; }
}
