How LLC Owners Save on Taxes in 2026

Lawyer Find more write-offs — search your profession or a specific deduction
Try:
Others Also Use These Strategies
Lawyer IRC §162

Bar Association Dues, CLE Credits & State Bar Fees

State bar association dues, ABA membership, CLE (Continuing Legal Education) course fees, bar exam fees, and specialty bar association memberships are fully deductible.

Eligibility Requirements
  • Licensed attorney
  • Dues and fees for maintaining legal license
  • CLE required for license renewal
Example Savings Scenario

An attorney paying $1,800 in state bar dues, $800 ABA membership, and $2,400 in CLE courses deducts $5,000 — saving $1,650 at 33%.

MERNA Strategy Notes

Bar dues paid in advance for the following year may need to be allocated. Specialty bar memberships (AILA, ATLA, ABA sections) are all deductible.

Common Mistake: Bar exam fees for entering the legal profession for the first time are not deductible — only fees for maintaining an existing license.
Professional IRC §162

Attorney Bar Dues, CLE Credits & License Renewal Deduction

Attorneys can deduct state bar dues ($200–$600/yr), ABA membership ($150–$500/yr), and all CLE (Continuing Legal Education) costs — typically $500–$2,000 per year. CLE is required to maintain bar membership (12–15 hours annually in most states). Also deduct specialty bar association dues, legal research subscriptions (Westlaw, LexisNexis), and malpractice insurance premiums.

Eligibility Requirements
  • Must be a licensed attorney
  • Bar dues and CLE must be required for your law license
  • State bar license renewal fees are also deductible
  • Specialty bar association dues are also deductible
Example Savings Scenario

An attorney paying $600/year in state bar dues, $400 in CLE courses, $200 in ABA membership, and $300 in specialty bar association dues deducts $1,500, saving $555 at 37%.

MERNA Strategy Notes

Attorneys have mandatory bar dues and CLE requirements. State bar dues ($200-$600/year), CLE credits (typically 12-15 hours/year, costs $200-$800/year), ABA membership ($100-$400/year), specialty bar association dues (ATLA, ABOTA, AILA), and specialty certification fees (board certification) are all deductible. Legal research tools (Westlaw, LexisNexis) and practice management software are also deductible.

Common Mistake: Initial bar exam fees and bar prep course costs to obtain your first law license are not deductible as business expenses. However, all bar renewal and CLE costs for a practicing attorney are fully deductible.
Lawyer IRC §162

Legal Malpractice Insurance & Professional Liability Premiums

Legal malpractice insurance premiums are fully deductible as a business expense. For attorneys in high-risk practice areas, annual premiums can reach $15,000-$50,000+.

Eligibility Requirements
  • Licensed attorney
  • Professional liability insurance for legal practice
  • Premiums paid during the tax year
Example Savings Scenario

A medical malpractice attorney paying $28,000/year in professional liability insurance deducts the full amount — saving $9,240 at 33%.

MERNA Strategy Notes

Tail coverage premiums (for claims after you stop practicing) are also deductible in the year paid.

Common Mistake: Personal liability insurance (homeowners, auto) is not deductible as a business expense.
Business Expenses IRC §162

Malpractice & Professional Liability Insurance Deduction

Professional liability insurance (malpractice insurance) premiums are fully deductible as a business expense. This applies to all licensed professionals including physicians, dentists, nurses, attorneys, financial advisors, CPAs, architects, and any other professional who carries liability coverage for their practice.

Eligibility Requirements
  • Professional liability or malpractice insurance policy
  • Coverage related to your professional practice
  • Self-employed or business owner
Example Savings Scenario

A physician paying $8,000/year in malpractice insurance premiums deducts the full amount, saving $2,400–$3,200 in taxes.

MERNA Strategy Notes

Tail coverage (extended reporting period coverage) is also deductible in the year paid. If your employer pays for malpractice coverage, you cannot deduct it — only premiums you pay yourself qualify.

Common Mistake: Do not confuse professional liability insurance with personal life or disability insurance — only professional liability premiums are deductible as a business expense.
Business IRC §280A Uncle Kam Clients Only

Bookkeeper Home Office & Vehicle Deduction

Bookkeepers working from home can deduct the home office space used exclusively for client work — typically worth $1,500–$4,000 per year using the actual expense method. Vehicle mileage to client offices, bank runs, and networking events is deductible at 70 cents per mile. A bookkeeper driving 5,000 business miles deducts $3,500.

Eligibility Requirements
  • Must use a dedicated space in your home exclusively and regularly for bookkeeping
  • Vehicle must be used for business purposes (client meetings, bank runs)
  • Must report income on Schedule C
  • Must have documentation of business use
Example Savings Scenario

A freelance bookkeeper using 12% of their home for bookkeeping deducts $2,400/year in home office expenses, plus $2,010 in vehicle mileage (3,000 miles x $0.67), saving $1,633 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 Uncle Kam Clients Only

Internet & Broadband Deduction

Your home internet bill is deductible to the extent it is used for business. For most self-employed professionals who work from home, this is 50–100% of the monthly cost. A dedicated business internet line is 100% deductible.

Eligibility Requirements
  • Self-employed, freelancer, or business owner
  • Internet used for business purposes
  • Allocate business vs personal use if mixed
Example Savings Scenario

A self-employed consultant paying $80/month for internet and using it 80% for business deducts $768/year, saving $230–$307 in taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §162, §179 Uncle Kam Clients Only

Vehicle & Mileage Deduction

Deduct business vehicle expenses using the standard mileage rate or actual expenses (depreciation, gas, insurance, repairs). Section 179 and 100% bonus depreciation allow full expensing of heavy SUVs and trucks in Year 1.

Eligibility Requirements
  • Vehicle used for business purposes
  • Mileage log maintained for standard rate method
  • Heavy SUV (6,000+ lbs GVWR) for Section 179 bonus
Example Savings Scenario

Driving 20,000 business miles at 72.5¢/mile = $14,500 deduction. A $80,000 SUV over 6,000 lbs can be fully expensed under 100% bonus depreciation, saving $29,600 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 Uncle Kam Clients Only

