Skip to content
Design system
v1.0
Tier 1, Marathon to the world

Quotes and SOWs

Confirmed

The US Letter quote with line items, terms, and a signature block, filled from one JSON file.

Champion r02Confirmed in r02Repo folder build/quote-sow/v/best/
Quotes and SOWs, primary render

Primary render. Select it to open full size.

Renders

Every render from the champion round

Rules

How to use it, from the piece README

One JSON file in, a US Letter quote out. Jacob sets the prices, Taylor fills the file and sends it. Nobody types a total: fill.py does every sum, so page one always matches the last page.

Files

FileWhat it isEdit it?
quote.jsonThe quote: client, lines, prices, payments, scope, timeline, terms.Yes, this is the only file you edit.
fill.pyChecks the JSON, does the math, writes the HTML.No.
quote.cssThe quote-only styles, built on docs-kit/v/best/doc.css and the token layer.No.
quote.htmlGenerated. Open it in Chrome to print.No, it is overwritten every run.
examples/roofer.jsonA short quote for a local service client, set to final. Copy it for small jobs.Copy it, then edit the copy.

Make a quote

  1. Copy quote.json (large job) or examples/roofer.json (small job) and rename it, for example 2026-130.json.
  2. Fill it in. Money is a plain number: 1850, not "$1,850".
  3. In Terminal, from this folder: python3 fill.py 2026-130.json 2026-130.html
  4. If it prints "Quote not built", fix each field it names and run it again.
  5. Open the HTML in Chrome. Cmd+P, Destination Save as PDF, Margins Default, Background graphics on.

How the fields work

  • Lines in house take a price per unit, a qty, and a unit word (day, month, person).
  • Lines that run through a vendor take a vendor block instead of a price: the vendor's name, their cost per unit from their written quote, the Marathon handling_pct, and what the fee covers. The billed price is worked out for you, and the line also appears on the cost basis page. Ad spend is a vendor line with handling_pct 0, so it prints "At cost" and "No markup".
  • **taxable: true** adds the line to the sales tax base. This draft taxes printed goods only.
  • **confirm: true** puts an amber bar under the line number and lists the line in the editor note. Leave it on until Jacob approves the price.
  • **payments** are percentages and must add up to 100. The first one is the deposit. The last one takes any rounding cent so the schedule always equals the total.
  • **headings** is optional. Use it to change a section title, for example terms_title.
  • **layout** is optional. Quotes with six lines or fewer flow section to section on shared pages. Longer quotes give each section its own page. Force either with "compact" or "full".

Draft and final

"status": "draft" prints DRAFT in the footer, shows the editor note, and shows the amber marks. "status": "final" hides all three. fill.py refuses to build a final quote while any line still has confirm: true, so a quote cannot go out with an unapproved price by mistake.

What the script stops on

Em and en dashes, every word on the brand guide's banned list, placeholder text, a title over 90 characters, a line name over 48 or a line detail over 130, money typed as text, payments that do not add up to 100, and a vendor line that also has a price. Each error names the field.

Print

The quote uses only doc.css and token colours, with no transparency, so it prints clean in CMYK. Navy runs as the rich black build C88 M65 Y56 K70. Body type is Charcoal on one plate. The PDF embeds static Montserrat cuts as TrueType, never Type 3. A quote carries no photography by design, it is a working document.

Render

From the repo root:

Snippet
node build/_shared/render.mjs pdf build/quote-sow/v/r02/quote.html build/quote-sow/v/r02/renders/quote.pdf
python3 build/_shared/raster.py build/quote-sow/v/r02/renders/quote.pdf build/quote-sow/v/r02/renders 150

For Jacob to confirm

The brief has no rate card. Every price in quote.json and examples/roofer.json, the 15% print handling rate, the 50% deposit, the $125 hourly revision rate, the $250 late reschedule fee, the 8.25% tax treatment, and the two vendor names are working figures. Each is listed in the draft's editor note.

Use it

Files to download and code to copy

  • Whole piece, source files7 files, zip, 26.2 KB. Paths inside follow the repo layout, so put tokens.css beside them as the README says.
    Download
  • quote.pdfPDF, 89.5 KB
    Download

Copy-paste code

quote.json129 lines, 9.1 KB
{
  "_help": "Taylor fills this file. Jacob sets every price. Run: python3 fill.py quote.json quote.html, then open quote.html in Chrome and Cmd+P. Money is plain numbers, no dollar sign and no commas. Set status to final only after Jacob clears every confirm flag.",

  "status": "draft",
  "number": "2026-118",
  "issued": "October 17, 2026",
  "valid_through": "November 16, 2026",
  "priced_by": "Jacob Dow",
  "sent_by": "Taylor Treybig",

  "client": {
    "company": "Cangelosi",
    "attention": "Showroom and marketing lead",
    "location": "Houston"
  },

  "project": {
    "eyebrow": "Quote and scope of work",
    "title": "Cangelosi showroom launch: a single shoot day, one catalog, 90 days of social.",
    "lede": "We shoot the showroom, the slabs, and the team in a single day, turn it into a brand film and a 16 page sample catalog, then run social, Meta ads, and a PaceCRM lead pipeline for the first 3 months.",
    "launch": "6 weeks from signing"
  },

  "headings": {
    "terms_title": "Sign here to book the shoot date.",
    "book_line": "That locks the shoot date."
  },

  "groups": [
    {
      "name": "Production, a single shoot day",
      "lines": [
        { "item": "Showroom photography, full day", "detail": "60 edited stills: showroom vignettes, slab close-ups, and the monument sign", "qty": 1, "unit": "day", "price": 1850, "confirm": true },
        { "item": "Team portraits", "detail": "On location in the showroom, one backdrop, two selects per person", "qty": 12, "unit": "person", "price": 95, "confirm": true },
        { "item": "Showroom brand film", "detail": "One 90 second film plus three 15 second vertical cuts, edited in DaVinci Resolve", "qty": 1, "unit": "film", "price": 3400, "confirm": true },
        { "item": "Drone stills and video", "detail": "Building, frontage, signage, and parking, flown by a Part 107 pilot", "qty": 1, "unit": "flight", "price": 450 },
        { "item": "3D walkthrough tour", "detail": "Full showroom floor, hosted for 12 months, embedded on the website", "qty": 1, "unit": "tour", "price": 650, "confirm": true }
      ]
    },
    {
      "name": "Design and print",
      "lines": [
        { "item": "Sample catalog design", "detail": "16 pages plus cover, layout, copy edit, and press-ready files", "qty": 1, "unit": "catalog", "price": 2400 },
        { "item": "Sample catalog printing", "detail": "500 copies, 8.5 x 11 in, 100 lb gloss text, 120 lb silk cover, saddle stitched", "qty": 1, "unit": "run of 500", "taxable": true, "confirm": true,
          "vendor": { "name": "Offset print vendor", "cost": 1780, "handling_pct": 15, "covers": "Proofing, press check, and delivery to the showroom" } },
        { "item": "Slab and sample tags", "detail": "1,000 tags, 2 x 3.5 in, 16 pt matte, drilled for a tie", "qty": 1, "unit": "run of 1,000", "taxable": true,
          "vendor": { "name": "Digital print vendor", "cost": 210, "handling_pct": 15, "covers": "Proofing and delivery to the showroom" } }
      ]
    },
    {
      "name": "Monthly, 3 month minimum",
      "lines": [
        { "item": "Social management", "detail": "Instagram and Facebook: 12 posts and four reels a month, scheduling, and community replies", "qty": 3, "unit": "month", "price": 1500, "confirm": true },
        { "item": "Paid ads management", "detail": "Meta campaigns for trade and designer leads, weekly optimization, monthly report", "qty": 3, "unit": "month", "price": 750 },
        { "item": "Meta ad spend", "detail": "Billed at cost with no markup, the ad account stays in Cangelosi's name", "qty": 3, "unit": "month",
          "vendor": { "name": "Meta Platforms", "cost": 1000, "handling_pct": 0, "covers": "Nothing added, pass-through at cost" } }
      ]
    },
    {
      "name": "Systems",
      "lines": [
        { "item": "PaceCRM buildout", "detail": "Trade and designer lead pipeline, website form, two automations, email and SMS follow-up", "qty": 1, "unit": "build", "price": 2200, "confirm": true },
        { "item": "PaceCRM subscription", "detail": "Hosting, phone number, and email sending, billed monthly", "qty": 3, "unit": "month", "price": 197, "confirm": true }
      ]
    }
  ],

  "tax": { "rate_pct": 8.25, "label": "Texas sales tax, 8.25%, on printed goods" },

  "payments": [
    { "when": "At signing", "what": "Deposit, books the shoot date", "pct": 50 },
    { "when": "Week 4", "what": "Photos, film, and catalog proofs delivered", "pct": 30 },
    { "when": "Day 90", "what": "Third month of social and ads closes", "pct": 20 }
  ],

  "scope": [
    { "service": "Photography and portraits", "included": "A single shoot day on site, 60 edited stills, 24 portrait selects, web and print files, delivered in 5 business days", "excluded": "Retouching beyond color, cleanup, and skin; a second shoot day" },
    { "service": "Brand film", "included": "A crew day shared with the photo shoot, licensed music, two rounds of edits, one 90 second film and three vertical cuts", "excluded": "Voiceover talent, actors, scripted scenes off site" },
    { "service": "Catalog and tags", "included": "Layout, copy edit, one printed color proof, press check, 500 catalogs and 1,000 tags delivered to the showroom", "excluded": "Product copy written from scratch, reprints after proof sign-off" },
    { "service": "Social and ads", "included": "Monthly content calendar for approval, 12 posts and four reels a month, Meta campaigns, a report by the fifth of each month", "excluded": "TikTok and LinkedIn, influencer fees, ad spend above $1,000 a month without a signed change order" },
    { "service": "PaceCRM", "included": "Pipeline, website form, two automations, email and SMS templates, one 60 minute training call for the showroom team", "excluded": "Data cleanup of more than 2,000 existing contacts, custom integrations" }
  ],

  "client_provides": [
    "Showroom access from 7am on the shoot day, with displays staged the way you want them shot.",
    "A list of the 12 team members and their titles by the end of week one.",
    "Admin access to the Meta Business account and the website, so the form and pixel can be installed.",
    "One approver for proofs, with feedback inside 2 business days."
  ],

  "timeline": [
    { "when": "Week 1, Oct 26", "what": "Kickoff call, shot list, catalog outline, and PaceCRM discovery", "owner": "Jacob Dow" },
    { "when": "Week 2, Nov 2", "what": "Shoot day: stills, portraits, film, drone, and the 3D tour", "owner": "Marathon crew" },
    { "when": "Week 3, Nov 9", "what": "Edited stills delivered, film rough cut sent for review", "owner": "Marathon post" },
    { "when": "Week 4, Nov 16", "what": "Catalog proofs sent, PaceCRM pipeline live, ads built for approval", "owner": "Taylor Treybig" },
    { "when": "Week 5, Nov 23", "what": "Catalog and tags to press after a signed proof, final film delivered", "owner": "Philip, video edit" },
    { "when": "Week 6, Nov 30", "what": "Catalogs and tags delivered, social and ads go live", "owner": "Taylor Treybig" },
    { "when": "Dec 1 to Feb 28", "what": "Monthly social, ads, and a performance report by the fifth", "owner": "Taylor Treybig" }
  ],

  "terms": [
    "This quote holds through the valid-through date above. After that, Jacob reprices it.",
    "The 50% deposit is due at signing and books the shoot date. Each later invoice is due in 15 days by ACH or card.",
    "Design and film include two rounds of revisions. Further rounds bill at $125 an hour, quoted before we start.",
    "Any change to scope is priced in writing and signed before the work begins.",
    "Reschedule the shoot free up to 48 hours ahead. Inside 48 hours, a $250 crew fee applies.",
    "Monthly services run 3 months, then continue month to month until either side gives 30 days notice in writing.",
    "Print quantities can run up to 5% over or under the order. Overs are free, unders are credited.",
    "Cangelosi owns every final deliverable once paid in full. Marathon may show the work in its portfolio unless Cangelosi opts out in writing."
  ],

  "compliance": [
    "Aerials are flown by FAA Part 107 certificated pilots. Shoots inside controlled airspace near Bush Intercontinental, Hobby, Ellington, and Sugar Land need LAANC authorization, which can move the drone portion by a day.",
    "Texas sales tax applies to printed goods and is shown separately. Services are listed without tax. Ad spend is billed at cost and carries no Marathon fee."
  ],

  "editor_notes": [
    "No approved rate card exists. Every line marked for confirmation is a working figure.",
    "Name the two print vendors on the cost basis page and attach their written quotes to the job folder before sending.",
    "Confirm which lines Texas taxes. This draft taxes printed goods only.",
    "Confirm the 15% print handling rate, the $125 hourly revision rate, and the $250 late reschedule fee."
  ],

  "signers": {
    "marathon": { "name": "Jacob Dow", "role": "Founder, Marathon Creative" },
    "client": { "name": "Accepted for Cangelosi", "role": "Printed name, title, and date" }
  }
}
quote.css108 lines, 6.2 KB
/* Marathon Creative quote and SOW. Loads after tokens.css and doc.css, adds only what a quote needs.
   Every value is a token or a doc.css variable. No hex, no rgb(), no alpha, so it prints clean in CMYK. */

