/* christabel.app
   A HumanityZ product, and visibly descended from humanityz.com: Helvetica set tight
   and heavy, hairline rules, square controls, a coloured full stop, a break that opens each
   chapter. But where the studio is ink printed on paper, a fixed halftone screen in four
   process colours, Christabel is the same family in motion. Her identity is the dots she is
   made of: five colours taken from her portrait, loose particles that drift and gather, and
   a night-navy ground. */

/* Display type is the site's own face, drawn for it and built by tools/build-fonts.mjs: a
   heavy, tight, flat-ended grotesque whose dots are round and oversized, like hers. Running
   text and controls stay in the quiet grotesque the page has always used. */
@font-face { font-family: "Christabel Sans"; src: url("/fonts/christabel-sans-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Christabel Sans"; src: url("/fonts/christabel-sans-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Christabel Sans"; src: url("/fonts/christabel-sans-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --display: "Christabel Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --page: #f5f5f9;
  --ink: #13151f;
  --muted: #555a6c;
  --line: #d5d7e2;
  --surface: #e8e9f1;
  /* Her five colours, read from the dots of the portrait. Rose leads. */
  --rose: #a82c68;
  --amber: #9a5a0c;
  --violet: #7b33a3;
  --teal: #0a7a58;
  --coral: #b5452b;
  --mine: #6e3192;
  --mine-ink: #ffffff;
  --press: var(--violet);
  --focus: #7b33a3;
  --danger: #b3261e;
  --veil: rgb(19 21 31 / .32);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 4vw, 60px);
  --who: 6.6rem;
}
/* Lights off: the night her projection was made for. */
:root[data-lights="off"] {
  color-scheme: dark;
  --page: #070a13;
  --ink: #eef0f8;
  --muted: #a8aec4;
  --line: #232941;
  --surface: #131729;
  --rose: #f08ab4;
  --amber: #f2b765;
  --violet: #c9a8ee;
  --teal: #5fd0a4;
  --coral: #f6997f;
  --mine: #4a2863;
  --mine-ink: #eef0f8;
  --focus: #c9a8ee;
  --danger: #f2877e;
  --veil: rgb(0 0 0 / .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--page); color: var(--ink);
  font: 18px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3, .chapter-name, .plate-name, .contact-name, .price-list strong, .packs strong, .balance, .plain-page main > p:first-child a { font-family: var(--display); }
/* Her face has larger counters than the old one, so large headlines take one weight more to keep their colour. */
.hero h1, .agree h1, .onboard h1, .spread h2, .closing h2, .thread-empty h3, .plain-page h1, .plate-name { font-weight: 600 !important; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.022em; line-height: 1.08; text-wrap: balance; }
p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
p { text-wrap: pretty; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 42%, transparent); transition: text-decoration-color .3s var(--ease); -webkit-tap-highlight-color: transparent; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--page); }
.page-width { max-width: 1480px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 30; padding: 8px 12px; background: var(--ink); color: var(--page); }
.kicker { font-size: 15px; line-height: 1.5; color: var(--muted); }
.hint { font-size: 14px; line-height: 1.5; color: var(--muted); }
.hint .link-button { font-size: inherit; color: var(--ink); }
/* The full stop that ends a title is one of her dots. */
h1 b, h2 b, .plate-name b { font-weight: inherit; color: var(--rose); }
b.coral { color: var(--coral); } b.violet { color: var(--violet); } b.rose { color: var(--rose); } b.teal { color: var(--teal); } b.amber { color: var(--amber); }

/* Buttons and links. A button is a pill led by one of her dots. On hover or focus the dot
   blooms until it fills the button, and the label turns to the page colour over it. */
.btn {
  --dot: var(--rose);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 10px 24px 10px 18px;
  background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px;
  font-size: 16px; font-weight: 500; line-height: 1.4; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn::before { content: ""; flex: none; z-index: -1; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); transition: transform .6s var(--ease); }
.btn:hover, .btn:focus-visible { color: var(--page); border-color: var(--dot); }
.btn:hover::before, .btn:focus-visible::before { transform: scale(70); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; color: var(--ink); border-color: var(--ink); transform: none; }
.btn:disabled::before { transform: none; }
.btn span[aria-hidden], .more span { display: inline-block; transition: transform .35s var(--ease); }
.btn:hover span[aria-hidden] { transform: translateY(3px); }
.btn .mic { flex: none; margin: 0 -4px 0 -2px; }
.btn.quiet { --dot: var(--amber); border-color: var(--line); }
.btn.rose { --dot: var(--coral); } .btn.violet { --dot: var(--violet); } .btn.teal { --dot: var(--teal); }
.btn.danger-button { --dot: var(--danger); border-color: var(--danger); }
.more { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; }
.more:hover span { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.link-button { padding: 0; background: none; border: 0; cursor: pointer; font-size: 15px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, currentColor 42%, transparent); transition: text-decoration-color .3s var(--ease); }
.link-button:hover { text-decoration-color: currentColor; }
.link-button.danger { color: var(--danger); }

/* Fields */
input[type="email"], input:not([type]), textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  background: transparent; border: 1px solid var(--line); border-radius: 0; font-size: 17px; line-height: 1.45;
  transition: border-color .3s var(--ease);
}
input[type="email"]:hover, input:not([type]):hover, textarea:hover, input[type="email"]:focus, input:not([type]):focus, textarea:focus { border-color: var(--ink); }
/* Typing fields show focus as a doubled ink border; the ink ring is kept for links and buttons. */
input[type="email"]:focus-visible, input:not([type]):focus-visible, textarea:focus-visible { outline: 0; box-shadow: inset 0 0 0 1px var(--ink); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--press); }
input[type="range"] { display: block; width: 100%; min-height: 30px; margin: 0 0 14px; }
.check { display: flex; align-items: flex-start; gap: 11px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; }
.form-error { color: var(--danger); font-size: 15px; }
.test-note { padding: 9px 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; line-height: 1.5; }
.notice { margin: 0 0 22px; padding: 10px 0 10px 14px; border-left: 3px solid var(--coral); font-size: 16px; }