Software & Subscription Deduction

Any software subscription or SaaS tool you pay for and use in your business is fully deductible in the year paid. This includes accounting software (QuickBooks, FreshBooks), design tools (Adobe Creative Cloud, Figma, Canva), communication tools (Zoom, Slack, Microsoft 365), project management tools (Asana, Monday.com), and any other business application.

Eligibility Requirements
  • Software used for business purposes
  • Self-employed, freelancer, or business owner
  • Annual or monthly subscription fees qualify
Example Savings Scenario

A freelance designer paying $600/year for Adobe Creative Cloud, $150 for Figma, and $200 for project management tools deducts $950/year, saving $285–$380.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 Uncle Kam Clients Only

Coworking Space & Office Rent Deduction

If you rent a coworking space, shared office, or dedicated office for your business, the full cost is deductible. This includes WeWork, Regus, local coworking memberships, and any other office rental. Monthly membership fees, day passes, and dedicated desk or private office costs all qualify.

Eligibility Requirements
  • Coworking space or office used for business purposes
  • Self-employed, freelancer, or business owner
  • Monthly or annual fees paid for the space
Example Savings Scenario

A freelancer paying $400/month for a coworking membership deducts $4,800/year, saving $1,440–$1,920 in taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 Uncle Kam Clients Only

Accounting, Bookkeeping & Tax Preparation Fees Deduction

The cost of accounting, bookkeeping, and tax preparation for your business is fully deductible. This includes CPA fees for tax preparation and planning, bookkeeper fees, payroll service costs (Gusto, ADP, Paychex), accounting software (QuickBooks, Xero), and any other professional fees related to managing your business finances.

Eligibility Requirements
  • Self-employed, freelancer, or business owner
  • Fees related to your business finances and taxes
  • Paid in the tax year
Example Savings Scenario

A self-employed consultant paying $3,500/year for CPA services, bookkeeping, and QuickBooks deducts the full amount, saving $1,050–$1,400 in taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A(g) Uncle Kam Clients Only

Augusta Rule (Section 280A Home Rental)

Under IRC §280A(g), a homeowner can rent their personal residence to their business for up to 14 days per year. The rental income is completely tax-free to the homeowner, and the business deducts the full rental payment.

Eligibility Requirements
  • Own a business (S-Corp, C-Corp, or partnership)
  • Own your personal residence
  • Have legitimate business meetings, retreats, or events at your home
Example Savings Scenario

A business owner renting their home to their S-Corp for 14 days at $2,000/day: $28,000 in tax-free income to the owner + $28,000 business deduction saves $10,360 at a 37% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 Uncle Kam Clients Only

Office Supplies & Materials Deduction

Any supplies you purchase and use in your business are fully deductible in the year purchased. This includes paper, pens, printer ink and toner, folders, binders, postage, envelopes, labels, staples, tape, and any other consumable materials used in your work.

Eligibility Requirements
  • Self-employed, freelancer, or business owner
  • Supplies used for business purposes
  • Consumed or used up within the tax year
Example Savings Scenario

A small business owner spending $1,200/year on office supplies saves $360–$480 in taxes depending on their bracket.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 / IRC §179 Uncle Kam Clients Only

Computer, Laptop & Hardware Deduction

Computers, laptops, tablets, monitors, keyboards, mice, external hard drives, and other hardware used in your business are fully deductible. Under Section 179, you can expense the full cost in Year 1 instead of depreciating over 5 years. For mixed business/personal use, only the business-use percentage is deductible.

Eligibility Requirements
  • Computer or hardware used for business purposes
  • Self-employed, freelancer, or business owner
  • Business-use percentage documented for mixed-use devices
Example Savings Scenario

A freelance software engineer purchasing a $2,500 laptop used 95% for work expenses $2,375 under Section 179, saving $713–$950 in taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §1366, Rev. Rul. 74-44 Uncle Kam Clients Only

S-Corp Reasonable Salary Optimization

S-Corp shareholders pay payroll taxes only on their "reasonable salary," not on all business profits. Distributions above the salary avoid 15.3% self-employment tax.

Eligibility Requirements
  • Operate as an S-Corporation
  • Pay yourself a reasonable salary for services rendered
  • Take remaining profits as distributions
Example Savings Scenario

A business earning $300,000 net. Salary set at $80,000 (reasonable). Distributions: $220,000. SE tax savings: $220,000 × 15.3% = $33,660/year.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §199A Uncle Kam Clients Only 2026 Law Update

Qualified Business Income (QBI) Deduction

Pass-through business owners (sole props, partnerships, S-Corps, LLCs) can deduct up to 23% of qualified business income starting in 2026, permanently under the OBBBA. The deduction reduces effective tax rates significantly.

Eligibility Requirements
  • Income from a pass-through entity or sole proprietorship
  • Taxable income below income thresholds for full deduction (consult advisor for 2026 inflation-adjusted limits)
  • Specified service trades may be phased out above thresholds
  • New minimum deduction of $400 for taxpayers with at least $1,000 of active QBI
Example Savings Scenario

A consultant earning $200,000 in QBI deducts $46,000 (23%), saving $17,020 at a 37% rate — $2,220 more than under the old 20% rule.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §199A Uncle Kam Clients Only

QBI Deduction — Section 199A (20% Pass-Through Deduction)

Pass-through business owners (sole props, S-Corps, LLCs, partnerships) can deduct up to 20% of qualified business income from taxable income. This is one of the largest tax breaks available to small business owners.

Eligibility Requirements
  • Own a pass-through business
  • Taxable income under $197,300 (single) or $394,600 (married) for full deduction
  • Specified service businesses (law, consulting, finance) phase out above these thresholds
Example Savings Scenario

A business owner with $200,000 in QBI at a 24% rate: 20% deduction = $40,000 reduction in taxable income = $9,600 in tax savings.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Home Office Deduction

Deduct a portion of your home expenses (mortgage interest, rent, utilities, insurance, depreciation) based on the percentage of your home used exclusively and regularly for business.

