/* =====================================================================
   ProshnoMaker  pm-ui.css  (v1)  --  LOAD THIS FILE LAST on every page.
   1) ONE font family + ONE size scale for the whole website UI
   2) Canonical generator header + sidebar (used by generator.php AND paper.php)
   These are only the FALLBACK values. The live values come from assets/pm-ui-vars.php (set in teacher/ui_settings.php).  The question
   paper itself (#paper) is never touched by this file.
   ===================================================================== */
@font-face{font-family:"PMUI";font-style:normal;font-weight:400;font-display:swap;
  src:url("fonts/SolaimanLipi-Regular.woff") format("woff"),url("fonts/SolaimanLipi-Regular.ttf") format("truetype")}
@font-face{font-family:"PMUI";font-style:normal;font-weight:700;font-display:swap;
  src:url("fonts/SolaimanLipi-Bold.woff") format("woff"),url("fonts/SolaimanLipi-Bold.ttf") format("truetype")}
@font-face{font-family:"PMUILatin";font-style:normal;font-weight:400;font-display:swap;src:url("fonts/Roboto-Regular-latin.woff") format("woff")}
@font-face{font-family:"PMUILatin";font-style:normal;font-weight:700;font-display:swap;src:url("fonts/Roboto-Bold-latin.woff") format("woff")}

:root{
  --pm-ui-font:"PMUILatin","PMUI","Noto Sans Bengali","Nirmala UI",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  /* size scale (px) */
  --u-micro:14px;   /* badges, tiny tags - nothing on the site is smaller than this */
  --u-small:15px;   /* captions, helper / muted text */
  --u-text:17px;    /* normal text, buttons, table cells */
  --u-field:18px;   /* form labels, inputs, dropdown options, checkbox lists */
  --u-nav:19px;     /* sidebar menu items */
  --u-navsec:15px;  /* sidebar section titles (bold) */
  --u-hl:20px;      /* highlighted items: field titles, card titles (bold) */
  --u-h2:27px;
  --u-h1:38px;
  --u-q:22px;       /* question text + options on generator cards */
  --u-btn:17px;     /* buttons */
  --u-hdr:17px;     /* header links / login buttons */
  --u-home-h1:40px; --u-home-lead:19px; --u-home-select:18px; --u-home-body:17px;  /* home page */
  --u-sel:18px;     /* generator: class/subject/chapter boxes */
  --u-finder:18px;  /* generator: right-hand finder panel */
  --u-epb:16px; --u-epb-h:18px;  /* print-settings panel */
  --pm-hdr-h:78px;
  --pm-side-w:270px;
}