/* Choice buttons: a row of square options, the chosen one filled with ink. */
.choice legend, .step label:not(.check):not(.range), .sheet .about label { display: block; padding: 0; margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.choice { margin-top: 22px; }
.choice legend { margin-top: 0; }
.choice, .choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { flex-basis: 100%; }
.choice .choice-row { flex-basis: 100%; }
.choice label { position: relative; margin: 0 !important; font-weight: 400 !important; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label span, .choice-row > button {
  display: inline-flex; align-items: center; padding: 9px 16px; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; font-size: 15px; line-height: 1.4; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease);
}
/* The chosen option grows a dot in one of her colours. */
.choice label span::before { content: ""; flex: none; width: 0; height: 8px; border-radius: 50%; background: var(--dot, var(--rose)); transition: width .35s var(--ease), margin .35s var(--ease); }
.choice label:nth-of-type(5n + 2) span { --dot: var(--violet); } .choice label:nth-of-type(5n + 3) span { --dot: var(--coral); }
.choice label:nth-of-type(5n + 4) span { --dot: var(--teal); } .choice label:nth-of-type(5n + 5) span { --dot: var(--amber); }
.choice label:hover span, .choice-row > button:hover { border-color: var(--ink); }
.choice input:checked + span { background: var(--surface); border-color: var(--ink); }
.choice input:checked + span::before { width: 8px; margin-right: 9px; }
/* The dot on a voice beats while its sample is playing. */
.choice label[data-playing] span::before { animation: beat .45s ease-in-out infinite alternate; }
@keyframes beat { to { transform: scale(1.75); } }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.choice input:disabled + span { opacity: .4; cursor: default; border-color: var(--line); }
.choice small { margin-left: 8px; font-size: 13px; opacity: .72; }
/* A choice of colour shows the colour. */
.swatch { flex: none; width: 14px; height: 14px; margin-right: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(19 21 31 / .14); }
.choice label:has(.swatch) span::before { display: none; }
.range { display: flex; justify-content: space-between; margin: 20px 0 2px; font-size: 14px; }

/* Navigation */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px clamp(22px, 4vw, 64px) 12px; }
.brand { display: inline-flex; align-items: center; font: 700 25px/1 var(--display); letter-spacing: -.8px; text-decoration: none; white-space: nowrap; }
.brand svg { margin-left: 9px; }
.brand .d1 { fill: var(--rose); } .brand .d2 { fill: var(--amber); } .brand .d3 { fill: var(--violet); } .brand .d4 { fill: var(--teal); } .brand .d5 { fill: var(--coral); }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 38px); font-size: 17px; }
.nav-links a, .nav-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; text-decoration: none; cursor: pointer; }
.nav-links a:hover, .nav-links button:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-side { display: flex; align-items: center; gap: clamp(20px, 2.8vw, 38px); }
/* Light and dark: a switch at the end of the bar on every screen. The knob is one of her
   dots. Switched to dark it slides across and a bite turns it into a crescent, while three
   more of her dots come out in the track like stars. */
.theme-switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; transition: color .3s var(--ease); }
.theme-switch:hover { color: var(--ink); }
.theme-track { position: relative; flex: none; width: 56px; height: 30px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .3s var(--ease); }
.theme-switch:hover .theme-track { border-color: var(--ink); }
.theme-knob { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; overflow: hidden; border-radius: 50%; background: var(--violet); transition: transform .55s var(--ease), background-color .55s var(--ease); }
.theme-knob::after { content: ""; position: absolute; top: -4px; left: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--page); transform: translate(16px, -12px); transition: transform .55s var(--ease); }
.theme-switch[aria-checked="true"] .theme-knob { transform: translateX(26px); }
.theme-switch[aria-checked="true"] .theme-knob::after { transform: none; }
.theme-switch:active .theme-knob { scale: 1.12 .92; }
.theme-track .star { position: absolute; border-radius: 50%; opacity: 0; transform: scale(0); transition: opacity .4s var(--ease), transform .55s var(--ease); }
.theme-track .star:nth-child(1) { left: 9px; top: 7px; width: 4px; height: 4px; background: var(--rose); }
.theme-track .star:nth-child(2) { left: 18px; top: 16px; width: 5px; height: 5px; background: var(--coral); }
.theme-track .star:nth-child(3) { left: 10px; top: 20px; width: 3px; height: 3px; background: var(--teal); }
.theme-switch[aria-checked="true"] .star { opacity: 1; transform: none; }
.theme-switch[aria-checked="true"] .star:nth-child(1) { transition-delay: .18s; }
.theme-switch[aria-checked="true"] .star:nth-child(2) { transition-delay: .28s; }
.theme-switch[aria-checked="true"] .star:nth-child(3) { transition-delay: .38s; }
.nav-links .time-button { gap: 9px; min-height: 0; padding: 6px 15px 6px 12px; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-variant-numeric: tabular-nums; transition: border-color .3s var(--ease); }
.nav-links .time-button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.time-button.low::before { background: var(--danger); }
.nav-links .time-button:hover { text-decoration: none; border-color: var(--ink); }
.time-word { margin-left: -.3em; }
.time-button.low { border-color: var(--danger); color: var(--danger); }

