/*
 * Evelyn in Shorthand.
 *
 * A secretary tells you what matters, so every screen opens with her sentence
 * in blue ink (Literata). Facts, the interface and Daniel's own words are
 * graphite (Schibsted Grotesk). Red pencil marks only what needs him: the two
 * ends of the office's red-blue pencil. No cards: whitespace, alignment and a
 * few hairlines do the structure. Where a fact came from sits beside it — a
 * margin note on a desktop, folded under the item on the phone.
 *
 * One motion: her mark, "Evelyn" in Gregg shorthand, writing itself while she
 * works.
 */

:root {
  --paper: #fafaf7;
  --paper-2: #f1f1ec;
  --graphite: #2e3136;
  --graphite-2: #676c74;
  --hairline: #e1e2dd;
  --blue: #1d4fb8;
  --red: #c0392b;
  --serif-w: 400;
  --serif: 'Literata', 'Iowan Old Style', Georgia, serif;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --gap: 56px;
  --note: 240px;
  --pad: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15171b;
    --paper-2: #1d2025;
    --graphite: #e6e7e2;
    --graphite-2: #a0a5ad;
    --hairline: #2a2e34;
    --blue: #8eaef5;
    --red: #f08a7c;
    --serif-w: 370; /* light ink on dark paper reads heavier */
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper);
  color: var(--graphite);
  font: 400 17px/25px var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
