/* IIBM LMS – single stylesheet. Mobile first, light, no external fonts. */
:root {
  --ink: #1d2433;
  --muted: #5d6676;
  --line: #dfe3ea;
  --bg: #f5f6f8;
  --card: #ffffff;
  --brand: #17336b;
  --brand-2: #8a1c2b;
  --brand-soft: #e8edf7;
  --ok: #1e7a46;
  --warn: #9a5b00;
  --danger: #a3222f;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
body.protected { background-repeat: repeat; }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.3; margin: 1.2em 0 .5em; }
h1 { font-size: 1.6rem; margin-top: .4em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }
p { margin: .6em 0; }
code { background: #eef1f6; padding: 0 .3em; border-radius: 4px; font-size: .92em; }
pre { background: #f0f2f6; padding: .8em; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 12px; padding-bottom: 40px; min-height: 70vh; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 6px 10px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.ok { color: var(--ok); font-weight: 600; }
.warn { color: var(--warn); font-weight: 600; }
.danger { color: var(--danger) !important; }
.pre { white-space: pre-line; }

/* Top bar */
.topbar { background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 16px; gap: 8px; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand:hover { color: #fff; }
.brand-logo { height: 36px; width: auto; background: #fff; border-radius: 6px; padding: 2px; }
.brand .short { display: none; }
.menu-btn { display: none; background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 6px; padding: 4px 10px; font: inherit; }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mainnav a, .mainnav .linkish { color: #e6ebf6; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: .95rem; }
.mainnav a.active, .mainnav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.mainnav form { margin: 0; }
@media (max-width: 720px) {
  .brand .long { display: none; } .brand .short { display: inline; }
  .menu-btn { display: inline-block; }
  .mainnav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .mainnav.open { display: flex; }
}

/* Footer */
.foot { border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .85rem; padding: 14px 0; }

/* Buttons and forms */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3; }
.btn:hover { background: #10264f; color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn-small { padding: 5px 10px; font-size: .88rem; }
.btn-wide { width: 100%; padding: 12px; font-size: 1.05rem; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: var(--ink); border-color: #c9ced8; }
.btn-google:hover { background: #f4f6fa; color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #c4cad6; border-radius: 8px; background: #fff; max-width: 100%; }
textarea { width: 100%; }
label { display: block; margin: .5em 0; font-size: .95rem; }
label > input:not([type=checkbox]):not([type=radio]), label > select, label > textarea { display: block; width: 100%; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 5px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: .6em 0; }
.inline label { margin: 0; }
.inline label > input, .inline label > select { width: auto; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 1em 0; }
.stack { display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 10px 0; border: 1px solid; }
.flash-success { background: #eaf6ef; border-color: #b8dfc7; color: #154d2e; }
.flash-error { background: #fbecee; border-color: #efc1c6; color: #7a1923; }
.flash-info { background: #eef3fb; border-color: #c6d4ee; color: #1f3a6e; }
.errors { color: #7a1923; font-size: .9rem; max-height: 340px; overflow: auto; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.card.subtle { background: #fafbfc; }
.card.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.card > summary, details > summary { cursor: pointer; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.tile { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(23,51,107,.08); color: var(--ink); }
.tile .code { font-size: .8rem; font-weight: 700; color: var(--brand-2); letter-spacing: .03em; }
.tile .name { font-weight: 700; }
.bar { display: block; height: 7px; background: #e6e9ef; border-radius: 9px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.small-bar { width: 120px; display: inline-block; }
.hello { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.today { text-align: right; margin-top: 1em; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 700; color: var(--brand-2); margin: 0; }
.continue { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-left: 4px solid var(--brand); }
.continue h2 { margin: .2em 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.stat .num { font-size: 1.7rem; font-weight: 800; color: var(--brand); }
.badge { background: var(--brand-2); color: #fff; font-size: .7rem; border-radius: 9px; padding: 1px 7px; vertical-align: middle; }
.pill { display: inline-block; font-size: .75rem; border-radius: 9px; padding: 1px 8px; background: #eef1f6; color: var(--muted); }
.pill.ok, .pill.approved { background: #e3f3ea; color: var(--ok); }
.pill.draft, .pill.changes_requested { background: #fff3dc; color: var(--warn); }
.pill.rejected { background: #fbe5e8; color: var(--danger); }
.plain { list-style: none; padding: 0; }
.plain.list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.notice { border-left: 4px solid var(--line); padding-left: 12px; margin: 10px 0; }
.notice-high { border-left-color: var(--brand-2); }
.notice.is-read { opacity: .75; }
.notice h3 { margin: .2em 0; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 4px 0; color: var(--muted); }
.checklist li.done { color: var(--ok); }
.logo-preview { max-height: 70px; }
.row-warn td { background: #fff8ea; }
.row-muted td { color: #9aa1ad; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .6em 0; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: top; }
th { background: #f0f3f8; font-weight: 700; }
table.compact th, table.compact td { padding: 5px 7px; font-size: .9rem; }

/* Subject page */
.subject-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.subject-head h1 { margin: .1em 0; }
.ring { width: 96px; height: 96px; border-radius: 50%; border: 8px solid var(--ok); display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; }
.ring span { font-weight: 800; font-size: 1.2rem; }
.ring small { font-size: .65rem; color: var(--muted); }
.subject-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { display: flex; gap: 6px; flex: 1 1 260px; }
.search input { flex: 1; }
.unit h2 { margin-top: .2em; }
.topic { color: var(--brand); margin-bottom: .2em; }
.lessons { margin: 0 0 .6em; padding-left: 1.4em; }
.lessons li { padding: 4px 0; }
.lessons li.done a { color: var(--ok); }
.unit-test { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
details.sub { margin: 8px 0; }

/* Lesson */
.lesson { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 18px 20px; margin-top: 8px; }
body.protected .lesson { background: rgba(255,255,255,.93); }
.lesson-head h1 { font-size: 1.55rem; margin: .2em 0; }
.lesson-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-tools form { margin: 0; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 14px 0; background: #fbfcfd; }
.box h2 { font-size: 1.05rem; margin: .2em 0 .4em; }
.objectives { background: var(--brand-soft); border-color: #cdd8ee; }
.takeaways { background: #fffbea; border-color: #f0e2a8; }
.prose { overflow-wrap: anywhere; }
.prose h2 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.prose blockquote { border-left: 4px solid var(--brand-soft); margin: .8em 0; padding: .1em 1em; color: #394255; background: #f8f9fc; }
.prose table { font-size: .93rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.math-block { display: block; overflow-x: auto; margin: .8em 0; text-align: center; }
.mermaid { text-align: center; margin: 1em 0; overflow-x: auto; }
.mermaid-alt { font-size: .85rem; color: var(--muted); text-align: center; }

/* Callouts */
.callout { border-radius: var(--radius); padding: 10px 14px; margin: 14px 0; border: 1px solid; border-left-width: 5px; }
.callout-label { font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.callout > .callout-label + p, .callout p:first-of-type { margin-top: .2em; }
.callout-exam { background: #eef3fd; border-color: #b9caf0; }
.callout-interview { background: #f3effc; border-color: #cdbff0; }
.callout-corporate { background: #eef7f8; border-color: #b5dbe0; }
.callout-startup { background: #fff2ea; border-color: #f5c7a9; }
.callout-remember { background: #fffbe6; border-color: #eedb8c; }
.callout-mistake { background: #fdf0f0; border-color: #f0bcbc; }
.callout-revise { background: #f1f5f9; border-color: #c4d0de; }
.callout-practice { background: #eef9f1; border-color: #b6e0c3; }
.callout-industry { background: #eef6fb; border-color: #b9d8ec; }
.callout-lawupdate { background: #fff6e5; border-color: #e9b96b; }
.callout-hindi { background: #fdf7ff; border: 1px solid #e2c8ef; border-left: 5px solid #b07acc; border-radius: var(--radius); padding: 8px 14px; margin: 14px 0; }
.callout-hindi summary { color: #6e3b8a; }
.callout-hindi .sub { font-weight: 400; font-size: .8rem; color: var(--muted); }
[lang="hi"] { font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", var(--font); line-height: 1.75; }
.gl-term { background: none; border: 0; border-bottom: 1px dotted #6e3b8a; padding: 0; font: inherit; color: inherit; cursor: help; }
.gl-pop { position: absolute; z-index: 20; max-width: 300px; background: #2d1a3a; color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .9rem; box-shadow: 0 4px 18px rgba(0,0,0,.2); }

/* Quiz and assessments */
.q { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 10px 0; background: #fff; }
.q legend { font-weight: 600; padding: 0 4px; }
.opt { display: flex; gap: 8px; align-items: flex-start; padding: 7px 8px; border-radius: 8px; margin: 3px 0; cursor: pointer; }
.opt:hover { background: #f3f5f9; }
.opt input { margin-top: 5px; }
.optl { font-weight: 700; color: var(--muted); }
.feedback { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: .93rem; }
.feedback.right { background: #eaf6ef; }
.feedback.wrong { background: #fbecee; }
.quiz-score { font-weight: 700; font-size: 1.1rem; }
.attempt-bar { position: sticky; top: 52px; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin: 10px 0; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.15rem; }
.timer.low { color: var(--danger); }
.result-head .big { font-size: 2rem; font-weight: 800; margin: .2em 0; }
.q-result { background: #fff; border: 1px solid var(--line); border-left: 5px solid; border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; }
.q-result.right { border-left-color: var(--ok); }
.q-result.wrong { border-left-color: var(--danger); }
.q-result h2 { font-size: 1rem; margin: .2em 0 .5em; }
.opts { list-style: none; padding: 0; }
.opts li { padding: 5px 8px; border-radius: 6px; margin: 2px 0; }
.opts li.is-answer { background: #e3f3ea; }
.opts li.is-wrong { background: #fbe5e8; }
.explanation { border-top: 1px dashed var(--line); margin-top: 6px; }
.complete { margin: 20px 0; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.pager .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .pager .btn { max-width: 100%; width: 100%; } }

/* Review */
.review-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.review-side { position: sticky; top: 64px; }
@media (max-width: 860px) { .review-layout { grid-template-columns: 1fr; } .review-side { position: static; } }
.q-review .opts { margin: .4em 0; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.diff { max-height: 400px; overflow: auto; font-size: .82rem; }

/* Glossary */
.terms .term h2 { margin: .1em 0; font-size: 1.1rem; }
.terms .hi { color: #6e3b8a; font-weight: 600; margin-left: 6px; }
.hi-def { color: #4d2d61; }
.filter { width: 100%; margin: .6em 0; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #17336b 0%, #27467f 60%, #8a1c2b 140%); padding: 16px; }
.login-card { background: #fff; border-radius: 14px; padding: 28px 24px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-logo { max-height: 84px; margin-bottom: 6px; }
.login-card h1 { font-size: 1.4rem; }
.aup { border-left: 4px solid var(--brand); background: var(--brand-soft); margin: 1em 0; padding: .6em 1em; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #23293a; color: #fff; padding: 10px 16px; border-radius: 10px; max-width: 92vw; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: .95rem; }

@media print {
  .topbar, .foot, .lesson-tools, .pager, .complete, .quiz { display: none !important; }
  body.protected .lesson-body { display: none; }
  body.protected .lesson::after { content: "Printing of lessons is disabled. Please take handwritten notes."; }
}

/* Release 1.1 – careers */
.badge-upd { background: #9a5b00; }
.row-new td { background: #fff7f2; }
.jr-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.jr-list li:last-child { border-bottom: 0; }
.jr-meta th { width: 34%; }
a.stat { text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--brand); }
.check-row { border: 0; padding: 0; margin: .5em 0; display: flex; gap: 16px; flex-wrap: wrap; }
.career-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.career-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.career-card:hover { border-color: var(--brand); color: var(--ink); }
.career-card .big { font-size: 1.4rem; font-weight: 800; color: var(--brand); }
.career-card.alert { border-left: 4px solid var(--brand-2); }
