/* memoir.hopperlabs.ai: the page's own rules, after the hopperlabs brand stylesheet. Every colour, face, corner and
   timing is one of that brand's tokens; nothing here states a colour but the black of a shadow. Page and desk are the
   brand's surface and well, ink is its ink, pencil its muted, the ribbon its sage. Forest, the brand's action, is
   spent on the one button and on the drawn offer the person would press in the app; the rest of the page is quiet. */
*,*::before,*::after{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);font:400 17px/1.6 var(--sans);-webkit-text-size-adjust:100%}
a{color:var(--link);text-decoration-thickness:1px;text-underline-offset:3px}
a:focus-visible{outline:2px solid var(--focus);outline-offset:3px;border-radius:var(--radius-dense)}
.wrap{width:min(100% - 32px,1120px);margin-inline:auto}
.hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
h2,h3{font-weight:400}

.bar{border-bottom:1px solid var(--rule)}
.bar-row{display:flex;align-items:center;min-height:60px}
.home{display:inline-flex;align-items:center;gap:10px;min-height:44px;text-decoration:none}
.home img{display:block;width:28px;height:28px}

/* The title page: the headline hangs from the left edge on its own; the imprint stands beside it, its foot on the
   headline's last line. */
.title{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,4fr);align-items:end;gap:32px clamp(40px,6vw,96px);padding-block:clamp(48px,8vw,120px) clamp(40px,5vw,72px)}
.title h1{margin:0;max-width:11em;font:400 clamp(40px,6.4vw,84px)/1.02 var(--serif);letter-spacing:-.02em;text-wrap:balance}
.imprint{padding-bottom:6px}
.lede{margin:0;font-size:18px;line-height:1.55;color:var(--muted);text-wrap:pretty}
.start{margin:28px 0 0}
.button{display:inline-flex;align-items:center;min-height:48px;padding:0 24px;border-radius:var(--radius-control);background:var(--action);color:var(--action-ink);font-weight:600;text-decoration:none;transition:background-color var(--state) var(--ease)}
.button:hover{background:var(--action-hover)}
.sign-in{margin:12px 0 0;font-size:var(--type-dense);color:var(--muted)}

/* The desk: a band the width of the window, and the open spread lying on it. */
.desk{margin:0;padding:clamp(32px,5vw,72px) 16px clamp(56px,7vw,96px);background:var(--well);border-block:1px solid var(--well-strong)}
.spread{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);width:min(100%,1200px);margin-inline:auto;filter:drop-shadow(0 22px 28px rgba(0,0,0,.14)) drop-shadow(0 1px 1px rgba(0,0,0,.08))}
.leaf{position:relative;background:var(--surface);padding:clamp(28px,3.4vw,48px)}
.source{border-radius:var(--radius-dense) 0 0 var(--radius-dense);background:linear-gradient(to left,color-mix(in srgb,var(--well-strong) 70%,var(--surface)),var(--surface) 44px);font-size:15px;line-height:1.55}
.draft{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,200px);gap:0 clamp(24px,2.6vw,40px);border-radius:0 var(--radius-dense) var(--radius-dense) 0;background:linear-gradient(to right,color-mix(in srgb,var(--well-strong) 70%,var(--surface)),var(--surface) 44px)}
.ribbon{position:absolute;left:-7px;top:-12px;bottom:-44px;width:14px;background:var(--sage);clip-path:polygon(0 0,100% 0,100% 100%,50% calc(100% - 8px),0 100%)}
.leaf-label{margin:0 0 6px;font-size:var(--type-dense);color:var(--muted)}