/* ---------- 1. one font family everywhere (except the paper sheet, code, math) ---------- */
html body *:not(#paper):not(#paper *):not(mjx-container):not(mjx-container *):not(code):not(pre):not(kbd):not(samp){
  font-family:var(--pm-ui-font)!important;
  font-synthesis:weight style!important; /* fonts with only a Regular file still get a visible Bold */
}
html body{font-size:var(--u-text)!important;line-height:1.5;letter-spacing:0;word-spacing:0}
html body :is(button,input,select,textarea):not(#paper *){font-size:var(--u-field)!important}

/* ---------- 2. text roles ---------- */
html body :is(label,.form label):not(#paper *){font-size:var(--u-field)!important}
html body :is(.input,select,textarea,input[type=text],input[type=number],input[type=email],input[type=password],input[type=search]):not(#paper *){font-size:var(--u-field)!important;line-height:1.4!important}
html body :is(.btn,button.btn,a.btn):not(#paper *){font-size:var(--u-btn)!important;font-weight:700!important;line-height:1.3!important}
html body :is(.btn.small,.btn.sm):not(#paper *){font-size:var(--u-small)!important}
html body :is(.table th,table th):not(#paper *){font-size:var(--u-text)!important;font-weight:700!important}
html body :is(.table td,table td):not(#paper *){font-size:var(--u-text)!important}
html body :is(.muted,small,.help,.hint,.sub):not(#paper *){font-size:var(--u-small)!important}
html body :is(.badge,.tag,.pill,.select-pill,.menu-badge):not(#paper *){font-size:var(--u-micro)!important;font-weight:700!important}
html body .eyebrow:not(#paper *){font-size:var(--u-micro)!important;font-weight:700!important;letter-spacing:.04em!important}
html body :is(h1):not(#paper *){font-size:var(--u-h1)!important;font-weight:700!important;line-height:1.3!important}
html body :is(h2):not(#paper *){font-size:var(--u-h2)!important;font-weight:700!important;line-height:1.3!important}
html body :is(h3,.card h3):not(#paper *){font-size:var(--u-hl)!important;font-weight:700!important;line-height:1.35!important}
html body :is(h4,h5):not(#paper *){font-size:var(--u-field)!important;font-weight:700!important}

/* highlighted items: slightly larger + bold */
html body :is(.filterbar .grid>label,.finder-panel .finder-group>b,.finder-panel .selected-title h3,.finder-panel>h3,.selection-summary b,.result-head b,.pm-field-title,.pm-selection-summary,.pm-feature b,.pm-benefit-list b,.pm-price-card h3,.pm-info-card h3):not(#paper *){font-size:var(--u-hl)!important;font-weight:700!important}

/* ---------- 3. sidebars (generator / home / teacher) : same size + weight ---------- */
html body :is(.pm-gen-sidebar .pm-g-nav a,.pm-home-sidebar .pm-side-nav a,.sidebar .nav a):not(#paper *){font-size:var(--u-nav)!important;line-height:1.35!important;font-weight:400!important;letter-spacing:0!important;word-spacing:0!important}
html body :is(.pm-gen-sidebar .pm-g-nav a.active,.pm-home-sidebar .pm-side-nav a.active,.sidebar .nav a.active):not(#paper *){font-weight:700!important}
html body :is(.pm-g-section-title,.pm-side-section-title,.pm-side-title,.sidebar .nav-title):not(#paper *){font-size:var(--u-navsec)!important;font-weight:700!important;color:#8fb3d1!important;letter-spacing:0!important}
html body :is(.pm-gen-sidebar .ico,.pm-home-sidebar .ico,.sidebar .pp-nav-icon):not(#paper *){font-size:21px!important}
html body :is(.pm-side-future,.pm-g-note,.pm-side-brand small,.sidebar .brand small,.pm-home-brand-text small,.pm-footer-brand small):not(#paper *){font-size:var(--u-small)!important;line-height:1.5!important}
html body .sidebar .pp-brand-name:not(#paper *){font-size:var(--u-hl)!important;font-weight:700!important}

/* ---------- 4. headers ---------- */
html body :is(.pm-public-bar a,.pm-gen-language,.pm-home-header-links,.pm-home-auth a,.pm-home-user,.topbar a,.pp-header-nav a,.pp-user-name):not(#paper *){font-size:var(--u-hdr)!important;font-weight:700!important}

/* ---------- 5. Home page ---------- */
html body .pm-question-card h1:not(#paper *){font-size:var(--u-home-h1)!important}
html body .pm-question-card .lead:not(#paper *){font-size:var(--u-home-lead)!important;line-height:1.55!important}
html body .pm-question-card .pm-fast-badge:not(#paper *){font-size:var(--u-text)!important;font-weight:700!important}
html body .pm-question-card :is(.pm-select-text,.pm-option,.pm-error):not(#paper *){font-size:var(--u-home-select)!important}
html body .pm-question-card .pm-select-text:not(#paper *){font-weight:400!important}
html body .pm-question-card .pm-next:not(#paper *){font-size:var(--u-hl)!important;font-weight:700!important}
html body .pm-question-card .pm-mini-benefits div:not(#paper *){font-size:var(--u-text)!important}
html body .pm-question-card .pm-mini-benefits b:not(#paper *){font-size:var(--u-field)!important}
html body :is(.pm-benefit-list div,.pm-contact-card p,.pm-contact-note,.pm-feature span,.pm-footer-about p,.pm-footer-note,.pm-footer-col a,.pm-footer-col span,.pm-graphic-copy p,.pm-info-card p,.pm-pricing-note,.pm-price-list li,.pm-section-title p,.pm-tutorial-card p,.offer-copy p,.pm-price-card .price-sub,.pm-price .unit,.pm-paper-option,.pm-stat-strip small):not(#paper *){font-size:var(--u-home-body)!important;line-height:1.55!important}
html body :is(.offer-btn,.tutorial-btn,.pm-price-btn,.pm-footer-bottom):not(#paper *){font-size:var(--u-text)!important;font-weight:700!important}
html body :is(.video-time,.contact-status,.discount-badge,.tutorial-badge,.offer-ribbon,.pm-book,.pm-benefit-list i):not(#paper *){font-size:var(--u-micro)!important}
html body :is(.pm-graphic-copy h2,.offer-copy strong,.pm-section-title h2):not(#paper *){font-size:var(--u-h2)!important;font-weight:700!important}
html body .pm-price .new:not(#paper *){font-size:var(--u-h2)!important;font-weight:700!important}

/* ---------- 6. Generator page ---------- */
html body :is(.multi-box label,.class-box label,.multi-box .muted,.class-box .muted,.selection-summary,.result-head,#questionModes .mode-btn,.result-actions .btn):not(#paper *){font-size:var(--u-sel)!important;line-height:1.45!important}
html body :is(.finder-panel label,.finder-panel .input,.finder-panel select,.finder-panel textarea):not(#paper *){font-size:var(--u-finder)!important}
html body .finder-panel .finder-actions .btn:not(#paper *){font-size:var(--u-btn)!important}
html body .finder-panel .finder-title h3:not(#paper *){font-size:var(--u-hl)!important}
html body .finder-panel .print-settings-note:not(#paper *){font-size:var(--u-small)!important}
html body .finder-panel .badge:not(#paper *){font-size:var(--u-micro)!important}
html body :is(.question-card .q-text,.completion-mini,.completion-mini>div,.completion-mini>div b,.stimulus-full,.stimulus-full *):not(#paper *){font-size:var(--u-q)!important;line-height:1.5!important}
html body .question-card .options .opt:not(#paper *){font-size:var(--u-q)!important;line-height:1.45!important}
html body .question-card .board-year .tag:not(#paper *){font-size:var(--u-micro)!important}

/* ---------- 7. print-settings panel (paper.php) ---------- */
html body aside.settings-panel.epb-panel .epb-title:not(#paper *){font-size:var(--u-hl)!important;font-weight:700!important}
html body aside.settings-panel.epb-panel .epb-sec-t:not(#paper *){font-size:var(--u-epb-h)!important;font-weight:700!important}
html body aside.settings-panel.epb-panel .epb-lbl:not(#paper *){font-size:var(--u-epb)!important}
html body aside.settings-panel.epb-panel :is(.epb-sub,.t):not(#paper *){font-size:var(--u-small)!important}
html body aside.settings-panel.epb-panel :is(.epb-os button,.epb-ps button,.epb-sel,.epb-dl,.epb-pop label,.epb-pop select,.epb-pop input,.hf-row):not(#paper *){font-size:var(--u-small)!important}

/* =====================================================================
   CANONICAL GENERATOR HEADER + SIDEBAR  (generator.php and paper.php)
   ===================================================================== */
html body .pm-public-bar{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;height:var(--pm-hdr-h)!important;min-height:var(--pm-hdr-h)!important;margin:0!important;padding:0 18px 0 10px!important;display:flex!important;align-items:center!important;gap:12px!important;background:#fff!important;border-bottom:1px solid #dfe7ef!important;box-shadow:0 2px 12px rgba(15,45,75,.08)!important;z-index:10000!important;box-sizing:border-box!important}
html body .pm-public-bar .pm-brand{display:flex!important;align-items:center!important;height:72px!important;margin:0!important;padding:0!important;border:0!important;flex:0 0 auto!important;min-width:0!important;text-decoration:none!important}
html body .pm-public-bar .pm-brand img{width:300px!important;max-width:300px!important;height:auto!important;max-height:72px!important;object-fit:contain!important;display:block!important}
html body .pm-public-bar .pm-gen-head-spacer{flex:1 1 auto!important;min-width:10px!important}
html body .pm-public-bar .pm-gen-language{flex:0 0 auto!important;white-space:nowrap!important;color:#52687b!important;margin-right:5px}
html body .pm-public-bar a.pm-login,html body .pm-public-bar a.pm-register{flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:42px!important;padding:0 17px!important;border-radius:10px!important;white-space:nowrap!important;text-decoration:none!important}
html body .pm-public-bar a.pm-login{background:#fff!important;color:#0867d7!important;border:1.5px solid #086fe8!important}
html body .pm-public-bar a.pm-register{background:#086fe8!important;color:#fff!important;border:1.5px solid #086fe8!important}
html body .pm-generator-menu-toggle{display:none;border:0;background:transparent;color:#062f55;font-size:26px!important;cursor:pointer}

html body .pm-gen-sidebar{position:fixed!important;left:0!important;top:var(--pm-hdr-h)!important;bottom:0!important;width:var(--pm-side-w)!important;height:calc(100vh - var(--pm-hdr-h))!important;padding-bottom:24px;background:linear-gradient(180deg,#07335c 0%,#052a4d 55%,#041f3a 100%)!important;color:#fff;z-index:900!important;overflow-y:auto;box-shadow:4px 0 18px rgba(4,31,58,.12);scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.28) transparent}
html body .pm-gen-sidebar::-webkit-scrollbar{width:6px}
html body .pm-gen-sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.25);border-radius:6px}
html body .pm-gen-sidebar .pm-g-brand,html body .pm-gen-sidebar .pm-g-side-head .pm-g-brand{display:none!important}
html body .pm-gen-sidebar .pm-g-side-head{position:relative;height:0!important;min-height:0!important}
html body .pm-gen-sidebar .pm-g-section-title{display:flex;justify-content:space-between;align-items:center;padding:16px 18px 6px!important}
html body .pm-gen-sidebar .pm-g-section-title span{display:none}
html body .pm-gen-sidebar .pm-g-nav{padding:0 8px 4px!important}
html body .pm-gen-sidebar .pm-g-nav a{display:flex;align-items:center;gap:11px;padding:10px 11px!important;margin:2px 0;border-radius:9px;border-left:0!important;color:#e6f0f8;text-decoration:none;transition:background .15s,color .15s}
html body .pm-gen-sidebar .pm-g-nav a:hover{background:rgba(255,255,255,.09)!important;color:#fff}
html body .pm-gen-sidebar .pm-g-nav a.active{background:rgba(41,169,242,.2)!important;color:#fff;box-shadow:inset 3px 0 0 #29a9f2}
html body .pm-gen-sidebar .pm-g-nav a.disabled{opacity:.52;cursor:default}
html body .pm-gen-sidebar .pm-g-nav .ico{width:24px;min-width:24px;text-align:center;display:inline-flex;align-items:center;justify-content:center}
html body .pm-gen-sidebar .menu-label{flex:1;min-width:0}
html body .pm-gen-sidebar .menu-badge{background:#ff3650;color:#fff;border-radius:8px;padding:2px 7px}
html body .pm-gen-sidebar .menu-expand{margin-left:auto;color:#9eb6ca}
html body .pm-g-side-close{display:none}
html body .pm-gen-menu-overlay{display:none}

/* layout when the shell is used on paper.php (body.pm-shell-page) */
html body.pm-shell-page{background:#f4f7fa}
html body.pm-shell-page .app{display:block!important;margin-left:var(--pm-side-w)!important;padding-top:var(--pm-hdr-h)!important;box-sizing:border-box}
html body.pm-shell-page .content{max-width:none!important;width:100%!important;margin:0!important;padding:18px 326px 24px 16px!important}
@media screen and (min-width:1051px){
  html body.pm-shell-page .settings-panel{top:calc(var(--pm-hdr-h) + 10px)!important;height:calc(100vh - var(--pm-hdr-h) - 22px)!important;max-height:calc(100vh - var(--pm-hdr-h) - 22px)!important}
}
/* teacher area (other pages): sidebar same width as the generator's */
@media screen and (min-width:1051px){
  html body .sidebar{width:var(--pm-side-w)!important}
  html body .main{margin-left:var(--pm-side-w)!important;width:calc(100% - var(--pm-side-w))!important}
}

/* tablets / phones */
@media(max-width:1100px){
  html body{--pm-hdr-h:68px}
  html body .pm-public-bar{padding:0 12px 0 8px!important}
  html body .pm-public-bar .pm-brand{height:62px!important}
  html body .pm-public-bar .pm-brand img{width:230px!important;max-width:230px!important;max-height:60px!important}
}
@media(max-width:900px){
  html body .pm-generator-menu-toggle{display:block}
  html body .pm-public-bar .pm-gen-language{display:none!important}
  html body .pm-gen-sidebar{width:min(300px,86vw)!important;transform:translateX(-105%);transition:transform .22s ease;box-shadow:12px 0 40px rgba(2,25,48,.28)}
  html body .pm-gen-sidebar.open{transform:translateX(0)}
  html body .pm-g-side-close{display:block;position:absolute;right:12px;top:12px;border:0;background:rgba(255,255,255,.10);color:#fff;border-radius:50%;width:34px;height:34px;font-size:24px!important;cursor:pointer}
  html body .pm-gen-menu-overlay{position:fixed;inset:0;background:rgba(2,20,36,.48);z-index:800}
  html body .pm-gen-menu-overlay.show{display:block}
  html body.pm-shell-page .app{margin-left:0!important}
  html body.pm-shell-page .content{padding:12px!important}
}
@media(max-width:650px){
  html body{--pm-hdr-h:62px}
  html body .pm-public-bar .pm-brand{height:56px!important}
  html body .pm-public-bar .pm-brand img{width:190px!important;max-width:190px!important;max-height:52px!important}
  html body .pm-public-bar a.pm-login,html body .pm-public-bar a.pm-register{min-height:36px!important;padding:0 10px!important;font-size:var(--u-small)!important}
}

/* the shell never prints */
@media print{
  html body :is(.pm-public-bar,.pm-gen-sidebar,.pm-gen-menu-overlay){display:none!important}
  html body.pm-shell-page .app{margin:0!important;padding:0!important}
}


/* PM GLOBAL LOGO SIZE FIX 2026-10-14: keep the shared Bengali wordmark inside the fixed header on every page. */
html body .pm-public-bar .pm-brand{display:flex!important;align-items:center!important;flex:0 0 230px!important;width:230px!important;max-width:230px!important;height:54px!important;max-height:54px!important;min-width:0!important;overflow:hidden!important;box-sizing:border-box!important;}
html body .pm-public-bar .pm-brand img{display:block!important;flex:none!important;width:230px!important;max-width:230px!important;height:50px!important;max-height:50px!important;object-fit:contain!important;object-position:left center!important;overflow:hidden!important;box-sizing:border-box!important;}
@media(max-width:760px){html body .pm-public-bar .pm-brand{flex-basis:190px!important;width:190px!important;max-width:190px!important;height:48px!important;max-height:48px!important;}html body .pm-public-bar .pm-brand img{width:190px!important;max-width:190px!important;height:46px!important;max-height:46px!important;}}
@media(max-width:480px){html body .pm-public-bar .pm-brand{flex-basis:170px!important;width:170px!important;max-width:170px!important;height:44px!important;max-height:44px!important;}html body .pm-public-bar .pm-brand img{width:170px!important;max-width:170px!important;height:42px!important;max-height:42px!important;}}

/* ---- shared menu icons (SVG): same look on every page that uses the shell (generator, paper, dashboard...) ---- */
.pm-ic{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
html body .pm-gen-sidebar .pm-g-nav .ico{flex:0 0 24px;opacity:.9}
html body .pm-gen-sidebar .pm-g-nav a.active .ico{opacity:1;color:#7fd0ff}
