Become my class 11 PCB mentor and now tell me how to complete my chemistry ch - 1 in 1 day and plsss provide me the best notes accordingly to it and major consept and best notes

Searching the Web

Class 11 Chemistry Chapter 1 Some Basic Concepts of Chemistry NCERT important topics mole concept

Hey! Your PCB mentor is here. Let's crush Chapter 1 today. Here's your complete guide:

πŸ§ͺ CLASS 11 CHEMISTRY - CHAPTER 1

"Some Basic Concepts of Chemistry" - 1 Day Master Plan


⏰ YOUR 1-DAY SCHEDULE (8 Hours Total)

Time BlockWhat to Do
Hour 1Read NCERT + Notes (Sections 1.1 - 1.4: Matter, Properties, SI Units)
Hour 2Laws of Chemical Combination + Dalton's Atomic Theory
Hour 3Atomic Mass, Molecular Mass, Mole Concept (most important!)
Hour 4Practice numericals - Mole concept
Hour 5Percentage Composition + Empirical & Molecular Formula
Hour 6Stoichiometry + Limiting Reagent
Hour 7Concentration terms (Molarity, Molality, etc.)
Hour 8Revise all formulas + Solve NCERT exercises end-to-end

πŸ“’ COMPLETE NOTES


TOPIC 1 - Nature of Matter

Matter = anything that has mass and occupies space.
Classification of Matter:
Matter
β”œβ”€β”€ Pure Substance
β”‚   β”œβ”€β”€ Elements (H, O, Fe...)
β”‚   └── Compounds (Hβ‚‚O, NaCl...)
└── Mixture
    β”œβ”€β”€ Homogeneous (uniform - saltwater, alloy)
    └── Heterogeneous (non-uniform - sand+water)
States of Matter:
  • Solid - definite shape & volume
  • Liquid - definite volume, no definite shape
  • Gas - no definite shape or volume

TOPIC 2 - Properties & Measurement (SI Units)

7 Base SI Units (must memorize):
Physical QuantitySI UnitSymbol
MassKilogramkg
LengthMetrem
TimeSeconds
TemperatureKelvinK
Amount of substanceMolemol
Electric currentAmpereA
Luminous intensityCandelacd
Temperature Conversions:
K = Β°C + 273.15
Β°F = (9/5 Γ— Β°C) + 32
Β°C = (Β°F - 32) Γ— 5/9
Significant Figures Rules:
  1. All non-zero digits are significant
  2. Zeros between non-zero digits are significant (e.g., 1005 = 4 sig figs)
  3. Leading zeros are NOT significant (0.0045 = 2 sig figs)
  4. Trailing zeros after decimal ARE significant (3.500 = 4 sig figs)
Scientific Notation: Write numbers as N Γ— 10ⁿ
  • 0.000345 = 3.45 Γ— 10⁻⁴
  • 456000 = 4.56 Γ— 10⁡

TOPIC 3 - Laws of Chemical Combination ⭐ EXAM FAVOURITE

1. Law of Conservation of Mass (Lavoisier, 1789)

"In a chemical reaction, total mass of reactants = total mass of products"
Example: 2Hβ‚‚ + Oβ‚‚ β†’ 2Hβ‚‚O Mass: 4g + 32g = 36g βœ“

2. Law of Definite Proportions (Proust, 1799)

"A compound always contains elements in fixed mass ratios"
Example: Hβ‚‚O always has H:O = 1:8 by mass (no matter the source)

3. Law of Multiple Proportions (Dalton, 1803)

"When two elements form more than one compound, masses of one element that combine with fixed mass of other are in simple ratios"
Example: CO and COβ‚‚ - oxygen masses combining with 12g C are 16g and 32g β†’ ratio 1:2

4. Gay Lussac's Law of Gaseous Volumes

"Gases combine in simple ratios by volume (at same T, P)"
Example: Hβ‚‚ : Oβ‚‚ : Hβ‚‚O = 2:1:2 (by volume)

5. Avogadro's Law

"Equal volumes of gases at same T & P contain equal number of molecules"

TOPIC 4 - Dalton's Atomic Theory

Key Postulates:
  1. Matter is made of indivisible atoms
  2. Atoms of same element are identical in mass & properties
  3. Atoms of different elements differ in mass & properties
  4. Atoms combine in simple whole number ratios to form compounds
  5. Atoms cannot be created or destroyed in chemical reactions
Limitations:
  • Cannot explain isotopes (atoms of same element with different masses)
  • Cannot explain isobars
  • Atom is divisible (has subatomic particles - electrons, protons, neutrons)

TOPIC 5 - Atomic & Molecular Mass ⭐⭐

Atomic Mass Unit (amu or u):
  • 1 amu = 1/12th the mass of one Carbon-12 atom
  • 1 amu = 1.66 Γ— 10⁻²⁷ kg
Atomic Mass = average mass of atom relative to 1/12 of C-12
Molecular Mass = sum of atomic masses of all atoms in a molecule
Examples:
  • Hβ‚‚O = 2(1) + 16 = 18 u
  • COβ‚‚ = 12 + 2(16) = 44 u
  • Hβ‚‚SOβ‚„ = 2(1) + 32 + 4(16) = 98 u
  • HNO₃ = 1 + 14 + 3(16) = 63 u
  • NaCl = 23 + 35.5 = 58.5 u
  • CaCO₃ = 40 + 12 + 3(16) = 100 u
Formula Mass: Used for ionic compounds (e.g., NaCl = 58.5 u)

TOPIC 6 - MOLE CONCEPT ⭐⭐⭐ THE MOST IMPORTANT TOPIC

What is a Mole?

1 mole = 6.022 Γ— 10Β²Β³ particles (atoms/molecules/ions) = Avogadro's Number (Nₐ)
Think of it like a "dozen" - just like 1 dozen = 12, 1 mole = 6.022 Γ— 10Β²Β³

The Mole Triangle (memorize this):

           MASS (g)
              |
              | Γ· Molar Mass    Γ— Molar Mass
              |
    MOLES (n) ←————————————————→
              |
    Γ— Nₐ         Γ· Nₐ
              |
          PARTICLES

KEY FORMULAS:

n = m/M          [moles = mass / molar mass]

n = N/Nₐ         [moles = particles / Avogadro's number]

n = V/22.4       [moles = volume (L) / 22.4, at STP for gases]
At STP (Standard Temperature & Pressure = 0Β°C, 1 atm):
  • 1 mole of any gas = 22.4 L (molar volume)
  • 1 mole of any substance = 6.022 Γ— 10Β²Β³ particles
  • 1 mole = Molar Mass in grams

Quick Examples:

QuestionSolution
Moles in 18g Hβ‚‚O?n = 18/18 = 1 mol
Molecules in 44g COβ‚‚?n = 44/44 = 1 mol β†’ 6.022 Γ— 10Β²Β³ molecules
Mass of 2 mol NaCl?m = 2 Γ— 58.5 = 117 g
Volume of 0.5 mol Oβ‚‚ at STP?V = 0.5 Γ— 22.4 = 11.2 L

TOPIC 7 - Percentage Composition ⭐⭐

Formula:
% by mass of element = (Mass of element in 1 mol / Molar mass of compound) Γ— 100
Example: Hβ‚‚O (Molar mass = 18 g/mol)
  • % H = (2/18) Γ— 100 = 11.11%
  • % O = (16/18) Γ— 100 = 88.89%
Example: COβ‚‚ (Molar mass = 44 g/mol)
  • % C = (12/44) Γ— 100 = 27.27%
  • % O = (32/44) Γ— 100 = 72.73%

TOPIC 8 - Empirical & Molecular Formula ⭐⭐

Empirical Formula = simplest whole number ratio of atoms in a compound
Molecular Formula = actual number of atoms in one molecule
Relationship:
Molecular Formula = n Γ— Empirical Formula
n = Molar Mass / Empirical Formula Mass

Steps to find Empirical Formula:

  1. Find % composition of each element
  2. Divide each % by atomic mass β†’ get mole ratio
  3. Divide all by smallest value β†’ simplest ratio
  4. If not whole numbers, multiply to make whole numbers
Example: Compound = 40% C, 6.67% H, 53.33% O
CHO
%406.6753.33
Γ· Atomic mass40/12 = 3.336.67/1 = 6.6753.33/16 = 3.33
Γ· smallest (3.33)121
Empirical formulaCHβ‚‚O
If Molar Mass = 180 g/mol β†’ n = 180/30 = 6 β†’ Molecular Formula = C₆H₁₂O₆ (Glucose!)

TOPIC 9 - Stoichiometry & Limiting Reagent ⭐⭐⭐

Stoichiometry = quantitative relationship between reactants and products in a balanced equation
Example: Nβ‚‚ + 3Hβ‚‚ β†’ 2NH₃
This means:
  • 1 mol Nβ‚‚ reacts with 3 mol Hβ‚‚ to give 2 mol NH₃
  • 28g Nβ‚‚ + 6g Hβ‚‚ β†’ 34g NH₃

Limiting Reagent:

The reactant that gets fully consumed first and limits the amount of product formed
How to find limiting reagent:
  1. Convert all reactants to moles
  2. Divide moles by stoichiometric coefficient
  3. Smaller value = limiting reagent
Example: 14g Nβ‚‚ + 6g Hβ‚‚ β†’ NH₃
  • Moles of Nβ‚‚ = 14/28 = 0.5 mol β†’ 0.5/1 = 0.5
  • Moles of Hβ‚‚ = 6/2 = 3 mol β†’ 3/3 = 1.0
  • Nβ‚‚ has smaller value β†’ Nβ‚‚ is limiting reagent
  • NH₃ produced = 0.5 Γ— 2 = 1 mol = 17g

TOPIC 10 - Concentration Terms ⭐⭐

1. Molarity (M) - Most used in problems

M = n(solute) / V(solution in Litres)
  = mass of solute / (Molar mass Γ— Volume in L)

2. Molality (m)

m = n(solute) / mass of solvent (in kg)

3. Mole Fraction (Ο‡)

Ο‡A = nA / (nA + nB)    [Ο‡A + Ο‡B = 1]

4. Mass Percent (% w/w)

% = (mass of solute / mass of solution) Γ— 100

5. Parts per Million (ppm)

ppm = (mass of solute / mass of solution) Γ— 10⁢

Quick Comparison Table:

TermFormulaUnits
Molarityn/V(L)mol/L (M)
Molalityn/kg(solvent)mol/kg
Mole fractionnA/(nA+nB)Dimensionless
Mass %(msolute/msolution)Γ—100%

🧠 MUST-KNOW FORMULAS AT A GLANCE

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  n = m/M           β†’ moles from mass                β”‚
β”‚  n = N/6.022Γ—10Β²Β³  β†’ moles from particles           β”‚
β”‚  n = V/22.4        β†’ moles from volume (STP)        β”‚
β”‚  M = n/V(L)        β†’ Molarity                       β”‚
β”‚  % = (m/M)Γ—100     β†’ Percentage composition         β”‚
β”‚  n = Mol.Formula / Emp.Formula mass                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⚑ IMPORTANT ATOMIC MASSES TO MEMORIZE

ElementSymbolAtomic Mass
HydrogenH1
CarbonC12
NitrogenN14
OxygenO16
SodiumNa23
MagnesiumMg24
SulphurS32
ChlorineCl35.5
CalciumCa40
IronFe56
CopperCu63.5
ZincZn65

🎯 HIGH PROBABILITY EXAM TOPICS

  1. Mole concept numericals - most common (moles ↔ mass ↔ particles ↔ volume)
  2. Limiting reagent problems - always in board exams
  3. Empirical + Molecular formula from % composition
  4. Molarity calculations (especially preparing solutions)
  5. Laws of chemical combination - theory/definition questions
  6. Dalton's Atomic Theory - postulates and limitations
  7. Significant figures - MCQ favourite

πŸ“Ί One-Shot Revision Video

Watch this AFTER completing your reading for a quick full-chapter revision:

πŸ’‘ MENTOR TIPS FOR TODAY

  1. Don't skip Significant Figures - easy 2 marks in exams
  2. Mole concept is 40% of this chapter - give it maximum time
  3. Write formulas on sticky notes and paste them at your study table
  4. Solve NCERT exercises - especially Q1-Q14, they cover everything
  5. Limiting reagent trick - always divide moles by coefficient, never forget
  6. For concentration problems - first identify what's given (mass %? density? volume?)
You've got this! Chapter 1 is honestly one of the most logical chapters - once the mole concept clicks, everything else falls into place. Start with NCERT reading, come back to these notes, then smash the numericals. All the best! πŸ”₯

Provide me the best hand written note with digram in pdf from and plsss make them more best

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"

Running Command

mkdir -p /home/daytona/workspace/chem-notes && python3 -c "import reportlab; pri…

Writing File

~/chem-notes/make_notes.py

from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
import math

W, H = A4  # 595 x 842 pt

# ── colour palette ────────────────────────────────────────────────────────────
BG        = colors.HexColor("#FFFDF5")   # warm paper
RULE      = colors.HexColor("#C8E0FF")   # blue ruled lines
MARGIN    = colors.HexColor("#FFB3B3")   # red margin line
HEADING1  = colors.HexColor("#1A237E")   # dark blue
HEADING2  = colors.HexColor("#B71C1C")   # red
HEADING3  = colors.HexColor("#1B5E20")   # dark green
BODY      = colors.HexColor("#1A1A1A")
HIGHLIGHT = colors.HexColor("#FFF59D")   # yellow highlight
BOX_BLUE  = colors.HexColor("#E3F2FD")
BOX_GREEN = colors.HexColor("#E8F5E9")
BOX_RED   = colors.HexColor("#FFEBEE")
BOX_YELL  = colors.HexColor("#FFFDE7")
ARROW     = colors.HexColor("#0D47A1")
FORMULA_BG= colors.HexColor("#E8EAF6")
STAR      = colors.HexColor("#F57F17")

def new_page(c):
    c.setFillColor(BG)
    c.rect(0, 0, W, H, fill=1, stroke=0)
    # horizontal ruled lines every 8mm
    c.setStrokeColor(RULE)
    c.setLineWidth(0.4)
    y = H - 25*mm
    while y > 15*mm:
        c.line(18*mm, y, W - 10*mm, y)
        y -= 8*mm
    # red margin line
    c.setStrokeColor(MARGIN)
    c.setLineWidth(1.2)
    c.line(18*mm, H - 10*mm, 18*mm, 12*mm)

def htext(c, text, x, y, size=11, color=BODY, bold=False, align="left"):
    c.setFillColor(color)
    c.setFont("Helvetica-Bold" if bold else "Helvetica", size)
    if align == "center":
        c.drawCentredString(x, y, text)
    elif align == "right":
        c.drawRightString(x, y, text)
    else:
        c.drawString(x, y, text)

def highlight_box(c, x, y, w, h, bg=HIGHLIGHT, stroke=None, radius=3):
    c.setFillColor(bg)
    if stroke:
        c.setStrokeColor(stroke)
        c.roundRect(x, y, w, h, radius, fill=1, stroke=1)
    else:
        c.roundRect(x, y, w, h, radius, fill=1, stroke=0)

def draw_arrow(c, x1, y1, x2, y2, color=ARROW, width=1.5):
    c.setStrokeColor(color)
    c.setLineWidth(width)
    c.line(x1, y1, x2, y2)
    # arrowhead
    angle = math.atan2(y2 - y1, x2 - x1)
    size = 6
    c.setFillColor(color)
    p = c.beginPath()
    p.moveTo(x2, y2)
    p.lineTo(x2 - size*math.cos(angle - 0.4), y2 - size*math.sin(angle - 0.4))
    p.lineTo(x2 - size*math.cos(angle + 0.4), y2 - size*math.sin(angle + 0.4))
    p.close()
    c.drawPath(p, fill=1, stroke=0)

def star_label(c, text, x, y, size=10):
    c.setFillColor(STAR)
    c.setFont("Helvetica-Bold", size)
    c.drawString(x, y, "β˜… " + text)

def bullet(c, text, x, y, size=10, color=BODY, indent=0):
    c.setFillColor(colors.HexColor("#E53935"))
    c.circle(x + indent + 3, y + 3.5, 2.5, fill=1, stroke=0)
    c.setFillColor(color)
    c.setFont("Helvetica", size)
    c.drawString(x + indent + 10, y, text)

def section_banner(c, text, y, bg=HEADING1, fg=colors.white):
    c.setFillColor(bg)
    c.roundRect(19*mm, y - 3, W - 29*mm, 18, 4, fill=1, stroke=0)
    c.setFillColor(fg)
    c.setFont("Helvetica-Bold", 12)
    c.drawString(22*mm, y + 2, text)

def sub_banner(c, text, y, bg=colors.HexColor("#E3F2FD"), fg=HEADING1):
    c.setFillColor(bg)
    c.roundRect(20*mm, y - 2, W - 32*mm, 15, 3, fill=1, stroke=0)
    c.setFillColor(fg)
    c.setFont("Helvetica-Bold", 10.5)
    c.drawString(23*mm, y + 1, text)

# ═════════════════════════════════════════════════════════════════════════════
# Build PDF
# ═════════════════════════════════════════════════════════════════════════════
path = "/home/daytona/workspace/chem-notes/Chem_Ch1_Notes.pdf"
c = canvas.Canvas(path, pagesize=A4)
c.setTitle("Class 11 Chemistry - Chapter 1 Handwritten Notes")

# ────────────────────────────────────────────────────────── PAGE 1: COVER ────
new_page(c)
# Decorative top strip
c.setFillColor(colors.HexColor("#1A237E"))
c.rect(0, H - 40*mm, W, 40*mm, fill=1, stroke=0)
c.setFillColor(colors.HexColor("#FFF176"))
c.setFont("Helvetica-Bold", 22)
c.drawCentredString(W/2, H - 20*mm, "CLASS 11  CHEMISTRY")
c.setFont("Helvetica-Bold", 14)
c.setFillColor(colors.white)
c.drawCentredString(W/2, H - 31*mm, "CHAPTER  1")

# Big title
highlight_box(c, 30, H - 135, W - 60, 52, bg=colors.HexColor("#E8EAF6"), stroke=HEADING1, radius=8)
htext(c, "Some Basic Concepts", W/2, H - 105, size=20, color=HEADING1, bold=True, align="center")
htext(c, "of Chemistry", W/2, H - 122, size=20, color=HEADING1, bold=True, align="center")

# Topics index
y = H - 165
htext(c, "Topics Covered:", 22*mm, y, size=12, color=HEADING2, bold=True)
topics = [
    "1.  Nature of Matter & Classification",
    "2.  SI Units, Significant Figures",
    "3.  Laws of Chemical Combination",
    "4.  Dalton's Atomic Theory",
    "5.  Atomic & Molecular Mass",
    "6.  MOLE CONCEPT  β˜…β˜…β˜… (Most Important)",
    "7.  Percentage Composition",
    "8.  Empirical & Molecular Formula",
    "9.  Stoichiometry & Limiting Reagent",
    "10. Concentration Terms",
]
y -= 16
for t in topics:
    col = STAR if "β˜…" in t else BODY
    htext(c, t, 25*mm, y, size=10.5, color=col)
    y -= 14

# Bottom note
highlight_box(c, 20*mm, 30, W - 40*mm, 28, bg=BOX_GREEN, stroke=HEADING3, radius=5)
htext(c, "β˜…  Formula Sheet on Last Page  β˜…", W/2, 40, size=11, color=HEADING3, bold=True, align="center")

c.showPage()

# ────────────────────────────────────────── PAGE 2: MATTER & SI UNITS ────────
new_page(c)
section_banner(c, "TOPIC 1 β€” Nature & Classification of Matter", H - 22*mm)
y = H - 45*mm

# Mind-map style diagram of matter classification
htext(c, "CLASSIFICATION OF MATTER  (Mind Map)", 22*mm, y, size=11, color=HEADING2, bold=True)
y -= 8
# Central box
cx, cy = W/2, y - 20
highlight_box(c, cx - 28, cy - 9, 56, 20, bg=HEADING1, radius=5)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 11)
c.drawCentredString(cx, cy + 4, "MATTER")

