/* Longhand. Palette "Paimio": every colour stands for one thing.
   plaster  : the wall, and the page
   canary   : the floor, and the yellow that asks to be checked (a fill only, spruce text on it)
   spruce   : ink, what a clinician has signed or said
   green    : the patient's voice, secondary text and lines (the ceiling)
   sky      : the conversation, what was said aloud
   pencil   : draft text, written by the machine and not yet signed
   rail     : the handrail, and the line that leads back to the words */
:root {
  --plaster: #F9FBF9;
  --paper: #FFFFFF;
  --spruce: #17332C;
  --canary: #F6CB1B;
  --green: #4E6E63;
  --sky: #DCEBEA;
  --sky-soft: #EEF5F4;
  --pencil: #6F6A8C;
  --rail: #111111;
  --hair: rgba(78, 110, 99, .3);
  --sans: "Finlandica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --pad: clamp(20px, 6.67vw, 96px);
  --sec: clamp(72px, 10vw, 144px);
  --rail-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
[tabindex="-1"]:focus { outline: none; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--spruce);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
em, i { font-style: normal; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--spruce); outline-offset: 3px; }
.vh, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; left: 16px; top: 16px; z-index: 100; padding: 12px 18px;
  background: var(--spruce); color: var(--plaster); text-decoration: none;
}
.wrap { max-width: 1248px; margin: 0 auto; }
.nb { white-space: nowrap; }