Eligibility Requirements
  • Self-employed, freelancer, or business owner
  • Space used exclusively and regularly for business
  • Principal place of business or where clients are met
Example Savings Scenario

A 200 sq ft office in a 2,000 sq ft home = 10% allocation. $30,000 in home expenses × 10% = $3,000 deduction, saving $1,110 at a 37% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business Expenses IRC §162 / IRC §280A Uncle Kam Clients Only

Studio Space & Creative Workspace Deduction

If you rent a separate studio space for your creative work, the full cost of rent, utilities, and equipment for that space is deductible. If you use a dedicated room in your home exclusively as a studio, it qualifies for the home office deduction. This applies to photography studios, podcast recording studios, video production spaces, and any other dedicated creative workspace.

Eligibility Requirements
  • Dedicated space used exclusively for business creative work
  • Rented studio: full cost deductible; home studio: home office deduction rules apply
  • Self-employed creative professional
Example Savings Scenario

A photographer renting a studio for $1,500/month deducts $18,000/year in rent, saving $5,400–$7,200 in taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Therapist IRC §280A Uncle Kam Clients Only

Home Office Deduction for Therapists

Therapists who maintain a dedicated space in their home used exclusively and regularly for client sessions or administrative work qualify for the home office deduction. You can deduct a proportional share of rent or mortgage interest, utilities, internet, and homeowners insurance based on the square footage of the therapy space relative to total home square footage.

Eligibility Requirements
  • Dedicated room used exclusively for therapy sessions or administrative work
  • Space used regularly (not occasionally)
  • Can be a home office for telehealth sessions or in-person sessions
  • Works for both renters and homeowners
Example Savings Scenario

A therapist with a 200 sq ft home office in a 1,500 sq ft home (13.3%) paying $2,500/month rent deducts $3,990/year. A homeowner with $18,000 in mortgage interest and utilities deducts $2,394/year.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Musician IRC §280A Uncle Kam Clients Only

Home Studio & Practice Space Deduction

Musicians who use a dedicated space at home for recording, practicing, or teaching can deduct a proportional share of rent or mortgage interest, utilities, internet, and home maintenance. Soundproofing, acoustic panels, and studio furniture are 100% deductible.

Eligibility Requirements
  • Dedicated space used regularly and exclusively for music business
  • Self-employed musician with Schedule C income
  • Space used for recording, practice, teaching, or administrative work
Example Savings Scenario

A musician with a 200 sq ft studio in a 1,500 sq ft home deducts 13.3% of $24,000 annual rent = $3,200/year, saving $1,120 at a 35% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Software Engineer IRC §280A Uncle Kam Clients Only

Home Office Deduction for Remote Software Engineers

Remote software engineers who work from a dedicated home office space can deduct a proportional share of rent, mortgage interest, utilities, and internet. Self-employed only — W-2 employees cannot claim this deduction under current tax law.

Eligibility Requirements
  • Self-employed (1099/freelance) software engineer
  • Dedicated workspace used exclusively and regularly for business
  • Principal place of business or where clients are met
Example Savings Scenario

A freelance developer with a 180 sq ft office in a 1,400 sq ft apartment ($2,800/month rent) deducts $4,334/year in home office expenses.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Virtual Assistant Home Office & Equipment Deduction

Virtual assistants working from home can deduct the home office space used exclusively for client work — typically $1,500–$4,000 per year. Also deduct computer equipment, monitors, keyboards, headsets, and any hardware used for client work under Section 179. A VA spending $3,000 on a new MacBook and monitor setup deducts the full amount in the year purchased.

Eligibility Requirements
  • Must be a self-employed virtual assistant
  • Must use a dedicated space in your home exclusively and regularly for VA work
  • Equipment must be used for VA work that generates income
  • Must report income on Schedule C
Example Savings Scenario

A virtual assistant using 10% of their home for work deducts $2,000/year in home office expenses, plus $1,500 in laptop and equipment, saving $1,295 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Copywriter Home Office & Research Deduction

Copywriters working from home can deduct their dedicated home office space, all research materials (books, industry reports, subscriptions), and any databases or research tools used for client work. A copywriter spending $2,000 on industry research, competitor analysis tools, and reference materials deducts the full amount. Also deduct Grammarly, Hemingway, and writing software subscriptions.

Eligibility Requirements
  • Must be a self-employed copywriter or content writer
  • Must use a dedicated space in your home exclusively and regularly for writing
  • Research costs must be for copywriting work that generates income
  • Must report income on Schedule C
Example Savings Scenario

A freelance copywriter using 12% of their home for writing deducts $2,400/year in home office expenses, plus $1,200 in research and reference materials, saving $1,332 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Business Consultant Home Office & Professional Setup Deduction

Business consultants working from home can deduct the home office space used exclusively for client work and business activities. A 300 sq ft office in a 2,500 sq ft home yields a 12% deduction of all home expenses — typically $4,000–$10,000 per year. Also deduct all office equipment, furniture, and technology used for consulting work under Section 179.

Eligibility Requirements
  • Must be a self-employed business or management consultant
  • Must use a dedicated space in your home exclusively and regularly for consulting
  • Equipment must be used for consulting work that generates income
  • Must report income on Schedule C
Example Savings Scenario

A business consultant using 15% of their home for consulting deducts $4,500/year in home office expenses, plus $3,000 in equipment, saving $2,775 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Freelancer Home Office Deduction

Freelancers working from home can deduct the home office space used exclusively and regularly for business. The simplified method allows $5 per square foot (max 300 sq ft = $1,500 deduction). The actual expense method — deducting a percentage of rent, utilities, insurance, and internet — typically yields $3,000–$8,000 per year for most freelancers.

Eligibility Requirements
  • Must be a self-employed freelancer or independent contractor
  • Must use a dedicated space in your home exclusively and regularly for freelance work
  • Space must be your principal place of business
  • Must report income on Schedule C
Example Savings Scenario

A freelancer using 12% of their home for work deducts $2,400/year in home office expenses, saving $888 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Photographer Studio & Home Office Deduction