# Two branches: Pure Substance & Mixture
lx, rx = cx - 90, cx + 55
by = cy - 55
highlight_box(c, lx - 38, by - 10, 80, 20, bg=BOX_BLUE, stroke=HEADING1, radius=5)
htext(c, "Pure Substance", lx + 2, by - 4, size=10, color=HEADING1, bold=True)
draw_arrow(c, cx - 28, cy, lx + 38, by + 10)

highlight_box(c, rx - 5, by - 10, 72, 20, bg=BOX_RED, stroke=HEADING2, radius=5)
htext(c, "  Mixture", rx - 2, by - 4, size=10, color=HEADING2, bold=True)
draw_arrow(c, cx + 28, cy, rx + 28, by + 10)

# Sub-branches: Pure
ey1, ey2 = by - 50, by - 50
ex1, ex2 = lx - 55, lx + 15
highlight_box(c, ex1, ey1 - 10, 64, 20, bg=BOX_GREEN, stroke=HEADING3, radius=4)
htext(c, "  Elements", ex1 + 5, ey1 - 4, size=9.5, color=HEADING3, bold=True)
draw_arrow(c, lx, by - 10, ex1 + 32, ey1 + 10)

highlight_box(c, ex2, ey2 - 10, 70, 20, bg=BOX_GREEN, stroke=HEADING3, radius=4)
htext(c, "  Compounds", ex2 + 5, ey2 - 4, size=9.5, color=HEADING3, bold=True)
draw_arrow(c, lx + 15, by - 10, ex2 + 35, ey2 + 10)

# Sub-branches: Mixture
mx1, mx2 = rx - 35, rx + 35
my = by - 50
highlight_box(c, mx1 - 40, my - 10, 78, 20, bg=BOX_YELL, stroke=STAR, radius=4)
htext(c, " Homogeneous", mx1 - 35, my - 4, size=9, color=colors.HexColor("#E65100"), bold=True)
draw_arrow(c, rx + 28, by - 10, mx1 - 2, my + 10)

highlight_box(c, mx2 + 5, my - 10, 84, 20, bg=BOX_YELL, stroke=STAR, radius=4)
htext(c, " Heterogeneous", mx2 + 8, my - 4, size=9, color=colors.HexColor("#E65100"), bold=True)
draw_arrow(c, rx + 50, by - 10, mx2 + 47, my + 10)

# Examples in small text
c.setFillColor(colors.HexColor("#555555")); c.setFont("Helvetica-Oblique", 8.5)
c.drawCentredString(ex1 + 32, ey1 - 22, "(Fe, Oβ‚‚, Au)")
c.drawCentredString(ex2 + 35, ey2 - 22, "(Hβ‚‚O, NaCl, COβ‚‚)")
c.drawCentredString(mx1 - 2, my - 23, "(Saltwater, alloy)")
c.drawCentredString(mx2 + 47, my - 23, "(Sand+water)")

y = by - 85

# States of matter
sub_banner(c, "States of Matter", y)
y -= 18
states = [
    ("SOLID", "Definite shape & volume", "Particles tightly packed, vibrate in place", BOX_BLUE),
    ("LIQUID", "Definite volume, no fixed shape", "Particles close, slide past each other", BOX_GREEN),
    ("GAS", "No fixed shape or volume", "Particles far apart, move freely", BOX_YELL),
]
for name, prop, note, bg in states:
    highlight_box(c, 20*mm, y - 9, W - 40*mm, 22, bg=bg, stroke=None, radius=4)
    htext(c, name + ":", 22*mm, y + 7, size=10.5, color=HEADING1, bold=True)
    htext(c, prop, 50*mm, y + 7, size=10, color=BODY)
    c.setFillColor(colors.HexColor("#555555")); c.setFont("Helvetica-Oblique", 9)
    c.drawString(22*mm + 2, y - 4, "  β†’ " + note)
    y -= 30

# Temperature conversions
y -= 4
sub_banner(c, "Temperature Conversions", y)
y -= 20
formulas = ["K = Β°C + 273.15",  "Β°F = (9/5 Γ— Β°C) + 32",  "Β°C = (Β°F βˆ’ 32) Γ— 5/9"]
fx = 22*mm
for f in formulas:
    highlight_box(c, fx, y - 5, 130, 18, bg=FORMULA_BG, stroke=HEADING1, radius=4)
    htext(c, f, fx + 6, y + 7, size=10.5, color=HEADING1, bold=True)
    fx += 145

c.showPage()

# ────────────────────────────────────────── PAGE 3: SIG FIGS + LAWS ─────────
new_page(c)
section_banner(c, "TOPIC 2 β€” Significant Figures & Scientific Notation", H - 22*mm)
y = H - 46*mm

# Sig fig rules table
rules = [
    ("1", "All NON-ZERO digits", "Significant", "1234  β†’  4 sig figs"),
    ("2", "Zeros BETWEEN non-zero digits", "Significant", "1004  β†’  4 sig figs"),
    ("3", "LEADING zeros", "NOT significant", "0.0045  β†’  2 sig figs"),
    ("4", "TRAILING zeros AFTER decimal", "Significant", "3.500  β†’  4 sig figs"),
    ("5", "Trailing zeros WITHOUT decimal", "Ambiguous", "1500  β†’  2 or 4?"),
]
col_x = [22*mm, 34*mm, 115*mm, 152*mm]
headers = ["#", "Rule", "Status", "Example"]
# header row
highlight_box(c, 19*mm, y - 2, W - 38*mm, 16, bg=HEADING1, radius=3)
for hd, hx in zip(headers, col_x):
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9.5)
    c.drawString(hx, y + 6, hd)
y -= 16
for i, (num, rule, status, ex) in enumerate(rules):
    bg = colors.HexColor("#F5F5F5") if i % 2 == 0 else colors.white
    highlight_box(c, 19*mm, y - 3, W - 38*mm, 15, bg=bg, radius=0)
    c.setFillColor(BODY); c.setFont("Helvetica", 9.5)
    c.drawString(col_x[0], y + 5, num)
    c.drawString(col_x[1], y + 5, rule)
    sc = colors.HexColor("#1B5E20") if status == "Significant" else HEADING2
    c.setFillColor(sc); c.setFont("Helvetica-Bold", 9.5)
    c.drawString(col_x[2], y + 5, status)
    c.setFillColor(colors.HexColor("#555555")); c.setFont("Helvetica-Oblique", 9)
    c.drawString(col_x[3], y + 5, ex)
    y -= 15

# Scientific notation
y -= 6
sub_banner(c, "Scientific Notation  β†’  N Γ— 10ⁿ   (1 ≀ N < 10)", y)
y -= 18
examples_sn = [
    ("0.000345", "=  3.45 Γ— 10⁻⁴", BOX_BLUE),
    ("456000",   "=  4.56 Γ— 10⁡",  BOX_GREEN),
    ("0.00100",  "=  1.00 Γ— 10⁻³ (3 sig figs)", BOX_YELL),
]
fx = 22*mm
for val, res, bg in examples_sn:
    highlight_box(c, fx, y - 5, 148, 20, bg=bg, stroke=None, radius=4)
    htext(c, val, fx + 5, y + 8, size=10, color=BODY, bold=True)
    htext(c, res, fx + 5, y - 2, size=9.5, color=HEADING1)
    fx += 158

# ── LAWS OF CHEMICAL COMBINATION ──────────────────────────────────────────────
y -= 35
section_banner(c, "TOPIC 3 β€” Laws of Chemical Combination  β˜… (Exam Favourite)", y, bg=HEADING2)
y -= 22

laws = [
    ("LAW 1", "Law of Conservation of Mass", "Lavoisier, 1789",
     "Total mass of reactants = Total mass of products",
     "2Hβ‚‚ + Oβ‚‚ β†’ 2Hβ‚‚O   |   4g + 32g = 36g  βœ“", BOX_BLUE),
    ("LAW 2", "Law of Definite Proportions", "Proust, 1799",
     "A compound always has elements in FIXED mass ratio",
     "Hβ‚‚O always has  H : O = 1 : 8  by mass", BOX_GREEN),
    ("LAW 3", "Law of Multiple Proportions", "Dalton, 1803",
     "Masses of one element combining with fixed mass of other β†’ simple ratio",
     "CO vs COβ‚‚ : oxygen = 16g vs 32g β†’ ratio 1:2", BOX_YELL),
    ("LAW 4", "Gay Lussac's Law of Gaseous Volumes", "Gay-Lussac",
     "Gases combine in SIMPLE RATIOS by volume at same T & P",
     "Hβ‚‚ : Oβ‚‚ : Hβ‚‚O  =  2 : 1 : 2  (volumes)", BOX_RED),
    ("LAW 5", "Avogadro's Law", "Avogadro",
     "Equal volumes of gases at same T & P have equal number of molecules",
     "1L Nβ‚‚  =  1L Oβ‚‚  (same no. of molecules at same T, P)", colors.HexColor("#F3E5F5")),
]
for tag, name, who, rule, ex, bg in laws:
    highlight_box(c, 20*mm, y - 8, W - 39*mm, 36, bg=bg, stroke=None, radius=5)
    htext(c, tag + "  β€”  " + name, 23*mm, y + 22, size=10.5, color=HEADING1, bold=True)
    c.setFillColor(colors.HexColor("#777777")); c.setFont("Helvetica-Oblique", 8.5)
    c.drawString(23*mm, y + 11, "(" + who + ")")
    htext(c, rule, 23*mm, y + 1, size=9.5, color=BODY)
    c.setFillColor(HEADING2); c.setFont("Helvetica-Oblique", 9)
    c.drawString(23*mm, y - 6, "  e.g. " + ex)
    y -= 44