h2 {
  font: 500 clamp(36px, 5.2vw, 76px)/1 var(--sans);
  letter-spacing: -.022em;
  text-wrap: balance;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 2px solid var(--spruce); border-radius: 999px;
  background: var(--spruce); color: var(--plaster);
  font: 500 17px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .18s, color .18s;
}
.btn:hover { background: var(--canary); color: var(--spruce); }
.btn--line { background: transparent; color: var(--spruce); }
.btn--line:hover { background: var(--spruce); color: var(--plaster); }
.btn--s { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.btn:disabled:hover { background: transparent; color: var(--spruce); }
.ln__tool {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  border: 0; background: none; cursor: pointer;
  font: 500 15px/1 var(--sans); color: var(--green);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.ln__tool:hover { color: var(--spruce); text-decoration-thickness: 2px; }
.chip {
  display: inline-block; margin-right: 6px; padding: 4px 8px 5px; border-radius: 2px;
  background: var(--canary); color: var(--spruce); font: 600 13px/1 var(--sans);
}

/* ---------- the handrail ---------- */
.rail {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: flex-end; gap: 40px;
  height: var(--rail-h); padding: 0 var(--pad);
  background: var(--plaster);
}
.rail::after {
  content: ""; position: absolute; left: 0; right: var(--pad); bottom: 19px; height: 2px;
  background: var(--rail); pointer-events: none;
}
.rail__mark, .rail__nav a {
  display: inline-flex; align-items: center; padding: 10px 0 27px;
  text-decoration: none; line-height: 1;
}
.rail__mark { gap: 10px; font: 600 23px/1 var(--sans); letter-spacing: -.01em; }
.rail__mark svg { fill: none; stroke: var(--spruce); stroke-width: 2; stroke-linecap: round; margin-top: 2px; }
.rail__nav { display: flex; gap: 32px; margin-left: 24px; }
.rail__nav a { font: 500 16px/1 var(--sans); color: var(--spruce); }
.rail__nav a:hover, .rail__nav a.is-here { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.rail__btn, .rail__menu {
  position: relative; z-index: 1; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 22px; border: 2px solid var(--rail); border-radius: 999px;
  background: var(--rail); color: var(--plaster);
  font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .18s, color .18s;
}
.rail__btn:hover, .rail__menu:hover { background: var(--canary); color: var(--spruce); }
.rail__menu { display: none; height: 44px; margin-bottom: -2px; min-width: 88px; }
.rail__hand {
  position: absolute; left: 0; bottom: 15px; z-index: 1; width: 10px; height: 10px; border-radius: 50%;
  background: var(--rail); opacity: 0; pointer-events: none;
  transition: transform .6s var(--ease), opacity .3s;
}
.rail__hand.is-set { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; top: 100%;
  padding: 4px var(--pad) 28px; background: var(--plaster); border-bottom: 2px solid var(--rail);
}
.sheet nav { display: grid; }
.sheet a {
  display: flex; align-items: center; min-height: 64px; border-bottom: 1px solid var(--hair);
  font: 500 26px/1 var(--sans); letter-spacing: -.01em; text-decoration: none;
}
.sheet a.sheet__btn {
  justify-content: center; min-height: 52px; margin-top: 24px; border: 0; border-radius: 999px;
  background: var(--spruce); color: var(--plaster); font-size: 18px; letter-spacing: 0;
}

/* ---------- 1. hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; min-height: calc(100svh - var(--rail-h)); }
.hero__top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 318px); column-gap: 56px; align-items: end;
  padding: clamp(36px, 4.6vw, 68px) var(--pad) 0;
}
h1 { font: 500 clamp(46px, 7.5vw, 118px)/.94 var(--sans); letter-spacing: -.03em; }
h1 span { display: block; }
.hero__say { padding-bottom: 6px; }
.hero__say p { margin-bottom: 26px; font-size: 19px; line-height: 1.5; text-wrap: pretty; }
.hero__pic { position: relative; width: 100%; margin-top: auto; aspect-ratio: 1440 / 500; }
.hero__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 36%; background: var(--canary); }
.pic { position: absolute; inset: 0; width: 100%; height: 100%; }
.pic--tall { display: none; }
.pic path, .pic rect {
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.pic__furn path, .pic__furn rect { stroke: var(--rail); }
.pic__furn rect { fill: var(--plaster); }
.pic__sheet rect { stroke: var(--rail); fill: var(--paper); }
.pic__sig { stroke: var(--spruce); }
.rb--c { stroke: var(--spruce); }
.rb--p { stroke: var(--green); }
.rb-dot--c { fill: var(--spruce); }
.rb-dot--p { fill: var(--green); }

/* ---------- 2. the visit ---------- */
.visit { padding: var(--sec) var(--pad); }
.visit__head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 88px; row-gap: 36px;
  align-items: end; margin-bottom: 64px;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts li { display: grid; }
.facts b {
  padding-bottom: 12px; border-bottom: 2px solid var(--rail);
  font: 500 clamp(52px, 6.6vw, 96px)/.86 var(--sans); letter-spacing: -.03em;
}
.facts span { padding-top: 12px; font-size: 16px; line-height: 1.3; color: var(--green); }
.visit__lede { grid-column: 1 / -1; max-width: 34em; font-size: 19px; }

.demo { position: relative; }
.demo:focus-visible { outline-offset: 12px; }
.transport { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.btn--play { min-width: 138px; justify-content: flex-start; padding-left: 22px; }
.btn--play svg { fill: currentColor; flex: none; }
.btn--play .ico-pause, .btn--play.is-playing .ico-play { display: none; }
.btn--play.is-playing .ico-pause { display: inline; }
.scrub { position: relative; flex: 1; min-width: 120px; height: 44px; margin: 0 12px; }
.scrub input {
  -webkit-appearance: none; appearance: none; position: relative; z-index: 1;
  display: block; width: 100%; height: 44px; margin: 0; background: none; cursor: pointer; border-radius: 22px;
}
.scrub input::-webkit-slider-runnable-track { height: 2px; background: var(--rail); }
.scrub input::-moz-range-track { height: 2px; background: var(--rail); }
.scrub input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border: 0; border-radius: 50%;
  background: var(--rail); transition: transform .15s;
}
.scrub input::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--rail); }
.scrub input:hover::-webkit-slider-thumb, .scrub input:active::-webkit-slider-thumb { transform: scale(1.18); }
.scrub input:disabled { cursor: default; opacity: .4; }
.scrub__ticks {
  position: absolute; left: 10px; right: 10px; top: calc(50% + 1px); height: 7px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.scrub__ticks i { width: 2px; height: 7px; background: var(--rail); }
.readout { min-width: 142px; font-size: 15px; line-height: 1; color: var(--green); white-space: nowrap; }
.readout b { display: inline-block; min-width: 46px; margin-right: 6px; font: 600 18px/1 var(--sans); color: var(--spruce); }

.stage { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) 88px minmax(0, 6fr); }

/* the conversation */
.talk { grid-column: 1; display: flex; flex-direction: column; padding: 16px 0 14px; background: var(--sky); }
.talk__lanes { display: flex; justify-content: space-between; gap: 16px; padding: 0 26px 8px; font-size: 14px; line-height: 1.35; }
.lane b { display: block; font: 600 15px/1.3 var(--sans); }
.lane--p { text-align: right; color: var(--green); }
.talk__idle, .talk__all { display: none; }
.utt { position: relative; padding: 4px 26px; transition: background-color .2s; }
.utt__who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.utt--c .utt__who::before { content: "Clinician: "; }
.utt--p .utt__who::before { content: "Patient: "; }
.utt p { max-width: 86%; font-size: 17px; line-height: 1.4; }
.utt--p p { margin-left: 14%; color: var(--green); }
.utt.is-lit { background: var(--paper); }
.utt.is-source::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--rail); }
.utt.is-future p { visibility: hidden; }
.utt.is-future::before {
  content: ""; position: absolute; left: 26px; top: 50%; width: 72px; height: 10px; margin-top: -5px; opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'%3E%3Cpath d='M1 5C7 -1 11 -1 17 5S27 11 33 5S43 -1 49 5S59 11 65 5H71' fill='none' stroke='%2317332C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat;
}
.utt--p.is-future::before {
  left: calc(26px + (100% - 52px) * .14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 10'%3E%3Cpath d='M1 5C7 -1 11 -1 17 5S27 11 33 5S43 -1 49 5S59 11 65 5H71' fill='none' stroke='%234E6E63' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}
.utt .w, .ln .w { display: inline-block; }
.utt.is-speaking .w { opacity: 0; animation: word .24s var(--ease) forwards; animation-delay: calc(var(--i) * var(--step)); }
.hit { text-decoration: underline; text-decoration-color: var(--rail); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.heard { padding: 1px 4px 2px; margin: 0 -2px; border-radius: 2px; background: var(--canary); color: var(--spruce); }
@keyframes word { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* the line that leads back to the words */
.wires { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wires path { fill: none; stroke: var(--rail); stroke-width: 1.5; }
.wires circle { fill: var(--rail); }

/* the note */
.note {
  grid-column: 3; display: flex; flex-direction: column;
  background: var(--paper); border: 2px solid var(--pencil); transition: border-color .6s;
}
.note.is-signed { border-color: var(--spruce); }
.note__bar {
  padding: 9px 28px 9px; border-bottom: 1px dashed var(--pencil);
  font: 500 16px/1.3 var(--sans); color: var(--pencil);
}
.note.is-signed .note__bar { border-bottom: 1px solid var(--spruce); color: var(--spruce); }
.note__id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 28px 8px; }
.note__id h3 { font: 600 16px/1.3 var(--sans); }
.note__meta { font-size: 14px; line-height: 1.3; color: var(--green); }
.note__body { flex: 1; }
.grp { position: relative; padding: 2px 0; border-top: 1px solid var(--hair); }
.grp h4 {
  position: absolute; left: 28px; top: 9px; z-index: 1; width: 122px; pointer-events: none;
  font: 600 14px/1.3 var(--sans); color: var(--green);
}
.grp h4 span { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; line-height: 1.25; }
.grp__hint { display: none; position: absolute; left: 160px; right: 28px; top: 8px; font-size: 15px; line-height: 1.4; color: var(--green); }
.grp--own.is-empty .grp__hint { display: block; }
.ln { position: relative; padding: 0 28px 0 160px; transition: background-color .15s; }
.ln__text {
  display: block; width: 100%; min-height: 38px; padding: 5px 0 6px; border: 0; border-radius: 0; background: none;
  text-align: left; font: 400 18px/1.4 var(--sans); color: var(--pencil); cursor: pointer;
}
.ln__text:focus-visible { outline-offset: 0; }
.ln.is-blank .ln__text { visibility: hidden; }
.ln.is-blank::after {
  content: ""; position: absolute; left: 160px; right: 28px; top: 5px; bottom: 6px; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 24.2px, rgba(111, 106, 140, .42) 24.2px, rgba(111, 106, 140, .42) 25.2px);
}
.grp--own.is-empty .ln.is-blank::after { display: none; }
.ln.is-active { background: var(--sky-soft); }
.ln.is-active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--rail); }
.ln.is-writing .w { opacity: 0; animation: word .2s var(--ease) forwards; animation-delay: calc(var(--i) * var(--step)); }
.flag { padding: 1px 5px 2px; margin: 0 -1px; border-radius: 2px; background: var(--canary); color: var(--spruce); }
.ln.is-checked .flag, .ln.is-ink .flag { padding: 0; margin: 0; background: none; color: inherit; }
/* the margin, where the clinician's own marks go: a Confirm button while a flag is open, then what was done */
.ln__tag { position: absolute; left: 28px; top: 11px; width: 126px; font: 500 13px/1.25 var(--sans); color: var(--green); }
.ln__tag::before { content: ""; display: inline-block; width: 10px; height: 1.5px; margin-right: 6px; vertical-align: middle; background: var(--green); }
.ln__check { position: absolute; left: 28px; top: 2px; }
.ln.is-flagged .ln__tag { display: none; }
.grp li:first-child .ln__tag { top: 29px; }
.grp li:first-child .ln__check { top: 30px; }
.grp li:first-child.is-marked .ln__text { min-height: 52px; }
.grp li:first-child.is-flagged .ln__text { min-height: 68px; }
.grp--own:not(.is-empty) h4 span { display: none; }
.btn--check { min-height: 34px; padding: 0 16px; background: var(--canary); color: var(--spruce); font-size: 15px; }
.btn--check:hover { background: var(--spruce); color: var(--plaster); }
.btn--check.is-nudged { animation: nudge 1s var(--ease); }
.ln.is-blank .ln__check, .ln.is-removed .ln__check, .ln.is-editing .ln__check { display: none; }
.ln__src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ln__src::before { content: "From what was said"; }
.src--c::before { content: "Clinician "; }
.src--p::before { content: "Patient "; }
.ln__tools { display: flex; gap: 20px; padding: 0 0 8px; }
.ln__tools .ln__tool { min-height: 28px; font-size: 14px; }
@media (pointer: coarse) {
  .ln__tools .ln__tool, .btn--check, .ln__text { min-height: 44px; }
  .ln__check { top: 0; }
  .grp li:first-child .ln__check { top: 32px; }
  .grp li:first-child.is-flagged .ln__text { min-height: 84px; }
}
.ln__gone { display: none; min-height: 48px; align-items: center; gap: 10px; font-size: 15px; color: var(--green); }
.ln.is-removed .ln__gone { display: flex; }
.ln.is-removed .ln__text { display: none; }
.note.is-signed .ln.is-removed { display: none; }
.ln.is-editing .ln__text { display: none; }
.ln__edit { display: grid; gap: 8px; padding: 9px 0 10px; }
.ln__edit textarea {
  display: block; width: 100%; padding: 10px 14px; border: 2px solid var(--spruce); border-radius: 0; background: var(--paper);
  font: 400 18px/1.4 var(--sans); color: var(--spruce); resize: none;
}
.ln__edit-do { display: flex; align-items: center; gap: 16px; }
/* signed: pencil becomes ink */
.ln.is-ink .ln__text { font: 400 16.5px/1.52 var(--serif); color: var(--spruce); cursor: pointer; }
.ln.is-inking .ln__words { animation: ink .55s var(--ease) both; }
@keyframes ink { from { opacity: .1; } to { opacity: 1; } }

.note__foot { padding: 10px 28px 14px; border-top: 1px dashed var(--pencil); }
.note.is-signed .note__foot { border-top: 1px solid var(--spruce); }
@keyframes nudge { 0%, 100% { transform: none; } 18% { transform: scale(1.12); } 40% { transform: scale(1); } 58% { transform: scale(1.07); } }
.signing { display: flex; align-items: flex-end; gap: 18px; }
.sig { position: relative; flex: 1; min-width: 0; padding-top: 42px; }
.sig__rule { display: block; height: 2px; background: var(--spruce); }
.sig__ink { position: absolute; left: 0; top: -3px; width: min(100%, 180px); height: 46px; overflow: visible; }
.sig__ink path, .sign__stroke path {
  fill: none; stroke: var(--spruce); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.note.is-signing .sig__ink path, .note.is-signed .sig__ink path { stroke-dashoffset: 0; }
.note.is-signing .sig__ink path { transition: stroke-dashoffset 1.15s cubic-bezier(.5, .1, .3, 1); }
.sig__label { display: block; padding-top: 8px; font-size: 13px; line-height: 1.1; color: var(--green); }
.stamp {
  display: none; flex: none; margin-bottom: 8px; padding: 5px 10px 6px;
  border: 2px solid var(--spruce); transform: rotate(-3deg);
  text-align: center; color: var(--spruce); font: 500 12px/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase;
}
.stamp span { display: block; }
.stamp b { display: block; margin: 1px 0; font: 600 17px/1.2 var(--sans); letter-spacing: 0; text-transform: none; }
.stamp b span { display: inline; }
.note.is-signed .stamp { display: block; animation: stamp .3s var(--ease) both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-3deg) scale(1.3); } to { opacity: 1; transform: rotate(-3deg) scale(1); } }
.signing .btn { flex: none; margin-bottom: 14px; min-width: 150px; }
.say { min-height: 22px; margin-bottom: 4px; font-size: 15px; line-height: 1.45; color: var(--green); }
.say.is-refusal { padding-left: 12px; border-left: 2px solid var(--rail); color: var(--spruce); }
.say .say__do { min-height: 24px; font-size: 15px; color: var(--spruce); }