Photographers can deduct a dedicated home studio space used exclusively for photography work — shooting, editing, and client meetings. A 400 sq ft studio in a 2,000 sq ft home yields a 20% deduction of all home expenses — typically $4,000–$10,000 per year. Also deduct editing software (Adobe Lightroom, Photoshop, Capture One), cloud storage, and gallery delivery platforms (Pixieset, ShootProof).

Eligibility Requirements
  • Must be a self-employed photographer
  • Studio must be used exclusively and regularly for photography business
  • Home studio qualifies if used exclusively for photography sessions or editing
  • Must report income on Schedule C
Example Savings Scenario

A photographer using 20% of their home as a studio deducts $5,000/year in home studio expenses, saving $1,850 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §280A Uncle Kam Clients Only

Graphic Designer Equipment & Home Office Deduction

Graphic designers can deduct computer equipment (iMac, MacBook Pro), external monitors, drawing tablets (Wacom Intuos Pro $500, Cintiq $1,500+), and any hardware used for design work under Section 179. A designer spending $5,000 on a new iMac and Wacom tablet deducts the full amount in year one. Also deduct the home office space used exclusively for design work.

Eligibility Requirements
  • Must be a self-employed graphic designer
  • Must use a dedicated space in your home exclusively and regularly for design work
  • Equipment must be used for design work that generates income
  • Must report income on Schedule C
Example Savings Scenario

A graphic designer using 12% of their home for design work deducts $2,400/year in home office expenses, plus $3,500 in equipment (iMac, Wacom tablet, monitor), saving $2,183 at 37%.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §1366 Uncle Kam Clients Only

S-Corp Owner Reasonable Salary & Distribution Strategy

S-Corp owners must pay themselves a reasonable salary for services rendered to the corporation — but can take additional profits as distributions not subject to self-employment tax. An S-Corp owner earning $200,000 in profit who pays themselves a $80,000 salary saves $18,360 in SE taxes on the $120,000 distribution. The IRS requires the salary to be comparable to what you would pay a third party for the same work.

Eligibility Requirements
  • Must be an S-Corp shareholder-employee
  • Must pay yourself a reasonable salary for services performed
  • Distributions above salary are not subject to SE tax
  • Must have consistent profitability to justify S-Corp election
Example Savings Scenario

An S-Corp owner with $150,000 in profit takes $75,000 as salary and $75,000 as distributions, saving $11,475 in SE tax vs. sole proprietor (15.3% on $75,000 = $11,475).

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §62(a)(2)(A) Uncle Kam Clients Only

S-Corp Owner Accountable Plan Reimbursement Strategy

S-Corp owners can reimburse themselves tax-free for business expenses through an Accountable Plan — home office, vehicle, phone, internet, and equipment. The corporation deducts the reimbursement as a business expense, and the owner receives it tax-free. An S-Corp owner reimbursing $12,000/year in home office and vehicle expenses saves $4,440 in taxes at 37%.

Eligibility Requirements
  • Must be an S-Corp shareholder-employee
  • Must have a written accountable plan policy
  • Expenses must have a business connection
  • Must substantiate expenses with receipts and documentation
Example Savings Scenario

An S-Corp owner reimbursing $12,000/year in home office, vehicle, and phone expenses through an accountable plan saves $4,440 in taxes at 37% - the reimbursements are tax-free to the employee and deductible to the S-Corp.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Real Estate IRC §280A(g) Uncle Kam Clients Only

Augusta Rule (Home Rental Exclusion)

Rent your personal home to your business for up to 14 days per year. The rental income is tax-free to you personally, and the business deducts the full rental expense.

Eligibility Requirements
  • Own a business (S-Corp, LLC, or sole prop)
  • Home rented for 14 days or fewer per year
  • Rental rate must be comparable to local market rates
  • Document with a rental agreement and business purpose
Example Savings Scenario

Renting your home to your S-Corp for 14 days at $2,000/day = $28,000 tax-free income to you, $28,000 deduction for the business, saving $10,360 in combined taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §62(a)(2)(A), Reg. 1.62-2 Uncle Kam Clients Only

Accountable Plan Reimbursements

Establish a formal accountable plan to reimburse employees (including owner-employees) for business expenses tax-free. The business deducts the reimbursement; the employee pays no income or payroll tax on it.

Eligibility Requirements
  • Operate as an S-Corp, C-Corp, or partnership
  • Expenses have a business connection
  • Employee substantiates expenses and returns excess amounts
Example Savings Scenario

An S-Corp owner with $15,000 in home office, vehicle, and phone expenses reimburses through an accountable plan, saving $5,550 in combined income and payroll taxes.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §164, State Law Uncle Kam Clients Only

Pass-Through Entity Tax (PTET) SALT Workaround

Many states allow S-Corps and partnerships to elect to pay state income tax at the entity level, generating a federal deduction that bypasses the $10,000 SALT cap for individual owners.

Eligibility Requirements
  • S-Corp or partnership in a state with a PTET election
  • Owners subject to state income tax on pass-through income
  • Election made at the entity level by the state deadline
Example Savings Scenario

An S-Corp owner in California paying $50,000 in state income tax: PTET election moves $40,000 above the SALT cap to a federal deduction, saving $14,800 at a 37% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §7701 Uncle Kam Clients Only

LLC Owner Tax Election Strategy (Sole Prop vs. S-Corp vs. C-Corp)

LLC owners can elect to be taxed as a sole proprietorship (default), S-Corp, or C-Corp. The S-Corp election typically saves $5,000–$20,000 in self-employment taxes once net income exceeds $50,000. The C-Corp election (21% flat rate) benefits owners reinvesting profits in the business. The right election depends on income level, distribution needs, and business goals.

Eligibility Requirements
  • Must own an LLC (single-member or multi-member)
  • Single-member LLCs are taxed as sole proprietors by default
  • Multi-member LLCs are taxed as partnerships by default
  • Can elect S-Corp or C-Corp taxation by filing Form 2553 or Form 8832
