/* The live deck (design notes 2026-10-05-build16, item 6): the welcome's first three cards are close-ups of the app itself,
   built from its own markup and styles.css, played by deck.js. Each stage is a window the width of the card; inside it the
   app's components sit at their own size. With no data-phase the stage shows the finished state (a still frame, reduce
   motion); deck.js sets data-phase as it plays. Only the stage's own look and the phases live here. */

.deck-card.deck-live-card { padding: var(--s-4) var(--s-8); }   /* the stage a little wider for the rows (design round 2026-10-09) */
.deck-live { position: relative; width: 100%; height: min(58vh, 490px); height: min(58dvh, 490px);   /* the dynamic viewport (build19, 14) */
  height: min(calc(58dvh + 60px), 550px);   /* plus the row Next used (build22, item 3): the chevrons share the dots' line now */
  overflow: hidden; border-radius: 16px; border: 1px solid var(--line);
  background: var(--bg); box-shadow: var(--shadow); text-align: left; }
.deck-live > * { transition: opacity .22s ease; }
.deck-live.dl-resetting > * { opacity: 0; }
.deck-live .dl-view { overflow: hidden; }
.deck-live .dl-follow { transition: transform .3s ease; }

/* A finger's tap: a ring at the target, and the target dips. */
.dl-tap { position: absolute; z-index: 5; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: var(--brand); opacity: 0; pointer-events: none; }
.dl-tap.on { animation: dl-tap .6s ease-out; }
@keyframes dl-tap { 0% { transform: scale(.35); opacity: .5; } 60% { opacity: .3; } 100% { transform: scale(1.35); opacity: 0; } }
.deck-live .dl-pressed { transform: scale(.95); filter: brightness(.93); transition: transform .1s ease, filter .1s ease; }
@keyframes dl-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes dl-blink { 50% { opacity: 0; } }

/* 2. The request comes in: Megan's Mailbox card opened in place (ui.js's row, design round 2026-10-09: the row, then Send and
   Book, her note as the Mailbox's quote, the draft, the muted link row), the reply typing, Send lighting up. Nothing on the card
   moves while the reply types (build22, item 2) and nothing scrolls (build23, item 4): the reply's box is the finished reply's
   height from the first frame (an unseen copy of it, .dl-ghost, holds the room while the typed one fills it in the same grid
   cell). The stage grows past the shared height when the card needs it (the track takes the tallest card's height). */
.dl-request { height: auto; min-height: min(58vh, 490px); min-height: min(calc(58dvh + 60px), 550px); }
.dl-request .dl-view { padding: var(--s-12) var(--s-8); box-sizing: border-box; }
/* A tall phone (390x844) gives the stage more height than the card needs: the card sits in the middle of it, the band even above
   and below (build26, item 4). Where the card fills the stage (375x667) the auto margins are 0 and nothing moves. */