c.showPage()

# ────────────────────────────────────────── PAGE 4: DALTON + ATOMIC MASS ─────
new_page(c)
section_banner(c, "TOPIC 4 β€” Dalton's Atomic Theory", H - 22*mm)
y = H - 46*mm

postulates = [
    "Matter is made of indivisible particles called ATOMS",
    "Atoms of the SAME element are identical in mass & properties",
    "Atoms of DIFFERENT elements differ in mass & properties",
    "Atoms combine in simple whole-number ratios to form COMPOUNDS",
    "Atoms are NEITHER created NOR destroyed in chemical reactions",
]
for i, p in enumerate(postulates):
    highlight_box(c, 20*mm, y - 6, W - 39*mm, 18, bg=BOX_BLUE if i % 2 == 0 else colors.white, radius=3)
    htext(c, f"P{i+1}.", 22*mm, y + 5, size=10.5, color=HEADING1, bold=True)
    htext(c, p, 32*mm, y + 5, size=10, color=BODY)
    y -= 22

y -= 4
sub_banner(c, "Limitations of Dalton's Atomic Theory", y, bg=BOX_RED, fg=HEADING2)
y -= 16
limits = [
    "Cannot explain ISOTOPES (same element, different masses)",
    "Cannot explain ISOBARS (different elements, same mass number)",
    "Atom IS divisible β€” has electrons, protons & neutrons",
    "Does not explain allotropes (e.g., diamond and graphite both = Carbon)",
]
for l in limits:
    bullet(c, l, 20*mm, y, size=10, color=HEADING2)
    y -= 16

# ── ATOMIC & MOLECULAR MASS ───────────────────────────────────────────────────
y -= 10
section_banner(c, "TOPIC 5 β€” Atomic & Molecular Mass", y)
y -= 22

highlight_box(c, 20*mm, y - 8, W - 39*mm, 22, bg=FORMULA_BG, stroke=HEADING1, radius=5)
htext(c, "1 amu (u)  =  1/12 th mass of Carbon-12 atom  =  1.66 Γ— 10⁻²⁷ kg", 23*mm, y + 6, size=10.5, color=HEADING1, bold=True)
y -= 34

htext(c, "Molecular Mass = Sum of atomic masses of ALL atoms in the molecule", 22*mm, y, size=10, color=BODY)
y -= 18

# Molecule mass table
molecules = [
    ("Hβ‚‚O", "2(1) + 16", "18 u"),
    ("COβ‚‚", "12 + 2(16)", "44 u"),
    ("Hβ‚‚SOβ‚„", "2(1)+32+4(16)", "98 u"),
    ("HNO₃", "1+14+3(16)", "63 u"),
    ("NaCl", "23 + 35.5", "58.5 u"),
    ("CaCO₃", "40+12+3(16)", "100 u"),
    ("NH₃", "14 + 3(1)", "17 u"),
    ("CHβ‚„", "12 + 4(1)", "16 u"),
]
# Draw as a 2-column table
col_w = (W - 40*mm) / 2
for idx, (mol, calc, mass) in enumerate(molecules):
    col = idx % 2
    row = idx // 2
    bx = 20*mm + col * col_w
    by = y - row * 22
    bg = BOX_GREEN if row % 2 == 0 else BOX_BLUE
    highlight_box(c, bx, by - 8, col_w - 4, 18, bg=bg, radius=3)
    htext(c, mol, bx + 4, by + 4, size=10.5, color=HEADING1, bold=True)
    htext(c, "= " + calc, bx + 40, by + 4, size=9.5, color=BODY)
    htext(c, "= " + mass, bx + col_w - 45, by + 4, size=10, color=HEADING2, bold=True)

y -= (len(molecules)//2 + 1) * 22 + 10

# Atomic mass quick reference
sub_banner(c, "Key Atomic Masses to Memorize", y, bg=BOX_YELL, fg=HEADING1)
y -= 16
atoms_col1 = [("H", 1), ("C", 12), ("N", 14), ("O", 16), ("Na", 23), ("Mg", 24)]
atoms_col2 = [("S", 32), ("Cl", 35.5), ("Ca", 40), ("Fe", 56), ("Cu", 63.5), ("Zn", 65)]
step = (W - 40*mm) / 6
sx = 20*mm
for i, (sym, mass) in enumerate(atoms_col1 + atoms_col2):
    bx = sx + i * step
    highlight_box(c, bx, y - 8, step - 3, 20, bg=FORMULA_BG, stroke=HEADING1, radius=4)
    htext(c, sym, bx + 5, y + 6, size=10.5, color=HEADING1, bold=True)
    htext(c, str(mass), bx + 5, y - 5, size=9, color=HEADING2)

c.showPage()

# ────────────────────────────────────────── PAGE 5: MOLE CONCEPT ─────────────
new_page(c)
section_banner(c, "TOPIC 6 β€” MOLE CONCEPT  β˜…β˜…β˜…  (Most Important!)", H - 22*mm, bg=colors.HexColor("#B71C1C"))
y = H - 46*mm

# Definition box
highlight_box(c, 20*mm, y - 10, W - 39*mm, 28, bg=colors.HexColor("#FCE4EC"), stroke=HEADING2, radius=6)
htext(c, "1 MOLE  =  6.022 Γ— 10Β²Β³ particles  =  Avogadro's Number (Nₐ)", W/2, y + 11, size=12, color=HEADING2, bold=True, align="center")
htext(c, '"Just like DOZEN = 12,   MOLE = 6.022 Γ— 10Β²Β³"', W/2, y - 3, size=10, color=BODY, align="center")
y -= 40

# Three-way mole diagram (triangle)
htext(c, "THE MOLE TRIANGLE  (Most Important Diagram!)", 22*mm, y, size=11, color=HEADING1, bold=True)
y -= 10

# Triangle vertices
Tx, Ty = W/2, y - 10          # top  = MOLES
Lx, Ly = W/2 - 95, y - 90    # left = MASS
Rx, Ry = W/2 + 95, y - 90    # right = PARTICLES
Bx, By = W/2, y - 150         # bottom (extra) = VOLUME (STP)

# Draw triangle
c.setStrokeColor(HEADING1); c.setLineWidth(2)
c.line(Tx, Ty, Lx, Ly)
c.line(Tx, Ty, Rx, Ry)
c.line(Lx, Ly, Rx, Ry)

# Extra arrow down for volume
draw_arrow(c, Tx, Ty, Bx, By + 15, color=HEADING3, width=2)
draw_arrow(c, Bx, By + 15, Tx, Ty, color=HEADING3, width=1)

# Node boxes
for nx, ny, label, sub, bg in [
    (Tx, Ty + 5, "MOLES (n)", "", HEADING1),
    (Lx, Ly - 5, "MASS (m)", "in grams", HEADING2),
    (Rx, Ry - 5, "PARTICLES", "(atoms/molecules)", colors.HexColor("#1B5E20")),
    (Bx, By - 5, "VOLUME (STP)", "in Litres", HEADING3),
]:
    c.setFillColor(bg)
    c.roundRect(nx - 44, ny - 12, 88, 22, 5, fill=1, stroke=0)
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9.5)
    c.drawCentredString(nx, ny + 3, label)
    if sub:
        c.setFont("Helvetica", 7.5)
        c.drawCentredString(nx, ny - 7, sub)

# Arrow labels
mid = lambda a, b: ((a[0]+b[0])/2, (a[1]+b[1])/2)
arrow_labels = [
    (mid((Tx,Ty),(Lx,Ly)), "Γ· M", "Γ— M", -15, 0),
    (mid((Tx,Ty),(Rx,Ry)), "Γ· Nₐ", "Γ— Nₐ", 10, 0),
    (mid((Lx,Ly),(Rx,Ry)), "n = m/M", "", 0, -12),
    (mid((Tx,Ty),(Bx,By)), "Γ· 22.4", "Γ— 22.4", -45, 0),
]
for (mx,my), top, bot, dx, dy in arrow_labels:
    highlight_box(c, mx+dx-2, my+dy-5, max(len(top),len(bot))*6+8, 22, bg=colors.HexColor("#FFFDE7"), radius=3)
    c.setFillColor(HEADING3); c.setFont("Helvetica-Bold", 8)
    c.drawString(mx+dx+2, my+dy+10, top)
    if bot:
        c.setFillColor(HEADING2)
        c.drawString(mx+dx+2, my+dy, bot)

y = By - 22

# Key formulas
sub_banner(c, "KEY FORMULAS", y, bg=FORMULA_BG, fg=HEADING1)
y -= 20
fmls = [
    ("n = m / M",          "moles = mass Γ· molar mass"),
    ("n = N / Nₐ",         "moles = particles Γ· 6.022Γ—10Β²Β³"),
    ("n = V / 22.4",       "moles = volume(L) Γ· 22.4  [at STP only]"),
    ("m = n Γ— M",          "mass = moles Γ— molar mass"),
    ("N = n Γ— Nₐ",         "particles = moles Γ— Avogadro's number"),
]
for f, desc in fmls:
    highlight_box(c, 20*mm, y - 5, W - 39*mm, 16, bg=FORMULA_BG, stroke=None, radius=3)
    htext(c, f, 23*mm, y + 5, size=11, color=HEADING1, bold=True)
    htext(c, "   β†’  " + desc, 75*mm, y + 5, size=9.5, color=BODY)
    y -= 19

# STP note
highlight_box(c, 20*mm, y - 6, W - 39*mm, 16, bg=BOX_RED, stroke=HEADING2, radius=3)
htext(c, "STP = 0Β°C (273 K), 1 atm  |  1 mole any gas = 22.4 L", 23*mm, y + 4, size=10, color=HEADING2, bold=True)

c.showPage()

# ────────────────────────────────────────── PAGE 6: MOLE NUMERICALS ──────────
new_page(c)
section_banner(c, "MOLE CONCEPT β€” Solved Examples  β˜…β˜…β˜…", H - 22*mm, bg=HEADING3)
y = H - 46*mm

problems = [
    ("Q1", "How many moles in 36g of Hβ‚‚O?",
     "Molar mass of Hβ‚‚O = 2(1)+16 = 18 g/mol",
     "n = m/M = 36/18", "= 2 moles", BOX_BLUE),
    ("Q2", "How many molecules in 44g of COβ‚‚?",
     "Molar mass COβ‚‚ = 44 g/mol  β†’  n = 44/44 = 1 mol",
     "No. of molecules = n Γ— Nₐ = 1 Γ— 6.022Γ—10Β²Β³", "= 6.022 Γ— 10Β²Β³ molecules", BOX_GREEN),
    ("Q3", "Find mass of 3 mol of NaCl",
     "Molar mass NaCl = 23+35.5 = 58.5 g/mol",
     "m = n Γ— M = 3 Γ— 58.5", "= 175.5 g", BOX_YELL),
    ("Q4", "Volume of 0.5 mol Oβ‚‚ at STP?",
     "At STP: 1 mol gas = 22.4 L",
     "V = n Γ— 22.4 = 0.5 Γ— 22.4", "= 11.2 L", colors.HexColor("#F3E5F5")),
    ("Q5", "Moles in 3.011 Γ— 10Β²Β³ atoms of Fe?",
     "Nₐ = 6.022 Γ— 10Β²Β³",
     "n = N/Nₐ = 3.011Γ—10Β²Β³ / 6.022Γ—10Β²Β³", "= 0.5 mol", BOX_RED),
    ("Q6", "Find atoms in 24g of Carbon",
     "Molar mass C = 12 g/mol  β†’  n = 24/12 = 2 mol",
     "Atoms = 2 Γ— 6.022Γ—10Β²Β³", "= 1.204 Γ— 10²⁴ atoms", BOX_BLUE),
]
for tag, q, step1, step2, ans, bg in problems:
    highlight_box(c, 20*mm, y - 14, W - 39*mm, 42, bg=bg, stroke=None, radius=5)
    htext(c, tag + ":  " + q, 23*mm, y + 22, size=10, color=HEADING1, bold=True)
    htext(c, "β–Ί " + step1, 23*mm, y + 10, size=9.5, color=BODY)
    htext(c, "β–Ί " + step2, 23*mm, y + 0, size=9.5, color=BODY)
    highlight_box(c, W - 95*mm, y - 12, 72*mm, 14, bg=HEADING1, radius=3)
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 10)
    c.drawString(W - 93*mm, y - 6, "Ans: " + ans)
    y -= 50

c.showPage()

# ────────────────────────────────────────── PAGE 7: % COMP + EMP FORMULA ─────
new_page(c)
section_banner(c, "TOPIC 7 β€” Percentage Composition", H - 22*mm)
y = H - 46*mm

highlight_box(c, 20*mm, y - 8, W - 39*mm, 22, bg=FORMULA_BG, stroke=HEADING1, radius=5)
htext(c, "% by mass  =  (Mass of element in 1 mol / Molar mass of compound)  Γ— 100", 23*mm, y + 6, size=10.5, color=HEADING1, bold=True)
y -= 34

# Example 1: H2O
sub_banner(c, "Example 1: % Composition of Hβ‚‚O  (Molar mass = 18 g/mol)", y, bg=BOX_BLUE, fg=HEADING1)
y -= 18
data_h2o = [("%  H", "= (2/18) Γ— 100", "= 11.11%"), ("%  O", "= (16/18) Γ— 100", "= 88.89%")]
for lab, calc, result in data_h2o:
    htext(c, lab, 25*mm, y, size=10.5, color=HEADING1, bold=True)
    htext(c, calc, 52*mm, y, size=10, color=BODY)
    htext(c, result, 115*mm, y, size=10.5, color=HEADING2, bold=True)
    y -= 16