p, h1, h2, h3, ul, ol, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: inherit; margin: 0; }
a { color: inherit; }
svg { display: block; }
::selection { background: color-mix(in srgb, var(--blue) 22%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- shell */

.app {
  position: relative;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template: "top" calc(56px + env(safe-area-inset-top, 0px)) "main" minmax(0, 1fr) "nav" auto / minmax(0, 1fr);
}
.top {
  grid-area: top;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  background: var(--paper);
}
.top .mark { width: 64px; color: var(--blue); flex: none; }
.top-title { font: 600 17px/22px var(--sans); padding-top: 3px; }
.top-act { margin-left: auto; min-height: 48px; padding: 0 2px; font: 500 15px/20px var(--sans); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.scroller {
  grid-area: main;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--graphite-2) 40%, transparent) transparent;
}
.page { min-height: 100%; display: flex; flex-direction: column; padding: 12px var(--pad) 56px; }
.page.chat { padding-bottom: 0; }
.page.loading { justify-content: flex-start; padding-top: 40px; }

/* the mark */
.mark { overflow: visible; }
.mark path { fill: none; stroke: currentColor; stroke-width: 2.95; stroke-linecap: round; stroke-linejoin: round; }
.login-mark { width: 132px; color: var(--blue); margin: 24px 0 28px; }

/* ------------------------------------------------------------------ nav */

.nav {
  grid-area: nav;
  z-index: 2;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav .brand { display: none; }
.nav ul { display: flex; height: 64px; padding: 0 4px; }
.nav li { flex: 1 1 0; display: flex; min-width: 0; }
.nav a {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 500 16px/20px var(--sans);
  color: var(--graphite-2);
  text-decoration: none;
  border-radius: 8px;
}
.nav a[aria-current='page'] { color: var(--graphite); font-weight: 600; }
.lbl { position: relative; display: inline-block; }
/* her blue underline: a short hand-drawn stroke with a gentle wave */
.nav a[aria-current='page'] .lbl::after,
.opt input:checked + .ot::after {
  content: '';
  position: absolute;
  left: -3px;
  right: -3px;
  top: calc(100% + 3px);
  height: 6px;
  background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'%3E%3Cpath d='M1.5 3.9C10 2.2 19 2.3 28 3.4S46 4.8 58.5 2.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 6' preserveAspectRatio='none'%3E%3Cpath d='M1.5 3.9C10 2.2 19 2.3 28 3.4S46 4.8 58.5 2.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.dot { position: absolute; left: calc(100% + 4px); top: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
body[data-view='login'] .nav { display: none; }
body[data-view='login'] .top .mark { visibility: hidden; }

/* ----------------------------------------------------------------- rows */
/* Every item is a row: a lead column (time or tick), the text, and its note.
   Phone: the note folds under the text. Desktop: it sits in the margin. */

.row { position: relative; display: grid; grid-template-columns: [lead] 56px [text] minmax(0, 1fr); align-items: baseline; }
.row > .lead { grid-column: lead; }
.row > .text { grid-column: text; min-width: 0; }
.row.wide > .text { grid-column: lead / -1; }
.row > .note { grid-column: text; grid-row: 2; margin-top: 3px; }
.row.wide > .note { grid-column: lead / -1; }
.note { font: 400 13px/19px var(--sans); color: var(--graphite-2); overflow-wrap: anywhere; }
.note.red { color: var(--red); }
.note a { color: inherit; text-underline-offset: 3px; }

/* her sentence */
.lead-s {
  margin-top: 8px;
  font-family: var(--serif);
  font-weight: var(--serif-w);
  font-size: 31px;
  line-height: 39px;
  font-optical-sizing: auto;
  letter-spacing: -0.004em;
  color: var(--blue);
  text-wrap: balance;
}
.dateline { margin-top: 14px; font: 400 15px/22px var(--sans); color: var(--graphite-2); }

/* sections */
.sec { margin-top: 40px; }
.sh { font: 600 15px/22px var(--sans); margin-bottom: 14px; }
.items > li + li { margin-top: 18px; }
.time { font: 500 15px/25px var(--sans); color: var(--graphite-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.colon { font-variant-numeric: normal; }
.title { font: 500 17px/25px var(--sans); color: var(--graphite); overflow-wrap: anywhere; }
.detail { margin-top: 1px; font: 400 15px/22px var(--sans); color: var(--graphite-2); overflow-wrap: anywhere; }
.detail.red { color: var(--red); }
.past .title, .past .time, .busy .title { color: var(--graphite-2); }
.fact { font: 400 17px/25px var(--sans); }
.quiet { color: var(--graphite-2); }
.gap { margin-top: 12px; font: 400 13px/19px var(--sans); color: var(--graphite-2); }

/* now */
.items > .nowrow, .items > .nowrow + li { margin-top: 12px; }
.nowrow { align-items: center; }
.nowrow .time { color: var(--blue); }
.nowline { display: flex; align-items: center; width: 40%; height: 25px; }
.nowline::before { content: ''; flex: none; width: 6px; height: 6px; margin-left: -1px; border-radius: 50%; background: var(--blue); }
.nowline::after { content: ''; flex: 1; height: 1px; background: var(--blue); }

/* red pencil bracket, hung in the left margin */
.bracket { position: absolute; left: -17px; top: 2px; bottom: 2px; width: 10px; display: flex; flex-direction: column; color: var(--red); pointer-events: none; }
.bracket svg { width: 10px; overflow: visible; }
.bracket .b-end { height: 10px; flex: none; }
.bracket .b-mid { height: 0; flex: 1 1 0; }
.bracket path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* needs your yes */
.held { margin-top: 40px; }
.held > .text { position: relative; }
.needs { font: 600 14px/20px var(--sans); color: var(--red); }
.to { margin-top: 6px; font: 600 16px/24px var(--sans); }
.said { margin-top: 4px; font: 400 17px/26px var(--sans); max-width: 36em; white-space: pre-wrap; overflow-wrap: anywhere; }
.to + .said + .to { margin-top: 16px; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 16px; }
.acts.spread { justify-content: space-between; }
.holds { font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.held.settled .to, .held.settled .said { color: var(--graphite-2); }
.held.settled .to { font-weight: 500; }
.confirm { margin-top: 10px; font-family: var(--serif); font-weight: var(--serif-w); font-size: 20px; line-height: 28px; color: var(--blue); }
.confirm p + p { margin-top: 8px; }
.confirm.quiet { margin-top: 8px; font: 400 15px/22px var(--sans); color: var(--graphite-2); }
.page > .confirm { margin-top: 24px; }

/* buttons */
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 6px;
  background: var(--graphite);
  color: var(--paper);
  font: 500 16px/20px var(--sans);
  text-decoration: none;
}
.btn-solid:hover { background: color-mix(in srgb, var(--graphite) 86%, var(--paper)); }
.btn-solid.small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-text, .btn-link, .btn-blue {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  font: 500 16px/20px var(--sans);
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.btn-blue { color: var(--blue); font-weight: 600; }
.btn-text.red { color: var(--red); }
.btn-text:hover, .btn-link:hover, .btn-blue:hover { text-decoration-thickness: 2px; }
.btn-link:disabled { cursor: default; text-decoration: none; }
.btn-quiet { min-height: 44px; padding: 0 6px; font: 500 14px/20px var(--sans); color: var(--graphite-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.btn-inline { font: inherit; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; }
.more { margin-top: 18px; margin-left: -4px; }
.briefing-now { margin-top: 8px; }

/* tick */
.tickcell { align-self: start; }
.tick { position: relative; display: flex; align-items: center; width: 20px; height: 25px; }
.tick input { position: absolute; left: -14px; top: -11.5px; width: 48px; height: 48px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.tick .box { width: 20px; height: 20px; border: 1.5px solid var(--graphite); border-radius: 3px; display: grid; place-items: center; color: var(--paper); }
.tick .box svg { width: 14px; height: 14px; visibility: hidden; }
.tick .box path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tick input:checked + .box { background: var(--graphite); }
.tick input:checked + .box svg { visibility: visible; }
.tick input:focus-visible + .box { outline: 2px solid var(--blue); outline-offset: 3px; }
.done .title { color: var(--graphite-2); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.done .detail.red { color: var(--graphite-2); }
.done > .bracket { display: none; }

/* lists */
.page.lists .row { grid-template-columns: [lead] 40px [text] minmax(0, 1fr); }
.group-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 12px; margin-bottom: 10px; }
.group-h h2 { font: 600 17px/25px var(--sans); }
.count { font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.group-h .btn-quiet { margin-left: auto; }
.item-open { display: block; width: 100%; text-align: left; }
.item-open:hover { text-decoration: underline; text-decoration-color: var(--hairline); text-underline-offset: 4px; }
.add { margin-top: 16px; }
.add-field, .finput {
  width: 100%;
  max-width: 420px;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--paper-2);
  padding: 0 14px;
  font: 400 16px/22px var(--sans);
  color: var(--graphite);
}
.add-field { min-height: 44px; }
.add-field::placeholder, .finput::placeholder { color: var(--graphite-2); opacity: 1; }
textarea.finput { padding: 12px 14px; resize: vertical; }
select.finput { appearance: auto; }
.finput.short { width: 140px; }
.finishing { margin-top: 36px; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.inline > .add-field, .inline > .finput { flex: 1 1 200px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 18px; }
.form .acts { margin-top: 2px; }
.flabel { display: block; margin-bottom: 8px; font: 600 15px/22px var(--sans); color: var(--graphite); }
.hint { margin-top: 6px; font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.error { font: 500 14px/20px var(--sans); color: var(--red); }
.error:empty { display: none; }
.copy { font: 400 13px/19px var(--sans); background: var(--paper-2); padding: 1px 6px; border-radius: 4px; word-break: break-all; user-select: all; }
.page.login .form { margin-top: 28px; max-width: 420px; }

/* talk */
.thread-head { margin: 10px 0 26px; }
.dayline { font: 400 15px/22px var(--sans); color: var(--graphite-2); }
.log { display: flex; flex-direction: column; margin-bottom: 36px; }
.log > * + * { margin-top: 26px; }
.log > .held { margin-top: 28px; }
.her { font-family: var(--serif); font-weight: var(--serif-w); font-size: 18px; line-height: 29px; color: var(--blue); overflow-wrap: anywhere; }
.her p + p, .his p + p { margin-top: 10px; }
.her strong { font-weight: 600; }
.his { font: 400 17px/26px var(--sans); overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.said-row + .said-row { margin-top: 18px; }
.attached { margin-top: 4px; font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.attached:empty { display: none; }
.working { display: inline-flex; align-items: center; gap: 12px; font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.pen { width: 56px; flex: none; color: var(--blue); }
.thread-head > .note { display: none; }
.past-list { grid-column: lead / -1; grid-row: 1; margin: 0 0 18px; }
.thread-head:has(> .past-list) > .text { grid-row: 2; }
.past-item { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 4px 0; text-align: left; }
.pt { font: 500 15px/21px var(--sans); }
.pd { font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.log.in-sheet { margin: 8px 0 0; }

/* composer */
.composer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: auto calc(-1 * var(--pad)) 0;
  padding: 10px var(--pad) 12px;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}
.composer > .attached { margin: 0 0 8px; }
.cwrap { display: flex; align-items: flex-end; gap: 8px; }
.field {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  max-height: 148px;
  resize: none;
  field-sizing: content;
  border: 0;
  border-radius: 10px;
  background: var(--paper-2);
  padding: 11px 16px;
  font: 400 17px/26px var(--sans);
  color: var(--graphite);
}
.field::placeholder { color: var(--graphite-2); opacity: 1; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.clip { flex: none; width: 40px; height: 48px; display: grid; place-items: center; color: var(--graphite-2); margin-right: -4px; }
.mic { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 1.5px solid var(--graphite-2); border-radius: 12px; color: var(--graphite-2); }
.mic.on { border-color: var(--red); color: var(--red); }
.send { flex: none; min-height: 48px; padding: 0 6px; font: 600 16px/20px var(--sans); color: var(--blue); }
.desk-only { display: none; }

/* desk */
.checkrow { margin-top: 20px; }
.checkrow .text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.checkrow .btn-blue { margin-left: -4px; }
.btn-blue[aria-disabled='true'] { opacity: 0.6; cursor: default; }
.checked-at { font: 400 13px/19px var(--sans); color: var(--graphite-2); }
.checks:not(:empty) { margin-top: 18px; }
.conns > li + li { margin-top: 24px; }
.row.conn { grid-template-columns: [text] minmax(0, 1fr) [state] auto; column-gap: 16px; }
.conn > .c-title { grid-column: text; grid-row: 1; }
.conn > .c-state { grid-column: state; grid-row: 1; margin-top: 0; font-size: 14px; text-align: right; }
.conn > .c-detail { grid-column: 1 / -1; grid-row: 2; }
.conn > .c-body { grid-column: 1 / -1; grid-row: 3; }
.c-body > .acts { margin-top: 8px; }
.c-body > .inline { margin-top: 12px; }
.disclose { margin-top: 4px; }
.disclose > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  margin-left: -4px;
  list-style: none;
  cursor: pointer;
  font: 500 15px/20px var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclosed { padding: 6px 0 4px; }
.disclosed > .hint:first-child { margin: 0 0 14px; }

/* settings */
.fields { margin-top: 36px; display: flex; flex-direction: column; gap: 30px; }
.opts { display: flex; flex-wrap: wrap; margin: -6px 0 0 -12px; }
.opt { position: relative; display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; padding: 0 12px; cursor: pointer; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt .ot { position: relative; font: 500 16px/20px var(--sans); color: var(--graphite-2); }
.opt input:checked + .ot { color: var(--graphite); font-weight: 600; }
.opt input:focus-visible + .ot { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: 3px; }
.field-row .error { margin-top: 8px; }

/* the sheet: editing one thing */
.sheet {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 8px var(--pad) calc(24px + env(safe-area-inset-bottom, 0px));
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 14px 14px 0 0;
  background: var(--paper);
  color: var(--graphite);
  overflow: auto;
}
.sheet::backdrop { background: color-mix(in srgb, #15171b 38%, transparent); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-bottom: 8px; }
.sheet-title { font: 600 17px/24px var(--sans); }

/* toast: a line of hers, over the bottom bar */
.toast {
  grid-area: main;
  align-self: end;
  justify-self: stretch;
  z-index: 3;
  margin: 0 var(--pad) 14px;
  padding: 13px 18px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--paper-2);
  color: var(--blue);
  font-family: var(--serif);
  font-weight: var(--serif-w);
  font-size: 16px;
  line-height: 22px;
  pointer-events: none;
}
.toast:empty { display: none; }
body[data-view='chat'] .toast { margin-bottom: 88px; }

/* the one motion: her mark writing itself while she works */
@media (prefers-reduced-motion: no-preference) {
  .pen path { stroke-dasharray: 1 2; stroke-dashoffset: 1.02; animation: write 1.6s ease-in-out infinite; }
  @keyframes write { 0% { stroke-dashoffset: 1.02; } 81.25% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
}

/* --------------------------------------------------------------- desktop */

@media (min-width: 1024px) {
  .app {
    max-width: none;
    margin: 0;
    padding-left: max(24px, calc((100% - 1192px) / 2));
    grid-template: "nav main" minmax(0, 1fr) / 200px minmax(0, 1fr);
  }
  .top { display: none; }
  .page { padding: 88px 24px 0 var(--gap); max-width: calc(var(--gap) + 640px + var(--gap) + var(--note) + 24px); }
  .page > :last-child:not(.composer) { margin-bottom: 96px; }
  .page.today > .composer { margin-top: 48px; }

  .nav { background: none; border-top: 0; padding: 92px 0 0; }
  .nav .brand { display: block; width: 88px; margin-bottom: 50px; color: var(--blue); }
  .nav .brand .mark { width: 88px; }
  .nav ul { flex-direction: column; height: auto; padding: 0; gap: 4px; }
  .nav li { flex: none; }
  .nav a { flex: none; justify-content: flex-start; min-height: 44px; padding: 0 10px; margin-left: -10px; }

  .row { grid-template-columns: [lead] 56px [text] minmax(0, 1fr) [gut] var(--gap) [note] var(--note); }
  .row.wide > .text { grid-column: lead / gut; }
  .row > .note, .row.wide > .note { grid-column: note; grid-row: 1; margin-top: 0; }
  .m { max-width: calc(100% - var(--gap) - var(--note)); }
  .page.lists .row { grid-template-columns: [lead] 48px [text] minmax(0, 1fr) [gut] var(--gap) [note] var(--note); }

  .lead-s { margin-top: 0; font-size: 44px; line-height: 54px; }
  .lead-s.m { max-width: min(26ch, calc(100% - var(--gap) - var(--note))); }
  .dateline { margin-top: 18px; }
  .sec { margin-top: 60px; }
  .held { margin-top: 52px; }
  .bracket { left: -26px; }
  .login-mark { width: 160px; margin-top: 0; }

  .row.conn { grid-template-columns: [lead] 56px [text] minmax(0, 1fr) [gut] var(--gap) [note] var(--note); column-gap: 0; }
  .conn > .c-title, .conn > .c-detail, .conn > .c-body { grid-column: lead / gut; }
  .conn > .c-state { grid-column: note; font-size: 15px; text-align: left; }

  .composer { margin: auto 0 0; padding: 0 0 28px; border-top: 0; }
  .composer::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 28px; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
  .composer > .attached { max-width: calc(100% - var(--gap) - var(--note)); }
  .cwrap { max-width: calc(100% - var(--gap) - var(--note)); padding-top: 16px; border-top: 1px solid var(--hairline); }
  .desk-only { display: block; }
  .thread-head { margin-top: 0; }
  .thread-head > .note { display: flex; flex-direction: column; align-items: flex-start; grid-column: note; grid-row: 1; margin-top: -13px; }
  .thread-head > .note .btn-link { min-height: 40px; margin-left: -4px; }
  .past-list { grid-column: lead / gut; margin: 0 0 22px; }

  .sheet {
    width: min(560px, calc(100vw - 48px));
    margin: auto;
    padding: 12px 32px 32px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
  }

  /* the confirmation lands in the margin, like one of her notes */
  .toast {
    justify-self: start;
    width: var(--note);
    margin: 0 0 29px calc(min(100%, var(--gap) + 640px + var(--gap) + var(--note) + 24px) - 24px - var(--note));
    border-color: transparent;
  }
  body[data-view='chat'] .toast { margin-bottom: 29px; }
}

@media (min-width: 1024px) and (max-width: 1239px) {
  :root { --gap: 40px; --note: 200px; }
}