.dl-request { display: flex; flex-direction: column; }
.dl-request > .dl-view { margin-block: auto; }
.deck-live .urow .acc-in { display: grid; gap: var(--s-12); }
.deck-live .urow-h { cursor: default; padding-left: var(--s-12); }
.deck-live .dl-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.deck-live .dl-two .btn { min-height: 44px; padding-block: 0; }
.deck-live .dl-links { display: flex; align-items: center; justify-content: center; gap: var(--s-4); color: var(--muted); }
.deck-live .dl-links .linkish { min-height: 44px; padding: 0 var(--s-12); font-size: .88rem; display: inline-flex; align-items: center; }
.dl-request .draft { margin: 0; padding: var(--s-24) var(--s-16) var(--s-12); }
.dl-request .dl-reply { display: grid; }
.dl-request .dl-reply > .text { grid-area: 1 / 1; }
.dl-request .dl-ghost { visibility: hidden; }
.dl-request .dl-card { transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
.dl-request .dl-note { margin: 0; padding: 2px 0 2px var(--s-12); border-left: 3px solid var(--line); font: 400 14px/1.45 var(--ui); color: var(--muted);
  white-space: pre-wrap; overflow-wrap: anywhere; }
/* A phone under 720 tall (build23, item 4): the reply a size down, less air over the stage, and the caption a step down. */
@media (max-height: 719px) {
  .dl-request .dl-reply > .text { font-size: 16px; }
  .welcome-card.deck { padding-top: var(--s-8); }
  .deck-card.deck-live-card { padding-top: 0; }
  .dl-request .urow .acc-in { gap: var(--s-8); }
}
.deck-card figcaption.dl-cap-request { font-size: .95rem; min-height: 0; }
.dl-request .dl-writing, .dl-request .dl-drafting { display: none; }
.dl-request:is([data-phase="empty"], [data-phase="arrived"], [data-phase="typing"]) .dl-ready { display: none; }
.dl-request:is([data-phase="empty"], [data-phase="arrived"], [data-phase="typing"]) .dl-drafting { display: inline-flex; }
.dl-request :is(.send-main, .book) { transition: opacity .3s ease, filter .3s ease; }
.dl-request[data-phase="empty"] .dl-card { opacity: 0; transform: translateY(-18px); }
.dl-request:is([data-phase="empty"], [data-phase="arrived"]) .draft .label.corner { display: none; }
.dl-request:is([data-phase="empty"], [data-phase="arrived"]) .dl-writing { display: inline; }
.dl-request:is([data-phase="empty"], [data-phase="arrived"], [data-phase="typing"]) :is(.send-main, .book) { opacity: .38; filter: saturate(0); }
.dl-request[data-phase="typing"] [data-live-type="reply"]::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
  margin-right: -3px; vertical-align: -.15em;   /* no room of its own, so the typed lines break where the finished ones do */ background: var(--brand); animation: dl-blink .8s steps(1) infinite; }
.dl-request[data-phase="lit"] .send-main { animation: dl-glow .8s ease-out; }
@keyframes dl-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* 3. Ask: the Ask box, the question typing, the arrow, the answer streaming in line by line. */
.dl-ask { display: flex; flex-direction: column; }
.dl-ask .dl-chat-bar { justify-content: center; min-height: 52px; }
.dl-ask .chat-title { display: inline-flex; align-items: center; gap: var(--s-8); margin: 0; font: 700 1.05rem/1.2 var(--ui); }
.dl-ask .chat-title .mark-inline { width: 22px; height: 22px; }
.dl-ask .dl-view { flex: 1; min-height: 0; }
.dl-ask .chat-thread { flex: none; overflow: visible; min-height: 100%; justify-content: flex-end; padding-top: var(--s-16); gap: var(--s-16); }
.dl-ask .chat-empty { display: none; }
.dl-ask .chat-thread .me, .dl-ask .chat-thread .bot { font-size: 1.1rem; }
.dl-ask .chat-thread .bot { min-width: 76%; }
.dl-ask .compose { padding: var(--s-12); }
.dl-ask .compose textarea { height: 46px; font-size: 16px; }
.dl-ask .send-btn { transition: opacity .2s ease, transform .1s ease; }
.dl-ask .dl-thinking { display: none; color: var(--muted); }
.dl-ask .bot .dl-owe { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-12); align-items: baseline; }
.dl-ask .bot .dl-owe b { font-weight: 700; }
.dl-ask .bot .dl-owe .dl-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.dl-ask .bot .dl-owe small { grid-column: 1 / -1; color: var(--muted); font-size: .84rem; }
.dl-ask .bot .dl-offer { margin-top: var(--s-4); }
.dl-ask .dl-wait { display: none; }
.dl-ask:is([data-phase="empty"], [data-phase="typing"], [data-phase="typed"]) .chat-empty { display: block; }
.dl-ask:is([data-phase="empty"], [data-phase="typing"], [data-phase="typed"]) :is(.me, .bot) { display: none; }
.dl-ask:is([data-phase="empty"], [data-phase="typing"]) .send-btn { opacity: .45; }
.dl-ask[data-phase="sent"] .bot { display: none; }
.dl-ask[data-phase="sent"] .me { animation: dl-rise .3s ease-out; }
.dl-ask[data-phase="thinking"] .bot { animation: dl-rise .3s ease-out; }
.dl-ask[data-phase="thinking"] .dl-thinking { display: inline; }
.dl-ask[data-phase="stream"] .bot [data-live-line] { animation: dl-rise .25s ease-out; }