.demo__after { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 88px; margin-top: 16px; font-size: 14px; line-height: 1.5; }
.demo__small { color: var(--green); }
.key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 26px; color: var(--green); }
.key li { display: flex; align-items: center; gap: 8px; }
.key__pencil { font: 500 16px/1 var(--sans); color: var(--pencil); }
.key__ink { font: 500 15px/1 var(--serif); color: var(--spruce); }
.key__check { padding: 2px 6px 3px; border-radius: 2px; background: var(--canary); color: var(--spruce); font-weight: 500; line-height: 1.2; }
.key__wire { display: inline-flex; align-items: center; gap: 8px; color: var(--spruce); font-weight: 500; }
.key__wire svg { fill: none; }
.key__wire path { stroke: var(--rail); stroke-width: 1.5; }
.key__wire circle { fill: var(--rail); }

/* ---------- 3. you sign ---------- */
.sign { padding: calc(var(--sec) + 8px) var(--pad); }
.sign__words { display: grid; }
.sign__words > * { grid-area: 1 / 1; }
.sign__ink {
  font: 400 clamp(38px, 7vw, 106px)/1.03 var(--serif); letter-spacing: -.025em; color: var(--spruce);
  clip-path: inset(-5% 0 -12% 0); transition: clip-path .95s cubic-bezier(.6, 0, .3, 1) 1s;
}
.sign__pencil {
  font: 500 clamp(42px, 7.6vw, 116px)/.95 var(--sans); letter-spacing: -.03em; color: var(--pencil);
  clip-path: inset(105% 0 0 0); transition: clip-path .95s cubic-bezier(.6, 0, .3, 1) 1s; text-wrap: balance;
}
html.js:not(.capture) .sign:not(.is-signed) .sign__ink { clip-path: inset(-5% 0 105% 0); }
html.js:not(.capture) .sign:not(.is-signed) .sign__pencil { clip-path: inset(-5% 0 -12% 0); }
.sign__row { display: flex; align-items: center; gap: 56px; margin-top: 20px; }
.sign__stroke { flex: none; width: min(520px, 58%); height: auto; overflow: visible; }
.sign__stroke path { stroke-width: 2; stroke-dashoffset: 0; transition: stroke-dashoffset 1.25s cubic-bezier(.5, .1, .3, 1) .15s; }
html.js:not(.capture) .sign:not(.is-signed) .sign__stroke path { stroke-dashoffset: 1; }
.stamp--big { display: block; margin: 0; padding: 12px 20px 14px; font-size: 13px; line-height: 1.3; transition: opacity .25s 2s, transform .32s var(--ease) 2s; }
.stamp--big b { font-size: 30px; }
html.js:not(.capture) .sign:not(.is-signed) .stamp--big { opacity: 0; transform: rotate(-3deg) scale(1.25); }
.sign__line { max-width: 30em; margin-top: 44px; font-size: 19px; }

