attachment
attachment

This is my exam can u teach most convinent mportant only with normal life example and images to make me unstd the concept of topic paper -1

analyse_media
Your first exam is Basic Accounting for Managers on 16-08-2026. Let me teach you that subject with simple real-life examples!

πŸ“š BASIC ACCOUNTING FOR MANAGERS (MMBA22003)

Taught with Everyday Life Examples


🏠 What is Accounting? (The Big Picture)

Think of it like managing your personal wallet/budget at home.
Every time you get paid, spend money, or save - that's accounting in real life. In business, we just write it all down in a formal system.

πŸ“Œ TOPIC 1 - Basic Accounting Equation

The GOLDEN RULE of Accounting:

Assets = Liabilities + Capital (Owner's Equity)

Real Life Example:
You want to buy a bike worth β‚Ή80,000.
  • You pay β‚Ή30,000 from your own pocket (= Capital)
  • You borrow β‚Ή50,000 from a bank (= Liability)
  • The bike belongs to you (= Asset worth β‚Ή80,000)
βœ… β‚Ή80,000 (Asset) = β‚Ή50,000 (Liability) + β‚Ή30,000 (Capital) β€” Always balances!

πŸ“Œ TOPIC 2 - Types of Accounts (The 3 Big Buckets)

TypeWhat it meansReal Example
Personal AccountPersons/companies we deal withYour friend Ravi who owes you money
Real AccountPhysical things (property, cash, goods)Your shop, stock, cash in hand
Nominal AccountIncomes and expensesSalary paid, rent received

Golden Rules of Debit & Credit:

Account TypeDebitCredit
PersonalReceiverGiver
RealWhat comes INWhat goes OUT
NominalExpenses/LossesIncomes/Gains
Simple Memory Trick:
  • Personal β†’ "Who received? Debit them. Who gave? Credit them."
  • Real β†’ "Cash came in? Debit Cash."
  • Nominal β†’ "Paid rent? Debit rent (expense)."

πŸ“Œ TOPIC 3 - Journal Entry (Writing Transactions)

Real Life: You go to a grocery shop and buy rice for β‚Ή500 cash.
Journal Entry:
Purchases A/c    Dr.   500
    To Cash A/c            500
(Being goods purchased for cash)
Rice came INTO the business (Real a/c β†’ Debit what comes in) Cash went OUT (Real a/c β†’ Credit what goes out)

πŸ“Œ TOPIC 4 - Ledger (Like a Diary for Each Person/Thing)

After journaling, every account gets its own page in the ledger.
Real Life: Imagine a shopkeeper maintaining a separate notebook for each customer:
  • One notebook for "Ravi" - how much he owes
  • One notebook for "Cash" - how much cash is in the drawer
  • One notebook for "Rent" - how much rent was paid
That collection of notebooks = Ledger

πŸ“Œ TOPIC 5 - Trial Balance (Cross-checking your work)

After all entries, you add up all Debit totals and all Credit totals.
If Debit Total = Credit Total β†’ βœ… Your books are correct! If they don't match β†’ ❌ You made a mistake somewhere.
Real Life: It's like checking if your wallet math adds up - money in = money out + what's left.

πŸ“Œ TOPIC 6 - Final Accounts (3 Big Statements)

1. Trading Account - "Did we make profit from selling goods?"

Sales - Cost of Goods Sold = Gross Profit
Example: You sell 100 pens at β‚Ή10 each = β‚Ή1,000 Sales You bought those pens for β‚Ή600 Gross Profit = β‚Ή400

2. Profit & Loss Account - "After paying all expenses, what's left?"

Gross Profit - All Expenses = Net Profit
From β‚Ή400 gross profit, you paid β‚Ή100 rent + β‚Ή50 electricity Net Profit = β‚Ή250

3. Balance Sheet - "What do we own vs what do we owe?"

Liabilitiesβ‚ΉAssetsβ‚Ή
Capital30,000Building25,000
Bank Loan50,000Stock30,000
Creditors10,000Cash35,000
Total90,000Total90,000
Both sides MUST be equal - like a weighing scale βš–οΈ

πŸ“Œ TOPIC 7 - Depreciation (Why things lose value)

Real Life: You buy a phone for β‚Ή20,000 today. After 2 years, it's worth only β‚Ή8,000. That loss in value = Depreciation.
Two main methods:
  1. Straight Line Method (SLM) - Fixed amount every year
    Phone β‚Ή20,000, life 4 years β†’ Depreciation = β‚Ή5,000/year
  2. Written Down Value (WDV) - % on reducing balance
    20% depreciation on β‚Ή20,000 = β‚Ή4,000 in Year 1 Then 20% on β‚Ή16,000 = β‚Ή3,200 in Year 2

πŸ“Œ TOPIC 8 - Bank Reconciliation Statement (BRS)

Real Life: Your passbook shows β‚Ή10,000, but your personal diary says β‚Ή10,500. Why the difference?
  • Maybe a cheque you issued hasn't been cashed yet
  • Maybe bank charged fees you forgot to note
BRS = A statement to explain the difference between your records and the bank's records.

πŸ“Œ TOPIC 9 - Ratio Analysis (For Managers - Super Important!)

Real Life: Your doctor checks your BP, sugar, weight - these are health ratios. Similarly, managers check financial ratios to see if the business is "healthy."
RatioFormulaWhat it tells you
Current RatioCurrent Assets / Current LiabilitiesCan we pay short-term debts? (ideal = 2:1)
Gross Profit RatioGross Profit / Sales Γ— 100Profit % on sales
Net Profit RatioNet Profit / Sales Γ— 100Final profit %
Debt-Equity RatioLong-term Debt / EquityHow much borrowed vs owned?

πŸ“Œ TOPIC 10 - Cost Concepts (Important for Managers)

Cost TypeExample
Fixed CostFactory rent - same every month whether you produce or not
Variable CostRaw material - increases as production increases
Semi-variable CostElectricity - fixed base charge + usage charge
Opportunity CostYou invest β‚Ή1 lakh in business instead of FD - the FD interest lost = opportunity cost
Sunk CostMoney already spent and can't be recovered - don't let it affect future decisions

🎯 QUICK REVISION - Remember These!

ConceptOne-line Memory
Accounting EquationAssets = Liabilities + Capital (always!)
DebitWhat comes IN / Receiver / Expenses
CreditWhat goes OUT / Giver / Income
Trial BalanceDebit total = Credit total β†’ correct
Balance SheetAssets = Liabilities side (both equal!)
DepreciationValue reduces over time
BRSExplains gap between your records & bank records
Current Ratio2:1 is ideal (healthy business sign)

πŸ“… YOUR EXAM SCHEDULE (All 8 Papers)

#DateSubject
116 Aug 2026Basic Accounting for Managers
222 Aug 2026Business Communication
323 Aug 2026Managerial Economics
429 Aug 2026Business Legislations
505 Sep 2026Business Statistics for Managers
619 Sep 2026Computer Application for Business
720 Sep 2026E-Commerce
827 Sep 2026Principles of Management & Behavioral Science

Would you like me to teach the next subject (Business Communication) the same way, or go deeper into any specific Accounting topic above? Just say which paper number you want! πŸŽ“

Make a comprehensive study guide PDF with diagrams

Reading File
Running Command

mkdir -p /tmp/workspace/accounting-study-guide && ls /tmp/workspace/

Now let me create the comprehensive PDF with diagrams using ReportLab:
Writing File

~/accounting-study-guide/create_guide.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.graphics.shapes import (
    Drawing, Rect, String, Line, Circle, Polygon,
    Arrow, Group
)
from reportlab.graphics import renderPDF
from reportlab.graphics.charts.piecharts import Pie
from reportlab.graphics.charts.barcharts import VerticalBarChart
import math

# ── Color palette ──────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1A237E")
MID_BLUE    = colors.HexColor("#1565C0")
LIGHT_BLUE  = colors.HexColor("#E3F2FD")
ACCENT      = colors.HexColor("#FF6F00")
GREEN       = colors.HexColor("#2E7D32")
LIGHT_GREEN = colors.HexColor("#E8F5E9")
RED         = colors.HexColor("#C62828")
LIGHT_RED   = colors.HexColor("#FFEBEE")
YELLOW      = colors.HexColor("#F9A825")
LIGHT_YELLOW= colors.HexColor("#FFFDE7")
PURPLE      = colors.HexColor("#6A1B9A")
LIGHT_PURPLE= colors.HexColor("#F3E5F5")
TEAL        = colors.HexColor("#00695C")
LIGHT_TEAL  = colors.HexColor("#E0F2F1")
GRAY        = colors.HexColor("#546E7A")
LIGHT_GRAY  = colors.HexColor("#ECEFF1")
WHITE       = colors.white
BLACK       = colors.black

PAGE_W, PAGE_H = A4

# ── Styles ──────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

COVER_TITLE  = S("CoverTitle",  fontSize=32, textColor=WHITE,   fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=8)
COVER_SUB    = S("CoverSub",    fontSize=16, textColor=LIGHT_BLUE, fontName="Helvetica",   alignment=TA_CENTER, spaceAfter=6)
COVER_TINY   = S("CoverTiny",   fontSize=11, textColor=LIGHT_BLUE, fontName="Helvetica",   alignment=TA_CENTER)

CH_TITLE     = S("ChTitle",     fontSize=22, textColor=WHITE,     fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=4)
SECTION_HDR  = S("SectionHdr",  fontSize=14, textColor=DARK_BLUE, fontName="Helvetica-Bold", spaceBefore=14, spaceAfter=6)
SUBSECTION   = S("SubSection",  fontSize=12, textColor=MID_BLUE,  fontName="Helvetica-Bold", spaceBefore=8, spaceAfter=4)
BODY         = S("Body",        fontSize=10, textColor=colors.HexColor("#212121"), fontName="Helvetica",
                 leading=15, spaceBefore=3, spaceAfter=3, alignment=TA_JUSTIFY)
BULLET       = S("Bullet",      fontSize=10, textColor=colors.HexColor("#212121"), fontName="Helvetica",
                 leading=14, leftIndent=16, bulletIndent=4, spaceBefore=2, spaceAfter=2)
EXAMPLE_STYLE= S("Example",     fontSize=10, textColor=colors.HexColor("#1B5E20"), fontName="Helvetica",
                 leading=14, leftIndent=12, spaceBefore=4, spaceAfter=4)
TIP_STYLE    = S("Tip",         fontSize=10, textColor=colors.HexColor("#4A148C"), fontName="Helvetica-Bold",
                 leading=14, leftIndent=12, spaceBefore=4, spaceAfter=4)
TABLE_HDR    = S("TableHdr",    fontSize=9,  textColor=WHITE,     fontName="Helvetica-Bold", alignment=TA_CENTER)
TABLE_CELL   = S("TableCell",   fontSize=9,  textColor=BLACK,     fontName="Helvetica",      alignment=TA_CENTER)
TABLE_LEFT   = S("TableLeft",   fontSize=9,  textColor=BLACK,     fontName="Helvetica",      alignment=TA_LEFT)
FORMULA      = S("Formula",     fontSize=11, textColor=RED,        fontName="Helvetica-Bold", alignment=TA_CENTER, spaceBefore=6, spaceAfter=6)
SMALL_BODY   = S("SmallBody",   fontSize=9,  textColor=GRAY,      fontName="Helvetica", leading=13, spaceBefore=2, spaceAfter=2)

# ── Helper Flowables ────────────────────────────────────────────
class ColorBox(Flowable):
    """A colored background box containing a paragraph."""
    def __init__(self, text, bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE,
                 font="Helvetica-Bold", font_size=10, padding=8, radius=4, width=None):
        Flowable.__init__(self)
        self.text      = text
        self.bg        = bg
        self.border    = border
        self.text_color= text_color
        self.font      = font
        self.font_size = font_size
        self.padding   = padding
        self.radius    = radius
        self._width    = width

    def wrap(self, availW, availH):
        self.width = self._width or availW
        # estimate height: roughly 14 pts per line
        chars_per_line = max(1, int((self.width - 2*self.padding) / (self.font_size * 0.55)))
        lines = max(1, math.ceil(len(self.text) / chars_per_line))
        self.height = lines * (self.font_size + 4) + 2 * self.padding
        return self.width, self.height

    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.bg)
        c.setStrokeColor(self.border)
        c.setLineWidth(1)
        c.roundRect(0, 0, self.width, self.height, self.radius, fill=1, stroke=1)
        c.setFillColor(self.text_color)
        c.setFont(self.font, self.font_size)
        # simple word-wrap inside box
        max_w = self.width - 2 * self.padding
        words = self.text.split()
        lines, cur = [], ""
        for w in words:
            test = (cur + " " + w).strip()
            if c.stringWidth(test, self.font, self.font_size) <= max_w:
                cur = test
            else:
                if cur: lines.append(cur)
                cur = w
        if cur: lines.append(cur)
        line_h = self.font_size + 4
        y = self.height - self.padding - self.font_size
        for line in lines:
            c.drawCentredString(self.width / 2, y, line)
            y -= line_h
        c.restoreState()


class ChapterBanner(Flowable):
    """Full-width chapter header banner."""
    def __init__(self, number, title, color=DARK_BLUE):
        Flowable.__init__(self)
        self.number = number
        self.title  = title
        self.color  = color

    def wrap(self, availW, availH):
        self.width = availW
        self.height = 52
        return self.width, self.height

    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.color)
        c.roundRect(0, 0, self.width, self.height, 6, fill=1, stroke=0)
        # chapter number badge
        c.setFillColor(ACCENT)
        c.circle(30, self.height/2, 18, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 14)
        c.drawCentredString(30, self.height/2 - 5, str(self.number))
        # title
        c.setFont("Helvetica-Bold", 18)
        c.drawString(58, self.height/2 - 7, self.title)
        c.restoreState()


class SectionLabel(Flowable):
    """Left-bar section label."""
    def __init__(self, text, color=MID_BLUE):
        Flowable.__init__(self)
        self.text  = text
        self.color = color

    def wrap(self, availW, availH):
        self.width = availW
        self.height = 28
        return self.width, self.height

    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.color)
        c.rect(0, 4, 4, self.height - 8, fill=1, stroke=0)
        c.setFillColor(self.color)
        c.setFont("Helvetica-Bold", 13)
        c.drawString(12, 8, self.text)
        c.restoreState()


# ═══════════════════════════════════════════════════════════════
#  DIAGRAM BUILDERS
# ═══════════════════════════════════════════════════════════════