Example Savings Scenario

An LLC owner with $120,000 in profit who elects S-Corp taxation saves $9,180 in SE tax by taking $60,000 as salary and $60,000 as distributions.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §41 Uncle Kam Clients Only

Research & Development (R&D) Tax Credit

A dollar-for-dollar tax credit for qualified research expenses including wages, supplies, and contract research. Startups can apply up to $500,000/year against payroll taxes.

Eligibility Requirements
  • Conducting qualified research activities (new or improved products/processes)
  • Incurring qualified research expenses (wages, supplies, contract research)
  • Startups with < $5M revenue can apply against payroll taxes
Example Savings Scenario

A software company spending $500,000 on R&D wages qualifies for a $50,000–$100,000 federal tax credit, dollar-for-dollar against taxes owed.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §831(b) Uncle Kam Clients Only

Captive Insurance Company

A business owner creates their own insurance company to insure business risks. Premiums paid to the captive are deductible by the business; the captive pays tax only on investment income under §831(b).

Eligibility Requirements
  • Business with $2M+ in annual revenue
  • Genuine insurable business risks
  • Captive receives $2.45M or less in premiums (§831(b) election)
  • Proper actuarial analysis and domicile compliance
Example Savings Scenario

A business paying $1.2M in captive premiums deducts the full amount, saving $444,000 at a 37% rate. The captive pays minimal tax on investment income.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §179D Uncle Kam Clients Only

179D Energy-Efficient Commercial Building Deduction

Deduct up to $5.00 per square foot for energy-efficient improvements to commercial buildings, including HVAC, lighting, and building envelope upgrades.

Eligibility Requirements
  • Own or design commercial buildings
  • Building meets energy efficiency standards (ASHRAE)
  • Architects, engineers, and designers can claim on government buildings
Example Savings Scenario

A 50,000 sq ft commercial building with qualifying improvements generates $250,000 in deductions, saving $92,500 at a 37% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §162, §3121(b)(3) Uncle Kam Clients Only

Hiring Family Members in Your Business

Hire your children or spouse in your business to shift income to lower tax brackets. Children under 18 working for a sole proprietorship or partnership owned by parents are exempt from FICA taxes.

Eligibility Requirements
  • Sole proprietorship or partnership owned by parents
  • Children performing legitimate work for the business
  • Wages must be reasonable for the work performed
Example Savings Scenario

Paying a 16-year-old child $15,750/year (2026 standard deduction): $0 federal income tax for the child, $15,750 deduction for the business, saving $5,828 at a 37% rate.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §45F Uncle Kam Clients Only

Employer-Provided Childcare Credit

Employers who provide or pay for childcare facilities for employees receive a tax credit of 25% of qualifying childcare expenditures and 10% of childcare resource and referral expenditures, up to $150,000/year.

Eligibility Requirements
  • Employer provides or pays for childcare facilities
  • Qualifying childcare expenditures for employees
  • Credit limited to $150,000 per year
Example Savings Scenario

An employer spending $500,000 on an on-site childcare facility receives a $125,000 tax credit (25%), plus the remaining $375,000 is deductible.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
Business IRC §162 Uncle Kam Clients Only

YouTuber AdSense Income Structure & S-Corp Strategy

YouTubers earning AdSense income are self-employed and can deduct all channel-related expenses: equipment, editing software (Adobe Premiere, Final Cut Pro), music licensing (Epidemic Sound), stock footage, thumbnails (Canva), and channel management tools. Structuring as an S-Corp above $50,000 in net income saves $5,000–$15,000 in self-employment taxes annually.

Eligibility Requirements
  • Must have monetized YouTube channel (AdSense, memberships, Super Chat)
  • Must report YouTube income as self-employment income on Schedule C
  • Must have an LLC or business entity for larger channels
  • Income includes AdSense, channel memberships, Super Chat, and merchandise
Example Savings Scenario

A YouTuber with $100,000 in AdSense income structured through an S-Corp saves $7,650 in SE tax by taking $50,000 as salary and $50,000 as distributions.

Unlock the Full Strategy Breakdown — Free

Enter your email for instant access to MERNA strategy notes, IRS red flag warnings, action steps, and implementation guide.

No spam · No obligation · Instant access
What Most Lawyers Don't Know

A Defined Benefit or Cash Balance Plan can shelter $100,000–$300,000/year from taxes — the single most powerful retirement strategy for high-income attorneys.

An S-Corp election on your law firm can save $15,000–$50,000/year in self-employment taxes — most solo practitioners never make the election.

Continuing legal education, bar dues, and professional development are 100% deductible business expenses — keep every receipt.

Who Uses This Strategy

This write-off is commonly used by the following taxpayer profiles. Click to see all strategies for your situation.

Common Questions for Lawyers

Get answers to the most frequently asked tax questions for your profession.

What tax deductions can a lawyer claim?
Lawyers can deduct bar dues, CLE courses, malpractice insurance, legal research subscriptions (Westlaw, LexisNexis), office rent, staff salaries, client entertainment (50%), and home office. Most attorneys miss $15,000\u2013$40,000 in deductions.
Should a lawyer form an S-Corp?
Yes \u2014 attorneys earning $100,000+ in self-employment income typically save $10,000\u2013$30,000/year with an S-Corp election. You pay yourself a reasonable salary and take remaining profits as distributions, avoiding SE tax on the distribution portion.
Can a lawyer deduct client development and entertainment expenses?
Business meals are 50% deductible. Client gifts are deductible up to $25/client/year. Entertainment expenses (sporting events, concerts) are generally NOT deductible since the 2018 tax law changes.
What is the QBI deduction for lawyers?
Law is a Specified Service Trade or Business (SSTB), meaning the QBI deduction phases out for lawyers earning $197,300 (single) or $394,600 (MFJ) in 2026. High-income lawyers may not qualify for this deduction.
Can a lawyer deduct a home office?
Yes, if the space is used exclusively and regularly for business. Attorneys working from home can deduct a proportional share of rent/mortgage interest, utilities, and internet based on the percentage of home used for work.
0
0 write-offs saved
Tap to view your list