/* Chapter break: her dots drifting down onto a rule, led by one of her colours. */
.chapter { margin: 0; }
.tone { display: block; width: 100%; height: clamp(54px, 6.4vw, 104px); border-bottom: 3px solid var(--lead, var(--rose)); box-sizing: content-box; }
/* The same dots, loose in the air around her portrait. */
.tone.field { position: absolute; inset: 0; z-index: 0; height: 100%; border: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
body[data-view="chat"] .tone.field { opacity: 1; }
.portrait, .plate { position: relative; z-index: 1; }
.tone[data-ink="coral"] { --lead: var(--coral); } .tone[data-ink="violet"] { --lead: var(--violet); } .tone[data-ink="teal"] { --lead: var(--teal); } .tone[data-ink="amber"] { --lead: var(--amber); } .tone[data-ink="rose"] { --lead: var(--rose); }
.chapter .bar { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 16px; }
.chapter-name { font-size: clamp(22px, 2.3vw, 32px); font-weight: 500; letter-spacing: -.022em; line-height: 1.1; }
.chapter-note { font-size: 16px; color: var(--muted); }
.chapter-note a { color: var(--ink); }

/* The workbench: her portrait on the left stays put, the column on the right moves. */
.shell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 84px); align-items: start; padding-top: clamp(26px, 3.4vw, 56px); }
.stage { position: sticky; top: 0; display: grid; grid-template: auto auto / minmax(0, 1fr); align-content: start; justify-items: center; height: 100dvh; max-height: 940px; min-height: 0; padding: 12px 0 clamp(16px, 3dvh, 34px); }
/* Sized from the window, not from the stage, so it holds its shape in every layout. */
.portrait { position: relative; align-self: start; width: min(100%, 70dvh * 10 / 11, 620px); min-height: 0; aspect-ratio: 10 / 11; }
.portrait iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: light; opacity: 0; transition: opacity 1s var(--ease); }
.portrait iframe.ready { opacity: 1; }
/* If the live portrait cannot be drawn, a still of her takes its place. */
.portrait-still { position: absolute; inset: 6% 8%; width: 84%; height: 88%; object-fit: contain; }
:root[data-lights="off"] .portrait-still { filter: invert(1) hue-rotate(180deg) brightness(1.15); }
.plate { text-align: center; }
.plate-name { font-size: clamp(26px, 2.5vw, 38px); font-weight: 500; letter-spacing: -.025em; line-height: 1.05; overflow-wrap: anywhere; }
.stage-line { min-height: 1.6em; margin-top: 4px; font-size: 15px; color: var(--muted); }
.pause-motion { display: block; margin: 10px auto 0; font-size: 13px; color: var(--muted); }
.column { min-width: 0; }

/* Landing: the title holds the name, and the name is a field. */
.hero { padding-bottom: clamp(34px, 4.6vw, 64px); }
.hero h1, .agree h1, .onboard h1 { margin: 8px 0 clamp(16px, 1.8vw, 26px); font-size: clamp(46px, 6.3vw, 112px); letter-spacing: -.037em; line-height: .92; }
/* The page arrives the way she does: each line settles into place a beat after the last. */
.hero > * { animation: settle 1.1s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: .08s; } .hero > :nth-child(3) { animation-delay: .2s; } .hero > :nth-child(4) { animation-delay: .26s; }
.hero > :nth-child(5) { animation-delay: .34s; } .hero > :nth-child(6) { animation-delay: .42s; }
@keyframes settle { from { opacity: 0; transform: translateY(26px); } }
/* The name gets a line to itself, with its full stop kept beside it. */
.name-line { display: flex; align-items: baseline; max-width: 100%; white-space: nowrap; }
.name-field { display: inline-grid; min-width: 1.4em; max-width: calc(100% - .3em); }
.name-field::after, .name-field input { grid-area: 1 / 1; min-width: 0; padding: 0 .02em .03em 0; font: inherit; letter-spacing: inherit; }
.name-field::after { content: attr(data-value); visibility: hidden; white-space: pre; }
/* A text field has a built-in width of about twenty characters. Zero width with a full
   minimum lets the hidden copy of the name set the size instead. */
.name-field input {
  width: 0; min-width: 100%; min-height: 0; background: none; color: inherit; caret-color: var(--coral);
  border: 0; border-bottom: clamp(3px, .4vw, 5px) solid var(--coral); border-radius: 0; outline: 0;
}
.name-field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; }
.name-field input::placeholder { color: var(--muted); opacity: .6; }
.name-hint { font-size: 14px; color: var(--muted); }
.promo { max-width: 40ch; margin-top: clamp(14px, 1.6vw, 22px); font-family: var(--display); font-size: clamp(18px, 1.5vw, 21px); font-weight: 600; letter-spacing: -.012em; color: var(--coral); }
.summary { max-width: 40ch; margin-top: clamp(16px, 1.8vw, 26px); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; }
.hero .actions { margin-top: clamp(22px, 2.4vw, 34px); }
.facts-line { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: clamp(22px, 2.4vw, 34px); font-size: 14px; color: var(--muted); }
.facts-line span + span::before { content: "·"; margin: 0 12px; }

/* Builder steps. One form serves the landing page, first sign-in and the Customize sheet. */
/* The builder shows one part at a time. The parts are named along the top, and the one in
   view is underlined in one of her colours. */