def accounting_equation_diagram():
    """Balance scale showing Assets = Liabilities + Capital"""
    d = Drawing(460, 200)

    # Title
    d.add(String(230, 188, "THE ACCOUNTING EQUATION", fontSize=13,
                 fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    # Three boxes
    box_data = [
        (20,  80, 120, 70, GREEN,  LIGHT_GREEN, "ASSETS",      "β‚Ή80,000",  "What you OWN\n(Bike, Cash, Stock)"),
        (170, 80, 120, 70, RED,    LIGHT_RED,   "LIABILITIES", "β‚Ή50,000",  "What you OWE\n(Bank Loan)"),
        (320, 80, 120, 70, PURPLE, LIGHT_PURPLE,"CAPITAL",     "β‚Ή30,000",  "Owner's Money\n(Your Savings)"),
    ]
    for x, y, w, h, bc, bg, lbl, amt, desc in box_data:
        d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
        d.add(String(x+w/2, y+h-14, lbl,  fontSize=11, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=bc))
        d.add(String(x+w/2, y+h-30, amt,  fontSize=13, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=colors.HexColor("#212121")))
        for i, line in enumerate(desc.split("\n")):
            d.add(String(x+w/2, y+h-46-(i*13), line, fontSize=8, fontName="Helvetica",
                         textAnchor="middle", fillColor=GRAY))

    # Equals and Plus signs
    d.add(String(148, 112, "=", fontSize=24, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=ACCENT))
    d.add(String(298, 112, "+", fontSize=24, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=ACCENT))

    # Bottom arrow / balance line
    d.add(Line(20, 72, 440, 72, strokeColor=DARK_BLUE, strokeWidth=1.5))
    d.add(String(230, 58, "Both sides ALWAYS balance β€” like a weighing scale!",
                 fontSize=9, fontName="Helvetica", textAnchor="middle", fillColor=GRAY))

    return d


def three_accounts_diagram():
    """Three boxes for Personal / Real / Nominal with rules."""
    d = Drawing(460, 220)
    d.add(String(230, 210, "THREE TYPES OF ACCOUNTS & GOLDEN RULES",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    boxes = [
        (10,  60, 140, 130, MID_BLUE,  LIGHT_BLUE,   "PERSONAL A/C",
         ["Persons, Firms,", "Banks, Companies"],
         "Dr: RECEIVER", "Cr: GIVER",
         "Example: Ravi owes you money"),
        (160, 60, 140, 130, GREEN,     LIGHT_GREEN,  "REAL A/C",
         ["Physical Assets:", "Cash, Stock, Building"],
         "Dr: COMES IN", "Cr: GOES OUT",
         "Example: Cash received"),
        (310, 60, 140, 130, PURPLE,    LIGHT_PURPLE, "NOMINAL A/C",
         ["Expenses, Income,", "Losses, Gains"],
         "Dr: EXPENSES/LOSS", "Cr: INCOME/GAIN",
         "Example: Rent paid"),
    ]

    for x, y, w, h, bc, bg, title, desc_lines, dr_rule, cr_rule, eg in boxes:
        d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
        # header strip
        d.add(Rect(x, y+h-22, w, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
        d.add(String(x+w/2, y+h-15, title, fontSize=10, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        # description
        for i, line in enumerate(desc_lines):
            d.add(String(x+w/2, y+h-38-(i*13), line, fontSize=8, fontName="Helvetica",
                         textAnchor="middle", fillColor=colors.HexColor("#212121")))
        # rules
        d.add(Rect(x+6, y+44, w-12, 16, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
        d.add(String(x+w/2, y+47, dr_rule, fontSize=8, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        d.add(Rect(x+6, y+24, w-12, 16, rx=3, ry=3, fillColor=colors.HexColor("#78909C"),
                   strokeColor=colors.HexColor("#78909C"), strokeWidth=0))
        d.add(String(x+w/2, y+27, cr_rule, fontSize=8, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        d.add(String(x+w/2, y+10, eg, fontSize=7.5, fontName="Helvetica-Oblique",
                     textAnchor="middle", fillColor=GRAY))

    return d


def accounting_cycle_diagram():
    """Circular flow: Source Docs β†’ Journal β†’ Ledger β†’ Trial Balance β†’ Final Accounts."""
    d = Drawing(460, 220)
    d.add(String(230, 210, "THE ACCOUNTING CYCLE",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    steps = [
        (230, 140, "1. Source\nDocuments",   MID_BLUE),
        (340, 100, "2. Journal\nEntry",       GREEN),
        (370,  40, "3. Ledger\nPosting",      PURPLE),
        (270,  15, "4. Trial\nBalance",       TEAL),
        (155,  15, "5. Final\nAccounts",      RED),
        (100,  70, "6. Analysis\n& Reports",  ACCENT),
    ]

    # Draw connecting arrows first (behind boxes)
    coords = [(s[0], s[1]) for s in steps]
    for i in range(len(coords)):
        x1, y1 = coords[i][0]+30, coords[i][1]+15
        x2, y2 = coords[(i+1)%len(coords)][0]-10, coords[(i+1)%len(coords)][1]+15
        d.add(Line(x1, y1, x2, y2, strokeColor=LIGHT_GRAY, strokeWidth=2))

    for cx, cy, label, col in steps:
        d.add(Rect(cx-38, cy, 76, 38, rx=5, ry=5, fillColor=col, strokeColor=col, strokeWidth=0))
        for i, line in enumerate(label.split("\n")):
            d.add(String(cx, cy+28-(i*14), line, fontSize=8.5, fontName="Helvetica-Bold",
                         textAnchor="middle", fillColor=WHITE))

    d.add(String(230, 2, "Cycle repeats every accounting period (month / year)",
                 fontSize=8, fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
    return d


def final_accounts_diagram():
    """Flow diagram: Trading A/c β†’ P&L A/c β†’ Balance Sheet."""
    d = Drawing(460, 200)
    d.add(String(230, 192, "FLOW OF FINAL ACCOUNTS",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    # Box 1 - Trading Account
    d.add(Rect(10, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_GREEN, strokeColor=GREEN, strokeWidth=2))
    d.add(Rect(10, 158, 130, 22, rx=4, ry=4, fillColor=GREEN, strokeColor=GREEN, strokeWidth=0))
    d.add(String(75, 164, "TRADING ACCOUNT", fontSize=8.5, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=WHITE))
    items1 = ["Sales", "(-) Cost of Goods Sold", "= GROSS PROFIT"]
    for i, item in enumerate(items1):
        bold = "Bold" if i == 2 else ""
        d.add(String(75, 148 - i*18, item, fontSize=8.5, fontName=f"Helvetica-{bold}" if bold else "Helvetica",
                     textAnchor="middle",
                     fillColor=GREEN if i==2 else colors.HexColor("#212121")))

    # Arrow 1
    d.add(Line(140, 135, 165, 135, strokeColor=ACCENT, strokeWidth=2))
    d.add(String(152, 142, "Gross\nProfit", fontSize=7.5, fontName="Helvetica",
                 textAnchor="middle", fillColor=ACCENT))

    # Box 2 - P&L
    d.add(Rect(165, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_YELLOW, strokeColor=YELLOW, strokeWidth=2))
    d.add(Rect(165, 158, 130, 22, rx=4, ry=4, fillColor=YELLOW, strokeColor=YELLOW, strokeWidth=0))
    d.add(String(230, 164, "PROFIT & LOSS A/C", fontSize=8.5, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=colors.HexColor("#212121")))
    items2 = ["Gross Profit", "(-) Expenses", "= NET PROFIT"]
    for i, item in enumerate(items2):
        bold = "Bold" if i == 2 else ""
        d.add(String(230, 148 - i*18, item, fontSize=8.5, fontName=f"Helvetica-{bold}" if bold else "Helvetica",
                     textAnchor="middle",
                     fillColor=RED if i==2 else colors.HexColor("#212121")))

    # Arrow 2
    d.add(Line(295, 135, 320, 135, strokeColor=ACCENT, strokeWidth=2))
    d.add(String(307, 142, "Net\nProfit", fontSize=7.5, fontName="Helvetica",
                 textAnchor="middle", fillColor=ACCENT))

    # Box 3 - Balance Sheet
    d.add(Rect(320, 90, 130, 90, rx=6, ry=6, fillColor=LIGHT_BLUE, strokeColor=MID_BLUE, strokeWidth=2))
    d.add(Rect(320, 158, 130, 22, rx=4, ry=4, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
    d.add(String(385, 164, "BALANCE SHEET", fontSize=8.5, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=WHITE))
    items3 = ["LIABILITIES  |  ASSETS", "Capital       |  Fixed Assets",
              "Loans         |  Current Assets"]
    for i, item in enumerate(items3):
        d.add(String(385, 148 - i*18, item, fontSize=7.5, fontName="Helvetica",
                     textAnchor="middle", fillColor=colors.HexColor("#212121")))

    # Bottom note
    d.add(String(230, 78, "Assets = Liabilities + Capital  (Balance Sheet always balances!)",
                 fontSize=8.5, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))

    return d


def depreciation_diagram():
    """Bar chart showing SLM vs WDV over 5 years."""
    d = Drawing(460, 200)
    d.add(String(230, 192, "DEPRECIATION: SLM vs WDV (β‚Ή20,000 asset, 20% p.a.)",
                 fontSize=11, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    years = ["Yr 1", "Yr 2", "Yr 3", "Yr 4", "Yr 5"]
    slm   = [4000, 4000, 4000, 4000, 4000]
    wdv   = [4000, 3200, 2560, 2048, 1638]

    bar_w = 28
    gap   = 10
    group_w = 2*bar_w + gap
    x_start = 60
    max_val = 5000
    chart_h = 130
    y_base  = 30

    # Y-axis
    d.add(Line(x_start-5, y_base, x_start-5, y_base+chart_h, strokeColor=GRAY, strokeWidth=1))
    for v in [0, 1000, 2000, 3000, 4000, 5000]:
        y = y_base + (v/max_val)*chart_h
        d.add(Line(x_start-8, y, x_start-5, y, strokeColor=GRAY, strokeWidth=1))
        d.add(String(x_start-10, y-4, f"β‚Ή{v//1000}K", fontSize=7, fontName="Helvetica",
                     textAnchor="end", fillColor=GRAY))

    for i, yr in enumerate(years):
        x_group = x_start + i*(group_w + 18)
        # SLM bar
        h_slm = (slm[i]/max_val)*chart_h
        d.add(Rect(x_group, y_base, bar_w, h_slm, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
        d.add(String(x_group+bar_w/2, y_base+h_slm+3, f"β‚Ή{slm[i]//1000}K",
                     fontSize=7, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))
        # WDV bar
        h_wdv = (wdv[i]/max_val)*chart_h
        d.add(Rect(x_group+bar_w+4, y_base, bar_w, h_wdv, fillColor=ACCENT, strokeColor=ACCENT, strokeWidth=0))
        d.add(String(x_group+bar_w+4+bar_w/2, y_base+h_wdv+3, f"β‚Ή{wdv[i]//1000:.1f}K",
                     fontSize=7, fontName="Helvetica-Bold", textAnchor="middle", fillColor=ACCENT))
        # Year label
        d.add(String(x_group+bar_w+2, y_base-12, yr, fontSize=8.5, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=GRAY))

    # Legend
    d.add(Rect(320, 168, 14, 12, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
    d.add(String(338, 172, "SLM (Fixed β‚Ή4,000/yr)", fontSize=8, fontName="Helvetica",
                 textAnchor="start", fillColor=MID_BLUE))
    d.add(Rect(320, 152, 14, 12, fillColor=ACCENT, strokeColor=ACCENT, strokeWidth=0))
    d.add(String(338, 156, "WDV (Reducing balance)", fontSize=8, fontName="Helvetica",
                 textAnchor="start", fillColor=ACCENT))

    return d


def ratio_analysis_diagram():
    """Visual dashboard of key ratios."""
    d = Drawing(460, 200)
    d.add(String(230, 192, "RATIO ANALYSIS DASHBOARD",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    ratios = [
        (30,  80, "CURRENT\nRATIO",   "2:1",     "Ideal",    MID_BLUE,   LIGHT_BLUE,
         "Can we pay\nshort-term debts?"),
        (140, 80, "GROSS PROFIT\nRATIO", "25%",   "Higher=Better", GREEN, LIGHT_GREEN,
         "Profit from\nselling goods"),
        (265, 80, "NET PROFIT\nRATIO",  "10%",    "Higher=Better", PURPLE, LIGHT_PURPLE,
         "Final profit\nafter expenses"),
        (375, 80, "DEBT-EQUITY\nRATIO", "1:1",    "Ideal",    TEAL,       LIGHT_TEAL,
         "Borrowed vs\nOwned money"),
    ]

    for x, y, title, value, note, bc, bg, desc in ratios:
        d.add(Rect(x, y, 90, 100, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
        # title strip
        d.add(Rect(x, y+78, 90, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
        for j, line in enumerate(title.split("\n")):
            d.add(String(x+45, y+93-(j*13), line, fontSize=8, fontName="Helvetica-Bold",
                         textAnchor="middle", fillColor=WHITE))
        # big value
        d.add(String(x+45, y+55, value, fontSize=16, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=bc))
        # note
        d.add(Rect(x+8, y+38, 74, 14, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
        d.add(String(x+45, y+41, note, fontSize=7.5, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        # description
        for j, line in enumerate(desc.split("\n")):
            d.add(String(x+45, y+25-(j*12), line, fontSize=7.5, fontName="Helvetica",
                         textAnchor="middle", fillColor=GRAY))

    return d


def brs_diagram():
    """BRS reconciliation flow."""
    d = Drawing(460, 190)
    d.add(String(230, 182, "BANK RECONCILIATION STATEMENT (BRS)",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    # Left box: Cash Book
    d.add(Rect(20, 60, 130, 100, rx=6, ry=6, fillColor=LIGHT_GREEN, strokeColor=GREEN, strokeWidth=2))
    d.add(Rect(20, 138, 130, 22, rx=4, ry=4, fillColor=GREEN, strokeColor=GREEN, strokeWidth=0))
    d.add(String(85, 144, "YOUR CASH BOOK", fontSize=9, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=WHITE))
    d.add(String(85, 124, "Balance: β‚Ή10,500", fontSize=10, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=GREEN))
    d.add(String(85, 108, "(Your personal record)", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))
    d.add(String(85, 90, "Like your phone's", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))
    d.add(String(85, 78, "transaction history", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))

    # Middle: differences
    d.add(Rect(175, 60, 110, 100, rx=6, ry=6, fillColor=LIGHT_YELLOW, strokeColor=YELLOW, strokeWidth=2))
    d.add(Rect(175, 138, 110, 22, rx=4, ry=4, fillColor=YELLOW, strokeColor=YELLOW, strokeWidth=0))
    d.add(String(230, 144, "DIFFERENCES", fontSize=9, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=colors.HexColor("#212121")))
    reasons = ["β€’ Uncashed cheques", "β€’ Bank charges", "β€’ Deposits in transit", "β€’ Errors"]
    for i, r in enumerate(reasons):
        d.add(String(185, 124-(i*16), r, fontSize=8, fontName="Helvetica",
                     textAnchor="start", fillColor=colors.HexColor("#212121")))

    # Right box: Bank Passbook
    d.add(Rect(310, 60, 130, 100, rx=6, ry=6, fillColor=LIGHT_BLUE, strokeColor=MID_BLUE, strokeWidth=2))
    d.add(Rect(310, 138, 130, 22, rx=4, ry=4, fillColor=MID_BLUE, strokeColor=MID_BLUE, strokeWidth=0))
    d.add(String(375, 144, "BANK PASSBOOK", fontSize=9, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=WHITE))
    d.add(String(375, 124, "Balance: β‚Ή10,000", fontSize=10, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=MID_BLUE))
    d.add(String(375, 108, "(Bank's record)", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))
    d.add(String(375, 90, "Like the ATM", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))
    d.add(String(375, 78, "mini-statement", fontSize=8, fontName="Helvetica",
                 textAnchor="middle", fillColor=GRAY))

    # Arrows
    d.add(Line(150, 110, 175, 110, strokeColor=ACCENT, strokeWidth=2))
    d.add(Line(285, 110, 310, 110, strokeColor=ACCENT, strokeWidth=2))

    # Bottom
    d.add(String(230, 45, "BRS explains the β‚Ή500 difference β†’ Both records are correct!",
                 fontSize=9, fontName="Helvetica-Bold", textAnchor="middle", fillColor=MID_BLUE))

    return d


def cost_types_diagram():
    """Visual of Fixed / Variable / Semi-variable costs with examples."""
    d = Drawing(460, 200)
    d.add(String(230, 192, "TYPES OF COSTS",
                 fontSize=12, fontName="Helvetica-Bold", textAnchor="middle", fillColor=DARK_BLUE))

    data = [
        (15,  70, 130, 100, GREEN,  LIGHT_GREEN,  "FIXED COST",
         "Same every month", "Factory Rent", "β‚Ή10,000 / month\nregardless of output"),
        (165, 70, 130, 100, PURPLE, LIGHT_PURPLE, "VARIABLE COST",
         "Changes with output", "Raw Material", "More production =\nMore cost"),
        (315, 70, 130, 100, TEAL,   LIGHT_TEAL,   "SEMI-VARIABLE",
         "Partly fixed+variable", "Electricity Bill", "Base charge +\nUsage charge"),
    ]

    for x, y, w, h, bc, bg, title, sub, eg_title, eg_desc in data:
        d.add(Rect(x, y, w, h, rx=6, ry=6, fillColor=bg, strokeColor=bc, strokeWidth=2))
        d.add(Rect(x, y+h-22, w, 22, rx=4, ry=4, fillColor=bc, strokeColor=bc, strokeWidth=0))
        d.add(String(x+w/2, y+h-13, title, fontSize=9, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        d.add(String(x+w/2, y+h-36, sub, fontSize=8, fontName="Helvetica",
                     textAnchor="middle", fillColor=GRAY))
        d.add(Rect(x+10, y+40, w-20, 16, rx=3, ry=3, fillColor=bc, strokeColor=bc, strokeWidth=0))
        d.add(String(x+w/2, y+44, eg_title, fontSize=8.5, fontName="Helvetica-Bold",
                     textAnchor="middle", fillColor=WHITE))
        for i, line in enumerate(eg_desc.split("\n")):
            d.add(String(x+w/2, y+28-(i*12), line, fontSize=8, fontName="Helvetica",
                         textAnchor="middle", fillColor=colors.HexColor("#212121")))

    # Opportunity & Sunk cost boxes at bottom
    d.add(Rect(15, 10, 200, 52, rx=4, ry=4, fillColor=LIGHT_RED, strokeColor=RED, strokeWidth=1.5))
    d.add(String(115, 52, "OPPORTUNITY COST", fontSize=9, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=RED))
    d.add(String(115, 38, "What you GIVE UP by choosing one option", fontSize=7.5,
                 fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
    d.add(String(115, 24, "e.g. FD interest lost by investing in business", fontSize=7.5,
                 fontName="Helvetica-Oblique", textAnchor="middle", fillColor=colors.HexColor("#212121")))

    d.add(Rect(245, 10, 200, 52, rx=4, ry=4, fillColor=LIGHT_GRAY, strokeColor=GRAY, strokeWidth=1.5))
    d.add(String(345, 52, "SUNK COST", fontSize=9, fontName="Helvetica-Bold",
                 textAnchor="middle", fillColor=GRAY))
    d.add(String(345, 38, "Money already spent β€” can't be recovered", fontSize=7.5,
                 fontName="Helvetica", textAnchor="middle", fillColor=GRAY))
    d.add(String(345, 24, "IGNORE sunk costs in future decisions!", fontSize=7.5,
                 fontName="Helvetica-Bold", textAnchor="middle", fillColor=RED))

    return d


# ═══════════════════════════════════════════════════════════════
#  TABLE BUILDERS
# ═══════════════════════════════════════════════════════════════

def styled_table(data, col_widths, header_color=DARK_BLUE, alt_color=LIGHT_BLUE):
    """Create a styled table with alternating rows."""
    ts = TableStyle([
        ("BACKGROUND",   (0, 0), (-1, 0),  header_color),
        ("TEXTCOLOR",    (0, 0), (-1, 0),  WHITE),
        ("FONTNAME",     (0, 0), (-1, 0),  "Helvetica-Bold"),
        ("FONTSIZE",     (0, 0), (-1, 0),  9),
        ("ALIGN",        (0, 0), (-1, 0),  "CENTER"),
        ("BOTTOMPADDING",(0, 0), (-1, 0),  8),
        ("TOPPADDING",   (0, 0), (-1, 0),  8),
        ("FONTNAME",     (0, 1), (-1, -1), "Helvetica"),
        ("FONTSIZE",     (0, 1), (-1, -1), 9),
        ("ALIGN",        (0, 1), (-1, -1), "CENTER"),
        ("TOPPADDING",   (0, 1), (-1, -1), 6),
        ("BOTTOMPADDING",(0, 1), (-1, -1), 6),
        ("GRID",         (0, 0), (-1, -1), 0.5, colors.HexColor("#B0BEC5")),
        ("ROWBACKGROUNDS",(0,1), (-1,-1), [WHITE, alt_color]),
        ("VALIGN",       (0, 0), (-1, -1), "MIDDLE"),
    ])
    t = Table(data, colWidths=col_widths)
    t.setStyle(ts)
    return t


# ═══════════════════════════════════════════════════════════════
#  PAGE TEMPLATE
# ═══════════════════════════════════════════════════════════════

def on_page(canvas, doc):
    """Header + footer on every page."""
    canvas.saveState()
    # Top bar
    canvas.setFillColor(DARK_BLUE)
    canvas.rect(0, PAGE_H - 28, PAGE_W, 28, fill=1, stroke=0)
    canvas.setFillColor(WHITE)
    canvas.setFont("Helvetica-Bold", 9)
    canvas.drawString(20, PAGE_H - 18, "BASIC ACCOUNTING FOR MANAGERS  |  MBA Sem I  |  Dr. MGR University")
    canvas.setFont("Helvetica", 8)
    canvas.drawRightString(PAGE_W - 20, PAGE_H - 18, f"Page {doc.page}")
    # Bottom bar
    canvas.setFillColor(ACCENT)
    canvas.rect(0, 0, PAGE_W, 18, fill=1, stroke=0)
    canvas.setFillColor(WHITE)
    canvas.setFont("Helvetica", 7.5)
    canvas.drawCentredString(PAGE_W/2, 5, "Study Smart  β€’  Exam: 16 August 2026  β€’  Good Luck!")
    canvas.restoreState()


# ═══════════════════════════════════════════════════════════════
#  CONTENT BUILDER
# ═══════════════════════════════════════════════════════════════

def build_pdf():
    path = "/tmp/workspace/accounting-study-guide/Basic_Accounting_Study_Guide.pdf"
    doc  = SimpleDocTemplate(
        path, pagesize=A4,
        leftMargin=1.5*cm, rightMargin=1.5*cm,
        topMargin=1.8*cm,  bottomMargin=1.5*cm,
        title="Basic Accounting for Managers - Study Guide",
        author="Dr. MGR University MBA",
    )

    story = []
    W = PAGE_W - 3*cm   # usable width

    # ── COVER PAGE ──────────────────────────────────────────────
    class CoverPage(Flowable):
        def wrap(self, aW, aH): self.width=aW; self.height=aH; return aW, aH
        def draw(self):
            c = self.canv
            c.saveState()
            # gradient-ish background
            c.setFillColor(DARK_BLUE)
            c.rect(0, 0, self.width, self.height, fill=1, stroke=0)
            # decorative circles
            c.setFillColor(colors.HexColor("#1565C0"))
            c.circle(self.width*0.85, self.height*0.8, 120, fill=1, stroke=0)
            c.setFillColor(colors.HexColor("#0D47A1"))
            c.circle(self.width*0.1, self.height*0.2, 80, fill=1, stroke=0)
            # accent strip
            c.setFillColor(ACCENT)
            c.rect(0, self.height*0.45-3, self.width, 6, fill=1, stroke=0)
            # institution
            c.setFillColor(LIGHT_BLUE)
            c.setFont("Helvetica", 11)
            c.drawCentredString(self.width/2, self.height*0.82, "Dr. M.G.R. Educational and Research Institute")
            c.drawCentredString(self.width/2, self.height*0.78, "MBA (Online) β€’ I Semester β€’ Batch 2026 A")
            # Course code badge
            c.setFillColor(ACCENT)
            c.roundRect(self.width/2-55, self.height*0.68, 110, 28, 6, fill=1, stroke=0)
            c.setFillColor(WHITE)
            c.setFont("Helvetica-Bold", 12)
            c.drawCentredString(self.width/2, self.height*0.683, "MMBA22003")
            # Main title
            c.setFillColor(WHITE)
            c.setFont("Helvetica-Bold", 30)
            c.drawCentredString(self.width/2, self.height*0.56, "BASIC ACCOUNTING")
            c.setFont("Helvetica-Bold", 26)
            c.drawCentredString(self.width/2, self.height*0.50, "FOR MANAGERS")
            # Subtitle
            c.setFillColor(LIGHT_BLUE)
            c.setFont("Helvetica", 13)
            c.drawCentredString(self.width/2, self.height*0.42, "Comprehensive Study Guide with Diagrams & Real-Life Examples")
            # Exam info box
            c.setFillColor(colors.HexColor("#0D47A1"))
            c.roundRect(self.width/2-130, self.height*0.27, 260, 70, 8, fill=1, stroke=0)
            c.setFillColor(ACCENT)
            c.setFont("Helvetica-Bold", 11)
            c.drawCentredString(self.width/2, self.height*0.35, "EXAM DATE: 16 AUGUST 2026")
            c.setFillColor(WHITE)
            c.setFont("Helvetica", 10)
            c.drawCentredString(self.width/2, self.height*0.32, "Session: Forenoon  β€’  Time: 10:00 AM – 1:00 PM")
            c.drawCentredString(self.width/2, self.height*0.29, "Topics Covered: All 10 Key Chapters")
            # Bottom
            c.setFillColor(LIGHT_BLUE)
            c.setFont("Helvetica", 9)
            c.drawCentredString(self.width/2, self.height*0.06, "Study Smart β€’ Understand Concepts β€’ Ace Your Exam!")
            c.restoreState()

    story.append(CoverPage())
    story.append(PageBreak())

    # ── TABLE OF CONTENTS ────────────────────────────────────────
    story.append(SectionLabel("TABLE OF CONTENTS", DARK_BLUE))
    story.append(Spacer(1, 6))
    toc_data = [
        ["#", "Topic", "Exam Weight"],
        ["1", "What is Accounting? + The Accounting Equation", "β˜…β˜…β˜…β˜…β˜†"],
        ["2", "Types of Accounts & Golden Rules", "β˜…β˜…β˜…β˜…β˜…"],
        ["3", "Journal Entries", "β˜…β˜…β˜…β˜…β˜…"],
        ["4", "Ledger Posting", "β˜…β˜…β˜…β˜†β˜†"],
        ["5", "Trial Balance", "β˜…β˜…β˜…β˜…β˜†"],
        ["6", "Final Accounts (Trading, P&L, Balance Sheet)", "β˜…β˜…β˜…β˜…β˜…"],
        ["7", "Depreciation (SLM & WDV)", "β˜…β˜…β˜…β˜…β˜†"],
        ["8", "Bank Reconciliation Statement (BRS)", "β˜…β˜…β˜…β˜…β˜†"],
        ["9", "Ratio Analysis", "β˜…β˜…β˜…β˜…β˜…"],
        ["10","Cost Concepts", "β˜…β˜…β˜…β˜†β˜†"],
        ["11","Quick Revision Summary + Memory Tricks", "β€”"],
    ]
    toc = styled_table(toc_data,
                       [0.6*cm, 11*cm, 3.4*cm],
                       header_color=DARK_BLUE)
    story.append(toc)
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 1 – What is Accounting + Accounting Equation
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(1, "What is Accounting? & The Accounting Equation", DARK_BLUE))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("What is Accounting?", MID_BLUE))
    story.append(Paragraph(
        "Accounting is the process of <b>recording, classifying, summarising</b> and <b>interpreting</b> "
        "financial transactions of a business, so that managers can make good decisions.",
        BODY))
    story.append(ColorBox(
        "🏠 Real-Life Example: Think of your monthly household budget. "
        "You write down salary received, rent paid, groceries bought. "
        "At month-end you check what's left. That is personal accounting! "
        "Business accounting does the same β€” just more formally.",
        bg=LIGHT_GREEN, border=GREEN, text_color=colors.HexColor("#1B5E20"),
        font_size=9))
    story.append(Spacer(1, 6))

    story.append(SectionLabel("The Accounting Equation", MID_BLUE))
    story.append(Paragraph(
        "The most fundamental rule in accounting. <b>It always holds true</b> β€” no matter what transaction occurs.",
        BODY))
    story.append(ColorBox("ASSETS  =  LIABILITIES  +  CAPITAL  (Owner's Equity)",
                          bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE,
                          font="Helvetica-Bold", font_size=13))
    story.append(Spacer(1, 8))
    story.append(accounting_equation_diagram())
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Key Definitions", MID_BLUE))
    defs = [
        ["Term", "Simple Definition", "Real-Life Example"],
        ["Assets", "Things a business OWNS or is owed", "Cash, building, stock, debtors"],
        ["Liabilities", "Things a business OWES to others", "Bank loan, creditors"],
        ["Capital", "Owner's investment in the business", "Money you put in to start the shop"],
        ["Revenue", "Income earned from business activity", "Sales of goods/services"],
        ["Expenses", "Costs incurred to earn revenue", "Rent, salaries, electricity"],
    ]
    story.append(styled_table(defs, [3*cm, 5.5*cm, 6.5*cm]))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 2 – Types of Accounts & Golden Rules
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(2, "Types of Accounts & Golden Rules", GREEN))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "Every transaction affects at least <b>two accounts</b> (Double Entry System). "
        "To know which account to debit and which to credit, we first classify the account.",
        BODY))
    story.append(Spacer(1, 6))
    story.append(three_accounts_diagram())
    story.append(Spacer(1, 10))

    story.append(SectionLabel("Golden Rules - Summary Table", MID_BLUE))
    rules = [
        ["Account Type", "DEBIT (Dr)", "CREDIT (Cr)", "Memory Trick"],
        ["Personal", "The Receiver", "The Giver", "Who got the money? Debit them!"],
        ["Real", "What comes IN", "What goes OUT", "Cash comes in β†’ Debit Cash"],
        ["Nominal", "Expenses & Losses", "Incomes & Gains", "You paid rent β†’ Debit Rent"],
    ]
    story.append(styled_table(rules, [3.5*cm, 3.5*cm, 3.5*cm, 4.5*cm], header_color=GREEN))
    story.append(Spacer(1, 10))

    story.append(ColorBox(
        "πŸ“± Life Example for Golden Rules: "
        "You pay β‚Ή5,000 rent in cash. "
        "Rent = Nominal (Expense) β†’ DEBIT Rent A/c. "
        "Cash = Real (goes out) β†’ CREDIT Cash A/c.",
        bg=LIGHT_GREEN, border=GREEN, text_color=colors.HexColor("#1B5E20"), font_size=9))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 3 – Journal Entries
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(3, "Journal Entries", PURPLE))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "A <b>Journal</b> is the book of original (first) entry. "
        "Every transaction is recorded here in chronological order, "
        "showing which account is debited and which is credited.",
        BODY))

    story.append(SectionLabel("Format of a Journal Entry", MID_BLUE))
    jfmt = [
        ["Date", "Particulars", "L.F.", "Dr. Amount (β‚Ή)", "Cr. Amount (β‚Ή)"],
        ["01/08/26", "Cash A/c          Dr.\n    To Sales A/c\n(Being goods sold for cash)", "-", "10,000", "10,000"],
    ]
    story.append(styled_table(jfmt, [2.5*cm, 6.5*cm, 1.2*cm, 2.8*cm, 2*cm], header_color=PURPLE))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("5 Common Journal Entries (Exam Favourites!)", MID_BLUE))
    entries = [
        ["Transaction", "Dr. Account", "Cr. Account", "Real-Life Scenario"],
        ["Started business with cash β‚Ή1,00,000",
         "Cash A/c", "Capital A/c", "You invest your savings"],
        ["Bought goods for cash β‚Ή20,000",
         "Purchases A/c", "Cash A/c", "Shopkeeper buys stock"],
        ["Sold goods on credit to Ram β‚Ή15,000",
         "Ram A/c (Debtor)", "Sales A/c", "Gave goods, payment later"],
        ["Paid rent β‚Ή5,000 by cheque",
         "Rent A/c", "Bank A/c", "Monthly shop rent payment"],
        ["Received commission β‚Ή2,000",
         "Cash A/c", "Commission A/c", "Earned referral bonus"],
    ]
    story.append(styled_table(entries,
                              [4.5*cm, 3*cm, 3*cm, 4.5*cm], header_color=PURPLE))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("The Accounting Cycle", MID_BLUE))
    story.append(accounting_cycle_diagram())
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 4 – Ledger
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(4, "Ledger Posting", MID_BLUE))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "A <b>Ledger</b> is the book of final entry. After journalising, every entry is "
        "'posted' to its respective account in the ledger. "
        "Think of it as individual folders for each account.",
        BODY))
    story.append(ColorBox(
        "πŸ“’ Real-Life: A shopkeeper keeps a separate notebook page for each customer. "
        "Ravi's page shows all amounts he owes. "
        "The cash page shows all cash in/out. "
        "This collection of pages = Ledger.",
        bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE, font_size=9))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Format of a Ledger Account (T-Format)", MID_BLUE))
    ledger = [
        ["Dr Side", "", "", "CASH ACCOUNT", "Cr Side", "", ""],
        ["Date", "Particulars", "β‚Ή", "   ", "Date", "Particulars", "β‚Ή"],
        ["01 Aug", "Capital A/c\n(Started business)", "1,00,000", " ",
         "05 Aug", "Purchases A/c\n(Bought goods)", "20,000"],
        ["", "", "", " ", "10 Aug", "Rent A/c", "5,000"],
        ["", "Balance c/d", "75,000", " ", "", "", ""],
        ["", "Total", "1,00,000", " ", "", "Total", "1,00,000"],
    ]
    lt = Table(ledger, colWidths=[1.8*cm, 3.8*cm, 2*cm, 0.5*cm, 1.8*cm, 3.8*cm, 2*cm])
    lt.setStyle(TableStyle([
        ("SPAN",        (0,0),(2,0)),
        ("SPAN",        (4,0),(6,0)),
        ("BACKGROUND",  (0,0),(2,0), GREEN),
        ("BACKGROUND",  (4,0),(6,0), RED),
        ("BACKGROUND",  (0,1),(2,1), LIGHT_GREEN),
        ("BACKGROUND",  (4,1),(6,1), LIGHT_RED),
        ("TEXTCOLOR",   (0,0),(2,0), WHITE),
        ("TEXTCOLOR",   (4,0),(6,0), WHITE),
        ("FONTNAME",    (0,0),(-1,1), "Helvetica-Bold"),
        ("FONTSIZE",    (0,0),(-1,-1), 8.5),
        ("ALIGN",       (0,0),(-1,-1), "CENTER"),
        ("GRID",        (0,0),(-1,-1), 0.5, colors.HexColor("#B0BEC5")),
        ("TOPPADDING",  (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
        ("BACKGROUND",  (0,4),(2,4), LIGHT_GRAY),
        ("BACKGROUND",  (4,4),(6,4), LIGHT_GRAY),
        ("BACKGROUND",  (0,5),(2,5), LIGHT_BLUE),
        ("BACKGROUND",  (4,5),(6,5), LIGHT_BLUE),
        ("FONTNAME",    (0,5),(-1,5), "Helvetica-Bold"),
    ]))
    story.append(lt)
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 5 – Trial Balance
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(5, "Trial Balance", TEAL))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "A <b>Trial Balance</b> is a statement prepared at the end of a period listing all "
        "ledger account balances in two columns - Debit and Credit. "
        "If Total Dr = Total Cr, the books are arithmetically correct.",
        BODY))
    story.append(ColorBox(
        "βš–οΈ Real-Life: Like checking if both sides of a weighing scale balance. "
        "Every debit has a matching credit. If the scale tips, something is wrong!",
        bg=LIGHT_TEAL, border=TEAL, text_color=TEAL, font_size=9))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Sample Trial Balance", MID_BLUE))
    tb_data = [
        ["Account Name", "Debit Balance (β‚Ή)", "Credit Balance (β‚Ή)"],
        ["Capital A/c", "β€”", "1,00,000"],
        ["Cash A/c", "75,000", "β€”"],
        ["Purchases A/c", "20,000", "β€”"],
        ["Sales A/c", "β€”", "15,000"],
        ["Rent A/c", "5,000", "β€”"],
        ["Furniture A/c", "15,000", "β€”"],
        ["TOTAL", "1,15,000", "1,15,000"],
    ]
    tb = styled_table(tb_data, [7*cm, 4*cm, 4*cm], header_color=TEAL)
    tb.setStyle(TableStyle([
        ("BACKGROUND",  (0,7),(-1,7), TEAL),
        ("TEXTCOLOR",   (0,7),(-1,7), WHITE),
        ("FONTNAME",    (0,7),(-1,7), "Helvetica-Bold"),
    ]))
    story.append(tb)
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Errors Detected & NOT Detected by Trial Balance", MID_BLUE))
    err_data = [
        ["TB Will Catch (Arithmetic Errors)", "TB Will NOT Catch"],
        ["Wrong totals", "Error of omission (forgot to record)"],
        ["Missing entry on one side", "Error of commission (wrong account, same type)"],
        ["Unequal debit/credit amounts", "Compensating errors"],
        ["Wrong carry-forward balance", "Error of principle (wrong account type)"],
    ]
    story.append(styled_table(err_data, [7*cm, 8*cm],
                              header_color=TEAL, alt_color=LIGHT_TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 6 – Final Accounts
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(6, "Final Accounts (Trading, P&L, Balance Sheet)", RED))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "Final accounts are prepared at the end of the accounting year to find out "
        "<b>profit/loss</b> and the <b>financial position</b> of the business.",
        BODY))
    story.append(Spacer(1, 4))
    story.append(final_accounts_diagram())
    story.append(Spacer(1, 8))

    story.append(SectionLabel("1. Trading Account - Finding Gross Profit", MID_BLUE))
    trade = [
        ["Dr Side (Expenses/Costs)", "β‚Ή", "Cr Side (Income)", "β‚Ή"],
        ["Opening Stock", "10,000", "Sales", "80,000"],
        ["Purchases", "40,000", "Closing Stock", "15,000"],
        ["Direct Expenses", "5,000", "", ""],
        ["Gross Profit (balancing figure)", "40,000", "", ""],
        ["TOTAL", "95,000", "TOTAL", "95,000"],
    ]
    story.append(styled_table(trade, [6cm, 2.5*cm, 5*cm, 1.5*cm], header_color=GREEN))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("2. Profit & Loss Account - Finding Net Profit", MID_BLUE))
    pl = [
        ["Dr Side (Expenses)", "β‚Ή", "Cr Side (Income)", "β‚Ή"],
        ["Salaries", "12,000", "Gross Profit b/d", "40,000"],
        ["Rent", "6,000", "Commission Received", "2,000"],
        ["Electricity", "2,000", "", ""],
        ["Depreciation", "2,000", "", ""],
        ["Net Profit (balancing figure)", "20,000", "", ""],
        ["TOTAL", "42,000", "TOTAL", "42,000"],
    ]
    story.append(styled_table(pl, [6*cm, 2.5*cm, 5*cm, 1.5*cm], header_color=YELLOW,
                              alt_color=LIGHT_YELLOW))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("3. Balance Sheet - Financial Position", MID_BLUE))
    bs = [
        ["LIABILITIES", "β‚Ή", "ASSETS", "β‚Ή"],
        ["Capital", "1,00,000", "Fixed Assets", ""],
        ["(+) Net Profit", "20,000", "  Building", "60,000"],
        ["(=) Capital Total", "1,20,000", "  Furniture", "20,000"],
        ["Bank Loan", "30,000", "Current Assets", ""],
        ["Creditors", "10,000", "  Stock (Closing)", "15,000"],
        ["", "", "  Debtors", "40,000"],
        ["", "", "  Cash & Bank", "25,000"],
        ["TOTAL", "1,60,000", "TOTAL", "1,60,000"],
    ]
    story.append(styled_table(bs, [5*cm, 2.5*cm, 5*cm, 2.5*cm], header_color=MID_BLUE))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 7 – Depreciation
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(7, "Depreciation", ACCENT))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "<b>Depreciation</b> is the gradual decrease in the value of a fixed asset due to "
        "use, wear & tear, or passage of time. It is recorded as an expense in P&L.",
        BODY))
    story.append(ColorBox(
        "πŸ“± Real-Life: You buy a laptop for β‚Ή60,000. After 3 years it's worth β‚Ή20,000. "
        "The β‚Ή40,000 reduction in value is depreciation. "
        "Businesses record this loss every year.",
        bg=LIGHT_YELLOW, border=YELLOW, text_color=colors.HexColor("#4A148C"), font_size=9))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Two Main Methods Compared", MID_BLUE))
    dep_compare = [
        ["Feature", "Straight Line Method (SLM)", "Written Down Value (WDV)"],
        ["Also called", "Fixed Instalment Method", "Reducing Balance Method"],
        ["Depreciation amount", "Same every year (Fixed)", "Decreasing every year"],
        ["Formula", "Cost - Scrap Value\nΓ· Useful Life", "Rate % Γ— Book Value each year"],
        ["Example\n(β‚Ή20,000 asset, 20%)", "β‚Ή4,000 every year", "β‚Ή4,000 β†’ β‚Ή3,200 β†’ β‚Ή2,560…"],
        ["Best for", "Simple assets (furniture)", "Machines, vehicles"],
        ["Net Book Value", "Reduces uniformly to zero", "Never exactly zero"],
    ]
    story.append(styled_table(dep_compare, [3.5*cm, 5*cm, 6.5*cm], header_color=ACCENT,
                              alt_color=LIGHT_YELLOW))
    story.append(Spacer(1, 8))
    story.append(depreciation_diagram())
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 8 – BRS
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(8, "Bank Reconciliation Statement (BRS)", TEAL))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "A <b>BRS</b> is a statement prepared to explain the difference between the "
        "<b>Cash Book balance</b> (your records) and the <b>Bank Passbook balance</b> (bank's records).",
        BODY))
    story.append(Spacer(1, 6))
    story.append(brs_diagram())
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Why Do Differences Arise?", MID_BLUE))
    brs_reasons = [
        ["Reason", "Effect on Cash Book vs Passbook", "Example"],
        ["Cheque issued but not yet presented",
         "Cash Book less; Passbook hasn't deducted yet",
         "You gave a cheque to supplier on 28th; bank processes on 2nd"],
        ["Cheque deposited but not yet cleared",
         "Cash Book shows receipt; Passbook not yet credited",
         "You deposited customer cheque; takes 2 days to clear"],
        ["Bank charges / interest debited",
         "Passbook shows deduction; Cash Book unaware",
         "Bank deducts β‚Ή150 annual fee"],
        ["Direct credit by bank",
         "Passbook shows; Cash Book may not",
         "Interest credited directly to account"],
        ["Errors in Cash Book or Passbook",
         "Either side may be wrong",
         "Wrong amount entered"],
    ]
    story.append(styled_table(brs_reasons,
                              [3.5*cm, 5*cm, 6.5*cm], header_color=TEAL, alt_color=LIGHT_TEAL))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("BRS Format", MID_BLUE))
    brs_fmt = [
        ["Particulars", "β‚Ή"],
        ["Balance as per Cash Book", "10,500"],
        ["Less: Cheque issued but not presented to bank", "(800)"],
        ["Add: Cheque deposited but not cleared", "300"],
        ["Balance as per Passbook", "10,000"],
    ]
    story.append(styled_table(brs_fmt, [11*cm, 4*cm], header_color=TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 9 – Ratio Analysis
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(9, "Ratio Analysis", PURPLE))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "<b>Ratio Analysis</b> helps managers evaluate business performance by comparing "
        "key financial figures. Like a health check-up uses tests (BP, sugar), "
        "business uses ratios.",
        BODY))
    story.append(Spacer(1, 6))
    story.append(ratio_analysis_diagram())
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Important Ratios - Quick Reference", MID_BLUE))
    ratio_data = [
        ["Ratio", "Formula", "Ideal Value", "What it Measures"],
        ["Current Ratio", "Current Assets Γ· Current Liabilities", "2 : 1", "Short-term solvency"],
        ["Quick Ratio", "(Current Assets - Stock) Γ· Current Liabilities", "1 : 1", "Immediate liquidity"],
        ["Gross Profit Ratio", "Gross Profit Γ· Net Sales Γ— 100", "Higher = Better", "Profit on trading"],
        ["Net Profit Ratio", "Net Profit Γ· Net Sales Γ— 100", "Higher = Better", "Overall profitability"],
        ["Debt-Equity Ratio", "Long-term Debt Γ· Equity", "1 : 1", "Financial leverage"],
        ["Return on Capital", "Net Profit Γ· Capital Employed Γ— 100", "Higher = Better", "Return on investment"],
        ["Stock Turnover", "Cost of Goods Sold Γ· Avg Stock", "Higher = Better", "How fast stock sold"],
        ["Debtors Turnover", "Net Credit Sales Γ· Avg Debtors", "Higher = Better", "Collection efficiency"],
    ]
    story.append(styled_table(ratio_data,
                              [3.5*cm, 5*cm, 3*cm, 3.5*cm], header_color=PURPLE,
                              alt_color=LIGHT_PURPLE))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 10 – Cost Concepts
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(10, "Cost Concepts for Managers", GRAY))
    story.append(Spacer(1, 8))
    story.append(Paragraph(
        "Understanding costs helps managers make decisions like: Should we produce more? "
        "Which product is profitable? Should we buy or make?",
        BODY))
    story.append(Spacer(1, 6))
    story.append(cost_types_diagram())
    story.append(Spacer(1, 10))

    story.append(SectionLabel("Cost Classification - Comprehensive Table", MID_BLUE))
    cost_data = [
        ["Cost Type", "Definition", "Example", "Decision Use"],
        ["Fixed Cost", "Remains constant regardless of output", "Factory rent β‚Ή10,000/month", "Break-even analysis"],
        ["Variable Cost", "Changes proportionally with output", "Raw materials per unit", "Marginal costing"],
        ["Semi-variable", "Partly fixed + partly variable", "Electricity: base + usage", "Cost estimation"],
        ["Opportunity Cost", "Value of next best alternative foregone", "FD interest lost", "Investment decisions"],
        ["Sunk Cost", "Already incurred, cannot be recovered", "Market research spent", "Ignore in decisions"],
        ["Marginal Cost", "Extra cost of one more unit", "Cost of 1 extra pen", "Output decisions"],
        ["Direct Cost", "Directly traced to a product", "Leather in a shoe", "Product costing"],
        ["Indirect Cost", "Cannot be directly traced", "Factory electricity", "Overhead allocation"],
    ]
    story.append(styled_table(cost_data,
                              [2.8*cm, 3.5*cm, 3.5*cm, 5.2*cm], header_color=GRAY,
                              alt_color=LIGHT_GRAY))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Break-Even Point", MID_BLUE))
    story.append(Paragraph(
        "Break-even point is where <b>Total Revenue = Total Cost</b> β€” no profit, no loss.",
        BODY))
    story.append(ColorBox(
        "FORMULA: BEP (Units) = Fixed Costs Γ· (Selling Price per unit – Variable Cost per unit)   "
        "| EXAMPLE: Fixed Costs β‚Ή40,000 | Selling Price β‚Ή100 | Variable Cost β‚Ή60   "
        "| BEP = 40,000 Γ· (100-60) = 1,000 units   "
        "| You need to sell 1,000 units to just break even!",
        bg=LIGHT_BLUE, border=MID_BLUE, text_color=DARK_BLUE, font_size=9))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CHAPTER 11 – Quick Revision
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(11, "Quick Revision Summary & Memory Tricks", ACCENT))
    story.append(Spacer(1, 8))

    story.append(SectionLabel("Master Formula Sheet", MID_BLUE))
    formulas = [
        ["Formula", "Expression"],
        ["Accounting Equation", "Assets = Liabilities + Capital"],
        ["Gross Profit", "Sales - Cost of Goods Sold"],
        ["Cost of Goods Sold", "Opening Stock + Purchases - Closing Stock"],
        ["Net Profit", "Gross Profit - Indirect Expenses + Other Income"],
        ["Current Ratio", "Current Assets Γ· Current Liabilities"],
        ["Quick Ratio", "(Current Assets - Stock) Γ· Current Liabilities"],
        ["SLM Depreciation", "(Cost - Scrap Value) Γ· Useful Life"],
        ["WDV Depreciation", "Book Value Γ— Rate % Γ· 100"],
        ["Break-Even Point", "Fixed Cost Γ· (SP - VC) per unit"],
        ["Gross Profit Ratio", "Gross Profit Γ· Net Sales Γ— 100"],
        ["Net Profit Ratio", "Net Profit Γ· Net Sales Γ— 100"],
    ]
    story.append(styled_table(formulas, [6*cm, 9*cm], header_color=ACCENT,
                              alt_color=LIGHT_YELLOW))
    story.append(Spacer(1, 10))

    story.append(SectionLabel("Memory Tricks (Mnemonics)", MID_BLUE))
    tricks = [
        "πŸ’‘ DEAL = Debit: Expenses, Assets, Losses  |  GIRLS = Credit: Gains, Income, Revenue, Liabilities, Stock reduction",
        "πŸ’‘ 'REAL accounts: Things you can FEEL β€” cash, stock, building'",
        "πŸ’‘ 'PERSONAL accounts: PEOPLE and companies you deal with'",
        "πŸ’‘ 'NOMINAL accounts: Names like Rent, Salary, Sales β€” no physical form'",
        "πŸ’‘ Trial Balance mnemonic: 'DR β€” Debit Right side? No! Debit = LEFT side always!'",
        "πŸ’‘ Balance Sheet: 'CALL on the right side β€” Capital, All liabilities, Long-term debt'",
        "πŸ’‘ BRS: 'If Cash Book is base β€” ADD uncredited deposits, LESS unpresented cheques'",
        "πŸ’‘ SLM vs WDV: 'Straight = Same amount. Written Down = Waning (decreasing)'",
    ]
    for t in tricks:
        story.append(ColorBox(t, bg=LIGHT_PURPLE, border=PURPLE,
                              text_color=colors.HexColor("#4A148C"), font_size=9))
        story.append(Spacer(1, 3))

    story.append(Spacer(1, 8))
    story.append(SectionLabel("Top 10 Exam Tips", MID_BLUE))
    tips_data = [
        ["#", "Exam Tip"],
        ["1", "Always write the 'narration' in journal entries β€” it carries marks!"],
        ["2", "Balance Sheet must always balance. If not, find your error before moving on."],
        ["3", "In Trial Balance: Assets & Expenses = Debit; Liabilities, Capital & Income = Credit"],
        ["4", "Depreciation reduces asset value AND appears as expense in P&L."],
        ["5", "Current Ratio 2:1 = healthy business. Less than 1 = danger zone!"],
        ["6", "BRS is NOT an error β€” it is a normal reconciliation statement."],
        ["7", "Gross Profit Ratio and Net Profit Ratio are the most common exam questions."],
        ["8", "Sunk costs should be IGNORED in decision-making β€” don't let past losses affect future decisions."],
        ["9", "Always label columns in Trading A/c and P&L: Dr side and Cr side."],
        ["10", "Show ALL workings β€” partial marks are given even if final answer is wrong!"],
    ]
    story.append(styled_table(tips_data, [1*cm, 14*cm], header_color=DARK_BLUE))
    story.append(Spacer(1, 10))

    # Final good luck box
    class GoodLuck(Flowable):
        def wrap(self, aW, aH):
            self.width = aW; self.height = 80; return aW, 80
        def draw(self):
            c = self.canv
            c.saveState()
            c.setFillColor(DARK_BLUE)
            c.roundRect(0, 0, self.width, 80, 8, fill=1, stroke=0)
            c.setFillColor(ACCENT)
            c.setFont("Helvetica-Bold", 16)
            c.drawCentredString(self.width/2, 52, "EXAM: 16 AUGUST 2026   |   10:00 AM – 1:00 PM")
            c.setFillColor(WHITE)
            c.setFont("Helvetica-Bold", 14)
            c.drawCentredString(self.width/2, 32, "You've got this! Study with understanding, not by rote.")
            c.setFillColor(LIGHT_BLUE)
            c.setFont("Helvetica", 11)
            c.drawCentredString(self.width/2, 14, "Best of Luck! – Dr. MGR University MBA 2026")
            c.restoreState()

    story.append(GoodLuck())

    doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
    print(f"PDF created: {path}")
    return path

build_pdf()
Running Command

cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1

Editing File

~/accounting-study-guide/create_guide.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/accounting-study-guide/create_guide.py'
Running Command

cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1

Editing File

~/accounting-study-guide/create_guide.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/accounting-study-guide/create_guide.py'
Running Command

cd /tmp/workspace/accounting-study-guide && python create_guide.py 2>&1

Running Command

ls -lh /tmp/workspace/accounting-study-guide/Basic_Accounting_Study_Guide.pdf

Your study guide PDF is ready! πŸŽ‰

πŸ“₯ Download Your Study Guide

Basic Accounting Study Guide

PDF Document Β· PDF


πŸ“‹ What's Inside (11 Chapters with Diagrams)

ChapterTopicVisual Included
1What is Accounting + Accounting EquationBalance-scale diagram with β‚Ή amounts
2Types of Accounts & Golden Rules3-box colour-coded diagram
3Journal EntriesAccounting cycle flow diagram
4Ledger PostingT-format ledger table
5Trial BalanceSample TB + error detection table
6Final Accounts (Trading, P&L, Balance Sheet)Full flow diagram + 3 account formats
7Depreciation (SLM vs WDV)5-year bar chart comparison
8Bank Reconciliation StatementCash Book vs Passbook visual
9Ratio AnalysisRatio dashboard with 8 formulas
10Cost ConceptsFixed/Variable/Semi-variable + BEP
11Quick Revision + Memory TricksFormula sheet + Top 10 exam tips
Every page has: your university name + exam date in the header, and a motivational footer. The PDF has a full colour cover page with your exam details (16 August 2026, 10 AM).
Want me to make the same kind of guide for your next paper - Business Communication (22 Aug) or Managerial Economics (23 Aug)?

Next second exam study from what books u refer and tell me

Finding Sources
Searching the Web

Business Communication MBA textbooks standard references

Finding Sources
Great question! Here's an honest and clear answer:

πŸ“š What Books I Refer For Your Exam Topics

My Library (Built-in Textbooks)

My internal textbook library contains medical, surgical, and clinical books - things like neurology, cardiology, surgery, dermatology, etc.
There are NO MBA / Business Communication / Management textbooks in my library. So I do NOT have a dedicated textbook source for your MBA subjects.

What I Actually Use for Your MBA Topics

When I teach you Business Communication or any MBA subject, I use:
SourceWhat it gives me
My training knowledgeCore concepts from standard MBA curricula I was trained on
Web searchCurrent material, study notes, exam guides
Standard reference books (knowledge base)Content from well-known textbooks listed below

πŸ“– Standard Books I Draw Knowledge From (Business Communication)

These are the most widely used books for MBA Business Communication in Indian universities:
BookAuthorWhy Important
Business CommunicationK.K. SinhaMost popular in Indian MBA programs
Effective Business CommunicationHerta A. Murphy, Herbert W. HildebrandtClassic international reference
Business CommunicationR.K. MadhukarAnna University / MGR University aligned
Essentials of Business CommunicationMary Ellen GuffeyGlobal standard
Business Communication TodayCourtland L. Bovee, John V. ThillWidely used in MBA programs
Business CommunicationLesikar & FlatleyUsed in management schools
For Dr. MGR University specifically, R.K. Madhukar's Business Communication and K.K. Sinha's Business Communication are most commonly prescribed.

What This Means for You

  • When I taught your Accounting guide, I used standard accounting concepts (which are universal - same in all books).
  • When I teach Business Communication, I will similarly cover concepts that align with your syllabus based on what Dr. MGR University typically covers for MBA Sem I.
  • My explanations will be accurate and exam-relevant even without a specific textbook in my library.

My Recommendation for You

Since your exam is on 22 August 2026, here's what to use:
  1. Your university-provided study material / notes - most important!
  2. K.K. Sinha - Business Communication (widely available, easy to read)
  3. My study guides - I'll cover all key topics with real-life examples and diagrams

Want me to start teaching Business Communication (Paper 2) now with the same approach - real-life examples + diagrams + PDF study guide? Just say yes! πŸŽ“

Yes

Here's a quick overview while I build your PDF simultaneously!

πŸ“’ BUSINESS COMMUNICATION (MMBA22L02)

Exam: 22 August 2026

🏠 What is Communication? (Real Life First!)

You text your friend "Meet me at 5pm" - that's communication! In business, it's the same - but more formal and purposeful.
Definition: Communication is the process of sending, receiving and understanding a message between two or more people to achieve a business goal.

Now building your full PDF with diagrams...
Writing File

~/accounting-study-guide/create_biz_comm.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Circle, Group
import math

# ── Colour palette ──────────────────────────────────────────────
DARK_BLUE    = colors.HexColor("#1A237E")
MID_BLUE     = colors.HexColor("#1565C0")
LIGHT_BLUE   = colors.HexColor("#E3F2FD")
ACCENT       = colors.HexColor("#FF6F00")
GREEN        = colors.HexColor("#2E7D32")
LIGHT_GREEN  = colors.HexColor("#E8F5E9")
RED          = colors.HexColor("#C62828")
LIGHT_RED    = colors.HexColor("#FFEBEE")
YELLOW       = colors.HexColor("#F9A825")
LIGHT_YELLOW = colors.HexColor("#FFFDE7")
PURPLE       = colors.HexColor("#6A1B9A")
LIGHT_PURPLE = colors.HexColor("#F3E5F5")
TEAL         = colors.HexColor("#00695C")
LIGHT_TEAL   = colors.HexColor("#E0F2F1")
ORANGE       = colors.HexColor("#E65100")
LIGHT_ORANGE = colors.HexColor("#FFF3E0")
GRAY         = colors.HexColor("#546E7A")
LIGHT_GRAY   = colors.HexColor("#ECEFF1")
WHITE        = colors.white
BLACK        = colors.black

PAGE_W, PAGE_H = A4

# ── Styles ──────────────────────────────────────────────────────
def S(name, **kw):
    return ParagraphStyle(name, **kw)

BODY   = S("Body",  fontSize=10, textColor=colors.HexColor("#212121"),
           fontName="Helvetica", leading=15, spaceBefore=3, spaceAfter=3, alignment=TA_JUSTIFY)
BULLET = S("Bullet",fontSize=10, textColor=colors.HexColor("#212121"),
           fontName="Helvetica", leading=14, leftIndent=16, spaceBefore=2, spaceAfter=2)

# ── Reusable Flowable helpers ────────────────────────────────────
class ChapterBanner(Flowable):
    def __init__(self, num, title, color=DARK_BLUE):
        Flowable.__init__(self)
        self.num = num; self.title = title; self.color = color
    def wrap(self, aW, aH):
        self.width = aW; self.height = 52; return aW, 52
    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.color)
        c.roundRect(0, 0, self.width, self.height, 6, fill=1, stroke=0)
        c.setFillColor(ACCENT)
        c.circle(30, self.height/2, 18, fill=1, stroke=0)
        c.setFillColor(WHITE)
        c.setFont("Helvetica-Bold", 14)
        c.drawCentredString(30, self.height/2 - 5, str(self.num))
        c.setFont("Helvetica-Bold", 17)
        c.drawString(58, self.height/2 - 7, self.title)
        c.restoreState()

class SectionLabel(Flowable):
    def __init__(self, text, color=MID_BLUE):
        Flowable.__init__(self)
        self.text = text; self.color = color
    def wrap(self, aW, aH):
        self.width = aW; self.height = 28; return aW, 28
    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.color)
        c.rect(0, 4, 4, self.height-8, fill=1, stroke=0)
        c.setFont("Helvetica-Bold", 13)
        c.drawString(12, 8, self.text)
        c.restoreState()

class ColorBox(Flowable):
    def __init__(self, text, bg=LIGHT_BLUE, border=MID_BLUE,
                 text_color=DARK_BLUE, font="Helvetica", font_size=9.5,
                 padding=8, radius=5, width=None):
        Flowable.__init__(self)
        self.text=text; self.bg=bg; self.border=border
        self.text_color=text_color; self.font=font
        self.font_size=font_size; self.padding=padding
        self.radius=radius; self._width=width
    def wrap(self, aW, aH):
        self.width = self._width or aW
        cpw = max(1, int((self.width-2*self.padding)/(self.font_size*0.55)))
        lines = max(1, math.ceil(len(self.text)/cpw))
        self.height = lines*(self.font_size+5)+2*self.padding
        return self.width, self.height
    def draw(self):
        c = self.canv
        c.saveState()
        c.setFillColor(self.bg); c.setStrokeColor(self.border); c.setLineWidth(1)
        c.roundRect(0,0,self.width,self.height,self.radius,fill=1,stroke=1)
        c.setFillColor(self.text_color); c.setFont(self.font, self.font_size)
        max_w = self.width-2*self.padding
        words=self.text.split(); lines2=[]; cur=""
        for w in words:
            test=(cur+" "+w).strip()
            if c.stringWidth(test,self.font,self.font_size)<=max_w: cur=test
            else:
                if cur: lines2.append(cur)
                cur=w
        if cur: lines2.append(cur)
        lh=self.font_size+5
        y=self.height-self.padding-self.font_size
        for ln in lines2:
            c.drawCentredString(self.width/2, y, ln); y-=lh
        c.restoreState()

def styled_table(data, col_widths, header_color=DARK_BLUE, alt_color=LIGHT_BLUE):
    ts = TableStyle([
        ("BACKGROUND",    (0,0),(-1,0), header_color),
        ("TEXTCOLOR",     (0,0),(-1,0), WHITE),
        ("FONTNAME",      (0,0),(-1,0), "Helvetica-Bold"),
        ("FONTSIZE",      (0,0),(-1,0), 9),
        ("ALIGN",         (0,0),(-1,0), "CENTER"),
        ("BOTTOMPADDING", (0,0),(-1,0), 7),
        ("TOPPADDING",    (0,0),(-1,0), 7),
        ("FONTNAME",      (0,1),(-1,-1),"Helvetica"),
        ("FONTSIZE",      (0,1),(-1,-1), 9),
        ("TOPPADDING",    (0,1),(-1,-1), 5),
        ("BOTTOMPADDING", (0,1),(-1,-1), 5),
        ("GRID",          (0,0),(-1,-1), 0.5, colors.HexColor("#B0BEC5")),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, alt_color]),
        ("VALIGN",        (0,0),(-1,-1), "MIDDLE"),
        ("ALIGN",         (0,1),(-1,-1), "CENTER"),
    ])
    t = Table(data, colWidths=col_widths)
    t.setStyle(ts)
    return t

def on_page(canvas, doc):
    canvas.saveState()
    canvas.setFillColor(TEAL)
    canvas.rect(0, PAGE_H-28, PAGE_W, 28, fill=1, stroke=0)
    canvas.setFillColor(WHITE); canvas.setFont("Helvetica-Bold",9)
    canvas.drawString(20, PAGE_H-18,
        "BUSINESS COMMUNICATION  |  MMBA22L02  |  MBA Sem I  |  Dr. MGR University")
    canvas.setFont("Helvetica",8)
    canvas.drawRightString(PAGE_W-20, PAGE_H-18, f"Page {doc.page}")
    canvas.setFillColor(ACCENT)
    canvas.rect(0,0,PAGE_W,18,fill=1,stroke=0)
    canvas.setFillColor(WHITE); canvas.setFont("Helvetica",7.5)
    canvas.drawCentredString(PAGE_W/2, 5,
        "Study Smart  β€’  Exam: 22 August 2026  β€’  You Can Do It!")
    canvas.restoreState()

# ═══════════════════════════════════════════════════════════════
#  DIAGRAMS
# ═══════════════════════════════════════════════════════════════

def communication_process_diagram():
    """Sender β†’ Encoding β†’ Channel β†’ Decoding β†’ Receiver, with Feedback loop."""
    d = Drawing(460, 170)
    d.add(String(230,162,"THE COMMUNICATION PROCESS",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    boxes = [
        (10,  80, 70, 48, TEAL,   WHITE, "SENDER",    "You (the\nspeaker/writer)"),
        (95,  80, 70, 48, PURPLE, WHITE, "ENCODING",  "Putting idea\ninto words"),
        (180, 80, 70, 48, MID_BLUE,WHITE,"CHANNEL",   "Email/Phone/\nMeeting"),
        (265, 80, 70, 48, ORANGE, WHITE, "DECODING",  "Receiver\ninterprets"),
        (350, 80, 70, 48, GREEN,  WHITE, "RECEIVER",  "Audience\n(listener/reader)"),
    ]
    for x,y,w,h,bc,tc,title,sub in boxes:
        d.add(Rect(x,y,w,h,rx=5,ry=5,fillColor=bc,strokeColor=bc,strokeWidth=0))
        d.add(String(x+w/2,y+h-13,title,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="middle",fillColor=tc))
        for i,ln in enumerate(sub.split("\n")):
            d.add(String(x+w/2,y+h-28-(i*13),ln,fontSize=7.5,fontName="Helvetica",
                         textAnchor="middle",fillColor=tc))

    # Forward arrows
    for ax in [80,165,250,335]:
        d.add(Line(ax,104,ax+15,104,strokeColor=GRAY,strokeWidth=2))
        d.add(String(ax+10,106,"β–Ά",fontSize=9,fontName="Helvetica",
                     textAnchor="middle",fillColor=GRAY))

    # Noise box
    d.add(Rect(175,38,80,28,rx=4,ry=4,fillColor=LIGHT_RED,strokeColor=RED,strokeWidth=1.5))
    d.add(String(215,54,"NOISE / BARRIERS",fontSize=8,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=RED))
    d.add(String(215,42,"(distorts the message)",fontSize=7,fontName="Helvetica",
                 textAnchor="middle",fillColor=RED))
    d.add(Line(215,66,215,80,strokeColor=RED,strokeWidth=1,strokeDashArray=[2,2]))

    # Feedback arrow (curved as straight bottom arrow)
    d.add(Line(385,78,385,20,strokeColor=TEAL,strokeWidth=2))
    d.add(Line(385,20,45,20,strokeColor=TEAL,strokeWidth=2))
    d.add(Line(45,20,45,78,strokeColor=TEAL,strokeWidth=2))
    d.add(String(215,10,"β—€  FEEDBACK  β—€",fontSize=9,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=TEAL))

    return d


def types_of_communication_diagram():
    """Verbal / Non-Verbal / Written three branches."""
    d = Drawing(460,200)
    d.add(String(230,192,"TYPES OF BUSINESS COMMUNICATION",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    # Centre circle
    d.add(Circle(230,105,30,fillColor=DARK_BLUE,strokeColor=DARK_BLUE,strokeWidth=0))
    d.add(String(230,118,"BUSINESS",fontSize=8,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))
    d.add(String(230,106,"COMMUNI-",fontSize=8,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))
    d.add(String(230,94,"-CATION",fontSize=8,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))

    branches = [
        (55,  105, TEAL,   "VERBAL",       ["Face-to-face meetings","Phone calls","Presentations","Interviews"]),
        (230, 170, PURPLE, "NON-VERBAL",   ["Body language","Facial expression","Eye contact","Gestures, Posture"]),
        (405, 105, MID_BLUE,"WRITTEN",     ["Emails","Letters","Reports","Memos, Notices"]),
    ]
    for cx,cy,col,title,items in branches:
        # line to centre
        d.add(Line(230,105,cx,cy,strokeColor=col,strokeWidth=1.5))
        # box
        bw,bh = 100,90
        bx,by = cx-bw/2, cy-bh/2
        d.add(Rect(bx,by,bw,bh,rx=5,ry=5,fillColor=col,strokeColor=col,strokeWidth=0))
        d.add(String(cx,by+bh-14,title,fontSize=10,fontName="Helvetica-Bold",
                     textAnchor="middle",fillColor=WHITE))
        for i,item in enumerate(items):
            d.add(String(cx,by+bh-28-(i*13),item,fontSize=7.5,fontName="Helvetica",
                         textAnchor="middle",fillColor=WHITE))
    return d


def formal_informal_diagram():
    """Formal vs Informal channels with direction arrows."""
    d = Drawing(460,200)
    d.add(String(230,193,"FORMAL vs INFORMAL COMMUNICATION",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    # Formal side
    d.add(Rect(10,20,200,160,rx=6,ry=6,fillColor=LIGHT_BLUE,strokeColor=MID_BLUE,strokeWidth=2))
    d.add(Rect(10,158,200,22,rx=4,ry=4,fillColor=MID_BLUE,strokeColor=MID_BLUE,strokeWidth=0))
    d.add(String(110,165,"FORMAL COMMUNICATION",fontSize=9,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))
    rows=[("Downward","Boss β†’ Employee"),("Upward","Employee β†’ Boss"),
          ("Horizontal","Dept A ↔ Dept B"),("Diagonal","Cross-dept levels")]
    for i,(t,e) in enumerate(rows):
        y=142-i*28
        d.add(Rect(18,y-10,184,24,rx=3,ry=3,
                   fillColor=[LIGHT_BLUE,colors.HexColor("#BBDEFB")][i%2],
                   strokeColor=colors.HexColor("#90CAF9"),strokeWidth=0.5))
        d.add(String(30,y+2,t,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="start",fillColor=MID_BLUE))
        d.add(String(110,y+2,e,fontSize=8.5,fontName="Helvetica",
                     textAnchor="start",fillColor=BLACK))

    # Informal side
    d.add(Rect(250,20,200,160,rx=6,ry=6,fillColor=LIGHT_GREEN,strokeColor=GREEN,strokeWidth=2))
    d.add(Rect(250,158,200,22,rx=4,ry=4,fillColor=GREEN,strokeColor=GREEN,strokeWidth=0))
    d.add(String(350,165,"INFORMAL COMMUNICATION",fontSize=9,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))
    infitems=[("Also called","Grapevine"),("Speed","Very fast"),
              ("Accuracy","Not always reliable"),("Control","Cannot be controlled"),
              ("Example","Office gossip / rumours")]
    for i,(lbl,val) in enumerate(infitems):
        y=142-i*24
        d.add(Rect(258,y-8,184,20,rx=3,ry=3,
                   fillColor=[LIGHT_GREEN,colors.HexColor("#C8E6C9")][i%2],
                   strokeColor=colors.HexColor("#A5D6A7"),strokeWidth=0.5))
        d.add(String(268,y+2,lbl+":",fontSize=8.5,fontName="Helvetica-Bold",
                     textAnchor="start",fillColor=GREEN))
        d.add(String(340,y+2,val,fontSize=8.5,fontName="Helvetica",
                     textAnchor="start",fillColor=BLACK))

    # VS
    d.add(String(230,105,"VS",fontSize=16,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=ACCENT))
    return d


def seven_cs_diagram():
    """7 Cs of communication as a flower/circle."""
    d = Drawing(460,240)
    d.add(String(230,232,"THE 7 Cs OF EFFECTIVE COMMUNICATION",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    center = (230,118)
    r_inner = 32
    r_outer = 85
    cs = [
        ("CLEAR",      "Easy to\nunderstand",   MID_BLUE),
        ("CONCISE",    "Short &\nto the point",  GREEN),
        ("CORRECT",    "No errors,\naccurate",   TEAL),
        ("COMPLETE",   "All info\nincluded",     PURPLE),
        ("COURTEOUS",  "Polite &\nrespectful",   ORANGE),
        ("CONCRETE",   "Specific\nfacts given",  RED),
        ("CONSIDERATE","Audience\nin mind",      colors.HexColor("#0277BD")),
    ]
    angles = [90,90+360//7*i for i in range(7)]

    for i,(title,desc,col) in enumerate(cs):
        angle = math.radians(90 + i*(360/7))
        bx = center[0] + r_outer*math.cos(angle)
        by = center[1] + r_outer*math.sin(angle)
        # line from centre
        lx1 = center[0]+r_inner*math.cos(angle)
        ly1 = center[1]+r_inner*math.sin(angle)
        lx2 = bx - 38*math.cos(angle)
        ly2 = by - 38*math.sin(angle)
        d.add(Line(lx1,ly1,lx2,ly2,strokeColor=col,strokeWidth=1.5))
        # petal box
        bw,bh=76,42
        d.add(Rect(bx-bw/2,by-bh/2,bw,bh,rx=5,ry=5,fillColor=col,strokeColor=col,strokeWidth=0))
        d.add(String(bx,by+bh/2-13,title,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="middle",fillColor=WHITE))
        for j,ln in enumerate(desc.split("\n")):
            d.add(String(bx,by+bh/2-25-(j*11),ln,fontSize=7.5,fontName="Helvetica",
                         textAnchor="middle",fillColor=WHITE))

    # Centre circle
    d.add(Circle(center[0],center[1],r_inner,
                 fillColor=DARK_BLUE,strokeColor=DARK_BLUE,strokeWidth=0))
    d.add(String(center[0],center[1]+6,"7 Cs",fontSize=12,fontName="Helvetica-Bold",
                 textAnchor="middle",fillColor=WHITE))
    d.add(String(center[0],center[1]-8,"of Comm.",fontSize=8,fontName="Helvetica",
                 textAnchor="middle",fillColor=LIGHT_BLUE))
    return d


def barriers_diagram():
    """Barriers to communication β€” 4 quadrants."""
    d = Drawing(460,210)
    d.add(String(230,202,"BARRIERS TO COMMUNICATION",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    quads = [
        (10,  110, MID_BLUE,  LIGHT_BLUE,  "PHYSICAL BARRIERS",
         ["Noise in background","Poor network","Distance","Bad handwriting"]),
        (240, 110, PURPLE,    LIGHT_PURPLE,"PSYCHOLOGICAL BARRIERS",
         ["Fear / anxiety","Emotions","Poor listening","Preconceived notions"]),
        (10,  10,  GREEN,     LIGHT_GREEN, "LANGUAGE BARRIERS",
         ["Jargon / technical words","Different language","Ambiguous words","Poor vocabulary"]),
        (240, 10,  ORANGE,    LIGHT_ORANGE,"ORGANISATIONAL BARRIERS",
         ["Information overload","Strict hierarchy","Poor feedback system","Too many levels"]),
    ]
    for x,y,bc,bg,title,items in quads:
        d.add(Rect(x,y,210,88,rx=5,ry=5,fillColor=bg,strokeColor=bc,strokeWidth=2))
        d.add(Rect(x,y+68,210,20,rx=4,ry=4,fillColor=bc,strokeColor=bc,strokeWidth=0))
        d.add(String(x+105,y+75,title,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="middle",fillColor=WHITE))
        for i,item in enumerate(items):
            d.add(String(x+12,y+54-(i*14),"β€’ "+item,fontSize=8.5,fontName="Helvetica",
                         textAnchor="start",fillColor=BLACK))
    return d


def listening_types_diagram():
    """Levels of listening β€” pyramid style."""
    d = Drawing(460,200)
    d.add(String(230,192,"LEVELS OF LISTENING",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    levels = [
        (180,20,100,28,  RED,    "APPRECIATIVE",   "Listen for pleasure (music)"),
        (155,52,150,28,  ORANGE, "EMPATHETIC",      "Listen to understand feelings"),
        (130,84,200,28,  YELLOW, "COMPREHENSIVE",   "Listen to understand info"),
        (105,116,250,28, GREEN,  "CRITICAL",        "Listen to evaluate & judge"),
        (80, 148,300,28, TEAL,   "DISCRIMINATIVE",  "Listen to distinguish sounds"),
    ]
    for x,y,w,h,col,lbl,desc in levels:
        d.add(Rect(x,y,w,h,rx=3,ry=3,fillColor=col,strokeColor=col,strokeWidth=0))
        d.add(String(x+w/2,y+h-14,lbl,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="middle",fillColor=WHITE))
        d.add(String(x+w/2,y+4,desc,fontSize=7.5,fontName="Helvetica",
                     textAnchor="middle",fillColor=WHITE))

    d.add(String(230,5,"Bottom = Basic | Top = Advanced listening",
                 fontSize=8,fontName="Helvetica",textAnchor="middle",fillColor=GRAY))
    return d


def report_structure_diagram():
    """Report writing structure flowchart."""
    d = Drawing(460,220)
    d.add(String(230,212,"STRUCTURE OF A BUSINESS REPORT",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    parts = [
        (MID_BLUE,  "1. TITLE PAGE",          "Title, Author, Date, Organisation"),
        (TEAL,      "2. EXECUTIVE SUMMARY",   "Brief overview of entire report (1 page)"),
        (GREEN,     "3. TABLE OF CONTENTS",   "List of sections with page numbers"),
        (PURPLE,    "4. INTRODUCTION",        "Background, purpose, scope of report"),
        (ORANGE,    "5. MAIN BODY",           "Findings, analysis, data, discussion"),
        (RED,       "6. CONCLUSIONS",         "Summary of key findings"),
        (GRAY,      "7. RECOMMENDATIONS",     "Suggested action steps"),
        (DARK_BLUE, "8. APPENDICES",          "Supporting data, charts, references"),
    ]
    bh = 22
    for i,(col,title,desc) in enumerate(parts):
        y = 185-i*24
        d.add(Rect(10,y,440,bh,rx=3,ry=3,fillColor=col,strokeColor=col,strokeWidth=0))
        d.add(String(15,y+7,title,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="start",fillColor=WHITE))
        d.add(String(200,y+7,desc,fontSize=8.5,fontName="Helvetica",
                     textAnchor="start",fillColor=WHITE))
        if i<len(parts)-1:
            d.add(String(230,y-4,"β–Ό",fontSize=8,fontName="Helvetica",
                         textAnchor="middle",fillColor=GRAY))
    return d


def letter_types_diagram():
    """Business letter parts diagram."""
    d = Drawing(460,210)
    d.add(String(230,202,"PARTS OF A FORMAL BUSINESS LETTER",fontSize=12,
                 fontName="Helvetica-Bold",textAnchor="middle",fillColor=DARK_BLUE))

    parts = [
        (MID_BLUE,  "1. Heading / Letterhead",  "Company name, address, logo, phone"),
        (TEAL,      "2. Date",                  "Date of writing: 22 August 2026"),
        (GREEN,     "3. Inside Address",        "Recipient's name, title, address"),
        (PURPLE,    "4. Subject Line",          "Re: Job Application for Manager Post"),
        (ORANGE,    "5. Salutation",            "Dear Sir/Madam, Dear Mr. Ravi"),
        (colors.HexColor("#37474F"), "6. Body",  "Opening para, Main content, Closing para"),
        (RED,       "7. Complimentary Close",   "Yours faithfully / Yours sincerely"),
        (DARK_BLUE, "8. Signature",             "Name, designation, organisation"),
    ]
    bh = 20
    for i,(col,title,desc) in enumerate(parts):
        y = 180-i*22
        d.add(Rect(10,y,440,bh,rx=3,ry=3,fillColor=col,strokeColor=col,strokeWidth=0))
        d.add(String(15,y+6,title,fontSize=9,fontName="Helvetica-Bold",
                     textAnchor="start",fillColor=WHITE))
        d.add(String(210,y+6,desc,fontSize=8.5,fontName="Helvetica",
                     textAnchor="start",fillColor=WHITE))
    d.add(String(230,4,"Tip: Yours faithfully = when name unknown | Yours sincerely = when name known",
                 fontSize=8,fontName="Helvetica-Bold",textAnchor="middle",fillColor=MID_BLUE))
    return d


# ═══════════════════════════════════════════════════════════════
#  COVER PAGE
# ═══════════════════════════════════════════════════════════════
class CoverPage(Flowable):
    def wrap(self, aW, aH): self.width=aW; self.height=aH; return aW, aH
    def draw(self):
        c=self.canv; W=self.width; H=self.height
        c.saveState()
        c.setFillColor(TEAL); c.rect(0,0,W,H,fill=1,stroke=0)
        c.setFillColor(colors.HexColor("#004D40"))
        c.circle(W*0.85,H*0.8,130,fill=1,stroke=0)
        c.setFillColor(colors.HexColor("#00695C"))
        c.circle(W*0.12,H*0.18,90,fill=1,stroke=0)
        c.setFillColor(ACCENT)
        c.rect(0,H*0.44,W,7,fill=1,stroke=0)
        # Uni
        c.setFillColor(colors.HexColor("#E0F2F1")); c.setFont("Helvetica",11)
        c.drawCentredString(W/2,H*0.83,"Dr. M.G.R. Educational and Research Institute")
        c.drawCentredString(W/2,H*0.79,"MBA (Online)  β€’  I Semester  β€’  Batch 2026 A")
        # Badge
        c.setFillColor(ACCENT); c.roundRect(W/2-55,H*0.70,110,28,6,fill=1,stroke=0)
        c.setFillColor(WHITE); c.setFont("Helvetica-Bold",12)
        c.drawCentredString(W/2,H*0.703,"MMBA22L02")
        # Title
        c.setFillColor(WHITE); c.setFont("Helvetica-Bold",30)
        c.drawCentredString(W/2,H*0.57,"BUSINESS")
        c.setFont("Helvetica-Bold",26)
        c.drawCentredString(W/2,H*0.51,"COMMUNICATION")
        c.setFillColor(colors.HexColor("#E0F2F1")); c.setFont("Helvetica",13)
        c.drawCentredString(W/2,H*0.43,"Comprehensive Study Guide with Diagrams & Real-Life Examples")
        # Exam box
        c.setFillColor(colors.HexColor("#004D40"))
        c.roundRect(W/2-130,H*0.28,260,70,8,fill=1,stroke=0)
        c.setFillColor(ACCENT); c.setFont("Helvetica-Bold",11)
        c.drawCentredString(W/2,H*0.36,"EXAM DATE: 22 AUGUST 2026")
        c.setFillColor(WHITE); c.setFont("Helvetica",10)
        c.drawCentredString(W/2,H*0.33,"Session: FN/AN  β€’  10:00 AM – 5:00 PM")
        c.drawCentredString(W/2,H*0.30,"Topics Covered: All 10 Key Chapters")
        # Bottom
        c.setFillColor(colors.HexColor("#E0F2F1")); c.setFont("Helvetica",9)
        c.drawCentredString(W/2,H*0.06,"Communicate Clearly β€’ Write Correctly β€’ Score High!")
        c.restoreState()


# ═══════════════════════════════════════════════════════════════
#  BUILD PDF
# ═══════════════════════════════════════════════════════════════
def build():
    path = "/tmp/workspace/accounting-study-guide/Business_Communication_Study_Guide.pdf"
    doc = SimpleDocTemplate(path, pagesize=A4,
                            leftMargin=1.5*cm, rightMargin=1.5*cm,
                            topMargin=1.8*cm,  bottomMargin=1.5*cm,
                            title="Business Communication Study Guide",
                            author="Dr. MGR University MBA")
    story = []
    W = PAGE_W - 3*cm

    # ── COVER ────────────────────────────────────────────────────
    story.append(CoverPage())
    story.append(PageBreak())

    # ── TOC ─────────────────────────────────────────────────────
    story.append(SectionLabel("TABLE OF CONTENTS", DARK_BLUE))
    story.append(Spacer(1,6))
    toc = [
        ["#","Topic","Exam Weight"],
        ["1","Meaning, Nature & Importance of Communication","β˜…β˜…β˜…β˜…β˜†"],
        ["2","The Communication Process & Models","β˜…β˜…β˜…β˜…β˜…"],
        ["3","Types of Communication","β˜…β˜…β˜…β˜…β˜…"],
        ["4","The 7 Cs of Effective Communication","β˜…β˜…β˜…β˜…β˜…"],
        ["5","Barriers to Communication & How to Overcome","β˜…β˜…β˜…β˜…β˜…"],
        ["6","Listening Skills","β˜…β˜…β˜…β˜…β˜†"],
        ["7","Written Communication – Letters & Memos","β˜…β˜…β˜…β˜…β˜…"],
        ["8","Report Writing","β˜…β˜…β˜…β˜…β˜†"],
        ["9","Presentation & Interview Skills","β˜…β˜…β˜…β˜†β˜†"],
        ["10","Non-Verbal Communication & Body Language","β˜…β˜…β˜…β˜†β˜†"],
        ["11","Quick Revision – Formulas, Tips & Memory Tricks","β€”"],
    ]
    story.append(styled_table(toc,[0.6*cm,11*cm,3.4*cm],header_color=TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 1 – Meaning, Nature & Importance
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(1,"Meaning, Nature & Importance",DARK_BLUE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("What is Communication?",MID_BLUE))
    story.append(Paragraph(
        "<b>Communication</b> is the process of <b>creating, transmitting, and interpreting</b> "
        "ideas, facts, feelings, and opinions between two or more persons. "
        "The word comes from the Latin word <i>communis</i> meaning 'common' – "
        "to make something common/shared between people.",BODY))
    story.append(ColorBox(
        "πŸ“± Real-Life: You WhatsApp your friend 'Meet me at 5 PM at the canteen.' "
        "You created a message, sent it via WhatsApp (channel), "
        "and your friend understood it. That is communication! "
        "In business it's the same process β€” just more formal.",
        bg=LIGHT_TEAL, border=TEAL, text_color=colors.HexColor("#004D40"), font_size=9))
    story.append(Spacer(1,6))

    story.append(SectionLabel("Nature / Characteristics of Communication",MID_BLUE))
    natures = [
        ["Characteristic","Meaning","Example"],
        ["Two-way process","Both sender and receiver are active","Not just talking β€” also listening"],
        ["Goal-oriented","Always has a purpose","Convince, inform, request"],
        ["Pervasive","Happens everywhere in business","From CEO to peon, all communicate"],
        ["Dynamic","Changes with time and context","Formal email vs casual WhatsApp"],
        ["Symbolic","Uses symbols β€” words, gestures","Thumbs up = approval"],
        ["Continuous","Never stops in organisations","Daily meetings, emails, calls"],
    ]
    story.append(styled_table(natures,[3.5*cm,5*cm,6.5*cm],header_color=DARK_BLUE))
    story.append(Spacer(1,6))

    story.append(SectionLabel("Importance / Functions of Communication",MID_BLUE))
    importance = [
        ["Function","How it Helps Business"],
        ["Information sharing","Employees know what to do and when"],
        ["Decision making","Managers get data to make choices"],
        ["Coordination","Different departments work together"],
        ["Motivation","Managers encourage employees to perform better"],
        ["Control","Rules and policies are communicated to all"],
        ["Building relations","Trust is built through open communication"],
    ]
    story.append(styled_table(importance,[5*cm,10*cm],header_color=TEAL,alt_color=LIGHT_TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 2 – Communication Process & Models
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(2,"The Communication Process & Models",TEAL))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "Communication is not just speaking or writing. It is a <b>step-by-step process</b> "
        "involving multiple elements. Understanding this process helps you communicate effectively.",BODY))
    story.append(Spacer(1,6))
    story.append(communication_process_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Elements of Communication – Explained",MID_BLUE))
    elements = [
        ["Element","Definition","Real-Life Example"],
        ["Sender","The person who creates and sends the message","Manager writing a notice"],
        ["Message","The idea or information being communicated","'Meeting at 10 AM tomorrow'"],
        ["Encoding","Putting the idea into words/symbols/gestures","Writing the email/notice"],
        ["Channel/Medium","The path through which message travels","Email, phone, face-to-face"],
        ["Decoding","Receiver interpreting the message","Employee reading and understanding"],
        ["Receiver","The person who receives the message","Employees reading the notice"],
        ["Feedback","Receiver's response to the message","Employees reply 'noted sir'"],
        ["Noise/Barriers","Anything that distorts the message","Poor network, language gap"],
    ]
    story.append(styled_table(elements,[2.8*cm,4.5*cm,7.7*cm],header_color=TEAL,alt_color=LIGHT_TEAL))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Famous Communication Models",MID_BLUE))
    models = [
        ["Model","Proposed by","Key Idea","Limitation"],
        ["Shannon-Weaver Model","Shannon & Weaver (1948)","Linear: Sender→Channel→Receiver. Introduced concept of 'noise'","One-way, no feedback loop"],
        ["Berlo's SMCR Model","David Berlo (1960)","Source, Message, Channel, Receiver β€” each with sub-factors","No feedback, no noise element"],
        ["Schramm's Model","Wilbur Schramm (1954)","Circular model with feedback. Both parties are sender & receiver","Overlooks barriers"],
        ["Transactional Model","Barnlund (1970)","Both parties send & receive simultaneously; dynamic","Complex to apply"],
    ]
    story.append(styled_table(models,[3*cm,3.5*cm,5.5*cm,3*cm],
                              header_color=DARK_BLUE,alt_color=LIGHT_BLUE))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 3 – Types of Communication
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(3,"Types of Communication",GREEN))
    story.append(Spacer(1,8))
    story.append(types_of_communication_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Formal vs Informal Communication",MID_BLUE))
    story.append(formal_informal_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Direction of Communication in an Organisation",MID_BLUE))
    direction = [
        ["Direction","Flow","Example","Purpose"],
        ["Downward","Top β†’ Bottom","Manager tells employee about new policy","Instructions, orders, policies"],
        ["Upward","Bottom β†’ Top","Employee submits report to manager","Feedback, suggestions, complaints"],
        ["Horizontal","Same level","Sales Dept communicates with Marketing Dept","Coordination between departments"],
        ["Diagonal","Cross-levels","Senior accounts talks to junior IT dept","Cross-functional projects"],
    ]
    story.append(styled_table(direction,[2.5*cm,3*cm,5*cm,4.5*cm],
                              header_color=GREEN,alt_color=LIGHT_GREEN))
    story.append(Spacer(1,8))

    story.append(ColorBox(
        "πŸ‡ Grapevine (Informal) β€” Like gossip spreading in an office! "
        "It travels fast, goes in all directions, and is not always accurate. "
        "Example: Word spreads about a salary hike before official announcement. "
        "Managers should monitor but cannot fully control grapevine.",
        bg=LIGHT_ORANGE,border=ORANGE,text_color=ORANGE,font_size=9))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 4 – 7 Cs
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(4,"The 7 Cs of Effective Communication",PURPLE))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "The <b>7 Cs</b> are the golden principles of effective business communication. "
        "Any message you write or speak should follow all 7 Cs.",BODY))
    story.append(Spacer(1,6))
    story.append(seven_cs_diagram())
    story.append(Spacer(1,8))

    cs_table = [
        ["C","Principle","Meaning","Bad Example","Good Example"],
        ["1","Clear","One meaning only, easy to understand",
         "Please do the needful","Please submit the report by Friday 5 PM"],
        ["2","Concise","Short and to the point, no filler words",
         "I am writing this letter to inform you that…","Please find attached your invoice."],
        ["3","Correct","Accurate facts, no grammar/spelling errors",
         "The meeting is at 4 AM","The meeting is at 4 PM"],
        ["4","Complete","All necessary information is included",
         "Come to the meeting tomorrow","Meeting on Mon 25 Aug at 10 AM, Room 3"],
        ["5","Courteous","Polite, respectful, positive tone",
         "You forgot to submit the form","Please remember to submit the form by Friday."],
        ["6","Concrete","Specific facts and figures, not vague",
         "Sales improved significantly","Sales grew by 23% this quarter"],
        ["7","Considerate","Think about the reader's needs and viewpoint",
         "Our policy does not allow refunds","We understand your concern. Here are your options…"],
    ]
    story.append(styled_table(cs_table,[0.5*cm,2.5*cm,2.8*cm,4*cm,5.2*cm],
                              header_color=PURPLE,alt_color=LIGHT_PURPLE))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 5 – Barriers
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(5,"Barriers to Communication & Overcoming Them",RED))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "A <b>barrier</b> is anything that <b>prevents or distorts</b> the message from being "
        "understood correctly. Identifying and removing barriers is a key management skill.",BODY))
    story.append(Spacer(1,6))
    story.append(barriers_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("How to Overcome Each Barrier",MID_BLUE))
    overcome = [
        ["Barrier Type","Common Examples","How to Overcome"],
        ["Physical","Noise, distance, bad equipment","Use quiet rooms, good tech, written backup"],
        ["Psychological","Fear, emotion, distrust","Build trust, listen patiently, stay calm"],
        ["Language","Jargon, technical terms, accent","Use simple language, confirm understanding"],
        ["Organisational","Too many hierarchy levels","Open-door policy, use direct channels"],
        ["Semantic","Different meaning for same word",
         "Define terms clearly, check understanding"],
        ["Cultural","Different customs, values","Learn about different cultures, be sensitive"],
    ]
    story.append(styled_table(overcome,[3*cm,4.5*cm,7.5*cm],
                              header_color=RED,alt_color=LIGHT_RED))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 6 – Listening
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(6,"Listening Skills",ORANGE))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "<b>Listening</b> is NOT the same as <b>hearing</b>. "
        "Hearing is physical (sound reaching ears). "
        "Listening is an <b>active mental process</b> of understanding and interpreting what you hear.",BODY))
    story.append(ColorBox(
        "🎧 Real-Life: In class, you can HEAR the professor while daydreaming β€” "
        "but you are not LISTENING. Active listening means focusing, "
        "processing, and responding to the speaker.",
        bg=LIGHT_ORANGE,border=ORANGE,text_color=ORANGE,font_size=9))
    story.append(Spacer(1,8))
    story.append(listening_types_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Hearing vs Listening vs Active Listening",MID_BLUE))
    listen_diff=[
        ["Level","Description","Effort Needed"],
        ["Hearing","Passive reception of sound by ears","Zero β€” automatic"],
        ["Listening","Conscious effort to understand","Medium β€” requires attention"],
        ["Active Listening","Full engagement: understand, reflect, respond","High β€” requires concentration"],
    ]
    story.append(styled_table(listen_diff,[3*cm,7*cm,5*cm],
                              header_color=ORANGE,alt_color=LIGHT_ORANGE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Tips for Better Listening (Exam Favourite!)",MID_BLUE))
    listen_tips=[
        ["Do's of Active Listening","Don'ts of Listening"],
        ["Maintain eye contact with speaker","Do not interrupt the speaker"],
        ["Nod and give verbal cues ('I see', 'yes')","Do not check your phone"],
        ["Ask clarifying questions","Do not assume you know what they'll say"],
        ["Take notes if important","Do not let emotions cloud understanding"],
        ["Paraphrase what you heard to confirm","Do not let environment distract you"],
    ]
    story.append(styled_table(listen_tips,[7*cm,8*cm],
                              header_color=GREEN,alt_color=LIGHT_GREEN))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 7 – Written Communication
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(7,"Written Communication – Letters & Memos",MID_BLUE))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "<b>Written communication</b> is any message transmitted through writing. "
        "It is <b>permanent, precise, and formal</b>. It creates a legal record.",BODY))
    story.append(Spacer(1,6))

    story.append(SectionLabel("Parts of a Formal Business Letter",MID_BLUE))
    story.append(letter_types_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Types of Business Letters",MID_BLUE))
    letter_types=[
        ["Type of Letter","Purpose","Key Tone"],
        ["Enquiry Letter","Asking for information about products/services","Polite, specific"],
        ["Quotation Letter","Sending price quote to a potential buyer","Professional, detailed"],
        ["Order Letter","Placing an order for goods/services","Clear, precise quantities"],
        ["Complaint Letter","Reporting a problem / grievance","Firm but polite"],
        ["Adjustment Letter","Reply to a complaint","Apologetic, solution-focused"],
        ["Sales Letter","Promoting a product or service","Persuasive, benefit-focused"],
        ["Job Application","Applying for a position","Confident, formal"],
        ["Circular Letter","Informing many people at once","Clear, brief"],
    ]
    story.append(styled_table(letter_types,[4.5*cm,6*cm,4.5*cm],
                              header_color=MID_BLUE,alt_color=LIGHT_BLUE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Memo (Memorandum) – Internal Communication",MID_BLUE))
    story.append(Paragraph(
        "A <b>Memo</b> is an internal written message within the same organisation. "
        "It is shorter and less formal than a business letter.",BODY))
    memo_format=[
        ["Memo Format","Content"],
        ["TO:","Name and designation of recipient"],
        ["FROM:","Name and designation of sender"],
        ["DATE:","Date of writing"],
        ["SUBJECT:","One-line topic of the memo"],
        ["BODY:","Message (short and direct)"],
        ["NOTE:","No salutation (Dear Sir) or complimentary close needed"],
    ]
    story.append(styled_table(memo_format,[3*cm,12*cm],
                              header_color=TEAL,alt_color=LIGHT_TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 8 – Report Writing
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(8,"Report Writing",TEAL))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "A <b>business report</b> is a formal, structured document that presents "
        "facts, analysis, and recommendations to help management make decisions.",BODY))
    story.append(ColorBox(
        "πŸ“Š Real-Life: Your company's Sales Manager writes a monthly report: "
        "'Sales this month = β‚Ή50L. Target missed by 12%. "
        "Reason: Competition launched discount scheme. "
        "Recommendation: Launch loyalty programme.' "
        "That is a business report!",
        bg=LIGHT_TEAL,border=TEAL,text_color=TEAL,font_size=9))
    story.append(Spacer(1,8))
    story.append(report_structure_diagram())
    story.append(Spacer(1,8))

    story.append(SectionLabel("Types of Reports",MID_BLUE))
    report_types=[
        ["Based On","Type","Example"],
        ["Time period","Periodic Reports","Daily/Weekly/Monthly/Annual sales report"],
        ["Purpose","Informational Report","Just shares facts β€” no recommendation"],
        ["Purpose","Analytical Report","Analyses facts + gives recommendations"],
        ["Formality","Formal Report","Long, structured, with title page"],
        ["Formality","Informal Report","Short memo-style, internal use"],
        ["Function","Progress Report","Update on ongoing project status"],
        ["Function","Feasibility Report","Is this project viable/possible?"],
        ["Function","Investigative Report","Inquiry into a specific incident/problem"],
    ]
    story.append(styled_table(report_types,[3.5*cm,4*cm,7.5*cm],
                              header_color=TEAL,alt_color=LIGHT_TEAL))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 9 – Presentation & Interview Skills
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(9,"Presentation & Interview Skills",PURPLE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Business Presentation – Key Steps",MID_BLUE))
    pres_steps=[
        ["Step","Action","Tip"],
        ["1. Plan","Define purpose, know your audience","Ask: What do they need to know?"],
        ["2. Prepare","Collect data, create slides","Rule of 5: Max 5 bullets per slide"],
        ["3. Practice","Rehearse multiple times","Record yourself and watch it"],
        ["4. Present","Deliver with confidence","Make eye contact, not just screen"],
        ["5. Follow-up","Answer questions, share materials","Send email summary after"],
    ]
    story.append(styled_table(pres_steps,[1.2*cm,3.5*cm,5.5*cm,5*cm],
                              header_color=PURPLE,alt_color=LIGHT_PURPLE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Interview Communication Skills",MID_BLUE))
    inter=[
        ["Aspect","Do This","Avoid This"],
        ["Body language","Sit upright, smile, firm handshake","Slouching, fidgeting, crossing arms"],
        ["Voice","Clear, confident, moderate pace","Too fast, too low, monotone"],
        ["Listening","Wait for full question before answering","Interrupt the interviewer"],
        ["Answers","Use STAR method (Situation, Task, Action, Result)","Vague, one-word answers"],
        ["Dress","Formal and neat attire","Casual, flashy, untidy clothes"],
        ["Preparation","Research company before interview","Go unprepared"],
    ]
    story.append(styled_table(inter,[3*cm,5.5*cm,6.5*cm],
                              header_color=PURPLE,alt_color=LIGHT_PURPLE))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 10 – Non-Verbal Communication
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(10,"Non-Verbal Communication & Body Language",ORANGE))
    story.append(Spacer(1,8))
    story.append(Paragraph(
        "<b>Non-verbal communication</b> refers to all messages sent <b>without using words</b>. "
        "Research shows that <b>55% of communication is body language</b>, "
        "38% is tone of voice, and only <b>7% is the actual words</b> (Mehrabian's 7-38-55 rule).",BODY))
    story.append(ColorBox(
        "🀝 Real-Life: Your boss says 'Great job!' but with crossed arms, no eye contact, "
        "and a flat tone β€” you sense sarcasm. Why? Because non-verbal signals contradicted the words! "
        "Non-verbal always wins when there is a conflict.",
        bg=LIGHT_ORANGE,border=ORANGE,text_color=ORANGE,font_size=9))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Types of Non-Verbal Communication",MID_BLUE))
    nvtypes=[
        ["Type","What it Includes","Business Example"],
        ["Kinesics (Body Language)","Gestures, posture, facial expression, eye contact",
         "Nodding = agreement | Eye contact = confidence"],
        ["Proxemics (Space)","Physical distance between people",
         "Standing close = intimate; formal meeting = distance"],
        ["Paralanguage","Tone, pitch, speed, volume of voice",
         "Slow voice = boredom; energetic = enthusiasm"],
        ["Haptics (Touch)","Handshake, pat on back",
         "Firm handshake = confidence"],
        ["Chronemics (Time)","Being on time or late",
         "Arriving early = respect; late = disrespect"],
        ["Appearance","Dress, grooming, accessories",
         "Formal dress = professionalism"],
        ["Oculesics (Eye)","Eye contact, eye movement",
         "Too much staring = aggression; avoiding = dishonesty"],
    ]
    story.append(styled_table(nvtypes,[3*cm,5*cm,7*cm],
                              header_color=ORANGE,alt_color=LIGHT_ORANGE))
    story.append(Spacer(1,8))

    story.append(ColorBox(
        "πŸ“Š Mehrabian's 7-38-55 Rule: "
        "7% = Words (what you say). "
        "38% = Paralanguage (how you say it β€” tone, volume, pitch). "
        "55% = Body language (facial expression, posture, gestures). "
        "Conclusion: HOW you say something matters more than WHAT you say!",
        bg=LIGHT_PURPLE,border=PURPLE,
        text_color=colors.HexColor("#4A148C"),font_size=9))
    story.append(PageBreak())

    # ════════════════════════════════════════════════════════════
    # CH 11 – Quick Revision
    # ════════════════════════════════════════════════════════════
    story.append(ChapterBanner(11,"Quick Revision – Summary, Tips & Memory Tricks",ACCENT))
    story.append(Spacer(1,8))

    story.append(SectionLabel("One-Page Master Summary",MID_BLUE))
    summary=[
        ["Topic","Key Point to Remember"],
        ["Communication Definition","Creating, transmitting & interpreting ideas between people"],
        ["Elements","Sender→Encoding→Channel→Decoding→Receiver+Feedback+Noise"],
        ["Types","Verbal, Non-verbal, Written | Formal vs Informal"],
        ["7 Cs","Clear, Concise, Correct, Complete, Courteous, Concrete, Considerate"],
        ["Barriers","Physical, Psychological, Language, Organisational, Semantic, Cultural"],
        ["Listening","Hearing β‰  Listening. Active listening = Highest level"],
        ["Business Letter","8 parts: Heading→Date→Address→Subject→Salutation→Body→Close→Sign"],
        ["Memo","Internal only. No salutation or complimentary close needed."],
        ["Report Types","Periodic, Formal/Informal, Analytical, Feasibility, Progress"],
        ["Non-verbal rule","7% words + 38% tone + 55% body = Mehrabian's rule"],
        ["Grapevine","Informal, fast, uncontrolled, not always accurate"],
        ["Downward Comm","Boss→Employee: Instructions, policies, orders"],
        ["Upward Comm","Employee→Boss: Reports, feedback, suggestions"],
    ]
    story.append(styled_table(summary,[5*cm,10*cm],
                              header_color=DARK_BLUE,alt_color=LIGHT_BLUE))
    story.append(Spacer(1,8))

    story.append(SectionLabel("Memory Tricks (Mnemonics)",MID_BLUE))
    mem=[
        "πŸ’‘ 7 Cs Trick: 'Can Clever Cats Create Cool, Courteous Content?' = Clear, Concise, Correct, Complete, Considerate, Courteous, Concrete",
        "πŸ’‘ Communication Elements: 'Silly Elephants Can Dance Really Fast Now' = Sender, Encoding, Channel, Decoding, Receiver, Feedback, Noise",
        "πŸ’‘ Letter Parts: 'Healthy Dogs Are Seen By Coaches Sitting Silently' = Heading, Date, Address, Subject, Body, Complimentary close, Signature",
        "πŸ’‘ Barriers: 'People Like Sports On Sundays' = Physical, Language, Semantic, Organisational, Psychological + Cultural",
        "πŸ’‘ Mehrabian = 7-38-55: 'Small Medium Large' β†’ Words(7%) Tone(38%) Body(55%)",
        "πŸ’‘ Formal directions: 'Down the ladder, Up the report, Across the floor' = Downward orders, Upward feedback, Horizontal coordination",
    ]
    for m in mem:
        story.append(ColorBox(m,bg=LIGHT_PURPLE,border=PURPLE,
                              text_color=colors.HexColor("#4A148C"),font_size=9))
        story.append(Spacer(1,3))

    story.append(Spacer(1,8))
    story.append(SectionLabel("Top 10 Exam Tips",MID_BLUE))
    tips=[
        ["#","Exam Tip"],
        ["1","Always define the term before explaining it β€” 2 marks guaranteed!"],
        ["2","7 Cs question: Write all 7 with a one-line example for each."],
        ["3","For letter writing: Follow all 8 parts. Examiner checks format!"],
        ["4","Barriers question: Name 4 types with 2 examples each."],
        ["5","Difference questions (Formal vs Informal, Memo vs Letter): Use a table format."],
        ["6","Mehrabian's 7-38-55 rule is a high-scoring fact β€” always mention it."],
        ["7","For Shannon-Weaver model, draw the diagram β€” gets extra marks."],
        ["8","Non-verbal types: Remember Kinesics, Proxemics, Paralanguage, Haptics."],
        ["9","Report writing question: Always mention all 8 parts in order."],
        ["10","Show both sides for any comparison β€” examiners love balanced answers!"],
    ]
    story.append(styled_table(tips,[1*cm,14*cm],header_color=DARK_BLUE))
    story.append(Spacer(1,10))

    # Good luck banner
    class GoodLuck(Flowable):
        def wrap(self,aW,aH): self.width=aW; self.height=80; return aW,80
        def draw(self):
            c=self.canv; W=self.width
            c.saveState()
            c.setFillColor(TEAL); c.roundRect(0,0,W,80,8,fill=1,stroke=0)
            c.setFillColor(ACCENT); c.setFont("Helvetica-Bold",16)
            c.drawCentredString(W/2,52,"EXAM: 22 AUGUST 2026   |   FN/AN Sessions")
            c.setFillColor(WHITE); c.setFont("Helvetica-Bold",13)
            c.drawCentredString(W/2,32,"Communicate your knowledge clearly β€” just like the 7 Cs!")
            c.setFillColor(colors.HexColor("#E0F2F1")); c.setFont("Helvetica",11)
            c.drawCentredString(W/2,14,"Best of Luck! – Dr. MGR University MBA 2026 Batch")
            c.restoreState()

    story.append(GoodLuck())

    doc.build(story, onFirstPage=on_page, onLaterPages=on_page)
    print(f"PDF ready: {path}")

build()
Running Command

cd /tmp/workspace/accounting-study-guide && python create_biz_comm.py 2>&1

Editing File

~/accounting-study-guide/create_biz_comm.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/accounting-study-guide/create_biz_comm.py'
Running Command

cd /tmp/workspace/accounting-study-guide && python create_biz_comm.py 2>&1

Running Command

ls -lh /tmp/workspace/accounting-study-guide/*.pdf

Your Business Communication study guide PDF is ready! πŸŽ‰

πŸ“₯ Download Your Study Guide

Business Communication Study Guide

PDF Document Β· PDF


πŸ“‹ What's Inside (11 Chapters with Diagrams)

#ChapterKey Diagram
1Meaning, Nature & ImportanceCharacteristics table
2Communication Process & ModelsFull process flow (Sender→Feedback loop)
3Types of Communication3-branch verbal/non-verbal/written diagram
47 Cs of Effective Communication7-petal circular diagram
5Barriers & How to Overcome4-quadrant barriers diagram
6Listening SkillsPyramid levels of listening
7Written Comm - Letters & Memos8-part letter structure
8Report Writing8-step report flow chart
9Presentation & Interview SkillsSTAR method table
10Non-Verbal & Body LanguageMehrabian's 7-38-55 Rule
11Quick Revision + Memory TricksMaster summary + Top 10 exam tips

πŸ“… Your Study Plan So Far

PaperExam DateStudy Guide
βœ… Basic Accounting16 Aug 2026Done
βœ… Business Communication22 Aug 2026Done
⏳ Managerial Economics23 Aug 2026Next?
Want me to do Paper 3 - Managerial Economics (exam the very next day, 23 Aug)? Just say yes! πŸŽ“
This is a shared conversation. Sign in to Orris to start your own chat.