/* Column widths for the line item table, in inches so they hold on paper. */
.doc-table col.qs-w-n { width: 0.42in; }
.doc-table col.qs-w-qty { width: 0.55in; }
.doc-table col.qs-w-in { width: 2.9in; }

/* Meta list: company on top, attention line under it, so a long company name wraps instead of colliding. */
.qs-meta { grid-template-columns: 1.9fr 1fr 1.3fr 1.4fr; }
.qs-meta__sub {
  display: block; margin-top: var(--mc-space-01);
  font-size: var(--mc-print-type-caption-size); font-weight: var(--mc-weight-regular); color: var(--mc-text-secondary);
}

.qs-opener { margin-bottom: var(--mc-space-07); }
.qs-opener .doc-title { font-size: var(--mc-print-type-h1-size); }

/* Stats: whole dollars only, sized so six figures still fit a third of the page. */
.qs-stats { margin-bottom: var(--mc-space-08); }
.qs-stat .doc-stat__value { font-size: var(--mc-print-type-h1-size); }
.qs-stat--long .doc-stat__value { font-size: var(--mc-print-type-h2-size); }

.qs-section { margin: 0 0 var(--mc-space-04); break-after: avoid; }
.qs-section .doc-h2 { margin-bottom: 0; }

/* Line items. Each group is its own tbody so banding restarts under every group label. */
.qs-items tbody tr:nth-child(even) td { background: var(--mc-surface-page); box-shadow: none; }
.qs-items tbody tr:nth-child(odd):not(.qs-group) td {
  background: var(--mc-surface-row-alt-print); box-shadow: var(--mc-space-01) 0 0 0 var(--mc-surface-row-alt-print);
}
.qs-items tbody tr.qs-line td:last-child { box-shadow: none; }
.qs-items tr.qs-group td {
  padding-top: var(--mc-space-05); padding-bottom: var(--mc-space-02);
  border-bottom: var(--mc-border-width-strong) solid var(--mc-text-heading);
  font-size: var(--mc-print-type-caption-size); font-weight: var(--mc-weight-bold);
  letter-spacing: var(--mc-type-eyebrow-tracking); text-transform: uppercase; color: var(--mc-text-heading);
  break-after: avoid;
}
.qs-items tr.qs-group td.num { letter-spacing: 0; text-transform: none; font-weight: var(--mc-weight-semibold); }
.qs-items tbody:first-of-type tr.qs-group td { padding-top: var(--mc-space-04); }
.qs-items td.qs-n, .qs-basis-table td.qs-n { color: var(--mc-text-tertiary); font-weight: var(--mc-weight-semibold); }
.qs-items td.qs-basis { font-size: var(--mc-print-type-caption-size); font-weight: var(--mc-weight-semibold); color: var(--mc-text-primary); }
.qs-items td.qs-amt { font-weight: var(--mc-weight-semibold); color: var(--mc-text-heading); }
.qs-items .num .doc-table__sub, .qs-basis-table .num .doc-table__sub { font-weight: var(--mc-weight-regular); }
.qs-items tfoot tr.qs-deposit td { color: var(--mc-text-heading); font-weight: var(--mc-weight-bold); }

/* Totals print once, at the end. Chrome repeats a tfoot on every page unless told otherwise. */
.qs-items tfoot, .qs-basis-table tfoot, .qs-pay tfoot { display: table-row-group; }
.qs-items tfoot tr, .qs-basis-table tfoot tr, .qs-pay tfoot tr { break-inside: avoid; }

/* Draft-only confirm mark: an amber bar under the line number. It drops out when status is final. */
.qs-confirm {
  display: block; width: var(--mc-space-05); height: var(--doc-bar); margin: var(--mc-space-02) 0 0 auto;
  background: var(--mc-status-warning);
}
html.doc[data-status="final"] .qs-confirm { display: none; }

/* Scope: the exclusions column reads one step quieter than what is included. */
.qs-scope td { font-size: var(--mc-print-type-small-size); }
.qs-scope td.qs-out { color: var(--mc-text-secondary); }

.qs-split { margin-top: var(--mc-space-02); }
.qs-pay { margin: var(--mc-space-02) 0 var(--mc-space-07); }

/* Column totals in the cost basis and payment tables: body size, so four amounts fit side by side. */
.doc-table tfoot tr.qs-sum td { font-size: var(--mc-print-type-body-size); font-weight: var(--mc-weight-extrabold); }

/* The totals block keeps its rows together and never splits from the last line item group. */
.qs-items tfoot { break-inside: avoid; }
.qs-pay .doc-eyebrow { margin-bottom: var(--mc-space-02); }

/* Closing callout with the four numbers a signer needs. Solid white on navy, Red Bright for the rule. */
.qs-close { margin: var(--mc-space-06) 0 0; break-after: avoid; }
.qs-close__figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--mc-doc-gutter);
  margin: var(--mc-space-06) 0 0; padding-top: var(--mc-space-04);
  border-top: var(--doc-rule) solid var(--mc-accent-on-inverse);
}
.qs-close__figures dt {
  margin: 0 0 var(--mc-space-02);
  font-size: var(--mc-print-type-caption-size); font-weight: var(--mc-weight-bold);
  letter-spacing: var(--mc-type-eyebrow-tracking); text-transform: uppercase; color: var(--mc-text-inverse);
}
.qs-close__figures dd {
  margin: 0; font-size: var(--mc-print-type-body-size); font-weight: var(--mc-weight-bold);
  color: var(--mc-text-inverse); font-variant-numeric: var(--mc-numeric-tabular);
}

/* Signature block with a date line under each signer. */
.qs-signoff { margin-top: var(--mc-space-08); margin-bottom: 0; }
.qs-dateline {
  display: flex; align-items: flex-end; gap: var(--mc-space-03); margin-top: var(--mc-space-05); width: 2in;
  font-size: var(--mc-print-type-caption-size); font-weight: var(--mc-weight-semibold); color: var(--mc-text-secondary);
}
.qs-dateline::after { content: ""; flex: 1 1 auto; border-bottom: var(--doc-rule) solid var(--mc-text-primary); }

/* Terms set in two columns so the callout and both signatures land on the same page as the terms. */
.qs-terms { columns: 2; column-gap: var(--mc-doc-gutter); }
.qs-terms > li { break-inside: avoid; }
.qs-comp { margin-top: var(--mc-space-02); }

/* Compact layout, short quotes: sections follow on the same page under a red divider. */
.qs-opener--compact { margin-bottom: var(--mc-space-05); }
.qs-opener--compact .doc-lede { font-size: var(--mc-print-type-body-size); margin-top: var(--mc-space-02); }
.qs-keep { break-inside: avoid; }
.qs-keep > .doc-divider { margin-top: var(--mc-space-08); }
fill.py448 lines, 24.7 KB
#!/usr/bin/env python3
"""Marathon Creative quote and SOW filler.

Usage, from this folder:
    python3 fill.py quote.json quote.html

Reads one JSON file, checks it, does every sum, and writes a print-ready HTML page that links
tokens.css, doc.css, and quote.css. Open the HTML in Chrome and press Cmd+P.

Nobody types a total by hand. Subtotals, tax, the deposit, the payment schedule, and the vendor
cost basis are all computed here, so the numbers on page one always match the numbers on the
last page. If the JSON breaks a rule, the script stops and says which field to fix.
"""
import json, sys, re, html
from decimal import Decimal, ROUND_HALF_UP

CENT = Decimal("0.01")
BANNED = ["world-class", "best-in-class", "premier", "synergy", "leverage", "robust solution",
          "utilize", "facilitate", "potentially explore", "sorry for any inconvenience", "lorem ipsum",
          "act now"]