y -= 8
sub_banner(c, "Example 2: % Composition of COβ‚‚  (Molar mass = 44 g/mol)", y, bg=BOX_GREEN, fg=HEADING3)
y -= 18
data_co2 = [("%  C", "= (12/44) Γ— 100", "= 27.27%"), ("%  O", "= (32/44) Γ— 100", "= 72.73%")]
for lab, calc, result in data_co2:
    htext(c, lab, 25*mm, y, size=10.5, color=HEADING3, bold=True)
    htext(c, calc, 52*mm, y, size=10, color=BODY)
    htext(c, result, 115*mm, y, size=10.5, color=HEADING2, bold=True)
    y -= 16

# EMPIRICAL & MOLECULAR FORMULA
y -= 12
section_banner(c, "TOPIC 8 β€” Empirical & Molecular Formula  β˜…β˜…", y)
y -= 22

highlight_box(c, 20*mm, y - 6, W - 39*mm, 18, bg=FORMULA_BG, stroke=None, radius=4)
htext(c, "Molecular Formula  =  n  Γ—  Empirical Formula          n  =  Molar Mass / Empirical Formula Mass", 23*mm, y + 6, size=10, color=HEADING1, bold=True)
y -= 28

sub_banner(c, "Steps to Find Empirical Formula from % Composition", y, bg=BOX_YELL, fg=HEADING1)
y -= 18
steps = [
    "Step 1 β€” Find % of each element (given or calculate)",
    "Step 2 β€” Divide each % by its atomic mass  β†’ get mole ratio",
    "Step 3 β€” Divide all values by the SMALLEST value",
    "Step 4 β€” If not whole numbers, multiply all by 2 or 3 to get whole numbers",
    "Step 5 β€” Write empirical formula  |  Then find n = Molar mass / EF mass",
]
for s in steps:
    bullet(c, s, 20*mm, y, size=10)
    y -= 16

# Worked example
y -= 6
sub_banner(c, "Worked Example: 40% C, 6.67% H, 53.33% O  (Molar mass = 180)", y, bg=colors.HexColor("#E8F5E9"), fg=HEADING3)
y -= 20

# Table header
cols = [22*mm, 52*mm, 95*mm, 135*mm, 162*mm]
hdrs = ["Element", "% ", "Γ· At. Mass", "Γ· smallest", "Ratio"]
highlight_box(c, 20*mm, y - 2, W - 39*mm, 16, bg=HEADING1, radius=3)
for h, cx in zip(hdrs, cols):
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9.5)
    c.drawString(cx, y + 6, h)
y -= 16
rows = [
    ("C", "40", "40/12 = 3.33", "3.33/3.33 = 1", "1"),
    ("H", "6.67", "6.67/1 = 6.67", "6.67/3.33 = 2", "2"),
    ("O", "53.33", "53.33/16 = 3.33", "3.33/3.33 = 1", "1"),
]
for i, row in enumerate(rows):
    bg = BOX_GREEN if i % 2 == 0 else colors.white
    highlight_box(c, 20*mm, y - 3, W - 39*mm, 15, bg=bg, radius=0)
    for val, cx in zip(row, cols):
        c.setFillColor(BODY); c.setFont("Helvetica", 9.5)
        c.drawString(cx, y + 4, val)
    y -= 15

y -= 8
highlight_box(c, 20*mm, y - 6, W - 39*mm, 18, bg=FORMULA_BG, stroke=HEADING2, radius=4)
htext(c, "Empirical Formula = CHβ‚‚O   |   EF Mass = 12+2+16 = 30", 23*mm, y + 6, size=10.5, color=HEADING2, bold=True)
y -= 26
highlight_box(c, 20*mm, y - 6, W - 39*mm, 18, bg=BOX_GREEN, stroke=HEADING3, radius=4)
htext(c, "n = 180/30 = 6    ∴   Molecular Formula = C₆H₁₂O₆  (GLUCOSE!)", 23*mm, y + 6, size=10.5, color=HEADING3, bold=True)

c.showPage()

# ────────────────────────────────────────── PAGE 8: STOICHIOMETRY ────────────
new_page(c)
section_banner(c, "TOPIC 9 β€” Stoichiometry & Limiting Reagent  β˜…β˜…β˜…", H - 22*mm, bg=HEADING2)
y = H - 46*mm

htext(c, "Stoichiometry = Quantitative relationship between reactants & products", 22*mm, y, size=10.5, color=BODY)
y -= 18

# Reaction diagram
sub_banner(c, "Example Reaction:  Nβ‚‚  +  3Hβ‚‚  β†’  2NH₃", y, bg=FORMULA_BG, fg=HEADING1)
y -= 16

highlight_box(c, 20*mm, y - 8, W - 39*mm, 28, bg=BOX_BLUE, stroke=None, radius=5)
interp = [
    "1 mol Nβ‚‚  reacts with  3 mol Hβ‚‚  to give  2 mol NH₃",
    "28g  Nβ‚‚   +  6g  Hβ‚‚   β†’  34g  NH₃",
    "6.022Γ—10Β²Β³ molecules Nβ‚‚  +  3Γ—6.022Γ—10Β²Β³ Hβ‚‚  β†’  2Γ—6.022Γ—10Β²Β³ NH₃",
]
for line in interp:
    htext(c, "β€’ " + line, 23*mm, y + 14, size=9.5, color=BODY)
    y -= 13
y -= 10

# Limiting Reagent
sub_banner(c, "LIMITING REAGENT  β€” The reactant that runs out first β˜…β˜…β˜…", y, bg=BOX_RED, fg=HEADING2)
y -= 22

highlight_box(c, 20*mm, y - 8, W - 39*mm, 20, bg=FORMULA_BG, stroke=HEADING1, radius=5)
htext(c, "HOW TO FIND:  Divide moles by stoichiometric coefficient β†’ SMALLER value = Limiting Reagent", 23*mm, y + 4, size=10, color=HEADING1, bold=True)
y -= 30

sub_banner(c, "Solved Example: 14g Nβ‚‚ + 6g Hβ‚‚ β†’ NH₃", y, bg=BOX_YELL, fg=HEADING1)
y -= 20

steps_lr = [
    ("Step 1", "Moles of Nβ‚‚  =  14/28  =  0.5 mol", "Moles of Hβ‚‚  =  6/2  =  3 mol"),
    ("Step 2", "Nβ‚‚ Γ· coefficient 1  =  0.5/1  =  0.5", "Hβ‚‚ Γ· coefficient 3  =  3/3  =  1.0"),
    ("Step 3", "Nβ‚‚ has SMALLER value (0.5 < 1.0)", "∴  Nβ‚‚  is the LIMITING REAGENT"),
    ("Step 4", "NH₃ produced  =  0.5 Γ— 2  =  1 mol", "Mass of NH₃  =  1 Γ— 17  =  17 g"),
]
for tag, left, right in steps_lr:
    highlight_box(c, 20*mm, y - 6, W - 39*mm, 18, bg=BOX_GREEN if "smaller" in left.lower() or "Limiting" in right else colors.white, radius=3)
    htext(c, tag + ":", 22*mm, y + 6, size=10, color=HEADING2, bold=True)
    htext(c, left, 42*mm, y + 6, size=9.5, color=BODY)
    htext(c, "  |  " + right, 42*mm + 120, y + 6, size=9.5, color=HEADING3 if "Limiting" in right or "mol" in right else BODY, bold="Limiting" in right)
    y -= 22

# ── CONCENTRATION TERMS ───────────────────────────────────────────────────────
y -= 8
section_banner(c, "TOPIC 10 β€” Concentration Terms", y)
y -= 22

conc_terms = [
    ("Molarity (M)", "n(solute) / V(solution in L)", "mol/L  or  M", "Most commonly used in problems", BOX_BLUE),
    ("Molality (m)", "n(solute) / mass of solvent (kg)", "mol/kg", "Independent of temperature", BOX_GREEN),
    ("Mole Fraction (Ο‡)", "nA / (nA + nB)", "Dimensionless", "Ο‡A + Ο‡B = 1  always", BOX_YELL),
    ("Mass Percent (%w/w)", "(m_solute / m_solution) Γ— 100", "%", "e.g.  '40% NaOH solution'", colors.HexColor("#F3E5F5")),
    ("ppm", "(m_solute / m_solution) Γ— 10⁢", "mg/kg", "Used for very dilute solutions", BOX_RED),
]
for term, formula, unit, note, bg in conc_terms:
    highlight_box(c, 20*mm, y - 8, W - 39*mm, 24, bg=bg, stroke=None, radius=4)
    htext(c, term, 23*mm, y + 10, size=10.5, color=HEADING1, bold=True)
    highlight_box(c, 77*mm, y + 2, 120, 14, bg=FORMULA_BG, radius=3)
    htext(c, formula, 79*mm, y + 8, size=9.5, color=HEADING2, bold=True)
    htext(c, "Unit: " + unit, 117*mm, y + 10, size=9, color=HEADING3)
    c.setFillColor(colors.HexColor("#555555")); c.setFont("Helvetica-Oblique", 8.5)
    c.drawString(23*mm, y - 3, "β†’ " + note)
    y -= 32

c.showPage()

# ────────────────────────────────────────── PAGE 9: FORMULA SHEET ────────────
new_page(c)
# Gold header
c.setFillColor(colors.HexColor("#F57F17"))
c.rect(0, H - 30*mm, W, 30*mm, fill=1, stroke=0)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 18)
c.drawCentredString(W/2, H - 16*mm, "β˜…  MASTER FORMULA SHEET  β˜…")
c.setFont("Helvetica-Bold", 10)
c.drawCentredString(W/2, H - 24*mm, "Class 11 Chemistry  β€”  Chapter 1   |   Stick this on your wall!")

y = H - 50*mm

sections_fs = [
    ("MOLE CONCEPT", [
        ("n = m / M",          "moles from mass"),
        ("n = N / Nₐ",         "moles from particles"),
        ("n = V / 22.4",       "moles from volume at STP"),
        ("m = n Γ— M",          "mass from moles"),
        ("N = n Γ— Nₐ",         "particles from moles"),
        ("Nₐ = 6.022 Γ— 10Β²Β³", "Avogadro's constant"),
        ("1 mol gas @ STP = 22.4 L", "molar volume"),
    ], HEADING1),
    ("CONCENTRATION", [
        ("M = n / V(L)",        "Molarity"),
        ("m = n / kg(solvent)", "Molality"),
        ("Ο‡A = nA/(nA+nB)",     "Mole Fraction"),
        ("% = (msolute/msolution)Γ—100", "Mass Percent"),
        ("ppm = (m/m)Γ—10⁢",    "Parts per million"),
    ], HEADING2),
    ("PERCENTAGE & FORMULA", [
        ("% element = (at.mass in compound / mol.mass)Γ—100", "% composition"),
        ("n = Molar Mass / Empirical Formula Mass",          "molecular formula"),
        ("Mol. Formula = n Γ— Emp. Formula",                  "relationship"),
    ], HEADING3),
    ("TEMPERATURE", [
        ("K = Β°C + 273.15",          "Kelvin"),
        ("Β°F = (9/5 Γ— Β°C) + 32",     "Fahrenheit"),
        ("Β°C = (Β°F βˆ’ 32) Γ— 5/9",     "Celsius"),
    ], colors.HexColor("#4A148C")),
]

for sec_title, items, color in sections_fs:
    # Section header
    c.setFillColor(color)
    c.roundRect(20*mm, y - 4, W - 40*mm, 18, 4, fill=1, stroke=0)
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 11)
    c.drawCentredString(W/2, y + 5, sec_title)
    y -= 22

    # Items in 2 columns
    for i, (formula, desc) in enumerate(items):
        col = i % 2
        row = i // 2
        bx = 20*mm + col * ((W - 40*mm)/2)
        by = y - row * 18
        highlight_box(c, bx, by - 5, (W - 42*mm)/2 - 2, 15, bg=FORMULA_BG, radius=3)
        c.setFillColor(color); c.setFont("Helvetica-Bold", 9.5)
        c.drawString(bx + 4, by + 4, formula)
        c.setFillColor(colors.HexColor("#555555")); c.setFont("Helvetica-Oblique", 8.5)
        c.drawString(bx + 4, by - 3, "β†’ " + desc)

    y -= (len(items)//2 + 1) * 18 + 14

# Quick reference for common molecular masses
y -= 6
c.setFillColor(colors.HexColor("#263238"))
c.roundRect(20*mm, y - 4, W - 40*mm, 16, 4, fill=1, stroke=0)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 10)
c.drawCentredString(W/2, y + 4, "COMMON MOLAR MASSES  (memorize these!)")
y -= 20

common = [("Hβ‚‚O","18"),("COβ‚‚","44"),("Hβ‚‚SOβ‚„","98"),("HCl","36.5"),
          ("NaCl","58.5"),("NaOH","40"),("NH₃","17"),("CHβ‚„","16"),
          ("C₆H₁₂O₆","180"),("CaCO₃","100")]
step_x = (W - 40*mm) / 5
sx = 20*mm
for i, (mol, mass) in enumerate(common):
    col = i % 5
    row = i // 5
    bx = sx + col * step_x
    by = y - row * 22
    c.setFillColor(BOX_BLUE if row == 0 else BOX_GREEN)
    c.roundRect(bx, by - 8, step_x - 4, 20, 3, fill=1, stroke=0)
    c.setFillColor(HEADING1); c.setFont("Helvetica-Bold", 10)
    c.drawString(bx + 3, by + 5, mol)
    c.setFillColor(HEADING2); c.setFont("Helvetica-Bold", 9)
    c.drawString(bx + 3, by - 5, mass + " g/mol")

# Footer
c.setFillColor(HEADING1)
c.rect(0, 0, W, 20, fill=1, stroke=0)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9)
c.drawCentredString(W/2, 6, "Class 11 Chemistry  |  Chapter 1 β€” Some Basic Concepts of Chemistry  |  All the best! β˜…")

c.showPage()
c.save()
print(f"PDF saved: {path}")
print(f"Pages: 9")
Running Command

cd /home/daytona/workspace/chem-notes && python3 make_notes.py 2>&1

Running Command

ls -lh /home/daytona/workspace/chem-notes/Chem_Ch1_Notes.pdf

Your notes PDF is ready! πŸŽ‰ Here's the download link:

Chem Ch1 Notes

PDF Document Β· PDF


What's inside your 9-page PDF:

PageContent
Page 1Cover page with full topic index
Page 2Matter classification mind-map diagram + States of matter + Temperature conversions
Page 3Significant Figures table + Scientific Notation + Laws of Chemical Combination (all 5 laws with examples)
Page 4Dalton's Atomic Theory (postulates + limitations) + Atomic/Molecular mass table + Atomic masses quick ref
Page 5Mole Concept - definition + full triangle diagram with arrows + all key formulas
Page 66 solved mole numericals step by step
Page 7Percentage Composition + Empirical/Molecular Formula (complete worked example with Glucose)
Page 8Stoichiometry + Limiting Reagent (full solved example) + all 5 Concentration terms
Page 9β˜… Master Formula Sheet β˜… - all formulas, common molar masses - perfect to stick on your wall!
Design features:
  • Warm paper background with ruled blue lines (like a real notebook)
  • Red margin line on the left
  • Colour-coded sections and boxes
  • Diagrams: Matter mind-map, Mole Triangle with arrows
  • Highlighted formula boxes
  • All solved examples with step-by-step working
Print it out or study from your screen - all the best for your exam! πŸ”₯

Provide me the best hand written note with digram in pdf from and plsss make them more best

Running Command

python3 -c "from reportlab.pdfgen import canvas; from reportlab.lib.pagesizes im…

Writing File

~/chem-notes/make_v2.py

#!/usr/bin/env python3
"""
Class 11 Chemistry Ch-1  –  Premium Handwritten-Style Notes  v2
Uses ReportLab canvas only (no Platypus dependency).
"""

from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm
import math, textwrap

W, H = A4   # 595.27 x 841.89 pt

# ══════════════════════════════ COLOUR PALETTE ════════════════════════════════
PAPER      = colors.HexColor("#FFFEF5")   # warm cream paper
RULE_LINE  = colors.HexColor("#D6E8FF")   # faint blue rule lines
MARGIN_RED = colors.HexColor("#FF6B6B")   # red margin
NAVY       = colors.HexColor("#1A237E")
CRIMSON    = colors.HexColor("#C62828")
FOREST     = colors.HexColor("#1B5E20")
PURPLE     = colors.HexColor("#4A148C")
TEAL       = colors.HexColor("#006064")
ORANGE     = colors.HexColor("#E65100")
BODY       = colors.HexColor("#1C1C1C")
GREY       = colors.HexColor("#5E5E5E")
LIGHT_GREY = colors.HexColor("#BBBBBB")

# Pastel fills
FILL_BLUE   = colors.HexColor("#E3F2FD")
FILL_GREEN  = colors.HexColor("#E8F5E9")
FILL_YELLOW = colors.HexColor("#FFFDE7")
FILL_RED    = colors.HexColor("#FFEBEE")
FILL_PURPLE = colors.HexColor("#F3E5F5")
FILL_ORANGE = colors.HexColor("#FFF3E0")
FILL_TEAL   = colors.HexColor("#E0F2F1")
FILL_FORM   = colors.HexColor("#EDE7F6")   # formula bg

GOLD        = colors.HexColor("#F9A825")
DARK_GOLD   = colors.HexColor("#E65100")

# ══════════════════════════════ UTILITY HELPERS ═══════════════════════════════

def draw_notebook_bg(c, rule_gap=8*mm):
    """Draw cream paper + blue rules + red margin."""
    c.setFillColor(PAPER)
    c.rect(0, 0, W, H, fill=1, stroke=0)
    c.setStrokeColor(RULE_LINE)
    c.setLineWidth(0.35)
    y = H - 24*mm
    while y > 14*mm:
        c.line(22*mm, y, W - 8*mm, y)
        y -= rule_gap
    c.setStrokeColor(MARGIN_RED)
    c.setLineWidth(1.4)
    c.line(21*mm, H - 10*mm, 21*mm, 12*mm)
    c.setStrokeColor(colors.HexColor("#FFB3B3"))
    c.setLineWidth(0.5)
    c.line(22*mm, H - 10*mm, 22*mm, 12*mm)


def T(c, txt, x, y, size=10, color=BODY, bold=False, italic=False, align="left"):
    """Quick text helper."""
    c.setFillColor(color)
    if bold and italic:
        f = "Helvetica-BoldOblique"
    elif bold:
        f = "Helvetica-Bold"
    elif italic:
        f = "Helvetica-Oblique"
    else:
        f = "Helvetica"
    c.setFont(f, size)
    if align == "center":
        c.drawCentredString(x, y, txt)
    elif align == "right":
        c.drawRightString(x, y, txt)
    else:
        c.drawString(x, y, txt)


def rbox(c, x, y, w, h, fill=FILL_BLUE, stroke=None, sw=1, r=4):
    """Rounded rectangle, y = bottom-left."""
    c.setFillColor(fill)
    if stroke:
        c.setStrokeColor(stroke)
        c.setLineWidth(sw)
        c.roundRect(x, y, w, h, r, fill=1, stroke=1)
    else:
        c.roundRect(x, y, w, h, r, fill=1, stroke=0)


def banner(c, text, y, bg=NAVY, fg=colors.white, size=12, pad=4):
    """Full-width section banner. Returns y after banner."""
    bh = size + pad * 2 + 4
    rbox(c, 21*mm, y - bh + size + pad, W - 29*mm, bh, fill=bg, r=5)
    T(c, text, 25*mm, y, size=size, color=fg, bold=True)
    return y - bh - 4


def subbanner(c, text, y, bg=FILL_BLUE, fg=NAVY, size=10.5):
    """Sub-section banner."""
    bh = size + 8
    rbox(c, 21*mm, y - bh + size + 3, W - 30*mm, bh, fill=bg, r=4)
    T(c, text, 24*mm, y, size=size, color=fg, bold=True)
    return y - bh - 4


def arrow(c, x1, y1, x2, y2, col=NAVY, w=1.5, head=6):
    c.setStrokeColor(col); c.setLineWidth(w)
    c.line(x1, y1, x2, y2)
    ang = math.atan2(y2-y1, x2-x1)
    c.setFillColor(col)
    p = c.beginPath()
    p.moveTo(x2, y2)
    p.lineTo(x2 - head*math.cos(ang-0.38), y2 - head*math.sin(ang-0.38))
    p.lineTo(x2 - head*math.cos(ang+0.38), y2 - head*math.sin(ang+0.38))
    p.close(); c.drawPath(p, fill=1, stroke=0)


def double_arrow(c, x1, y1, x2, y2, col=NAVY, w=1.5):
    arrow(c, x1, y1, x2, y2, col, w)
    arrow(c, x2, y2, x1, y1, col, w)


def bullet_row(c, txt, x, y, size=10, col=BODY, dot_col=CRIMSON, indent=0):
    c.setFillColor(dot_col)
    c.circle(x + indent + 3.5, y + 3.5, 2.8, fill=1, stroke=0)
    T(c, txt, x + indent + 11, y, size=size, color=col)


def formula_pill(c, text, cx, y, col=NAVY, bg=FILL_FORM):
    fw = len(text) * 6.2 + 16
    rbox(c, cx - fw/2, y - 3, fw, 16, fill=bg, stroke=col, sw=1, r=8)
    T(c, text, cx, y + 7, size=10, color=col, bold=True, align="center")
    return fw


def page_number(c, n):
    T(c, f"β€” {n} β€”", W/2, 8*mm, size=8.5, color=GREY, align="center")
    T(c, "Class 11 Chemistry  |  Chapter 1  |  Some Basic Concepts of Chemistry",
      W/2, 4*mm, size=7.5, color=LIGHT_GREY, align="center")


# ══════════════════════════════ STAR / ICON HELPERS ═══════════════════════════

def star_badge(c, cx, cy, n=5, r_out=8, r_in=4, col=GOLD):
    pts = []
    for i in range(2*n):
        ang = math.pi/2 + i * math.pi/n
        r = r_out if i % 2 == 0 else r_in
        pts.append((cx + r*math.cos(ang), cy + r*math.sin(ang)))
    c.setFillColor(col)
    p = c.beginPath()
    p.moveTo(*pts[0])
    for pt in pts[1:]:
        p.lineTo(*pt)
    p.close(); c.drawPath(p, fill=1, stroke=0)


def checkmark(c, x, y, col=FOREST, size=9):
    c.setStrokeColor(col); c.setLineWidth(1.6)
    c.line(x, y + size*0.4, x + size*0.4, y)
    c.line(x + size*0.4, y, x + size, y + size*0.7)


# ══════════════════════════════ MAIN PDF BUILD ════════════════════════════════

OUT = "/home/daytona/workspace/chem-notes/Chem_Ch1_Premium.pdf"
c = canvas.Canvas(OUT, pagesize=A4)
c.setTitle("Class 11 Chemistry – Chapter 1 Premium Notes")
c.setAuthor("Orris Mentor")

# ─────────────────────────────────────────────────── PAGE 1  COVER ────────────
draw_notebook_bg(c)

# Top decorative strip with gradient feel (stacked rects)
for i, shade in enumerate(["#1A237E","#283593","#303F9F","#3949AB","#3F51B5"]):
    c.setFillColor(colors.HexColor(shade))
    c.rect(0, H - (i+1)*8*mm, W, 8*mm, fill=1, stroke=0)

# Decorative stars in header
for sx, sy in [(30,H-20*mm),(W-30,H-20*mm),(W/2-80,H-28*mm),(W/2+80,H-28*mm)]:
    star_badge(c, sx, sy, col=GOLD)

T(c, "CLASS 11  CHEMISTRY", W/2, H-22*mm, size=22, color=colors.white, bold=True, align="center")
T(c, "CHAPTER  1", W/2, H-32*mm, size=15, color=colors.HexColor("#FFF176"), bold=True, align="center")

# Big title box
rbox(c, 28*mm, H-100*mm, W-56*mm, 52, fill=colors.HexColor("#E8EAF6"), stroke=NAVY, sw=2, r=10)
T(c, "Some Basic Concepts", W/2, H-74*mm, size=21, color=NAVY, bold=True, align="center")
T(c, "of  Chemistry", W/2, H-90*mm, size=21, color=NAVY, bold=True, align="center")

# Subtitle bar
rbox(c, 28*mm, H-112*mm, W-56*mm, 16, fill=NAVY, r=4)
T(c, "Board Exam  Β·  NEET / JEE Foundation  Β·  Complete Notes with Diagrams", W/2,
  H-106*mm, size=9, color=colors.white, align="center")

# Topic list
y = H - 130*mm
T(c, "WHAT'S INSIDE  :", 26*mm, y, size=11, color=CRIMSON, bold=True)
y -= 6*mm
topics = [
    ("1", "Nature of Matter & Classification  (Mind Map)"),
    ("2", "SI Units  Β·  Significant Figures  Β·  Scientific Notation"),
    ("3", "Laws of Chemical Combination  β˜… (All 5 Laws)"),
    ("4", "Dalton's Atomic Theory  +  Limitations"),
    ("5", "Atomic & Molecular Mass  (Formula Table)"),
    ("6", "MOLE CONCEPT  β˜…β˜…β˜…  β€” Triangle Diagram + 6 Solved Sums"),
    ("7", "Percentage Composition  (2 worked examples)"),
    ("8", "Empirical & Molecular Formula  (Step-by-step)"),
    ("9", "Stoichiometry  &  Limiting Reagent  β˜…β˜…β˜…"),
    ("10","Concentration Terms  (Molarity, Molality, Mole Fraction …)"),
    ("β˜…", "MASTER FORMULA SHEET  (Print & Pin on Wall!)"),
]
for num, topic in topics:
    bg = colors.HexColor("#FFF9C4") if "β˜…" in num else (FILL_BLUE if int(num if num.isdigit() else 0) % 2 == 0 else FILL_GREEN)
    rbox(c, 25*mm, y-5, W-50*mm, 16, fill=bg, r=3)
    col_num = GOLD if num == "β˜…" else CRIMSON
    T(c, num + ".", 27*mm, y+5, size=10, color=col_num, bold=True)
    T(c, topic, 35*mm, y+5, size=10, color=BODY)
    y -= 18

# Bottom badge
rbox(c, 22*mm, 18*mm, W-44*mm, 20, fill=FOREST, r=5)
T(c, "β˜…  Best of luck for your exams!  All concepts + Diagrams + Formula Sheet  β˜…",
  W/2, 24*mm, size=9.5, color=colors.white, bold=True, align="center")
page_number(c, 1)
c.showPage()

# ─────────────────────────────────────────────── PAGE 2  MATTER + SI UNITS ────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 1  β€”  Nature & Classification of Matter", y - 6, bg=NAVY)

# ── Mind-map style classification tree ──────────────────────────────────────
T(c, "CLASSIFICATION  OF  MATTER  β€”  Mind Map", 24*mm, y, size=11, color=CRIMSON, bold=True)
y -= 6

# Layout coordinates
cx   = W / 2
root_y = y - 10
L_y  = root_y - 56      # Pure Substance
R_y  = root_y - 56      # Mixture
L_x  = cx - 100
R_x  = cx + 100

# Root node
rbox(c, cx-35, root_y-10, 70, 22, fill=NAVY, r=6)
T(c, "MATTER", cx, root_y+6, size=11, color=colors.white, bold=True, align="center")

# Branches
arrow(c, cx-20, root_y-10, L_x+38, L_y+12, col=NAVY, w=1.8)
arrow(c, cx+20, root_y-10, R_x-38, R_y+12, col=CRIMSON, w=1.8)

# Pure Substance node
rbox(c, L_x-42, L_y-10, 84, 22, fill=FILL_BLUE, stroke=NAVY, sw=1.2, r=5)
T(c, "Pure Substance", L_x, L_y+6, size=10, color=NAVY, bold=True, align="center")

# Mixture node
rbox(c, R_x-38, R_y-10, 76, 22, fill=FILL_RED, stroke=CRIMSON, sw=1.2, r=5)
T(c, "Mixture", R_x, R_y+6, size=10, color=CRIMSON, bold=True, align="center")

# Children of Pure Substance
EL_x, EL_y = L_x-55, L_y-52
CO_x, CO_y = L_x+40, L_y-52
for nx, ny, lbl, bg, sc, ex in [
    (EL_x, EL_y, "Elements", FILL_GREEN, FOREST, "Fe, Oβ‚‚, Au, C"),
    (CO_x, CO_y, "Compounds", FILL_TEAL, TEAL, "Hβ‚‚O, NaCl, COβ‚‚"),
]:
    arrow(c, L_x - 15, L_y - 10, nx+35, ny+12, col=FOREST, w=1.4)
    rbox(c, nx-5, ny-10, 80, 22, fill=bg, stroke=sc, sw=1, r=4)
    T(c, lbl, nx+35, ny+6, size=9.5, color=sc, bold=True, align="center")
    T(c, ex, nx+35, ny-6, size=7.5, color=GREY, italic=True, align="center")

