/* intake.vanpraag.ai — the house style, narrowed to one column and a thumb.
 *
 * Same tokens as vanpraag.ai: cream ground, one gold accent, warm ink. The
 * display face is Fraunces (as on the marketing site) and everything you
 * actually operate is Assistant, so the question reads like a letter and the
 * buttons read like software.
 *
 * Two rules that shaped the rest:
 *   1. A tap target is never under 56px tall. This is used one-handed, outdoors.
 *   2. The chosen answer must be obvious at arm's length in daylight — hence a
 *      gold fill and a solid mark, not a tinted border.
 */

@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}
@font-face {
  font-family: "Assistant";
  src: url("fonts/assistant-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  font-weight: 300 900; font-display: swap;
}

:root {
  --cream:      #faf6ec;
  --panel:      #f5edd9;
  --card:       #fffdf7;
  --ink:        #211c13;
  --ink-soft:   #6a6250;
  --gold:       #b8891f;
  --gold-deep:  #8a6a2f;
  --gold-bright:#d6a85e;
  /* Measured, not eyeballed: gold #b8891f on cream is 2.93:1 and fails AA even
     for large text. Same hue and saturation, lightness .42 -> .32 gives 4.74:1.
     Gold is for rules, dots and borders; gold-text is for anything read. */
  --gold-text:  #8c6818;
  --line:       rgba(184,137,31,.30);
  --line-soft:  rgba(184,137,31,.16);
  --brick:      #a6603f;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --col: 34rem;
  --shadow: 0 1px 2px rgba(33,28,19,.04), 0 18px 40px -28px rgba(33,28,19,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* The progress rail sits above everything and is the only chrome on the page. */
.rail {
  position: fixed; inset: 0 0 auto 0; height: 3px;
  background: var(--line-soft); z-index: 40;
}
.rail i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  transition: width .35s cubic-bezier(.2,.7,.3,1);
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem
           max(1.25rem, env(safe-area-inset-bottom));
}
.pad { width: 100%; max-width: var(--col); margin: 0 auto; }

/* ---------------------------------------------------------------- screens */

.screen {
  width: 100%; max-width: var(--col); margin: 0 auto;
  display: flex; flex-direction: column; flex: 1 1 auto;
}
.screen > .body { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.screen.top > .body { justify-content: flex-start; }

@media (prefers-reduced-motion: no-preference) {
  .enter { animation: rise .34s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

/* ------------------------------------------------------------------ marks */

.bh {
  font-family: var(--sans); font-weight: 400;
  font-size: .8rem; color: var(--ink-soft);
  text-align: center; letter-spacing: .04em;
  margin: 0 0 1.5rem;
}
.mark { display: block; width: 62px; height: auto; margin: 0 auto 1.25rem; }
.mark.big { width: 96px; }

.eyebrow {
  font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-text); margin: 0 0 .6rem;
}
.eyebrow .of { color: var(--ink-soft); letter-spacing: .1em; }

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  line-height: 1.16;
  letter-spacing: -.015em;
  margin: 0 0 .75rem;
  text-wrap: balance;
}
h1 .quiet { color: var(--ink-soft); }

h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.25rem; line-height: 1.25; margin: 0 0 .4rem;
}

.rule {
  width: 68px; height: 3px; border-radius: 2px; border: 0; margin: 0 0 1.35rem;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
}
.rule.center { margin-left: auto; margin-right: auto; }

.help { color: var(--ink-soft); font-weight: 400; margin: 0 0 1.4rem; font-size: 1rem; }
.help strong { font-weight: 800; color: var(--ink); }
.center { text-align: center; }

/* ----------------------------------------------------------------- options */

.options { display: flex; flex-direction: column; gap: .6rem; margin: 0 0 1rem; }

.opt {
  display: flex; align-items: center; gap: .85rem;
  width: 100%; min-height: 58px; padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit; color: inherit; text-align: left;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .12s, box-shadow .16s;
}
.opt:hover { border-color: var(--gold-bright); }
.opt:active { transform: scale(.988); }
.opt:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.opt .box {
  flex: 0 0 auto; width: 24px; height: 24px;
  border: 1.5px solid var(--line); border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color .16s, background .16s;
}
.opt.square .box { border-radius: 7px; }
.opt .box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: .18s; }

.opt .txt { display: flex; flex-direction: column; gap: .1rem; }
.opt .lab { font-weight: 600; }
.opt .sub { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }
.opt .key { display: none; }
/* Only where there is a keyboard to press: shown from 40rem up, on a device that
   can hover. On a phone the digit is noise beside every option. */
@media (hover: hover) and (min-width: 40rem) {
  .opt .key {
    display: block; margin-left: auto; font-size: .72rem; font-weight: 600;
    color: var(--ink-soft); opacity: .55; padding-left: .5rem;
  }
}

.opt.on {
  background: linear-gradient(180deg, #fdf4e2, #faeed6);
  border-color: var(--gold);
  box-shadow: 0 1px 0 rgba(184,137,31,.18), 0 10px 22px -18px rgba(138,106,47,.55);
}
.opt.on .box { background: var(--gold); border-color: var(--gold); }
.opt.on .box svg { opacity: 1; transform: none; }
.opt.on .lab { font-weight: 800; }

/* The inline "and which one?" field that a few options open up. */
.other {
  margin: -.2rem 0 .6rem; padding: 0 0 0 3.35rem;
  display: none;
}
.other.show { display: block; }

/* -------------------------------------------------------------- text input */

input[type="text"], textarea {
  width: 100%; padding: .85rem 1rem;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 600;
}
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,31,.14);
}
textarea { min-height: 8rem; resize: vertical; font-weight: 400; line-height: 1.55; }
::placeholder { color: #a49a83; font-weight: 400; }

.code-field {
  font-family: var(--sans); font-size: 1.5rem; font-weight: 800;
  letter-spacing: .18em; text-align: center; text-transform: uppercase;
  padding: 1rem .75rem;
}

/* ---------------------------------------------------------------- buttons */

.actions {
  display: flex; align-items: center; gap: .75rem;
  padding-top: 1.1rem; margin-top: auto;
}
.actions .spacer { flex: 1 1 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 54px; padding: 0 1.5rem;
  border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 800; cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s, color .16s;
}
.btn:active { transform: scale(.985); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn.gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #fffdf7;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 14px 26px -18px rgba(138,106,47,.9);
}
.btn.gold:hover { background: linear-gradient(180deg, #dcb26c, #c1901f); }
.btn.gold[disabled] { opacity: .45; box-shadow: none; cursor: default; }

.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--gold-bright); }

.btn.plain {
  background: none; border: 0; color: var(--ink-soft); padding: 0 .25rem;
  min-height: 44px; font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--line); text-underline-offset: 4px;
}
.btn.plain:hover { color: var(--gold-deep); }