LIMITS = {"project.title": 90, "project.lede": 280, "line.item": 48, "line.detail": 130}
DEFAULT_HEADINGS = {
    "items_eyebrow": "01, Line items", "items_title": "What this quote covers",
    "basis_eyebrow": "02, Cost basis", "basis_title": "Where the vendor money goes.",
    "basis_lede": "Printing and ad spend run through outside vendors. This page shows what each vendor charges and what Marathon adds, line by line.",
    "scope_eyebrow": "03, Scope of work", "scope_title": "What is included, and what is not.",
    "scope_lede": "Anything outside this page is a change order, priced in writing before we start.",
    "time_eyebrow": "04, Timeline",
    "terms_eyebrow": "05, Terms and acceptance", "terms_title": "Sign here to start.",
    "book_line": "That locks your start date.",
}

errors = []


def fail(msg):
    errors.append(msg)


def esc(s):
    return html.escape(str(s), quote=True)


def money(d, cents=True):
    d = Decimal(d)
    sign = "&minus;" if d < 0 else ""
    d = abs(d)
    if cents:
        txt = "{:,.2f}".format(d.quantize(CENT, ROUND_HALF_UP))
    else:
        txt = "{:,.0f}".format(d.quantize(Decimal("1"), ROUND_HALF_UP))
    return sign + "$" + txt


def dec(v, where):
    try:
        if isinstance(v, str):
            fail(where + ": write money as a plain number, for example 1850, not " + json.dumps(v))
            return Decimal(0)
        return Decimal(str(v))
    except Exception:
        fail(where + ": not a number")
        return Decimal(0)


def walk_text(node, path="quote"):
    """Check every string in the file against the voice and punctuation rules."""
    if isinstance(node, dict):
        for k, v in node.items():
            if k.startswith("_"):
                continue
            walk_text(v, path + "." + k)
    elif isinstance(node, list):
        for i, v in enumerate(node):
            walk_text(v, path + "[" + str(i + 1) + "]")
    elif isinstance(node, str):
        if "\u2014" in node or "\u2013" in node:
            fail(path + ": replace the dash with a comma, Marathon copy never uses em or en dashes")
        low = node.lower()
        for w in BANNED:
            if re.search(r"\b" + re.escape(w), low):
                fail(path + ": banned word \"" + w + "\", say it plainly")
        if "lorem" in low or "xxx" in low or "tbd" in low:
            fail(path + ": placeholder text, write the real thing or leave the line out")


def need(obj, key, where):
    if key not in obj or obj[key] in ("", None, []):
        fail(where + "." + key + " is missing")
        return ""
    return obj[key]


def limit(text, key, where):
    n = LIMITS[key]
    if len(text) > n:
        fail(where + ": " + str(len(text)) + " characters, the limit is " + str(n) + ". Cut it, the layout will not stretch to fit.")


