
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #f8fafc; --surface: #ffffff; --ink: #0f172a; --muted: #52607a; --line: #e2e8f0; --field: #f1f5f9;
  --primary: #2563eb; --primary-ink: #ffffff; --link: #1d4ed8;
  --mint: #2dd4bf; --mint-ink: #042f2a; --danger: #b4282e;
  --pill-draft-bg: #e8ecf2; --pill-draft-ink: #3b475c;
  --pill-sent-bg: #dce8ff; --pill-sent-ink: #1b4fc4;
  --pill-overdue-bg: #ffe1e2; --pill-overdue-ink: #a12127;
  --pill-paid-bg: #cff7f0; --pill-paid-ink: #0b5f54;
  --glow1: rgba(37,99,235,.15); --glow2: rgba(45,212,191,.18);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #131c2e; --ink: #e8eefb; --muted: #9aa8c2; --line: #25324a; --field: #0e1626;
    --link: #8fb2ff; --danger: #ff9a9e;
    --pill-draft-bg: #2a3446; --pill-draft-ink: #c3cde0;
    --pill-sent-bg: #1c2f57; --pill-sent-ink: #a9c5ff;
    --pill-overdue-bg: #4a1f24; --pill-overdue-ink: #ffb8bb;
    --pill-paid-bg: #0f3d38; --pill-paid-ink: #84f2df;
    --glow1: rgba(37,99,235,.28); --glow2: rgba(45,212,191,.16);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #131c2e; --ink: #e8eefb; --muted: #9aa8c2; --line: #25324a; --field: #0e1626;
  --link: #8fb2ff; --danger: #ff9a9e;
  --pill-draft-bg: #2a3446; --pill-draft-ink: #c3cde0;
  --pill-sent-bg: #1c2f57; --pill-sent-ink: #a9c5ff;
  --pill-overdue-bg: #4a1f24; --pill-overdue-ink: #ffb8bb;
  --pill-paid-bg: #0f3d38; --pill-paid-ink: #84f2df;
  --glow1: rgba(37,99,235,.28); --glow2: rgba(45,212,191,.16);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(55% 380px at 12% 0%, var(--glow1), transparent 70%),
    radial-gradient(45% 340px at 92% 0%, var(--glow2), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  min-height: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ic { display: inline-flex; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.empty { color: #8a96ab; }

/* header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; padding: 4px 0; }
.mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #2563eb, #2dd4bf); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav button { background: none; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: 600; color: var(--muted); }
.nav button:hover { color: var(--ink); background: var(--field); }
.nav button[aria-current="page"] { color: var(--ink); background: var(--field); }
.top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: #1d4fd0; }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.btn.mint:hover { background: #22c1ae; }
.btn.small { padding: 7px 11px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.armed { background: var(--pill-overdue-bg); border-color: var(--danger); }

/* layout */
.app { max-width: 1180px; margin: 0 auto; padding: 28px 20px 70px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.025em; margin: 0; font-weight: 800; }
.sub { color: var(--muted); margin: 6px 0 0; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 11px 4px 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill-draft { background: var(--pill-draft-bg); color: var(--pill-draft-ink); }
.pill-sent { background: var(--pill-sent-bg); color: var(--pill-sent-ink); }
.pill-overdue { background: var(--pill-overdue-bg); color: var(--pill-overdue-ink); }
.pill-paid { background: var(--pill-paid-bg); color: var(--pill-paid-ink); }

/* reminders */
.reminder { border-radius: 14px; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; gap: 12px; align-items: flex-start; }
.reminder.bad { background: var(--pill-overdue-bg); border-color: transparent; color: var(--pill-overdue-ink); }
.reminder.soon { background: var(--pill-sent-bg); border-color: transparent; color: var(--pill-sent-ink); }
.reminder ul { margin: 0; padding: 0; list-style: none; }
.reminder li { font-weight: 600; }
.reminder .rtitle { font-weight: 800; margin-bottom: 2px; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { border-radius: 18px; padding: 18px 20px; border: 1px solid var(--line); }
.stat .lbl { font-weight: 600; color: var(--muted); font-size: 14px; }
.stat .val { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat.s1 { background: linear-gradient(135deg, rgba(45,212,191,.28), rgba(37,99,235,.10)), var(--surface); }
.stat.s2 { background: linear-gradient(135deg, rgba(37,99,235,.24), rgba(124,92,255,.10)), var(--surface); }
.stat.s3 { background: linear-gradient(135deg, rgba(240,82,82,.20), rgba(251,146,60,.10)), var(--surface); }

/* filters + list */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.inv-row {
  display: grid; align-items: center; gap: 12px 16px; padding: 14px 18px; border-top: 1px solid var(--line);
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 1fr) auto auto;
  grid-template-areas: "info due amount pill actions";
}
.inv-row:first-child { border-top: 0; }
.r-info { grid-area: info; min-width: 0; }
.r-due { grid-area: due; min-width: 0; }
.r-amount { grid-area: amount; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.r-pill { grid-area: pill; }
.r-actions { grid-area: actions; display: flex; gap: 6px; justify-content: flex-end; }
.r-num { font-weight: 800; }
.r-client { color: var(--muted); overflow-wrap: anywhere; }
.r-due .m { font-weight: 600; }
.r-due .s { color: var(--muted); font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-weight: 800; color: var(--ink); }
.linkish:hover { color: var(--link); text-decoration: underline; }
.blank { padding: 44px 20px; text-align: center; }
.blank h2 { margin: 0 0 6px; font-size: 20px; }
.blank p { margin: 0 0 18px; color: var(--muted); }
.footnote { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* forms */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel h2 { font-size: 16px; margin: 26px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); font-weight: 800; }
.panel h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f { display: block; margin-bottom: 12px; }
.fl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
input:not([type="file"]), select, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line);
}
textarea { resize: vertical; min-height: 70px; }
.item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--field); }
.item input { background: var(--surface); }
.item .f { margin-bottom: 0; }
.item .r3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.item .r3.one { grid-template-columns: 1fr; }
.item .amt { font-weight: 800; padding-bottom: 10px; text-align: right; min-width: 90px; font-variant-numeric: tabular-nums; }
.item .rm { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 13px; font-weight: 600; padding: 8px 0 0; }
.logo-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.logo-prev { width: 96px; height: 96px; border-radius: 14px; border: 1px dashed var(--muted); display: grid; place-items: center; overflow: hidden; background: #fff; color: #7a869b; font-size: 12px; text-align: center; padding: 6px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.saved { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--pill-paid-ink); min-height: 22px; }
.saved.bad { color: var(--danger); }
.saved.idle { color: var(--muted); font-weight: 500; }

/* editor */
.ed-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-head .spacer { flex: 1; }
.ed-grid { display: grid; grid-template-columns: minmax(320px, 450px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pv-col { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 70px); min-width: 0; }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* the invoice paper: calm, mostly black and white */
.paper {
  --px: 44px; --py: 44px; background: #ffffff; color: #111827; border-radius: 6px; padding: var(--py) var(--px); aspect-ratio: 210 / 297; display: flex; flex-direction: column; font-size: 13.5px;
  box-shadow: 0 1px 2px rgba(15,23,42,.10), 0 14px 40px rgba(15,23,42,.14);
}
.paper { position: relative; overflow: hidden; isolation: isolate; }
.pv-col { container-type: inline-size; }
@supports (width: 1cqw) { .paper { aspect-ratio: auto; min-height: calc(100cqw * 1.4142); } }
.paper > * { flex-shrink: 0; }
.pp-foot { margin-top: auto !important; padding-top: 28px; }
.paper.pdfmode { --px: 52px; --py: 54px; width: 794px; min-height: 1120px; aspect-ratio: auto; box-shadow: none; border-radius: 0; }
.pdf-host { position: fixed; left: -10000px; top: 0; }
@page { size: A4; margin: 0; }
.pp-wm { position: absolute; z-index: 0; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 0 var(--px, 24px); text-align: center; line-height: 1.1;
  font-size: 56px; font-weight: 800; letter-spacing: -0.02em; color: rgba(17,24,39,.06); overflow-wrap: anywhere; max-height: 2.3em; overflow: hidden; pointer-events: none; user-select: none;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pp-copy { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e5e7eb; text-align: center; color: #566174; font-size: 11.5px; }
.pp-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.pp-brand { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.pp-logo { max-height: 60px; max-width: 150px; object-fit: contain; display: block; }
.pp-biz { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pp-tag { color: #566174; font-size: 12.5px; }
.pp-from { color: #566174; font-size: 12.5px; margin-top: 8px; max-width: 280px; }
.pp-title { text-align: right; flex-shrink: 0; }
.pp-title .word { font-size: 28px; font-weight: 800; letter-spacing: 0.02em; }
.pp-num { color: #566174; font-weight: 600; }
.paid-mark { display: inline-block; margin-top: 6px; border: 2px solid #0b7a6c; color: #0b7a6c; font-weight: 800; padding: 1px 10px; border-radius: 6px; letter-spacing: 0.08em; }
.pp-rule { height: 3px; background: #111827; margin: 22px 0; border-radius: 2px; }
.paper { font-size: 15px; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper.pdfmode { font-size: 15px; }
.pp-biz { font-size: 24px; font-weight: 800; }
.pp-title .word { font-size: 36px; font-weight: 800; letter-spacing: .02em; line-height: 1.05; }
.pp-num { font-size: 16px; font-weight: 700; color: #334155; margin-top: 4px; }
.pp-meta { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.pp-meta .k { font-size: 12px; font-weight: 800; color: #475569; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .07em; }
.pp-meta .strong { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.pp-scroll { overflow-x: auto; }
.pp-table { width: 100%; border-collapse: collapse; }
.pp-table th { text-align: left; font-size: 12px; color: #334155; font-weight: 800; padding: 11px 10px; background: #f1f5f9; text-transform: uppercase; letter-spacing: .07em; }
.pp-table td { padding: 15px 10px; border-bottom: 1px solid #e2e8f0; vertical-align: top; overflow-wrap: anywhere; font-size: 15.5px; font-weight: 500; }
.pp-table td:first-child { font-weight: 700; }
.pp-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-totals { margin: 18px 0 0 auto; width: min(340px, 100%); }
.pp-totals .l { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 15.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-totals .l span:first-child { color: #475569; font-weight: 600; }
.pp-due { margin-top: 14px; background: #111827; color: #fff; border-radius: 12px; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.pp-due .k { font-weight: 800; font-size: 16px; color: #cbd5e1; text-transform: uppercase; letter-spacing: .08em; }
.pp-due .v { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pp-foot { margin-top: 32px; display: grid; gap: 16px; }
.pp-foot .k { font-size: 12px; font-weight: 800; color: #475569; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .07em; }
.pp-foot .box { border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 14px 16px; }
.pp-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; font-size: 15px; }
.pp-dl dt { color: #475569; font-weight: 600; }
.pp-dl dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }

/* auth */
.auth { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-top: 24px; }
.auth h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; }
.auth .lead { color: var(--muted); font-size: 17px; margin: 14px 0 20px; max-width: 460px; }
.auth ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; }
.auth li { display: flex; gap: 8px; align-items: center; }
.auth li .ic { color: var(--pill-paid-ink); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.auth-card h2 { margin: 0 0 16px; font-size: 22px; letter-spacing: -0.02em; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-switch { margin: 16px 0 0; text-align: center; color: var(--muted); }
.auth-switch button { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; color: var(--link); }
.msg { border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
.msg.err { background: var(--pill-overdue-bg); color: var(--pill-overdue-ink); }
.msg.ok { background: var(--pill-paid-bg); color: var(--pill-paid-ink); }
.showpw { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.showpw input { width: auto; margin: 0; }
.center-note { text-align: center; padding: 80px 20px; color: var(--muted); }
.center-note h2 { color: var(--ink); margin: 0 0 8px; }
.who { font-size: 13px; color: var(--muted); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; gap: 28px; } .auth h1 { font-size: 32px; } .who { display: none !important; } }

/* toast + confetti */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 50; max-width: 90vw; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

@media (max-width: 900px) {
  .ed-grid { grid-template-columns: 1fr; }
  .pv-col { position: static; }
}
@media (max-width: 720px) {
  .app { padding: 20px 14px 60px; }
  .inv-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info amount" "due pill" "actions actions"; }
  .r-actions { justify-content: flex-start; }
  .paper { padding: 24px 18px; }
  .pp-head { flex-direction: column; }
  .pp-title { text-align: left; }
  .pp-meta { grid-template-columns: 1fr 1fr; }
  .pp-meta > div:first-child { grid-column: 1 / -1; }
  .nav { order: 3; width: 100%; margin-left: 0; }
}

.paper { font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.logo-center .pp-head { flex-direction: column; align-items: center; text-align: center; }
.logo-center .pp-brand { flex-direction: column; align-items: center; }
.logo-center .pp-title { text-align: center; }
.logo-center .pp-from { margin-inline: auto; }
.logo-right .pp-head { flex-direction: row-reverse; }
.logo-right .pp-brand { flex-direction: row-reverse; text-align: right; }
.logo-right .pp-title { text-align: left; }
.logosz-s .pp-logo { max-height: 40px; max-width: 100px; }
.logosz-l .pp-logo { max-height: 100px; max-width: 240px; }
.tpl-classic, .tpl-elegant { font-family: Georgia, "Times New Roman", "Noto Sans Devanagari", serif; }
.tpl-classic .pp-rule { background: #111827; height: 1px; }
.tpl-classic .pp-title .word { letter-spacing: 0.2em; }
.tpl-bold .pp-head { background: #111827; color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-bold .pp-tag, .tpl-bold .pp-from, .tpl-bold .pp-num { color: #cbd5e1; }
.tpl-bold .pp-rule { display: none; }
.tpl-bold .pp-meta { margin-top: 24px; }
.tpl-modern .pp-head { background: #2563eb; color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-modern .pp-tag, .tpl-modern .pp-from, .tpl-modern .pp-num { color: #dbeafe; }
.tpl-modern .pp-due { background: #eff6ff; border-top: 0; border-radius: 6px; padding: 14px 16px; }
.tpl-minimal .pp-rule { height: 1px; background: #111827; }
.tpl-minimal .pp-due { background: #111827; color: #fff; border-top: 0; border-radius: 4px; padding: 14px 16px; }
.tpl-minimal .pp-due .k { color: #cbd5e1; }

/* templates */
.tpl-classic .pp-rule { background: #111827; height: 2px; }
.tpl-classic .pp-table th { background: none; border-top: 2px solid #111827; border-bottom: 2px solid #111827; color: #111827; }
.tpl-classic .pp-due { background: #fff; color: #111827; border: 2px solid #111827; }
.tpl-classic .pp-due .k { color: #111827; }

.tpl-professional .pp-rule { height: 1px; background: #94a3b8; }
.tpl-professional .pp-meta { border: 1px solid #94a3b8; border-radius: 4px; padding: 14px 16px; background: #f8fafc; }
.tpl-professional .pp-table { border: 1px solid #94a3b8; }
.tpl-professional .pp-table th { background: #1e293b; color: #fff; }
.tpl-professional .pp-table td { border: 1px solid #cbd5e1; }
.tpl-professional .pp-due { background: #1e293b; border-radius: 4px; }

.tpl-creative { background: #fffaf5; }
.tpl-creative .pp-title .word { color: #7c3aed; }
.tpl-creative .pp-title .pp-num { background: #ede9fe; color: #5b21b6; display: inline-block; padding: 3px 12px; border-radius: 999px; }
.tpl-creative .pp-rule { height: 5px; border-radius: 99px; background: linear-gradient(90deg, #8b5cf6, #f472b6, #fb923c); }
.tpl-creative .pp-meta { background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: 0 0 0 1.5px #fde7d3; }
.tpl-creative .pp-table th { background: #f5f3ff; color: #5b21b6; }
.tpl-creative .pp-table th:first-child { border-radius: 12px 0 0 12px; } .tpl-creative .pp-table th:last-child { border-radius: 0 12px 12px 0; }
.tpl-creative .pp-due { border-radius: 20px; background: linear-gradient(120deg, #7c3aed, #db2777); }
.tpl-creative .pp-foot .box { border-radius: 16px; background: #fff; border-color: #fde7d3; }

.tpl-gst .pp-title .word { font-size: 32px; }
.tpl-gst .pp-rule { height: 3px; background: #b45309; }
.tpl-gst .pp-table { border: 1.5px solid #111827; }
.tpl-gst .pp-table th { background: #fef3c7; color: #111827; border: 1px solid #111827; }
.tpl-gst .pp-table td { border: 1px solid #94a3b8; }
.tpl-gst .pp-from { color: #111827; font-weight: 700; }
.tpl-gst .pp-totals .tax { background: #fffbeb; border-left: 4px solid #f59e0b; }
.tpl-gst .pp-totals .tax span:first-child { color: #92400e; font-weight: 800; }
.tpl-gst .pp-due { background: #111827; border-bottom: 5px solid #f59e0b; }

.paper .pp-due .v { color: #ffffff; }
.paper.tpl-classic .pp-due .v, .paper.tpl-classic .pp-due .k { color: #111827; }
.paper.tpl-modern .pp-due .k { color: #1d4ed8; }
.paper.tpl-modern .pp-due .v { color: #1e3a8a; }
.paper.tpl-modern .pp-biz, .paper.tpl-modern .pp-title .word { color: #ffffff; }
.paper.tpl-creative .pp-due .k { color: #fce7f3; }
.paper.tpl-gst .pp-due .k, .paper.tpl-professional .pp-due .k { color: #cbd5e1; }


/* public site */
.pub { max-width: 1060px; margin: 0 auto; }
.pubnav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0 18px; }
.pubnav .sp { flex: 1; }
.pn { background: none; border: 0; font: inherit; font-weight: 700; color: var(--muted); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.pn.on, .pn:hover { color: var(--ink); background: var(--surface); }
.hero { position: relative; overflow: hidden; text-align: center; padding: 64px 20px 56px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
.hero > * { position: relative; z-index: 1; }
.hero .blob { position: absolute; z-index: 0; width: 320px; height: 320px; border-radius: 50%; filter: blur(70px); opacity: .45; animation: bfloat 14s ease-in-out infinite alternate; }
.hero .b1 { background: #3b82f6; left: -60px; top: -80px; } .hero .b2 { background: #8b5cf6; right: -70px; bottom: -90px; animation-delay: -6s; } .hero .b3 { background: #14b8a6; left: 45%; top: 30%; width: 220px; height: 220px; animation-delay: -3s; }
@keyframes bfloat { to { transform: translate(60px, 40px) scale(1.2); } }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.08; font-weight: 800; margin: 0 auto 14px; max-width: 760px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 580px; margin: 0 auto 24px; }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.marq { overflow: hidden; margin: 22px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marq div { display: flex; gap: 12px; width: max-content; animation: mq 28s linear infinite; }
.marq span { border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 99px; font-weight: 700; white-space: nowrap; }
@keyframes mq { to { transform: translateX(-50%); } }
.sec { margin: 44px 0; } .sec h2 { font-size: 28px; font-weight: 800; margin: 0 0 6px; } .sec > p { color: var(--muted); margin: 0 0 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 20px; } .card h3 { margin: 0 0 6px; font-size: 18px; } .card p { margin: 0; color: var(--muted); }
.plan.best { border: 2px solid var(--primary); } .plan .price { font-size: 38px; font-weight: 800; } .plan ul { padding-left: 0; list-style: none; margin: 14px 0; } .plan li { padding: 4px 0; font-weight: 600; }
.cmp { width: 100%; border-collapse: collapse; } .cmp th, .cmp td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; } .cmp td + td, .cmp th + th { text-align: center; }
.pubfoot { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 40px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hero .blob, .marq div { animation: none; } }


/* extra templates */
.tpl-x_slate { --a: #334155; --t: #f1f5f9; --ab: #334155;  }
.tpl-x_slate .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_slate .pp-totals .l span:first-child { color: #334155; }
.tpl-x_slate .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_slate .pp-biz, .tpl-x_slate .pp-title .word { color: #fff; }
.tpl-x_slate .pp-tag, .tpl-x_slate .pp-from, .tpl-x_slate .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_slate .pp-rule { height: 1px; background: var(--t); }
.tpl-x_slate .pp-due { background: var(--ab); }
.paper.tpl-x_slate .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_slate .pp-due .v { color: #fff; }
.tc-x_slate { --ac: #334155; --th: #f1f5f9; --tb: #334155; --rd: 3px; border-top: 10px solid #334155;  }
.tpl-x_ocean { --a: #0e7490; --t: #cffafe; --ab: #0e7490;  }
.tpl-x_ocean .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_ocean .pp-totals .l span:first-child { color: #334155; }
.tpl-x_ocean .pp-biz, .tpl-x_ocean .pp-title .word { color: var(--a); }
.tpl-x_ocean .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_ocean .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_ocean .pp-due .k { color: var(--a); }
.paper.tpl-x_ocean .pp-due .v { color: #111827; }
.tc-x_ocean { --ac: #0e7490; --th: #cffafe; --tb: #cffafe; --rd: 3px;   }
.tpl-x_forest { --a: #166534; --t: #dcfce7; --ab: #166534;  }
.tpl-x_forest .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_forest .pp-totals .l span:first-child { color: #334155; }
.tpl-x_forest .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_forest .pp-biz, .tpl-x_forest .pp-title .word { color: #fff; }
.tpl-x_forest .pp-tag, .tpl-x_forest .pp-from, .tpl-x_forest .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_forest .pp-rule { height: 1px; background: var(--t); }
.tpl-x_forest .pp-due { background: var(--ab); }
.paper.tpl-x_forest .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_forest .pp-due .v { color: #fff; }
.tc-x_forest { --ac: #166534; --th: #dcfce7; --tb: #166534; --rd: 3px; border-top: 10px solid #166534;  }
.tpl-x_sunset { --a: #c2410c; --t: #ffedd5; --ab: #c2410c;  }
.tpl-x_sunset .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_sunset .pp-totals .l span:first-child { color: #334155; }
.tpl-x_sunset .pp-biz, .tpl-x_sunset .pp-title .word { color: var(--a); }
.tpl-x_sunset { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.tpl-x_sunset .pp-rule { height: 1px; background: var(--t); }
.tpl-x_sunset .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_sunset .pp-due .k { color: var(--a); }
.paper.tpl-x_sunset .pp-due .v { color: #111827; }
.tc-x_sunset { --ac: #c2410c; --th: #ffedd5; --tb: #ffedd5; --rd: 3px;  border-left: 6px solid #c2410c; }
.tpl-x_royal { --a: #4338ca; --t: #e0e7ff; --ab: #4338ca;  }
.tpl-x_royal .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_royal .pp-totals .l span:first-child { color: #334155; }
.tpl-x_royal .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_royal .pp-biz, .tpl-x_royal .pp-title .word { color: #fff; }
.tpl-x_royal .pp-tag, .tpl-x_royal .pp-from, .tpl-x_royal .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_royal .pp-rule { height: 1px; background: var(--t); }
.tpl-x_royal .pp-due { background: var(--ab); }
.paper.tpl-x_royal .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_royal .pp-due .v { color: #fff; }
.tc-x_royal { --ac: #4338ca; --th: #e0e7ff; --tb: #4338ca; --rd: 3px; border-top: 10px solid #4338ca;  }
.tpl-x_rose { --a: #be123c; --t: #ffe4e6; --ab: #be123c;  }
.tpl-x_rose .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_rose .pp-totals .l span:first-child { color: #334155; }
.tpl-x_rose .pp-biz, .tpl-x_rose .pp-title .word { color: var(--a); }
.tpl-x_rose .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_rose .pp-due { background: var(--ab); }
.paper.tpl-x_rose .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_rose .pp-due .v { color: #fff; }
.tc-x_rose { --ac: #be123c; --th: #ffe4e6; --tb: #be123c; --rd: 3px;   }
.tpl-x_midnight { --a: #0f172a; --t: #e2e8f0; --ab: #0f172a;  }
.tpl-x_midnight .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_midnight .pp-totals .l span:first-child { color: #334155; }
.tpl-x_midnight .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_midnight .pp-biz, .tpl-x_midnight .pp-title .word { color: #fff; }
.tpl-x_midnight .pp-tag, .tpl-x_midnight .pp-from, .tpl-x_midnight .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_midnight .pp-rule { height: 1px; background: var(--t); }
.tpl-x_midnight .pp-due { background: var(--ab); }
.paper.tpl-x_midnight .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_midnight .pp-due .v { color: #fff; }
.tc-x_midnight { --ac: #0f172a; --th: #e2e8f0; --tb: #0f172a; --rd: 3px; border-top: 10px solid #0f172a;  }
.tpl-x_emerald { --a: #047857; --t: #d1fae5; --ab: #047857;  }
.tpl-x_emerald .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_emerald .pp-totals .l span:first-child { color: #334155; }
.tpl-x_emerald .pp-biz, .tpl-x_emerald .pp-title .word { color: var(--a); }
.tpl-x_emerald { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.tpl-x_emerald .pp-rule { height: 1px; background: var(--t); }
.tpl-x_emerald .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_emerald .pp-due .k { color: var(--a); }
.paper.tpl-x_emerald .pp-due .v { color: #111827; }
.tc-x_emerald { --ac: #047857; --th: #d1fae5; --tb: #d1fae5; --rd: 3px;  border-left: 6px solid #047857; }
.tpl-x_plum { --a: #86198f; --t: #fae8ff; --ab: #86198f;  }
.tpl-x_plum .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_plum .pp-totals .l span:first-child { color: #334155; }
.tpl-x_plum .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_plum .pp-biz, .tpl-x_plum .pp-title .word { color: #fff; }
.tpl-x_plum .pp-tag, .tpl-x_plum .pp-from, .tpl-x_plum .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_plum .pp-rule { height: 1px; background: var(--t); }
.tpl-x_plum .pp-due { background: var(--ab); }
.paper.tpl-x_plum .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_plum .pp-due .v { color: #fff; }
.tc-x_plum { --ac: #86198f; --th: #fae8ff; --tb: #86198f; --rd: 3px; border-top: 10px solid #86198f;  }
.tpl-x_copper { --a: #92400e; --t: #fef3c7; --ab: #92400e; font-family: Georgia,'Times New Roman',serif; }
.tpl-x_copper .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_copper .pp-totals .l span:first-child { color: #334155; }
.tpl-x_copper .pp-biz, .tpl-x_copper .pp-title .word { color: var(--a); }
.tpl-x_copper .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_copper .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_copper .pp-due .k { color: var(--a); }
.paper.tpl-x_copper .pp-due .v { color: #111827; }
.tc-x_copper { --ac: #92400e; --th: #fef3c7; --tb: #fef3c7; --rd: 3px;   }
.tpl-x_tealbox { --a: #0f766e; --t: #ccfbf1; --ab: #0f766e;  }
.tpl-x_tealbox .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_tealbox .pp-totals .l span:first-child { color: #334155; }
.tpl-x_tealbox .pp-biz, .tpl-x_tealbox .pp-title .word { color: var(--a); }
.tpl-x_tealbox .pp-table { border: 1.5px solid var(--a); }
.tpl-x_tealbox .pp-table th { border: 1px solid var(--a); }
.tpl-x_tealbox .pp-table td { border: 1px solid #cbd5e1; }
.tpl-x_tealbox .pp-rule { height: 2px; background: var(--a); }
.tpl-x_tealbox .pp-due { background: var(--ab); }
.paper.tpl-x_tealbox .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_tealbox .pp-due .v { color: #fff; }
.tc-x_tealbox { --ac: #0f766e; --th: #ccfbf1; --tb: #0f766e; --rd: 3px;   }
.tpl-x_charcoal { --a: #27272a; --t: #f4f4f5; --ab: #27272a;  }
.tpl-x_charcoal .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_charcoal .pp-totals .l span:first-child { color: #334155; }
.tpl-x_charcoal .pp-biz, .tpl-x_charcoal .pp-title .word { color: var(--a); }
.tpl-x_charcoal .pp-table { border: 1.5px solid var(--a); }
.tpl-x_charcoal .pp-table th { border: 1px solid var(--a); }
.tpl-x_charcoal .pp-table td { border: 1px solid #cbd5e1; }
.tpl-x_charcoal .pp-rule { height: 2px; background: var(--a); }
.tpl-x_charcoal .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_charcoal .pp-due .k { color: var(--a); }
.paper.tpl-x_charcoal .pp-due .v { color: #111827; }
.tc-x_charcoal { --ac: #27272a; --th: #f4f4f5; --tb: #f4f4f5; --rd: 3px;   }
.tpl-x_sky { --a: #0369a1; --t: #e0f2fe; --ab: #0369a1;  }
.tpl-x_sky .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_sky .pp-totals .l span:first-child { color: #334155; }
.tpl-x_sky .pp-biz, .tpl-x_sky .pp-title .word { color: var(--a); }
.tpl-x_sky { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.tpl-x_sky .pp-rule { height: 1px; background: var(--t); }
.tpl-x_sky .pp-due { background: var(--ab); }
.paper.tpl-x_sky .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_sky .pp-due .v { color: #fff; }
.tc-x_sky { --ac: #0369a1; --th: #e0f2fe; --tb: #0369a1; --rd: 3px;  border-left: 6px solid #0369a1; }
.tpl-x_berry { --a: #9d174d; --t: #fce7f3; --ab: #9d174d;  }
.tpl-x_berry .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_berry .pp-totals .l span:first-child { color: #334155; }
.tpl-x_berry .pp-biz, .tpl-x_berry .pp-title .word { color: var(--a); }
.tpl-x_berry .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_berry .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_berry .pp-due .k { color: var(--a); }
.paper.tpl-x_berry .pp-due .v { color: #111827; }
.tc-x_berry { --ac: #9d174d; --th: #fce7f3; --tb: #fce7f3; --rd: 3px;   }
.tpl-x_olive { --a: #3f6212; --t: #ecfccb; --ab: #3f6212; font-family: Georgia,'Times New Roman',serif; }
.tpl-x_olive .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_olive .pp-totals .l span:first-child { color: #334155; }
.tpl-x_olive .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_olive .pp-biz, .tpl-x_olive .pp-title .word { color: #fff; }
.tpl-x_olive .pp-tag, .tpl-x_olive .pp-from, .tpl-x_olive .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_olive .pp-rule { height: 1px; background: var(--t); }
.tpl-x_olive .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_olive .pp-due .k { color: var(--a); }
.paper.tpl-x_olive .pp-due .v { color: #111827; }
.tc-x_olive { --ac: #3f6212; --th: #ecfccb; --tb: #ecfccb; --rd: 3px; border-top: 10px solid #3f6212;  }
.tpl-x_indigoline { --a: #3730a3; --t: #e0e7ff; --ab: #3730a3;  }
.tpl-x_indigoline .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_indigoline .pp-totals .l span:first-child { color: #334155; }
.tpl-x_indigoline .pp-biz, .tpl-x_indigoline .pp-title .word { color: var(--a); }
.tpl-x_indigoline .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_indigoline .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_indigoline .pp-due .k { color: var(--a); }
.paper.tpl-x_indigoline .pp-due .v { color: #111827; }
.tc-x_indigoline { --ac: #3730a3; --th: #e0e7ff; --tb: #e0e7ff; --rd: 3px;   }
.tpl-x_crimson { --a: #991b1b; --t: #fee2e2; --ab: #991b1b;  }
.tpl-x_crimson .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_crimson .pp-totals .l span:first-child { color: #334155; }
.tpl-x_crimson .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_crimson .pp-biz, .tpl-x_crimson .pp-title .word { color: #fff; }
.tpl-x_crimson .pp-tag, .tpl-x_crimson .pp-from, .tpl-x_crimson .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_crimson .pp-rule { height: 1px; background: var(--t); }
.tpl-x_crimson .pp-due { background: var(--ab); }
.paper.tpl-x_crimson .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_crimson .pp-due .v { color: #fff; }
.tc-x_crimson { --ac: #991b1b; --th: #fee2e2; --tb: #991b1b; --rd: 3px; border-top: 10px solid #991b1b;  }
.tpl-x_gold { --a: #a16207; --t: #fef9c3; --ab: #a16207; font-family: Georgia,'Times New Roman',serif; }
.tpl-x_gold .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_gold .pp-totals .l span:first-child { color: #334155; }
.tpl-x_gold .pp-biz, .tpl-x_gold .pp-title .word { color: var(--a); }
.tpl-x_gold { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.tpl-x_gold .pp-rule { height: 1px; background: var(--t); }
.tpl-x_gold .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_gold .pp-due .k { color: var(--a); }
.paper.tpl-x_gold .pp-due .v { color: #111827; }
.tc-x_gold { --ac: #a16207; --th: #fef9c3; --tb: #fef9c3; --rd: 3px;  border-left: 6px solid #a16207; }
.tpl-x_mint { --a: #15803d; --t: #f0fdf4; --ab: #15803d;  }
.tpl-x_mint .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_mint .pp-totals .l span:first-child { color: #334155; }
.tpl-x_mint .pp-biz, .tpl-x_mint .pp-title .word { color: var(--a); }
.tpl-x_mint .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_mint .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_mint .pp-due .k { color: var(--a); }
.paper.tpl-x_mint .pp-due .v { color: #111827; }
.tc-x_mint { --ac: #15803d; --th: #f0fdf4; --tb: #f0fdf4; --rd: 3px;   }
.tpl-x_navybox { --a: #1e3a8a; --t: #dbeafe; --ab: #1e3a8a;  }
.tpl-x_navybox .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_navybox .pp-totals .l span:first-child { color: #334155; }
.tpl-x_navybox .pp-biz, .tpl-x_navybox .pp-title .word { color: var(--a); }
.tpl-x_navybox .pp-table { border: 1.5px solid var(--a); }
.tpl-x_navybox .pp-table th { border: 1px solid var(--a); }
.tpl-x_navybox .pp-table td { border: 1px solid #cbd5e1; }
.tpl-x_navybox .pp-rule { height: 2px; background: var(--a); }
.tpl-x_navybox .pp-due { background: var(--ab); }
.paper.tpl-x_navybox .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_navybox .pp-due .v { color: #fff; }
.tc-x_navybox { --ac: #1e3a8a; --th: #dbeafe; --tb: #1e3a8a; --rd: 3px;   }
.tpl-x_lavender { --a: #6d28d9; --t: #ede9fe; --ab: #6d28d9;  }
.tpl-x_lavender .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_lavender .pp-totals .l span:first-child { color: #334155; }
.tpl-x_lavender .pp-biz, .tpl-x_lavender .pp-title .word { color: var(--a); }
.tpl-x_lavender { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.tpl-x_lavender .pp-rule { height: 1px; background: var(--t); }
.tpl-x_lavender .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_lavender .pp-due .k { color: var(--a); }
.paper.tpl-x_lavender .pp-due .v { color: #111827; }
.tc-x_lavender { --ac: #6d28d9; --th: #ede9fe; --tb: #ede9fe; --rd: 3px;  border-left: 6px solid #6d28d9; }
.tpl-x_sand { --a: #78350f; --t: #fef3c7; --ab: #78350f; font-family: Georgia,'Times New Roman',serif; }
.tpl-x_sand .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_sand .pp-totals .l span:first-child { color: #334155; }
.tpl-x_sand .pp-biz, .tpl-x_sand .pp-title .word { color: var(--a); }
.tpl-x_sand .pp-rule { height: 4px; background: var(--ab); border-radius: 2px; }
.tpl-x_sand .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.tpl-x_sand .pp-due .k { color: var(--a); }
.paper.tpl-x_sand .pp-due .v { color: #111827; }
.tc-x_sand { --ac: #78350f; --th: #fef3c7; --tb: #fef3c7; --rd: 3px;   }
.tpl-x_steel { --a: #475569; --t: #e2e8f0; --ab: #475569;  }
.tpl-x_steel .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_steel .pp-totals .l span:first-child { color: #334155; }
.tpl-x_steel .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_steel .pp-biz, .tpl-x_steel .pp-title .word { color: #fff; }
.tpl-x_steel .pp-tag, .tpl-x_steel .pp-from, .tpl-x_steel .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_steel .pp-rule { height: 1px; background: var(--t); }
.tpl-x_steel .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_steel .pp-due .k { color: var(--a); }
.paper.tpl-x_steel .pp-due .v { color: #111827; }
.tc-x_steel { --ac: #475569; --th: #e2e8f0; --tb: #e2e8f0; --rd: 3px; border-top: 10px solid #475569;  }
.tpl-x_typewriter { --a: #111827; --t: #f3f4f6; --ab: #111827; font-family: ui-monospace,Menlo,Consolas,monospace; }
.tpl-x_typewriter .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_typewriter .pp-totals .l span:first-child { color: #334155; }
.tpl-x_typewriter .pp-biz, .tpl-x_typewriter .pp-title .word { color: var(--a); }
.tpl-x_typewriter .pp-table { border: 1.5px solid var(--a); }
.tpl-x_typewriter .pp-table th { border: 1px solid var(--a); }
.tpl-x_typewriter .pp-table td { border: 1px solid #cbd5e1; }
.tpl-x_typewriter .pp-rule { height: 2px; background: var(--a); }
.tpl-x_typewriter .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.tpl-x_typewriter .pp-due .k { color: var(--a); }
.paper.tpl-x_typewriter .pp-due .v { color: #111827; }
.tc-x_typewriter { --ac: #111827; --th: #f3f4f6; --tb: #f3f4f6; --rd: 3px;   }
.tpl-x_aurora { --a: #0369a1; --t: #ede9fe; --ab: linear-gradient(120deg,#0369a1,#7c3aed);  }
.tpl-x_aurora .pp-table th { background: var(--t); color: var(--a); }
.tpl-x_aurora .pp-totals .l span:first-child { color: #334155; }
.tpl-x_aurora .pp-head { background: var(--ab); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.tpl-x_aurora .pp-biz, .tpl-x_aurora .pp-title .word { color: #fff; }
.tpl-x_aurora .pp-tag, .tpl-x_aurora .pp-from, .tpl-x_aurora .pp-num { color: rgba(255,255,255,.88); }
.tpl-x_aurora .pp-rule { height: 1px; background: var(--t); }
.tpl-x_aurora .pp-due { background: var(--ab); }
.paper.tpl-x_aurora .pp-due .k { color: rgba(255,255,255,.88); }
.paper.tpl-x_aurora .pp-due .v { color: #fff; }
.tc-x_aurora { --ac: #0369a1; --th: #ede9fe; --tb: linear-gradient(120deg,#0369a1,#7c3aed); --rd: 3px; border-top: 10px solid #0369a1;  }


.paper .pp-logo { width: var(--logo-w, 150px); max-width: 100%; max-height: 170px; height: auto; object-fit: contain; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 9px 18px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.prof-prev { margin-bottom: 16px; }
.prof-view { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.15); }
.prof-view .paper { margin: 0; }
@media (min-width: 1180px) { .prof-prev { position: fixed; top: 96px; right: max(24px, calc((100vw - 1180px) / 2)); width: 420px; z-index: 5; } }


/* generated templates */
.gc-ruby { --a: #be123c; --t: #ffe4e6;  }
.gc-cherry { --a: #9f1239; --t: #fce7f3;  }
.gc-coral { --a: #c2410c; --t: #ffedd5;  }
.gc-amber { --a: #b45309; --t: #fef3c7;  }
.gc-honey { --a: #a16207; --t: #fef9c3; font-family: Georgia,'Times New Roman',serif; }
.gc-lime { --a: #4d7c0f; --t: #ecfccb;  }
.gc-fern { --a: #15803d; --t: #dcfce7;  }
.gc-jade { --a: #047857; --t: #d1fae5;  }
.gc-spruce { --a: #115e59; --t: #ccfbf1;  }
.gc-lagoon { --a: #0e7490; --t: #cffafe; font-family: Georgia,'Times New Roman',serif; }
.gc-azure { --a: #0369a1; --t: #e0f2fe;  }
.gc-cobalt { --a: #1d4ed8; --t: #dbeafe;  }
.gc-sapphire { --a: #1e40af; --t: #e0e7ff;  }
.gc-iris { --a: #4f46e5; --t: #e0e7ff;  }
.gc-violet { --a: #6d28d9; --t: #ede9fe; font-family: Georgia,'Times New Roman',serif; }
.gc-orchid { --a: #a21caf; --t: #fae8ff;  }
.gc-magenta { --a: #be185d; --t: #fce7f3;  }
.gc-brick { --a: #9a3412; --t: #ffedd5;  }
.gc-cocoa { --a: #78350f; --t: #f5ebe0;  }
.gc-stone { --a: #44403c; --t: #f5f5f4; font-family: Georgia,'Times New Roman',serif; }
.gc-graphite { --a: #1f2937; --t: #f3f4f6;  }
.gc-ink { --a: #0f172a; --t: #e2e8f0;  }
.gc-pine { --a: #14532d; --t: #dcfce7;  }
.gc-ember { --a: #b91c1c; --t: #fee2e2;  }
.gc-dusk { --a: #581c87; --t: #f3e8ff; font-family: Georgia,'Times New Roman',serif; }
.gc-marine { --a: #164e63; --t: #cffafe;  }
.paper.gk .pp-table th { background: var(--t); color: var(--a); }
.paper.gk .pp-totals .l span:first-child { color: #334155; }
.paper.gk .pp-biz, .paper.gk .pp-title .word { color: var(--a); }
.paper.gk-band .pp-head { background: var(--a); color: #fff; margin: calc(-1 * var(--py)) calc(-1 * var(--px)) 0; padding: var(--py) var(--px) 28px; }
.paper.gk-band .pp-biz, .paper.gk-band .pp-title .word { color: #fff; }
.paper.gk-band .pp-tag, .paper.gk-band .pp-from, .paper.gk-band .pp-num { color: rgba(255,255,255,.88); }
.paper.gk-band .pp-rule, .paper.gk-side .pp-rule { height: 1px; background: var(--t); }
.paper.gk-line .pp-rule { height: 4px; background: var(--a); border-radius: 2px; }
.paper.gk-box .pp-rule { height: 2px; background: var(--a); }
.paper.gk-box .pp-table { border: 1.5px solid var(--a); }
.paper.gk-box .pp-table th { border: 1px solid var(--a); }
.paper.gk-box .pp-table td { border: 1px solid #cbd5e1; }
.paper.gk-side { background: linear-gradient(90deg, var(--a) 0 12px, #ffffff 12px); }
.paper.gk-frame { border: 5px solid var(--a); }
.paper.gk-frame .pp-rule { height: 2px; background: var(--a); }
.paper.gk-band .pp-due, .paper.gk-side .pp-due { background: var(--a); }
.paper.gk-band .pp-due .k, .paper.gk-side .pp-due .k { color: rgba(255,255,255,.88); }
.paper.gk-band .pp-due .v, .paper.gk-side .pp-due .v { color: #fff; }
.paper.gk-line .pp-due, .paper.gk-frame .pp-due { background: var(--t); border-left: 6px solid var(--a); }
.paper.gk-line .pp-due .k, .paper.gk-frame .pp-due .k { color: var(--a); }
.paper.gk-line .pp-due .v, .paper.gk-frame .pp-due .v { color: #111827; }
.paper.gk-box .pp-due { background: #fff; border: 2px solid var(--a); }
.paper.gk-box .pp-due .k { color: var(--a); }
.paper.gk-box .pp-due .v { color: #111827; }
.tp-thumb.gk { --ac: var(--a); --th: var(--t); --tb: var(--t); --rd: 3px; }
.tp-thumb.gk-band { border-top: 10px solid var(--a); --tb: var(--a); }
.tp-thumb.gk-side { border-left: 6px solid var(--a); --tb: var(--a); }
.tp-thumb.gk-frame { border: 3px solid var(--a); }
.tp-thumb.gk-box { --tb: #fff; outline: 1px solid var(--a); outline-offset: -4px; }
.tp-thumb.gk-box .d { border: 2px solid var(--a); }
/* PAID badge: always visible, medium size, on any background */
.paper .paid-mark { display: inline-block; margin-top: 8px; background: #ffffff; color: #0b7a6c; border: 2.5px solid #0b7a6c; font-size: 16px; font-weight: 800; line-height: 1; padding: 6px 18px; border-radius: 8px; letter-spacing: .12em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }


.tp-wrap { min-width: 0; } .tp-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 10px 0 6px; }
.tp-row { display: flex; gap: 8px; overflow-x: auto; padding: 3px 3px 8px; } .tp-row .tp { flex: 0 0 104px; }
.tp-more { margin-top: 6px; } .tp-more summary { cursor: pointer; font-weight: 800; color: var(--primary); padding: 6px 0; }
.tp-more[open] { max-height: 420px; overflow-y: auto; }
.tp { transition: transform .18s, box-shadow .18s; } .tp:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.tp[aria-pressed="true"]::after { content: "✓"; position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; display: grid; place-items: center; }
.design-strip { padding: 10px 14px; margin-bottom: 12px; } .design-strip h2 { margin: 0 0 4px; font-size: 16px; }
.pv-col .paper { box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.22); transition: transform .25s, box-shadow .25s; }
.pv-col .paper:hover { transform: translateY(-3px); box-shadow: 0 2px 2px rgba(0,0,0,.08), 0 20px 44px rgba(0,0,0,.28); }
.cards.stack { grid-template-columns: 1fr; } .cards.stack .card { padding: 26px 30px; }
.step { display: flex; gap: 18px; align-items: flex-start; } .step .num { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; }
.ctab { text-align: center; padding: 36px 20px; border-radius: 20px; background: var(--primary); color: #fff; } .ctab h2 { margin: 0 0 14px; color: #fff; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }

.prof-div { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.hero .blob, .marq { display: none; }
.hero { background: var(--surface); padding: 56px 24px; text-align: left; }
.hero h1, .sec h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }
.hero p, .hero .cta { margin-left: 0; justify-content: flex-start; }
.ctab { background: var(--ink); }
/* design gallery */
.tp-grid { padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tp { border: 2px solid var(--line); border-radius: 10px; background: var(--surface); padding: 5px; position: relative; cursor: pointer; text-align: center; font-weight: 800; font-size: 13px; color: var(--ink); }
.tp:hover { border-color: var(--muted); }
.tp[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--glow1); }
.tp-thumb { aspect-ratio: 16 / 10; background: #fff; border-radius: 6px; border: 1px solid #e2e8f0; padding: 6px; display: flex; flex-direction: column; gap: 3px; margin-bottom: 5px; overflow: hidden; }
.tp-thumb i { display: block; height: 5px; border-radius: 2px; background: #cbd5e1; }
.tp-thumb .h { width: 55%; height: 8px; background: var(--ac); }
.tp-thumb .t { height: 8px; margin-top: 5px; background: var(--th); }
.tp-thumb .d { margin-top: auto; height: 10px; border-radius: var(--rd); background: var(--tb); }
.tc-classic { --ac: #111827; --th: #e5e7eb; --tb: #111827; --rd: 2px; }
.tc-modern { --ac: #2563eb; --th: #2563eb; --tb: #dbeafe; --rd: 4px; border-top: 12px solid #2563eb; }
.tc-professional { --ac: #1e293b; --th: #1e293b; --tb: #1e293b; --rd: 2px; }
.tc-creative { --ac: #7c3aed; --th: #ddd6fe; --tb: linear-gradient(120deg, #7c3aed, #db2777); --rd: 9px; background: #fffaf5; }
.tc-gst { --ac: #b45309; --th: #fde68a; --tb: #111827; --rd: 2px; }
.tc-gst .d { border-bottom: 3px solid #f59e0b; }

/* dark mode: make calendar icon visible (blue) */
:root[data-theme="dark"] input[type="date"] { color-scheme: dark; }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(48%) sepia(90%) saturate(2400%) hue-rotate(205deg); opacity: 1; cursor: pointer; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="date"] { color-scheme: dark; }
  :root:not([data-theme="light"]) input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(48%) sepia(90%) saturate(2400%) hue-rotate(205deg); opacity: 1; cursor: pointer; }
}
@media print {
  :root { padding: 0 !important; }
  html, body { margin: 0; }
  body { background: #fff; }
  .top, .ed-head, .panel, .pv-actions, #toast { display: none !important; }
  .app { padding: 0; max-width: none; }
  .ed-grid { display: block; }
  .pv-col { position: static; }
  .paper { --px: 15mm; --py: 16mm; box-shadow: none; border-radius: 0; width: 210mm; min-height: 296mm; aspect-ratio: auto; }
  .empty { color: #111827; }
}

/* ===== Design system v2: calm palette, one accent. Change tokens here only. ===== */
:root { --bg:#f6f5f1; --surface:#ffffff; --ink:#17191c; --muted:#5b616a; --line:#d9d7d1; --field:#f1efe9; --primary:#17191c; --primary-ink:#ffffff; --link:#2f4a0a; --mint:#d8ff5b; --mint-ink:#11140a; --danger:#b4282e;
  --pill-draft-bg:#ecebe6; --pill-draft-ink:#4a4f57; --pill-sent-bg:#f3ead2; --pill-sent-ink:#6b4f12; --pill-overdue-bg:#fbe4e4; --pill-overdue-ink:#9c2a2a; --pill-paid-bg:#e3f3c2; --pill-paid-ink:#2f4a0a; --glow1:rgba(120,120,120,.22); --glow2:transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#0b0d10; --surface:#111419; --ink:#ece9e4; --muted:#a3a8b0; --line:#2a3037; --field:#0d1014; --primary:#d8ff5b; --primary-ink:#11140a; --link:#c8e86b; --mint:#d8ff5b; --mint-ink:#11140a; --danger:#ef8f8f;
  --pill-draft-bg:#1d2127; --pill-draft-ink:#c5c9cf; --pill-sent-bg:#2e2a1c; --pill-sent-ink:#e0c58f; --pill-overdue-bg:#3a1f1f; --pill-overdue-ink:#f1a5a5; --pill-paid-bg:#26310f; --pill-paid-ink:#d3f07a; --glow1:rgba(160,160,160,.25); --glow2:transparent; } }
:root[data-theme="dark"] { --bg:#0b0d10; --surface:#111419; --ink:#ece9e4; --muted:#a3a8b0; --line:#2a3037; --field:#0d1014; --primary:#d8ff5b; --primary-ink:#11140a; --link:#c8e86b; --mint:#d8ff5b; --mint-ink:#11140a; --danger:#ef8f8f;
  --pill-draft-bg:#1d2127; --pill-draft-ink:#c5c9cf; --pill-sent-bg:#2e2a1c; --pill-sent-ink:#e0c58f; --pill-overdue-bg:#3a1f1f; --pill-overdue-ink:#f1a5a5; --pill-paid-bg:#26310f; --pill-paid-ink:#d3f07a; --glow1:rgba(160,160,160,.25); --glow2:transparent; }
:root[data-theme="light"] { --bg:#f6f5f1; --surface:#ffffff; --ink:#17191c; --muted:#5b616a; --line:#d9d7d1; --field:#f1efe9; --primary:#17191c; --primary-ink:#ffffff; --link:#2f4a0a; --mint:#d8ff5b; --mint-ink:#11140a; --danger:#b4282e;
  --pill-draft-bg:#ecebe6; --pill-draft-ink:#4a4f57; --pill-sent-bg:#f3ead2; --pill-sent-ink:#6b4f12; --pill-overdue-bg:#fbe4e4; --pill-overdue-ink:#9c2a2a; --pill-paid-bg:#e3f3c2; --pill-paid-ink:#2f4a0a; --glow1:rgba(120,120,120,.22); --glow2:transparent; }
body { font-size: 15px; line-height: 1.55; }
.hint, small, .muted { font-size: 14px; }
.btn { border-radius: 8px; min-height: 44px; justify-content: center; }
.btn.small { min-height: 36px; }
.btn.primary:hover { background: var(--primary); filter: brightness(.94); }
.btn.mint:hover { background: var(--mint); filter: brightness(.94); }
.panel { border-radius: 10px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.hero { border-radius: 12px; }
.ctab { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.ctab h2 { color: var(--ink); }

/* ===== Public pages: plain, document-like. No boxes. ===== */
.pub { max-width: 1180px; }
.pubnav { border-bottom: 1px solid var(--line); padding: 14px 0; margin-bottom: 0; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.pub .hero { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 96px 0 84px; text-align: left; overflow: visible; }
.pub .hero h1 { font-family: var(--font); font-size: clamp(42px, 7vw, 82px); line-height: .98; letter-spacing: -.05em; font-weight: 600; margin: 18px 0 26px; max-width: 820px; }
.pub .hero p { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 580px; margin: 0 0 30px; }
.pub .hero .cta { justify-content: flex-start; }
.pub .sec { margin: 0; padding: 72px 0; border-bottom: 1px solid var(--line); }
.pub .sec h2 { font-family: var(--font); font-size: clamp(28px, 4vw, 38px); font-weight: 600; letter-spacing: -.04em; margin: 0 0 28px; }
.pub .card { background: none; border: 0; border-radius: 0; padding: 0; }
.pub .cards.stack { display: block; border-top: 1px solid var(--line); }
.pub .cards.stack .card { padding: 24px 0; border-bottom: 1px solid var(--line); max-width: 760px; }
.pub .cards.stack .card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 8px; }
.pub .cards.stack .card p { font-size: 16px; line-height: 1.65; }
.pub .step .num { background: none; color: var(--muted); border-radius: 0; width: auto; height: auto; flex: 0 0 56px; display: block; font-size: 14px; font-weight: 600; padding-top: 4px; }
.pub .step .num::before { content: "0"; }
.pub .card:has(.thumbs) { display: none; }
.pub .card.plan { border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.pub .card.plan.best { border: 1px solid var(--ink); }
.pub .ctab { background: none; border: 0; text-align: left; padding: 72px 0 40px; border-radius: 0; }
.pub .ctab h2 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 20px; }
.pub .cmp td, .pub .cmp th { padding: 14px 10px 14px 0; }

/* no divider lines on public pages */
.pubnav, .pub .hero, .pub .sec, .pub .cards.stack, .pub .cards.stack .card, .pubfoot { border: 0 !important; }
.pub .sec { padding: 64px 0; } .pub .cards.stack .card { padding: 18px 0 22px; max-width: 780px; }
.pub .cmp td, .pub .cmp th { border: 0; }
.pub .card.plan { border: 1px solid var(--line) !important; }
.pub .card.plan.best { border: 1px solid var(--ink) !important; }
.pub textarea { width: 100%; font: inherit; background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; }
.pub .plan ul { padding-left: 0; list-style: none; } .pub .plan li { padding: 4px 0; font-size: 16px; }

/* ===== Brand colour v3: light by default, one deep-green accent ===== */
:root, :root[data-theme="light"] { --bg:#f7f6f2; --surface:#ffffff; --ink:#16181a; --muted:#5a6068; --line:#dcdad3; --field:#f0eee8; --primary:#1f6b4a; --primary-ink:#ffffff; --link:#1f6b4a; --mint:#1f6b4a; --mint-ink:#ffffff; --danger:#b4282e;
  --pill-draft-bg:#ecebe6; --pill-draft-ink:#4a4f57; --pill-sent-bg:#f6ecd3; --pill-sent-ink:#6b4f12; --pill-overdue-bg:#fbe4e4; --pill-overdue-ink:#9c2a2a; --pill-paid-bg:#dcf1e5; --pill-paid-ink:#14573a; --glow1:rgba(31,107,74,.2); --glow2:transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="dark"]) { --bg:#f7f6f2; --surface:#ffffff; --ink:#16181a; --muted:#5a6068; --line:#dcdad3; --field:#f0eee8; --primary:#1f6b4a; --primary-ink:#ffffff; --link:#1f6b4a; --mint:#1f6b4a; --mint-ink:#ffffff; --danger:#b4282e;
  --pill-draft-bg:#ecebe6; --pill-draft-ink:#4a4f57; --pill-sent-bg:#f6ecd3; --pill-sent-ink:#6b4f12; --pill-overdue-bg:#fbe4e4; --pill-overdue-ink:#9c2a2a; --pill-paid-bg:#dcf1e5; --pill-paid-ink:#14573a; --glow1:rgba(31,107,74,.2); --glow2:transparent; } }
:root[data-theme="dark"] { --bg:#0d1210; --surface:#131a16; --ink:#ece9e4; --muted:#a2aca6; --line:#26302a; --field:#0e1411; --primary:#5fcf9a; --primary-ink:#07140d; --link:#7fdcae; --mint:#5fcf9a; --mint-ink:#07140d; --danger:#ef8f8f;
  --pill-draft-bg:#1d2420; --pill-draft-ink:#c5cdc8; --pill-sent-bg:#2e2a1c; --pill-sent-ink:#e0c58f; --pill-overdue-bg:#3a1f1f; --pill-overdue-ink:#f1a5a5; --pill-paid-bg:#17382a; --pill-paid-ink:#9be8c1; --glow1:rgba(95,207,154,.25); --glow2:transparent; }
.zlogo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.04em; color: var(--ink); }
.zlogo svg, .zlogo img.zl { width: 24px; height: 24px; flex: none; }
.zlogo img.zl-light { border-radius: 0; }
.zl-dark { display: none; } .zl-light { display: inline-block; }
:root[data-theme="dark"] .zl-dark { display: inline-block; } :root[data-theme="dark"] .zl-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zl-dark { display: inline-block; } :root:not([data-theme="light"]) .zl-light { display: none; } }

.top-in .pubnav { display: flex; gap: 2px; padding: 0; margin: 0 0 0 10px; }
.top-in .pubnav .pn { padding: 8px 12px; }
.top-in .pubact { display: flex; gap: 8px; }
.pub { padding-top: 8px; }
@media (max-width: 720px) { .top-in .pubnav { order: 3; width: 100%; margin: 0; overflow-x: auto; } }

.paper .zwm { position: absolute; left: 50%; top: 50%; width: 440px; max-width: 80%; transform: translate(-50%, -50%) rotate(-24deg); opacity: .09; pointer-events: none; z-index: 0; }
.paper .zwm svg { display: block; width: 100%; height: auto; }

#who, #logoutBtn { display: none !important; }
.acct { position: relative; } .acct-btn { font-weight: 800; background: var(--primary); color: var(--primary-ink); border-color: var(--primary); border-radius: 50%; }
.menu { position: absolute; right: 0; top: 48px; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px; z-index: 60; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.menu[hidden] { display: none; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 11px 12px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.menu button:hover { background: var(--field); } .menu .m { padding: 8px 12px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; } .menu .up { font-weight: 800; color: var(--link); }
.paper .zwm img { display: block; width: 100%; height: auto; }
.paper .zmade { position: absolute; right: 22px; bottom: 16px; display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; color: #5a6068; z-index: 1; }
.pp-qr { display: block; width: 128px; height: 128px; margin-top: 12px; image-rendering: pixelated; }
.design-strip { margin: 6px 0 4px; }

header.top nav.nav { display: none !important; }
.pub .card.plan { text-align: left; }

.pub .sec.ctr { text-align: center; }
.pub .sec.ctr p { margin-left: auto !important; margin-right: auto !important; }
.pub .sec.ctr .cards { margin-left: auto !important; margin-right: auto !important; }
.pub .sec.ctr .card { text-align: left; }

.pp-payrow { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; } .pp-payrow .pp-qr { margin-top: 0; }
.zilo { position: absolute; width: 56px; z-index: 30; cursor: pointer; transition: left .8s ease, top .8s ease, opacity .6s, transform .6s ease-in; }
.zilo svg { display: block; animation: zfloat 2.4s ease-in-out infinite; }
.zilo.hop svg { animation: zhop .65s ease-out; }
.zilo.bye { transform: translateY(170px); opacity: 0; pointer-events: none; }
@keyframes zfloat { 50% { transform: translateY(-5px); } } @keyframes zhop { 40% { transform: translateY(-22px) rotate(-8deg); } }
.zbub { position: absolute; bottom: 62px; left: -24px; white-space: nowrap; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 6px 11px; border-radius: 10px; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; pointer-events: none; }
.zbub.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .zilo, .zilo svg { transition: none; animation: none !important; } }

.zilo { position: fixed; bottom: 6px; left: 24px; right: auto; top: auto; width: 56px; height: 74px; z-index: 25; pointer-events: none; cursor: default; transition: left 2s linear; }
.zilo svg { display: block; width: 56px; height: 74px; animation: none; overflow: visible; }
.zilo .leg, .zilo .arm { transform-box: fill-box; transform-origin: 50% 0; }
.zilo.walk:not(.idle) .zb { animation: zbob .45s ease-in-out infinite alternate; }
.zilo.walk:not(.idle) .leg.l, .zilo.walk:not(.idle) .arm.r { animation: zsw .45s ease-in-out infinite alternate; }
.zilo.walk:not(.idle) .leg.r, .zilo.walk:not(.idle) .arm.l { animation: zsw .45s ease-in-out infinite alternate-reverse; }
.zilo.sit { left: auto; right: 14px; bottom: 6px; transform: scale(.75); transform-origin: bottom right; transition: none; }
.zilo.sit .leg { transform: rotate(0); }
.zilo.bye { transform: translateY(130px); opacity: 0; transition: transform .6s ease-in, opacity .6s; }
@keyframes zsw { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } } @keyframes zbob { to { transform: translateY(-2px); } }
.zbub { bottom: 78px; left: -34px; }
.pp-qr { width: 104px; height: 104px; } .pp-payrow .pp-qr { margin-top: 0; }
.seg button { min-height: 36px; }
@media (prefers-reduced-motion: reduce) { .zilo .zb, .zilo .leg, .zilo .arm { animation: none !important; } }

.pp-qrbox { text-align: center; } .pp-qrcap { font-size: 12px; font-weight: 800; color: #475569; margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; }
.pp-qr { border: 1px solid #cbd5e1; padding: 6px; background: #fff; border-radius: 8px; box-sizing: content-box; }

/* ---- public site additions ---- */
a.brand,a.pn,a.btn{text-decoration:none;color:inherit}
a.btn.primary{color:var(--primary-ink,#fff)}
a.pn{display:inline-block}
.top-in .pubnav{padding:0;border:0;margin:0}
.pubact{display:flex;gap:8px;align-items:center}
.starpick{display:flex;gap:2px;margin:2px 0 6px}
.starpick button{background:none;border:0;cursor:pointer;font-size:34px;line-height:1;padding:2px 3px;color:var(--line);transition:transform .1s}
.starpick button:hover{transform:scale(1.12)}
.starpick button.on{color:#f5a623}
.stars{color:#f5a623;letter-spacing:2px;font-size:20px}
.stars .off{color:var(--line)}
/* ---- invoice page fill, footer and total fixes ---- */
.pp-due .v{font-variant-numeric:normal;letter-spacing:-0.01em}
.pp-fill{flex:1 1 auto;min-height:20px;margin-top:4px;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 41px,rgba(100,116,139,.24) 41px,rgba(100,116,139,.24) 42px)}
.paper.pdfmode{min-height:1122px}
.pp-foot{margin-top:auto!important}

/* ===== Dark by default; light only when the visitor chooses it ===== */
:root:not([data-theme="light"]) { --bg:#0d1210; --surface:#131a16; --ink:#ece9e4; --muted:#a2aca6; --line:#26302a; --field:#0e1411; --primary:#5fcf9a; --primary-ink:#07140d; --link:#7fdcae; --mint:#5fcf9a; --mint-ink:#07140d; --danger:#ef8f8f;
  --pill-draft-bg:#1d2420; --pill-draft-ink:#c5cdc8; --pill-sent-bg:#2e2a1c; --pill-sent-ink:#e0c58f; --pill-overdue-bg:#3a1f1f; --pill-overdue-ink:#f1a5a5; --pill-paid-bg:#17382a; --pill-paid-ink:#9be8c1; --glow1:rgba(95,207,154,.25); --glow2:transparent; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ===== Phone layout ===== */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 720px) {
  .top-in { padding: 8px 12px; gap: 8px; }
  .top-right { gap: 6px; }
  .pubact .btn { padding: 8px 11px; font-size: 13px; min-height: 40px; }
  .brand .zlogo { font-size: 20px; }
  .menu { max-width: calc(100vw - 24px); }
  .pub .hero { padding: 44px 0 40px; }
  .pub .hero h1 { font-size: clamp(34px, 11vw, 46px); }
  .pub .hero p { font-size: 17px; }
  .pub .sec { padding: 40px 0; }
  .pub .sec h2 { font-size: 26px; }
  .pub .cards.stack .card { padding: 14px 0 18px; }
  .pub .sec.ctr .cards { grid-template-columns: 1fr; }
  .cmp th, .cmp td { padding: 10px 6px 10px 0; font-size: 14px; }
  .pubfoot { flex-direction: column; gap: 8px; }
  .filters { flex-wrap: wrap; }
  .page-head { gap: 10px; }
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 44px; }
  .paper { padding: 22px 16px; font-size: 14px; }
  .pp-biz { font-size: 19px; }
  .pp-title .word { font-size: 24px; }
  .pp-num { font-size: 14px; }
  .pp-meta .strong { font-size: 15px; }
  .pp-table th { padding: 8px 5px; font-size: 11px; }
  .pp-table td { padding: 10px 5px; font-size: 13.5px; }
  .pp-totals { width: 100%; } .pp-totals .l { font-size: 14px; }
  .pp-due { padding: 14px 16px; flex-wrap: wrap; } .pp-due .k { font-size: 13px; } .pp-due .v { font-size: 28px; }
  .pp-payrow { flex-direction: column; }
  .pp-foot { margin-top: 22px; }
  .tp-row .tp { flex: 0 0 92px; }
  .seg button { padding: 9px 12px; }
}
@media (max-width: 380px) { .pubact .btn.small:not(.primary) { display: none; } }

/* PDF: compact mode so a normal invoice fits one A4 page */
.paper.pdfmode.tight { --py: 38px; font-size: 14px; }
.tight .pp-rule { margin: 14px 0; }
.tight .pp-meta { margin-bottom: 16px; }
.tight .pp-table td { padding: 10px; } .tight .pp-table th { padding: 9px 10px; }
.tight .pp-totals { margin-top: 10px; } .tight .pp-totals .l { padding: 4px 10px; }
.tight .pp-due { padding: 14px 20px; } .tight .pp-due .v { font-size: 32px; }
.tight .pp-foot { margin-top: 18px !important; padding-top: 12px; gap: 10px; }
.tight .pp-foot .box { padding: 10px 14px; }
.tight .pp-qr { width: 88px; height: 88px; }
.tight .pp-title .word { font-size: 32px; }

/* interactive reviews */
.rv-sum { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; padding: 22px 0; border-bottom: 1px solid var(--line); max-width: 760px; }
.rv-avg { text-align: center; min-width: 120px; } .rv-big { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -.03em; } .rv-cnt { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rv-stars { color: #f5b301; letter-spacing: 2px; font-size: 18px; } .rv-stars .off { color: var(--line); }
.rv-bars { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.rv-bar { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 6px; border-radius: 8px; cursor: pointer; color: inherit; font: inherit; font-size: 14px; }
.rv-bar:hover, .rv-bar.on { background: var(--surface); } .rv-bar.on .rv-lbl { font-weight: 700; }
.rv-lbl { width: 34px; text-align: left; } .rv-n { width: 28px; text-align: right; color: var(--muted); }
.rv-track { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; } .rv-fill { display: block; height: 100%; width: 0; background: #f5b301; transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rv-tools { display: flex; align-items: center; gap: 12px; padding: 14px 0; max-width: 760px; } .rv-flt { flex: 1; color: var(--muted); font-size: 14px; }
.rv-tools select { width: auto; }
.rv-card { padding: 22px 0; border-bottom: 1px solid var(--line); max-width: 760px; animation: rvIn .5s both; }
@keyframes rvIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.rv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rv-av { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; }
.rv-who { flex: 1; display: flex; flex-direction: column; } .rv-ver { font-size: 12px; color: var(--primary); } .rv-date { color: var(--muted); font-size: 13px; }
.rv-body { margin: 8px 0 0; font-size: 16px; line-height: 1.65; }
.rv-more { margin-top: 18px; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; } input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
@media (prefers-reduced-motion: reduce) { .rv-card, .rv-fill { animation: none; transition: none; } }

/* ---- v3: PRO badge, GST switch, design tabs, PDF/print fixes ---- */
.pro-b{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:6px;background:var(--mint);color:var(--mint-ink);font-size:10px;font-weight:800;letter-spacing:.04em;vertical-align:middle}
.acct-btn{position:relative;overflow:visible}.acct-btn .pro-b{position:absolute;right:-8px;bottom:-6px;margin:0;font-size:8px;padding:1px 4px}
.sw{width:44px;height:26px;border-radius:13px;border:0;background:#9ca3af;padding:3px;cursor:pointer;display:inline-flex;align-items:center;flex:none;transition:background .15s}
.sw i{width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .15s}
.sw[aria-checked="true"]{background:#1f6b4a}.sw[aria-checked="true"] i{transform:translateX(18px)}
.gst-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;font-weight:700}
.tp-tabs{margin-bottom:12px;flex-wrap:wrap}
.paper,.paper *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
.paper .zmade{position:static;margin-top:auto;padding-top:10px;align-self:flex-end;justify-content:flex-end;text-decoration:none}
.paper.pdfmode .pp-scroll{overflow:visible}
@media print{.paper{width:210mm;min-height:297mm;margin:0}.paper .pp-scroll{overflow:visible}}

.rv-date{white-space:nowrap}

/* quick start (guest) */
.qs { margin-bottom: 14px; }
.qs-sub { margin: -4px 0 14px; }
.qs-k { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.qs-k:first-of-type { margin-top: 0; }
.qs .qs-logo { width: 64px; height: 64px; border-radius: 12px; }
.qs .qs-lb { margin: 4px 0 6px; }
@media (max-width: 520px) { .qs .row2 { grid-template-columns: 1fr; } }

.pp-zwm { position: absolute; z-index: 0; left: 50%; top: 56%; width: 36%; height: auto; transform: translate(-50%, -50%) rotate(-20deg); opacity: .13; pointer-events: none; user-select: none; }

.pp-table.single td:last-child, .pp-table.single th:last-child { width: 28%; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; padding: 0; }
.pw-eye:hover { color: var(--ink); }
.pw-eye:focus-visible { outline: 2px solid var(--primary); }

/* ---------- editor: full form or compact (icon tabs) ---------- */
.panel { position: relative; }
.cx-bar { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.cx-sw { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.cx-sw button, .cx-pv { border: 0; background: transparent; color: var(--muted); width: 38px; height: 34px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.cx-pv { display: none; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); }
.cx-sw button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); }
.cx-sw button:hover:not([aria-pressed="true"]), .cx-pv:hover { color: var(--ink); }
.cx-sw button:focus-visible, .cx-pv:focus-visible, .cx-tab:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.cx-title, .cx-tabs, .cx-nav { display: none; }
.panel .cx-tabs + h2 { margin-top: 0; padding-top: 0; border-top: 0; min-height: 34px; display: flex; align-items: center; padding-right: 130px; }
.panel.cx .cx-title { display: block; margin: 0 0 14px; padding: 0 130px 0 0; border: 0; min-height: 34px; line-height: 34px; }
.panel.cx .cx-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 0 18px; }
.cx-tab { position: relative; height: 44px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.cx-tab:hover:not([aria-selected="true"]) { color: var(--ink); border-color: var(--muted); }
.cx-tab[aria-selected="true"] { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.cx-dot { display: none; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.cx-tab.todo .cx-dot { display: block; }
.panel.cx .cx-off { display: none !important; }
.panel.cx h2:not(.cx-title):not(.cx-sub) { display: none; }
.panel.cx h2.cx-sub { display: block; }
.panel.cx .cx-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.cx-nav .btn:disabled { opacity: .4; cursor: default; }
/* design tab: one grid, no inner scrollbars */
.panel.cx .design-strip { padding: 0; margin: 0; }
.panel.cx .tp-more > summary { display: none; }
.panel.cx .tp-more[open] { max-height: none; overflow: visible; margin-top: 0; }
.panel.cx .tp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); overflow: visible; padding: 2px; }
.panel.cx .tp-row .tp { flex: none; }
/* phone preview */
.pv-full { position: fixed; inset: 0; z-index: 1000; background: var(--bg); overflow: auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px calc(env(safe-area-inset-bottom, 0px) + 20px); }
.pv-full > .btn { margin-bottom: 12px; }
.pv-full .pv-col { position: static; max-width: 680px; margin: 0 auto; }
@media (max-width: 900px) { .cx-pv { display: grid; } }
@media print { .cx-bar, .cx-tabs, .cx-nav, .pv-full > .btn { display: none !important; } }
.zlogo img.zl-light { box-shadow: none; }