/* ---------- 4. what it leaves alone ---------- */
.leaves { padding: 96px 24px; padding: var(--sec) var(--pad); background: var(--canary); }
.leaves h2 { margin-bottom: clamp(40px, 5.4vw, 80px); }
.nevers li {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px 64px; align-items: baseline;
  padding: 28px 0 32px; border-top: 2px solid var(--spruce);
}
.nevers li:last-child { border-bottom: 2px solid var(--spruce); }
.nevers h3 { font: 500 clamp(26px, 3.3vw, 46px)/1.08 var(--sans); letter-spacing: -.018em; }
.nevers p { font-size: 18px; line-height: 1.5; }

/* ---------- 5. your format ---------- */
.format { padding: var(--sec) var(--pad); }
.format__head {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 20px 64px; align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.format__head p { font-size: 19px; }
.sheets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.mini {
  display: grid; align-content: start; gap: 10px; min-height: 264px; padding: 24px 24px 28px;
  background: var(--paper); border: 2px solid var(--spruce);
  font: 400 14px/1.55 var(--serif); color: var(--spruce);
}
.mini b { margin-right: 6px; font: 600 14px/1 var(--sans); color: var(--green); }
.mini--list .mini__sub { padding-left: 18px; }
.mini__rule { display: inline-block; width: 62%; height: 1px; vertical-align: middle; background: var(--hair); }
.sheets h3 { margin-top: 20px; font: 600 22px/1.2 var(--sans); letter-spacing: -.01em; }
.sheets li > p { margin-top: 4px; font-size: 16px; color: var(--green); }

/* ---------- 6. close ---------- */
.close { position: relative; padding: var(--sec) var(--pad) 0; }
.close__grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 88px;
  padding-bottom: clamp(96px, 11vw, 150px);
}
.close__words h2 { margin-bottom: 22px; }
.close__words p { max-width: 22em; font-size: 19px; }
.close__pic { position: absolute; left: 0; bottom: -58px; z-index: 2; width: 300px; height: 150px; overflow: visible; }
.close__pic path, .close__pic rect { fill: none; stroke: var(--rail); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.close__pic rect { fill: var(--plaster); }
.field { margin-bottom: 26px; }
.field label { display: block; font: 500 15px/1.3 var(--sans); color: var(--green); }
.field label span { font-weight: 400; }
.field input {
  display: block; width: 100%; height: 52px; padding: 0; border: 0; border-bottom: 2px solid var(--spruce); border-radius: 0;
  background: transparent; font: 400 22px/1 var(--sans); color: var(--pencil);
}
.field input:focus-visible { outline-offset: 2px; }
.field__e { margin-top: 10px; font-size: 15px; line-height: 1.4; }
.book__end { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 38px; }
.book__end p { max-width: 20em; font-size: 14px; line-height: 1.45; color: var(--green); }
.book__done:focus { outline: none; }
.book__thanks { margin-bottom: 14px; font: 400 clamp(30px, 3.6vw, 50px)/1.1 var(--serif); letter-spacing: -.02em; }
.book__done p:not(.book__thanks) { max-width: 26em; margin-bottom: 28px; }

/* ---------- the floor ---------- */
.floor { position: relative; padding: 112px var(--pad) 64px; background: var(--canary); color: var(--spruce); }
.floor__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 88px; row-gap: 36px; }
.floor__mark { margin-bottom: 14px; font: 600 28px/1 var(--sans); letter-spacing: -.015em; }
.floor__full { max-width: 25em; font-size: 19px; line-height: 1.5; }
.floor__notes p { max-width: 36em; margin-bottom: 12px; font-size: 15px; line-height: 1.5; }
.floor nav { display: flex; flex-wrap: wrap; gap: 0 30px; margin-top: 26px; padding-top: 14px; border-top: 2px solid var(--spruce); }
.floor nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-underline-offset: 5px; }