def build(q):
    walk_text(q)
    for k in ("number", "issued", "valid_through", "priced_by", "sent_by"):
        need(q, k, "quote")
    status = q.get("status", "draft")
    if status not in ("draft", "final"):
        fail("quote.status must be draft or final")
    client = q.get("client", {})
    need(client, "company", "client")
    proj = q.get("project", {})
    for k in ("title", "lede", "launch"):
        need(proj, k, "project")
    limit(proj.get("title", ""), "project.title", "project.title")
    limit(proj.get("lede", ""), "project.lede", "project.lede")
    H = dict(DEFAULT_HEADINGS)
    H.update(q.get("headings", {}))
    H.setdefault("time_title", "Live " + proj.get("launch", "") + ".")
    H.setdefault("time_lede", "Every step has a date and a name on it. If a step slips, its owner calls you before the deadline, not after.")

    # ---------------------------------------------------------------- line math
    groups, n, subtotal, taxable, confirms, vendor_rows = [], 0, Decimal(0), Decimal(0), [], []
    for gi, g in enumerate(q.get("groups", [])):
        gname = need(g, "name", "groups[" + str(gi + 1) + "]")
        rows, gsum = [], Decimal(0)
        for li, ln in enumerate(g.get("lines", [])):
            n += 1
            where = "groups[" + str(gi + 1) + "].lines[" + str(li + 1) + "]"
            item = need(ln, "item", where)
            limit(item, "line.item", where + ".item")
            limit(ln.get("detail", ""), "line.detail", where + ".detail")
            qty = dec(ln.get("qty", 1), where + ".qty")
            if qty <= 0:
                fail(where + ".qty must be more than zero")
            v = ln.get("vendor")
            if v:
                vcost = dec(need(v, "cost", where + ".vendor"), where + ".vendor.cost")
                pct = dec(v.get("handling_pct", 0), where + ".vendor.handling_pct")
                unit = (vcost * (1 + pct / 100)).quantize(CENT, ROUND_HALF_UP)
                if "price" in ln:
                    fail(where + ": a vendor line takes its price from vendor.cost and handling_pct, delete price")
                vtotal = (vcost * qty).quantize(CENT, ROUND_HALF_UP)
                amount = (unit * qty).quantize(CENT, ROUND_HALF_UP)
                vendor_rows.append({"n": n, "item": item, "vendor": need(v, "name", where + ".vendor"),
                                    "covers": v.get("covers", ""), "cost": vtotal, "pct": pct,
                                    "handling": amount - vtotal, "billed": amount})
                if pct == 0:
                    basis = esc(v["name"]) + "<span class=\"doc-table__sub\">At cost</span>"
                else:
                    basis = esc(v["name"]) + "<span class=\"doc-table__sub\">Cost plus " + fmt_pct(pct) + "</span>"
                kind = "vendor"
            else:
                if "price" not in ln:
                    fail(where + ".price is missing. Jacob sets it. If it is not set yet, ask him, do not guess.")
                unit = dec(ln.get("price", 0), where + ".price").quantize(CENT, ROUND_HALF_UP)
                amount = (unit * qty).quantize(CENT, ROUND_HALF_UP)
                basis = "In house"
                kind = "house"
            if ln.get("taxable"):
                taxable += amount
            if ln.get("confirm"):
                confirms.append((n, item))
            subtotal += amount
            gsum += amount
            rows.append({"n": n, "item": item, "detail": ln.get("detail", ""), "qty": qty, "unit_word": ln.get("unit", ""),
                         "unit": unit, "amount": amount, "basis": basis, "kind": kind,
                         "taxable": bool(ln.get("taxable")), "confirm": bool(ln.get("confirm"))})
        if not rows:
            fail("groups[" + str(gi + 1) + "] has no lines")
        groups.append({"name": gname, "rows": rows, "sum": gsum})
    if not groups:
        fail("quote.groups is empty, a quote needs at least one line")

    layout = q.get("layout", "auto")
    if layout not in ("auto", "full", "compact"):
        fail("quote.layout must be auto, full, or compact")
    # Short quotes flow section to section. Long ones give each section its own page.
    compact = layout == "compact" or (layout == "auto" and n <= 6)

    tax = q.get("tax", {"rate_pct": 0})
    rate = dec(tax.get("rate_pct", 0), "tax.rate_pct")
    tax_amt = (taxable * rate / 100).quantize(CENT, ROUND_HALF_UP)
    total = subtotal + tax_amt

    pays, pct_sum, paid = [], Decimal(0), Decimal(0)
    plist = q.get("payments", [])
    for i, p in enumerate(plist):
        pct = dec(need(p, "pct", "payments[" + str(i + 1) + "]"), "payments[" + str(i + 1) + "].pct")
        pct_sum += pct
        amt = total - paid if i == len(plist) - 1 else (total * pct / 100).quantize(CENT, ROUND_HALF_UP)
        paid += amt
        pays.append({"when": p.get("when", ""), "what": p.get("what", ""), "pct": pct, "amount": amt})
    if pct_sum != 100:
        fail("payments add up to " + str(pct_sum) + "%, they must add up to 100%")
    deposit = pays[0]["amount"] if pays else total

    if status == "final" and any(ln.get("confirm") for g in q.get("groups", []) for ln in g.get("lines", [])):
        fail("status is final but lines are still marked confirm. Jacob clears each one, then set confirm to false.")

    if errors:
        sys.stderr.write("Quote not built. Fix these in the JSON:\n  " + "\n  ".join(errors) + "\n")
        sys.exit(1)

    # ---------------------------------------------------------------- html
    out = []
    w = out.append
    docname = "Marathon Creative, Quote " + q["number"] + ", " + client["company"]
    w("<!doctype html>")
    w("<!-- Generated by fill.py from " + esc(SRC) + ". Edit the JSON, not this file. -->")
    w("<html lang=\"en\" class=\"doc\" data-status=\"" + status + "\" style=\"--doc-name: '" + esc(docname).replace("'", "&#39;") + "'\">")
    w("<head>\n<meta charset=\"utf-8\">\n<title>Quote " + esc(q["number"]) + ", " + esc(client["company"]) + ", Marathon Creative</title>")
    w("<link rel=\"stylesheet\" href=\"" + ROOT + "tokens/v/best/tokens.css\">")
    w("<link rel=\"stylesheet\" href=\"" + ROOT + "docs-kit/v/best/doc.css\">")
    w("<link rel=\"stylesheet\" href=\"" + CSS + "\">\n</head>\n<body>")

    # Page 1, masthead, meta, opener, stats, line items.
    w("<header class=\"doc-masthead\">")
    w("  <img class=\"doc-masthead__logo\" src=\"" + ROOT + "tokens/v/best/logos/marathon-logo-dark.svg\" alt=\"Marathon Creative\">")
    w("  <p class=\"doc-masthead__meta\">Quote and scope of work " + esc(q["number"]) + "<br>Priced by " + esc(q["priced_by"]) + ", sent by " + esc(q["sent_by"]) + "</p>")
    w("</header>")
    w("<dl class=\"doc-meta qs-meta\">")
    pf = esc(client["company"])
    sub = ", ".join(x for x in (client.get("attention", ""), client.get("location", "")) if x)
    if sub:
        pf += "<span class=\"qs-meta__sub\">" + esc(sub) + "</span>"
    w("  <div><dt>Prepared for</dt><dd>" + pf + "</dd></div>")
    w("  <div><dt>Quote number</dt><dd>" + esc(q["number"]) + "</dd></div>")
    w("  <div><dt>Issued</dt><dd>" + esc(q["issued"]) + "</dd></div>")
    w("  <div><dt>Valid through</dt><dd>" + esc(q["valid_through"]) + "</dd></div>")
    w("</dl>")
    w("<div class=\"doc-opener qs-opener\">")
    w("  <span class=\"doc-eyebrow\">" + esc(proj.get("eyebrow", "Quote and scope of work")) + "</span>")
    w("  <h1 class=\"doc-title\">" + esc(proj["title"]) + "</h1>")
    w("  <p class=\"doc-lede\">" + esc(proj["lede"]) + "</p>")
    w("</div>")

    def stat(value, label, key=False):
        long_cls = " qs-stat--long" if len(value.replace("&minus;", "-")) > 8 else ""
        return ("  <div class=\"doc-stat qs-stat" + (" doc-stat--key" if key else "") + long_cls + "\"><span class=\"doc-stat__value\">"
                + value + "</span><span class=\"doc-stat__label\">" + label + "</span></div>")
    w("<div class=\"doc-stats doc-stats--3 qs-stats\">")
    w(stat(money(total, cents=False), "Project total, tax included"))
    w(stat(money(deposit, cents=False), "Deposit at signing", key=True))
    w(stat(esc(proj["launch"].split(" from ")[0]), "From signing to launch"))
    w("</div>")

    w("<div class=\"qs-section\"><span class=\"doc-eyebrow\">" + esc(H["items_eyebrow"]) + "</span><h2 class=\"doc-h2\">" + esc(H["items_title"]) + "</h2></div>")
    w("<table class=\"doc-table doc-table--fixed qs-items\">")
    w("  <colgroup><col class=\"qs-w-n\"><col><col class=\"doc-col-w11\"><col class=\"qs-w-qty\"><col class=\"doc-col-w1\"><col class=\"doc-col-w125\"></colgroup>")
    w("  <thead><tr><th class=\"num\">No.</th><th>Item</th><th>Cost basis</th><th class=\"num\">Qty</th><th class=\"num\">Unit price</th><th class=\"num\">Amount</th></tr></thead>")
    for g in groups:
        w("  <tbody>")
        w("    <tr class=\"qs-group\"><td colspan=\"5\">" + esc(g["name"]) + "</td><td class=\"num\">" + money(g["sum"]) + "</td></tr>")
        for r in g["rows"]:
            basis = r["basis"]
            if r["taxable"]:
                basis = basis.replace("</span>", ", taxable</span>") if "</span>" in basis else basis + "<span class=\"doc-table__sub\">Taxable</span>"
            mark = "<span class=\"qs-confirm\" title=\"Jacob to confirm\"></span>" if r["confirm"] else ""
            detail = "<span class=\"doc-table__sub\">" + esc(r["detail"]) + "</span>" if r["detail"] else ""
            per = "<span class=\"doc-table__sub\">per " + esc(r["unit_word"]) + "</span>" if r["unit_word"] else ""
            w("    <tr class=\"qs-line qs-line--" + r["kind"] + "\"><td class=\"num qs-n\">" + "{:02d}".format(r["n"]) + mark + "</td>"
              + "<td class=\"item\">" + esc(r["item"]) + detail + "</td>"
              + "<td class=\"qs-basis\">" + basis + "</td>"
              + "<td class=\"num\">" + fmt_qty(r["qty"]) + "</td>"
              + "<td class=\"num\">" + money(r["unit"]) + per + "</td>"
              + "<td class=\"num qs-amt\">" + money(r["amount"]) + "</td></tr>")
        w("  </tbody>")
    # Totals. Labels span four columns and every amount spans two, so a five figure total never clips.
    w("  <tfoot>")
    w("    <tr class=\"minor\"><td colspan=\"4\">Subtotal</td><td class=\"num\" colspan=\"2\">" + money(subtotal) + "</td></tr>")
    if rate:
        w("    <tr class=\"minor\"><td colspan=\"4\">" + esc(tax.get("label", "Sales tax")) + ", on " + money(taxable) + "</td><td class=\"num\" colspan=\"2\">" + money(tax_amt) + "</td></tr>")
    w("    <tr class=\"total\"><td colspan=\"4\">Total</td><td class=\"num\" colspan=\"2\">" + money(total) + "</td></tr>")
    w("    <tr class=\"minor qs-deposit\"><td colspan=\"4\">Deposit due at signing, " + fmt_pct(pays[0]["pct"]) + "</td><td class=\"num\" colspan=\"2\">" + money(deposit) + "</td></tr>")
    w("  </tfoot>")
    w("</table>")

    payment_table(w, pays, total)

    notes = list(q.get("editor_notes", []))
    if confirms or notes:
        w("<aside class=\"doc-note doc-note--editor\">")
        w("  <span class=\"doc-note__label\">Editor note, internal only</span>")
        if confirms:
            w("  <p><strong>Jacob to confirm before this goes out.</strong> Lines " + join_and(["{:02d}".format(c[0]) for c in confirms]) + ", each marked with an amber bar under its number. Once he clears a line, set its confirm flag to false and run fill.py again.</p>")
        if notes:
            w("  <ul class=\"doc-list\">" + "".join("<li>" + esc(x) + "</li>" for x in notes) + "</ul>")
        w("</aside>")

    # Page, cost basis. Only printed when a line runs through an outside vendor.
    if vendor_rows:
        opener(w, H, "basis", compact)
        w("<table class=\"doc-table doc-table--fixed qs-basis-table\">")
        w("  <colgroup><col class=\"qs-w-n\"><col><col class=\"doc-col-w11\"><col class=\"doc-col-w11\"><col class=\"doc-col-w11\"></colgroup>")
        w("  <thead><tr><th class=\"num\">No.</th><th>Line, vendor, and what the fee covers</th><th class=\"num\">Vendor cost</th><th class=\"num\">Marathon fee</th><th class=\"num\">Billed</th></tr></thead>")
        w("  <tbody>")
        vc = vh = vb = Decimal(0)
        for r in vendor_rows:
            vc += r["cost"]; vh += r["handling"]; vb += r["billed"]
            fee_sub = "<span class=\"doc-table__sub\">" + (fmt_pct(r["pct"]) + " of cost" if r["pct"] else "No markup") + "</span>"
            w("    <tr><td class=\"num qs-n\">" + "{:02d}".format(r["n"]) + "</td><td class=\"item\">" + esc(r["item"])
              + "<span class=\"doc-table__sub\">" + esc(r["vendor"]) + (". " + esc(r["covers"]) if r["covers"] else "") + "</span></td>"
              + "<td class=\"num\">" + money(r["cost"]) + "</td><td class=\"num\">" + money(r["handling"]) + fee_sub + "</td><td class=\"num\">" + money(r["billed"]) + "</td></tr>")
        w("  </tbody>")
        w("  <tfoot><tr class=\"qs-sum\"><td colspan=\"2\">Vendor lines</td><td class=\"num\">" + money(vc) + "</td><td class=\"num\">" + money(vh) + "</td><td class=\"num\">" + money(vb) + "</td></tr></tfoot>")
        cap = "Vendor cost is the vendor's written quote, before sales tax. Marathon's fee covers what each line lists: proofing, press checks, and delivery."
        if any(r["pct"] == 0 for r in vendor_rows):
            cap += " Lines marked no markup pass through at cost."
        w("  <caption>" + esc(cap) + "</caption>")
        w("</table>")
        house = subtotal - vb
        w("<div class=\"doc-stats doc-stats--3 qs-stats qs-split\">")
        w(stat(money(house, cents=False), "Marathon in-house work, " + pct_of(house, subtotal) + " of the subtotal"))
        w(stat(money(vb, cents=False), "Vendor and pass-through lines, " + pct_of(vb, subtotal) + " of the subtotal"))
        w(stat(money(tax_amt, cents=False), "Sales tax, printed goods only"))
        w("</div>")
        close(w, compact)

    # Page, scope of work.
    opener(w, H, "scope", compact)
    w("<table class=\"doc-table doc-table--fixed qs-scope\">")
    w("  <colgroup><col class=\"doc-col-w15\"><col class=\"qs-w-in\"><col></colgroup>")
    w("  <thead><tr><th>Service</th><th>Included</th><th>Not included</th></tr></thead>\n  <tbody>")
    for s in q.get("scope", []):
        w("    <tr><td class=\"item\">" + esc(s.get("service", "")) + "</td><td>" + esc(s.get("included", "")) + "</td><td class=\"qs-out\">" + esc(s.get("excluded", "")) + "</td></tr>")
    w("  </tbody>\n</table>")
    comp = q.get("compliance", [])
    if comp:
        w("<aside class=\"doc-note doc-note--compliance qs-comp\"><span class=\"doc-note__label\">Compliance</span>"
          + "".join("<p>" + esc(x) + "</p>" for x in comp) + "</aside>")

    close(w, compact)

    # Page, timeline, then what the client owes us to hit it.
    tl = q.get("timeline", [])
    cp = q.get("client_provides", [])
    if tl or cp:
        opener(w, H, "time", compact)
    if tl:
        w("<table class=\"doc-table doc-table--fixed qs-time\">")
        w("  <colgroup><col class=\"doc-col-w15\"><col><col class=\"doc-col-w15\"></colgroup>")
        w("  <thead><tr><th>When</th><th>What happens</th><th>Owner</th></tr></thead>\n  <tbody>")
        for t in tl:
            w("    <tr><td class=\"item doc-num\">" + esc(t.get("when", "")) + "</td><td>" + esc(t.get("what", "")) + "</td><td>" + esc(t.get("owner", "")) + "</td></tr>")
        w("  </tbody>\n</table>")
    if cp:
        w("<div class=\"doc-keep\"><hr class=\"doc-divider\"><span class=\"doc-eyebrow\">Client responsibilities</span><h2 class=\"doc-h3\">What we need from " + esc(client["company"]) + " to hold these dates</h2>")
        w("<ul class=\"doc-list\">" + "".join("<li>" + esc(x) + "</li>" for x in cp) + "</ul></div>")

    if tl or cp:
        close(w, compact)

    # Terms and acceptance.
    opener(w, H, "terms", compact)
    w("<h2 class=\"doc-h3\">Terms</h2><ul class=\"doc-list doc-small qs-terms\">" + "".join("<li>" + esc(x) + "</li>" for x in q.get("terms", [])) + "</ul>")
    w("<aside class=\"doc-callout qs-close\">")
    w("  <span class=\"doc-eyebrow\">To book</span>")
    w("  <p class=\"doc-callout__title\">Sign below and pay the " + money(deposit) + " deposit. " + esc(H["book_line"]) + " " + esc(q["sent_by"]) + " confirms it by email the same business day.</p>")
    w("  <dl class=\"qs-close__figures\">"
      + "<div><dt>Total</dt><dd>" + money(total) + "</dd></div>"
      + "<div><dt>Deposit</dt><dd>" + money(deposit) + "</dd></div>"
      + "<div><dt>Quote</dt><dd>" + esc(q["number"]) + "</dd></div>"
      + "<div><dt>Valid through</dt><dd>" + esc(q["valid_through"]) + "</dd></div></dl>")
    w("</aside>")
    sg = q.get("signers", {})
    m = sg.get("marathon", {"name": q["priced_by"], "role": "Marathon Creative"})
    c = sg.get("client", {"name": "Accepted for " + client["company"], "role": "Printed name, title, and date"})
    w("<div class=\"doc-signoff qs-signoff\">")
    for s in (m, c):
        w("  <div><div class=\"doc-signoff__line\"></div><p class=\"doc-signoff__name\">" + esc(s.get("name", "")) + "</p><p class=\"doc-signoff__role\">" + esc(s.get("role", "")) + "</p>"
          + "<div class=\"qs-dateline\"><span>Date</span></div></div>")
    w("</div>")
    close(w, compact)
    w("</body>\n</html>\n")
    return "\n".join(out), {"subtotal": subtotal, "tax": tax_amt, "total": total, "deposit": deposit, "lines": n}