/* 4. The calendar: the Upcoming list (Calendar v3: a day line over each day's events, each event a row that opens in place, its
   rig beside its name), a tap on the Carter block party and it opens under its row (its lines, the one row of pills, the folded
   conversation), the same tap folds it (P9). The markup is the folded list (the finished frame); the "open" phase opens it. */
.dl-calendar .dl-view { position: absolute; inset: 0; overflow: hidden; }
.dl-calendar .dl-list { display: grid; gap: var(--s-8); padding: var(--s-4) var(--s-12) var(--s-12); }
.dl-calendar .dl-list .divider { padding: var(--s-8) var(--s-4) 0; }
.dl-calendar .dl-ev { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ev); border-radius: 10px; overflow: hidden;
  transition: box-shadow .2s ease; }
.dl-calendar .dl-ev-h { display: flex; align-items: center; gap: var(--s-8); padding: var(--s-12) var(--s-8) var(--s-12) var(--s-12); }
.dl-calendar .dl-ev-main { flex: 1; min-width: 0; display: grid; gap: var(--s-4); }
.dl-calendar .dl-ev-main b { font: 600 1rem/1.3 var(--ui); overflow-wrap: anywhere; }
.dl-calendar .rig-tag { display: inline-block; white-space: nowrap; }   /* 8 after the title, as on the Calendar (styles.css) */
.dl-calendar .dl-ev-main > span { font: 500 .8rem/1.4 var(--ui); color: var(--muted); }
.dl-calendar .dl-ev-h > .rchev { width: 28px; height: 44px; margin: calc(-1 * var(--s-8)) 0; }
.dl-calendar .dl-ev .acc-in { display: grid; gap: var(--s-12); }
.dl-calendar[data-phase="open"] [data-live-row] { box-shadow: var(--shadow); }
.dl-calendar[data-phase="open"] [data-live-row] > .acc-body { grid-template-rows: 1fr; }
.dl-calendar[data-phase="open"] [data-live-row] > .acc-body > .acc-in { visibility: visible; transition-delay: 0s; border-top: 1px solid var(--line);
  padding: var(--s-12); }
.dl-calendar[data-phase="open"] [data-live-row] > .acc-h .rchev svg { transform: rotate(180deg); }
.dl-calendar:not([data-phase="open"]) [data-live-anchor] { display: none; }
.dl-calendar .dl-anchor { display: block; height: 0; }
.dl-calendar .dl-ev-det { display: grid; gap: var(--s-4); }
.dl-calendar .dl-ev-line { margin: 0; display: flex; align-items: center; gap: var(--s-8); min-height: 22px; font: 500 .9rem/1.35 var(--ui); }
.dl-calendar .dl-ev-line .ev-pin { margin-block: -11px; color: var(--brand-soft); }
.dl-calendar .dl-ev-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-8); }
.dl-calendar .dl-ev-acts .btn { min-height: 44px; padding: 0 var(--s-4); font-size: .82rem; color: var(--ink); }
.dl-calendar .dl-ev-fold { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-top: calc(-1 * var(--s-4));
  padding: 0; border: 0; background: none; color: var(--ink); font: 600 .9rem/1 var(--ui); text-align: left; }
.dl-calendar .dl-ev-fold .rchev { margin-left: 0; }

@media (prefers-reduced-motion: reduce) {
  .deck-live, .deck-live * { transition: none !important; animation: none !important; }
}

/* Design notes 2026-10-05-build19, item 12 (c): the Ask card ends with the app's own bottom bar (nav.js barHtml), sitting in the card
   instead of on the screen's bottom edge, at full strength (the app's bar is dim until it loads), Ask marked, its circle the loop's
   first tap. (Item 12 (b)'s title over the deck went in build20, item 1: the welcome card owns it.) */
