/* SendInvoiceFast — "Live paper". Calm stone neutrals, one deep green, and the
   invoice itself as the thing on screen. Geist when installed, otherwise the
   system UI face; a monospaced face for numbers and invoice numbers. */
:root {
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --soft: #F5F5F4;
  --skeleton: #EEEDEB;
  --ink: #0C0A09;
  --ink-2: #44403C;
  --muted: #57534E;
  --faint: #78716C;
  --line: #E7E5E4;
  --line-2: #D6D3D1;
  --hairline: #F0EFEE;
  --brand: #0F3D2E;
  --brand-hover: #0A2E22;
  --ok: #059669;
  --ok-text: #047857;
  --ok-soft: #ECFDF5;
  --warn: #D97706;
  --warn-text: #B45309;
  --warn-soft: #FFFBEB;
  --warn-line: #FDE68A;
  --bad: #E11D48;
  --bad-text: #BE123C;
  --bad-soft: #FFF1F2;
  --marker: #FEF3C7;
  --marker-strong: #FDE68A;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  /* The invoice paper keeps the PDF's own faces. */
  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(12, 10, 9, .06);
  --shadow: 0 1px 2px rgba(12, 10, 9, .04), 0 24px 48px -24px rgba(12, 10, 9, .18);
  --shadow-pop: 0 1px 2px rgba(12, 10, 9, .06), 0 28px 56px -16px rgba(12, 10, 9, .28);
  --shadow-paper: 0 0 0 1px rgba(12, 10, 9, .06), 0 2px 4px rgba(12, 10, 9, .04), 0 28px 56px -18px rgba(12, 10, 9, .22);
  --ring: 0 1px 2px rgba(12, 10, 9, .08), 0 0 0 1px var(--line);
  --rail: 72px;
  --desk-dots: radial-gradient(var(--line-2) 1px, transparent 1px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid #10B981; outline-offset: 2px; }
::placeholder { color: var(--faint); opacity: 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--brand); color: #FFF; z-index: 50; }
.skip-link:focus { top: 12px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { margin: 0; font-size: 11.5px; line-height: 16px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.rail, .button, .status-seg, .chip, .tab { -webkit-user-select: none; user-select: none; }

/* Brand */
.logo { display: block; flex-shrink: 0; }
.env-badge { padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* The shell: everyone gets the icon rail, which is a bottom tab bar on
   phones. */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--rail); flex-shrink: 0; padding: 16px 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 5; }
.rail-brand { margin-bottom: 14px; display: block; }
.rail-item { position: relative; width: 44px; height: 44px; border-radius: var(--radius); color: var(--muted); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.rail-item:hover { background: var(--soft); color: var(--ink); }
.rail-item[aria-current="page"] { background: var(--soft); color: var(--ink); }
.rail-new, .rail-new:hover, .rail-new[aria-current="page"] { background: var(--brand); color: #FFF; }
.rail-new:hover { background: var(--brand-hover); }
.rail-sep { width: 24px; height: 1px; margin: 6px 0; background: var(--line); }
.rail-fill { flex-grow: 1; }
.rail-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--ink); font-size: 14px; font-weight: 650; }
.rail-avatar[aria-current="page"] { box-shadow: 0 0 0 2px var(--brand); }
/* The labels are for screen readers here and show under the icons on phones. */
.rail-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.rail-item::after { content: attr(data-tip); position: absolute; left: calc(100% + 10px); top: 50%; transform: translate(-4px, -50%); padding: 5px 9px; border-radius: 8px; background: var(--ink); color: #FFF; font-size: 12.5px; font-weight: 550; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; }
.rail-item:hover::after, .rail-item:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.rail .env-badge { font-size: 9.5px; padding: 1px 6px; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius); font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .12s, border-color .12s, box-shadow .12s; }
.button-primary { background: var(--brand); color: #FFF; }
.button-primary:hover { background: var(--brand-hover); color: #FFF; }
.button-secondary { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.button-secondary:hover { border-color: var(--ink-2); color: var(--ink); }
.button-quiet { background: transparent; color: var(--brand); padding: 0 10px; }
.button-quiet:hover { background: var(--soft); color: var(--ink); }
.button-large { min-height: 46px; padding: 0 18px; font-size: 15px; }
.button-small { min-height: 32px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 13px; }
.button-block { width: 100%; }
.button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.button svg { flex-shrink: 0; }
.icon-button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-button:hover { border-color: var(--ink-2); }
.link-button { padding: 0; border: 0; background: none; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pill { margin: 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink-2); }
.pill svg { color: var(--ok); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }

/* Status: green is complete, yellow is started but missing something, red is
   nothing yet. The marks differ in shape too. */
.dot { display: block; flex-shrink: 0; }
.status-bar { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--soft); border: 1px solid var(--line); border-radius: 13px; max-width: 100%; }
.status-seg { position: relative; height: 34px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: transparent; display: flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 20px; font-weight: 550; color: var(--ink); white-space: nowrap; min-width: 0; }
.status-seg-text { overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.status-seg-items, .status-seg-template, .status-seg.is-label { flex-shrink: 0; }
button.status-seg { cursor: pointer; }
button.status-seg:hover { background: rgba(255, 255, 255, .7); }
button.status-seg[aria-expanded="true"] { background: var(--surface); box-shadow: var(--ring); }
.picker { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; width: 340px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; animation: pop .16s ease-out; }
.picker-right { left: auto; right: 0; }
.picker-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.picker-section { margin: 0; padding: 8px 10px 4px; font-size: 11px; line-height: 14px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.picker-option { width: 100%; min-height: 52px; padding: 6px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.picker-option:hover, .picker-option:focus-visible, .picker-option[aria-selected="true"] { background: var(--soft); }
.picker-option-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-option-name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-option-sub { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-foot { margin: 0; padding: 12px 14px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.picker-empty { margin: 0; padding: 14px; font-size: 13.5px; color: var(--muted); }
.avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.avatar-sm { width: 26px; height: 26px; font-size: 10.5px; }
.tint-0 { background: #ECFDF5; color: #065F46; }
.tint-1 { background: #EEF2FF; color: #3730A3; }
.tint-2 { background: #FFF7ED; color: #9A3412; }
.tint-3 { background: #F0F9FF; color: #075985; }
.tint-4 { background: #FDF2F8; color: #9D174D; }
.tint-5 { background: #F5F3FF; color: #5B21B6; }

/* Create: the chat on the left, the invoice on its desk on the right, and
   between them the invoice's cards, one under another. A guest first sees
   the promise above the chat; it gives way once they write. */
.create { height: 100vh; height: 100dvh; min-height: 0; display: grid; grid-template-columns: minmax(380px, 480px) minmax(280px, 340px) minmax(0, 1fr); grid-template-areas: "left cards desk"; }
.create-left { grid-area: left; min-height: 0; display: flex; flex-direction: column; gap: 20px; padding: 0 0 0 0; }
.create-guest .create-left { padding: 20px 28px 16px 40px; }
.intro { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.intro-title { margin: 0; font-size: 34px; line-height: 40px; font-weight: 620; letter-spacing: -.045em; text-wrap: balance; }
.intro-lead { margin: 0; max-width: 480px; font-size: 16.5px; line-height: 26px; color: var(--muted); }
.create.is-active .intro { display: none; }
.conversation { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.create-guest .conversation { border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); overflow: hidden; }
.create-account .conversation { border-right: 1px solid var(--line); }
.conversation-head { flex-shrink: 0; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--hairline); position: relative; z-index: 4; }
.conversation-head .status-bar { flex: 0 1 auto; }
.chat-log { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 22px 12px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg .logo { margin-top: 1px; }
.msg-text { margin: 0; max-width: 420px; padding-top: 2px; font-size: 15px; line-height: 23px; white-space: pre-line; overflow-wrap: anywhere; }
.msg-body { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.msg-user { justify-content: flex-end; }
.msg-user .msg-text { max-width: 360px; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--soft); }
.msg-error .msg-text { color: var(--bad-text); }
.msg-picked { flex-direction: column; align-items: flex-end; gap: 6px; }
.msg-picked .msg-text { display: inline-flex; align-items: center; gap: 8px; max-width: 360px; padding: 6px 14px 6px 6px; border-radius: 18px 18px 6px 18px; background: var(--soft); }
.msg-caption { margin: 0; display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 16px; color: var(--faint); }
.system-note { margin: 0 0 0 36px; display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-text); font-size: 13px; font-weight: 600; }
.thinking { font-size: 14.5px; line-height: 22px; font-weight: 500; }
.thinking-line { display: block; font-size: 13px; line-height: 20px; font-weight: 400; color: var(--faint); }
.card-in-chat { margin-left: 36px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; max-width: 440px; }
.card-head { display: flex; flex-direction: column; gap: 2px; }
.card-title { margin: 0; font-size: 11.5px; line-height: 16px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.card-lead { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.card-rows { margin: 0; display: flex; flex-direction: column; }
.card-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 13.5px; line-height: 19px; }
.card-rows dt { color: var(--faint); flex-shrink: 0; }
.card-rows dd { margin: 0; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.card-rows .card-empty { color: var(--faint); font-weight: 400; font-style: italic; }
.card-mark { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 18px; font-weight: 600; }
.card-mark-added { background: var(--ok-soft); color: var(--ok-text); }
.card-mark-changed { background: var(--warn-soft); color: var(--warn-text); }
.card-mark-removed { background: var(--bad-soft); color: var(--bad-text); }
.card-rows .card-was { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.card-rows .card-removed { color: var(--faint); font-weight: 400; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.card-rows .card-needed { color: var(--warn-text); font-weight: 550; }
.card-mark-new { background: var(--ok-soft); color: var(--ok-text); }
.card-mark-saved { background: var(--soft); color: var(--muted); }
.debug-turn { margin: 0 0 0 36px; font-size: 12px; color: var(--muted); }
.debug-turn summary { cursor: pointer; color: var(--faint); }
.debug-call { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.debug-call details { margin-top: 6px; }
.debug-turn pre { margin: 2px 0 6px; padding: 6px 8px; border-radius: 6px; background: var(--soft); color: var(--ink-2); font: 11px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.debug-head, .debug-label { margin: 6px 0 0; font-weight: 600; color: var(--ink-2); }
.debug-error { margin: 4px 0 0; color: var(--bad-text); }
.composer-area { flex-shrink: 0; padding: 10px 16px 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips:empty { display: none; }
.chip { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; line-height: 18px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--line-2); background: var(--soft); }
/* An example is a sentence, so it wraps on a narrow screen. */
.chip-example { height: auto; min-height: 30px; padding: 5px 12px; white-space: normal; text-align: left; }
.composer { padding: 10px 10px 10px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(12, 10, 9, .04); display: flex; flex-direction: column; gap: 6px; }
.composer:focus-within { border-color: var(--ink-2); }
.composer textarea { width: 100%; height: 46px; padding: 4px 0 0; border: 0; outline: none; resize: none; background: transparent; font-size: 15px; line-height: 22px; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.composer-hint { font-size: 12px; line-height: 16px; color: var(--faint); }
.composer-foot > div { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.counter { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.counter.over { color: var(--bad-text); }
.send-button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; background: var(--brand); color: #FFF; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.send-button:hover { background: var(--brand-hover); }
.send-button:disabled { opacity: .5; cursor: default; }
.trust-line { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.create.is-active .trust-line, .create.is-active .legal-links { display: none; }

/* The cards: the invoice's company, bank account, client and what is
   billed, as confirming will save them, and the one button that does. */
.cards-column { grid-area: cards; min-height: 0; overflow-y: auto; padding: 18px 16px 24px; background: var(--surface); border-right: 1px solid var(--line); }
.create-guest .cards-column { margin-top: 20px; border: 1px solid var(--line); border-radius: 28px 28px 0 0; }
/* Until a guest writes, the cards wait: each would only list what it still
   needs, and the chat is where to start. The chat sits beside the invoice. */
.create-guest:not(.is-active) { grid-template-columns: minmax(380px, 480px) minmax(0, 1fr); grid-template-areas: "left desk"; }
.create-guest:not(.is-active) .cards-column { display: none; }
.cards-slot { display: flex; flex-direction: column; gap: 12px; }
.part-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 4px; }
.part-card .card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.part-card .card-rows div { padding: 6px 0; font-size: 13px; line-height: 18px; }
.part-missing, .part-choose { border-style: dashed; box-shadow: none; }
.cards-needed { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
/* The button that saves the invoice sits under the chat's reply. */
.confirm-in-chat { margin-left: 36px; display: flex; }
.confirm-in-chat.stale { opacity: .6; }
.card-done { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ok-text); }

/* The desk: the invoice, live, on a dotted surface. */
.desk { grid-area: desk; position: relative; min-height: 0; overflow-y: auto; background-color: var(--soft); background-image: var(--desk-dots); background-size: 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 64px 32px 40px; }
.create-guest .desk { margin: 20px 40px 0 28px; border-radius: 28px 28px 0 0; }
.desk-head { position: absolute; top: 18px; left: 22px; right: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-label { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 16px; font-weight: 550; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; animation: pulse 1.6s ease-in-out infinite; }
.desk-badges { display: flex; align-items: center; gap: 8px; }
.paper-stage { position: relative; width: 480px; max-width: 100%; aspect-ratio: 640 / 905; flex-shrink: 0; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-paper); overflow: hidden; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.paper-stage .invoice-paper { position: absolute; left: 0; top: 0; width: 640px; min-height: 905px; transform-origin: 0 0; transform: scale(var(--paper-scale, .75)); }
.paper-stage.is-sent { transform: translateY(-6px) rotate(-1.2deg); }
.paper-stamp { position: absolute; top: 16%; right: 7%; transform: rotate(-9deg); padding: 6px 12px; border: 2px solid var(--ok); border-radius: 8px; color: var(--ok-text); font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(236, 253, 245, .92); animation: stamp .35s ease-out; }
/* A guest's invoice carries the site's name across it until they sign in. */
body[data-guest="true"] .paper-stage::after { content: 'sendinvoicefast.com'; position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(-54deg); font-size: calc(64px * var(--paper-scale, .75)); font-weight: 700; color: rgba(15, 61, 46, .12); white-space: nowrap; pointer-events: none; }
.watermark-note { display: none; margin: 0; font-size: 12.5px; line-height: 18px; color: var(--muted); }
body[data-guest="true"] .watermark-note { display: block; }
.desk .watermark-note, .paper-sheet .watermark-note { text-align: center; }
.send-bar, .sent-card { width: 560px; max-width: 100%; padding: 12px 12px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 16px 40px -16px rgba(12, 10, 9, .3); display: flex; align-items: center; justify-content: space-between; gap: 16px; animation: rise .25s ease-out; }
.send-facts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.send-facts .eyebrow { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.send-total { font-size: 15px; line-height: 22px; font-weight: 620; }
.send-to { font-size: 13px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.send-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sent-card { justify-content: flex-start; gap: 14px; padding: 16px 16px 16px 18px; }
.sent-check { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--ok); color: #FFF; display: flex; align-items: center; justify-content: center; }
.sent-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sent-text strong { font-size: 15.5px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sent-text span { font-size: 12.5px; line-height: 18px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paid-into { width: 560px; max-width: 100%; }
.peek { display: none; }

/* What is not known yet sits as a bar; what just arrived glows, then fades. */
.skeleton { display: block; height: 9px; border-radius: 4px; background: var(--skeleton); }
.skeleton + .skeleton { margin-top: 8px; }
.skeleton-mid { width: 70%; }
.skeleton-short { width: 45%; }
.num .skeleton { margin-left: auto; }
.landed { border-radius: 3px; animation: landed 1.6s ease-out; }
.tile-preview { display: block; position: relative; width: 100%; aspect-ratio: 640 / 905; overflow: hidden; border-radius: 8px; background: #FFF; box-shadow: 0 0 0 1px var(--line); }
.tile-preview .invoice-paper { position: absolute; left: 0; top: 0; width: 640px; min-height: 905px; transform-origin: 0 0; transform: scale(var(--tile-scale, .29)); box-shadow: none; }

/* Pages */
.page { width: 100%; max-width: 1240px; padding: 32px 40px 64px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head h1 { margin: 0; font-size: 30px; line-height: 36px; font-weight: 640; letter-spacing: -.03em; }
.page-head p { margin: 4px 0 0; font-size: 15px; line-height: 22px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.section-title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 640; }

/* Terms of Use, Privacy Policy and Refunds Policy, and the links to them */
.page.legal { display: block; }
.legal .page-head { margin-bottom: 24px; }
.legal p, .legal li { max-width: 75ch; }
.legal h2 { margin: 32px 0 10px; font-size: 18px; line-height: 24px; font-weight: 640; }
.legal .sub { margin-left: 2.2em; }
.legal table { display: block; max-width: 100%; overflow-x: auto; margin: 12px 0; border-collapse: collapse; font-size: 14px; }
.legal th, .legal td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal .note { margin-top: 32px; color: var(--muted); font-size: 13px; }
.legal-links { margin: 0; color: var(--faint); font-size: 13px; }
.legal-accept { margin: 0; color: var(--faint); font-size: 12.5px; }

/* Public pages: pricing and the use cases. */
.site-page { gap: 48px; }
.site-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 56px; align-items: center; }
.site-copy { display: flex; flex-direction: column; gap: 18px; }
.site-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.site-actions .pill { align-self: center; }
.site-sample { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.site-ask { margin: 0; align-self: flex-end; max-width: 90%; padding: 12px 16px; border-radius: 18px 18px 6px 18px; background: var(--brand); color: #FFF; font-size: 14.5px; line-height: 21px; }
.site-sample figcaption { font-size: 13px; text-align: center; }
.site-section { display: flex; flex-direction: column; gap: 16px; }
.site-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.site-point { padding: 18px 20px; }
.site-point h3 { margin: 0 0 6px; font-size: 15.5px; line-height: 22px; font-weight: 640; }
.site-point p { margin: 0; font-size: 14px; line-height: 21px; color: var(--muted); }
.site-steps, .site-notes { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; max-width: 75ch; font-size: 15px; line-height: 23px; }
.site-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 20px; align-items: start; }
.site-foot { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 -28px; font-size: 13px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.site-faq { margin: 0; display: flex; flex-direction: column; gap: 18px; max-width: 75ch; }
.site-faq dt { font-size: 15.5px; line-height: 22px; font-weight: 640; }
.site-faq dd { margin: 4px 0 0; font-size: 15px; line-height: 23px; color: var(--ink-2); }
.site-more { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; }
a.site-template { color: inherit; text-decoration: none; }
a.site-template:hover h2 { text-decoration: underline; }
.article { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.article-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.article-title { margin: 0; font-size: 44px; line-height: 48px; font-weight: 620; letter-spacing: -.04em; text-wrap: balance; }
.article-lead { margin: 0; font-size: 18px; line-height: 28px; color: var(--muted); }
.article-meta { margin: 0; font-size: 13px; color: var(--faint); }
/* Child selectors, so the article's type stays off the invoice paper it shows. */
.article > h2 { margin: 26px 0 0; font-size: 22px; line-height: 28px; font-weight: 640; letter-spacing: -.01em; }
.article > h3, .article li h3 { margin: 10px 0 0; font-size: 16.5px; line-height: 24px; font-weight: 640; }
.article > p, .article li, .article li p { margin: 0; font-size: 16px; line-height: 26px; color: var(--ink-2); }
.article > ul, .article > ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.article .article-steps > li h3 { margin: 0; }
.article > table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.article > table th, .article > table td { padding: 10px 18px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.article > table thead th { font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.article > table tbody th { font-weight: 600; }
.email { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.email p { margin: 0; font-size: 15px; line-height: 23px; color: var(--ink-2); }
.article-figure { margin: 6px 0; max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.article-figure figcaption { font-size: 13px; }
.article > .article-note { margin-top: 18px; font-size: 13.5px; line-height: 21px; color: var(--muted); }
.article-cta { display: flex; flex-direction: column; gap: 12px; max-width: 760px; padding: 24px; border-radius: 18px; background: var(--soft); }
.article-cta p { margin: 0; color: var(--ink-2); }
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
a.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; color: inherit; text-decoration: none; }
a.guide-card h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 640; }
a.guide-card p { margin: 0; font-size: 14.5px; line-height: 22px; color: var(--muted); }
a.guide-card:hover h2 { text-decoration: underline; }
.tool { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 20px; align-items: start; }
.tool-form, .tool-result { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.tool-modes { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radio { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.tool-result p { margin: 0; }
.tool-figures { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tool-figures div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tool-figures dt { color: var(--muted); }
.tool-figures dd { margin: 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.tool-numbers { margin: 0; padding-left: 2.2em; columns: 2; font-family: var(--mono); font-size: 15px; line-height: 26px; }
.tool-aside { margin: 0; align-self: center; font-size: 14px; }
.tool-emails { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.tool-email { display: flex; flex-direction: column; gap: 8px; }
.tool-email-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-email-head h3 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 640; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; padding: 3px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.tab { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; color: var(--ink); cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--surface); box-shadow: var(--ring); }
.tab-count { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.search { width: 280px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); display: flex; align-items: center; gap: 8px; color: var(--faint); }
.search:focus-within { border-color: var(--ink-2); }
.search input { flex-grow: 1; min-width: 0; height: 38px; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.menu-wrap { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); animation: pop .14s ease-out; }
.menu-item { width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; cursor: pointer; text-align: left; }
.menu-item:hover, .menu-item[aria-checked="true"] { background: var(--soft); }
.menu-custom { padding: 8px 6px 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--hairline); margin-top: 4px; }
.menu-custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.menu-custom input { height: 36px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; }
.nudge { padding: 12px 14px 12px 16px; border: 1px solid var(--warn-line); border-radius: 14px; background: var(--warn-soft); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nudge-text { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; }
.table-card { overflow: hidden; }
.table-scroll { position: relative; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 56px; padding: 0 16px; border-bottom: 1px solid var(--hairline); font-size: 14px; line-height: 20px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #FCFCFB; }
.data-table .num { text-align: right; white-space: nowrap; font-weight: 600; }
.data-table .num small { color: var(--faint); font-weight: 400; }
.data-table .dim { color: var(--muted); }
.row-link { padding: 0; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 10px; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
a.row-link { font-family: var(--mono); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 550; }
.state-sent { color: var(--ok-text); }
.state-draft { color: var(--muted); }
.state-bad { color: var(--bad-text); }
.row-actions { display: flex; gap: 6px; }
.table-empty td { height: auto; padding: 40px 16px; text-align: center; color: var(--muted); }
.table-empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--hairline); }
.table-foot p { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--faint); }
.table-foot div { display: flex; gap: 6px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.field > span, .field-label { color: var(--ink); }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: #FFF; font-size: 15px; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row-3 { grid-template-columns: 2fr 1fr 1fr; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-section { margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--hairline); font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.form-section small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bad-soft); color: var(--bad-text); font-size: 14px; }
.bank-section { display: flex; flex-direction: column; gap: 12px; }
.form-section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.form-section-row .form-section { margin: 0; padding: 0; border: 0; }
.bank-list { display: flex; flex-direction: column; gap: 12px; }
.bank-row { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bank-row-foot { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.bank-row-foot .field { flex: 1 1 180px; }
.bank-codes summary { cursor: pointer; font-size: 13.5px; font-weight: 600; }
.bank-codes-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; }
.choice input { width: 18px; height: 18px; accent-color: var(--brand); }
.logo-row { display: flex; align-items: center; gap: 14px; }
.record-head { display: flex; align-items: center; gap: 12px; }
.record-head h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 640; letter-spacing: -.02em; }
.record-head .avatar { width: 40px; height: 40px; font-size: 14px; }
.data-table tbody tr[data-id] { cursor: pointer; }
.logo-preview { width: 96px; height: 56px; flex-shrink: 0; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #FFF; }
.logo-empty { display: grid; place-items: center; border-style: dashed; color: var(--faint); font-size: 13px; font-weight: 600; }
.logo-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.logo-note { margin: 0; font-size: 14px; color: var(--muted); }

/* Dialogs: a popup card on wide screens, a sheet from the bottom on phones. */
dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); box-shadow: 0 40px 80px -24px rgba(12, 10, 9, .45); }
dialog::backdrop { background: rgba(12, 10, 9, .45); }
dialog[open] { animation: pop .18s ease-out; }
.dialog-body { position: relative; padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 16px; }
.dialog-body h2 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 640; letter-spacing: -.02em; }
.dialog-body p { margin: 0; }
.dialog-lead { color: var(--muted); }
.dialog-wide { width: min(720px, calc(100% - 32px)); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dialog-close:hover { background: var(--soft); color: var(--ink); }
.dialog-scroll { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dialog-scroll .dialog-head { flex-shrink: 0; padding: 24px 64px 16px 28px; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.dialog-scroll .dialog-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.dialog-scroll .dialog-foot { flex-shrink: 0; padding: 14px 28px; border-top: 1px solid var(--hairline); display: flex; gap: 10px; }

/* Sign-in */
.auth-page { flex-grow: 1; display: flex; justify-content: center; align-items: flex-start; padding: 56px 24px 80px; }
.auth-card { width: min(460px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0; font-size: 26px; line-height: 32px; font-weight: 640; letter-spacing: -.02em; }
.signin { display: flex; flex-direction: column; gap: 14px; }
.button-google { border-color: var(--line-2); background: #FFF; color: var(--ink); }
.button-google:hover { border-color: var(--ink-2); color: var(--ink); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.code-input { letter-spacing: .4em; font-family: var(--mono); font-size: 22px !important; text-align: center; }
.notice { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok-text); font-size: 14px; }
.notice-error { background: var(--bad-soft); color: var(--bad-text); }

/* Templates */
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.template-card { padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 12px; }
.template-card.is-default { box-shadow: 0 0 0 2px var(--brand); }
.template-desk { padding: 18px 26px; border-radius: 12px; background-color: var(--soft); background-image: var(--desk-dots); background-size: 16px 16px; }
.template-desk .tile-preview { box-shadow: var(--shadow-paper); border-radius: 3px; }
.template-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.template-card h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 640; }
.template-card p { margin: -4px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.template-default-note { min-height: 40px; display: flex; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--ok-text); }

/* Account and checkout */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.plan-name { margin: 0; font-size: 26px; line-height: 32px; font-weight: 640; letter-spacing: -.02em; }
.plan-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.meter { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.meter.high span { background: var(--warn); }
.meter.full span { background: var(--bad); }
.meter-legend { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13.5px; }
.usage-percent { font-family: var(--mono); font-weight: 600; }
.account-wide { grid-column: 1 / -1; }
.mcp-setup { display: flex; flex-direction: column; gap: 18px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.mcp-setup h3 { margin: 0 0 8px; font-size: 15px; line-height: 22px; font-weight: 640; }
.mcp-setup p { margin: 0 0 8px; }
.mcp-setup .mcp-note { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn-text); font-size: 13.5px; line-height: 20px; }
.mcp-code { margin: 0 0 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); color: var(--ink-2); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.paywall-view { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 440px); gap: 48px; align-items: start; }
.paywall-copy { display: flex; flex-direction: column; gap: 18px; padding-top: 16px; }
.paywall-title { margin: 0; font-size: 52px; line-height: 56px; font-weight: 620; letter-spacing: -.045em; text-wrap: balance; }
.paywall-lead { margin: 0; max-width: 540px; font-size: 16.5px; line-height: 26px; color: var(--muted); }
.usage-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.usage-card p { margin: 0; }
.checkout-plan { padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.checkout-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checkout-plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.checkout-plan li svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }
.price-tag { margin: 0; font-size: 34px; line-height: 38px; font-weight: 650; letter-spacing: -.03em; }
.price-tag small { font-size: 15px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -6px 0 0; color: var(--faint); font-size: 12.5px; }
.gift-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok-text); display: grid; place-items: center; }
.facts { margin: 0; display: flex; flex-direction: column; }
.facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--hairline); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--faint); font-size: 14px; }
.facts dd { margin: 0; font-weight: 550; overflow-wrap: anywhere; }

/* An invoice's own page */
.overview { width: 100%; max-width: 1180px; padding: 32px 40px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.overview-desk { border-radius: 24px; padding: 32px; background-color: var(--soft); background-image: var(--desk-dots); background-size: 18px 18px; display: flex; justify-content: center; }
.overview-desk .paper-stage { width: 520px; }
.overview-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 32px; }
.overview-title { margin: 0; font-family: var(--mono); font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.02em; }
.overview-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.overview-actions { display: flex; flex-direction: column; gap: 8px; }
.paid-into { display: flex; flex-direction: column; gap: 8px; }
.paid-into select { max-width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #FFF; font-size: 14px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); max-width: min(520px, calc(100% - 32px)); padding: 11px 16px; border-radius: var(--radius); background: var(--ink); color: #FFF; font-size: 14px; box-shadow: var(--shadow-pop); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad-text); }
.toast.has-action { pointer-events: auto; }
.toast a, .toast a:hover { color: #FFF; font-weight: 600; text-underline-offset: 3px; }
/* The cookie banner, only with the Google Ads tag: a card in the corner,
   above the tab bar on phones. */
.consent { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-pop); font-size: 14px; color: var(--ink-2); z-index: 50; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 12px; }
.consent-short { display: none; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.legal-links .link-button { color: inherit; font-weight: inherit; }

/* Motion */
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shimmer { background: linear-gradient(90deg, #A8A29E 0%, var(--ink) 45%, #A8A29E 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes landed { 0% { background-color: var(--marker-strong); box-shadow: 0 0 0 4px var(--marker-strong); } 100% { background-color: transparent; box-shadow: 0 0 0 4px transparent; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.4); } to { opacity: 1; transform: rotate(-9deg) scale(1); } }
@keyframes sheet-up { from { transform: translateY(32px); opacity: .5; } to { transform: none; opacity: 1; } }

/* Narrower screens keep the chat beside the invoice, with the cards above
   the invoice. */
@media (max-width: 1240px) {
  .create { grid-template-columns: minmax(380px, 440px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "left cards" "left desk"; }
  .cards-column { max-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .cards-slot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .cards-needed { grid-column: 1 / -1; }
  .create-guest .cards-column { margin: 20px 24px 0 28px; }
  .create-guest .desk { margin-top: 0; border-radius: 0; }
  .create-guest:not(.is-active) { grid-template-columns: minmax(380px, 440px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "left desk"; }
  .create-guest:not(.is-active) .desk { margin-top: 20px; border-radius: 28px 28px 0 0; }
}
@media (max-width: 1180px) {
  .status-seg { padding: 0 7px; gap: 5px; }
  .status-seg-text { max-width: 110px; }
  .composer-hint { display: none; }
  .create-guest .create-left { padding-left: 24px; }
  .create-guest .desk { margin-right: 24px; }
  .intro-title { font-size: 30px; line-height: 36px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview { grid-template-columns: 1fr; }
  .overview-side { position: static; }
}

/* Phones and tablets: an app, not a page. The rail is a bottom tab bar, the
   chat fills the screen, the invoice opens as a sheet, dialogs rise from the
   bottom, and nothing sits under the notch or the home indicator. */
@media (max-width: 900px) {
  /* One row: the short words, with the policy link, and the buttons
     beside them. */
  .consent { left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; font-size: 13px; }
  .consent p { flex: 1; margin: 0; }
  .consent-long { display: none; }
  .consent-short { display: block; }
  /* On the landing the chat fills the screen with its box at the bottom,
     where the banner covered it: phone visitors saw no box to type in. The
     banner takes its own place at the top instead, and the chat fits below. */
  body:has(.create) .consent { position: static; order: -1; margin: calc(8px + env(safe-area-inset-top)) 12px 0; box-shadow: none; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body { font-size: 15px; }
  .app { flex-direction: column; }
  .app-main { order: 1; flex: 1 1 auto; min-height: 0; }
  .rail { order: 2; position: sticky; top: auto; bottom: 0; width: 100%; height: auto; padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); flex-direction: row; justify-content: space-around; gap: 0; border-right: 0; border-top: 1px solid var(--line); }
  .rail-brand, .rail-sep, .rail-fill, .rail .env-badge { display: none; }
  .rail-item { flex: 1 1 0; width: auto; height: 56px; flex-direction: column; gap: 3px; border-radius: var(--radius); background: transparent; }
  .rail-item::after { display: none; }
  .rail-item[aria-current="page"] { background: transparent; color: var(--brand); }
  .rail-new, .rail-new:hover, .rail-new[aria-current="page"] { background: transparent; color: var(--muted); }
  .rail-new[aria-current="page"] { color: var(--brand); }
  .rail-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; font-size: 11px; line-height: 13px; font-weight: 600; }
  .rail-avatar { width: auto; height: 56px; border-radius: var(--radius); background: transparent; font-size: 11px; }
  .rail-avatar .avatar-letter { width: 22px; height: 22px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 11px; }
  .rail-avatar[aria-current="page"] { box-shadow: none; color: var(--brand); }

  .create { display: flex; flex-direction: column; height: auto; flex: 1 1 auto; min-height: 0; }
  body:has(.create) { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body:has(.create) .app, body:has(.create) .app-main { flex: 1 1 auto; min-height: 0; }
  .create-left, .create-guest .create-left { flex: 1 1 auto; min-height: 0; padding: 0; gap: 0; }
  .intro { padding: 12px 16px 16px; gap: 10px; }
  .intro-title { font-size: 30px; line-height: 34px; letter-spacing: -.04em; }
  /* Phone visitors see what the chat does and that it is free, as on wider
     screens, in the room the empty chat leaves. */
  .intro-lead { font-size: 14.5px; line-height: 21px; }
  .create .pill { height: 26px; font-size: 12.5px; }
  .conversation, .create-guest .conversation { flex: 1 1 auto; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .conversation-head { padding: 8px 12px; overflow-x: auto; z-index: auto; }
  .status-seg { font-size: 13px; }
  .status-seg-text { max-width: 84px; }
  .chat-log { padding: 16px 14px 8px; }
  .composer-area { padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); }
  body:has(.rail) .composer-area { padding-bottom: 10px; }
  .composer-hint { display: none; }
  /* On a phone the examples scroll sideways in one row, so the chat's
     question keeps its room above them. */
  .chips:has(.chip-example) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip-example { flex-shrink: 0; height: 30px; padding: 0 12px; white-space: nowrap; }
  .desk, .create-guest .desk, .cards-column { display: none; }
  .trust-line, .create .legal-links { display: none; }
  .peek { width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--soft); display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
  .peek-mini { width: 34px; height: 44px; flex-shrink: 0; border-radius: 4px; background: #FFF; box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px; padding: 7px 6px; }
  .peek-mini span { display: block; height: 4px; border-radius: 2px; background: var(--skeleton); }
  .peek-text { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
  .peek-text strong { font-size: 14px; line-height: 20px; }
  .peek-text span { font-family: var(--mono); font-size: 12.5px; line-height: 18px; color: var(--muted); }
  .peek-action { height: 34px; padding: 0 12px; border-radius: var(--radius-sm); display: flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--brand); }
  .peek.is-ready .peek-action { background: var(--brand); color: #FFF; }
  /* Until a guest writes, the bar waits under the box, so the box comes
     first, and the sheet shows only the invoice. */
  .create-guest:not(.is-active) .composer-area { display: flex; flex-direction: column; }
  .create-guest:not(.is-active) .peek { order: 1; margin: 8px 0 0; }
  body:has(.create-guest:not(.is-active)) .paper-sheet .cards-slot { display: none; }
  .picker { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 40; width: 100%; max-width: none; max-height: 78dvh; border-radius: 22px 22px 0 0; box-shadow: 0 0 0 100vmax rgba(12, 10, 9, .35); animation: sheet-up .22s ease-out; }
  .picker-list { max-height: calc(78dvh - 60px); }

  .page { padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-head h1 { font-size: 26px; line-height: 32px; }
  .toolbar-right, .search { width: 100%; }
  .field-row, .field-row-3, .account-grid, .paywall-view, .site-hero, .site-plans, .site-points, .guide-list, .tool { grid-template-columns: 1fr; }
  .paywall-title { font-size: 36px; line-height: 40px; }
  .article-title { font-size: 32px; line-height: 36px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .template-grid { grid-template-columns: 1fr; }
  .overview { padding: 20px 16px 32px; }
  .overview-desk { padding: 16px; border-radius: 18px; }
  .auth-card { padding: 24px; }

  dialog, .dialog-wide { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  dialog[open] { animation: sheet-up .22s ease-out; }
  .dialog-body { padding: 24px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .dialog-scroll { max-height: 92dvh; }
  .dialog-actions .button { flex: 1 1 100%; }
  .paper-sheet .dialog-body { background: var(--soft); align-items: center; }
  .sheet-slot { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .paper-sheet .paper-stage { width: 100%; max-width: 420px; }
  .paper-sheet .cards-slot { align-items: stretch; }
  .paper-sheet .send-bar, .paper-sheet .sent-card { width: 100%; flex-wrap: wrap; }
  .paper-sheet .send-actions { width: 100%; }
  .paper-sheet .send-actions .button, .paper-sheet .sent-card > .button { flex: 1 1 100%; }
}
@media (max-width: 900px) and (max-height: 760px) {
  /* A short phone keeps room for the chat: the lead goes, and while the
     cookie banner asks, the banner takes the headline's place. */
  .intro-lead { display: none; }
  body:has(.consent:not([hidden])) .create .intro { display: none; }
}
@media (max-width: 760px) {
  /* Lists read as tappable rows instead of wide tables. */
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table tbody tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
  .data-table td { display: block; height: auto; padding: 0; border: 0; }
  .data-table td[data-cell="hide"] { display: none; }
  .data-table td[data-cell="main"] { grid-column: 1; grid-row: 1; }
  .data-table td[data-cell="sub"] { grid-column: 1; grid-row: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 13px; }
  .data-table td[data-cell="side"] { grid-column: 2; grid-row: 1; text-align: right; }
  .data-table td[data-cell="side2"] { grid-column: 2; grid-row: 2; justify-self: end; }
  .data-table td[data-cell="actions"] { grid-column: 1 / -1; grid-row: 3; margin-top: 8px; }
  .data-table td[data-cell="main"] .row-link::after { content: ''; position: absolute; inset: 0; }
  /* The row's buttons sit above the link that covers the row. */
  .data-table .row-actions .button { position: relative; z-index: 1; }
  .data-table tbody tr.table-empty { display: block; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tabs { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