def opener(w, H, key, compact):
    """Section opener. Full layout: new page, eyebrow, H1, lede. Compact: red divider, eyebrow, H2, lede, same page."""
    if compact:
        w("<section class=\"qs-keep\">")
        w("<hr class=\"doc-divider\">")
        w("<div class=\"doc-opener qs-opener--compact\">")
        w("  <span class=\"doc-eyebrow\">" + esc(H[key + "_eyebrow"]) + "</span>")
        w("  <h2 class=\"doc-h2\">" + esc(H[key + "_title"]) + "</h2>")
    else:
        w("<div class=\"doc-newpage doc-opener\">")
        w("  <span class=\"doc-eyebrow\">" + esc(H[key + "_eyebrow"]) + "</span>")
        w("  <h1 class=\"doc-title\">" + esc(H[key + "_title"]) + "</h1>")
    if H.get(key + "_lede"):
        w("  <p class=\"doc-lede\">" + esc(H[key + "_lede"]) + "</p>")
    w("</div>")


def close(w, compact):
    """Ends a compact section. A compact section moves to the next page whole rather than split."""
    if compact:
        w("</section>")


def payment_table(w, pays, total):
    words = ["One payment", "Two payments", "Three payments", "Four payments", "Five payments", "Six payments", "Seven payments", "Eight payments", "Nine payments"]
    head = words[len(pays) - 1] if 0 < len(pays) <= 9 else str(len(pays)) + " payments"
    w("<div class=\"doc-keep qs-pay\"><span class=\"doc-eyebrow\">Payment schedule</span><h2 class=\"doc-h3\">" + head + ", tied to delivery.</h2>")
    w("<table class=\"doc-table doc-table--fixed doc-mt-s\">")
    w("  <colgroup><col class=\"doc-col-w125\"><col><col class=\"qs-w-qty\"><col class=\"doc-col-w125\"></colgroup>")
    w("  <thead><tr><th>When</th><th>Milestone</th><th class=\"num\">Share</th><th class=\"num\">Amount</th></tr></thead>\n  <tbody>")
    for p in pays:
        w("    <tr><td class=\"item\">" + esc(p["when"]) + "</td><td>" + esc(p["what"]) + "</td><td class=\"num\">" + fmt_pct(p["pct"]) + "</td><td class=\"num\">" + money(p["amount"]) + "</td></tr>")
    w("  </tbody>\n  <tfoot><tr class=\"qs-sum\"><td colspan=\"2\">Total</td><td class=\"num\">100%</td><td class=\"num\">" + money(total) + "</td></tr></tfoot>\n</table></div>")


def fmt_pct(p):
    p = Decimal(p).normalize()
    return ("{:f}".format(p)) + "%"


def pct_of(a, b):
    if not b:
        return "0%"
    return str(int((Decimal(a) * 100 / Decimal(b)).quantize(Decimal("1"), ROUND_HALF_UP))) + "%"


def fmt_qty(q):
    q = Decimal(q).normalize()
    return "{:,f}".format(q) if q == q.to_integral() else "{:f}".format(q)


def join_and(xs):
    if len(xs) <= 2:
        return " and ".join(xs)
    return ", ".join(xs[:-1]) + ", and " + xs[-1]


if __name__ == "__main__":
    if len(sys.argv) < 2:
        sys.exit("Usage: python3 fill.py quote.json [quote.html]")
    SRC = sys.argv[1]
    dst = sys.argv[2] if len(sys.argv) > 2 else re.sub(r"\.json$", "", SRC) + ".html"
    # Links are written relative to the output file, so a quote can be built into examples/ too.
    import os
    here = os.path.dirname(os.path.abspath(__file__))
    outdir = os.path.dirname(os.path.abspath(dst))
    ROOT = os.path.relpath(os.path.join(here, "..", "..", ".."), outdir).replace(os.sep, "/") + "/"
    CSS = os.path.relpath(os.path.join(here, "quote.css"), outdir).replace(os.sep, "/")
    page, sums = build(json.load(open(SRC, encoding="utf-8")))
    open(dst, "w", encoding="utf-8").write(page)
    print("wrote " + dst + ": " + str(sums["lines"]) + " lines, subtotal " + money(sums["subtotal"]).replace("&minus;", "-")
          + ", tax " + money(sums["tax"]) + ", total " + money(sums["total"]) + ", deposit " + money(sums["deposit"]))
quote.html158 lines, 20.1 KB
<!doctype html>
<!-- Generated by fill.py from quote.json. Edit the JSON, not this file. -->
<html lang="en" class="doc" data-status="draft" style="--doc-name: 'Marathon Creative, Quote 2026-118, Cangelosi'">
<head>
<meta charset="utf-8">
<title>Quote 2026-118, Cangelosi, Marathon Creative</title>
<link rel="stylesheet" href="../../../tokens/v/best/tokens.css">
<link rel="stylesheet" href="../../../docs-kit/v/best/doc.css">
<link rel="stylesheet" href="quote.css">
</head>
<body>
<header class="doc-masthead">
  <img class="doc-masthead__logo" src="../../../tokens/v/best/logos/marathon-logo-dark.svg" alt="Marathon Creative">
  <p class="doc-masthead__meta">Quote and scope of work 2026-118<br>Priced by Jacob Dow, sent by Taylor Treybig</p>
</header>
<dl class="doc-meta qs-meta">
  <div><dt>Prepared for</dt><dd>Cangelosi<span class="qs-meta__sub">Showroom and marketing lead, Houston</span></dd></div>
  <div><dt>Quote number</dt><dd>2026-118</dd></div>
  <div><dt>Issued</dt><dd>October 17, 2026</dd></div>
  <div><dt>Valid through</dt><dd>November 16, 2026</dd></div>
</dl>
<div class="doc-opener qs-opener">
  <span class="doc-eyebrow">Quote and scope of work</span>
  <h1 class="doc-title">Cangelosi showroom launch: a single shoot day, one catalog, 90 days of social.</h1>
  <p class="doc-lede">We shoot the showroom, the slabs, and the team in a single day, turn it into a brand film and a 16 page sample catalog, then run social, Meta ads, and a PaceCRM lead pipeline for the first 3 months.</p>
</div>
<div class="doc-stats doc-stats--3 qs-stats">
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$24,908</span><span class="doc-stat__label">Project total, tax included</span></div>
  <div class="doc-stat qs-stat doc-stat--key"><span class="doc-stat__value">$12,454</span><span class="doc-stat__label">Deposit at signing</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">6 weeks</span><span class="doc-stat__label">From signing to launch</span></div>