.tabs { display: flex; gap: clamp(20px, 3vw, 38px); margin-top: clamp(26px, 3vw, 44px); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; flex: none; padding: 14px 0 14px; background: none; border: 0; font-family: var(--display); font-size: clamp(18px, 1.7vw, 23px); font-weight: 500; letter-spacing: -.012em; color: var(--muted); cursor: pointer; transition: color .3s var(--ease); }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tab, var(--rose)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.tabs button:nth-child(2) { --tab: var(--violet); } .tabs button:nth-child(3) { --tab: var(--amber); } .tabs button:nth-child(4) { --tab: var(--teal); }
.builder .step { border-top: 0; padding-top: clamp(26px, 3vw, 40px); }
.step-nav { display: flex; align-items: center; gap: 22px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.step-nav .btn { margin-left: auto; }
.look-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 36px); }
.look-grid .wide { grid-column: 1 / -1; }
.describe label { margin-top: 18px !important; }
.describe-row { display: flex; gap: 10px; }
.describe-row input { flex: 1; min-width: 0; }
.describe .hint { margin-top: 10px; }
.describe .hint:empty { display: none; }
.describe .link-button { margin-top: 12px; }
.describe[data-busy] input, .describe[data-busy] .btn { opacity: .5; pointer-events: none; }
.more-look { margin-top: 28px; border-top: 1px solid var(--line); }
.more-look summary { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.more-look summary::-webkit-details-marker { display: none; }
.more-look summary::after { content: "+"; flex: none; font-weight: 400; color: var(--muted); transition: transform .35s var(--ease); }
.more-look[open] summary::after { transform: rotate(45deg); }
.more-look[open] { padding-bottom: 22px; }
.more-look + .step-nav { margin-top: 0; }
.step { padding: clamp(30px, 3.6vw, 50px) 0 clamp(34px, 4vw, 56px); border-top: 1px solid var(--line); }
.step h2 { font-size: clamp(26px, 2.4vw, 32px); }
.step-lede { max-width: 54ch; margin-top: 10px; }
.landing .step-name { display: none; }
.step-name input { font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.step .hint { margin-top: 12px; }
.step .check { margin-top: 18px; }
/* Writing your own opens in place; the default keeps it folded away. */
.custom { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--ease), opacity .35s var(--ease); }
.custom > * { min-height: 0; }
.custom-inner { overflow: hidden; margin: 0 -6px; padding: 0 6px 4px; }
.builder[data-mode="default"] .custom { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .45s var(--ease), opacity .2s var(--ease), visibility 0s .45s; }

/* The conversation, as in a phone's messages: hers on the left, yours on the right. Bubbles
   are round like her dots, with one tight corner where the message came from. */
.thread { display: flex; flex-direction: column; }
.thread li { position: relative; display: flex; flex-direction: column; max-width: min(80%, 34rem); margin-top: 3px; }
.thread li.christabel { align-self: flex-start; align-items: flex-start; }
.thread li.user { align-self: flex-end; align-items: flex-end; }
.thread li.christabel + li.user, .thread li.user + li.christabel, .thread li.event + li { margin-top: 14px; }
.thread .who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.thread .said { display: block; padding: 10px 16px; border-radius: 22px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; cursor: default; }
.thread .christabel .said { background: var(--surface); border-bottom-left-radius: 7px; }
.thread .user .said { background: var(--mine); color: var(--mine-ink); border-bottom-right-radius: 7px; }
/* Only the last bubble of a run keeps the tight corner. */
.thread li.christabel:has(+ li.christabel) .said { border-bottom-left-radius: 22px; }
.thread li.user:has(+ li.user) .said { border-bottom-right-radius: 22px; }
.thread li.event { align-self: center; max-width: none; margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
.thread li.event .said { padding: 0; background: none; }
.thread li.care { align-self: stretch; max-width: none; margin: 18px 0; padding: 14px 18px; border: 1px solid var(--ink); border-left-width: 4px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.thread li.failed .said { background: none; border: 1px solid var(--danger); color: var(--danger); }
.thread li.new { animation: line-in .45s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); } }
/* Time and delivery sit under the last bubble of a run, or under any bubble that is opened. */
.thread .meta { margin: 4px 8px 0; font-size: 12px; color: var(--muted); }
.thread li.christabel:has(+ li.christabel):not(.open) .meta, .thread li.user:has(+ li.user):not(.open) .meta { display: none; }
.thread .quote { display: block; margin: 0 0 7px; padding: 5px 10px; border-left: 3px solid var(--coral); border-radius: 0 8px 8px 0; background: color-mix(in srgb, currentColor 9%, transparent); font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread .quote b { display: block; font-weight: 600; }
/* A reaction hangs off the bubble's top corner, on the side away from its sender. */
.thread .tapback { position: absolute; top: -11px; padding: 1px 6px; background: var(--page); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; line-height: 1.35; animation: pop .4s var(--ease) both; }
.thread .christabel .tapback { right: -10px; }
.thread .user .tapback { left: -10px; }
.thread li:has(.tapback) { margin-top: 16px; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.2); } }
/* React and reply appear beside a bubble on hover, or when it is opened by a tap. */
.thread .acts { position: absolute; top: 50%; display: flex; gap: 4px; opacity: 0; transform: translateY(-50%); transition: opacity .2s var(--ease); pointer-events: none; }
.thread .christabel .acts { left: calc(100% + 8px); }
.thread .user .acts { right: calc(100% + 8px); }
.thread li:hover .acts, .thread li:focus-within .acts, .thread li.open .acts { opacity: 1; pointer-events: auto; }
.thread .acts button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; background: var(--page); color: var(--muted); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: color .2s, border-color .2s; }
.thread .acts button:hover { color: var(--ink); border-color: var(--ink); }
/* Example conversations on the landing page are for reading, not operating. */
.sample .thread li { max-width: 86%; }

