*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:#f4f8ff;color:#152238;line-height:1.55}.site-header{position:sticky;top:0;z-index:99;background:linear-gradient(135deg,#0758b8,#0b78ee);color:white;display:flex;align-items:center;justify-content:space-between;padding:11px clamp(12px,4vw,55px);box-shadow:0 5px 20px #123e7a25}.brand-wrap{display:flex;align-items:center;gap:11px}.brand-mark{width:44px;height:44px;border-radius:12px;background:#fff;color:#0868d8;display:grid;place-items:center;font-weight:950}.brand-name{font-size:1.3rem;font-weight:950}.brand-sub{font-size:.7rem;opacity:.9}.header-badge{font-size:.76rem;font-weight:900;padding:8px 12px;border-radius:99px;background:#ffffff20}.page{max-width:1200px;margin:auto;padding:24px 14px 60px}.hero{display:grid;grid-template-columns:1.65fr .7fr;gap:20px;margin-bottom:20px}.hero-copy{padding:34px;border-radius:24px;background:linear-gradient(135deg,#e9f4ff,#fff);border:1px solid #d5e6f8}.eyebrow{font-size:.7rem;letter-spacing:.11em;font-weight:950;color:#0868d8}.hero h1{font-size:clamp(2rem,5vw,3.55rem);line-height:1.05;margin:8px 0 15px}.hero p{font-size:1.04rem}.hero-pills{display:flex;gap:7px;flex-wrap:wrap;margin-top:18px}.hero-pills span{background:#fff;border:1px solid #d0e1f4;padding:6px 9px;border-radius:99px;font-size:.75rem;font-weight:800}.hero-card,.generator-panel,.paper-section,.study-section,.seo-footer{background:#fff;border:1px solid #dce7f4;border-radius:22px;box-shadow:0 12px 35px #204d8510}.hero-card{padding:23px;display:flex;flex-direction:column;gap:12px}.hero-card a{color:#075fc7;text-decoration:none;font-weight:800}.hero-card small{margin-top:auto;color:#69788c}.generator-panel,.paper-section,.study-section,.seo-footer{padding:23px;margin-bottom:20px}.section-heading,.paper-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.section-heading h2,.paper-head h2{margin:4px 0 0;font-size:1.6rem}.score-chip,.paper-stats{background:#edf6ff;color:#075fc7;border:1px solid #cde2f8;padding:8px 12px;border-radius:99px;font-weight:900}.control-card{background:#f8fbff;border:1px solid #dce8f5;border-radius:17px;padding:16px;margin-bottom:14px}.control-card>label:first-child{display:block;font-weight:950;margin-bottom:10px}.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.check{background:#fff;border:1px solid #dbe6f1;border-radius:12px;padding:9px;cursor:pointer}.check input{accent-color:#0868d8;margin-right:5px}.check span{font-weight:850;font-size:.82rem}.check small{display:block;margin-left:20px;color:#718096;font-size:.67rem}.paper-settings{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.field-row label{font-size:.73rem;font-weight:800;display:block;margin:5px 0}input,select{width:100%;border:1px solid #ceddec;background:#fff;border-radius:10px;padding:10px;font:inherit;font-weight:700}input:focus,select:focus{outline:2px solid #a8cff6;border-color:#5e9ddd}.section-builder .helper{font-size:.78rem;color:#6b7a8f}.section-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.section-config{background:#fff;border:1px solid #d8e4ef;border-radius:12px;padding:10px;display:grid;gap:7px}.section-enable{display:flex;gap:7px;align-items:center}.section-config input[type=checkbox]{width:auto}.section-config input[type=number],.section-config select{padding:7px;font-size:.78rem}.sec-total{font-size:.72rem;color:#0868d8;font-weight:900}.summary-bar{display:flex;justify-content:space-between;background:#edf7ef;border:1px solid #cce5d1;border-radius:12px;padding:11px 14px;margin:14px 0;font-size:.9rem}.action-row,.utility-row{display:flex;gap:9px;flex-wrap:wrap}.btn{border:0;border-radius:11px;padding:12px 15px;font-weight:900;cursor:pointer;box-shadow:0 5px 15px #1c4b8117}.primary{background:#0868d8;color:#fff}.secondary{background:#102d4d;color:#fff}.ghost{background:#edf3f8;color:#18334f}.export{background:#eaf7ef;color:#146d3a}.share{background:#fff0e7;color:#a24e00}.question-area{display:grid;gap:13px}.paper-head{border-bottom:1px solid #e1eaf3;padding-bottom:14px}.paper-head p{margin:3px 0;color:#6d7c90}.question-card{border:1px solid #dbe6f1;border-radius:16px;padding:16px;background:#fff}.section-title{margin:3px 0 0;color:#075fc7;font-size:1.12rem}.q-top{display:flex;justify-content:space-between;gap:10px}.q-num{font-weight:950;color:#0868d8}.q-tag{font-size:.68rem;font-weight:900;background:#edf5ff;color:#075fc7;padding:5px 8px;border-radius:99px}.q-text{font-weight:850;margin:8px 0 12px}.marks{float:right;font-weight:900;color:#4e6177}.options{display:grid;gap:7px}.option{border:1px solid #d8e3ee;background:#fbfdff;border-radius:10px;padding:9px;cursor:pointer}.option:hover{background:#f1f7ff;border-color:#79afe3}.option input{width:auto;accent-color:#0868d8}.check-answer{margin-top:10px}.answer-box{display:none;margin-top:9px;padding:10px;border-radius:10px;background:#eef9f1;border:1px solid #bfe2c7}.answer-box.wrong{background:#fff0f0;border-color:#efb8b8}.answer-box.show{display:block}.subjective-answer{display:none;color:#40536b;font-size:.85rem;background:#f8fbff;border-top:1px dashed #d6e2ee;margin-top:10px;padding-top:10px}.subjective-answer.show{display:block}.empty-state{text-align:center;padding:50px 10px;color:#6c7b8f}.empty-icon{font-size:3rem}.chapter-note{border-top:1px solid #e1eaf3;padding:22px 0}.chapter-note:first-child{border-top:0}.chapter-note h2{color:#075fc7}.chapter-note h3{color:#1b3653;margin-top:21px}.chapter-note p{color:#3e4e62}.chapter-note li{margin:6px 0}.seo-footer{background:linear-gradient(135deg,#0b63ce,#103b72);color:#fff}.seo-footer p{color:#e3effb}.site-footer{background:#082e56;color:#dcecff;padding:26px 15px;display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}@media(max-width:950px){.hero{grid-template-columns:1fr}.section-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.paper-settings{grid-template-columns:1fr}.section-grid{grid-template-columns:1fr 1fr}.check-grid{grid-template-columns:1fr}.hero-copy,.generator-panel,.paper-section,.study-section,.seo-footer{padding:16px;border-radius:17px}.section-heading,.paper-head{align-items:flex-start;flex-direction:column}.btn{width:100%}.utility-row .btn{width:100%}.field-row{grid-template-columns:1fr}.hero h1{font-size:2rem}}@media(max-width:430px){.section-grid{grid-template-columns:1fr}.site-header{padding:9px 11px}.brand-sub,.header-badge{display:none}}@media print{body{background:#fff}.site-header,.hero,.generator-panel,.study-section,.seo-footer,.site-footer{display:none!important}.page{padding:0;max-width:none}.paper-section{box-shadow:none;border:0;padding:0}.question-card{break-inside:avoid}.check-answer{display:none}.answer-box{display:none!important}.subjective-answer{display:none!important}}
.preview{background:#f2edff;color:#5b35a5}
.preview-modal{display:none;position:fixed;inset:0;z-index:300;background:rgba(5,18,35,.72)}
.preview-modal.open{display:block}
.preview-backdrop{position:absolute;inset:0}
.preview-dialog{position:relative;width:min(1180px,96vw);height:min(94vh,1000px);margin:3vh auto;background:#eef2f7;border-radius:18px;overflow:hidden;box-shadow:0 25px 80px rgba(0,0,0,.3);display:flex;flex-direction:column}
.preview-toolbar{background:#fff;border-bottom:1px solid #d7e0ea;padding:12px 15px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.preview-toolbar small{display:block;color:#718096;font-size:.72rem;margin-top:2px}
.preview-actions{display:flex;gap:8px;flex-wrap:wrap}
.preview-scroll{overflow:auto;padding:24px}
.a4-preview{width:210mm;min-height:297mm;margin:0 auto;background:#fff;color:#111;box-shadow:0 8px 30px rgba(20,45,75,.18);padding:16mm 15mm;font-family:Arial,Helvetica,sans-serif}
.a4-preview .pdf-brand{font-weight:900;color:#075fc7;font-size:14px;margin-bottom:8px}
.a4-preview h1{font-size:24px;line-height:1.2;margin:0 0 8px;text-align:center}
.a4-preview .pdf-meta{text-align:center;border-top:1px solid #222;border-bottom:1px solid #222;padding:7px 0;margin:8px 0 18px;font-size:12px}
.a4-preview .pdf-section{font-size:16px;border-bottom:1px solid #444;padding-bottom:5px;margin:18px 0 12px}
.a4-preview .pdf-q{font-size:13px;line-height:1.5;margin:0 0 14px;break-inside:avoid}
.a4-preview .pdf-options{margin:5px 0 0 18px;line-height:1.55}
.a4-preview .pdf-answerline{border-bottom:1px solid #777;height:22px;margin-top:4px}
.a4-preview .pdf-footer{border-top:1px solid #bbb;margin-top:25px;padding-top:7px;font-size:10px;text-align:center;color:#666}
@media(max-width:700px){
 .preview-dialog{width:100vw;height:100vh;margin:0;border-radius:0}
 .preview-toolbar{align-items:flex-start;flex-direction:column}
 .preview-actions{width:100%}.preview-actions .btn{width:100%}
 .preview-scroll{padding:10px}
}
@media print{
 @page{size:A4;margin:12mm}
 .preview-modal{display:none!important}
 .paper-section{width:100%}
 .paper-section .paper-head{display:block}
 .question-card{border:0;border-radius:0;padding:0 0 10px;margin-bottom:8px}
 .section-heading{break-after:avoid}
 .question-card .q-tag{background:none;border:0;padding:0}
 .options{gap:2px}
}

/* Strict section-wise question paper layout */
.section-heading{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  margin:24px 0 12px;padding:12px 14px;border-radius:10px;
  border:1px solid #cfd9e5;background:#f7f9fc;
  page-break-after:avoid;break-after:avoid;
}
.section-heading strong{font-size:1.05rem}
.section-heading span{font-size:.78rem;color:#64748b}
.q-number{font-weight:800}
.q-marks{font-size:.75rem;font-weight:700}
@media(max-width:600px){
 .section-heading{align-items:flex-start;flex-direction:column}
}
@media print{
 .section-heading{background:#fff;border:0;border-bottom:1px solid #222;border-radius:0;padding:8px 0;margin-top:18px}
}

.result{display:inline-block;margin-left:8px;font-weight:700}
.result.correct{color:#147a3d}
.result.wrong{color:#b42318}
.model-answer{margin-top:10px;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;line-height:1.55}

/* Final generated-paper visibility */
.question-area{display:block;min-height:80px}
.question-card{display:block}
.generator-status{margin:10px 0;font-weight:700;color:#147a3d}

/* COMPLETE QUESTION DISPLAY FIX
   Prevents long questions/options from being clipped or hidden. */
html,body{overflow-x:hidden}
.paper-section{overflow:visible!important;height:auto!important;max-height:none!important}
.question-area{display:block!important;overflow:visible!important;height:auto!important;max-height:none!important}
.question-card{display:block!important;overflow:visible!important;height:auto!important;max-height:none!important;min-height:0!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
.q-text{display:block!important;height:auto!important;max-height:none!important;overflow:visible!important;white-space:normal!important;line-height:1.65!important;overflow-wrap:anywhere!important}
.options{display:grid!important;height:auto!important;max-height:none!important;overflow:visible!important}
.option,.options label{display:block!important;height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;line-height:1.55!important}
.section-heading{height:auto!important;max-height:none!important;overflow:visible!important}
.subjective-box{height:auto!important;max-height:none!important;overflow:visible!important}
.question-actions{height:auto!important;max-height:none!important;overflow:visible!important}
.result{white-space:normal!important;overflow-wrap:anywhere!important}
.paper-head{height:auto!important;max-height:none!important;overflow:visible!important}
@media(max-width:700px){
 .question-card{padding:14px!important}
 .q-text{font-size:.96rem!important}
 .options label{padding:10px!important}
}
@media print{
 .paper-section{overflow:visible!important}
 .question-area,.question-card,.q-text,.options,.options label{overflow:visible!important;height:auto!important;max-height:none!important}
}

.subjective-box textarea{min-height:120px;width:100%;resize:vertical}
.subjective-box .check-btn{margin-top:8px}
.model-answer{font-size:.92rem;line-height:1.7}

.paper-section,.question-area,.question-card,.q-text,.options,.options label,.subjective-box{overflow:visible!important;height:auto!important;max-height:none!important;min-height:0!important}
.q-text,.options label{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.65!important}

/* FINAL: never clip generated questions or options */
.paper-section,.question-area,.question-card,.q-text,.options,.options label,.subjective-box,.model-answer{
  overflow:visible!important;height:auto!important;max-height:none!important;min-height:0!important;
}
.q-text,.options label,.model-answer{
  white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.65!important;
}

.check-grid.two{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.chapter{accent-color:#1769e0}
