/* SubMac — Free invoice generator (/invoice-generator).
   One page-specific sheet, loaded after ui.css so the tool's own layout wins.
   The invoice sheet is paper: fixed white, dark ink, in both themes.
   Mobile-first: one column, then a two-column editor + sticky preview at 920px.

   Design language: each of the twelve templates is a different composition, not a
   recolour. A band cover, a full-height colour rail, a giant wordmark, a ruled
   ledger, a framed page, a receipt. The accent is the user's brand colour and
   --acc-ink is white or ink, set from its luminance. */

/* ===== tool layout ===== */
.inv-main { padding-bottom: clamp(48px, 6vw, 88px); }
.inv-main .crumbs { margin-top: clamp(18px, 4vw, 38px); }
.inv-h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.6rem); font-weight: 700; letter-spacing: -0.03em; margin: 0.35rem 0 0.25rem; }
.inv-sub { color: var(--ios-label-2); max-width: 58ch; margin: 0 0 clamp(20px, 3vw, 34px); }

.inv-layout { display: grid; gap: clamp(22px, 3vw, 40px); grid-template-columns: minmax(0, 1fr); align-items: start; }
.inv-preview-col { min-width: 0; }
@media (min-width: 920px) {
  .inv-layout { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr); }
  .inv-preview-col { position: sticky; top: 84px; }
}

.inv-editor { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.inv-block { display: grid; gap: 12px; }
.inv-block + .inv-block { padding-top: clamp(6px, 1.5vw, 14px); }
.inv-block-h { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }

.inv-field { display: grid; gap: 6px; }
.inv-label { font-size: 0.8125rem; font-weight: 600; color: var(--ios-label-2); }
.inv-optional { font-weight: 500; color: var(--ios-label-3); }
.inv-field input, .inv-field select, .inv-field textarea { width: 100%; min-height: 46px; padding: 10px 12px; }
.inv-field textarea { min-height: 64px; resize: vertical; }
.inv-color { display: inline-flex; }
.inv-field .inv-color input[type="color"] { width: 46px; height: 46px; padding: 3px; border: 0; border-radius: var(--r, 8px); background: var(--ios-fill); box-shadow: var(--ios-field); cursor: pointer; }
.inv-field .inv-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.inv-field .inv-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.inv-field .inv-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 5px; }
.inv-two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .inv-two { grid-template-columns: 1fr; } }

.inv-logo-row { display: flex; align-items: center; gap: 14px; }
.inv-logo-thumb { width: 64px; height: 64px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: var(--r, 8px); background: var(--ios-fill); box-shadow: var(--ios-field); color: var(--ios-label-3); }
.inv-logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.inv-logo-thumb svg { width: 22px; height: 22px; }
.inv-logo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.inv-items-edit { display: grid; gap: 12px; }
.inv-item { display: grid; gap: 8px; padding: 12px; border-radius: var(--r-md); background: var(--ios-fill); }
.inv-item-row { display: grid; grid-template-columns: 1fr 1fr 1.1fr auto; gap: 8px; align-items: end; }
@media (max-width: 560px) { .inv-item-row { grid-template-columns: 1fr 1fr; } }
.inv-mini { display: grid; gap: 4px; }
.inv-mini span { font-size: 0.75rem; font-weight: 600; color: var(--ios-label-2); }
.inv-mini input { width: 100%; min-height: 42px; padding: 8px 10px; }
.inv-mini-amt output { display: flex; align-items: center; min-height: 42px; font-variant-numeric: tabular-nums; font-weight: 600; }
.inv-i-del { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: var(--r, 8px); background: var(--ios-fill-2); color: var(--ios-label-2); cursor: pointer; }
.inv-i-del:hover { color: var(--red-ink); }
.inv-i-del svg { width: 18px; height: 18px; }

.inv-add { display: inline-flex; align-items: center; gap: 8px; align-self: start; border: 0; border-radius: 8px; background: var(--ios-fill); color: var(--ios-label); font: 600 0.9375rem/1 var(--ios-font); padding: 11px 15px; cursor: pointer; }
.inv-add:hover { background: var(--ios-fill-2); }

.inv-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.inv-check input { width: 20px; height: 20px; accent-color: var(--ios-tint); }
.inv-extra { display: grid; gap: 12px; }