/* ---------- reveals ---------- */
html.js:not(.capture) .rv { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js:not(.capture) .rv.in { opacity: 1; transform: none; }

/* ---------- capture: a still, finished page ---------- */
.capture .rail, .capture .transport, .capture .talk { position: static; }
.capture .rail__hand { display: none; }
.capture *, .capture *::before, .capture *::after { animation: none !important; transition: none !important; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1180px) {
  .visit__head, .floor__grid, .close__grid { column-gap: 56px; }
  .stage { grid-template-columns: minmax(0, 5fr) 64px minmax(0, 6fr); }
  .demo__after { column-gap: 64px; }
  .ln { padding-left: 138px; }
  .grp h4, .ln__tag { width: 104px; }
  .grp__hint, .ln.is-blank::after { left: 138px; }
}

@media (max-width: 959px) {
  .visit__head { grid-template-columns: 1fr; margin-bottom: 40px; }
  html { scroll-padding-top: 0; }
  .rail { position: relative; }
  .transport {
    position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: auto auto 1fr; gap: 6px 10px;
    margin: 0; padding: 10px 0 2px; background: var(--plaster);
  }
  .transport .scrub { grid-column: 1 / 4; grid-row: 2; margin: 0 62px 0 0; }
  .readout { grid-column: 1 / 4; grid-row: 2; justify-self: end; min-width: 0; }
  .readout b { min-width: 0; margin: 0; }
  .readout span { display: none; }
  .again { grid-column: 3; grid-row: 1; justify-self: end; white-space: nowrap; }
  .btn--play { min-width: 116px; padding-left: 20px; padding-right: 18px; }
  .transport .btn--line { padding: 0 18px; }
  .stage { display: block; }
  .wires { display: none; }
  .talk { position: sticky; top: 110px; z-index: 5; padding: 0 0 10px; }
  .talk__lanes { display: none; }
  .talk__list { order: 2; }
  .talk__all { display: inline-flex; position: absolute; right: 18px; top: 0; z-index: 1; min-height: 44px; font-size: 14px; color: var(--spruce); }
  .ln__tool { min-width: 44px; }
  .utt { padding: 2px 20px 6px; }
  .utt p, .utt--p p { max-width: none; margin-left: 0; font-size: 16px; }
  .utt__who { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: block; font: 600 14px/44px var(--sans); }
  .utt.is-lit, .talk:not(.is-open) .utt { background: none; }
  .utt.is-source::after { display: none; }
  .talk:not(.is-open) .utt:not(.is-current) { display: none; }
  .talk:not(.is-open) .utt { min-height: 140px; }
  .talk.is-idle:not(.is-open) .talk__idle { display: block; min-height: 140px; padding: 44px 20px 0; font-size: 16px; }
  .talk.is-open { position: static; }
  .talk.is-open .utt { padding: 0 20px 8px; }
  .talk.is-open .utt__who { line-height: 30px; }
  .talk.is-open .talk__list { padding-top: 40px; }
  .talk.is-open .utt.is-lit { background: var(--paper); }
  .utt.is-future::before, .utt--p.is-future::before { left: 20px; top: auto; bottom: 14px; }
  .utt.is-future .utt__who { opacity: .6; }
  .note { margin-top: 16px; }
  .note__bar, .note__id { padding-left: 20px; padding-right: 20px; }
  .grp { padding: 10px 0 4px; }
  .grp h4 { position: static; width: auto; padding: 0 20px; }
  .grp h4 span { display: inline; margin-left: 6px; }
  .grp__hint { position: static; padding: 4px 20px 8px; }
  .ln.is-blank { display: none; }
  .ln.is-flagged .ln__tag { display: inline-block; }
  .demo.is-signing .talk, .demo.is-signed .talk { position: static; }
  .ln { padding: 0 20px; }
  .ln__text { min-height: 44px; padding: 8px 0; font-size: 18px; }
  .ln.is-blank::after { left: 20px; right: 20px; top: 8px; bottom: 8px;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 24.2px, rgba(111, 106, 140, .42) 24.2px, rgba(111, 106, 140, .42) 25.2px); }
  .ln.is-ink .ln__text { font-size: 16px; }
  .ln.is-pinned .ln__src {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none;
    display: grid; gap: 6px; padding: 2px 0 10px; font-size: 15px; line-height: 1.45; color: var(--spruce);
  }
  .ln__src::before { font: 600 13px/1.4 var(--sans); }
  .src { padding-left: 12px; border-left: 2px solid var(--rail); }
  .src::before { font-weight: 600; }
  .ln__tools { gap: 24px; padding-bottom: 4px; }
  .ln__tools .ln__tool { min-height: 44px; font-size: 15px; }
  .ln__edit textarea { font-size: 18px; }
  .note__foot { padding: 0 20px 20px; }
  .signing { flex-wrap: wrap; }
  .sig { flex: 1 1 100%; }
  .signing .btn { margin-left: auto; }
  .key { justify-content: flex-start; }
  .demo__after { display: block; }
  .demo__small { margin-bottom: 14px; }
  .ln__tag, .grp li:first-child .ln__tag { position: static; display: inline-block; width: auto; margin-left: 10px; white-space: nowrap; }
  .ln__check, .grp li:first-child .ln__check { position: static; display: block; padding: 0 0 10px; }
  .grp li:first-child.is-marked .ln__text, .grp li:first-child.is-flagged .ln__text { min-height: 44px; }
  .grp--own:not(.is-empty) h4 span { display: inline; }
  .btn--check { min-height: 44px; }
  .format__head, .floor__grid, .close__grid { grid-template-columns: 1fr; }
  .sheets { grid-template-columns: 1fr; gap: 36px; max-width: 520px; }
  .mini { min-height: 0; }
  .close__words { margin-bottom: 40px; }
  .close__grid { padding-bottom: 168px; }
  .nevers li { grid-template-columns: 1fr; }
}