/* The menu for one message: reactions across the top, then what can be done with it. */
.message-menu { position: fixed; z-index: 40; min-width: 216px; padding: 8px; background: var(--page); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 34px var(--veil); animation: line-in .25s var(--ease) both; }
.message-menu .reactions { display: flex; justify-content: space-between; gap: 2px; padding: 0 2px 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.message-menu .reactions button { width: 36px; height: 36px; padding: 0; background: none; border: 0; border-radius: 50%; font-size: 20px; cursor: pointer; transition: transform .2s var(--ease), background-color .2s; }
.message-menu .reactions button:hover { transform: scale(1.25); }
.message-menu .reactions button[aria-pressed="true"] { background: var(--surface); }
.message-menu .action { display: flex; justify-content: space-between; width: 100%; padding: 9px 12px; background: none; border: 0; border-radius: 10px; text-align: left; font-size: 16px; cursor: pointer; }
.message-menu .action:hover, .message-menu .action:focus-visible { background: var(--surface); }
.message-menu .action.danger { color: var(--danger); }
.sample { margin-top: 30px; padding-top: 10px; border-top: 1px solid var(--ink); }
.sample figcaption { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sample .swap { animation: line-in .45s var(--ease) both; }

/* Sign-up */
.signin { margin-top: 26px; }
.signin > label:first-child { margin-top: 0; }
.signin-row { display: flex; gap: 8px; }
.signin-row input { flex: 1; min-width: 0; }
.signin .check { margin-top: 16px; }
.signin .form-error { margin-top: 12px; }
.signin-alt { margin-top: 16px; font-size: 16px; color: var(--muted); }
.signin-alt a { color: var(--ink); }
.sent { margin-top: 26px; padding-left: 16px; border-left: 3px solid var(--coral); }
.sent h3 { font-size: 26px; }
.sent p { margin: 8px 0 14px; }

/* Chapters below the workbench */
.chapter-section { margin-top: clamp(80px, 11vw, 170px); }
.spread { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 100px); align-items: start; padding-top: clamp(34px, 4.4vw, 70px); }
.spread h2, .closing h2 { font-size: clamp(38px, 5.2vw, 84px); letter-spacing: -.034em; line-height: .96; }
.spread h3, .agree h3, .sheet > h3 { padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.spread .sample { margin-top: 0; }
.facts { margin-top: clamp(24px, 3vw, 40px); font-size: 17px; }
.facts div { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); }
/* The original: who she is before anyone changes her. */
.original .facts { margin-top: 0; }
.original .actions { margin-top: clamp(24px, 3vw, 40px); }
.original h2 + .summary { margin-bottom: clamp(24px, 3vw, 40px); }
.price-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.price-list strong { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; letter-spacing: -.022em; }
.price-list strong small { display: block; margin-top: 4px; font: 400 15px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0; color: var(--muted); }
.price-list span { font-size: 18px; font-variant-numeric: tabular-nums; }
.price-list + .hint { margin-top: 14px; }
.questions details { border-bottom: 1px solid var(--line); }
.questions details:first-child { border-top: 1px solid var(--line); }
.questions summary { display: flex; justify-content: space-between; gap: 18px; padding: 18px 0; font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; letter-spacing: -.02em; cursor: pointer; list-style: none; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: none; font-weight: 400; color: var(--muted); transition: transform .35s var(--ease); }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details p { max-width: 52ch; padding: 0 0 22px; color: var(--muted); }
.questions details p a { color: var(--ink); }
.closing { margin-top: clamp(80px, 12vw, 180px); }
.closing h2 { font-size: clamp(44px, 8vw, 132px); letter-spacing: -.037em; line-height: .9; }
.closing .actions { margin-top: clamp(26px, 3vw, 44px); }
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .rv.seen { opacity: 1; transform: none; }

/* Agreement gate and first sign-in */
.agree, .onboard { padding-bottom: clamp(50px, 8vw, 110px); }
.agree h1, .onboard h1 { font-size: clamp(42px, 5.2vw, 88px); }
.agree h3 { margin-top: 42px; }
.agree .facts { margin-top: 0; }
.agree .facts div:first-child { border-top: 0; }
.agree .facts + .hint, .agreement-box + .hint { margin-top: 12px; }
.agreement-box { max-height: min(54dvh, 540px); margin-top: 28px; padding: 6px 24px 24px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.agreement-box h2 { margin: 26px 0 6px; font-size: 17px; font-weight: 600; letter-spacing: -.006em; }
.agreement-box p, .agreement-box li { margin-top: 10px; }
.agreement-box ul { list-style: disc; padding-left: 1.2em; }
#agree-form { margin-top: 30px; }
#agree-form .check { margin-top: 14px; }
#agree-form .form-error { margin-top: 14px; }
.agree-actions, .onboard-actions { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--ink); }
.onboard .summary { margin-bottom: clamp(30px, 4vw, 52px); }

/* Conversation view: the app fills the window and only the thread scrolls. */
body[data-view="chat"] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100dvh; overflow: hidden; font-size: 17px; }
body[data-view="chat"] .chapter-top .tone { height: clamp(26px, 3vw, 44px); }
body[data-view="chat"] .chapter-top .bar { display: none; }
body[data-view="chat"] .shell { width: 100%; align-items: stretch; min-height: 0; padding-top: 0; gap: 0; }
body[data-view="chat"] .stage { position: relative; grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; height: auto; max-height: none; overflow: hidden; padding: 0 0 clamp(18px, 3.4dvh, 34px); }
/* She fills the stage: the frame runs past its row, so her face is large and her name sits over the fade below it. */
body[data-view="chat"] .portrait { align-self: center; width: auto; height: 128%; max-width: 128%; margin: -6% 0 -22%; }
body[data-view="chat"] .plate-name { font-size: clamp(34px, 3.6vw, 60px); letter-spacing: -.034em; }
body[data-view="chat"] .stage-line { font-size: 16px; }
body[data-view="chat"] .column { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding-left: clamp(22px, 3.4vw, 60px); border-left: 1px solid var(--line); }
.conversation { position: relative; grid-row: 2; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto auto auto; min-height: 0; padding-top: clamp(18px, 2.6dvh, 30px); }
/* Who you are talking to, as a messaging app shows it. */
.contact { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; object-position: 50% 28%; background: var(--page); }
.contact-who { flex: 1; min-width: 0; }
.contact-name { font-size: 20px; font-weight: 500; letter-spacing: -.019em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-status { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--muted); }
.contact-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.contact-status[data-state="call"]::before { background: var(--coral); }
.contact .link-button { flex: none; }
.thread-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 14px 4px 20px 0; }
.thread-scroll:focus-visible { outline-offset: -3px; }
.thread-empty { padding-top: clamp(18px, 4.6dvh, 54px); }
.thread-empty h3 { font-size: clamp(30px, 3.4vw, 54px); letter-spacing: -.034em; line-height: .96; }
.thread-empty h3 b { font-weight: inherit; color: var(--coral); }
.thread-empty p { max-width: 46ch; margin-top: 14px; color: var(--muted); }
/* The opening screen: things to say, and chats to return to. */
.openers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr)); gap: 30px clamp(26px, 4vw, 60px); margin-top: clamp(26px, 5dvh, 54px); }
.openers h4 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 15px; font-weight: 600; }
.rows li { border-bottom: 1px solid var(--line); }
.rows button { display: flex; align-items: baseline; gap: 14px; width: 100%; padding: 13px 0; background: none; border: 0; text-align: left; font-size: 18px; letter-spacing: -.01em; cursor: pointer; }
.rows button::before { content: ""; flex: none; align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--rose)); transform: scale(.55); transition: transform .35s var(--ease); }
.rows li:nth-child(5n + 2) button { --dot: var(--violet); } .rows li:nth-child(5n + 3) button { --dot: var(--coral); }
.rows li:nth-child(5n + 4) button { --dot: var(--teal); } .rows li:nth-child(5n + 5) button { --dot: var(--amber); }
.rows button span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows button small { flex: none; font-size: 14px; color: var(--muted); }
.rows button span[aria-hidden] { flex: none; color: var(--muted); transition: transform .35s var(--ease), color .35s var(--ease); }
.rows button:hover::before, .rows button:focus-visible::before { transform: scale(1.25); }
.rows button:hover span[aria-hidden] { transform: translateX(5px); color: var(--ink); }
.dots { display: inline-flex; gap: 6px; height: 1em; align-items: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: drift 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { background: var(--violet); animation-delay: .16s; }
.dots i:nth-child(3) { background: var(--coral); animation-delay: .32s; }
@keyframes drift { 0%, 100% { transform: scale(.55); } 45% { transform: scale(1); } }
.call { display: flex; align-items: center; gap: 16px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.call-line { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call .btn { min-height: 40px; padding: 6px 18px 6px 14px; font-size: 15px; --dot: var(--coral); }
/* A line of her dots runs above the message box. It is a rule at rest, a wave while she
   thinks, and her voice while she talks. */
.pulse { display: flex; align-items: center; justify-content: space-between; height: 16px; }
.pulse i { width: 6px; height: 6px; border-radius: 50%; transform: scale(var(--s, .42)); transition: transform .12s linear; }
.pulse i:nth-child(5n + 1) { background: var(--rose); } .pulse i:nth-child(5n + 2) { background: var(--amber); } .pulse i:nth-child(5n + 3) { background: var(--violet); }
.pulse i:nth-child(5n + 4) { background: var(--teal); } .pulse i:nth-child(5n + 5) { background: var(--coral); }
body[data-busy="thinking"] .pulse i { animation: ripple 1.5s ease-in-out infinite; animation-delay: calc(var(--i) * 28ms); }
@keyframes ripple { 0%, 60%, 100% { transform: scale(.42); } 30% { transform: scale(1.5); } }
/* The message box is a rounded bar: emoji on the left, send on the right. */
.composer { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 8px 0 16px; }
.composer-bar { display: flex; align-items: flex-end; gap: 2px; padding: 4px 5px 4px 6px; border: 1px solid var(--line); border-radius: 27px; transition: border-color .3s var(--ease); }
.composer-bar:hover, .composer-bar:focus-within { border-color: var(--ink); }
/* The hint stays on one line however narrow the bar gets. */
.composer-bar textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-bar textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 168px; padding: 8px 6px; border: 0; background: none; resize: none; box-shadow: none !important; }
.icon-button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: none; color: var(--muted); border: 0; border-radius: 50%; cursor: pointer; transition: color .2s, background-color .2s; }
.icon-button:hover, .icon-button[aria-expanded="true"] { color: var(--ink); background: var(--surface); }
.send-button { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: var(--rose); color: var(--page); border: 0; border-radius: 50%; cursor: pointer; transition: transform .25s var(--ease), opacity .25s var(--ease), background-color .25s; }
.send-button:hover { transform: scale(1.08); }
.send-button:active { transform: scale(.94); }
.send-button:disabled { background: var(--line); color: var(--muted); cursor: default; transform: none; }
.composer .btn { min-height: 50px; }
body[data-call="on"] .composer { grid-template-columns: minmax(0, 1fr); }
/* What is being replied to, shown above the bar until it is sent or dismissed. */
.replying { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 6px 6px 6px 14px; border-left: 3px solid var(--coral); background: var(--surface); border-radius: 0 14px 14px 0; font-size: 14px; }
.replying p { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replying b { margin-right: 8px; font-weight: 600; }
.replying .icon-button { width: 30px; height: 30px; font-size: 13px; }
.emoji-panel { position: absolute; left: 0; bottom: calc(100% + 2px); z-index: 30; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: min(340px, 100%); padding: 10px; background: var(--page); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 34px var(--veil); animation: line-in .25s var(--ease) both; }
.emoji-panel button { aspect-ratio: 1; padding: 0; background: none; border: 0; border-radius: 10px; font-size: 21px; cursor: pointer; transition: transform .15s var(--ease), background-color .15s; }
.emoji-panel button:hover { background: var(--surface); transform: scale(1.15); }
/* While she is out in her floating window, the page's portrait rests and calls start from there. */
body[data-floating="on"] .portrait { opacity: .16; transition: opacity .6s var(--ease); }
body[data-floating="on"] #start-call { display: none; }
body[data-floating="on"] .composer { grid-template-columns: minmax(0, 1fr); }
/* The Time and plan sheet. What is left today is three figures, not a sentence. */
.meter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.meter div { padding: 14px 12px 16px 0; }
.meter div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.meter dt { font-size: 14px; color: var(--muted); }
.meter dd { margin: 8px 0 0; font-family: var(--display); font-size: clamp(30px, 8vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.meter dd.low { color: var(--danger); }
.meter + .hint { margin-top: 12px; }
/* The plan is the one thing on the sheet being offered, so it is the one thing set large. */
.offer { margin-top: 40px; }
.offer-name { font-size: clamp(52px, 13vw, 72px); font-weight: 600; letter-spacing: -.03em; line-height: .9; }
.offer-name b { font-weight: inherit; color: var(--rose); }
.offer-line { margin-top: 12px; font-size: 20px; line-height: 1.35; }
.offer-status { margin-top: 12px; font-size: 20px; line-height: 1.35; }
.offer .plan-facts { margin-top: 20px; }
.offer .choice { margin-top: 22px; }
.offer #plan-choice { margin: 0 0 26px; }
.offer .actions { margin-top: 18px; }
.offer .hint { margin-top: 14px; }
.sheet > .offer + h3 { margin-top: 44px; }
/* What the plan gives, one line each. */
.plan-facts { margin: 4px 0 6px; border-top: 1px solid var(--line); font-size: 17px; }
.plan-facts li { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-facts li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); transform: translateY(-2px); }
.memories small { flex: none; width: 9.5rem; font-size: 13px; color: var(--muted); }
/* What she remembers: one ruled row per note, each with its own way out. */
.memories { margin-top: 16px; border-top: 1px solid var(--line); }
.memories:empty { display: none; }
.memories li { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.memories li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.memory-add { display: flex; gap: 10px; margin-top: 16px; }
.memory-add input { flex: 1; min-width: 0; }
/* Jump back to the newest message after scrolling up. */
.to-latest { position: absolute; right: 8px; bottom: 132px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--page); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 20px var(--veil); font-size: 14px; cursor: pointer; animation: line-in .3s var(--ease) both; }
.to-latest:hover { border-color: var(--ink); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; margin-top: clamp(70px, 9vw, 120px); padding: 22px clamp(22px, 4vw, 64px) 26px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.foot .short { display: none; }
.colophon { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; }
/* Pause motion sits under her name. The footer copy is for narrow screens, where that one is hidden. */
.colophon .link-button { display: none; font-size: inherit; color: inherit; }
body[data-view="chat"] .foot { margin-top: 0; padding-top: 10px; padding-bottom: 12px; font-size: 13px; }
body[data-view="agree"] .foot, body[data-view="build"] .foot { margin-top: 0; }

/* Sheets slide over the column, so the portrait stays in view. */
dialog { color: var(--ink); }
.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(500px, 100vw); max-width: none; height: 100dvh; max-height: none;
  padding: 0 28px 44px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--page); border: 0; border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .5s var(--ease), overlay .5s allow-discrete, display .5s allow-discrete;
}
.sheet[open] { transform: none; }
@starting-style { .sheet[open] { transform: translateX(100%); } }
.sheet::backdrop { background: transparent; transition: background-color .5s, overlay .5s allow-discrete, display .5s allow-discrete; }
.sheet[open]::backdrop { background: var(--veil); }
@starting-style { .sheet[open]::backdrop { background: transparent; } }
/* No veil while customizing: the portrait is the preview. */
#customize-sheet[open]::backdrop { background: transparent; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 16px; padding: 22px 0 14px; background: var(--page); border-bottom: 3px solid var(--violet); }
#time-sheet .sheet-head { border-bottom-color: var(--teal); }
#history-sheet .sheet-head { border-bottom-color: var(--coral); }
.sheet-head h2 { margin-right: auto; font-size: 32px; }
.saved { font-size: 14px; color: var(--muted); }
.sheet > p { margin-top: 16px; }
.sheet > h3 { margin-top: 32px; }
.sheet-empty { color: var(--muted); }
.balance { margin-top: 26px !important; font-size: clamp(26px, 6vw, 32px); font-weight: 500; letter-spacing: -.022em; line-height: 1.1; }
.sheet .step { padding: 26px 0 30px; }
.sheet .step:first-child { border-top: 0; }
.sheet .step h2 { font-size: 24px; }
.sheet .step-lede { margin-top: 6px; font-size: 16px; }
.sheet .about .step:first-child { border-top: 1px solid var(--line); }
.sheet .about h2 + label { margin-top: 16px; }
.sheet .about h2 + p { margin-top: 12px; }
.sheet .about .actions { margin-top: 16px; }
.packs li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.packs strong { font-size: 20px; font-weight: 500; letter-spacing: -.019em; }
.packs .price { font-variant-numeric: tabular-nums; }
.packs .btn { min-height: 42px; padding: 6px 20px 6px 15px; font-size: 16px; --dot: var(--teal); }
.packs strong { font-family: var(--display); }
.packs + .hint { margin-top: 12px; }
.history li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 14px 0 14px 12px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.history li[aria-current="true"] { border-left-color: var(--coral); }
.history .open { grid-column: 1 / -1; padding: 0; background: none; border: 0; text-align: left; font-size: 19px; font-weight: 500; letter-spacing: -.02em; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history .open:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.history .meta { font-size: 14px; color: var(--muted); }
.history .acts { display: flex; gap: 16px; }
.history .acts .link-button { font-size: 14px; }
.history .rename { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 8px; }
.history .rename input, .history .rename .btn { min-height: 42px; }
/* ---------- the public help centre */
.help-page main { max-width: 48rem; margin: 0 auto; padding: 6vh var(--pad) 12vh; }
.help-top { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 clamp(34px, 6vh, 70px); font-size: 15px; }
.help-home { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.7px; text-decoration: none; }
.help-page h1 { margin: 8px 0 0; font-size: clamp(44px, 7vw, 88px); font-weight: 600; letter-spacing: -.037em; line-height: .92; }
.help-foot { display: flex; gap: 22px; margin-top: 70px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* ---------- the account menu */
.menu-wrap { position: relative; }
.nav-links .menu-button { justify-content: center; width: 40px; height: 40px; min-height: 0; border: 1px solid var(--line); border-radius: 50%; font-family: var(--display); font-size: 17px; font-weight: 600; text-transform: uppercase; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.nav-links .menu-button:hover, .menu-button[aria-expanded="true"] { text-decoration: none; border-color: var(--ink); background: var(--surface); }
.menu { position: absolute; z-index: 40; top: calc(100% + 12px); right: 0; width: min(300px, calc(100vw - 32px)); padding: 8px; background: var(--page); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 34px var(--veil); transform-origin: top right; animation: menu-in .28s var(--ease) both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.menu-who { margin: 0 0 6px; padding: 10px 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; color: var(--muted); }
.menu-who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--ink); }
.nav-links .menu [role="menuitem"] { display: block; width: 100%; min-height: 0; padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 16px; text-decoration: none; transition: background-color .2s var(--ease); }
.nav-links .menu [role="menuitem"]:hover, .nav-links .menu [role="menuitem"]:focus-visible { background: var(--surface); text-decoration: none; }
.menu small { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.menu small:empty { display: none; }
.nav-links .menu .last { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }

/* ---------- the gates: a code to give, an account on hold */
.gate { padding-bottom: clamp(50px, 8vw, 110px); }
.gate h1 { margin: 8px 0 clamp(16px, 1.8vw, 26px); font-size: clamp(42px, 5.2vw, 88px); font-weight: 600; letter-spacing: -.037em; line-height: .92; }
.gate .kicker { margin: 0; }
.gate-form { max-width: 30rem; margin-top: clamp(24px, 3vw, 40px); }
.gate-form label { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.gate-row { display: flex; gap: 10px; }
.gate-row input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.gate-row + .hint, .gate-form .hint { margin-top: 12px; }
.gate-actions { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--ink); }
#code-entry { font-family: var(--display); font-size: 24px; letter-spacing: .08em; }

/* ---------- the account page */
.ledger { margin: 26px 0 0; border-top: 1px solid var(--ink); }
.ledger div { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.ledger dt { font-size: 14px; color: var(--muted); }
.ledger dd { margin: 6px 0 0; font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ledger dd.aside { margin-top: 8px; font-family: inherit; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.block { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--ink); }
.block h3 { font-size: 24px; }
.block > p, .block > div > p { margin-top: 12px; }
.block .actions { margin-top: 18px; }
.block-lede { margin-top: 8px; color: var(--muted); }
.block-lede[data-on]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--teal); }
.steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 16px 0 18px 44px; border-top: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 12px; font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--violet); }
.steps .gate-row { margin-top: 12px; max-width: 22rem; }
.qr { width: 196px; margin: 16px 0 4px; padding: 14px; background: #fff; color: #14121c; border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 16px; }
.codes li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows { margin: 14px 0 0; padding: 0; list-style: none; }
.rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }
.rows small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.rows .here { font-size: 14px; color: var(--teal); white-space: nowrap; }
.sheet-end { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- help */
.help-thread { margin: 18px 0 0; padding: 0; list-style: none; }
.help-thread:empty { display: none; }
.help-thread li { max-width: 88%; }
.help-thread .cites { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 8px 0; font-size: 14px; }
.help-options { margin-top: 18px; }
.help-bar { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ink); }
.help-bar textarea { flex: 1; min-width: 0; min-height: 46px; max-height: 160px; resize: none; }
#help-email-row { margin-top: 12px; }
#guide-search { width: 100%; margin-top: 22px; }
.guide-section { margin-top: 28px; }
.guide-section h3 { padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 20px; }
.guide-section button { display: block; width: 100%; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 16px; cursor: pointer; }
.guide-section button:hover strong { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.guide-section button strong { display: block; font-weight: 600; }
.guide-section button span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.guide { margin-top: 22px; }
.guide h2 { font-size: 30px; }
.guide h3 { margin-top: 26px; font-size: 20px; }
.guide p, .guide ul, .guide ol { margin-top: 12px; line-height: 1.55; }
.guide ul, .guide ol { padding-left: 22px; }
.guide ul { list-style: disc; }
.guide ol { list-style: decimal; }
.guide li + li { margin-top: 6px; }
.requests li { display: block; }
.requests .status { float: right; font-size: 14px; color: var(--muted); }
.requests .status[data-status="answered"] { color: var(--teal); }
.requests .said-by { margin-top: 10px; padding: 10px 14px; background: var(--surface); border-radius: 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.requests .said-by b { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.requests .gate-row { margin-top: 12px; }
#report .choice { margin: 4px 0 16px; }
#report input:not([type]) { width: 100%; }
#report form { display: block; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 24px 0 0 !important; }

.confirm { width: min(440px, calc(100vw - 32px)); padding: 28px; background: var(--page); border: 1px solid var(--ink); border-radius: 0; }
.confirm::backdrop { background: var(--veil); }
.confirm h2 { font-size: 28px; }
.confirm p { margin: 12px 0 26px; }
.confirm form { display: flex; justify-content: flex-end; gap: 10px; }

/* Stand-alone pages: the sign-in landing, the agreement and privacy. */
body.plain-page { display: block; }
.plain-page main { max-width: 44rem; margin: 0 auto; padding: 8vh var(--pad) 12vh; }
.plain-page main > p:first-child a { font-weight: 700; font-size: 22px; letter-spacing: -.7px; text-decoration: none; }
.plain-page h1 { margin: 30px 0 22px; font-size: clamp(44px, 8vw, 92px); letter-spacing: -.037em; line-height: .92; }
.plain-page h2 { margin: 38px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 21px; font-weight: 500; letter-spacing: -.012em; }
.plain-page p, .plain-page li { margin-bottom: 12px; }
.plain-page ul { list-style: disc; padding-left: 1.2em; }
.plain-page .draft { margin-bottom: 26px; }

/* Narrow: the portrait rides along the top while you build, then gets out of the way. */
@media (max-width: 899px) {
  :root { --who: 5.2rem; }
  .nav { flex-wrap: wrap; gap: 4px 18px; padding: 14px 20px 8px; }
  .brand { font-size: 24px; }
  .nav-links { gap: 22px; font-size: 16px; }
  #guest-nav a[href="#how"], #guest-nav a[href="#pricing"], #guest-nav a[href="#questions"] { display: none; }
  .nav-side { gap: 18px; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .stage { z-index: 5; height: clamp(240px, 38dvh, 400px); max-height: none; margin: 0 calc(var(--pad) * -1); padding: 6px 0 10px; background: var(--page); border-bottom: 1px solid var(--line); transition: transform .5s var(--ease), height .45s var(--ease); }
  body[data-stage="away"]:not([data-view="chat"]) .stage { transform: translateY(calc(-100% - 2px)); }
  .stage { grid-template-rows: minmax(0, 1fr); }
  .portrait { align-self: center; width: auto; height: 100%; max-width: 100%; }
  .plate { position: absolute; left: 0; right: 0; bottom: 8px; pointer-events: none; }
  .plate-name { font-size: 22px; }
  .stage-line, .pause-motion { display: none !important; }
  .colophon .link-button { display: inline; }
  .column { padding-top: 26px; }
  .hero h1 { font-size: clamp(44px, 13.6vw, 96px); }
  .spread { grid-template-columns: minmax(0, 1fr); }
  body[data-view="chat"] .shell { grid-template-rows: auto minmax(0, 1fr); padding-left: var(--pad); padding-right: var(--pad); }
  body[data-view="chat"] .stage { height: clamp(150px, 25dvh, 250px); padding: 4px 0 8px; }
  body[data-view="chat"][data-call="on"] .stage { height: clamp(210px, 40dvh, 400px); }
  body[data-view="chat"] .portrait { width: auto; height: 100%; max-width: 100%; margin: 0; }
  body[data-view="chat"] .plate-name { font-size: 24px; }
  .tone.field { display: none; }
  body[data-view="chat"] .column { padding: 0; border-left: 0; }
  body[data-view="chat"] .chapter-top { display: none; }
  body[data-view="chat"] .foot .long, body[data-view="chat"] .colophon a:last-child { display: none; }
  body[data-view="chat"] .foot .short { display: inline; }
  .thread li { max-width: 86%; }
  /* A second window is a desktop idea. */
  #pop-out { display: none; }
}
@media (max-width: 520px) {
  .signin-row { flex-direction: column; }
  .look-grid { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: 5.8rem minmax(0, 1fr); gap: 12px; }
  .composer .btn { padding: 10px 14px; }
  .call-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .composer .btn .mic { margin: 0; }
  .thread .acts { display: none; }
  .nav-links { gap: 16px; }
  .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 380px) { .time-word { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .rv { opacity: 1; transform: none; }
}
