/*
 * Libnora — পাবলিক সাইটের ভিত (সব থিমে এক): reset, ফন্ট, লেআউট, ফরম, বোতাম, ছাপা।
 * রং আসে থিমের টোকেন (--lb-*) থেকে; গ্রন্থাগারের রং কেবল --lb-accent (colours.css)।
 * কোনো ইনলাইন সাজ বা স্ক্রিপ্ট নয় — পাবলিক পাতার CSP কড়া থাকে।
 */
@font-face { font-family: "Site Anek Bangla"; font-weight: 800; font-display: swap;
  src: url("/fonts/site/anek-bangla/anek-bangla-800-bengali.v1.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "Site Anek Bangla"; font-weight: 800; font-display: swap;
  src: url("/fonts/site/anek-bangla/anek-bangla-800-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Site Noto Sans Bengali"; font-weight: 400; font-display: swap;
  src: url("/fonts/site/noto-sans-bengali/noto-sans-bengali-400-bengali.v1.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "Site Noto Sans Bengali"; font-weight: 400; font-display: swap;
  src: url("/fonts/site/noto-sans-bengali/noto-sans-bengali-400-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Site Noto Sans Bengali"; font-weight: 700; font-display: swap;
  src: url("/fonts/site/noto-sans-bengali/noto-sans-bengali-700-bengali.v1.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC; }
@font-face { font-family: "Site Noto Sans Bengali"; font-weight: 700; font-display: swap;
  src: url("/fonts/site/noto-sans-bengali/noto-sans-bengali-700-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; }
body { margin: 0; background: var(--lb-bg); color: var(--lb-ink);
  font-family: "Site Noto Sans Bengali", system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.7; }
img { max-width: 100%; height: auto; }
a { color: var(--lb-link); text-underline-offset: .2em; }
h1, h2, h3 { font-family: "Site Anek Bangla", "Site Noto Sans Bengali", system-ui, sans-serif; font-weight: 800;
  line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3.6vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--lb-focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--lb-focus-halo); }
.lb-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lb-hidden-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* লেআউট */
.lb-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.lb-header { background: var(--lb-surface); border-bottom: 1px solid var(--lb-line); }
.lb-header .lb-wrap { display: flex; align-items: center; gap: .9rem; min-height: 72px; flex-wrap: wrap; padding-block: .6rem; }
.lb-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; flex: 1 1 auto; min-width: 0; }
.lb-logo { width: 52px; height: 52px; border-radius: 14px; background: var(--lb-logo-plate); padding: 4px; object-fit: contain; flex: none; }
.lb-brand-name { font-family: "Site Anek Bangla", "Site Noto Sans Bengali", sans-serif; font-weight: 800; font-size: 1.1rem; line-height: 1.3; }
.lb-brand-slogan { display: block; font-size: .85rem; color: var(--lb-ink-soft); font-weight: 400; font-family: "Site Noto Sans Bengali", sans-serif; }
.lb-lang { display: flex; gap: .4rem; align-items: center; font-size: .9rem; }
.lb-lang a, .lb-lang span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .35rem; }
.lb-lang span[aria-current] { font-weight: 700; }
main { padding: 1.5rem 0 3rem; }
.lb-stack > * + * { margin-top: 1.25rem; }
.lb-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .lb-grid--2 { grid-template-columns: 1fr 1fr; } }

/* কার্ড ও ভাঁজ — কেবল যে পাতাটি এখন জরুরি তার কোণ গ্রন্থাগারের রঙে */
.lb-card { position: relative; background: var(--lb-surface); border: 1px solid var(--lb-line); border-radius: 18px;
  padding: 1.25rem; box-shadow: var(--lb-shadow); overflow: hidden; }
.lb-card--tint { background: var(--lb-tint); }
.lb-fold { padding-top: 1.75rem; }
.lb-fold::before { content: ""; position: absolute; top: 0; right: 0; width: 56px; height: 56px;
  background: linear-gradient(225deg, var(--lb-bg) 50%, var(--lb-accent) 50%); border-bottom-left-radius: 12px; }
.lb-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 700; padding: .15rem .7rem;
  border-radius: 999px; background: var(--lb-accent); color: var(--lb-on-accent); }
.lb-tag--muted { background: var(--lb-line); color: var(--lb-ink); }
.lb-facts { display: grid; grid-template-columns: minmax(7.5rem, auto) 1fr; gap: .35rem 1rem; margin: 0; }
.lb-facts dt { color: var(--lb-ink-soft); }
.lb-facts dd { margin: 0; font-weight: 700; }
.lb-big { font-family: "Site Anek Bangla", "Site Noto Sans Bengali", sans-serif; font-weight: 800; font-size: clamp(1.8rem, 7vw, 2.6rem); letter-spacing: .02em; }
.lb-note { border-radius: 14px; padding: .85rem 1rem; background: var(--lb-tint); }
.lb-note--warn { background: var(--lb-warm); }
.lb-note--ok { background: var(--lb-ok-bg); color: var(--lb-ok); font-weight: 700; }
.lb-note--bad { background: var(--lb-bad-bg); color: var(--lb-bad); font-weight: 700; }
.lb-pre { white-space: pre-line; }

/* বোতাম */
.lb-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.4rem;
  border-radius: 999px; border: 2px solid var(--lb-accent); background: var(--lb-accent); color: var(--lb-on-accent);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.lb-btn--ghost { background: transparent; color: var(--lb-link); }
.lb-btn--block { width: 100%; }

/* ফরম — প্রত্যাখ্যাত ফরম লেখা রাখে, ভুল ঘরের নিচেই */
.lb-form { display: grid; gap: 1rem; }
.lb-field { display: grid; gap: .3rem; }
.lb-field label, .lb-legend { font-weight: 700; }
.lb-field input, .lb-field select, .lb-field textarea { width: 100%; min-height: 48px; padding: .55rem .8rem; font: inherit;
  color: var(--lb-ink); background: var(--lb-field); border: 1.5px solid var(--lb-field-line); border-radius: 12px; }
.lb-field input[aria-invalid="true"], .lb-field select[aria-invalid="true"] { border-color: var(--lb-bad); }
.lb-hint { font-size: .9rem; color: var(--lb-ink-soft); }
.lb-error { font-size: .9rem; color: var(--lb-bad); font-weight: 700; }
.lb-check { display: flex; gap: .65rem; align-items: flex-start; }
.lb-check input { width: 22px; height: 22px; margin-top: .3rem; flex: none; accent-color: var(--lb-accent); }
.lb-choices { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.lb-choices label { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; font-weight: 400; }
.lb-choices input { width: 20px; height: 20px; accent-color: var(--lb-accent); }
.lb-required { color: var(--lb-bad); }

/* সময়রেখা */
.lb-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lb-steps li { display: flex; gap: .6rem; align-items: baseline; }
.lb-steps .lb-dot { width: 1.4rem; flex: none; text-align: center; font-weight: 800; }
.lb-steps .is-done .lb-dot { color: var(--lb-ok); }
.lb-steps .is-now { font-weight: 700; }

/* ফুটার */
.lb-footer { background: var(--lb-footer); color: var(--lb-footer-ink); padding: 2rem 0; font-size: .95rem; }
.lb-footer a { color: inherit; }
.lb-footer .lb-wrap { display: grid; gap: .5rem; }
.lb-footer :focus-visible { outline-color: var(--lb-footer-ink); }
.lb-credit { opacity: .75; font-size: .85rem; }

/* ছাপা — নিবন্ধনপত্র, A4-এ থিম-নিরপেক্ষ */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .lb-header, .lb-footer, .lb-no-print { display: none !important; }
  .lb-card { box-shadow: none; border: 1px solid #000; }
  .lb-fold::before { display: none; }
  a { color: #000; text-decoration: none; }
}

/* শিক্ষার্থীর ছবির ঝলক — কেবল জমা দেওয়ার আগে, এই ব্রাউজারেই */
.lb-photo-preview { width: 120px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--lb-line); }