.btn.wide { width: 100%; }

.btn.wa {
  background: var(--card); border-color: var(--line); color: var(--ink);
}
.btn.wa:hover { border-color: var(--gold-bright); }
.btn.wa svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 1rem;
}
.panel.quiet { background: var(--card); }
.panel h3 {
  font-family: var(--sans); font-size: .95rem; font-weight: 800;
  margin: 0 0 .25rem;
}
.panel p { margin: 0; font-size: .92rem; font-weight: 400; color: var(--ink-soft); }

/* Not scoped to .panel -- also used bare inside .doc-ask, which isn't one. */
.how {
  margin-top: .5rem; font-size: .85rem; font-weight: 600; color: var(--gold-deep);
  background: #fffdf7; border: 1px dashed var(--line); border-radius: 10px;
  padding: .5rem .65rem;
}

.drop {
  border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--card); padding: 1.35rem 1rem; text-align: center;
  margin: 0 0 .85rem; cursor: pointer;
  transition: border-color .16s, background .16s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: #fdf6e6; }
.drop .lab { font-weight: 800; }
.drop .sub { font-size: .85rem; font-weight: 400; color: var(--ink-soft); }

/* -------------------------------------------------------------- step heads
   The whole Files tab is three of these and nothing competing with them. */
.step-head { display: flex; align-items: center; gap: .6rem; margin: 1.7rem 0 .75rem; }
.step-head:first-child { margin-top: 0; }
.step-num {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #fffdf7; font-weight: 800; font-size: .88rem;
}
.step-head span:last-child { font-size: 1.05rem; font-weight: 800; }

.product-name { margin: 1.1rem 0 .4rem; font-size: 1rem; font-weight: 800; }
.product-name:first-child { margin-top: 0; }
.doc-ask { padding: .55rem 0; }
.doc-ask + .doc-ask { border-top: 1px solid var(--line-soft); }
.doc-ask h4 { margin: 0 0 .3rem; font-size: .92rem; font-weight: 700; }
.doc-ask .how { margin-top: 0; }