# Children of Mixture
HO_x, HO_y = R_x-68, R_y-52
HE_x, HE_y = R_x+30, R_y-52
for nx, ny, lbl, bg, sc, ex in [
    (HO_x, HO_y, "Homogeneous", FILL_YELLOW, ORANGE, "Saltwater, alloy"),
    (HE_x, HE_y, "Heterogeneous", FILL_ORANGE, DARK_GOLD, "Sand+water, smoke"),
]:
    arrow(c, R_x, R_y-10, nx+42, ny+12, col=ORANGE, w=1.4)
    rbox(c, nx-5, ny-10, 94, 22, fill=bg, stroke=sc, sw=1, r=4)
    T(c, lbl, nx+42, ny+6, size=9.5, color=sc, bold=True, align="center")
    T(c, ex, nx+42, ny-6, size=7.5, color=GREY, italic=True, align="center")

y = min(EL_y, HO_y) - 22

# ── States of Matter ─────────────────────────────────────────────────────────
y = subbanner(c, "  States of Matter", y-4, bg=FILL_BLUE, fg=NAVY)
states = [
    ("SOLID",   NAVY,   FILL_BLUE,   "Definite shape & volume",
     "Particles tightly packed, only vibrate in place",  "Ice, NaCl crystal"),
    ("LIQUID",  FOREST, FILL_GREEN,  "Definite volume, no fixed shape",
     "Particles close, flow & slide past each other",    "Water, mercury"),
    ("GAS",     ORANGE, FILL_ORANGE, "No fixed shape or volume",
     "Particles far apart, move freely & randomly",      "Oβ‚‚, COβ‚‚, steam"),
]
sx = 23*mm
box_w = (W - 50*mm) / 3 - 3
for name, nc, bg, prop, note, eg in states:
    # header strip
    rbox(c, sx, y - 8, box_w, 16, fill=nc, r=4)
    T(c, name, sx + box_w/2, y + 2, size=11, color=colors.white, bold=True, align="center")
    # body
    rbox(c, sx, y - 62, box_w, 54, fill=bg, r=4)
    T(c, prop, sx + box_w/2, y-16, size=8.5, color=BODY, bold=True, align="center")
    # wrap note
    wrapped = textwrap.wrap(note, width=28)
    wy = y - 30
    for line in wrapped:
        T(c, line, sx + box_w/2, wy, size=8, color=GREY, align="center")
        wy -= 10
    T(c, "e.g. " + eg, sx + box_w/2, y-62, size=8, color=nc, italic=True, align="center")
    sx += box_w + 6
y -= 74

# ── Temperature Conversions ────────────────────────────────────────────────
y = subbanner(c, "  Temperature Conversions", y-6, bg=FILL_PURPLE, fg=PURPLE)
convs = [
    ("K  =  Β°C  +  273.15",     "Celsius β†’ Kelvin"),
    ("Β°F  =  9/5 Γ— Β°C  +  32",  "Celsius β†’ Fahrenheit"),
    ("Β°C  =  (Β°F βˆ’ 32) Γ— 5/9",  "Fahrenheit β†’ Celsius"),
]
px = 23*mm; bw = (W - 48*mm) / 3 - 3
for formula, desc in convs:
    rbox(c, px, y-20, bw+2, 24, fill=FILL_FORM, stroke=PURPLE, sw=1, r=6)
    T(c, formula, px + (bw+2)/2, y - 4, size=10, color=PURPLE, bold=True, align="center")
    T(c, desc, px + (bw+2)/2, y - 16, size=8, color=GREY, align="center")
    px += bw + 7
y -= 30

page_number(c, 2)
c.showPage()

# ─────────────────────────────────────────── PAGE 3  SIG FIGS + LAWS ──────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 2  β€”  Significant Figures & Scientific Notation", y-6, bg=PURPLE)

T(c, "SIGNIFICANT FIGURES β€” Rules", 24*mm, y, size=11, color=PURPLE, bold=True)
y -= 5

# Table
col_x = [23*mm, 34*mm, 116*mm, 154*mm]
# Header
rbox(c, 22*mm, y-14, W-31*mm, 17, fill=PURPLE, r=3)
for hd, hx in zip(["#", "Rule", "Status", "Example"], col_x):
    T(c, hd, hx, y-5, size=9.5, color=colors.white, bold=True)
y -= 14

rows_sf = [
    ("1", "All NON-ZERO digits",           "βœ“ Significant",   "1234  β†’  4"),
    ("2", "Zeros BETWEEN non-zero digits",  "βœ“ Significant",   "1004  β†’  4"),
    ("3", "LEADING zeros",                  "βœ— NOT sig",       "0.0045  β†’  2"),
    ("4", "TRAILING zeros after decimal",   "βœ“ Significant",   "3.500  β†’  4"),
    ("5", "Trailing zeros, NO decimal",     "? Ambiguous",     "1500  β†’  2 or 4"),
]
for i, (n, rule, stat, ex) in enumerate(rows_sf):
    bg = FILL_PURPLE if i % 2 == 0 else colors.white
    rbox(c, 22*mm, y-13, W-31*mm, 14, fill=bg, r=0)
    T(c, n, col_x[0], y-5, size=9.5, color=BODY)
    T(c, rule, col_x[1], y-5, size=9.5, color=BODY)
    sc = FOREST if "βœ“" in stat else CRIMSON if "βœ—" in stat else ORANGE
    T(c, stat, col_x[2], y-5, size=9.5, color=sc, bold=True)
    T(c, ex,   col_x[3], y-5, size=9, color=GREY, italic=True)
    y -= 14

y -= 4
y = subbanner(c, "  Scientific Notation  β†’  express as  N Γ— 10ⁿ   (1 ≀ N < 10)", y, bg=FILL_TEAL, fg=TEAL)
sn_examples = [
    ("0.000345",  "3.45 Γ— 10⁻⁴", TEAL),
    ("456000",    "4.56 Γ— 10⁡",   NAVY),
    ("0.00100",   "1.00 Γ— 10⁻³",  FOREST),
    ("26800000",  "2.68 Γ— 10⁷",   PURPLE),
]
bw2 = (W - 48*mm) / 4 - 3; px2 = 23*mm
for val, res, col in sn_examples:
    rbox(c, px2, y-26, bw2+2, 28, fill=FILL_BLUE, stroke=col, sw=1, r=5)
    T(c, val, px2 + (bw2+2)/2, y-8, size=10, color=BODY, bold=True, align="center")
    T(c, "= " + res, px2 + (bw2+2)/2, y-20, size=10, color=col, bold=True, align="center")
    px2 += bw2 + 7
y -= 36

# ── LAWS OF CHEMICAL COMBINATION ─────────────────────────────────────────────
y = banner(c, "  TOPIC 3  β€”  Laws of Chemical Combination  β˜… Exam Favourite", y-8, bg=CRIMSON)

laws = [
    ("LAW 1", "Law of Conservation of Mass", "Lavoisier  (1789)",
     "Total mass of REACTANTS  =  Total mass of PRODUCTS",
     "2Hβ‚‚ + Oβ‚‚ β†’ 2Hβ‚‚O  :  4g + 32g = 36g  βœ“", FILL_BLUE, NAVY),
    ("LAW 2", "Law of Definite Proportions", "Proust  (1799)",
     "A compound ALWAYS has elements in a FIXED mass ratio",
     "Hβ‚‚O always  H : O  =  1 : 8  regardless of source", FILL_GREEN, FOREST),
    ("LAW 3", "Law of Multiple Proportions", "Dalton  (1803)",
     "Masses of one element that combine with fixed mass of other β†’ simple whole-number ratio",
     "CO vs COβ‚‚  :  O per 12g C  =  16g vs 32g  β†’  ratio 1:2", FILL_YELLOW, ORANGE),
    ("LAW 4", "Gay-Lussac's Law of Gaseous Volumes", "Gay-Lussac",
     "Gases combine in SIMPLE RATIOS by VOLUME (same T & P)",
     "Hβ‚‚ : Oβ‚‚ : Hβ‚‚O  =  2 : 1 : 2  (volumes)", FILL_RED, CRIMSON),
    ("LAW 5", "Avogadro's Law", "Avogadro  (1811)",
     "Equal volumes of gases at same T & P  β†’  equal NUMBER of molecules",
     "1 L Nβ‚‚  =  1 L Oβ‚‚  (same no. of molecules)", FILL_PURPLE, PURPLE),
]
for tag, name, who, rule, eg, bg, fc in laws:
    h = 46
    rbox(c, 22*mm, y - h, W - 31*mm, h, fill=bg, stroke=fc, sw=0.8, r=5)
    # tag badge
    rbox(c, 22*mm, y - h, 28, h, fill=fc, r=5)
    T(c, tag, 36*mm, y - h/2 + 4, size=8.5, color=colors.white, bold=True, align="center")
    T(c, name, 56*mm, y - 10, size=10.5, color=fc, bold=True)
    T(c, who,  56*mm, y - 22, size=8.5, color=GREY, italic=True)
    # rule text wrap
    wrapped = textwrap.wrap(rule, width=82)
    ry = y - 32
    for line in wrapped:
        T(c, line, 56*mm, ry, size=9.5, color=BODY)
        ry -= 11
    T(c, "  e.g.  " + eg, 56*mm, y - h + 6, size=8.5, color=fc, italic=True)
    y -= h + 4

page_number(c, 3)
c.showPage()

# ─────────────────────────────────────── PAGE 4  DALTON + ATOMIC MASS ─────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 4  β€”  Dalton's Atomic Theory", y-6, bg=TEAL)

T(c, "POSTULATES", 24*mm, y, size=11, color=TEAL, bold=True)
y -= 5
posts = [
    "Matter is made of extremely tiny, INDIVISIBLE particles called ATOMS.",
    "Atoms of the SAME element are identical in size, mass & chemical properties.",
    "Atoms of DIFFERENT elements differ in size, mass & properties.",
    "Atoms combine in simple WHOLE-NUMBER ratios to form compounds.",
    "Atoms can NEITHER be created NOR destroyed in chemical reactions.",
]
for i, p in enumerate(posts):
    bg = FILL_TEAL if i % 2 == 0 else colors.white
    rbox(c, 22*mm, y - 18, W - 31*mm, 20, fill=bg, r=3)
    # numbered circle
    c.setFillColor(TEAL)
    c.circle(29*mm, y - 7, 6.5, fill=1, stroke=0)
    T(c, str(i+1), 29*mm, y-10, size=8.5, color=colors.white, bold=True, align="center")
    T(c, p, 38*mm, y - 7, size=9.5, color=BODY)
    y -= 22

y -= 4
y = subbanner(c, "  Limitations of Dalton's Atomic Theory", y, bg=FILL_RED, fg=CRIMSON)
limits = [
    "Cannot explain ISOTOPES  (same element, different masses  e.g. ¹²C and ¹⁴C)",
    "Cannot explain ISOBARS  (different elements, same mass number)",
    "ATOM IS DIVISIBLE  β€”  has electrons, protons & neutrons (sub-atomic particles)",
    "Cannot explain why same elements form different compounds  (allotropes)",
    "Does not account for ELECTRICAL nature of matter",
]
for l in limits:
    bullet_row(c, l, 22*mm, y, size=9.5, col=CRIMSON, dot_col=CRIMSON)
    y -= 15

y -= 6
y = banner(c, "  TOPIC 5  β€”  Atomic & Molecular Mass", y, bg=FOREST)

rbox(c, 22*mm, y - 20, W - 31*mm, 22, fill=FILL_FORM, stroke=FOREST, sw=1.5, r=6)
T(c, "1 amu (u)  =  1/12 th mass of ΒΉΒ²C atom  =  1.66056 Γ— 10⁻²⁷ kg", 24*mm, y - 8, size=11, color=FOREST, bold=True)
y -= 28

T(c, "Molecular Mass  =  Sum of atomic masses of ALL atoms in one molecule", 24*mm, y, size=10, color=BODY)
y -= 14

# Molecule mass grid
mols = [
    ("Hβ‚‚O",    "2(1)+16",       "18 u"),
    ("COβ‚‚",    "12+2(16)",      "44 u"),
    ("Hβ‚‚SOβ‚„",  "2+32+4(16)",   "98 u"),
    ("HNO₃",   "1+14+3(16)",   "63 u"),
    ("NaCl",   "23+35.5",      "58.5 u"),
    ("CaCO₃",  "40+12+3(16)", "100 u"),
    ("NH₃",    "14+3(1)",       "17 u"),
    ("CHβ‚„",    "12+4(1)",       "16 u"),
    ("HCl",    "1+35.5",       "36.5 u"),
    ("NaOH",   "23+16+1",       "40 u"),
]
ncols = 5; bw_m = (W - 46*mm) / ncols - 3; mx = 23*mm
for i, (mol, calc, mass) in enumerate(mols):
    col_i = i % ncols; row_i = i // ncols
    bx = mx + col_i * (bw_m + 3)
    by = y - row_i * 32
    bg_m = [FILL_BLUE, FILL_GREEN, FILL_YELLOW, FILL_TEAL, FILL_PURPLE][col_i]
    rbox(c, bx, by - 28, bw_m, 28, fill=bg_m, stroke=None, r=5)
    T(c, mol,  bx + bw_m/2, by - 8,  size=11, color=NAVY,   bold=True, align="center")
    T(c, calc, bx + bw_m/2, by - 18, size=7.5, color=GREY,  align="center")
    T(c, mass, bx + bw_m/2, by - 26, size=9.5, color=CRIMSON, bold=True, align="center")
