How to Build a UPSC Preparation Framework for Prelims 2027 and Mains | EduLaw
EduLaw EditorialAspirants PlaybookA practical UPSC 2027 preparation framework for Prelims and Mains: syllabus mapping, PYQs, source selection, current affairs, revision cycles, CSAT and weekly study systems.
Aspirants Playbook 005 EduLaw Quick Answer Health Check Why Systems Collapse Demand Map Four-Layer Framework Prelims Matrix Mains From Day One Current Affairs Filter 2027 Timeline Weekly System Revision System MCQ Error Log What to Avoid Master Checklist FAQ Aspirants Playbook 005 How to Build a UPSC Preparation Framework For Prelims 2027 + Mains Build a system, not a pile of sources. A UPSC preparation framework is not a pile of books. It is a closed system that converts the syllabus into revision, MCQs, answer-writing practice and recall. This guide converts that idea into a working structure you can run every week, from July 2026 through Mains 2027. Last updated: 3 July 2026 18–22 min read ★ Save this framework REVISION: SUBJECT 4/7 ✓ 2016–2025 mapped ✓ Topic-wise tags ☐ Mains linkage Add less. Revise more. Direct Answer What is a UPSC Preparation Framework? A UPSC preparation framework is a fixed, repeatable system that connects four things: the official syllabus and PYQs, one dependable source per subject, a filtered current affairs pipeline, and a set of revision outputs such as answer sheets, error logs and notes. It is not the number of books you own or the number of Telegram channels you follow. A framework works when each new piece of information has a clear place to go — into a revision sheet, an MCQ log, an answer bank or an essay idea file — instead of sitting unused in a folder. Aspirants who build this structure early tend to spend the final months revising and testing, while aspirants without it spend those months still collecting material. 01 Compass Layer Official syllabus, PYQs, exam calendar and topic mapping — the layer that tells you what to study and how deep to go. 02 Static Base One reliable core source per subject, chosen for revision suitability, not volume or reputation alone. 03 Current Affairs Layer One newspaper, official sources when needed, and one monthly consolidation tied back to the syllabus. 04 Output Layer Revision sheets, MCQ error log, GS answer bank and essay idea bank — the layer that actually gets tested. Interactive Tool Framework Health Check Answer honestly. This check saves automatically in your browser so you can return and update it as your preparation matures. Do you have a printed or digital syllabus tracker that you actually update? Have you analysed at least 10 years of Prelims and Mains PYQs from the official UPSC website? Do you have one primary source per subject, rather than two or three competing ones? Is your current affairs process limited to a fixed, repeatable pipeline? Do you revise every subject through a written tracker, not just "in your head"? Do you maintain an MCQ error log that you actually revisit? Do you write Mains answers on a regular schedule, not only after Prelims? Do you have a running essay idea bank with arguments and examples? Do you practise CSAT every week, even in small doses? Do you have three revision cycles planned before Prelims 2027? 0/10 Foundation missing Diagnosis Why Most UPSC Preparation Systems Collapse Preparation rarely fails because of low intelligence or low effort. It usually fails because material keeps entering the system faster than it can be revised, and because Mains work is postponed until "after Prelims is done" — a point that often arrives with almost no runway left. Chaos Three different books for the same subject Five monthly current affairs magazines stacking up unread A growing, unsorted Telegram PDF folder No mapping between notes and actual PYQ patterns No fixed revision schedule for any subject Mains answer writing postponed until after Prelims Framework One clear source decision per syllabus area Notes tagged and linked directly to PYQ themes A limited, repeatable current affairs pipeline Weekly, measurable outputs — MCQs, answers, notes A visible revision calendar for every subject Mains assets built alongside Prelims work, every week More material does not create more preparation. Better recall does. Start Here Start With Demand, Not Books Before choosing a single source, build a UPSC Demand Map — a simple table that forces you to state what Prelims tests, what Mains tests, which PYQ years are relevant, and where your revision material for that topic will live. Map exact question wording only from the official UPSC previous-year papers; the entries below are topic-level starting points, not quoted questions. Subject Topic What Prelims Asks What Mains Asks PYQ Years Core Source Current Affairs Link Note Location Confidence Polity Federalism Centre-State list distribution, constitutional bodies, dispute mechanisms Fiscal federalism, cooperative vs competitive federalism, GST Council dynamics Check official PYQ archive Standard polity text Finance Commission, GST Council updates Polity notebook, p.12 Medium Polity Parliament Legislative procedure, committees, privileges, sessions Productivity, disruption, private member bills, reform proposals Check official PYQ archive Standard polity text PRS India bill tracker Polity notebook, p.20 Medium Economy Inflation CPI/WPI basics, index construction, RBI mandate Transmission mechanism, monetary policy trade-offs, food inflation drivers Check official PYQ archive Standard economy text + Economic Survey RBI Monetary Policy Statements Economy notebook, p.8 Weak Environment Climate Change Conventions, protocols, terminology, Indian commitments Adaptation vs mitigation, climate finance, equity debates Check official PYQ archive Standard environment text IPCC reports, UNFCCC updates Environment notebook, p.5 Medium Geography/Governance Urban Flooding Drainage systems, wetlands, floodplains, urban planning terms Governance failures, climate resilience, financing, informal settlements Check official PYQ archive Geography text + issue notes IMD bulletins, NDMA guidelines Issue notes folder Weak Social Justice Social Justice Schemes Scheme names, target groups, nodal ministries Implementation gaps, coverage data, vulnerable group analysis Check official PYQ archive Governance text + PIB releases Ministry press releases, NFHS data Social justice notebook Medium Internal Security Internal Security Agencies, terminology, border management basics Left-wing extremism, cyber security, terror financing, coordination issues Check official PYQ archive Standard security text MHA annual report, NCRB data Security notebook Weak + Add a Topic ⬇ Export as CSV A source enters your framework only when it fills a syllabus gap. The Core System The Four-Layer UPSC Preparation Framework Think of this as a desk with four trays stacked on top of each other. Nothing skips a tray — material moves from compass to base to current affairs to output, in that order. Click each tray to see what belongs inside it. Layer 1 — Compass The official UPSC syllabus document, read line by line, not summarised secondhand. Previous-year question papers for Prelims and Mains, downloaded from the official UPSC website. The UPSC Annual Calendar and the Civil Services Examination notification, tracked for every stage. A topic map that links every syllabus line to at least one PYQ, where one exists. Layer 2 — Static Base One core source per subject, selected for how well it can be revised, not for its length. Relevant NCERTs for foundational clarity where the topic demands it. Regular atlas and map practice tied to current events and Prelims-style questions. The Constitution's bare provisions for polity topics that are tested at that level of detail. Layer 3 — Current Affairs One newspaper, read consistently, rather than several read inconsistently. Official sources such as PIB, RBI, PRS India or ministry websites, used only when the newspaper is insufficient. One monthly consolidation to compress the month's material into a revisable format. Syllabus-linked issue notes built only for topics with real multi-angle relevance. Data, reports, judgments, committees, maps and examples logged as they appear, not reconstructed later from memory. Layer 4 — Output Revision sheets — one condensed page per topic, built for repeated reading. An MCQ error log, classified by error type, not just marked right or wrong. A GS answer bank of practised, self-evaluated Mains answers. An essay idea bank with themes, quotes, structures and examples. An ethics examples bank drawn from real administrative situations and case studies. Optional subject notes, built with the same revision discipline as GS. Test-analysis sheets that record what a mock actually revealed about your gaps. Subject-Wise Build Building the Prelims Static Framework For every subject below, choose one standard, widely used source that you can revise repeatedly. Where examples of commonly used books or resources are mentioned anywhere in this framework, they are illustrative examples only — UPSC does not prescribe or endorse any specific author, publisher or coaching material. Polity What UPSC Tests Constitutional design, institutions, amendments, judicial pronouncements, governance mechanisms and current constitutional developments. Source Type Needed One comprehensive standard polity text, supplemented by bare reading of relevant constitutional articles. What Not To Do Do not run two competing polity books simultaneously; it fragments revision instead of strengthening it. Convert To Revision One-page tracker per constitutional part or institution, updated whenever a current event touches it. Prelims Output Fact-checked MCQ sheet on articles, schedules, bodies and their powers. Mains Output Answer bank on federalism, judicial review, separation of powers and institutional reform debates. Modern Indian History What UPSC Tests Freedom movement chronology, key personalities, acts and policies, and their interlinkages. Source Type Needed One standard modern history text used cover to cover rather than fragments from multiple books. What Not To Do Do not memorise isolated dates without understanding cause-and-effect chains between events. Convert To Revision Timeline sheets grouped by phase — early nationalism, mass movements, constitutional developments. Prelims Output Event-personality-outcome flashcards for rapid recall. Mains Output Thematic notes on ideology, leadership styles and long-term impact for GS I. Ancient and Medieval History What UPSC Tests Dynasties, administration, art forms, sources of history and archaeological findings. Source Type Needed Relevant NCERTs for foundation, followed by one consolidated standard reference for depth. What Not To Do Do not treat this as a low-priority area purely because weightage feels historically lower; UPSC tests it periodically. Convert To Revision Dynasty-wise one-pagers with administration, art and economy sub-points. Prelims Output Fact grids on rulers, monuments, texts and inscriptions. Mains Output Generally limited direct Mains linkage; occasional relevance in culture-linked GS I questions. Art and Culture What UPSC Tests Dance forms, architecture, schools of painting, literature, festivals and UNESCO-linked heritage. Source Type Needed One compact standard culture resource, cross-checked against current affairs for heritage sites in the news. What Not To Do Do not spread this topic across multiple scattered PDFs; consolidate into a single running document. Convert To Revision Category-wise tables — dance, architecture, painting, music — updated with news-linked additions. Prelims Output Category-recognition MCQ drills. Mains Output Minimal direct linkage; occasional relevance to heritage conservation questions in GS I. Geography What UPSC Tests Physical geography, climatology, resource distribution, map-based location questions and current-events-linked geography. Source Type Needed Relevant NCERTs plus a physical/human geography reference, alongside consistent atlas practice. What Not To Do Do not skip map work; static geography knowledge without map practice performs poorly under exam conditions. Convert To Revision Map-marking exercises tied to news events, redone at each revision cycle. Prelims Output Location and phenomenon-based MCQ practice sets. Mains Output Disaster management, resource geography and urban geography notes for GS I. Economy What UPSC Tests Macroeconomic concepts, fiscal and monetary policy, banking, external sector and budget-linked items. Source Type Needed One standard economy text for concepts, plus the Economic Survey and Union Budget for current data. What Not To Do Do not rely on outdated statistics; economic data ages quickly and must be refreshed from official releases. Convert To Revision Concept sheets separated from a rolling "latest data" sheet updated each quarter. Prelims Output Terminology and mechanism-based MCQ drills. Mains Output Answer bank on growth, inflation, employment and financial sector reform for GS III. Environment and Ecology What UPSC Tests Ecosystems, biodiversity, conventions, species protection status and environment-linked current events. Source Type Needed One structured environment resource, updated continuously through news on species, protected areas and reports. What Not To Do Do not treat this subject as static; a large share of environment questions are current-affairs driven. Convert To Revision Species/ecosystem fact cards plus a running convention and report tracker. Prelims Output Classification and status-based MCQ drills. Mains Output Climate resilience, conservation policy and environment-development trade-off notes for GS III. Science and Technology What UPSC Tests Applied science concepts explained in news, space and defence developments, biotechnology and emerging technology. Source Type Needed A concept-first resource combined with current affairs, since most questions are news-triggered. What Not To Do Do not attempt deep technical mastery; UPSC tests conceptual and applied understanding, not specialist depth. Convert To Revision Topic cards explaining the "why it matters" angle in plain language. Prelims Output Applied-concept MCQ drills linked to recent developments. Mains Output Notes on technology policy, indigenisation and ethical dimensions for GS III. International Relations What UPSC Tests Bilateral and multilateral relations, groupings, India's foreign policy positions and global developments affecting India. Source Type Needed Current affairs as the primary source, organised through a country/grouping-wise tracker. What Not To Do Do not read IR news in isolation without linking it back to India's stated interests and past positions. Convert To Revision A running country-relations sheet updated after every significant development. Prelims Output Grouping and agreement-based factual MCQs. Mains Output Answer bank on India's neighbourhood, strategic partnerships and multilateral engagement for GS II. Government Schemes and Governance What UPSC Tests Scheme objectives, target groups, nodal ministries and governance mechanisms such as e-governance and citizen charters. Source Type Needed PIB releases and official ministry pages as the primary source, consolidated monthly. What Not To Do Do not memorise scheme names without objectives and implementation status; UPSC often tests application, not recall alone. Convert To Revision A single running scheme tracker sorted by ministry and sector. Prelims Output Scheme-objective matching MCQ drills. Mains Output Implementation-gap analysis notes for GS II governance questions. CSAT What UPSC Tests Comprehension, logical reasoning, basic numeracy, data interpretation and decision-making. CSAT is generally qualifying in nature — verify the current requirement in the official notification. Source Type Needed One structured practice set series used weekly, rather than an occasional last-minute sprint. What Not To Do Do not postpone CSAT until the final weeks; a single weak attempt on exam day can affect the whole result regardless of GS performance. Convert To Revision A weekly timed set with an error log by question type — comprehension, reasoning, quantitative. Prelims Output Sectional accuracy and speed tracker across question types. Mains Output Not directly applicable; strong comprehension skills support faster reading during Mains preparation. Source Decision Rule Before adding any new source, run it through this check. 1. Which syllabus gap does it fill? A specific, named gap No clear gap 2. What does my existing source fail to cover here? Something specific and identifiable Nothing specific 3. Will I revise this new material at least three times? Yes, realistically Unlikely 4. Will it create usable MCQs, notes or answer-writing value? Yes Not really Check This Source Integration, Not Sequence Keep Mains Alive From Day One Run every meaningful topic through the principle of One Topic, Two Examinations, One Note . A single note captures the factual and conceptual angle that Prelims tests and the analytical, argument-based angle that Mains tests, so one round of reading and revision serves both examinations at once. Worked Example: Urban Flooding Prelims Side Concepts: drainage density, floodplains, wetlands, impervious surfaces Urban planning terms: stormwater drains, sponge city concept, master plans Relevant institutions and official frameworks for disaster and urban management Geographic examples of flood-prone urban regions Mains Side Causes: unplanned urbanisation, encroachment on wetlands, inadequate drainage capacity Governance failures: fragmented urban local body authority, poor inter-agency coordination Climate resilience and financing: adaptation funding, insurance mechanisms, resilient infrastructure Informal settlements: disproportionate vulnerability, tenure and relocation challenges Case studies and way forward: drawn from official post-event assessments, updated with current data before use in an answer Any statistic, casualty figure or financial number used in an actual Mains answer should be verified and updated from an official source such as a government report, NDMA document or parliamentary reply before the exam, since such figures change over time. Generate My Note Template Pick a topic and build an editable note using the standard Prelims-Mains template. Fill it in directly in the browser. Choose a topic Federalism Parliament Inflation Climate Change Urban Flooding Social Justice Internal Security Custom Topic Generate My Note Template Filter, Don't Multiply Current Affairs Need a Filter, Not More Channels The recommended flow is deliberately narrow: one newspaper, moving to a primary source only when necessary, consolidated once a month, converted into a syllabus-linked issue note only when it clears a threshold, and then used for revision, MCQs or answer writing. Should This News Item Become a Note? It is clearly relevant to a specific line in the UPSC syllabus. It has national or global significance beyond a single day's headline. It involves data, a report, a judgment or a committee recommendation. It has multi-dimensional relevance — economic, social, environmental or political angles together. It has clear potential for Prelims factual testing. It has clear potential for Mains analytical use. Check items above to classify this news Illustrative Issue Examples These examples illustrate how a topic might be filtered into an issue note. They are not predictions of actual UPSC questions. Environment/Governance Heatwaves and urban resilience — links to disaster management, public health and urban planning. Economy/Tech Semiconductor policy — links to industrial policy, self-reliance goals and global supply chains. Economy Inflation and monetary policy transmission — links to RBI's mandate and fiscal-monetary coordination. Polity Federalism and fiscal devolution — links to Finance Commission recommendations and Centre-State transfers. Environment/Urban Wetlands and urban flooding — links to ecological conservation and urban governance failures. Planning Calendar UPSC 2027 Timeline Planner Refer to the latest UPSC Annual Calendar and Civil Services Examination notification for final dates, because UPSC may revise schedules. The phases below are indicative planning windows for building your framework, not confirmed exam dates. Jul–Sep 2026 Oct–Dec 2026 Jan–Mar 2027 Final Prelims Phase Post-Prelims → Mains July – September 2026: Build the Framework Read the official syllabus line by line and set up your topic tracker. Cover NCERTs and core concepts across polity, geography, economy and history. Begin PYQ mapping — tag past questions against syllabus topics. Start a current affairs note-taking habit from day one, however small. Begin CSAT practice in weekly, low-intensity doses. Mark This Phase Complete October – December 2026: First Full Cycle Complete a first full read of your chosen core source for each subject. Do topic-wise PYQ work rather than random year-wise solving. Begin weekly Mains answer writing, even at low volume. Consolidate three months of current affairs into revisable notes. Mark This Phase Complete January – March 2027: Consolidation Move into sectional tests, subject by subject. Strengthen CSAT further with timed full sets. Integrate the last six months of current affairs into your static notes. Continue Mains answer writing at a steady, sustainable pace. Mark This Phase Complete Final Prelims Phase Shift to full-length mock tests under real exam conditions. Run rapid revision cycles across all subjects using your condensed sheets. Repair recurring MCQ error patterns identified in your error log. Add new sources only in rare, well-justified cases — this is not a discovery phase. Mark This Phase Complete Post-Prelims to Mains Shift fully into structured answer writing across all GS papers. Complete your optional subject syllabus and its own PYQ analysis. Finalise your essay idea bank and ethics examples bank. Enrich GS answers with updated data, reports and examples from official sources. Mark This Phase Complete 0 of 5 phases marked complete Weekly Operating System Run a Fixed Weekly System A. Full-Time Aspirant One static target and one revision target per day, 75–100 quality MCQs per week (or an equivalent distributed practice load), disciplined wrong-answer analysis, two to three Mains answers, one essay outline, one CSAT set, one current affairs issue note, and a Sunday review of the entire week. B. Working Aspirant Ninety minutes for static or revision, thirty minutes for current affairs, thirty minutes for MCQs, and thirty minutes for answer writing or CSAT — a fixed daily block of about three hours that stays consistent even on difficult days. Time blocks can be adjusted to fit your day, but the outputs — pages revised, MCQs attempted, answers written — must remain measurable every single week. Editable Weekly Planner Type your plan into each cell and tick the box once it is done. Your plan saves automatically in this browser. Task Mon Tue Wed Thu Fri Sat Sun Clear Planner 🖨 Export / Print Planner The Real Work The Revision System Structured revision runs in three passes: a first pass to understand and organise material, a second pass to condense it into a shorter, testable form, and a third pass focused purely on recall through PYQs and mock tests. First Pass Read to understand structure and logic. Build your initial notes. Do not aim for speed here. Second Pass Condense notes into one revisable page per topic. Remove anything that does not aid quick recall. Third Pass Test yourself through PYQs and mocks. Repair whatever the testing reveals as weak. Subject Revision Tracker Subject 1st Revision 2nd Revision 3rd Revision PYQ Review Mock/Test Review Notes that are not revised are not part of your preparation framework. Learn From Every Mock MCQ Error Log Classify every wrong or guessed answer into one of seven categories: concept gap, fact gap, misreading, elimination failure, guessing error, time-pressure error, or careless mistake. The pattern that emerges over time matters more than any single score. Question/Topic Subject Error Type Correct Concept Fix Action Revision Date Retested? + Add Error Entry Your Most Frequent Error Categories Red Flags What to Avoid Running multiple books for the same subject instead of committing to one. Collecting PDFs daily without ever scheduling time to revise them. Writing current affairs notes with no clear link back to the syllabus. Ignoring CSAT until the last few months before Prelims. Delaying Mains answer writing indefinitely, waiting for a "better time." Treating every test purely as a score to react to, not as feedback to act on. Changing your entire framework every week based on the latest opinion you heard. Copying another aspirant's exact plan without checking your own available time and optional subject needs. Print This Master UPSC Preparation Framework Checklist One syllabus and PYQ tracker, kept up to date One core source per subject One reliable newspaper, read consistently One monthly current affairs consolidation One revision notebook/system per subject One MCQ error log, actively maintained One GS answer bank One essay idea bank One ethics examples bank One optional-subject plan One weekly CSAT routine Three revision cycles planned before Prelims A clear post-Prelims Mains transition plan Add less. Revise more. Frequently Asked Questions Aspirants Actually Ask How many sources should I use for UPSC preparation? For most static subjects, one well-structured, widely used core source is enough if you revise it three or more times. Additional sources should only be added when they fill a specific syllabus gap that your current source does not cover. Should I prepare Prelims and Mains together? Yes. Both examinations draw from the same syllabus, so treating them separately wastes time. A single topic note built with both a Prelims-facing and a Mains-facing side keeps both moving together. How many years of UPSC PYQs should I analyse? A ten-year window of Prelims and Mains previous-year question papers, downloaded from the official UPSC website, is generally sufficient to understand recurring themes and question framing. Analyse them topic-wise rather than year-wise. Is newspaper reading enough for current affairs? One newspaper read consistently, combined with a monthly consolidation and syllabus-linked notes on select issues, is generally enough. Reading multiple sources without a filter usually creates clutter rather than usable preparation. How should working aspirants build a UPSC schedule? Working aspirants should build a shorter but fixed daily block — for example, ninety minutes for static or revision, thirty minutes for current affairs, thirty minutes for MCQs and thirty minutes for answer writing or CSAT — and protect it daily. When should I start CSAT preparation? CSAT should be practised in small weekly doses from the beginning rather than postponed, since it is generally qualifying in nature and a single weak attempt can affect the entire Prelims outcome regardless of General Studies performance. How many revisions are enough before Prelims? Most structured aspirants plan for at least three revision cycles before Prelims: a first pass to understand and structure material, a second pass to condense it, and a third pass focused on recall through tests and PYQ review. Should I change my source if I do not understand a book? If a source genuinely fails to build clarity after a fair attempt, switching once is reasonable. Repeated switching without completing a full read is usually a sign of an unclear framework rather than a weak source. How should I make notes for Prelims and Mains together? Use a shared note structure for each topic that separates factual/conceptual points relevant to Prelims from causes, data, stakeholders, challenges and way-forward points relevant to Mains. How do I use mock tests effectively? A mock test is useful only when every wrong or guessed answer is logged, classified by error type, and linked back to a concept or fact gap that gets revised before the next test. Should I rely on coaching notes alone? Coaching notes can support revision, but they should be checked against the official UPSC syllabus and PYQs rather than treated as a complete or officially prescribed source, since UPSC does not endorse any specific coaching material. How often should I revise current affairs? Current affairs should move through a repeatable cycle: daily reading, a monthly consolidation, and periodic revision of syllabus-linked issue notes alongside static subjects, rather than being read once and left unrevised. Your Framework Should Reduce Confusion and Increase Recall. Do not keep rebuilding your preparation every month. Build one system, test it, revise it and improve it. Save the Weekly Planner Print the UPSC Framework Checklist Explore Aspirants Playbook Visit EduLaw Aspirants Playbook 005 · EduLaw · Content verified against official UPSC, PIB and government sources as of 3 July 2026. Always cross-check final examination dates and syllabus details on the official UPSC website. (function(){ "use strict"; /* ---------- Utility: localStorage safe wrapper ---------- */ function lsGet(key, fallback){ try{ var v = localStorage.getItem(key); return v === null ? fallback : JSON.parse(v); }catch(e){ return fallback; } } function lsSet(key, val){ try{ localStorage.setItem(key, JSON.stringify(val)); }catch(e){} } /* ---------- Save badge ---------- */ document.getElementById('saveFrameworkBadge').addEventListener('click', function(){ lsSet('edulaw_saved_flag', true); this.textContent = '✓ Saved to this browser'; setTimeout(function(btn){ btn.textContent = '★ Save this framework'; }, 2500, document.getElementById('saveFrameworkBadge')); }); /* ---------- Health check ---------- */ var hcIds = ['hc1','hc2','hc3','hc4','hc5','hc6','hc7','hc8','hc9','hc10']; var hcState = lsGet('edulaw_healthcheck', {}); hcIds.forEach(function(id){ var el = document.getElementById(id); if(hcState[id]) el.checked = true; el.addEventListener('change', updateHealthCheck); }); function updateHealthCheck(){ var score = 0; hcIds.forEach(function(id){ var checked = document.getElementById(id).checked; hcState[id] = checked; if(checked) score++; }); lsSet('edulaw_healthcheck', hcState); document.getElementById('hcScore').textContent = score + '/10'; var msg = 'Foundation missing'; if(score >= 4 && score = 8) msg = 'Revision-ready system'; document.getElementById('hcMsg').textContent = msg; } updateHealthCheck(); /* ---------- Demand map table ---------- */ var demandTable = document.getElementById('demandTable'); document.getElementById('addDemandRow').addEventListener('click', function(){ var tbody = demandTable.querySelector('tbody'); var tr = document.createElement('tr'); for(var i=0;i Note Template — ' + topic + ' ' + buildField('Definition / Constitutional or Legal Basis', hint) + buildField('Causes / Background', '') + buildField('Key Data / Report / Committee (verify from official source before use)', '') + buildField('Stakeholders', '') + buildField('Issues / Challenges', '') + buildField('Examples / Case Studies', '') + buildField('Government Response', '') + buildField('Way Forward', '') + buildField('20-Word Conclusion Line', ''); out.innerHTML = ''; out.appendChild(card); card.scrollIntoView({behavior:'smooth', block:'center'}); }); function buildField(label, placeholder){ return ' '+label+' '+placeholder+' '; } /* ---------- Current affairs filter ---------- */ var fIds = ['f1','f2','f3','f4','f5','f6']; fIds.forEach(function(id){ document.getElementById(id).addEventListener('change', updateFilter); }); function updateFilter(){ var count = 0; fIds.forEach(function(id){ if(document.getElementById(id).checked) count++; }); var el = document.getElementById('filterResult'); el.classList.remove('r0','r1','r2','r3'); if(count === 0){ el.classList.add('r0'); el.textContent = 'Check items above to classify this news'; } else if(count '+t+' '+counts[t]+' '; }); document.getElementById('errorChart').innerHTML = html; } /* ---------- Final checklist persistence ---------- */ var fcIds = ['fc1','fc2','fc3','fc4','fc5','fc6','fc7','fc8','fc9','fc10','fc11','fc12','fc13']; var fcState = lsGet('edulaw_finalchecklist', {}); fcIds.forEach(function(id){ var el = document.getElementById(id); if(fcState[id]) el.checked = true; el.addEventListener('change', function(){ fcState[id] = el.checked; lsSet('edulaw_finalchecklist', fcState); }); }); /* ---------- Final CTA actions ---------- */ document.getElementById('ctaSavePlanner').addEventListener('click', function(){ document.getElementById('weekly').scrollIntoView({behavior:'smooth'}); }); document.getElementById('ctaPrintChecklist').addEventListener('click', function(){ document.getElementById('checklist').scrollIntoView({behavior:'smooth'}); setTimeout(function(){ window.print(); }, 400); }); })();