.filelist { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.filelist li {
  display: flex; align-items: center; gap: .6rem;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: .55rem .75rem; font-size: .9rem;
}
.filelist .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-bright); flex: 0 0 auto; }
.filelist .sz { margin-left: auto; color: var(--ink-soft); font-weight: 400; font-size: .8rem; }

/* -------------------------------------------------------- employee roster
   One row per employee, structured -- the alternative to us reading a
   spreadsheet by hand. See qqRosterUI() in app.js. */
.roster { display: flex; flex-direction: column; gap: .6rem; }
.roster-row {
  display: grid; gap: .5rem; align-items: center;
  grid-template-columns: 1.4fr .9fr .8fr auto;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: .7rem .8rem;
}
.roster-row input[type="text"], .roster-row input[type="number"], .roster-row select {
  padding: .55rem .7rem; font-size: .9rem; min-height: auto;
}
.roster-row select {
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; font: inherit; font-weight: 600;
}
.roster-row .r-hourly-only {
  grid-column: 1 / -2; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}
.roster-row .r-hourly-only select { font-size: .85rem; padding: .4rem .55rem; }
.roster-row .r-check {
  grid-column: 1 / -2; display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer;
}
.roster-row .r-check input { width: auto; }
.roster-row .r-remove {
  grid-row: 1; grid-column: 4;
  background: none; border: 0; color: var(--ink-soft); font-size: 1.3rem;
  cursor: pointer; line-height: 1; padding: 0 .3rem; align-self: start;
}
.roster-row .r-remove:hover { color: #b23b3b; }
@media (max-width: 640px) {
  .roster-row { grid-template-columns: 1fr 1fr; }
  .roster-row .r-hourly-only, .roster-row .r-check { grid-column: 1 / -1; }
  .roster-row .r-remove { grid-column: 2; }
}

/* ------------------------------------------------------------ build panel
   Payroll formulas + yahrzeit preview, generated automatically -- see
   buildOutput() server-side and paintBuild() in app.js. */
.build-ready { border-color: var(--gold); background: #fffdf2; }
.build-summary { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.build-summary li { margin: .2rem 0; }
.csv-block { margin-top: .8rem; }
.csv-block h4 { margin: 0 0 .3rem; font-size: .85rem; font-weight: 800; }
.csv-block textarea {
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .75rem;
  font-weight: 400; background: #fffdf7; white-space: pre;
}
.csv-actions { display: flex; gap: .5rem; margin-top: .3rem; }
.build-ready code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: .82rem;
  background: #fffdf7; border: 1px solid var(--line-soft); border-radius: 6px;
  padding: .1rem .35rem;
}

/* --------------------------------------------------------------- live sync
   "A few clicks and it runs itself" -- see liveSyncBlock() in app.js. */
.live-sync { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.live-sync h4 { margin: 0 0 .4rem; font-size: .88rem; font-weight: 800; }
.sync-steps { list-style: none; margin: 0 0 .3rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.sync-steps li {
  font-size: .85rem; color: var(--ink-soft); padding-left: 1.4rem; position: relative;
}
.sync-steps li::before {
  content: "○"; position: absolute; left: 0; color: var(--line);
}
.sync-steps li.done { color: var(--ink); font-weight: 600; }
.sync-steps li.done::before { content: "●"; color: var(--gold-bright); }
.sync-flags { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.sync-flags li {
  font-size: .82rem; background: #fffdf7; border: 1px solid var(--line-soft);
  border-radius: 8px; padding: .4rem .6rem;
}
.file-remove {
  background: transparent; border: 0; cursor: pointer; flex: 0 0 auto;
  font-size: 1.2rem; line-height: 1; padding: 0 .15rem; color: var(--ink-soft);
}
.file-remove:hover, .file-remove:focus-visible { color: var(--ink); }
.file-remove:disabled { opacity: .4; cursor: default; }

/* ------------------------------------------------------------------ portal
 *
 * Rooms 2 and 3: the client's documents and his invoices. Everything above this
 * line dresses a questionnaire — one question, one thumb, one column. This part
 * dresses a proposal and a bill, which is a different job: it is read, not
 * filled in, and it carries our name next to a number.
 *
 * Hence the four departures from the form, each deliberate:
 *   · a letterhead (mark left, ב״ה right, hairline under) instead of a centred
 *     logo over left-aligned text;
 *   · a wider column — 34rem is right for one question and cramped for a
 *     document with a table in it;
 *   · the two rooms on tabs down the left, which become a two-up row above the
 *     content below 40rem, where a 13rem rail would leave nothing for the page;
 *   · panels that read as documents: a panel-tinted header strip, hairline
 *     borders, the house radius, and the paper flush inside.
 */

.screen.portal { max-width: 58rem; }

.letterhead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: .9rem; margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.letterhead .mark { width: 58px; margin: 0; }
.letterhead .bh { margin: 0; }

.portal .lead { max-width: 32rem; margin-bottom: 1.8rem; }

.portal-grid { display: grid; gap: 1.35rem; align-items: start; }
.panes { min-width: 0; }
.tabcol { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }

/* ------------------------------------------------------------------- tabs */

/* One column, stacked -- works the same at two tabs or three, and this is a
   narrow sidebar column, not a row wide enough for tabs side by side. */
.tabs { display: grid; grid-template-columns: 1fr; gap: .5rem; }

.tab {
  position: relative;
  display: flex; flex-direction: column; gap: .05rem; align-items: flex-start;
  min-height: 58px; padding: .65rem .85rem .75rem;
  background: transparent; border: 1px solid transparent; border-radius: 13px;
  font: inherit; text-align: left; cursor: pointer;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.tab:hover { background: var(--panel); }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tab.on {
  background: var(--card); border-color: var(--line-soft);
  box-shadow: 0 1px 2px rgba(33,28,19,.04), 0 12px 26px -22px rgba(33,28,19,.5);
}
/* The gold bar is the only thing that says "you are here": under the tab on a
   phone, down its left edge on a wide screen. */
.tab::after {
  content: ""; position: absolute; opacity: 0;
  left: .85rem; right: .85rem; bottom: 0; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold));
  transition: opacity .16s;
}
.tab.on::after { opacity: 1; }

.tab-label { font-weight: 800; color: var(--ink-soft); }
.tab.on .tab-label { color: var(--ink); }
.tab-meta { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }

/* -------------------------------------------------------------- upsell shelf
 *
 * Same column as the real tabs, deliberately duller: dashed border (the
 * "empty" state's own language, reused) instead of the tab's solid one, and no
 * gold "you are here" bar, because there is no pane to be here in. */

.upsell-label {
  font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-soft); opacity: .8; margin: .35rem 0 .5rem;
  grid-column: 1 / -1;
}
.upsell { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.upsell-item {
  display: flex; gap: .55rem; align-items: flex-start; text-align: left;
  min-height: 58px; padding: .6rem .75rem;
  background: transparent; border: 1px dashed var(--line); border-radius: 13px;
  font: inherit; cursor: pointer; color: inherit;
  transition: background .16s, border-color .16s;
}
.upsell-item:hover { background: var(--panel); border-color: var(--gold-bright); }
.upsell-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.upsell-lock {
  flex: none; width: 26px; height: 26px; margin-top: .05rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--panel); color: var(--ink-soft); opacity: .85;
}
.upsell-lock svg { width: 14px; height: 14px; }
.upsell-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.upsell-name { font-weight: 800; color: var(--ink-soft); font-size: .92rem; }
.upsell-line { font-size: .76rem; font-weight: 600; color: var(--ink-soft); opacity: .75; }

/* -------------------------------------------------------------- documents
 *
 * A document is a row in a statement, the same card the invoices use --
 * one visual language for "things we prepared for you", not a colourful
 * app-card per file. No iframe: the document is a real page, opened as one. */

.doclist .doc-main { flex: 1 1 auto; min-width: 0; }
.doc-title {
  margin: 0; font-family: var(--display); font-weight: 600;
  font-size: 1.08rem; line-height: 1.3;
}
.doc-title a { color: inherit; text-decoration: none; }
.doc-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-meta { margin: .4rem 0 0; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }

.doc-open {
  flex: 0 0 auto; margin-top: .1rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .85rem; font-weight: 800; color: var(--gold-text);
  text-decoration: none; white-space: nowrap;
}
.doc-open:hover { text-decoration: underline; text-underline-offset: 4px; }
.doc-open svg { width: 15px; height: 15px; }

/* --------------------------------------------------------- the one decision
 *
 * The order itself is placed inside the proposal, under its own total. This card
 * is the shell's half of that: where the decision is, whether it has been made,
 * and the way out of it. Tinted, not white, so it reads as an instruction beside
 * the statement above it rather than a second document. */

.decide {
  margin-top: 1.1rem;
  background: linear-gradient(180deg, #fdf7e9, var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem 1.25rem 1.3rem;
}
.decide h3 {
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
  line-height: 1.25; margin: 0 0 .35rem;
}
.decide p {
  margin: 0 0 1.05rem; max-width: 30rem;
  font-weight: 400; color: var(--ink-soft);
}
.decide .btn { text-decoration: none; }
.decide .btn + .btn { margin-top: .6rem; }

/* The empty room still gets a way to ask; it just has no panel to sit in. */
.empty + .btn { margin-top: 1rem; }

/* ---------------------------------------------------------------- the bill */

.statement {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 16px; padding: .25rem 1.15rem 1.1rem;
  box-shadow: var(--shadow);
}
.bill { list-style: none; margin: 0; padding: 0; }
.bill li {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line-soft);
}
.bill li:last-child { border-bottom: 0; }
.bill-main { flex: 1 1 auto; min-width: 0; }
.bill-desc { margin: 0; font-weight: 600; }
.bill-meta { margin: .4rem 0 0; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.bill-date { font-size: .8rem; font-weight: 400; color: var(--ink-soft); }

.pill {
  font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .24rem .55rem; border-radius: 999px;
  color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-soft);
}
.pill.open { color: var(--gold-text); background: #fdf4e2; border-color: var(--line); }

/* Money is set in the sans, never the display face: Fraunces' figures are
   old-style and a proportional 7 next to a 5 reads as a typo on an invoice. */
.bill-amt {
  flex: 0 0 auto; margin: 0; font-family: var(--sans); font-weight: 800;
  font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bill-amt.big { font-size: 1.45rem; }
.bill-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-top: .25rem; padding-top: .9rem; border-top: 2px solid var(--line);
  font-weight: 800;
}
.bill-ask { margin-top: 1rem; }

/* ------------------------------------------------------------ empty rooms */

.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: 16px;
  padding: 2.25rem 1.25rem; text-align: center;
}
.empty h2 { margin: 0 0 .3rem; }
.empty p { margin: 0 auto; max-width: 26rem; font-weight: 400; color: var(--ink-soft); }

/* ------------------------------------------------------------------ review */

.review { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.review li {
  border-bottom: 1px solid var(--line-soft);
  padding: .85rem 0; display: flex; gap: 1rem; align-items: flex-start;
}
.review .q { font-size: .82rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 .15rem; }
.review .a { font-weight: 800; margin: 0; }
.review .a.empty { color: var(--brick); font-weight: 600; }
.review .edit { flex: 0 0 auto; }

/* ------------------------------------------------------------------ status */

.status {
  position: fixed; left: 50%; transform: translateX(-50%);
  /* Clear of the action row: a toast that lands between Previous and Next reads
     as a third button. */
  bottom: calc(max(.9rem, env(safe-area-inset-bottom)) + 4.6rem);
  background: rgba(33,28,19,.92); color: #faf6ec;
  font-size: .8rem; font-weight: 600; padding: .45rem .9rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
}
.status.show { opacity: 1; }
.status.bad { background: var(--brick); }

.err { color: var(--brick); font-weight: 600; margin: .6rem 0 0; min-height: 1.4rem; }

.foot {
  margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line-soft);
  font-size: .78rem; font-weight: 400; color: var(--ink-soft); text-align: center;
}

.tick {
  width: 74px; height: 74px; margin: 0 auto 1.25rem;
  border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 18px 34px -22px rgba(138,106,47,.9);
}
.tick svg { width: 34px; height: 34px; }

@media (min-width: 40rem) {
  html, body { font-size: 18px; }
  main { padding: 2.5rem 1.5rem; }
  /* The mark carries the letterhead on a wide screen; at 62px it read as an afterthought. */
  .mark { width: 84px; }
  .mark.big { width: 118px; }
  .letterhead .mark { width: 72px; }

  /* Leib's brief: billing as a tab on the left. Above this width there is room
     for the rail beside the document; below it there is not, and the same tabs
     sit as a row above the content instead. */
  .portal-grid { grid-template-columns: 13.5rem 1fr; gap: 2.25rem; }
  .tabcol { position: sticky; top: 1.5rem; }
  .tabs { grid-template-columns: 1fr; gap: .3rem; }
  .tab { padding-left: 1.05rem; border-radius: 0 13px 13px 0; }
  .upsell { grid-template-columns: 1fr; }
  .upsell-item { border-radius: 0 13px 13px 0; }
  .tab::after {
    left: 0; right: auto; top: .5rem; bottom: .5rem; width: 3px; height: auto;
    background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  }

  /* A full-width button across a 58rem column reads as a banner, not something
     to press. On a phone the same button should still span the screen. */
  .decide .btn, .empty + .btn { max-width: 23rem; }
}