@media (max-width: 759px) {
  :root { --rail-h: 64px; }
  .rail { gap: 16px; }
  .rail::after { bottom: 17px; }
  .rail__mark { padding-bottom: 25px; font-size: 21px; }
  .rail__nav, .rail__btn { display: none; }
  .rail__menu { display: inline-flex; margin-bottom: -4px; }
  .rail__hand { bottom: 13px; }
  .hero__top { grid-template-columns: 1fr; row-gap: 18px; padding-top: 28px; }
  .hero__say p { max-width: 20em; margin-bottom: 22px; }
  .hero__pic { aspect-ratio: 390 / 430; }
  .hero__floor { height: 25.6%; }
  .pic--wide { display: none; }
  .pic--tall { display: block; }
  .facts b { font-size: 60px; }
  .facts span { font-size: 15px; padding-right: 8px; }
  .sign__row { flex-direction: column; align-items: flex-start; gap: 28px; }
  .sign__stroke { width: 100%; max-width: 420px; }
  .sign__stroke path { stroke-width: 2.8; }
  .stamp--big b { font-size: 24px; }
  .floor { padding-top: 96px; }
  .close__pic { width: 240px; height: 120px; bottom: -46px; }
}
@media (min-width: 760px) {
  .sheet { display: none !important; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  html.js:not(.capture) .rv { transform: none; transition: opacity .2s linear !important; }
  .ln.is-inking .ln__words, .note.is-signed .stamp { animation: ink .2s linear both !important; animation-duration: .2s !important; }
}