</div>
<div class="qs-section"><span class="doc-eyebrow">01, Line items</span><h2 class="doc-h2">What this quote covers</h2></div>
<table class="doc-table doc-table--fixed qs-items">
  <colgroup><col class="qs-w-n"><col><col class="doc-col-w11"><col class="qs-w-qty"><col class="doc-col-w1"><col class="doc-col-w125"></colgroup>
  <thead><tr><th class="num">No.</th><th>Item</th><th>Cost basis</th><th class="num">Qty</th><th class="num">Unit price</th><th class="num">Amount</th></tr></thead>
  <tbody>
    <tr class="qs-group"><td colspan="5">Production, a single shoot day</td><td class="num">$7,490.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">01<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">Showroom photography, full day<span class="doc-table__sub">60 edited stills: showroom vignettes, slab close-ups, and the monument sign</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$1,850.00<span class="doc-table__sub">per day</span></td><td class="num qs-amt">$1,850.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">02<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">Team portraits<span class="doc-table__sub">On location in the showroom, one backdrop, two selects per person</span></td><td class="qs-basis">In house</td><td class="num">12</td><td class="num">$95.00<span class="doc-table__sub">per person</span></td><td class="num qs-amt">$1,140.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">03<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">Showroom brand film<span class="doc-table__sub">One 90 second film plus three 15 second vertical cuts, edited in DaVinci Resolve</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$3,400.00<span class="doc-table__sub">per film</span></td><td class="num qs-amt">$3,400.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">04</td><td class="item">Drone stills and video<span class="doc-table__sub">Building, frontage, signage, and parking, flown by a Part 107 pilot</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$450.00<span class="doc-table__sub">per flight</span></td><td class="num qs-amt">$450.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">05<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">3D walkthrough tour<span class="doc-table__sub">Full showroom floor, hosted for 12 months, embedded on the website</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$650.00<span class="doc-table__sub">per tour</span></td><td class="num qs-amt">$650.00</td></tr>
  </tbody>
  <tbody>
    <tr class="qs-group"><td colspan="5">Design and print</td><td class="num">$4,688.50</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">06</td><td class="item">Sample catalog design<span class="doc-table__sub">16 pages plus cover, layout, copy edit, and press-ready files</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$2,400.00<span class="doc-table__sub">per catalog</span></td><td class="num qs-amt">$2,400.00</td></tr>
    <tr class="qs-line qs-line--vendor"><td class="num qs-n">07<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">Sample catalog printing<span class="doc-table__sub">500 copies, 8.5 x 11 in, 100 lb gloss text, 120 lb silk cover, saddle stitched</span></td><td class="qs-basis">Offset print vendor<span class="doc-table__sub">Cost plus 15%, taxable</span></td><td class="num">1</td><td class="num">$2,047.00<span class="doc-table__sub">per run of 500</span></td><td class="num qs-amt">$2,047.00</td></tr>
    <tr class="qs-line qs-line--vendor"><td class="num qs-n">08</td><td class="item">Slab and sample tags<span class="doc-table__sub">1,000 tags, 2 x 3.5 in, 16 pt matte, drilled for a tie</span></td><td class="qs-basis">Digital print vendor<span class="doc-table__sub">Cost plus 15%, taxable</span></td><td class="num">1</td><td class="num">$241.50<span class="doc-table__sub">per run of 1,000</span></td><td class="num qs-amt">$241.50</td></tr>
  </tbody>
  <tbody>
    <tr class="qs-group"><td colspan="5">Monthly, 3 month minimum</td><td class="num">$9,750.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">09<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">Social management<span class="doc-table__sub">Instagram and Facebook: 12 posts and four reels a month, scheduling, and community replies</span></td><td class="qs-basis">In house</td><td class="num">3</td><td class="num">$1,500.00<span class="doc-table__sub">per month</span></td><td class="num qs-amt">$4,500.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">10</td><td class="item">Paid ads management<span class="doc-table__sub">Meta campaigns for trade and designer leads, weekly optimization, monthly report</span></td><td class="qs-basis">In house</td><td class="num">3</td><td class="num">$750.00<span class="doc-table__sub">per month</span></td><td class="num qs-amt">$2,250.00</td></tr>
    <tr class="qs-line qs-line--vendor"><td class="num qs-n">11</td><td class="item">Meta ad spend<span class="doc-table__sub">Billed at cost with no markup, the ad account stays in Cangelosi&#x27;s name</span></td><td class="qs-basis">Meta Platforms<span class="doc-table__sub">At cost</span></td><td class="num">3</td><td class="num">$1,000.00<span class="doc-table__sub">per month</span></td><td class="num qs-amt">$3,000.00</td></tr>
  </tbody>
  <tbody>
    <tr class="qs-group"><td colspan="5">Systems</td><td class="num">$2,791.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">12<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">PaceCRM buildout<span class="doc-table__sub">Trade and designer lead pipeline, website form, two automations, email and SMS follow-up</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$2,200.00<span class="doc-table__sub">per build</span></td><td class="num qs-amt">$2,200.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">13<span class="qs-confirm" title="Jacob to confirm"></span></td><td class="item">PaceCRM subscription<span class="doc-table__sub">Hosting, phone number, and email sending, billed monthly</span></td><td class="qs-basis">In house</td><td class="num">3</td><td class="num">$197.00<span class="doc-table__sub">per month</span></td><td class="num qs-amt">$591.00</td></tr>
  </tbody>
  <tfoot>
    <tr class="minor"><td colspan="4">Subtotal</td><td class="num" colspan="2">$24,719.50</td></tr>
    <tr class="minor"><td colspan="4">Texas sales tax, 8.25%, on printed goods, on $2,288.50</td><td class="num" colspan="2">$188.80</td></tr>
    <tr class="total"><td colspan="4">Total</td><td class="num" colspan="2">$24,908.30</td></tr>
    <tr class="minor qs-deposit"><td colspan="4">Deposit due at signing, 50%</td><td class="num" colspan="2">$12,454.15</td></tr>
  </tfoot>
</table>
<div class="doc-keep qs-pay"><span class="doc-eyebrow">Payment schedule</span><h2 class="doc-h3">Three payments, tied to delivery.</h2>
<table class="doc-table doc-table--fixed doc-mt-s">
  <colgroup><col class="doc-col-w125"><col><col class="qs-w-qty"><col class="doc-col-w125"></colgroup>
  <thead><tr><th>When</th><th>Milestone</th><th class="num">Share</th><th class="num">Amount</th></tr></thead>
  <tbody>
    <tr><td class="item">At signing</td><td>Deposit, books the shoot date</td><td class="num">50%</td><td class="num">$12,454.15</td></tr>
    <tr><td class="item">Week 4</td><td>Photos, film, and catalog proofs delivered</td><td class="num">30%</td><td class="num">$7,472.49</td></tr>
    <tr><td class="item">Day 90</td><td>Third month of social and ads closes</td><td class="num">20%</td><td class="num">$4,981.66</td></tr>
  </tbody>
  <tfoot><tr class="qs-sum"><td colspan="2">Total</td><td class="num">100%</td><td class="num">$24,908.30</td></tr></tfoot>
</table></div>
<aside class="doc-note doc-note--editor">
  <span class="doc-note__label">Editor note, internal only</span>
  <p><strong>Jacob to confirm before this goes out.</strong> Lines 01, 02, 03, 05, 07, 09, 12, and 13, each marked with an amber bar under its number. Once he clears a line, set its confirm flag to false and run fill.py again.</p>
  <ul class="doc-list"><li>No approved rate card exists. Every line marked for confirmation is a working figure.</li><li>Name the two print vendors on the cost basis page and attach their written quotes to the job folder before sending.</li><li>Confirm which lines Texas taxes. This draft taxes printed goods only.</li><li>Confirm the 15% print handling rate, the $125 hourly revision rate, and the $250 late reschedule fee.</li></ul>
</aside>
<div class="doc-newpage doc-opener">
  <span class="doc-eyebrow">02, Cost basis</span>
  <h1 class="doc-title">Where the vendor money goes.</h1>
  <p class="doc-lede">Printing and ad spend run through outside vendors. This page shows what each vendor charges and what Marathon adds, line by line.</p>
</div>
<table class="doc-table doc-table--fixed qs-basis-table">
  <colgroup><col class="qs-w-n"><col><col class="doc-col-w11"><col class="doc-col-w11"><col class="doc-col-w11"></colgroup>
  <thead><tr><th class="num">No.</th><th>Line, vendor, and what the fee covers</th><th class="num">Vendor cost</th><th class="num">Marathon fee</th><th class="num">Billed</th></tr></thead>
  <tbody>
    <tr><td class="num qs-n">07</td><td class="item">Sample catalog printing<span class="doc-table__sub">Offset print vendor. Proofing, press check, and delivery to the showroom</span></td><td class="num">$1,780.00</td><td class="num">$267.00<span class="doc-table__sub">15% of cost</span></td><td class="num">$2,047.00</td></tr>
    <tr><td class="num qs-n">08</td><td class="item">Slab and sample tags<span class="doc-table__sub">Digital print vendor. Proofing and delivery to the showroom</span></td><td class="num">$210.00</td><td class="num">$31.50<span class="doc-table__sub">15% of cost</span></td><td class="num">$241.50</td></tr>
    <tr><td class="num qs-n">11</td><td class="item">Meta ad spend<span class="doc-table__sub">Meta Platforms. Nothing added, pass-through at cost</span></td><td class="num">$3,000.00</td><td class="num">$0.00<span class="doc-table__sub">No markup</span></td><td class="num">$3,000.00</td></tr>
  </tbody>
  <tfoot><tr class="qs-sum"><td colspan="2">Vendor lines</td><td class="num">$4,990.00</td><td class="num">$298.50</td><td class="num">$5,288.50</td></tr></tfoot>
  <caption>Vendor cost is the vendor&#x27;s written quote, before sales tax. Marathon&#x27;s fee covers what each line lists: proofing, press checks, and delivery. Lines marked no markup pass through at cost.</caption>
</table>
<div class="doc-stats doc-stats--3 qs-stats qs-split">
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$19,431</span><span class="doc-stat__label">Marathon in-house work, 79% of the subtotal</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$5,289</span><span class="doc-stat__label">Vendor and pass-through lines, 21% of the subtotal</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$189</span><span class="doc-stat__label">Sales tax, printed goods only</span></div>
</div>
<div class="doc-newpage doc-opener">
  <span class="doc-eyebrow">03, Scope of work</span>
  <h1 class="doc-title">What is included, and what is not.</h1>
  <p class="doc-lede">Anything outside this page is a change order, priced in writing before we start.</p>
</div>
<table class="doc-table doc-table--fixed qs-scope">
  <colgroup><col class="doc-col-w15"><col class="qs-w-in"><col></colgroup>
  <thead><tr><th>Service</th><th>Included</th><th>Not included</th></tr></thead>
  <tbody>
    <tr><td class="item">Photography and portraits</td><td>A single shoot day on site, 60 edited stills, 24 portrait selects, web and print files, delivered in 5 business days</td><td class="qs-out">Retouching beyond color, cleanup, and skin; a second shoot day</td></tr>
    <tr><td class="item">Brand film</td><td>A crew day shared with the photo shoot, licensed music, two rounds of edits, one 90 second film and three vertical cuts</td><td class="qs-out">Voiceover talent, actors, scripted scenes off site</td></tr>
    <tr><td class="item">Catalog and tags</td><td>Layout, copy edit, one printed color proof, press check, 500 catalogs and 1,000 tags delivered to the showroom</td><td class="qs-out">Product copy written from scratch, reprints after proof sign-off</td></tr>
    <tr><td class="item">Social and ads</td><td>Monthly content calendar for approval, 12 posts and four reels a month, Meta campaigns, a report by the fifth of each month</td><td class="qs-out">TikTok and LinkedIn, influencer fees, ad spend above $1,000 a month without a signed change order</td></tr>
    <tr><td class="item">PaceCRM</td><td>Pipeline, website form, two automations, email and SMS templates, one 60 minute training call for the showroom team</td><td class="qs-out">Data cleanup of more than 2,000 existing contacts, custom integrations</td></tr>
  </tbody>
</table>
<aside class="doc-note doc-note--compliance qs-comp"><span class="doc-note__label">Compliance</span><p>Aerials are flown by FAA Part 107 certificated pilots. Shoots inside controlled airspace near Bush Intercontinental, Hobby, Ellington, and Sugar Land need LAANC authorization, which can move the drone portion by a day.</p><p>Texas sales tax applies to printed goods and is shown separately. Services are listed without tax. Ad spend is billed at cost and carries no Marathon fee.</p></aside>
<div class="doc-newpage doc-opener">
  <span class="doc-eyebrow">04, Timeline</span>
  <h1 class="doc-title">Live 6 weeks from signing.</h1>
  <p class="doc-lede">Every step has a date and a name on it. If a step slips, its owner calls you before the deadline, not after.</p>