y -= (len(mols)//ncols + 1) * 32 + 6

# Atomic masses strip
y = subbanner(c, "  Essential Atomic Masses  (Memorize!)", y, bg=FILL_YELLOW, fg=ORANGE)
atoms = [("H","1"),("C","12"),("N","14"),("O","16"),("Na","23"),("Mg","24"),
         ("Al","27"),("S","32"),("Cl","35.5"),("K","39"),("Ca","40"),("Fe","56"),
         ("Cu","63.5"),("Zn","65"),("Ag","108"),("I","127"),("Ba","137"),("Pb","207")]
ncols_a = 9; bw_a = (W - 46*mm) / ncols_a - 2; ax = 23*mm
for i, (sym, am) in enumerate(atoms):
    ci = i % ncols_a; ri = i // ncols_a
    bx = ax + ci * (bw_a + 2)
    by = y - ri * 28
    rbox(c, bx, by - 24, bw_a, 24, fill=FILL_FORM, stroke=NAVY, sw=0.6, r=4)
    T(c, sym, bx + bw_a/2, by - 8,  size=10,   color=NAVY, bold=True, align="center")
    T(c, am,  bx + bw_a/2, by - 20, size=8.5,  color=CRIMSON, align="center")

page_number(c, 4)
c.showPage()

# ─────────────────────────────────────────── PAGE 5  MOLE CONCEPT ─────────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 6  β€”  MOLE CONCEPT  β˜…β˜…β˜…  (Most Important!)", y-6, bg=CRIMSON)

# Definition mega-box
rbox(c, 22*mm, y - 28, W - 31*mm, 30, fill=colors.HexColor("#FCE4EC"), stroke=CRIMSON, sw=2, r=8)
T(c, "1  MOLE  =  6.022 Γ— 10Β²Β³  particles  =  Avogadro's Number  (Nₐ)",
  W/2, y - 10, size=12.5, color=CRIMSON, bold=True, align="center")
T(c, '"Just like  DOZEN = 12,   a MOLE = 6.022 Γ— 10Β²Β³  (atoms / molecules / ions)"',
  W/2, y - 22, size=9.5, color=BODY, italic=True, align="center")
y -= 38

# ── MOLE TRIANGLE DIAGRAM ─────────────────────────────────────────────────────
T(c, "THE  MOLE  TRIANGLE  DIAGRAM", W/2, y, size=12, color=NAVY, bold=True, align="center")
y -= 8

# Positions
top_x, top_y  = W/2,          y - 12    # MOLES  (center top)
L_x,  L_y    = W/2 - 110,    y - 100   # MASS   (left)
R_x,  R_y    = W/2 + 110,    y - 100   # PARTICLES (right)
bot_x, bot_y = W/2,           y - 175   # VOLUME (center bottom)

def node(c, nx, ny, label, sub, bg, r=28):
    c.setFillColor(bg)
    c.circle(nx, ny, r, fill=1, stroke=0)
    c.setStrokeColor(colors.white); c.setLineWidth(2)
    c.circle(nx, ny, r, fill=0, stroke=1)
    c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9.5)
    c.drawCentredString(nx, ny + 3, label)
    c.setFont("Helvetica", 7.5)
    c.drawCentredString(nx, ny - 8, sub)

node(c, top_x, top_y, "MOLES  (n)", "",       NAVY)
node(c, L_x,   L_y,   "MASS",       "(grams)", CRIMSON)
node(c, R_x,   R_y,   "PARTICLES",  "(N)",     FOREST)
node(c, bot_x, bot_y, "VOLUME",     "(STP, L)",TEAL)

# Draw connector arrows
for (x1,y1,x2,y2,col) in [
    (top_x-20, top_y-26, L_x+20,  L_y+26,  NAVY),
    (top_x+20, top_y-26, R_x-20,  R_y+26,  NAVY),
    (L_x+26,  L_y,      R_x-26,  R_y,     NAVY),
    (top_x,   top_y-28, bot_x,   bot_y+28, TEAL),
]:
    double_arrow(c, x1, y1, x2, y2, col=col, w=1.8)

# Labels on arrows
mid2 = lambda a,b,c2,d: ((a+c2)/2,(b+d)/2)
arrow_info = [
    (mid2(top_x-20, top_y-26, L_x+20, L_y+26), "Γ·M", "Γ—M", CRIMSON, -52, 6),
    (mid2(top_x+20, top_y-26, R_x-20, R_y+26), "Γ·Nₐ","Γ—Nₐ",FOREST,  12, 6),
    (mid2(L_x+26, L_y, R_x-26, R_y),           "n = m/M","",NAVY,    -22,-18),
    (mid2(top_x, top_y-28, bot_x, bot_y+28),   "Γ·22.4","Γ—22.4",TEAL, -48, 6),
]
for (mx,my), t1, t2, fc, dx, dy in arrow_info:
    tw = max(len(t1), len(t2), 8) * 6 + 10
    rbox(c, mx+dx-2, my+dy-6, tw, 22, fill=FILL_YELLOW, r=4)
    T(c, t1, mx+dx+2, my+dy+9,  size=8, color=fc, bold=True)
    if t2:
        T(c, t2, mx+dx+2, my+dy,   size=8, color=CRIMSON, bold=True)

y = bot_y - 38

# Key formulas
y = subbanner(c, "  KEY FORMULAS", y, bg=FILL_FORM, fg=NAVY)
fmls = [
    ("n = m / M",           "moles from mass",          NAVY),
    ("n = N / Nₐ",          "moles from particles",     CRIMSON),
    ("n = V / 22.4",        "moles from volume (STP)",  TEAL),
    ("m = n Γ— M",           "mass from moles",          FOREST),
    ("N = n Γ— Nₐ",          "particles from moles",     PURPLE),
    ("Nₐ = 6.022 Γ— 10Β²Β³",  "Avogadro's constant",      ORANGE),
]
bw_f = (W - 46*mm) / 3 - 4
fx = 23*mm
for i, (f, d, col) in enumerate(fmls):
    ci = i % 3; ri = i // 3
    bx = fx + ci * (bw_f + 7)
    by = y - ri * 26
    rbox(c, bx, by - 22, bw_f, 22, fill=FILL_FORM, stroke=col, sw=1.2, r=5)
    T(c, f, bx + 6, by - 7, size=10.5, color=col, bold=True)
    T(c, d, bx + 6, by - 18, size=8, color=GREY, italic=True)

y -= 58
rbox(c, 22*mm, y-16, W-31*mm, 18, fill=FILL_RED, stroke=CRIMSON, sw=1, r=4)
T(c, "STP  =  Standard Temperature & Pressure  =  0Β°C (273 K),  1 atm   |   1 mol any gas  =  22.4 L",
  W/2, y-5, size=10, color=CRIMSON, bold=True, align="center")

page_number(c, 5)
c.showPage()

# ─────────────────────────────────────── PAGE 6  MOLE NUMERICALS ──────────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  MOLE CONCEPT  β€”  6 Solved Numericals  β˜…β˜…β˜…", y-6, bg=FOREST)

problems = [
    ("Q1", "How many moles are in  36 g  of Hβ‚‚O?",
     ["Molar mass of Hβ‚‚O  =  2(1) + 16  =  18 g/mol",
      "n  =  m / M  =  36 / 18"],
     "n  =  2  mol", FILL_BLUE, NAVY),
    ("Q2", "How many molecules are in  44 g  of COβ‚‚?",
     ["Molar mass COβ‚‚  =  44 g/mol   β†’   n  =  44/44  =  1 mol",
      "Molecules  =  n Γ— Nₐ  =  1 Γ— 6.022Γ—10Β²Β³"],
     "=  6.022 Γ— 10Β²Β³  molecules", FILL_GREEN, FOREST),
    ("Q3", "Find the mass of  3 mol  of NaCl",
     ["Molar mass NaCl  =  23 + 35.5  =  58.5 g/mol",
      "m  =  n Γ— M  =  3 Γ— 58.5"],
     "m  =  175.5 g", FILL_YELLOW, ORANGE),
    ("Q4", "Find volume of  0.5 mol  Oβ‚‚  at STP",
     ["At STP:  1 mol of any gas  =  22.4 L",
      "V  =  n Γ— 22.4  =  0.5 Γ— 22.4"],
     "V  =  11.2 L", FILL_PURPLE, PURPLE),
    ("Q5", "How many moles in  3.011 Γ— 10Β²Β³  atoms of Fe?",
     ["Nₐ  =  6.022 Γ— 10Β²Β³",
      "n  =  N / Nₐ  =  3.011Γ—10Β²Β³ / 6.022Γ—10Β²Β³"],
     "n  =  0.5  mol", FILL_RED, CRIMSON),
    ("Q6", "Find atoms in  24 g  of Carbon",
     ["Molar mass C  =  12 g/mol  β†’  n  =  24/12  =  2 mol",
      "Atoms  =  2 Γ— 6.022Γ—10Β²Β³"],
     "=  1.204 Γ— 10²⁴  atoms", FILL_TEAL, TEAL),
]
for tag, q, steps, ans, bg, col in problems:
    h = 68
    rbox(c, 22*mm, y - h, W - 31*mm, h, fill=bg, stroke=col, sw=0.8, r=6)
    # Question tag strip
    rbox(c, 22*mm, y - h, 22, h, fill=col, r=5)
    T(c, tag, 33*mm, y - h/2 + 5, size=9, color=colors.white, bold=True, align="center")
    T(c, tag, 33*mm, y - h/2 - 5, size=8, color=colors.white, align="center")
    # Q text
    T(c, "β–Ί " + q, 50*mm, y - 12, size=10, color=col, bold=True)
    # Steps
    for si, step in enumerate(steps):
        T(c, "   " + step, 50*mm, y - 26 - si*14, size=9.5, color=BODY)
    # Answer box
    aw = len(ans)*6.5 + 20
    rbox(c, W - 28*mm - aw, y - h + 5, aw, 18, fill=col, r=5)
    T(c, ans, W - 28*mm - aw/2, y - h + 14, size=10, color=colors.white, bold=True, align="center")
    y -= h + 6

page_number(c, 6)
c.showPage()

# ─────────────────────────── PAGE 7  % COMP + EMP / MOL FORMULA ──────────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 7  β€”  Percentage Composition", y-6, bg=ORANGE)

rbox(c, 22*mm, y-22, W-31*mm, 24, fill=FILL_FORM, stroke=ORANGE, sw=1.5, r=6)
T(c, "% by mass of element  =  (Mass of element in 1 mol compound / Molar mass of compound)  Γ— 100",
  W/2, y-8, size=10.5, color=ORANGE, bold=True, align="center")
y -= 32

for mol, mm_val, data, col, bg in [
    ("Hβ‚‚O", "18 g/mol",
     [("%  H", "2/18 Γ— 100", "11.11 %"), ("%  O", "16/18 Γ— 100", "88.89 %")],
     NAVY, FILL_BLUE),
    ("COβ‚‚", "44 g/mol",
     [("%  C", "12/44 Γ— 100", "27.27 %"), ("%  O", "32/44 Γ— 100", "72.73 %")],
     FOREST, FILL_GREEN),
    ("Hβ‚‚SOβ‚„", "98 g/mol",
     [("%  H", "2/98 Γ— 100", "2.04 %"), ("%  S", "32/98 Γ— 100", "32.65 %"),
      ("%  O", "64/98 Γ— 100", "65.31 %")],
     CRIMSON, FILL_RED),
]:
    y = subbanner(c, f"  Example: {mol}   (Molar mass = {mm_val})", y, bg=bg, fg=col)
    for lab, calc, result in data:
        rbox(c, 23*mm, y-14, W-32*mm, 14, fill=bg, r=0)
        T(c, lab,    28*mm,  y-5,  size=10.5, color=col, bold=True)
        T(c, "=  " + calc,  50*mm,  y-5,  size=10,   color=BODY)
        T(c, "=  " + result, 125*mm, y-5,  size=11,   color=CRIMSON, bold=True)
        y -= 14
    y -= 6

# ── EMPIRICAL & MOLECULAR FORMULA ─────────────────────────────────────────────
y = banner(c, "  TOPIC 8  β€”  Empirical & Molecular Formula  β˜…β˜…", y, bg=PURPLE)

rbox(c, 22*mm, y-22, W-31*mm, 24, fill=FILL_FORM, stroke=PURPLE, sw=1.5, r=6)
T(c, "Molecular Formula  =  n  Γ—  Empirical Formula          n  =  Molar Mass  Γ·  Empirical Formula Mass",
  W/2, y-8, size=10.5, color=PURPLE, bold=True, align="center")
y -= 32

y = subbanner(c, "  Steps to Find Empirical Formula", y, bg=FILL_PURPLE, fg=PURPLE)
steps_ef = [
    "Step 1 β€” Write % of each element (treat as mass in 100g)",
    "Step 2 β€” Divide each by its atomic mass  β†’  mole ratio",
    "Step 3 β€” Divide all by the SMALLEST value",
    "Step 4 β€” If non-integers, multiply all to get whole numbers",
    "Step 5 β€” Write EF  β†’  use  n = Molar mass / EF mass  β†’  Molecular Formula",
]
for s in steps_ef:
    bullet_row(c, s, 22*mm, y, size=10, col=PURPLE, dot_col=PURPLE)
    y -= 15

y -= 4
y = subbanner(c, "  Worked Example: 40% C,  6.67% H,  53.33% O   (Molar mass = 180 g/mol)", y, bg=FILL_GREEN, fg=FOREST)

col_ex = [24*mm, 52*mm, 96*mm, 138*mm, 168*mm]
hds = ["Element", "%", "Γ· At. mass", "Γ· smallest", "Ratio"]
rbox(c, 22*mm, y-14, W-31*mm, 16, fill=FOREST, r=3)
for h, cx in zip(hds, col_ex):
    T(c, h, cx, y-6, size=9.5, color=colors.white, bold=True)
y -= 14

tbl = [("C","40","40/12 = 3.33","3.33/3.33 = 1","1"),
       ("H","6.67","6.67/1 = 6.67","6.67/3.33 = 2","2"),
       ("O","53.33","53.33/16 = 3.33","3.33/3.33 = 1","1")]
for i,(el,p,div,sm,r) in enumerate(tbl):
    bg_t = FILL_GREEN if i%2==0 else colors.white
    rbox(c, 22*mm, y-13, W-31*mm, 13, fill=bg_t, r=0)
    for val, cx in zip([el,p,div,sm,r], col_ex):
        T(c, val, cx, y-5, size=9.5, color=BODY)
    y -= 13

y -= 6
rbox(c, 22*mm, y-16, W-31*mm, 18, fill=FILL_FORM, stroke=PURPLE, sw=1.2, r=4)
T(c, "Empirical Formula  =  CHβ‚‚O     EF Mass  =  12+2+16  =  30 g/mol",
  24*mm, y-5, size=10.5, color=PURPLE, bold=True)
y -= 22
rbox(c, 22*mm, y-16, W-31*mm, 18, fill=FILL_GREEN, stroke=FOREST, sw=1.5, r=4)
T(c, "n  =  180 / 30  =  6      ∴  Molecular Formula  =  C₆H₁₂O₆   (GLUCOSE!)",
  24*mm, y-5, size=11, color=FOREST, bold=True)

page_number(c, 7)
c.showPage()

# ──────────────────────────── PAGE 8  STOICHIOMETRY + LIMITING REAGENT ────────
draw_notebook_bg(c)
y = H - 18*mm
T(c, "Ch-1  Β·  Some Basic Concepts of Chemistry", 24*mm, y, size=9, color=GREY, italic=True)
y = banner(c, "  TOPIC 9  β€”  Stoichiometry  &  Limiting Reagent  β˜…β˜…β˜…", y-6, bg=NAVY)