.dl-ask .compose { padding-bottom: var(--s-40); }   /* room for the bar's raised circle, as in the app */
.dl-ask .dl-nav { position: relative; z-index: 1; left: auto; right: auto; bottom: auto; max-width: none; margin: 0; padding-bottom: 0; flex: none; }
.dl-ask .dl-nav button:disabled { opacity: 1; }
.dl-ask .dl-nav .ask-slot.dl-pressed .ask-circle { transform: scale(.93); transition: transform .1s ease; }
/* On a 375 wide phone the stage gives the cards a little more of its width. */
@media (max-width: 380px) {
  .deck-card.deck-live-card { padding-inline: var(--s-4); }
  .dl-request .dl-view { padding: var(--s-8) var(--s-4); }
}

/* Card 3's last step (Build 35c item 2): a tap on the first name and her invoice slides up over the conversation as the decided
   Invoices page draws it (design round 2026-10-09): her Past due row with Remind, opened in place, Mark paid and Share, then the
   paper (invoice.js). The finished frame (reduce motion) is the open invoice. */
.dl-ask .dl-owe [data-live-inv] { color: var(--brand-soft); }
.dl-ask .dl-inv-scrim { position: absolute; inset: 0; z-index: 2; background: rgba(20, 16, 12, .32); transition: opacity .3s ease; }
.dl-ask .dl-inv { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; top: 44px; background: var(--bg); border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .14); transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.dl-ask .dl-inv .dl-grab { position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
.dl-ask .dl-inv > .dl-view { position: absolute; inset: 18px var(--s-12) 0; }
.dl-ask .dl-inv .urow-detail { overflow-wrap: anywhere; }
.dl-ask .dl-inv .row-btn { min-height: 40px; }
.dl-ask .dl-inv .inv-paper { gap: var(--s-8); padding: var(--s-12) var(--s-16); margin: 0; }
.dl-ask .dl-inv .ip-meta { padding-top: var(--s-8); }
/* What the deck leaves out of the paper so it fits whole at 375 by 667: the right-hand column (the title and the due date a second
   time) and the item table (deck.js leaves its one line out: the amount over it and the Total under it say the same figure). */
.dl-ask .dl-inv .ip-meta > .r, .dl-ask .dl-inv .ip-lines { display: none; }
.dl-ask .dl-inv .ip-totals .ip-total td { padding-top: var(--s-8); }
.dl-ask:not([data-phase="invoice"]):is([data-phase]) .dl-inv { transform: translateY(105%); }
.dl-ask:not([data-phase="invoice"]):is([data-phase]) .dl-inv-scrim { opacity: 0; }
@media (max-height: 720px) {   /* a 375 by 667 phone: the paper's Bill to goes too (the row over it names her), so the Total shows */
  .dl-ask .dl-inv { top: 10px; }
  .dl-ask .dl-inv .ip-meta { display: none; }
}

/* Everything included (p7-features, the owner's option C, 2026-10-10). The welcome card and the name card each end in one muted
   link row (rule 7), 44 tall (rule 21), set like the founding sheet's quiet rows: "See everything included ›", and on the welcome
   card "· Skip the tour" beside it. The rows are quiet (P2: Let's go stays the one filled button). */
.deck-more { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; width: 100%; max-width: 320px; }
.deck-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--s-8); border: 0; background: none;
  color: var(--muted); font: 500 .86rem/1.3 var(--ui); cursor: pointer; }
.deck-link-chev { font-size: 1.1em; }
.deck-sep { color: var(--muted); opacity: .7; }
.deck-names .deck-more { justify-self: center; }
/* The link opens the founding sheet inside the welcome, over the card (the card keeps its place, unseen, and the deck its card):
   the whole screen on a phone (as the Menu's), a phone-wide column on a computer. Back sits at the top row's left where the X sits
   on the Menu's (rule 3), its 44 row shared with the card's pill. */
.welcome-card.deck-behind { visibility: hidden; }
.welcome .sheet.deck-sheet { inset: 0; width: auto; max-width: 560px; max-height: none; margin: 0 auto; transform: none; z-index: 1; }
@media (min-width: 900px) {
  .welcome .sheet.deck-sheet { border-radius: 0; border-inline: 1px solid var(--line); }
}
.fs-top.fs-top-back { justify-content: flex-start; }
.fs-top .back { pointer-events: auto; }