</div>
<table class="doc-table doc-table--fixed qs-time">
  <colgroup><col class="doc-col-w15"><col><col class="doc-col-w15"></colgroup>
  <thead><tr><th>When</th><th>What happens</th><th>Owner</th></tr></thead>
  <tbody>
    <tr><td class="item doc-num">Week 1, Oct 26</td><td>Kickoff call, shot list, catalog outline, and PaceCRM discovery</td><td>Jacob Dow</td></tr>
    <tr><td class="item doc-num">Week 2, Nov 2</td><td>Shoot day: stills, portraits, film, drone, and the 3D tour</td><td>Marathon crew</td></tr>
    <tr><td class="item doc-num">Week 3, Nov 9</td><td>Edited stills delivered, film rough cut sent for review</td><td>Marathon post</td></tr>
    <tr><td class="item doc-num">Week 4, Nov 16</td><td>Catalog proofs sent, PaceCRM pipeline live, ads built for approval</td><td>Taylor Treybig</td></tr>
    <tr><td class="item doc-num">Week 5, Nov 23</td><td>Catalog and tags to press after a signed proof, final film delivered</td><td>Philip, video edit</td></tr>
    <tr><td class="item doc-num">Week 6, Nov 30</td><td>Catalogs and tags delivered, social and ads go live</td><td>Taylor Treybig</td></tr>
    <tr><td class="item doc-num">Dec 1 to Feb 28</td><td>Monthly social, ads, and a performance report by the fifth</td><td>Taylor Treybig</td></tr>
  </tbody>
</table>
<div class="doc-keep"><hr class="doc-divider"><span class="doc-eyebrow">Client responsibilities</span><h2 class="doc-h3">What we need from Cangelosi to hold these dates</h2>
<ul class="doc-list"><li>Showroom access from 7am on the shoot day, with displays staged the way you want them shot.</li><li>A list of the 12 team members and their titles by the end of week one.</li><li>Admin access to the Meta Business account and the website, so the form and pixel can be installed.</li><li>One approver for proofs, with feedback inside 2 business days.</li></ul></div>
<div class="doc-newpage doc-opener">
  <span class="doc-eyebrow">05, Terms and acceptance</span>
  <h1 class="doc-title">Sign here to book the shoot date.</h1>
</div>
<h2 class="doc-h3">Terms</h2><ul class="doc-list doc-small qs-terms"><li>This quote holds through the valid-through date above. After that, Jacob reprices it.</li><li>The 50% deposit is due at signing and books the shoot date. Each later invoice is due in 15 days by ACH or card.</li><li>Design and film include two rounds of revisions. Further rounds bill at $125 an hour, quoted before we start.</li><li>Any change to scope is priced in writing and signed before the work begins.</li><li>Reschedule the shoot free up to 48 hours ahead. Inside 48 hours, a $250 crew fee applies.</li><li>Monthly services run 3 months, then continue month to month until either side gives 30 days notice in writing.</li><li>Print quantities can run up to 5% over or under the order. Overs are free, unders are credited.</li><li>Cangelosi owns every final deliverable once paid in full. Marathon may show the work in its portfolio unless Cangelosi opts out in writing.</li></ul>
<aside class="doc-callout qs-close">
  <span class="doc-eyebrow">To book</span>
  <p class="doc-callout__title">Sign below and pay the $12,454.15 deposit. That locks the shoot date. Taylor Treybig confirms it by email the same business day.</p>
  <dl class="qs-close__figures"><div><dt>Total</dt><dd>$24,908.30</dd></div><div><dt>Deposit</dt><dd>$12,454.15</dd></div><div><dt>Quote</dt><dd>2026-118</dd></div><div><dt>Valid through</dt><dd>November 16, 2026</dd></div></dl>
</aside>
<div class="doc-signoff qs-signoff">
  <div><div class="doc-signoff__line"></div><p class="doc-signoff__name">Jacob Dow</p><p class="doc-signoff__role">Founder, Marathon Creative</p><div class="qs-dateline"><span>Date</span></div></div>
  <div><div class="doc-signoff__line"></div><p class="doc-signoff__name">Accepted for Cangelosi</p><p class="doc-signoff__role">Printed name, title, and date</p><div class="qs-dateline"><span>Date</span></div></div>
</div>
</body>
</html>
examples/roofer.html142 lines, 12.4 KB
<!doctype html>
<!-- Generated by fill.py from examples/roofer.json. Edit the JSON, not this file. -->
<html lang="en" class="doc" data-status="final" style="--doc-name: 'Marathon Creative, Quote 2026-121, Halvorsen Roofing'">
<head>
<meta charset="utf-8">
<title>Quote 2026-121, Halvorsen Roofing, Marathon Creative</title>
<link rel="stylesheet" href="../../../../tokens/v/best/tokens.css">
<link rel="stylesheet" href="../../../../docs-kit/v/best/doc.css">
<link rel="stylesheet" href="../quote.css">
</head>
<body>
<header class="doc-masthead">
  <img class="doc-masthead__logo" src="../../../../tokens/v/best/logos/marathon-logo-dark.svg" alt="Marathon Creative">
  <p class="doc-masthead__meta">Quote and scope of work 2026-121<br>Priced by Jacob Dow, sent by Taylor Treybig</p>
</header>
<dl class="doc-meta qs-meta">
  <div><dt>Prepared for</dt><dd>Halvorsen Roofing<span class="qs-meta__sub">Owner, Katy</span></dd></div>
  <div><dt>Quote number</dt><dd>2026-121</dd></div>
  <div><dt>Issued</dt><dd>October 19, 2026</dd></div>
  <div><dt>Valid through</dt><dd>November 18, 2026</dd></div>
</dl>
<div class="doc-opener qs-opener">
  <span class="doc-eyebrow">Quote</span>
  <h1 class="doc-title">Storm season lead system for Halvorsen Roofing.</h1>
  <p class="doc-lede">Missed calls turn into texts, every lead lands in one PaceCRM pipeline, and yard signs and door hangers go out the week after each job.</p>
</div>
<div class="doc-stats doc-stats--3 qs-stats">
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$4,129</span><span class="doc-stat__label">Project total, tax included</span></div>
  <div class="doc-stat qs-stat doc-stat--key"><span class="doc-stat__value">$2,065</span><span class="doc-stat__label">Deposit at signing</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">3 weeks</span><span class="doc-stat__label">From signing to launch</span></div>
</div>
<div class="qs-section"><span class="doc-eyebrow">01, Line items</span><h2 class="doc-h2">What this quote covers</h2></div>
<table class="doc-table doc-table--fixed qs-items">
  <colgroup><col class="qs-w-n"><col><col class="doc-col-w11"><col class="qs-w-qty"><col class="doc-col-w1"><col class="doc-col-w125"></colgroup>
  <thead><tr><th class="num">No.</th><th>Item</th><th>Cost basis</th><th class="num">Qty</th><th class="num">Unit price</th><th class="num">Amount</th></tr></thead>
  <tbody>
    <tr class="qs-group"><td colspan="5">Systems</td><td class="num">$2,391.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">01</td><td class="item">PaceCRM buildout, storm leads<span class="doc-table__sub">Inspection, estimate, adjuster, and signed job stages, missed-call text-back, and review requests 24 hours after close</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$1,800.00<span class="doc-table__sub">per build</span></td><td class="num qs-amt">$1,800.00</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">02</td><td class="item">PaceCRM subscription<span class="doc-table__sub">Hosting, local phone number, and SMS sending</span></td><td class="qs-basis">In house</td><td class="num">3</td><td class="num">$197.00<span class="doc-table__sub">per month</span></td><td class="num qs-amt">$591.00</td></tr>
  </tbody>
  <tbody>
    <tr class="qs-group"><td colspan="5">Print</td><td class="num">$1,640.25</td></tr>
    <tr class="qs-line qs-line--vendor"><td class="num qs-n">03</td><td class="item">Yard signs<span class="doc-table__sub">18 x 24 in, 4 mm corrugated plastic, two sided, with H-stakes</span></td><td class="qs-basis">Sign vendor<span class="doc-table__sub">Cost plus 15%, taxable</span></td><td class="num">1</td><td class="num">$736.00<span class="doc-table__sub">per run of 100</span></td><td class="num qs-amt">$736.00</td></tr>
    <tr class="qs-line qs-line--vendor"><td class="num qs-n">04</td><td class="item">Door hangers<span class="doc-table__sub">4.25 x 11 in, 14 pt gloss, die cut, 2,500 pieces</span></td><td class="qs-basis">Digital print vendor<span class="doc-table__sub">Cost plus 15%, taxable</span></td><td class="num">1</td><td class="num">$454.25<span class="doc-table__sub">per run of 2,500</span></td><td class="num qs-amt">$454.25</td></tr>
    <tr class="qs-line qs-line--house"><td class="num qs-n">05</td><td class="item">Yard sign and door hanger design<span class="doc-table__sub">One design each, two rounds of revisions</span></td><td class="qs-basis">In house</td><td class="num">1</td><td class="num">$450.00<span class="doc-table__sub">per set</span></td><td class="num qs-amt">$450.00</td></tr>
  </tbody>
  <tfoot>
    <tr class="minor"><td colspan="4">Subtotal</td><td class="num" colspan="2">$4,031.25</td></tr>
    <tr class="minor"><td colspan="4">Texas sales tax, 8.25%, on printed goods, on $1,190.25</td><td class="num" colspan="2">$98.20</td></tr>
    <tr class="total"><td colspan="4">Total</td><td class="num" colspan="2">$4,129.45</td></tr>
    <tr class="minor qs-deposit"><td colspan="4">Deposit due at signing, 50%</td><td class="num" colspan="2">$2,064.73</td></tr>
  </tfoot>
</table>
<div class="doc-keep qs-pay"><span class="doc-eyebrow">Payment schedule</span><h2 class="doc-h3">Two payments, tied to delivery.</h2>
<table class="doc-table doc-table--fixed doc-mt-s">
  <colgroup><col class="doc-col-w125"><col><col class="qs-w-qty"><col class="doc-col-w125"></colgroup>
  <thead><tr><th>When</th><th>Milestone</th><th class="num">Share</th><th class="num">Amount</th></tr></thead>
  <tbody>
    <tr><td class="item">At signing</td><td>Deposit, starts the build</td><td class="num">50%</td><td class="num">$2,064.73</td></tr>
    <tr><td class="item">Week 3</td><td>PaceCRM live and print delivered</td><td class="num">50%</td><td class="num">$2,064.72</td></tr>
  </tbody>
  <tfoot><tr class="qs-sum"><td colspan="2">Total</td><td class="num">100%</td><td class="num">$4,129.45</td></tr></tfoot>
</table></div>
<section class="qs-keep">
<hr class="doc-divider">
<div class="doc-opener qs-opener--compact">
  <span class="doc-eyebrow">02, Cost basis</span>
  <h2 class="doc-h2">Where the vendor money goes.</h2>
  <p class="doc-lede">Printing and ad spend run through outside vendors. This page shows what each vendor charges and what Marathon adds, line by line.</p>