.inv-saved { margin: 4px 0 0; min-height: 1.2em; color: var(--ios-label-2); font-size: 0.875rem; }
.inv-clear { justify-self: start; padding: 6px 0; border: 0; background: transparent; color: var(--ios-label-2); font: 600 0.875rem/1 var(--ios-font); text-decoration: underline; cursor: pointer; }
.inv-clear:hover { color: var(--red-ink); }

/* preview column */
.inv-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.inv-preview-label { font-size: 0.8125rem; font-weight: 600; color: var(--ios-label-2); }
.inv-tpl { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 10px; background: var(--ios-fill); }
.inv-tpl-btn { border: 0; border-radius: 6px; background: transparent; color: var(--ios-label-2); font: 600 0.875rem/1 var(--ios-font); padding: 8px 13px; cursor: pointer; }
.inv-tpl-btn[aria-pressed="true"] { background: var(--ios-card); color: var(--ios-label); box-shadow: var(--ios-shadow); }
.inv-tpl-note { margin: 0 0 10px; color: var(--ios-label-2); font-size: 0.8125rem; }
.inv-preview-frame { position: relative; max-width: 100%; overflow: hidden; border-radius: var(--r-lg); background: var(--ios-fill); box-shadow: var(--ios-ring); }
.inv-scale { position: relative; transform-origin: top left; }
.inv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.inv-actions .btn { flex: 1 1 auto; }
/* tool buttons are rounded rectangles, not pills */
html .inv-editor .btn, html .inv-actions .btn { border-radius: 10px; }
.inv-privacy { margin: 12px 0 0; color: var(--ios-label-2); font-size: 0.8125rem; }

/* collapsible block + panel */
.inv-collapse > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.inv-collapse > summary::-webkit-details-marker { display: none; }
.inv-collapse > summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 1.6px solid var(--ios-label-2); border-bottom: 1.6px solid var(--ios-label-2); transform: rotate(45deg); transition: transform var(--ios-dur-1) var(--ios-ease); }
.inv-collapse[open] > summary::after { transform: rotate(-135deg); }
.inv-hint { padding: 4px 8px; border-radius: var(--r-pill); background: var(--ios-fill); font-size: 0.75rem; font-weight: 600; color: var(--ios-label-3); }
.inv-collapse-body { display: grid; gap: 12px; }
.inv-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inv-fine { margin: 0; color: var(--ios-label-2); font-size: 0.8125rem; line-height: 1.5; }
.inv-tokens { padding-top: 10px; border-top: 1px solid var(--ios-sep); }
.inv-tokens summary { font-weight: 600; font-size: 0.875rem; color: var(--ios-label-2); cursor: pointer; }
.inv-token-list { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 7px; color: var(--ios-label-2); font-size: 0.8125rem; line-height: 1.5; }
.inv-token-list code { padding: 1px 5px; border-radius: 5px; background: var(--ios-fill); font-family: var(--ios-mono); font-size: 0.76rem; color: var(--ios-label); overflow-wrap: anywhere; }

.inv-pdfhost { position: fixed; left: -100000px; top: 0; background: #ffffff; }
.inv-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; padding: 11px 16px; border-radius: 12px; background: var(--ios-action); color: var(--ios-action-ink); font: 600 0.9rem/1.2 var(--ios-font); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.5); max-width: calc(100vw - 32px); }