T(c, "STOICHIOMETRY  =  Quantitative relationship between reactants & products in a balanced equation.",
  24*mm, y, size=10, color=BODY)
y -= 16

y = subbanner(c, "  Reaction:   Nβ‚‚  +  3Hβ‚‚  β†’  2NH₃", y, bg=FILL_BLUE, fg=NAVY)

# Reaction interpretation boxes
interps = [
    ("Moles",      "1 mol Nβ‚‚  +  3 mol Hβ‚‚  β†’  2 mol NH₃"),
    ("Mass",       "28 g Nβ‚‚  +  6 g Hβ‚‚  β†’  34 g NH₃"),
    ("Molecules",  "1Γ—Nₐ  Nβ‚‚  +  3Γ—Nₐ  Hβ‚‚  β†’  2Γ—Nₐ  NH₃"),
    ("Volumes(STP)","22.4 L Nβ‚‚ + 67.2 L Hβ‚‚ β†’ 44.8 L NH₃"),
]
bw_i = (W - 46*mm) / 2 - 3; ix = 23*mm
for i, (label, val) in enumerate(interps):
    ci = i % 2; ri = i // 2
    bx = ix + ci * (bw_i + 8)
    by = y - ri * 28
    rbox(c, bx, by - 24, bw_i, 24, fill=[FILL_BLUE,FILL_GREEN,FILL_YELLOW,FILL_TEAL][i], r=4)
    T(c, label + ":", bx+5, by-8,  size=9.5, color=NAVY, bold=True)
    T(c, val,          bx+5, by-20, size=8.5, color=BODY)
y -= 62

# LIMITING REAGENT
y = subbanner(c, "  LIMITING REAGENT  β€”  The reactant that runs out FIRST  β˜…β˜…β˜…", y, bg=FILL_RED, fg=CRIMSON)

rbox(c, 22*mm, y-22, W-31*mm, 24, fill=FILL_FORM, stroke=CRIMSON, sw=1.5, r=6)
T(c, "METHOD:  Divide moles by stoichiometric coefficient  β†’  SMALLEST value  =  Limiting Reagent",
  W/2, y-8, size=10.5, color=CRIMSON, bold=True, align="center")
y -= 32

y = subbanner(c, "  Solved Example:  14 g Nβ‚‚  +  6 g Hβ‚‚  β†’  NH₃", y, bg=FILL_YELLOW, fg=ORANGE)

lr_steps = [
    ("Step 1", "Convert to moles",
     "Nβ‚‚: n = 14/28 = 0.5 mol",     "Hβ‚‚: n = 6/2 = 3 mol"),
    ("Step 2", "Divide by coefficient",
     "Nβ‚‚: 0.5 Γ· 1 = 0.5",           "Hβ‚‚: 3 Γ· 3 = 1.0"),
    ("Step 3", "Compare  β†’  smaller = LR",
     "0.5  <  1.0",                   "∴  Nβ‚‚  is LIMITING REAGENT  β˜…"),
    ("Step 4", "Calculate product",
     "NH₃ = 0.5 Γ— 2 = 1 mol",       "Mass NH₃ = 1 Γ— 17 = 17 g"),
]
for tag, desc, left, right in lr_steps:
    hl = CRIMSON if "LIMITING" in right else NAVY
    bg_l = FILL_RED if "LIMITING" in right else FILL_YELLOW
    rbox(c, 22*mm, y-22, W-31*mm, 24, fill=bg_l, r=4)
    rbox(c, 22*mm, y-22, 28, 24, fill=hl, r=4)
    T(c, tag, 36*mm, y-8, size=8.5, color=colors.white, bold=True, align="center")
    T(c, desc + ":", 54*mm, y-8, size=10, color=hl, bold=True)
    T(c, left,  54*mm, y-18, size=9.5, color=BODY)
    T(c, right, 120*mm, y-18, size=9.5, color=CRIMSON if "LIMITING" in right else FOREST, bold="LIMITING" in right)
    y -= 26

rbox(c, 22*mm, y-18, W-31*mm, 20, fill=FILL_GREEN, stroke=FOREST, sw=1.5, r=5)
T(c, "EXCESS REAGENT  =  Hβ‚‚  (left over)   |   Excess Hβ‚‚  =  3 βˆ’ 3Γ—0.5  =  1.5 mol",
  24*mm, y-7, size=10, color=FOREST, bold=True)
y -= 28

# ── CONCENTRATION TERMS ───────────────────────────────────────────────────────
y = banner(c, "  TOPIC 10  β€”  Concentration Terms", y-4, bg=TEAL)

conc = [
    ("Molarity  (M)",       "n(solute)\nV(soln in L)",       "mol/L",       "Most used; changes with temperature", FILL_BLUE, NAVY),
    ("Molality  (m)",       "n(solute)\nkg(solvent)",         "mol/kg",      "Temperature-independent", FILL_GREEN, FOREST),
    ("Mole Fraction  (Ο‡)", "nA\n(nA + nB)",                  "Dimensionless","Ο‡A + Ο‡B = 1  always", FILL_PURPLE, PURPLE),
    ("Mass %  (%w/w)",      "msolute Γ— 100\nmsolution",       "%",           "e.g. '40% NaOH'", FILL_YELLOW, ORANGE),
    ("ppm",                 "msolute Γ— 10⁢\nmsolution",       "mg/kg",       "Very dilute solutions", FILL_RED, CRIMSON),
]
bw_c = (W - 46*mm) / 5 - 2; cx2 = 23*mm
for label, formula, unit, note, bg, col in conc:
    rbox(c, cx2, y - 62, bw_c, 62, fill=bg, stroke=col, sw=1, r=6)
    rbox(c, cx2, y - 14, bw_c, 14, fill=col, r=4)
    T(c, label, cx2 + bw_c/2, y - 6, size=7.5, color=colors.white, bold=True, align="center")
    # formula
    T(c, formula.split("\n")[0], cx2+bw_c/2, y-26, size=9,   color=col, bold=True, align="center")
    c.setStrokeColor(col); c.setLineWidth(0.8)
    c.line(cx2+6, y-30, cx2+bw_c-6, y-30)
    T(c, formula.split("\n")[1], cx2+bw_c/2, y-40, size=9,   color=col, bold=True, align="center")
    T(c, "Unit: " + unit, cx2+bw_c/2, y-50, size=7.5, color=GREY, align="center")
    for li, ln in enumerate(textwrap.wrap(note, 16)):
        T(c, ln, cx2+bw_c/2, y-56-li*7, size=6.5, color=GREY, italic=True, align="center")
    cx2 += bw_c + 4

page_number(c, 8)
c.showPage()

# ──────────────────────────── PAGE 9  MASTER FORMULA SHEET ────────────────────
draw_notebook_bg(c)

# Gold header
c.setFillColor(colors.HexColor("#F57F17"))
c.rect(0, H-30*mm, W, 30*mm, fill=1, stroke=0)
c.setFillColor(colors.white)
c.setFont("Helvetica-Bold", 19)
c.drawCentredString(W/2, H-16*mm, "β˜…  MASTER FORMULA SHEET  β˜…")
c.setFont("Helvetica-Bold", 10)
c.drawCentredString(W/2, H-25*mm, "Class 11 Chemistry  |  Chapter 1  |  Print & Pin on Your Wall!")

# Stars on header
for sx in [40, 80, W-80, W-40]:
    star_badge(c, sx, H-20*mm, col=colors.HexColor("#FFF176"))

y = H - 38*mm

sections_fs = [
    ("MOLE CONCEPT", NAVY, FILL_BLUE, [
        ("n = m / M",             "moles from mass"),
        ("n = N / Nₐ",            "moles from particles"),
        ("n = V / 22.4",          "moles from volume at STP"),
        ("m = n Γ— M",             "mass from moles"),
        ("N = n Γ— Nₐ",            "particles from moles"),
        ("Nₐ = 6.022 Γ— 10Β²Β³",    "Avogadro constant"),
        ("1 mol gas = 22.4 L",    "at STP only"),
        ("STP = 0Β°C, 1 atm",      "standard conditions"),
    ]),
    ("CONCENTRATION", CRIMSON, FILL_RED, [
        ("M = n / V(L)",               "Molarity"),
        ("m = n / kg(solvent)",        "Molality"),
        ("Ο‡A = nA / (nA+nB)",         "Mole Fraction"),
        ("% = (msolute/msolution)Γ—100","Mass Percent"),
        ("ppm = (m/m) Γ— 10⁢",         "Parts per million"),
    ]),
    ("% COMP & FORMULA", FOREST, FILL_GREEN, [
        ("% el = (at.mass in cpd / mol.mass) Γ— 100", "% composition"),
        ("n = Molar Mass / EF Mass",                  "finding n"),
        ("Mol.Formula = n Γ— Emp.Formula",             "relationship"),
    ]),
    ("TEMPERATURE", PURPLE, FILL_PURPLE, [
        ("K = Β°C + 273.15",          "Celsius to Kelvin"),
        ("Β°F = (9/5 Γ— Β°C) + 32",    "Celsius to Fahrenheit"),
        ("Β°C = (Β°F βˆ’ 32) Γ— 5/9",    "Fahrenheit to Celsius"),
    ]),
]
for sec, col, bg, items in sections_fs:
    # Section header
    rbox(c, 22*mm, y-16, W-31*mm, 18, fill=col, r=4)
    star_badge(c, 28*mm, y-6, n=5, r_out=6, r_in=3, col=GOLD)
    T(c, sec, 36*mm, y-4, size=11, color=colors.white, bold=True)
    y -= 20

    bw_fml = (W - 46*mm) / 2 - 4
    for i, (f, d) in enumerate(items):
        ci = i % 2; ri = i // 2
        bx = 23*mm + ci * (bw_fml + 8)
        by = y - ri * 20
        rbox(c, bx, by-16, bw_fml, 16, fill=bg, stroke=col, sw=0.6, r=4)
        T(c, f, bx+6, by-4, size=9.5, color=col, bold=True)
        T(c, "β†’ " + d, bx+6, by-13, size=8, color=GREY)
    y -= (len(items)//2 + 1) * 20 + 8

# Common molar masses
c.setFillColor(colors.HexColor("#263238"))
c.roundRect(22*mm, y-16, W-31*mm, 18, 4, fill=1, stroke=0)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 10.5)
c.drawCentredString(W/2, y-5, "COMMON MOLAR MASSES  (Memorize!)")
y -= 22

common_mm = [
    ("Hβ‚‚O","18"),("COβ‚‚","44"),("Hβ‚‚SOβ‚„","98"),("HCl","36.5"),("HNO₃","63"),
    ("NaCl","58.5"),("NaOH","40"),("NH₃","17"),("CHβ‚„","16"),("C₆H₁₂O₆","180"),
    ("CaCO₃","100"),("Naβ‚‚CO₃","106"),("KMnOβ‚„","158"),("FeSOβ‚„","152"),("CuSOβ‚„","160"),
]
ncm = 5; bw_cm = (W - 46*mm) / ncm - 2; ax2 = 23*mm
for i, (mol, mass) in enumerate(common_mm):
    ci = i % ncm; ri = i // ncm
    bx = ax2 + ci * (bw_cm + 2)
    by = y - ri * 28
    bg_mm = [FILL_BLUE, FILL_GREEN, FILL_YELLOW, FILL_TEAL, FILL_PURPLE][ci]
    rbox(c, bx, by-24, bw_cm, 24, fill=bg_mm, stroke=None, r=5)
    T(c, mol,  bx+bw_cm/2, by-8,  size=9.5, color=NAVY,   bold=True, align="center")
    T(c, mass, bx+bw_cm/2, by-20, size=9,   color=CRIMSON, bold=True, align="center")

y -= (len(common_mm)//ncm + 1) * 28 + 6

# One-shot revision video note
rbox(c, 22*mm, y-16, W-31*mm, 18, fill=FILL_YELLOW, stroke=ORANGE, sw=1.5, r=5)
T(c, "πŸ“Ί  One-Shot Revision Video  β†’  youtu.be/1t9Dq4wyhBw  |  Watch after completing all topics!",
  W/2, y-5, size=9.5, color=ORANGE, bold=True, align="center")
y -= 26

# Final footer bar
c.setFillColor(NAVY)
c.rect(0, 0, W, 22, fill=1, stroke=0)
c.setFillColor(colors.white); c.setFont("Helvetica-Bold", 9.5)
c.drawCentredString(W/2, 8, "Class 11 Chemistry  |  Ch-1 Some Basic Concepts  |  All the very best!  β˜…")

page_number(c, 9)
c.showPage()
c.save()
print("DONE β†’", OUT)
Running Command

cd /home/daytona/workspace/chem-notes && python3 make_v2.py 2>&1

Running Command

ls -lh /home/daytona/workspace/chem-notes/Chem_Ch1_Premium.pdf

Your upgraded premium notes are ready! πŸ”₯

Chem Ch1 Premium

PDF Document Β· PDF


What's upgraded in this version:

✨ Visual Improvements

FeatureOld VersionNew Version
Paper styleBasic cream + rulesWarm cream + blue rules + double red margin
ColorsBasic pastelsFull multi-color palette (Navy, Crimson, Forest, Teal, Purple, Gold)
DiagramsSimple boxesCircular node diagrams, real arrow maths, mind-maps with branches
HeadersPlain bannersColor-coded banners with β˜… gold star badges
TablesBasic rowsColor-alternating rows with colored headers
FormulasPlain textPill-shaped formula boxes with colored borders
LawsText onlyTag-strip cards (like real notes)

πŸ“„ Page-by-Page Contents

PageContent
1Premium cover - dark blue header, full topic index with color-coded rows
2Matter mind-map (branching tree diagram) + 3-column States of Matter + temp conversions
3Sig Figs table + Scientific Notation boxes + all 5 Laws with tag-strip design
4Dalton's Theory (numbered circles) + Limitations + Molecular mass grid (10 molecules) + 18 atomic masses
5Mole Triangle with circular nodes & double arrows + 6 key formulas in pill boxes
66 solved numericals - each with colored question strip + answer box
7% Composition (3 worked examples) + Empirical/Molecular Formula step-by-step + Glucose example
8Stoichiometry interpretation table + Limiting Reagent with 4-step solution + 5 Concentration terms
9β˜… Master Formula Sheet β˜… - 4 sections + 15 common molar masses + video link
Print it, use it, ace your exam! πŸš€
This is a shared conversation. Sign in to Orris to start your own chat.