</div>
<table class="doc-table doc-table--fixed qs-basis-table">
  <colgroup><col class="qs-w-n"><col><col class="doc-col-w11"><col class="doc-col-w11"><col class="doc-col-w11"></colgroup>
  <thead><tr><th class="num">No.</th><th>Line, vendor, and what the fee covers</th><th class="num">Vendor cost</th><th class="num">Marathon fee</th><th class="num">Billed</th></tr></thead>
  <tbody>
    <tr><td class="num qs-n">03</td><td class="item">Yard signs<span class="doc-table__sub">Sign vendor. Design check, proofing, and delivery to the yard</span></td><td class="num">$640.00</td><td class="num">$96.00<span class="doc-table__sub">15% of cost</span></td><td class="num">$736.00</td></tr>
    <tr><td class="num qs-n">04</td><td class="item">Door hangers<span class="doc-table__sub">Digital print vendor. Proofing and delivery to the yard</span></td><td class="num">$395.00</td><td class="num">$59.25<span class="doc-table__sub">15% of cost</span></td><td class="num">$454.25</td></tr>
  </tbody>
  <tfoot><tr class="qs-sum"><td colspan="2">Vendor lines</td><td class="num">$1,035.00</td><td class="num">$155.25</td><td class="num">$1,190.25</td></tr></tfoot>
  <caption>Vendor cost is the vendor&#x27;s written quote, before sales tax. Marathon&#x27;s fee covers what each line lists: proofing, press checks, and delivery.</caption>
</table>
<div class="doc-stats doc-stats--3 qs-stats qs-split">
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$2,841</span><span class="doc-stat__label">Marathon in-house work, 70% of the subtotal</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$1,190</span><span class="doc-stat__label">Vendor and pass-through lines, 30% of the subtotal</span></div>
  <div class="doc-stat qs-stat"><span class="doc-stat__value">$98</span><span class="doc-stat__label">Sales tax, printed goods only</span></div>
</div>
</section>
<section class="qs-keep">
<hr class="doc-divider">
<div class="doc-opener qs-opener--compact">
  <span class="doc-eyebrow">03, Scope of work</span>
  <h2 class="doc-h2">What is included, and what is not.</h2>
  <p class="doc-lede">Anything outside this page is a change order, priced in writing before we start.</p>
</div>
<table class="doc-table doc-table--fixed qs-scope">
  <colgroup><col class="doc-col-w15"><col class="qs-w-in"><col></colgroup>
  <thead><tr><th>Service</th><th>Included</th><th>Not included</th></tr></thead>
  <tbody>
    <tr><td class="item">PaceCRM</td><td>Pipeline, missed-call text-back, review requests, and a 45 minute training call for the office</td><td class="qs-out">Importing more than 1,000 old contacts, adjuster portal integrations</td></tr>
    <tr><td class="item">Print</td><td>Design, one digital proof, 100 yard signs, and 2,500 door hangers delivered to the yard</td><td class="qs-out">Installing signs on site, reprints after proof sign-off</td></tr>
  </tbody>
</table>
<aside class="doc-note doc-note--compliance qs-comp"><span class="doc-note__label">Compliance</span><p>Texts go only to contacts who opted in. PaceCRM records consent and honors STOP replies automatically, as the TCPA requires.</p></aside>
</section>
<section class="qs-keep">
<hr class="doc-divider">
<div class="doc-opener qs-opener--compact">
  <span class="doc-eyebrow">04, Timeline</span>
  <h2 class="doc-h2">Live 3 weeks from signing.</h2>
  <p class="doc-lede">Built in 3 weeks, before the spring hail season starts.</p>
</div>
<table class="doc-table doc-table--fixed qs-time">
  <colgroup><col class="doc-col-w15"><col><col class="doc-col-w15"></colgroup>
  <thead><tr><th>When</th><th>What happens</th><th>Owner</th></tr></thead>
  <tbody>
    <tr><td class="item doc-num">Week 1</td><td>Kickoff call, pipeline stages agreed, print proofs sent</td><td>Taylor Treybig</td></tr>
    <tr><td class="item doc-num">Week 2</td><td>PaceCRM built and tested with a real missed call</td><td>Marathon systems</td></tr>
    <tr><td class="item doc-num">Week 3</td><td>Training call, pipeline live, signs and hangers delivered</td><td>Taylor Treybig</td></tr>
  </tbody>
</table>
<div class="doc-keep"><hr class="doc-divider"><span class="doc-eyebrow">Client responsibilities</span><h2 class="doc-h3">What we need from Halvorsen Roofing to hold these dates</h2>
<ul class="doc-list"><li>Your current lead list as a spreadsheet by the end of week one.</li><li>The phone number you want calls routed to, and who answers it.</li></ul></div>
</section>
<section class="qs-keep">
<hr class="doc-divider">
<div class="doc-opener qs-opener--compact">
  <span class="doc-eyebrow">05, Terms and acceptance</span>
  <h2 class="doc-h2">Sign here to start.</h2>
</div>
<h2 class="doc-h3">Terms</h2><ul class="doc-list doc-small qs-terms"><li>This quote holds through the valid-through date above.</li><li>The 50% deposit is due at signing. The balance is due in 15 days by ACH or card.</li><li>Any change to scope is priced in writing and signed before the work begins.</li><li>Print quantities can run up to 5% over or under the order. Overs are free, unders are credited.</li></ul>
<aside class="doc-callout qs-close">
  <span class="doc-eyebrow">To book</span>
  <p class="doc-callout__title">Sign below and pay the $2,064.73 deposit. That locks your start date. Taylor Treybig confirms it by email the same business day.</p>
  <dl class="qs-close__figures"><div><dt>Total</dt><dd>$4,129.45</dd></div><div><dt>Deposit</dt><dd>$2,064.73</dd></div><div><dt>Quote</dt><dd>2026-121</dd></div><div><dt>Valid through</dt><dd>November 18, 2026</dd></div></dl>
</aside>
<div class="doc-signoff qs-signoff">
  <div><div class="doc-signoff__line"></div><p class="doc-signoff__name">Jacob Dow</p><p class="doc-signoff__role">Founder, Marathon Creative</p><div class="qs-dateline"><span>Date</span></div></div>
  <div><div class="doc-signoff__line"></div><p class="doc-signoff__name">Accepted for Halvorsen Roofing</p><p class="doc-signoff__role">Printed name, title, and date</p><div class="qs-dateline"><span>Date</span></div></div>
</div>
</section>
</body>
</html>
examples/roofer.json64 lines, 4.0 KB
{
  "_help": "Short example: a local service client, no shoot day, two vendor print lines, final status. Run: python3 fill.py examples/roofer.json examples/roofer.html",
  "status": "final",
  "number": "2026-121",
  "issued": "October 19, 2026",
  "valid_through": "November 18, 2026",
  "priced_by": "Jacob Dow",
  "sent_by": "Taylor Treybig",
  "client": { "company": "Halvorsen Roofing", "attention": "Owner", "location": "Katy" },
  "project": {
    "eyebrow": "Quote",
    "title": "Storm season lead system for Halvorsen Roofing.",
    "lede": "Missed calls turn into texts, every lead lands in one PaceCRM pipeline, and yard signs and door hangers go out the week after each job.",
    "launch": "3 weeks from signing"
  },
  "headings": {
    "time_lede": "Built in 3 weeks, before the spring hail season starts."
  },
  "groups": [
    { "name": "Systems", "lines": [
      { "item": "PaceCRM buildout, storm leads", "detail": "Inspection, estimate, adjuster, and signed job stages, missed-call text-back, and review requests 24 hours after close", "qty": 1, "unit": "build", "price": 1800 },
      { "item": "PaceCRM subscription", "detail": "Hosting, local phone number, and SMS sending", "qty": 3, "unit": "month", "price": 197 }
    ]},
    { "name": "Print", "lines": [
      { "item": "Yard signs", "detail": "18 x 24 in, 4 mm corrugated plastic, two sided, with H-stakes", "qty": 1, "unit": "run of 100", "taxable": true,
        "vendor": { "name": "Sign vendor", "cost": 640, "handling_pct": 15, "covers": "Design check, proofing, and delivery to the yard" } },
      { "item": "Door hangers", "detail": "4.25 x 11 in, 14 pt gloss, die cut, 2,500 pieces", "qty": 1, "unit": "run of 2,500", "taxable": true,
        "vendor": { "name": "Digital print vendor", "cost": 395, "handling_pct": 15, "covers": "Proofing and delivery to the yard" } },
      { "item": "Yard sign and door hanger design", "detail": "One design each, two rounds of revisions", "qty": 1, "unit": "set", "price": 450 }
    ]}
  ],
  "tax": { "rate_pct": 8.25, "label": "Texas sales tax, 8.25%, on printed goods" },
  "payments": [
    { "when": "At signing", "what": "Deposit, starts the build", "pct": 50 },
    { "when": "Week 3", "what": "PaceCRM live and print delivered", "pct": 50 }
  ],
  "scope": [
    { "service": "PaceCRM", "included": "Pipeline, missed-call text-back, review requests, and a 45 minute training call for the office", "excluded": "Importing more than 1,000 old contacts, adjuster portal integrations" },
    { "service": "Print", "included": "Design, one digital proof, 100 yard signs, and 2,500 door hangers delivered to the yard", "excluded": "Installing signs on site, reprints after proof sign-off" }
  ],
  "client_provides": [
    "Your current lead list as a spreadsheet by the end of week one.",
    "The phone number you want calls routed to, and who answers it."
  ],
  "timeline": [
    { "when": "Week 1", "what": "Kickoff call, pipeline stages agreed, print proofs sent", "owner": "Taylor Treybig" },
    { "when": "Week 2", "what": "PaceCRM built and tested with a real missed call", "owner": "Marathon systems" },
    { "when": "Week 3", "what": "Training call, pipeline live, signs and hangers delivered", "owner": "Taylor Treybig" }
  ],
  "terms": [
    "This quote holds through the valid-through date above.",
    "The 50% deposit is due at signing. The balance is due in 15 days by ACH or card.",
    "Any change to scope is priced in writing and signed before the work begins.",
    "Print quantities can run up to 5% over or under the order. Overs are free, unders are credited."
  ],
  "compliance": [
    "Texts go only to contacts who opted in. PaceCRM records consent and honors STOP replies automatically, as the TCPA requires."
  ],
  "signers": {
    "marathon": { "name": "Jacob Dow", "role": "Founder, Marathon Creative" },
    "client": { "name": "Accepted for Halvorsen Roofing", "role": "Printed name, title, and date" }
  }
}