/* The Life Book page, in the app's own voice. */
.source-chapter{margin:0;font-weight:600;font-size:18px;line-height:1.3}
.story{margin:14px 0 0;color:var(--ink)}
.part-head{margin:22px 0 6px;padding-bottom:4px;border-bottom:1px solid var(--rule);font-size:var(--type-dense);font-weight:600;color:var(--muted)}
.journal,.people,.photos{margin:0;padding:0;list-style:none}
.journal li{display:grid;grid-template-columns:5.5em minmax(0,1fr);gap:12px;padding-block:3px}
.when{color:var(--muted);font-variant-numeric:var(--figures)}
.people{display:flex;flex-wrap:wrap;gap:4px 18px}
.photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:10px}
.photo svg{display:block;width:100%;height:auto;aspect-ratio:8/5;background:var(--ground);border:1px solid var(--rule);border-radius:var(--radius-dense)}
.photo span{display:block;margin-top:4px;font-size:var(--type-compact);color:var(--muted)}
.pencil{fill:none;stroke:var(--sage);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* The memoir page, in the book's voice. */
.chapter-number{margin:18px 0 0;font-size:var(--type-dense);color:var(--muted)}
.chapter-title{margin:2px 0 0;font:400 clamp(30px,3vw,40px)/1.1 var(--serif)}
.prose{margin:22px 0 0;font:400 19px/1.75 var(--serif);hyphens:auto;text-wrap:pretty}
.prose mark{background:var(--selection-fill);color:inherit;box-shadow:0 0 0 2px var(--selection-fill);border-radius:2px}
.margin-note{align-self:start;margin-top:clamp(96px,9vw,132px);padding-left:14px;border-left:2px solid var(--selection-edge);font-size:var(--type-dense);line-height:var(--leading-dense)}
.margin-note p{margin:0}
.note-who{font-weight:600}
.note-asked{margin-top:2px!important;color:var(--muted)}
.note-offer{margin-top:10px!important;font:400 15px/1.55 var(--serif)}
.use{display:inline-flex;align-items:center;min-height:30px;margin-top:12px;padding:0 12px;border:1px solid var(--action);border-radius:var(--radius-control);color:var(--action);font-weight:600}

/* What it keeps and what it reads: two facing columns, as the spread above faces. */
.keeps,.help,.readers{padding-top:clamp(56px,7vw,96px)}
.keeps h2,.help h2,.readers h2{margin:0;font:400 clamp(28px,3.2vw,38px)/1.15 var(--serif);letter-spacing:-.01em}
.facing{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);margin-top:28px;border-top:1px solid var(--rule)}
.facing h3{margin:0;font:600 17px/1.4 var(--sans)}
.kept,.read{padding-top:20px}
.kept{padding-right:clamp(24px,4vw,56px)}
.read{padding-left:clamp(24px,4vw,56px);border-left:1px solid var(--rule)}
.facing p{margin:8px 0 0;max-width:24em}
.read ul{margin:8px 0 0;padding:0;list-style:none}
.read li+li{margin-top:12px}

/* Help with a passage: one paragraph, in the book's face. */
.help p{margin:18px 0 0;max-width:31em;font:400 clamp(19px,1.9vw,23px)/1.55 var(--serif);text-wrap:pretty}

/* Who reads it: the four audiences on one line, from one reader to anyone. */
.readers-lead{margin:14px 0 0;max-width:40em}
.scale{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:36px 0 0;padding:0;list-style:none}
.scale li{position:relative;padding:22px 16px 0 0}
.scale li::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--sage)}
.scale li:last-child::before{right:auto;width:0}
.scale li::after{content:"";position:absolute;top:-5px;left:0;width:12px;height:12px;border-radius:50%;background:var(--surface);border:2px solid var(--sage)}
.stop-name{display:block;font:400 21px/1.25 var(--serif)}
.stop-note{display:block;margin-top:4px;max-width:14em;font-size:var(--type-dense);line-height:var(--leading-dense);color:var(--muted)}

.missing{padding-block:clamp(48px,8vw,112px)}
.missing h1{margin:0;font:400 clamp(28px,4vw,40px)/1.15 var(--serif)}
.missing p{margin:16px 0 0}

.foot{margin-top:clamp(64px,8vw,112px);border-top:1px solid var(--rule)}
.foot-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 24px;padding-block:28px 40px;color:var(--muted)}
.foot-row p{margin:0}

@media (max-width:900px){
  .title{grid-template-columns:minmax(0,1fr);align-items:start}
  .spread{grid-template-columns:minmax(0,1fr);max-width:640px}
  .source{border-radius:var(--radius-dense) var(--radius-dense) 0 0;background:linear-gradient(to top,color-mix(in srgb,var(--well-strong) 70%,var(--surface)),var(--surface) 32px)}
  .draft{grid-template-columns:minmax(0,1fr);border-radius:0 0 var(--radius-dense) var(--radius-dense);background:linear-gradient(to bottom,color-mix(in srgb,var(--well-strong) 70%,var(--surface)),var(--surface) 32px)}
  .ribbon{left:auto;right:28px;top:-10px;bottom:auto;height:72px}
  .margin-note{margin-top:24px}
}
@media (max-width:640px){
  .facing{grid-template-columns:minmax(0,1fr)}
  .kept{padding-right:0;padding-bottom:20px}
  .read{padding-left:0;border-left:0;border-top:1px solid var(--rule)}
  .scale{grid-template-columns:minmax(0,1fr);margin-top:24px;padding-left:6px}
  .scale li{padding:0 0 22px 28px}
  .scale li::before{top:6px;bottom:0;left:5px;right:auto;width:2px;height:auto}
  .scale li:last-child::before{display:none}
  .scale li::after{top:0;left:0}
}