Your Biggest Missed Deduction Is Probably Locked Above

Uncle Kam clients save an average of $25,000–$150,000/year. The strategies that make that possible are unlocked on a free strategy call.

Book A Free Strategy Call Free consultation. No obligation.
';// ── Open in a new window and print ─────────────────────────────── var win = window.open('', '_blank', 'width=850,height=700,scrollbars=yes,noopener=0'); if (!win) { // Fallback: inject an iframe for printing if popup is blocked var iframe = document.createElement('iframe'); iframe.style.cssText = 'position:fixed;top:-9999px;left:-9999px;width:850px;height:700px;border:0;'; document.body.appendChild(iframe); iframe.contentDocument.open(); iframe.contentDocument.write(html); iframe.contentDocument.close(); setTimeout(function() { iframe.contentWindow.focus(); iframe.contentWindow.print(); setTimeout(function() { document.body.removeChild(iframe); }, 2000); }, 600); return; } win.document.open(); win.document.write(html); win.document.close(); win.focus(); setTimeout(function() { win.print(); }, 600); }// ── Email Unlock: post to GHL silently, expand locked cards ────────────── function ukwfUnlockStrategies(e) { e.preventDefault(); // Support both the main wall form AND per-card gate forms var form = e ? e.target : null; var gateInput = form ? form.querySelector('.ukwf-gate-email-input') : null; var mainInput = document.getElementById('ukwf-unlock-email'); var emailInput = (gateInput && gateInput.value.trim()) ? gateInput : mainInput; var errorEl = document.getElementById('ukwf-unlock-error'); var email = emailInput ? emailInput.value.trim() : ''; // Also check the gate input if main is empty if (!email && gateInput) email = gateInput.value.trim(); // Basic email validation if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { if (errorEl) errorEl.style.display = 'block'; if (gateInput) { gateInput.style.borderColor = '#ff6b6b'; gateInput.focus(); } else if (emailInput) emailInput.focus(); return; } if (errorEl) errorEl.style.display = 'none'; if (gateInput) gateInput.style.borderColor = ''; // Disable all unlock buttons document.querySelectorAll('.ukwf-email-unlock-btn, .ukwf-gate-email-btn').forEach(function(b) { b.disabled = true; b.textContent = 'Unlocking...'; }); // Send lead to GHL via server-side PHP AJAX (bypasses webhook workflow) var professionEl = document.querySelector('.ukwf-profile-name'); var professionName = professionEl ? professionEl.textContent.trim().replace(/\s*Tax Write-Offs\s*&?\s*Deductions\s*$/i, '').trim() : ''; var nameParts = professionName.split('/'); var ghlFirstName = nameParts[0] ? nameParts[0].trim() : professionName; var ghlLastName = nameParts[1] ? nameParts[1].trim() : 'Tax Write-Off Finder'; var ajaxUrl = (typeof ukwfConfig !== 'undefined' && ukwfConfig.ajaxUrl) ? ukwfConfig.ajaxUrl : '/wp-admin/admin-ajax.php'; var nonce = (typeof ukwfConfig !== 'undefined' && ukwfConfig.leadNonce) ? ukwfConfig.leadNonce : ''; var formData = new FormData(); formData.append('action', 'ukwf_ghl_lead'); formData.append('nonce', nonce); formData.append('email', email); formData.append('firstName', ghlFirstName); formData.append('lastName', ghlLastName); formData.append('profession', professionName); formData.append('source', 'ukwf-unlock'); formData.append('page', window.location.pathname); fetch(ajaxUrl, { method: 'POST', body: formData }).catch(function() {}); // fire-and-forget // Expand all locked cards immediately ukwfDoUnlock(); } function ukwfDoUnlock() { // Hide the email wall var wall = document.getElementById('ukwf-email-unlock-wall'); if (wall) { wall.style.transition = 'opacity 0.3s ease'; wall.style.opacity = '0'; setTimeout(function() { wall.style.display = 'none'; }, 300); } // Unlock all locked cards instantly — no stagger (stagger caused 4+ second delay for 70+ cards) var lockedCards = document.querySelectorAll('.ukwf-result-card--locked'); lockedCards.forEach(function(card) { // Remove locked state — keep collapsed so user can open each card individually card.classList.remove('ukwf-result-card--locked'); card.classList.add('ukwf-result-card--open'); // Clear any inline styles that might block the toggle var body = card.querySelector('.ukwf-result-body'); if (body) { body.style.display = ''; body.style.maxHeight = ''; } // Remove lock badge var badge = card.querySelector('.ukwf-result-lock-badge'); if (badge) badge.style.display = 'none'; // Replace the locked gate with an unlocked badge var gate = card.querySelector('.ukwf-locked-strategy-gate'); if (gate) { gate.innerHTML = '
Unlocked — tap to expand
'; } }); // Show success banner var banner = document.getElementById('ukwf-unlock-banner'); if (banner) { banner.style.display = 'flex'; } // Persist unlock in localStorage so it survives refresh, tab close, and navigation // Uses the same ukwfSetUnlocked() that the book-call path uses, which sets // localStorage key 'ukwf_unlocked' = '1'. The main script block already checks // ukwfIsUnlocked() on page load and calls ukwfUnlockAll() automatically. if (typeof ukwfSetUnlocked === 'function') { ukwfSetUnlocked(); } else { try { localStorage.setItem('ukwf_unlocked', '1'); } catch(err) {} } // Also run the main unlock function to handle any card variants we might miss if (typeof ukwfUnlockAll === 'function') { ukwfUnlockAll(); } } // NOTE: Auto-unlock on page load is handled by the main script block which // checks ukwfIsUnlocked() and calls ukwfUnlockAll(). No DOMContentLoaded // listener needed here (it was broken anyway because LiteSpeed defers scripts // past DOMContentLoaded)./* ── Sticky Save Bar ───────────────────────────────────────────────── */ (function() { var SAVED_KEY = 'ukwf_saved_v2'; var bar = document.getElementById('ukwf-sticky-save-bar'); var countEl = document.getElementById('ukwf-sticky-save-count'); var badgeEl = document.getElementById('ukwf-sticky-cart-badge'); var savingsWrap = document.getElementById('ukwf-sticky-save-savings'); var savingsRange = document.getElementById('ukwf-sticky-savings-range'); if (!bar || !countEl) return;var _prevCount = 0;/* Parse a savings string like "$1,200–$4,500/year" -> {min, max} */ function parseSavings(str) { if (!str) return null; var nums = str.replace(/[^0-9]/g, ' ').trim().split(/\s+/).filter(Boolean); var vals = nums.map(function(n) { return parseInt(n, 10); }).filter(function(n) { return !isNaN(n) && n > 0; }); if (vals.length === 0) return null; if (vals.length === 1) return { min: vals[0], max: vals[0] }; return { min: Math.min.apply(null, vals), max: Math.max.apply(null, vals) }; }/* Format a number as $XK or $X.XM */ function fmtMoney(n) { if (n >= 1000000) return '$' + (n / 1000000).toFixed(1).replace(/\.0$/, '') + 'M'; if (n >= 1000) return '$' + Math.round(n / 1000) + 'K'; return '$' + n.toLocaleString(); }/* Animated count-up for a single element */ function animateCount(el, from, to, duration) { if (from === to) { el.textContent = to; return; } var start = null; function step(ts) { if (!start) start = ts; var progress = Math.min((ts - start) / duration, 1); var ease = 1 - Math.pow(1 - progress, 3); el.textContent = Math.round(from + (to - from) * ease); if (progress < 1) requestAnimationFrame(step); else el.textContent = to; } requestAnimationFrame(step); }function getSaved() { try { return JSON.parse(localStorage.getItem(SAVED_KEY) || '[]'); } catch(e) { return []; } }function updateBar() { var saved = getSaved(); var n = saved.length;/* Count-up animation when count changes */ if (n !== _prevCount) { animateCount(countEl, _prevCount, n, 600); if (badgeEl) animateCount(badgeEl, _prevCount, n, 600); /* Pop animation on bar when count increases */ if (n > _prevCount) { bar.classList.remove('ukwf-sticky-bar-pop'); void bar.offsetWidth; bar.classList.add('ukwf-sticky-bar-pop'); } _prevCount = n; }if (n > 0) { bar.classList.add('ukwf-sticky-save-bar--visible');/* Calculate total savings range */ var totalMin = 0, totalMax = 0, hasSavings = false; saved.forEach(function(item) { var p = parseSavings(item.savings || ''); if (p) { totalMin += p.min; totalMax += p.max; hasSavings = true; } });if (hasSavings && savingsWrap && savingsRange) { var rangeStr = totalMin === totalMax ? fmtMoney(totalMin) : fmtMoney(totalMin) + '–' + fmtMoney(totalMax); savingsRange.textContent = rangeStr; savingsWrap.style.display = ''; } else if (savingsWrap) { savingsWrap.style.display = 'none'; } } else { bar.classList.remove('ukwf-sticky-save-bar--visible'); if (savingsWrap) savingsWrap.style.display = 'none'; } }/* Update whenever a save/unsave happens */ window.addEventListener('ukwfSavedChanged', updateBar); /* Cross-tab sync */ window.addEventListener('storage', function(e) { if (e.key === SAVED_KEY) updateBar(); }); /* Expose globally */ window.ukwfStickyBarRefresh = updateBar; updateBar(); })();/* ── CART DRAWER ────────────────────────────────────────────────────── */ (function() { var SAVED_KEY = 'ukwf_saved_v2'; var drawer = document.getElementById('ukwf-cart-drawer'); var overlay = document.getElementById('ukwf-cart-overlay'); var itemsList = document.getElementById('ukwf-cart-items'); var emptyEl = document.getElementById('ukwf-cart-empty'); var footerEl = document.getElementById('ukwf-cart-footer'); var savingsStrip = document.getElementById('ukwf-cart-savings-strip'); var savingsAmount = document.getElementById('ukwf-cart-savings-amount'); var headerSub = document.getElementById('ukwf-cart-header-sub'); var footerCount = document.getElementById('ukwf-cart-footer-count'); if (!drawer) return;function getSaved() { try { return JSON.parse(localStorage.getItem(SAVED_KEY) || '[]'); } catch(e) { return []; } } function setSaved(arr) { localStorage.setItem(SAVED_KEY, JSON.stringify(arr)); window.dispatchEvent(new CustomEvent('ukwfSavedChanged')); if (typeof window.ukwfStickyBarRefresh === 'function') window.ukwfStickyBarRefresh(); if (typeof window.ukwfSavedBadgeRefresh === 'function') window.ukwfSavedBadgeRefresh(); } function parseSavings(str) { if (!str) return null; var nums = str.replace(/[^0-9]/g, ' ').trim().split(/\s+/).filter(Boolean); var vals = nums.map(function(n){ return parseInt(n,10); }).filter(function(n){ return !isNaN(n) && n > 0; }); if (!vals.length) return null; if (vals.length === 1) return { min: vals[0], max: vals[0] }; return { min: Math.min.apply(null,vals), max: Math.max.apply(null,vals) }; } function fmtMoney(n) { if (n >= 1000000) return '$' + (n/1000000).toFixed(1).replace(/\.0$/,'') + 'M'; if (n >= 1000) return '$' + Math.round(n/1000) + 'K'; return '$' + n.toLocaleString(); } function getCatIcon(cat) { var icons = { 'vehicle':'', 'home':'', 'travel':'', 'equipment':'', 'health':'', 'retirement':'', 'education':'', 'real estate':'' }; var k = (cat || '').toLowerCase(); for (var key in icons) { if (k.indexOf(key) !== -1) return icons[key]; } return ''; } function renderItems() { var saved = getSaved(); var n = saved.length; /* Update header sub */ if (headerSub) headerSub.textContent = n + ' deduction' + (n !== 1 ? 's' : '') + ' saved'; /* Show/hide empty state */ if (emptyEl) emptyEl.style.display = n === 0 ? '' : 'none'; if (footerEl) footerEl.style.display = n === 0 ? 'none' : ''; /* Savings strip */ var totalMin = 0, totalMax = 0, hasSavings = false; saved.forEach(function(item) { var p = parseSavings(item.savings || ''); if (p) { totalMin += p.min; totalMax += p.max; hasSavings = true; } }); if (hasSavings && savingsStrip) { savingsStrip.style.display = ''; var rangeStr = totalMin === totalMax ? fmtMoney(totalMin) : fmtMoney(totalMin) + ' – ' + fmtMoney(totalMax); if (savingsAmount) savingsAmount.textContent = rangeStr; } else if (savingsStrip) { savingsStrip.style.display = 'none'; } /* Footer count */ if (footerCount) footerCount.textContent = n > 0 ? n + ' write-off' + (n !== 1 ? 's' : '') + ' in your list' : ''; /* Remove existing items (keep empty state) */ var existing = itemsList ? itemsList.querySelectorAll('.ukwf-cart-item') : []; existing.forEach(function(el) { el.parentNode.removeChild(el); }); /* Render each item */ saved.forEach(function(item, idx) { var div = document.createElement('div'); div.className = 'ukwf-cart-item'; div.style.animationDelay = (idx * 0.04) + 's'; div.innerHTML = '
' + getCatIcon(item.category) + '
' + '
' + '
' + escHtml(item.name || item.slug) + '
' + (item.category ? '
' + escHtml(item.category) + '
' : '') + (item.savings ? '
' + escHtml(item.savings) + '/yr
' : '') + '
' + ''; /* Remove button handler */ div.querySelector('.ukwf-cart-item-remove').addEventListener('click', function() { var slug = this.getAttribute('data-slug'); var arr = getSaved().filter(function(i){ return i.slug !== slug; }); setSaved(arr); /* Animate out */ div.style.transition = 'opacity 0.18s, transform 0.18s'; div.style.opacity = '0'; div.style.transform = 'translateX(20px)'; setTimeout(function() { renderItems(); }, 180); /* Also update save buttons on page */ document.querySelectorAll('.ukwf-card-save-btn[data-slug="' + slug + '"]').forEach(function(btn) { btn.classList.remove('ukwf-card-save-btn--saved'); btn.setAttribute('aria-pressed','false'); var lbl = btn.querySelector('.ukwf-card-save-label'); if (lbl) lbl.textContent = 'Save'; }); }); if (itemsList) itemsList.appendChild(div); }); } function escHtml(s) { return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); } function escAttr(s) { return String(s).replace(/"/g,'"').replace(/'/g,'''); } /* Open / close */ window.ukwfCartDrawerOpen = function() { renderItems(); if (drawer) drawer.classList.add('ukwf-cart-drawer--open'); if (overlay) overlay.classList.add('ukwf-cart-overlay--open'); document.body.style.overflow = 'hidden'; }; window.ukwfCartDrawerClose = function() { if (drawer) drawer.classList.remove('ukwf-cart-drawer--open'); if (overlay) overlay.classList.remove('ukwf-cart-overlay--open'); document.body.style.overflow = ''; }; window.ukwfCartClearAll = function() { if (!confirm('Remove all saved write-offs?')) return; setSaved([]); renderItems(); }; /* Keyboard close */ document.addEventListener('keydown', function(e) { if (e.key === 'Escape' && drawer && drawer.classList.contains('ukwf-cart-drawer--open')) { window.ukwfCartDrawerClose(); } }); /* Re-render when saves change */ window.addEventListener('ukwfSavedChanged', function() { if (drawer && drawer.classList.contains('ukwf-cart-drawer--open')) { renderItems(); } }); window.addEventListener('storage', function(e) { if (e.key === SAVED_KEY && drawer && drawer.classList.contains('ukwf-cart-drawer--open')) { renderItems(); } }); })();/* ── CARD SAVE BUTTONS ──────────────────────────────────────────────── */ (function() { var SAVED_KEY = 'ukwf_saved_v2';function getSaved() { try { return JSON.parse(localStorage.getItem(SAVED_KEY) || '[]'); } catch(e) { return []; } } function setSaved(arr) { localStorage.setItem(SAVED_KEY, JSON.stringify(arr)); } function isSaved(slug) { return getSaved().some(function(i) { return i.slug === slug; }); } function updateBtn(btn) { var slug = btn.getAttribute('data-slug'); var saved = isSaved(slug); btn.classList.toggle('ukwf-card-save-btn--saved', saved); btn.setAttribute('aria-pressed', saved ? 'true' : 'false'); var label = btn.querySelector('.ukwf-card-save-label'); if (label) label.textContent = saved ? 'Saved' : 'Save'; } function initAllBtns() { document.querySelectorAll('.ukwf-card-save-btn').forEach(function(btn) { updateBtn(btn); btn.addEventListener('click', function(e) { e.stopPropagation(); var slug = btn.getAttribute('data-slug'); var name = btn.getAttribute('data-name'); var cat = btn.getAttribute('data-category') || ''; var savings = btn.getAttribute('data-savings') || ''; var saved = getSaved(); var idx = saved.findIndex(function(i) { return i.slug === slug; }); if (idx === -1) { saved.push({ slug: slug, name: name, category: cat, savings: savings, savedAt: Date.now() }); } else { saved.splice(idx, 1); } setSaved(saved); updateBtn(btn); /* Sync badge and sticky bar */ window.dispatchEvent(new CustomEvent('ukwfSavedChanged')); if (typeof window.ukwfSavedBadgeRefresh === 'function') window.ukwfSavedBadgeRefresh(); if (typeof window.ukwfStickyBarRefresh === 'function') window.ukwfStickyBarRefresh(); }); }); } /* Init on load and re-sync on saved changes from autocomplete */ if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', initAllBtns); } else { initAllBtns(); } window.addEventListener('ukwfSavedChanged', function() { document.querySelectorAll('.ukwf-card-save-btn').forEach(updateBtn); }); })();