/* ===== the invoice sheet (a paper document) ===== */
.inv-sheet {
  width: 794px; min-height: 1123px; box-sizing: border-box; padding: 54px 56px;
  background: #ffffff; color: #1a1a1a;
  font-family: var(--ios-font); font-size: 13px; line-height: 1.5;
  --acc: #34618f; --acc-ink: #ffffff;
}
.inv-sheet.inv-ink-on-light { --acc-ink: #1a1a1a; }
.inv-sheet * { box-sizing: border-box; }
.inv-sheet.inv-page-a4 { width: 794px; min-height: 1123px; }
.inv-sheet.inv-page-a4l { width: 1123px; min-height: 794px; }
.inv-sheet.inv-page-letter { width: 816px; min-height: 1056px; }
.inv-sheet.inv-page-letterl { width: 1056px; min-height: 816px; }
.inv-sheet.inv-page-a5 { width: 559px; min-height: 794px; }
.inv-sheet.inv-page-a5l { width: 794px; min-height: 559px; }
.inv-sheet.inv-page-a5, .inv-sheet.inv-page-a5l { font-size: 12px; }

/* ---- shared parts ---- */
.inv-mark { width: 54px; height: 54px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: var(--acc); color: var(--acc-ink); font-weight: 800; font-size: 21px; letter-spacing: 0.01em; }
.inv-mark span { transform: translateY(-1px); }
.inv-mark-img { background: transparent; border-radius: 8px; }
.inv-mark-img img { width: 54px; height: 54px; object-fit: contain; }
.inv-logo { max-height: 54px; }

.inv-sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 26px; }
.inv-from { display: flex; gap: 14px; align-items: center; min-width: 0; }
.inv-biz-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.inv-biz-meta { color: #5b5b60; font-size: 12px; white-space: pre-line; margin-top: 3px; }
.inv-doc { text-align: right; flex: none; }
.inv-doc-title { font-size: 27px; font-weight: 800; letter-spacing: -0.02em; }
.inv-doc-metas { display: grid; gap: 3px; margin-top: 6px; }
.inv-doc-meta { display: flex; gap: 12px; justify-content: flex-end; font-size: 12px; }
.inv-doc-meta span { color: #6b6b70; }
.inv-doc-meta b { font-weight: 600; }

.inv-billto { margin-top: 28px; }
.inv-lbl { margin-bottom: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #8a8a90; }
.inv-cust-name { font-weight: 700; font-size: 13.5px; }
.inv-cust-meta { color: #5b5b60; font-size: 12px; white-space: pre-line; margin-top: 3px; }

.inv-items { width: 100%; border-collapse: collapse; margin-top: 24px; }
.inv-items th { padding: 10px 9px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #6b6b70; text-align: left; border-bottom: 1.5px solid #1a1a1a; }
.inv-items th.r { text-align: right; }
.inv-items td { padding: 11px 9px; vertical-align: top; border-bottom: 1px solid #eeeef1; }
.inv-items tbody tr:last-child td { border-bottom: 1px solid #e3e3e6; }
.inv-items .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-empty { color: #9a9a9f; font-style: italic; }

.inv-totals { width: min(300px, 100%); margin: 18px 0 0 auto; }
.inv-trow { display: flex; justify-content: space-between; gap: 18px; padding: 6px 0; }
.inv-trow span { color: #5b5b60; }
.inv-trow b { font-variant-numeric: tabular-nums; }
.inv-trow-total { margin-top: 6px; padding-top: 12px; border-top: 1.5px solid #1a1a1a; align-items: baseline; }
.inv-trow-total span { color: #1a1a1a; font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.inv-trow-total b { font-size: 19px; font-weight: 800; color: var(--acc); }
.inv-notes { margin-top: 30px; padding-top: 14px; border-top: 1px solid #eeeef1; color: #5b5b60; font-size: 12px; white-space: pre-line; }
.inv-ph { color: #b9b9be; }

/* centred header (classic, frame) */
.inv-center { flex-direction: column; align-items: center; text-align: center; }
.inv-center .inv-from { flex-direction: column; align-items: center; gap: 10px; }
.inv-center .inv-doc { text-align: center; }
.inv-center .inv-doc-meta { justify-content: center; }

/* ===== the twelve compositions ===== */

/* modern — a full-bleed accent cover band (the default) */
.inv-t-modern { padding-top: 0; }
.inv-t-modern .inv-sheet-top { margin: 0 -56px 32px; padding: 42px 56px; background: var(--acc); color: var(--acc-ink); align-items: center; }
.inv-t-modern .inv-mark { width: 60px; height: 60px; font-size: 23px; border-radius: 15px; background: var(--acc-ink); color: var(--acc); }
.inv-t-modern .inv-mark-img { background: rgba(255, 255, 255, 0.16); color: var(--acc-ink); }
.inv-t-modern .inv-biz-name { color: var(--acc-ink); font-size: 20px; }
.inv-t-modern .inv-biz-meta { color: var(--acc-ink); opacity: 0.78; }
.inv-t-modern .inv-doc-title { color: var(--acc-ink); font-size: 32px; }
.inv-t-modern .inv-doc-meta span { color: var(--acc-ink); opacity: 0.78; }
.inv-t-modern .inv-doc-meta b { color: var(--acc-ink); }
.inv-t-modern .inv-ph { color: var(--acc-ink); opacity: 0.5; }
.inv-t-modern .inv-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.inv-t-modern .inv-lbl { color: var(--acc); }
.inv-t-modern .inv-totals { background: #f5f5f7; border-radius: 12px; padding: 16px 20px; }
.inv-t-modern .inv-trow-total { border-top: 1px solid #dcdce1; }

/* classic — traditional, centred, serif, double rule */
.inv-t-classic .inv-sheet-top { padding-bottom: 18px; border-bottom: 3px double #1a1a1a; }
.inv-t-classic .inv-mark { background: transparent; color: #1a1a1a; box-shadow: inset 0 0 0 1.5px #1a1a1a; border-radius: 50%; font-family: Georgia, 'Times New Roman', serif; font-weight: 400; }
.inv-t-classic .inv-mark-img { box-shadow: none; }
.inv-t-classic .inv-biz-name { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 23px; }
.inv-t-classic .inv-doc-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 19px; letter-spacing: 0.42em; text-transform: uppercase; color: #1a1a1a; }
.inv-t-classic .inv-items th { color: #1a1a1a; letter-spacing: 0.14em; border-bottom: 1px solid #1a1a1a; }
.inv-t-classic .inv-trow-total b { color: #1a1a1a; }
.inv-t-classic .inv-notes { text-align: center; }

/* minimal — quiet, airy, hairline, no fills */
.inv-t-minimal { padding: 66px; font-weight: 300; }
.inv-t-minimal .inv-mark { background: transparent; color: #1a1a1a; box-shadow: inset 0 0 0 1px #d9d9de; border-radius: 50%; font-weight: 500; }
.inv-t-minimal .inv-mark-img { box-shadow: none; }
.inv-t-minimal .inv-sheet-top { padding-bottom: 22px; border-bottom: 1px solid #e5e5e7; }
.inv-t-minimal .inv-doc-title { font-size: 40px; font-weight: 200; letter-spacing: -0.01em; color: #1a1a1a; }
.inv-t-minimal .inv-biz-name { font-weight: 500; }
.inv-t-minimal .inv-lbl { color: #b0b0b6; }
.inv-t-minimal .inv-items th { letter-spacing: 0.22em; font-weight: 500; color: #9a9a9f; border-bottom: 1px solid #e5e5e7; }
.inv-t-minimal .inv-items td { border-bottom: 1px solid #f0f0f2; }
.inv-t-minimal .inv-trow-total { border-top: 1px solid #1a1a1a; }
.inv-t-minimal .inv-trow-total b { color: #1a1a1a; }

/* bold — a giant wordmark over a thick accent rule */
.inv-t-bold .inv-sheet-top { align-items: flex-end; padding-bottom: 26px; border-bottom: 7px solid var(--acc); }
.inv-t-bold .inv-mark { width: 62px; height: 62px; border-radius: 15px; font-size: 25px; }
.inv-t-bold .inv-biz-name { font-size: 19px; }
.inv-t-bold .inv-doc-title { font-size: 58px; font-weight: 900; line-height: 0.86; text-transform: uppercase; letter-spacing: -0.04em; color: #1a1a1a; }
.inv-t-bold .inv-doc-metas { margin-top: 10px; }
.inv-t-bold .inv-items th { background: #14141a; color: #ffffff; border-bottom: 0; }
.inv-t-bold .inv-lbl { color: var(--acc); }
.inv-t-bold .inv-trow-total { border-top: 3px solid #14141a; }
.inv-t-bold .inv-trow-total b { font-size: 22px; }

/* ledger — ruled accounting paper */
.inv-t-ledger { font-size: 12.5px; }
.inv-t-ledger .inv-mark { border-radius: 8px; background: #141414; color: #ffffff; }
.inv-t-ledger .inv-sheet-top { padding-bottom: 16px; border-bottom: 1px solid #141414; }
.inv-t-ledger .inv-biz-name { font-size: 16px; }
.inv-t-ledger .inv-doc-title { font-size: 17px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #141414; }
.inv-t-ledger .inv-doc-meta b, .inv-t-ledger .inv-trow b, .inv-t-ledger .inv-items .r { font-family: var(--ios-mono); }
.inv-t-ledger .inv-items th { background: #f5f5f7; color: #141414; letter-spacing: 0.11em; border-top: 1px solid #141414; border-bottom: 1px solid #141414; }
.inv-t-ledger .inv-items td { border-bottom: 1px dotted #c9c9cf; }
.inv-t-ledger .inv-trow-total { border-top: 2px solid #141414; }
.inv-t-ledger .inv-trow-total b { color: #141414; }

/* editorial — magazine masthead with a serif drop */
.inv-t-editorial { padding: 62px 64px; }
.inv-t-editorial .inv-masthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid #1a1a1a; }
.inv-t-editorial .inv-biz-name { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 30px; letter-spacing: -0.015em; }
.inv-t-editorial .inv-ed-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-top: 24px; }
.inv-t-editorial .inv-ed-title { font-family: Georgia, 'Times New Roman', serif; font-size: 48px; font-weight: 400; line-height: 0.92; letter-spacing: -0.02em; }
.inv-t-editorial .inv-ed-meta { text-align: right; }
.inv-t-editorial .inv-items th { border-top: 2px solid #1a1a1a; border-bottom: 1px solid #1a1a1a; color: #1a1a1a; letter-spacing: 0.16em; }
.inv-t-editorial .inv-trow-total b { color: #1a1a1a; }

/* sidebar — a full-height colour rail */
.inv-t-sidebar { display: flex; padding: 0; }
.inv-t-sidebar .inv-rail { flex: 0 0 232px; align-self: stretch; display: flex; flex-direction: column; gap: 26px; padding: 54px 32px; background: var(--acc); color: var(--acc-ink); }
.inv-t-sidebar .inv-rail-mark { width: 58px; height: 58px; font-size: 22px; background: var(--acc-ink); color: var(--acc); }
.inv-t-sidebar .inv-rail-mark.inv-mark-img { background: rgba(255, 255, 255, 0.16); }
.inv-t-sidebar .inv-rail .inv-biz-name { color: var(--acc-ink); font-size: 18px; }
.inv-t-sidebar .inv-rail .inv-biz-meta { color: var(--acc-ink); opacity: 0.8; }
.inv-t-sidebar .inv-rail-meta { margin-top: auto; }
.inv-t-sidebar .inv-rail .inv-doc-title { color: var(--acc-ink); font-size: 26px; }
.inv-t-sidebar .inv-rail .inv-doc-meta { justify-content: flex-start; }
.inv-t-sidebar .inv-rail .inv-doc-meta span { color: var(--acc-ink); opacity: 0.78; }
.inv-t-sidebar .inv-rail .inv-doc-meta b { color: var(--acc-ink); }
.inv-t-sidebar .inv-ph { color: var(--acc-ink); opacity: 0.5; }
.inv-t-sidebar .inv-body { flex: 1; min-width: 0; padding: 54px 46px; }
.inv-t-sidebar .inv-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; }
.inv-t-sidebar .inv-totals { background: #f5f5f7; border-radius: 12px; padding: 16px 20px; }
.inv-t-sidebar .inv-trow-total { border-top: 1px solid #dcdce1; }

/* luxe — delicate centred serif */
.inv-t-luxe { padding: 66px 74px; text-align: center; font-family: Georgia, 'Times New Roman', serif; }
.inv-t-luxe .inv-sheet-top { gap: 0; padding-bottom: 24px; border-bottom: 1px solid #e2ddd3; }
.inv-t-luxe .inv-mark { background: transparent; color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); border-radius: 50%; font-weight: 400; }
.inv-t-luxe .inv-mark-img { box-shadow: none; }
.inv-t-luxe .inv-lux-name { font-weight: 400; font-size: 27px; margin-top: 12px; }
.inv-t-luxe .inv-biz-meta { font-family: var(--ios-font); }
.inv-t-luxe .inv-lux-title { font-weight: 400; font-size: 13px; letter-spacing: 0.5em; text-transform: uppercase; color: #7a7368; margin-top: 14px; }
.inv-t-luxe .inv-doc-metas { margin-top: 8px; }
.inv-t-luxe .inv-billto { margin-top: 32px; }
.inv-t-luxe .inv-items { margin-top: 30px; }
.inv-t-luxe .inv-items th { font-weight: 400; letter-spacing: 0.2em; color: #7a7368; border-bottom: 1px solid #e2ddd3; }
.inv-t-luxe .inv-items td { border-bottom: 1px solid #f0ece4; }
.inv-t-luxe .inv-totals { margin-left: auto; margin-right: auto; }
.inv-t-luxe .inv-trow-total b { color: var(--acc); }
.inv-t-luxe .inv-notes { text-align: center; }

/* swiss — strict grid, block title, squared */
.inv-t-swiss { font-family: Helvetica, Arial, sans-serif; }
.inv-t-swiss .inv-mark { border-radius: 0; background: #141414; color: #ffffff; }
.inv-t-swiss .inv-sheet-top { padding-bottom: 18px; border-bottom: 3px solid #141414; }
.inv-t-swiss .inv-biz-name { font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.inv-t-swiss .inv-doc-title { display: inline-block; padding: 7px 13px; background: var(--acc); color: var(--acc-ink); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; text-transform: uppercase; }
.inv-t-swiss .inv-lbl, .inv-t-swiss .inv-items th { color: #141414; letter-spacing: 0.14em; }
.inv-t-swiss .inv-items th { background: #141414; color: #ffffff; border-bottom: 0; }
.inv-t-swiss .inv-trow-total { border-top: 3px solid #141414; }
.inv-t-swiss .inv-trow-total b { color: var(--acc); }

/* soft — rounded panels, friendly */
.inv-t-soft { padding: 40px; }
.inv-t-soft .inv-mark { border-radius: 16px; }
.inv-t-soft .inv-sheet-top { padding: 26px 28px; border-radius: 20px; background: #f4f5f7; }
.inv-t-soft .inv-doc-title { color: var(--acc); }
.inv-t-soft .inv-billto { margin-top: 18px; padding: 20px 24px; border-radius: 20px; background: #f4f5f7; }
.inv-t-soft .inv-items { margin-top: 24px; }
.inv-t-soft .inv-items th { background: var(--acc); color: var(--acc-ink); border-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 12px; }
.inv-t-soft .inv-items th:first-child { border-radius: 10px 0 0 10px; }
.inv-t-soft .inv-items th:last-child { border-radius: 0 10px 10px 0; }
.inv-t-soft .inv-items td { border-bottom: 1px solid #ededf0; }
.inv-t-soft .inv-totals { margin-top: 18px; padding: 18px 22px; border-radius: 20px; background: #f4f5f7; }
.inv-t-soft .inv-trow-total { border-top: 1px solid #dcdce1; }

/* mono — typewriter receipt */
.inv-t-mono { padding: 50px 56px; font-family: var(--ios-mono); font-size: 12.5px; }
.inv-t-mono .inv-receipt-head { text-align: center; padding-bottom: 16px; border-bottom: 1px dashed #8a8a90; }
.inv-t-mono .inv-mark { margin: 0 auto 12px; border-radius: 8px; background: #141414; color: #ffffff; }
.inv-t-mono .inv-receipt-title { font-size: 15px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; }
.inv-t-mono .inv-biz-name { font-size: 15px; margin-top: 8px; }
.inv-t-mono .inv-doc-metas { margin-top: 10px; }
.inv-t-mono .inv-doc-meta { justify-content: center; }
.inv-t-mono .inv-items th { border-bottom: 1px dashed #8a8a90; color: #141414; }
.inv-t-mono .inv-items td { border-bottom: 1px dashed #d5d5da; }
.inv-t-mono .inv-items tbody tr:last-child td { border-bottom: 1px dashed #8a8a90; }
.inv-t-mono .inv-totals { padding: 12px 14px; border: 1px dashed #8a8a90; border-radius: 6px; }
.inv-t-mono .inv-trow-total { border-top: 1px dashed #8a8a90; }
.inv-t-mono .inv-trow-total b { color: #141414; }
.inv-t-mono .inv-notes { text-align: center; border-top: 0; }

/* frame — the page inside a border */
.inv-t-frame { display: flex; padding: 30px; }
.inv-t-frame .inv-frame-box { flex: 1; border: 1.5px solid #1a1a1a; padding: 44px 48px; }
.inv-t-frame .inv-mark { border-radius: 0; background: var(--acc); color: var(--acc-ink); }
.inv-t-frame .inv-doc-title { color: var(--acc); }
.inv-t-frame .inv-items th { color: #1a1a1a; border-bottom: 1px solid #1a1a1a; }
.inv-t-frame .inv-trow-total b { color: var(--acc); }

/* custom (imported) templates: neutral base, the template's own <style> does the rest */
.inv-t-custom { padding: 52px 56px; }
.inv-t-custom h1, .inv-t-custom h2, .inv-t-custom p, .inv-t-custom table { margin: 0; }
.inv-t-custom table { border-collapse: collapse; width: 100%; }
.inv-t-custom th, .inv-t-custom td { padding: 8px; text-align: left; }

/* printing prints only the sheet */
@media print {
  body * { visibility: hidden !important; }
  .inv-preview-frame, .inv-preview-frame * { visibility: visible !important; }
  .inv-preview-frame { position: absolute; inset: 0; overflow: visible; background: #fff; box-shadow: none; border-radius: 0; }
  .inv-scale { transform: none !important; margin: 0 !important; }
  .inv-sheet { box-shadow: none; }
}
