/* UPMED LMS: its own screen, in the website's colours (theme.json of the UPMED theme). */
:root {
	--brand: #00aeef;
	--brand-dark: #0077a8;
	--brand-deep: #005f87;
	--brand-soft: #e8f7fd;
	--surface: #f7fafc;
	--ink: #2b2727;
	--muted: #726868;
	--line: #e4eaee;
	--ok: #1a7f4b;
	--ok-soft: #e7f6ee;
	--warn-soft: #fff6e0;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(16, 40, 60, .05), 0 6px 20px rgba(16, 40, 60, .06);
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: Lora, Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.lms-body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--surface);
	color: var(--ink);
	font: 16px/1.6 var(--sans);
}
a { color: var(--brand-dark); }
a:hover { color: var(--brand-deep); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; color: var(--ink); margin: 0 0 .5rem; font-weight: 600; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); }
h2 { font-size: 1.25rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lms-skip:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 99; background: #fff; padding: .5rem 1rem; border-radius: 8px; }
.lms-ic { flex: none; vertical-align: -3px; }
.lms-muted { color: var(--muted); }

/* Top bar */
.lms-top { background: #fff; border-top: 3px solid var(--brand); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.lms-top-in { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lms-top .lms-top-in { min-height: 64px; }
.lms-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.lms-brand img { width: 64px; height: auto; display: block; }
.lms-brand span { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; padding-left: 12px; border-left: 1px solid var(--line); }
.lms-top-nav { display: flex; align-items: center; gap: 6px; }
.lms-top-nav > a { display: inline-flex; align-items: center; gap: 6px; padding: .45rem .75rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.lms-top-nav > a:hover, .lms-top-nav > a[aria-current] { background: var(--brand-soft); color: var(--brand-dark); }
.lms-user { position: relative; }
.lms-user summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: .3rem .5rem .3rem .3rem; border-radius: 999px; }
.lms-user summary::-webkit-details-marker { display: none; }
.lms-user summary:hover { background: var(--brand-soft); }
.lms-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-dark); color: #fff; font-weight: 700; font-size: .85rem; }
.lms-user-name { font-weight: 600; font-size: .95rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lms-user-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; }
.lms-user-menu p { margin: 0; padding: .5rem .65rem .65rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.lms-user-menu a { display: block; padding: .5rem .65rem; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.lms-user-menu a:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Page */
.lms-wrap { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 20px 56px; }
.lms-bottom { border-top: 1px solid var(--line); background: #fff; font-size: .85rem; color: var(--muted); }
.lms-bottom-in { max-width: 1180px; margin: 0 auto; padding: 14px 20px; }
.lms-head { margin-bottom: 24px; }
.lms-eyebrow { margin: 0 0 .25rem; color: var(--brand-dark); font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.lms-lead { margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; max-width: 70ch; }
.lms-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; margin-bottom: 14px; color: var(--muted); }
.lms-crumbs a { text-decoration: none; }
.lms-crumbs a:hover { text-decoration: underline; }
.lms-tag { display: inline-block; margin-bottom: .5rem; padding: .1rem .55rem; border-radius: 999px; background: var(--warn-soft); color: #7a5300; font-size: .75rem; font-weight: 700; }
.lms-note { display: flex; align-items: center; gap: 8px; padding: .75rem 1rem; border-radius: 12px; margin: 0 0 18px; }
.lms-note.is-ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.lms-note.is-warn { background: var(--warn-soft); color: #7a5300; }
.lms-note.is-info { background: var(--brand-soft); color: var(--brand-deep); font-size: .93rem; }
.lms-note[hidden] { display: none; }
.lms-body [hidden] { display: none !important; }

/* Buttons */
.lms-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: .7rem 1.25rem; background: var(--brand-dark); color: #fff !important; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.lms-btn:hover { background: var(--brand-deep); }
.lms-btn:disabled { opacity: .6; cursor: default; }
.lms-btn.is-ghost { background: #fff; color: var(--brand-dark) !important; border: 1px solid var(--line); }
.lms-btn.is-ghost:hover { border-color: var(--brand-dark); }

/* Progress bar */
.lms-bar { display: block; height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; margin: .6rem 0 .4rem; }
.lms-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: inherit; min-width: 0; }

/* My courses */
.lms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.lms-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.lms-card:hover { transform: translateY(-2px); border-color: #bfe6f6; color: var(--ink); }
.lms-card-img { display: block; aspect-ratio: 16 / 8; background: center / cover no-repeat var(--brand-soft); }
.lms-card-img.is-plain { display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: rgba(255, 255, 255, .9); font: 600 2.2rem var(--serif); letter-spacing: .04em; }
.lms-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.lms-card-title { font: 600 1.15rem/1.3 var(--serif); margin-bottom: .35rem; }
.lms-card-text { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; }
.lms-card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; }
.lms-card-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.lms-empty { max-width: 560px; margin: 24px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 28px; box-shadow: var(--shadow); }
.lms-empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); margin-bottom: 12px; }
.lms-empty-ic .lms-ic { width: 26px; height: 26px; }
.lms-ended { margin-top: 36px; }
.lms-ended ul { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.lms-ended li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.lms-ended li:first-child { border-top: 0; }

/* Course */
.lms-hero { display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px; }
.lms-hero.has-img { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.lms-hero-img { background: center / cover no-repeat var(--brand-soft); min-height: 220px; }
.lms-hero-body { padding: 26px 28px; border-left: 5px solid var(--brand); }
.lms-hero.has-img .lms-hero-body { border-left: 0; }
.lms-hero-body .lms-bar { max-width: 460px; }
.lms-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }
.lms-about, .lms-lessons { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 24px; }

/* Lesson list */
.lms-list { list-style: none; margin: 0; padding: 0; }
.lms-item a { display: flex; align-items: flex-start; gap: 12px; padding: .7rem .6rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.lms-item a:hover { background: var(--brand-soft); }
.lms-list.is-full .lms-item + .lms-item { border-top: 1px solid var(--line); }
.lms-list.is-full .lms-item a { padding: .85rem .6rem; }
.lms-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); font-size: .8rem; font-weight: 700; color: var(--muted); background: #fff; }
.lms-item.is-done .lms-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.lms-item.is-done .lms-num .lms-ic { width: 15px; height: 15px; }
.lms-item.is-current a { background: var(--brand-soft); }
.lms-item.is-current .lms-num { border-color: var(--brand-dark); color: var(--brand-dark); }
.lms-item.is-current.is-done .lms-num { color: #fff; }
.lms-item-main { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.lms-item-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.lms-item-title .lms-ic { width: 14px; height: 14px; color: var(--muted); }
.lms-item-meta { font-size: .85rem; color: var(--muted); }

/* Lesson */
.lms-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px 28px; min-width: 0; }
.lms-main > h1 { margin-bottom: 1.1rem; }
.lms-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 18px; border-radius: 12px; overflow: hidden; background: #0b1b24; }
.lms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lms-video.is-oembed { aspect-ratio: auto; background: none; }
.lms-video.is-oembed iframe { position: static; width: 100%; aspect-ratio: 16 / 9; height: auto; }
.lms-player { margin: 0 0 18px; }
.lms-player video { width: 100%; border-radius: 12px; background: #0b1b24; display: block; }
.lms-player audio { width: 100%; }
.lms-player figcaption { font-size: .85rem; color: var(--muted); margin-top: .35rem; }
.lms-player.is-audio figcaption { margin: 0 0 .35rem; font-weight: 600; color: var(--ink); }

/* Lesson text */
.lms-content { font-size: 1.04rem; line-height: 1.7; overflow-wrap: break-word; }
.lms-content > *:first-child { margin-top: 0; }
.lms-content h2 { font-size: 1.35rem; margin-top: 1.6em; }
.lms-content h3 { font-size: 1.12rem; margin-top: 1.4em; }
.lms-content img, .lms-content video, .lms-content iframe { max-width: 100%; height: auto; border-radius: 8px; }
.lms-content .wp-block-embed iframe { width: 100%; }
.lms-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.lms-content th, .lms-content td { border: 1px solid var(--line); padding: .5rem .65rem; text-align: left; }
.lms-content blockquote { margin: 1.2em 0; padding: .4em 1em; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 8px 8px 0; }
.lms-content .wp-block-button__link, .lms-content .wp-element-button { background: var(--brand-dark); color: #fff; border-radius: 999px; }

/* Links and files */
.lms-box { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--surface); }
.lms-box.is-main { background: var(--brand-soft); border-color: #bfe6f6; }
.lms-box h2 { font-size: 1.05rem; margin-bottom: .7rem; }
.lms-links, .lms-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lms-linkbtn { display: flex; align-items: center; gap: 10px; padding: .7rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; }
.lms-linkbtn span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lms-linkbtn:hover { border-color: var(--brand-dark); }
.lms-files li { display: flex; align-items: center; gap: 12px; padding: .6rem .75rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.lms-file-ic { flex: none; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-size: .7rem; font-weight: 800; letter-spacing: .03em; }
.lms-file-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.lms-file-name small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.lms-file-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lms-file-acts a { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .88rem; font-weight: 600; }
.lms-file-acts a:hover { border-color: var(--brand-dark); }

/* Lesson footer */
.lms-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.lms-mark { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.lms-done { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 700; }
.lms-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lms-pn-a { display: flex; flex-direction: column; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.lms-pn-a small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.lms-pn-a:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
.lms-pn-a.is-next { grid-column: 2; text-align: right; }

/* Phones and tablets */
@media (max-width: 900px) {
	.lms-hero.has-img { grid-template-columns: 1fr; }
	.lms-hero-img { min-height: 160px; }
}
@media (max-width: 600px) {
	.lms-top-in { padding: 0 16px; }
	.lms-wrap { padding: 20px 16px 40px; }
	.lms-brand img { width: 52px; }
	.lms-brand span { font-size: .95rem; padding-left: 10px; }
	.lms-top-nav > a span, .lms-user-name { display: none; }
	.lms-main, .lms-about, .lms-lessons { padding: 18px 16px; }
	.lms-hero-body { padding: 20px 18px; }
	.lms-pn { grid-template-columns: 1fr; }
	.lms-pn-a.is-next { grid-column: 1; }
	.lms-files li { flex-wrap: wrap; }
	.lms-file-acts { width: 100%; justify-content: flex-start; padding-left: 56px; }
	.lms-mark .lms-btn { width: 100%; justify-content: center; }
}

/* 1.1.0: quizzes, assignments, marks, app install */
.lms-work { margin-top: 24px; padding-top: 4px; }
.lms-work-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: .92rem; color: var(--muted); margin-bottom: 16px; }
.lms-work-head .is-late { color: #b32d2e; font-weight: 600; }
.lms-chip { background: var(--brand-dark); color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; padding: .15rem .6rem; border-radius: 999px; }
.lms-status { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #f0f2f4; color: var(--muted); white-space: nowrap; }
.lms-work-head .lms-status { margin-left: auto; }
.lms-status.is-submitted { background: var(--warn-soft); color: #7a5300; }
.lms-status.is-graded { background: var(--ok-soft); color: var(--ok); }
.lms-status.is-returned { background: #fde8e8; color: #a61b1b; }
.lms-score { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.lms-score-n { font: 700 2.2rem/1 var(--serif); color: var(--brand-dark); }
.lms-score-n small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.lms-feedback { background: var(--brand-soft); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.lms-feedback p { margin: .3rem 0 0; }
.lms-qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lms-q { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.lms-q-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.lms-q-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .85rem; }
.lms-q-text { flex: 1; font-weight: 400; padding-top: 2px; overflow-wrap: anywhere; }
.lms-q-m { flex: none; font-size: .8rem; color: var(--muted); padding-top: 4px; white-space: nowrap; }
.lms-body textarea { width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; padding: .65rem .8rem; border: 1px solid #cfd8de; border-radius: 10px; background: #fff; color: var(--ink); resize: vertical; }
.lms-body textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.lms-a { background: var(--surface); border-radius: 10px; padding: .65rem .8rem; overflow-wrap: anywhere; }
.lms-q-mark { margin-top: 8px; font-size: .92rem; display: inline-block; padding: .2rem .65rem; border-radius: 999px; }
.lms-q-mark.is-full { background: var(--ok-soft); color: var(--ok); }
.lms-q-mark.is-part { background: var(--warn-soft); color: #7a5300; }
.lms-q-mark.is-zero { background: #f0f2f4; color: var(--muted); }
.lms-q-mark.is-neg { background: #fde8e8; color: #a61b1b; }
.lms-q-fb { margin-top: 8px; font-size: .92rem; color: var(--ink); border-left: 3px solid var(--brand); padding-left: 10px; }
.lms-q-model { margin-top: 8px; font-size: .92rem; }
.lms-q-expl { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 8px 8px 0; font-size: .95rem; }
.lms-q-expl strong { display: block; color: var(--brand-dark); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.lms-q-model summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; }
.lms-work-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.lms-upload { display: grid; gap: 10px; margin-top: 6px; }
.lms-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 16px; border: 2px dashed #bfe6f6; border-radius: 12px; background: var(--brand-soft); cursor: pointer; }
.lms-drop:hover, .lms-drop:focus-within { border-color: var(--brand-dark); }
.lms-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lms-drop-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-dark); }
.lms-drop .lms-muted { font-size: .85rem; }
.lms-drop-list { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.lms-label { font-weight: 600; font-size: .92rem; margin-top: 4px; }
.lms-sub-files { margin-bottom: 12px; }
.lms-file-acts form { margin: 0; }
.lms-link-btn { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #a61b1b; font: 600 .88rem var(--sans); cursor: pointer; }
.lms-link-btn:hover { border-color: #a61b1b; }
.lms-grades table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lms-grades th, .lms-grades td { text-align: left; padding: .65rem .5rem; border-top: 1px solid var(--line); vertical-align: top; }
.lms-grades thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lms-grades td small { display: block; color: var(--muted); font-size: .82rem; }
.lms-grades td a { font-weight: 600; text-decoration: none; }
.lms-grades .num { text-align: right; white-space: nowrap; }
.lms-grades tfoot th { font-size: .92rem; }
.lms-install { display: inline-flex; align-items: center; gap: 6px; padding: .42rem .8rem; border-radius: 999px; border: 1px solid #bfe6f6; background: #fff; color: var(--brand-dark); font: 600 .9rem var(--sans); cursor: pointer; }
.lms-install:hover { background: var(--brand-soft); }
.lms-install[hidden] { display: none; }
.lms-ios { position: fixed; inset: 0; z-index: 50; background: rgba(16, 30, 40, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.lms-ios[hidden] { display: none; }
.lms-ios-box { background: #fff; border-radius: 16px; padding: 18px 20px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.lms-ios-box p { margin: 0 0 .6rem; }
html.is-app .lms-bottom { display: none; }
@media (max-width: 600px) {
	.lms-install span { display: none; }
	.lms-work-head .lms-status { margin-left: 0; }
	.lms-work-acts .lms-btn { width: 100%; justify-content: center; }
	.lms-q { padding: 12px; }
	.lms-grades th:nth-child(2), .lms-grades td:nth-child(2) { display: none; }
}
/* 1.2.0: voice feedback, batch tags */
.lms-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.lms-voice-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--brand-dark); }
.lms-voice audio { width: 100%; max-width: 420px; height: 40px; }
.lms-batch-tag { display: inline-block; margin: 0 0 6px; padding: .1rem .55rem; border-radius: 999px; background: var(--warn-soft); color: #7a5300; font-size: .75rem; font-weight: 700; }
.lms-linkbtn .lms-batch-tag { margin: 0 0 0 8px; vertical-align: 1px; }

/* ==================================================================== */
/* 1.3.0: app shell with a left menu (like the MSDS Dashboard)           */
/* ==================================================================== */
/* Left menu: white, in the website's colours (brand blue for what is active). */
:root { --side-w: 272px; }
.lms-side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: #fff; border-right: 1px solid var(--line); color: var(--ink); z-index: 40; transition: width .18s ease, transform .2s ease; }
.lms-side::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand); }
.lms-side-in { height: 100%; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: 18px 12px 12px; }
.lms-side a { color: inherit; }
.lms-side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 4px 14px; }
.lms-side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.lms-side-logo { flex: none; display: grid; place-items: center; }
.lms-side-logo img { width: 56px; height: auto; display: block; }
.lms-side-name { font: 600 1.02rem var(--serif); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-side-x { display: none; background: none; border: 0; color: var(--muted); padding: 6px; cursor: pointer; }
.lms-side-x:hover { color: var(--brand-dark); }
.lms-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.lms-nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: 500 .93rem var(--sans); background: none; border: 0; width: 100%; text-align: left; cursor: pointer; position: relative; }
.lms-nav-item .lms-ic { width: 19px; height: 19px; color: var(--muted); }
.lms-nav-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
.lms-nav-item:hover .lms-ic { color: var(--brand-dark); }
.lms-nav-item.is-on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.lms-nav-item.is-on .lms-ic { color: var(--brand-dark); }
.lms-nav-item.is-small { font-size: .86rem; padding: 7px 12px; }
.lms-nav-item[hidden] { display: none; }
.lms-side-course { margin: 12px 0 6px; padding: 12px; border-radius: 12px; background: var(--brand-soft); border: 1px solid #cdeefb; }
.lms-side-ctitle { display: block; font: 600 .98rem/1.3 var(--serif); color: var(--ink) !important; text-decoration: none; }
.lms-side-ctitle:hover { color: var(--brand-dark) !important; }
.lms-side-course small { display: flex; align-items: center; gap: 5px; font-size: .8rem; margin-top: 2px; color: var(--muted); }
.lms-side-course small .lms-ic { width: 13px; height: 13px; }
.lms-side-course .lms-bar { background: #fff; height: 6px; margin: 10px 0 4px; }
.lms-nav-lessons { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 1px; }
.lms-nav-lesson { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; text-decoration: none; font-size: .88rem; line-height: 1.3; color: var(--ink); }
a.lms-nav-lesson:hover { background: var(--brand-soft); color: var(--brand-dark); }
.lms-nav-lesson.is-on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.lms-nav-n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; border: 1.5px solid #cfd8de; color: var(--muted); background: #fff; }
.lms-nav-lesson.is-on .lms-nav-n { border-color: var(--brand-dark); color: var(--brand-dark); }
.lms-nav-lesson.is-done .lms-nav-n { background: var(--brand); border-color: var(--brand); color: #fff; }
.lms-nav-n .lms-ic { width: 12px; height: 12px; }
.lms-nav-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lms-nav-t em { font-style: normal; color: var(--muted); font-size: .78rem; }
.lms-nav-ic { flex: none; color: var(--muted); }
.lms-nav-ic .lms-ic, .lms-nav-lesson > .lms-ic { width: 15px; height: 15px; }
.lms-nav-lesson.is-locked { color: var(--muted); }
.lms-nav-lesson.is-locked > .lms-ic { color: var(--muted); }
.lms-nav-dot { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d0402f; color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.lms-side-foot { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: grid; gap: 1px; }
.lms-side-user { display: flex; align-items: center; gap: 10px; padding: 6px 10px 10px; min-width: 0; }
.lms-side-user b { display: block; color: var(--ink); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-side-user small { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-side-user > span:last-child { min-width: 0; }
.lms-side-user .lms-avatar { width: 32px; height: 32px; font-size: .78rem; background: var(--brand-dark); flex: none; }
.lms-shell { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .18s ease; }
.lms-topbar { position: sticky; top: 0; z-index: 30; display: none; align-items: center; gap: 12px; height: 56px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.lms-topbar.is-plain { display: flex; }
.lms-burger { background: none; border: 0; padding: 6px; color: var(--ink); cursor: pointer; }
.lms-burger .lms-ic { width: 24px; height: 24px; }
.lms-topbar-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1rem var(--serif); margin-right: auto; }
.lms-topbar-brand img { width: 56px; height: auto; display: block; }
.lms-topbar .lms-avatar { width: 32px; height: 32px; font-size: .78rem; }
.lms-net { position: fixed; top: 12px; right: 16px; z-index: 45; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: #7a5300; background: var(--warn-soft); padding: .3rem .7rem; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.lms-net[hidden] { display: none; }
.lms-net .lms-ic { width: 15px; height: 15px; }
.lms-wrap { max-width: 1040px; width: 100%; margin: 0 auto; padding: 28px 28px 56px; }
.is-lesson .lms-wrap { max-width: 900px; }
.lms-bottom-in { max-width: 1040px; }
.lms-btn.is-small { padding: .45rem .9rem; font-size: .88rem; }
.lms-head-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.lms-more { margin-top: 40px; }
.lms-more h2, .lms-ended h2 { margin-bottom: 14px; }
.lms-card.is-preview .lms-card-go { color: var(--muted); }
.lms-list.is-locked .lms-row { display: flex; align-items: flex-start; gap: 12px; padding: .8rem .6rem; color: var(--ink); }
.lms-list.is-locked .lms-row > .lms-ic { margin-left: auto; color: var(--muted); }
.lms-list.is-locked .lms-item + .lms-item { border-top: 1px solid var(--line); }
.lms-new { color: #d0402f; font-weight: 700; font-style: normal; }
.lms-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px)); background: var(--brand-deep); color: #fff; padding: .8rem 1.1rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(16, 40, 60, .18); font-size: .93rem; line-height: 1.45; }
.lms-toast[hidden] { display: none; }
.lms-scrim { position: fixed; inset: 0; background: rgba(43, 39, 39, .35); z-index: 35; }
.lms-scrim[hidden] { display: none; }

/* Desktop: offline badge and the narrow menu. */
@media (min-width: 901px) {
	html.side-mini { --side-w: 78px; }
	html.side-mini .lms-side-name, html.side-mini .lms-side-course, html.side-mini .lms-nav-item span, html.side-mini .lms-nav-t, html.side-mini .lms-nav-ic, html.side-mini .lms-side-user > span:last-child, html.side-mini .lms-nav-dot { display: none; }
	html.side-mini .lms-side-top { justify-content: center; margin: 0 0 14px; }
	html.side-mini .lms-side-logo img { width: 44px; }
	html.side-mini .lms-nav-item, html.side-mini .lms-nav-lesson { justify-content: center; padding: 9px 0; }
	html.side-mini .lms-side-user { justify-content: center; padding: 6px 0 10px; }
	html.side-mini .lms-side-mini .lms-ic { transform: rotate(180deg); }
}
/* Phones and tablets: the menu slides in. */
@media (max-width: 900px) {
	.lms-side { transform: translateX(-100%); width: min(86vw, 300px); box-shadow: 0 0 40px rgba(16, 40, 60, .18); }
	body.nav-open .lms-side { transform: none; }
	.lms-side-x { display: block; }
	.lms-side-mini { display: none !important; }
	.lms-shell { margin-left: 0; }
	.lms-topbar { display: flex; }
	.lms-net { top: 64px; left: 50%; right: auto; transform: translateX(-50%); }
	.lms-wrap { padding: 20px 16px 40px; }
}

/* Comments on feedback */
.lms-thread { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.lms-thread h3 { font-size: 1.05rem; margin: 0 0 10px; }
.lms-thread-empty { color: var(--muted); font-size: .93rem; margin: 0 0 10px; }
.lms-msgs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.lms-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--brand-soft); position: relative; }
.lms-msg.is-mine { margin-left: auto; border-radius: 14px 14px 4px 14px; background: var(--surface); border: 1px solid var(--line); }
.lms-msg.is-new { box-shadow: 0 0 0 2px #ffd0c9; }
.lms-msg-head { font-size: .8rem; color: var(--muted); margin-bottom: 3px; }
.lms-msg-head strong { color: var(--ink); }
.lms-msg-body { font-size: .95rem; overflow-wrap: anywhere; }
.lms-msg-del { font-size: .75rem; color: #b32d2e; }
.lms-thread-acts { margin: 8px 0 0; }
/* Multiple choice and quiz pages */
.lms-opts { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.lms-opts > li { margin: 0; list-style: none; }
.lms-opt { display: flex; align-items: flex-start; gap: 10px; padding: .65rem .8rem; border: 1px solid #cfd8de; border-radius: 10px; background: #fff; cursor: pointer; line-height: 1.45; }
.lms-opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.lms-opt input { margin: .2rem 0 0; accent-color: var(--brand-dark); flex: none; }
.lms-opt:has(input:checked) { border-color: var(--brand-dark); background: var(--brand-soft); }
.lms-opt-l { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.lms-opt:has(input:checked) .lms-opt-l, .lms-opt.is-chosen .lms-opt-l { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
div.lms-opt { cursor: default; }
div.lms-opt:hover { border-color: #cfd8de; background: #fff; }
.lms-opt.is-chosen { border-color: var(--brand-dark); }
.lms-opt.is-correct, div.lms-opt.is-correct:hover { border-color: var(--ok); background: var(--ok-soft); }
.lms-opt.is-correct .lms-opt-l { background: var(--ok); border-color: var(--ok); color: #fff; }
.lms-opt.is-wrong, div.lms-opt.is-wrong:hover { border-color: #e2a39b; background: #fdf0ee; }
.lms-opt.is-wrong .lms-opt-l { background: #c0392b; border-color: #c0392b; color: #fff; }
.lms-opt-tag { margin-left: auto; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.lms-opt.is-correct .lms-opt-tag { color: var(--ok); }
.lms-opt.is-wrong .lms-opt-tag { color: #c0392b; }
.lms-q[hidden] { display: none; }
.lms-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.lms-pager.is-top { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: sticky; top: 8px; z-index: 5; }
.lms-pager.is-bottom { margin: 18px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.lms-pager.is-top .lms-answered { flex-basis: 100%; text-align: center; }
.lms-pager[hidden] { display: none; }
.lms-pager-dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; flex: 1; }
.lms-dot { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; border: 1px solid #cfd8de; background: #fff; color: var(--ink); font: 600 .85rem var(--sans); cursor: pointer; }
.lms-dot:hover { border-color: var(--brand-dark); color: var(--brand-dark); }
.lms-dot.is-done { background: var(--brand-soft); border-color: #bfe6f6; color: var(--brand-dark); }
.lms-dot.is-on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.lms-btn[hidden] { display: none; }
.lms-pager .lms-btn[disabled] { opacity: .45; cursor: default; }
.lms-answered { margin: 0; font-size: .9rem; color: var(--muted); }
.lms-answered b { color: var(--brand-dark); }
@media (max-width: 900px) { .lms-pager.is-top { top: 64px; } }
@media (max-width: 600px) { .lms-pager.is-top { justify-content: center; } .lms-pager.is-top .lms-pager-dots { order: -1; flex-basis: 100%; } }
@media print {
	.lms-top, .lms-side, .lms-topbar, .lms-foot, .lms-bottom, .lms-thread form { display: none; }
	.lms-shell { margin-left: 0; }
}

/* Assignment rounds (revisions) */
.lms-feedback.is-revise { background: var(--warn-soft); border: 1px solid #f3dca0; }
.lms-feedback.is-revise > strong { color: #7a5300; }
.lms-rounds { margin-top: 22px; }
.lms-rounds h3 { font-size: 1.05rem; margin: 0 0 10px; }
.lms-round { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; }
.lms-round summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.lms-round summary span { color: var(--muted); font-size: .88rem; }
.lms-round-in { padding: 0 14px 12px; }
.lms-round-l { margin: 10px 0 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lms-round-files { margin: 0; padding-left: 18px; }
.lms-round-files small { color: var(--muted); }
.lms-round-t { background: var(--surface); border-radius: 10px; padding: .55rem .75rem; overflow-wrap: anywhere; }
.lms-round-t.is-fb { background: var(--brand-soft); }

/* Quiz attempts */
.lms-attempts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lms-attempts p { margin: 0; }
.lms-attempts form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.lms-count-tag { font-style: normal; font-size: .75rem; font-weight: 700; color: #fff; background: var(--brand-dark); border-radius: 999px; padding: .1rem .5rem; }
.lms-round .lms-quiz { margin-top: 8px; }

/* My marks: every attempt */
.lms-grades tr.lms-grades-tries td { padding-top: 0; border-top: 0; }
.lms-grades-tries ul { list-style: none; margin: 0; padding: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--muted); }
.lms-grades-tries li b { color: var(--ink); font-weight: 600; }
.lms-grades-tries li.is-counts b { color: var(--brand-dark); }

/* ---------------- Question bank ---------------- */
.qb-hero .lms-hero-body { border-left-color: var(--brand); }
.qb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 22px; }
.qb-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
a.qb-tile:hover { border-color: #bfe6f6; color: var(--ink); }
.qb-tile-n { font: 700 1.6rem/1.1 var(--serif); color: var(--brand-dark); }
.qb-tile-l { font-weight: 600; }
.qb-tile small { color: var(--muted); font-size: .82rem; }
.lms-nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }

/* Category trees */
.qb-tree { list-style: none; margin: 0; padding: 0 0 0 18px; }
.qb-tree.is-root { padding-left: 0; }
.qb-tree li { margin: 2px 0; }
.qb-tree li[hidden] { display: none; }
.qb-tree label { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.qb-tree label:hover { background: var(--brand-soft); }
.qb-tree label small { color: var(--muted); }
.qb-tree input { accent-color: var(--brand-dark); width: 17px; height: 17px; }
.qb-tree details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.qb-tree details > summary::-webkit-details-marker { display: none; }
.qb-tree details > summary::before { content: "▸"; width: 16px; color: var(--muted); font-size: .8rem; flex: none; }
.qb-tree details[open] > summary::before { content: "▾"; }
.qb-tree li:not(:has(> details)) { padding-left: 16px; }
.qb-tree-box { max-height: 460px; overflow: auto; padding: 4px 0; }

/* Create a test */
.qb-create-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.qb-create .lms-box { margin: 0; }
.qb-create h2 { font-size: 1.05rem; margin: 0 0 10px; }
.qb-create h2 small { font: 400 .8rem var(--sans); color: var(--muted); margin-left: 6px; }
.qb-input { font: inherit; padding: .5rem .7rem; border: 1px solid #cfd8de; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.qb-input.qb-num { width: 90px; }
.qb-field { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qb-field[hidden] { display: none; }
.qb-radios { display: grid; gap: 6px; margin: 0 0 12px; }
.qb-radios label { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.qb-radios label:has(input:checked) { border-color: var(--brand-dark); background: var(--brand-soft); }
.qb-radios small { color: var(--muted); }
.qb-mode label { flex-wrap: wrap; }
.qb-avail { color: var(--brand-dark); min-height: 1.4em; }
.qb-paper[hidden] { display: none; }
@media (max-width: 900px) { .qb-create-grid { grid-template-columns: 1fr; } }

/* Runner */
.qb-runner { margin-top: 6px; }
.qb-bar { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 10px 14px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.qb-bar-l { display: flex; flex-direction: column; min-width: 0; }
.qb-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.qb-mode { font-size: .8rem; color: var(--muted); }
.qb-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qb-timer { font: 700 1rem var(--sans); font-variant-numeric: tabular-nums; color: var(--brand-dark); background: var(--brand-soft); padding: .3rem .6rem; border-radius: 8px; }
.qb-timer.is-low { color: #b32d2e; background: #fdf0ee; }
.qb-count { font-size: .9rem; color: var(--muted); }
@media (max-width: 900px) { .qb-bar { top: 64px; } }
.qb-grid { margin: -6px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qb-grid[hidden] { display: none; }
.qb-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-cell { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #cfd8de; background: #fff; font: 600 .85rem var(--sans); cursor: pointer; color: var(--ink); position: relative; display: inline-grid; place-items: center; }
.qb-legend .qb-cell { width: 14px; height: 14px; vertical-align: middle; margin: 0 2px 0 10px; cursor: default; }
.qb-cell.is-done { background: var(--brand-soft); border-color: #bfe6f6; }
.qb-cell.is-right { background: var(--ok-soft); border-color: #9fd3b6; color: var(--ok); }
.qb-cell.is-wrong { background: #fdf0ee; border-color: #e2a39b; color: #b32d2e; }
.qb-cell.is-on { outline: 2px solid var(--brand-dark); outline-offset: 1px; }
.qb-cell.is-flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: #e0a100; }
.qb-legend { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.qb-q { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 14px; box-shadow: var(--shadow); transition: opacity .3s; }
.qb-q.is-gone { opacity: 0; }
.qb-q-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.qb-q-stem { font-size: 1.05rem; line-height: 1.6; overflow-wrap: anywhere; }
.qb-q-stem p { margin: 0 0 .6em; }
.qb-q-stem table, .lms-q-expl table { border-collapse: collapse; margin: .5em 0; }
.qb-q-stem td, .qb-q-stem th, .lms-q-expl td, .lms-q-expl th { border: 1px solid var(--line); padding: 4px 8px; }
.qb-path { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.qb-img { margin: 10px 0 14px; }
.qb-img img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
button.qb-opt { width: 100%; text-align: left; font: inherit; color: var(--ink); }
button.qb-opt:disabled { cursor: default; opacity: 1; }
.lms-opt.is-chosen { border-color: var(--brand-dark); background: var(--brand-soft); }
.lms-opt.is-chosen .lms-opt-l { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.qb-verdict { margin: 12px 0 0; font-weight: 700; padding: .55rem .8rem; border-radius: 10px; }
.qb-verdict.is-right { background: var(--ok-soft); color: var(--ok); }
.qb-verdict.is-wrong { background: #fdf0ee; color: #b32d2e; }
.qb-verdict.is-skip { background: var(--surface); color: var(--muted); }
.qb-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff9e6; border: 1px solid #f3dca0; font-size: .95rem; white-space: pre-wrap; }
.qb-note strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #7a5300; margin-bottom: 2px; white-space: normal; }
.qb-q-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.qb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.qb-act { font: 600 .82rem var(--sans); padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--brand-dark); cursor: pointer; }
.qb-act:hover { border-color: var(--brand-dark); }
.qb-act.is-on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.qb-act.is-quiet { color: var(--muted); }
.qb-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 20px; }
.qb-nav .lms-btn[disabled] { opacity: .4; }
.qb-filter-now { color: var(--muted); font-size: .9rem; }

/* Result */
.qb-result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.qb-score { font: 600 1.2rem var(--serif); margin: 0 0 6px; }
.qb-score span { font-size: 3rem; color: var(--brand-dark); }
.qb-score small { font: 600 1rem var(--sans); color: var(--muted); margin-left: 6px; }
.qb-result-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); }
.qb-result-meta .is-right { color: var(--ok); font-weight: 600; }
.qb-result-meta .is-wrong { color: #b32d2e; font-weight: 600; }
.qb-review-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.qb-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.qb-table th, .qb-table td { text-align: left; padding: .55rem .5rem; border-top: 1px solid var(--line); vertical-align: top; }
.qb-table thead th { border-top: 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.qb-table .num { text-align: right; white-space: nowrap; }
.qb-table td small { display: block; color: var(--muted); font-size: .8rem; }
.qb-table td a { font-weight: 600; text-decoration: none; }
.qb-result-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* Lists, cards, stats, reading */
.qb-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.qb-filter .qb-input { width: auto; max-width: 100%; }
.qb-practise { margin: 0 0 12px; }
.qb-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); }
.qb-h2 { margin-top: 26px; }
.qb-due { font-size: .8rem; color: var(--muted); margin: 0 0 4px 4px; }
.qb-cardbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--brand-soft); margin-bottom: 16px; }
.qb-cardbar p { margin: 0; }
.qb-cardbar[hidden], .qb-review[hidden] { display: none; }
.qb-flash { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.qb-flash-n { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.qb-flash-grade { display: flex; flex-wrap: wrap; gap: 8px; }
.qb-flash-grade small { font-weight: 400; opacity: .8; }
.qb-flash-acts[hidden], .qb-flash-grade[hidden], .qb-flash-back[hidden] { display: none; }
.qb-card-done { text-align: center; padding: 30px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qb-stats { list-style: none; margin: 0; padding: 0 0 0 16px; }
.qb-stats.is-root { padding: 0; }
.qb-stats details > summary { list-style: none; cursor: pointer; }
.qb-stats details > summary::-webkit-details-marker { display: none; }
.qb-stat { display: grid; grid-template-columns: minmax(0, 1fr) 120px 74px 48px 28px; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }
.qb-stats details > summary .qb-stat-name::before { content: "▸ "; color: var(--muted); }
.qb-stats details[open] > summary .qb-stat-name::before { content: "▾ "; }
.qb-stat-name { font-weight: 600; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.qb-stat-bar { height: 8px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.qb-stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }
.qb-stat-n { font-size: .82rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.qb-stat-p { font-weight: 700; text-align: right; color: var(--muted); }
.qb-stat-p.is-good { color: var(--ok); }
.qb-stat-p.is-low { color: #b32d2e; }
.qb-stat-read { color: var(--muted); display: grid; place-items: center; }
.qb-stat-read .lms-ic { width: 16px; height: 16px; }
.qb-stats-head { display: grid; grid-template-columns: minmax(0, 1fr) 120px 74px 48px 28px; gap: 10px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 4px 4px; }
.qb-stats-head span:nth-child(2) { grid-column: 2 / 4; text-align: right; }
.qb-stats-head span:nth-child(3) { text-align: right; }
@media (max-width: 600px) {
	.qb-stat, .qb-stats-head { grid-template-columns: minmax(0, 1fr) 64px 44px 22px; }
	.qb-stat-bar { display: none; }
	.qb-stats-head span:nth-child(2) { grid-column: 2; }
}
.qb-trail { color: var(--muted); }
.qb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-chip { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: .88rem; }
.qb-chip small { color: var(--muted); font-weight: 400; }
.qb-reports { list-style: none; margin: 0; padding: 0; }
.qb-reports li { padding: 8px 0; border-top: 1px solid var(--line); }
.qb-rep.is-fixed { color: var(--ok); font-weight: 600; }
.qb-rep.is-open { color: #7a5300; }

/* Dialog */
.qb-modal { position: fixed; inset: 0; background: rgba(43, 39, 39, .4); z-index: 80; display: grid; place-items: center; padding: 16px; }
.qb-modal-in { width: min(520px, 100%); background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.qb-modal-in h3 { margin: 0 0 10px; }
.qb-modal-acts { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
@media print { .qb-bar, .qb-nav, .qb-acts { display: none; } }

/* 2.1 — Question numbers above (or below) the question; can be hidden */
.qb-nums { display: flex; align-items: center; gap: 6px; margin: -4px 0 14px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qb-nums[hidden] { display: none; }
.qb-nums.is-bottom { margin: 0 0 16px; }
.qb-nums-row { display: flex; gap: 6px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; flex: 1 1 auto; min-width: 0; padding: 3px 2px; -webkit-overflow-scrolling: touch; }
.qb-nums-row .qb-cell { flex: none; }
.qb-nums-step, .qb-nums-btn { flex: none; width: 34px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--brand-dark); font: 700 1.15rem/1 var(--sans); cursor: pointer; display: grid; place-items: center; padding: 0; }
.qb-nums-step:disabled { opacity: .35; cursor: default; }
.qb-nums-set { display: flex; gap: 4px; flex: none; padding-left: 6px; margin-left: 2px; border-left: 1px solid var(--line); }
.qb-nums-btn { width: 30px; height: 30px; font-size: .95rem; color: var(--muted); background: #fff; }
.qb-nums-btn:hover, .qb-nums-step:not(:disabled):hover { border-color: var(--brand-dark); color: var(--brand-dark); }
@media (max-width: 600px) { .qb-nums-step { display: none; } }

/* 2.1 — Several images with a question; PDFs with an explanation */
.qb-imgs { margin: 10px 0 14px; }
.qb-imgs .qb-img { margin: 0; }
.qb-imgs.is-many { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; }
.qb-imgs.is-many .qb-img img { width: 100%; max-height: 260px; object-fit: contain; background: var(--surface); }
.qb-img a { display: block; }
.qb-atts { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 6px; }
.qb-att { display: flex; align-items: center; gap: 8px; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.qb-att:hover { border-color: var(--brand-dark); background: var(--brand-soft); }
.qb-att small { margin-left: auto; color: var(--muted); font-weight: 400; white-space: nowrap; }

/* 2.1 — Flashcards: question on the front, answer on the back */
.qb-fcs { display: grid; gap: 14px; }
.qb-fc { margin: 0 0 14px; transition: opacity .3s; }
.qb-fcs .qb-fc { margin: 0; }
.qb-fc.is-gone { opacity: 0; }
.qb-fc-in { display: grid; perspective: 1400px; cursor: pointer; border-radius: var(--radius); outline: none; }
.qb-fc-in:focus-visible .qb-fc-face { box-shadow: 0 0 0 3px var(--brand); }
.qb-fc-face { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; min-height: 190px; padding: 22px 22px 34px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s cubic-bezier(.3, .7, .3, 1); position: relative; overflow-wrap: anywhere; }
.qb-fc-face.is-front { border-top: 4px solid var(--brand); }
.qb-fc-face.is-back { transform: rotateY(180deg); background: #fbfefc; border-top: 4px solid var(--ok); justify-content: flex-start; }
.qb-fc-in.is-flipped .is-front { transform: rotateY(-180deg); }
.qb-fc-in.is-flipped .is-back { transform: rotateY(0deg); }
.qb-fc-label { display: block; font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.qb-fc .qb-q-stem { font-size: 1.12rem; }
.qb-fc-hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: .78rem; color: var(--muted); }
.qb-fc-ans { margin: 0 0 10px; font-size: 1.15rem; font-weight: 600; color: var(--ok); }
.qb-fc-ans .qb-fc-label { margin-bottom: 6px; }
.qb-fc-ans-l { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .8rem; margin-right: 4px; vertical-align: 2px; }
.qb-fc-expl { font-size: .98rem; line-height: 1.6; padding-top: 10px; border-top: 1px solid var(--line); }
.qb-fc-expl p { margin: 0 0 .6em; }
.qb-fc .qb-q-foot { margin-top: 8px; border-top: 0; padding: 0 4px; }
.qb-fc.is-review .qb-fc-face { min-height: 260px; }
.qb-review .qb-flash-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.qb-review .qb-flash-acts[hidden] { display: none; }
.qb-review .qb-flash-grade { margin: 14px 0 20px; }
@media (prefers-reduced-motion: reduce) { .qb-fc-face { transition: none; } }

/* 2.1 — Search every MCQ of a course */
.qb-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.qb-search-box { position: relative; flex: 1 1 260px; min-width: 0; }
.qb-search-box .lms-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.qb-search-box .qb-input { padding-left: 36px; }
.qb-search select.qb-input { width: auto; max-width: 100%; flex: 0 1 auto; }
.qb-hero + .qb-search { margin-top: -4px; }
mark { background: #fff1a8; color: inherit; padding: 0 .1em; border-radius: 3px; }
@media print { .qb-nums { display: none; } }
.qb-fc-in:not(.is-flipped) .is-back, .qb-fc-in.is-flipped .is-front { pointer-events: none; }

/* 2.2 — Pages that open in place: a thin bar while loading */
.lms-loadbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 90; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); opacity: 0; transition: width .25s ease, opacity .3s ease; pointer-events: none; }
.lms-loadbar.is-on { width: 70%; opacity: 1; transition: width 6s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
.lms-net.is-sending { color: var(--brand-deep); background: var(--brand-soft); }
@media (prefers-reduced-motion: no-preference) {
	::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
}

/* 2.2 — Study plan */
.qb-plan .lms-box { background: #fff; margin-top: 16px; }
.qb-plan h2 { display: flex; align-items: center; gap: 10px; }
.qb-step { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-dark); color: #fff; font: 700 .85rem var(--sans); }
.qb-plan-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; margin: 0 0 10px; }
.qb-field-b { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.qb-field-b .qb-input { width: auto; min-width: 120px; color: var(--ink); font-weight: 400; }
.qb-chip { cursor: pointer; font: inherit; color: var(--brand-dark); }
button.qb-chip { font-size: .85rem; font-weight: 600; }
.qb-plan-calc { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-deep); font-size: .93rem; }
.qb-plan-calc:empty { display: none; }
.qb-subjects { display: grid; gap: 8px; }
.qb-subj { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.qb-subj:first-child { border-top: 0; }
.qb-subj-name { display: flex; flex-direction: column; min-width: 0; }
.qb-subj-name small { color: var(--muted); }
.qb-subj-name em { font-style: normal; font-weight: 600; }
.qb-subj-name em.is-weak { color: #b32d2e; }
.qb-subj-name em.is-strong { color: var(--ok); }
.qb-seg { display: inline-flex; border: 1px solid #cfd8de; border-radius: 999px; overflow: hidden; background: #fff; flex: none; }
.qb-seg label { position: relative; cursor: pointer; }
.qb-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qb-seg span { display: block; padding: .38rem .85rem; font-size: .86rem; font-weight: 600; color: var(--muted); border-left: 1px solid #e4eaee; }
.qb-seg label:first-child span { border-left: 0; }
.qb-seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }
.qb-seg .is-weak input:checked + span { background: #fdf0ee; color: #b32d2e; }
.qb-seg .is-normal input:checked + span { background: var(--brand-soft); color: var(--brand-deep); }
.qb-seg .is-strong input:checked + span { background: var(--ok-soft); color: var(--ok); }
.qb-plan-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 28px; }
.qb-plan-nudge { justify-content: space-between; flex-wrap: wrap; }

/* 2.2 — Today's plan on the dashboard */
.qb-today { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; box-shadow: var(--shadow); }
.qb-today-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; }
.qb-today h2 { margin: 2px 0 4px; font-size: 1.35rem; }
.qb-today-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--muted); font-size: .9rem; }
.qb-today-bar { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.qb-today-bar .lms-bar { flex: 1 1 auto; }
.qb-today-bar small { color: var(--muted); white-space: nowrap; }
.qb-mixes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.qb-mixes > small { color: var(--muted); margin-right: 2px; }
.qb-mix { font-size: .84rem; padding: .22rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.qb-mix b { margin-left: 2px; }
.qb-mix.is-weak { background: #fdf0ee; border-color: #f0c7c1; color: #8f2a20; }
.qb-mix.is-strong { background: var(--ok-soft); border-color: #bfe2cd; color: var(--ok); }
.qb-mix.is-mist { background: #fff9e6; border-color: #f3dca0; color: #7a5300; }
.qb-today-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.qb-today-acts small[hidden] { display: none; }
.qb-week { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin: 16px 0 0; padding-top: 4px; }
.qb-day { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.qb-day-bar { flex: 1 1 auto; width: 100%; max-width: 34px; display: flex; align-items: flex-end; background: var(--surface); border-radius: 6px; overflow: hidden; }
.qb-day-bar span { display: block; width: 100%; background: var(--brand); border-radius: 6px 6px 0 0; }
.qb-day.is-met .qb-day-bar span { background: var(--ok); }
.qb-day small { font-size: .72rem; color: var(--muted); }
.qb-day.is-today small { color: var(--ink); font-weight: 700; }
.qb-week-note { margin: 4px 0 0; color: var(--muted); }
.qb-tips { margin: 12px 0 0; padding: 10px 12px 10px 28px; border-radius: 10px; background: var(--surface); font-size: .92rem; }
.qb-tips li + li { margin-top: 4px; }
@media (max-width: 600px) { .qb-today { padding: 16px; } .qb-seg span { padding: .38rem .6rem; } }
.qb-reports li.is-new { background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; border-top-color: transparent; }
.qb-new { display: inline-block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--brand-dark); color: #fff; padding: .05rem .4rem; border-radius: 999px; vertical-align: 1px; }

/* 2.3 — MCQs saved on this phone */
.qb-pack { margin: 0 0 16px; }
.qb-pack:empty { display: none; }
.qb-pack-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed #bfe6f6; background: #fff; font-size: .92rem; }
.qb-pack-in.is-saved { border-style: solid; border-color: #bfe2cd; background: var(--ok-soft); color: #145c38; }
.qb-pack.is-dash { margin-top: 18px; }
.qb-local { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qb-local[hidden] { display: none; }
.qb-local h2 { font-size: 1rem; margin: 0 0 6px; }
.qb-local ul { list-style: none; margin: 0; padding: 0; }
.qb-local li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.qb-local li:first-child { border-top: 0; }
.qb-local li small { display: block; color: var(--muted); }
.qb-pp { display: inline-block; margin-left: 8px; padding: 0 .45rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.qb-path .qb-pp:first-child { margin-left: 0; }

/* 2.3 — Chapters in the study plan */
.qb-subj { align-items: flex-start; }
.qb-chs { flex: 1 0 100%; margin: 2px 0 0; }
.qb-chs summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; font-size: .88rem; }
.qb-chs summary small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.qb-chs-all { margin: 6px 0; }
.qb-chs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 4px 14px; padding: 8px 10px; background: var(--surface); border-radius: 10px; }
.qb-chs-list label { display: flex; gap: 6px; align-items: baseline; font-size: .9rem; }
.qb-chs-list small { color: var(--muted); margin-left: auto; }
.qb-seg .is-skip input:checked + span { background: #eef1f3; color: var(--ink); }
.qb-subj.is-out .qb-subj-name, .qb-subj.is-out .qb-chs { opacity: .45; }
.qb-plan-pp { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); }
.qb-plan-pp small { display: block; margin-left: 24px; }

/* 2.3 — Day-wise plan */
.qb-today-links { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-mix.is-rev { background: #fff9e6; border-color: #f3dca0; color: #7a5300; }
.qb-mix.is-paper { background: var(--brand-soft); border-color: #bfe6f6; color: var(--brand-deep); }
.qb-sched { margin: 8px 0 30px; }
.qb-sched-week { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-family: var(--sans); margin: 20px 0 8px; }
.qb-sched-day { display: flex; gap: 14px; padding: 12px 14px; margin: 0 0 8px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 12px; }
.qb-sched-day.is-revise { border-left-color: #e0a100; background: #fffdf6; }
.qb-sched-day.is-today { box-shadow: 0 0 0 2px var(--brand) inset, var(--shadow); }
.qb-sched-day.is-exam { border-left-color: var(--brand-deep); background: var(--brand-deep); color: #fff; justify-content: center; }
.qb-sched-day.is-exam p { margin: 0; }
.qb-sched-date { flex: none; width: 78px; display: flex; flex-direction: column; }
.qb-sched-date small { color: var(--muted); }
.qb-sched-body { min-width: 0; flex: 1 1 auto; }
.qb-sched-label { margin: 0 0 4px; font-weight: 600; font-size: .92rem; }
.qb-sched-body .qb-mixes { margin: 0; }

/* 2.3 — My reports, reset */
.qb-report { margin: 0 0 22px; }
.qb-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 6px; }
.qb-report-head small { color: var(--muted); }
.qb-report .qb-rep { font-weight: 700; }
.qb-rep.is-dismissed { color: var(--muted); }
.qb-report-me, .qb-report-up { margin: 0 0 6px; padding: 8px 12px; border-radius: 10px; font-size: .94rem; }
.qb-report-me { background: var(--surface); }
.qb-report-up { background: var(--ok-soft); color: #145c38; }
.qb-report.is-new .qb-report-up { box-shadow: 0 0 0 2px var(--ok) inset; }
.qb-reset { background: #fff; max-width: 720px; }
.qb-more p { display: flex; flex-wrap: wrap; gap: 8px; }
.qb-pack-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.qb-pack-form { padding: 14px 16px; border: 1px solid #bfe6f6; border-radius: 12px; background: #fff; }
.qb-pack-form h3 { margin: 0 0 4px; font-size: 1.05rem; }
.qb-pack-opt { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 8px 10px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.qb-pack-opt:has(input:checked) { border-color: var(--brand-dark); background: var(--brand-soft); }
.qb-pack-opt small { color: var(--muted); }
.qb-pack-choose[hidden] { display: none; }
.qb-pack-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 2px 14px; max-height: 260px; overflow: auto; padding: 8px 10px; background: var(--surface); border-radius: 10px; margin: 6px 0 10px; }
.qb-pack-cats label { display: flex; gap: 6px; align-items: baseline; font-size: .9rem; }
.qb-pack-cats label:not(.is-sub) { font-weight: 600; grid-column: 1 / -1; margin-top: 4px; }
.qb-pack-cats small { color: var(--muted); margin-left: auto; font-weight: 400; }

/* 2.4 — Glossary words, Basics first, chapter notes */
.qb-term { color: inherit; border-bottom: 1.5px dotted var(--brand-dark); cursor: help; border-radius: 2px; text-decoration: none; }
.qb-term:hover, .qb-term:focus-visible { background: var(--brand-soft); outline: none; }
.is-terms-off .qb-term { border-bottom: 0; cursor: inherit; pointer-events: none; background: none; }
.qb-sheet { position: fixed; inset: 0; z-index: 85; background: rgba(43, 39, 39, .35); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.qb-sheet-in { position: relative; width: min(560px, 100%); max-height: 78vh; overflow: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 18px 20px 22px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); animation: qb-up .18s ease-out; }
@media (min-width: 700px) { .qb-sheet { align-items: center; padding: 16px; } .qb-sheet-in { border-radius: 16px; } }
@keyframes qb-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qb-sheet-in { animation: none; } }
.qb-sheet h3 { margin: 0 0 8px; font-size: 1.3rem; }
.qb-sheet-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); }
.qb-sheet-body { line-height: 1.6; }
.qb-sheet-body img { max-width: 100%; height: auto; border-radius: 10px; }
.qb-sheet-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.qb-basics { margin: 12px 0 0; border: 1px solid #bfe6f6; border-radius: 12px; background: #f6fcff; }
.qb-basics > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; list-style: none; }
.qb-basics > summary::-webkit-details-marker { display: none; }
.qb-basics > summary::after { content: "▾"; float: right; color: var(--muted); }
.qb-basics[open] > summary::after { content: "▴"; }
.qb-basics-tag { display: inline-block; font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: #fff; background: var(--brand-dark); padding: .1rem .45rem; border-radius: 999px; margin-right: 4px; vertical-align: 1px; }
.qb-basics-body { padding: 0 14px 12px; line-height: 1.6; }
.qb-basics-body img, .qb-chapter-body img { max-width: 100%; height: auto; border-radius: 10px; }
.qb-chapter { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); max-width: 820px; }
.qb-chapter-body { font-size: 1.04rem; line-height: 1.7; }
.qb-chapter-body h2, .qb-chapter-body h3 { margin-top: 1.2em; }
.qb-chapter-body table { border-collapse: collapse; margin: .6em 0; width: 100%; }
.qb-chapter-body td, .qb-chapter-body th { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.qb-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qb-notes a { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; }
.qb-notes a:hover { border-color: var(--brand-dark); }
.qb-notes small { display: block; color: var(--muted); }
.qb-readnote { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep); margin: 0 0 12px; }
.qb-mix.is-note { background: #fff; border-color: var(--brand-dark); color: var(--brand-dark); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.qb-mix.is-note .lms-ic { width: 14px; height: 14px; }
.qb-gloss { padding: 12px 16px; margin: 0 0 14px; border: 1px solid #bfe6f6; border-left: 4px solid var(--brand); border-radius: 12px; background: #fff; }
.qb-gloss h3 { margin: 0 0 4px; }
.qb-report-term { margin: 0 0 6px; }
.lms-nav-group { display: block; margin: 12px 12px 2px; font: 700 .68rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.side-mini .lms-nav-group { display: none; }

/* ---------------- Calculators and algorithms (2.5) ---------------- */
.qb-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 12px 0 0; }
.qb-try-l { font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qb-try-b { display: inline-flex; align-items: center; gap: 6px; font: 600 .88rem var(--sans); color: var(--brand-dark); background: var(--brand-soft); border: 1px solid #bfe6f6; border-radius: 999px; padding: .3rem .75rem; cursor: pointer; }
.qb-try-b:hover, .qb-try-b:focus-visible { background: #d6f0fb; border-color: var(--brand); }
.qb-try-b small { font-weight: 400; color: var(--muted); }
.qb-try-b .lms-ic { width: 16px; height: 16px; }
.qb-chapter .qb-try { margin: 18px 0 6px; padding: 12px 14px; border: 1px dashed #bfe6f6; border-radius: 12px; }
.qb-sheet.is-tool .qb-sheet-in { width: min(640px, 100%); max-height: 88vh; }
.qb-tool-h { padding-right: 40px; margin-bottom: 12px; }
.qb-tool-h h2 { margin: 0 0 4px; font-size: 1.35rem; }
.qb-tool-h p { margin: 0; }
.qb-tool-in { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; margin: 0 0 14px; }
.qb-tf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qb-tf-l { font-weight: 600; font-size: .88rem; line-height: 1.3; }
.qb-tf-l small, .qb-tf-h { color: var(--muted); font-weight: 400; font-size: .78rem; }
.qb-tc { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; line-height: 1.4; }
.qb-tc input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand-dark); }
.qb-tc:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.qb-tc small { color: var(--muted); }
.qb-tc .qb-tf-h { display: block; }
.qb-tool-out { display: grid; gap: 8px; }
.qb-to { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--line); }
.qb-to-l { font-weight: 600; font-size: .9rem; }
.qb-to-l small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.qb-to-v { font: 700 1.25rem var(--sans); text-align: right; white-space: nowrap; color: var(--ink); }
.qb-to-v small { font-size: .78rem; font-weight: 400; color: var(--muted); }
.qb-to-v.is-na, .qb-to-t.is-na { color: var(--muted); font-weight: 400; }
.qb-to-t { grid-column: 1 / -1; font-size: .92rem; line-height: 1.45; }
.qb-to.is-text .qb-to-t { font-weight: 600; }
.qb-to.is-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.qb-to.is-warn { border-left-color: #e0a100; background: var(--warn-soft); }
.qb-to.is-bad { border-left-color: #c0392b; background: #fdecea; }
.qb-to.is-info { border-left-color: var(--brand); background: var(--brand-soft); }
.qb-to-empty { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.qb-tool-acts { margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.qb-tool-notes { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qb-tool-notes > summary { cursor: pointer; padding: 9px 14px; font-weight: 600; }
.qb-tool-notes > div { padding: 0 14px 10px; line-height: 1.6; font-size: .94rem; }
.qb-algo-path { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.qb-algo-step { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font: .88rem/1.4 var(--sans); color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; }
.qb-algo-step b { color: var(--brand-dark); white-space: nowrap; }
.qb-algo-step:hover { border-color: var(--brand); }
.qb-algo-q, .qb-algo-res { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.qb-algo-q h3, .qb-algo-res h3 { margin: 0 0 8px; font-size: 1.15rem; }
.qb-algo-n { margin: 0 0 4px; font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.qb-algo-hint { font-size: .9rem; margin: 0 0 10px; }
.qb-algo-opts { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
.qb-algo-opts .lms-btn { justify-content: flex-start; text-align: left; white-space: normal; }
.qb-algo-res { border-left: 5px solid var(--brand); }
.qb-algo-res.is-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.qb-algo-res.is-warn { border-left-color: #e0a100; background: var(--warn-soft); }
.qb-algo-res.is-bad { border-left-color: #c0392b; background: #fdecea; }
.qb-algo-res > div { line-height: 1.6; }
.qb-algo-res .lms-eyebrow { margin: 0 0 2px; }
.qb-toollist strong .lms-ic { vertical-align: -3px; color: var(--brand-dark); }
.qb-tool-stage { max-width: 720px; }
.qb-tool-back { margin: 0 0 12px; }
.qb-tools-disc { margin-top: 24px; }
@media (max-width: 480px) { .qb-tool-in { grid-template-columns: 1fr 1fr; } .qb-to-v { font-size: 1.1rem; } }
.qb-algo-opts .lms-btn { border-radius: 12px; }
.qb-tool-acts .lms-btn:disabled { opacity: .45; cursor: default; }

/* ------------------------------------------------------------------ */
/* My Paper (2.6)                                                      */
/* ------------------------------------------------------------------ */
.is-paper .lms-wrap { max-width: 1360px; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; padding: .14rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: #eef1f3; color: var(--muted); }
.pp-chip.is-info { background: var(--brand-soft); color: var(--brand-deep); }
.pp-chip.is-review { background: var(--warn-soft); color: #7a5300; }
.pp-chip.is-draft { background: var(--brand-soft); color: var(--brand-deep); }
.pp-chip.is-done, .pp-chip.is-approved { background: var(--ok-soft); color: var(--ok); }
.pp-chip.is-submitted { background: var(--warn-soft); color: #7a5300; }
.pp-chip.is-returned { background: #fde8e8; color: #a61b1b; }
.pp-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px; }
.pp-card + .pp-card { margin-top: 16px; }
.pp-card h3 { font-family: var(--sans); font-size: .98rem; display: flex; align-items: center; gap: 8px; margin: 0 0 .5rem; }
.pp-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pp-left { position: sticky; top: 16px; }
.pp-left-h { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.pp-left small { display: block; }
.pp-left small.pp-step-cp { display: inline-block; margin-left: 2px; }
.pp-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.pp-steps-g { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 12px 0 4px 6px; }
.pp-step { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; line-height: 1.3; }
a.pp-step:hover { background: var(--surface); }
.pp-step.is-on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.pp-step-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; border: 2px solid var(--line); background: #fff; color: var(--muted); }
.pp-step-n .lms-ic { width: 13px; height: 13px; }
.pp-step.is-done .pp-step-n, .pp-step.is-approved .pp-step-n { background: var(--ok); border-color: var(--ok); color: #fff; }
.pp-step.is-submitted .pp-step-n { border-color: #e7b54a; color: #7a5300; }
.pp-step.is-returned .pp-step-n { border-color: #d64545; color: #a61b1b; }
.pp-step.is-on .pp-step-n { border-color: var(--brand-dark); background: var(--brand-dark); color: #fff; }
.pp-step.is-locked { color: #a9a3a3; }
.pp-step-t { flex: 1; min-width: 0; }
.pp-step-cp { display: inline-block; vertical-align: 1px; font-size: .64rem; font-weight: 700; color: #7a5300; background: var(--warn-soft); border-radius: 999px; padding: 1px 6px; }
.pp-main { padding: 24px 28px; }
.pp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.pp-saved { margin-left: auto; font-size: .82rem; color: var(--muted); }
.pp-saved.is-ok { color: var(--ok); }
.pp-saved.is-off { color: #7a5300; }
.pp-main h1 { font-size: clamp(1.45rem, 1.2rem + .8vw, 1.8rem); margin-bottom: .3rem; }
.pp-intro { margin-top: 0; }
.pp-fld { margin-top: 18px; }
.pp-fld > label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 3px; }
.pp-hint { margin: 0 0 6px; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.pp-fld input[type="text"], .pp-fld textarea, .pp-ask textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; font: 1rem/1.55 var(--sans); color: var(--ink); background: #fff; }
.pp-fld textarea { resize: vertical; min-height: 64px; }
.pp-fld textarea.pp-tsv { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88rem; white-space: pre; overflow-x: auto; }
.pp-fld input:focus, .pp-fld textarea:focus, .pp-ask textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 174, 239, .15); }
.pp-fld [readonly] { background: var(--surface); color: #4a4545; }
.pp-count { font-size: .78rem; color: var(--muted); text-align: right; min-height: 1.1em; }
.pp-count.is-low, .pp-count.is-high { color: #a65e00; }
.pp-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-choice label { cursor: pointer; }
.pp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pp-choice span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .38rem .85rem; font-size: .9rem; background: #fff; }
.pp-choice input:checked + span { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.pp-choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 174, 239, .3); }
.pp-choice input:disabled + span { opacity: .75; cursor: default; }
.pp-tprev { margin-top: 8px; overflow-x: auto; }
.pp-table { border-collapse: collapse; width: 100%; font-size: .88rem; margin: 4px 0 10px; }
.pp-table th, .pp-table td { border: 1px solid #cfd8de; padding: 4px 8px; text-align: left; vertical-align: top; }
.pp-table th { background: var(--surface); }
.pp-files .pp-file-list { list-style: none; margin: 0 0 8px; padding: 0; }
.pp-file-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pp-file-list .lms-file-ic { width: 38px; height: 38px; }
.pp-file-list a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pp-file-list small { color: var(--muted); white-space: nowrap; }
.pp-x { border: 0; background: none; color: #b32d2e; cursor: pointer; font: inherit; font-size: .85rem; }
.pp-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 2px dashed #cbd5dc; border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.pp-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.pp-drop input { max-width: 100%; }
.pp-drop span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-dark); }
.pp-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.pp-sp { flex: 1; }
.pp-nav { display: flex; gap: 8px; }
.pp-fb { align-items: flex-start; }
.pp-fb-t { margin: 6px 0; padding: 8px 10px; background: #fff; border-radius: 8px; color: var(--ink); }
.pp-fb small, .pp-miss ul { display: block; font-weight: 400; }
.pp-miss ul { margin: 6px 0 0; padding-left: 18px; }
.pp-thread { margin-top: 16px; }
.pp-ask { display: flex; gap: 10px; align-items: flex-end; margin-top: 10px; }
.pp-ask textarea { flex: 1; min-height: 44px; }
.pp-right { position: sticky; top: 16px; }
.pp-links { margin: 0; padding-left: 18px; font-size: .92rem; }
.pp-ck { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; margin-top: 8px; cursor: pointer; line-height: 1.4; }
.pp-ck input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--ok); flex: none; }
.pp-checks .lms-muted, .pp-example .lms-muted { font-size: .85rem; margin: 0 0 4px; }
.pp-example .pp-ex-body { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; font: .9rem/1.55 "Times New Roman", Times, serif; }
.pp-example .pp-ex-body p { margin: 0 0 .5rem; }
.pp-example.is-hidden { background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #fbfcfd 10px, #fbfcfd 20px); }
.pp-cta { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pp-cta:hover { border-color: var(--brand); }
.pp-cta-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.pp-cta-ic .lms-ic { width: 24px; height: 24px; }
.pp-cta-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pp-cta-b b { font-family: var(--serif); font-size: 1.15rem; }
.pp-cta-b > span { color: var(--muted); font-size: .92rem; }
.pp-cta-b small { color: var(--muted); }
.pp-cta .lms-bar { max-width: 420px; }
.pp-cps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 24px; }
.pp-cp { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pp-cp small { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pp-cp b { font-family: var(--serif); font-size: 1.05rem; }
.pp-cp span { font-size: .85rem; color: var(--muted); }
.pp-cp.is-approved { border-color: #b7dfc8; background: var(--ok-soft); }
.pp-cp.is-approved span { color: var(--ok); font-weight: 700; }
.pp-cp.is-submitted { border-color: #f0d28f; background: var(--warn-soft); }
.pp-cp.is-submitted span { color: #7a5300; font-weight: 700; }
.pp-cp.is-returned { border-color: #f3c2c2; background: #fdf1f1; }
.pp-cp.is-returned span { color: #a61b1b; font-weight: 700; }
.pp-list .lms-item a, .pp-list .lms-row { align-items: center; }
.pp-list .lms-row { display: flex; gap: 12px; padding: .85rem .6rem; color: #a9a3a3; }
.pp-list .lms-item-main { flex: 1; }
.pp-list-g { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 18px 0 2px; }
.pp-hero .lms-head-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pp-prevbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.pp-prevbar h1 { margin: 0; }
.pp-doc { background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 18px rgba(0, 0, 0, .08); max-width: 820px; margin: 16px auto 0; padding: 56px 64px; font: 12pt/1.5 "Times New Roman", Times, serif; color: #111; }
.pp-doc h1, .pp-doc h2 { font-family: "Times New Roman", Times, serif; color: #111; }
.pp-doc .pp-doc-title { font-size: 15pt; text-align: center; }
.pp-doc h2 { font-size: 12pt; text-transform: uppercase; margin: 16px 0 4px; }
.pp-doc p { text-align: justify; margin: 0 0 8px; }
.pp-doc-authors { text-align: center; margin-bottom: 12px; }
.pp-doc-abstract { border-top: 1px solid #111; border-bottom: 1px solid #111; padding: 6px 0; margin-bottom: 10px; }
.pp-doc-abstract h2 { margin-top: 0; }
.pp-doc-cap { font-weight: 700; margin-top: 10px !important; }
.pp-doc .pp-table th, .pp-doc .pp-table td { border-color: #111; }
.pp-doc-refs { padding-left: 20px; }
.pp-doc-gap { color: #a65e00; font-style: italic; }
.pp-lessonbox p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 1180px) {
	.pp-grid { grid-template-columns: 230px minmax(0, 1fr); }
	.pp-right { grid-column: 2; position: static; }
}
@media (max-width: 900px) {
	.pp-grid { grid-template-columns: 1fr; }
	.pp-left, .pp-right { position: static; grid-column: auto; }
	.pp-left .pp-steps { display: none; }
	.pp-main { padding: 18px 16px; }
	.pp-doc { padding: 28px 20px; }
	.pp-ask { flex-direction: column; align-items: stretch; }
}
@media print {
	.is-paper .lms-side, .is-paper .lms-topbar, .pp-prevbar, .pp-prevbar + .lms-muted, .is-paper .lms-crumbs { display: none !important; }
	.pp-doc { border: 0; box-shadow: none; padding: 0; }
}

/* My Paper: collapsible steps (2.6.1) */
.pp-left-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pp-mini-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); cursor: pointer; font: 600 .82rem/1 var(--sans); }
.pp-mini-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.pp-mini-btn span { display: none; }
.pp-mini-btn .lms-ic { transition: transform .18s ease; }
.pp-grid { transition: grid-template-columns .18s ease; }
.pp-grid.is-mini { grid-template-columns: 68px minmax(0, 1fr) 300px; }
.is-mini .pp-left .pp-card { padding: 12px 8px; }
.is-mini .pp-left-top { justify-content: center; }
.is-mini .pp-left-h, .is-mini .pp-left .lms-bar, .is-mini .pp-left small, .is-mini .pp-steps-g, .is-mini .pp-step-t, .is-mini .pp-step .lms-nav-dot { display: none; }
.is-mini .pp-mini-btn .lms-ic { transform: rotate(180deg); }
.is-mini .pp-steps { align-items: center; gap: 6px; }
.is-mini .pp-step { justify-content: center; padding: 5px; }
@media (max-width: 1180px) {
	.pp-grid.is-mini { grid-template-columns: 68px minmax(0, 1fr); }
}
@media (max-width: 900px) {
	.pp-grid.is-mini { grid-template-columns: 1fr; }
	.pp-mini-btn span { display: inline; }
	.pp-mini-btn .lms-ic { transform: rotate(-90deg); }
	.pp-left.is-open .pp-steps { display: flex; }
	.pp-left.is-open .pp-mini-btn .lms-ic { transform: rotate(90deg); }
}

/* Course page: search box and filters (2.8.0) */
.lms-find { display: grid; gap: 10px; margin: 0 0 14px; }
.lms-find-q { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.lms-find-q:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.lms-find-q .lms-ic { width: 18px; height: 18px; color: var(--muted, #6b7c88); flex: none; }
.lms-find-q input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .7rem 0; font: inherit; background: transparent; }
.lms-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lms-chip { text-transform: none; letter-spacing: normal; font-weight: 500; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .38rem .9rem; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.lms-chip b { font-weight: 600; color: var(--muted, #6b7c88); margin-left: 2px; }
.lms-chip:hover { border-color: var(--brand); }
.lms-chip.is-on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.lms-chip.is-on b { color: #fff; }
.lms-find-none { margin: 4px 0 0; }
.lms-item[hidden], .lms-nav-lessons li[hidden] { display: none; }
.lms-nav-find { display: flex; align-items: center; gap: 6px; margin: 6px 4px 2px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.lms-nav-find .lms-ic { width: 15px; height: 15px; flex: none; color: var(--muted, #6b7c88); }
.lms-nav-find input { flex: 1; min-width: 0; border: 0; outline: 0; padding: .45rem 0; font: inherit; font-size: .86rem; background: transparent; }
html.side-mini .lms-nav-find { display: none; }

/* Drug library (2.9.0) */
.lms-content a.lms-drug, .lms-drugpage a.lms-drug { color: inherit; text-decoration: underline dotted var(--brand-dark); text-underline-offset: 3px; text-decoration-thickness: 1.5px; cursor: pointer; }
.lms-content a.lms-drug:hover { color: var(--brand-dark); }
[data-lms-row][hidden] { display: none; }
.lms-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lms-drugtable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lms-drugtable th { text-align: left; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); border-bottom: 2px solid var(--line); padding: .55rem .6rem; }
.lms-drugtable td { border-bottom: 1px solid var(--line); padding: .7rem .6rem; vertical-align: top; }
.lms-drugtable .lms-drug-name { font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.lms-drugtable td small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.lms-drugtable.is-plain { margin: .4rem 0 1rem; }
.lms-drugtable.is-plain th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.lms-drugpage h2 { margin-top: 1.6rem; }
.lms-urdu { font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', serif; font-size: 1.15em; line-height: 2.3; }
.lms-drug-src { font-size: .82rem; color: var(--muted); }
.lms-drugpop { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 30, 45, .45); display: flex; align-items: flex-end; justify-content: center; }
.lms-drugpop-card { position: relative; background: #fff; width: min(560px, 100%); max-height: 82vh; overflow-y: auto; border-radius: 16px 16px 0 0; padding: 22px 22px 18px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); }
.lms-drugpop-card h2 { margin: 0 0 2px; }
.lms-drugpop-card h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.lms-drugpop-card ul { margin: 0; padding-left: 1.1rem; }
.lms-drugpop-card p { margin: .2rem 0; }
.lms-drugpop-x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--muted); }
.lms-drugpop-acts { margin-top: 1rem !important; }
@media (min-width: 700px) { .lms-drugpop { align-items: center; } .lms-drugpop-card { border-radius: 16px; } }

/* Phones: drug library as expandable cards; tables with .lms-stack become cards (2.10.0) */
.lms-druglist { display: none; list-style: none; margin: 0; padding: 0; }
.lms-druglist li { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; background: #fff; }
.lms-druglist summary { list-style: none; cursor: pointer; padding: .8rem 2.4rem .8rem 1rem; position: relative; }
.lms-druglist summary::-webkit-details-marker { display: none; }
.lms-druglist summary::after { content: ''; position: absolute; right: 1rem; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--brand-dark); border-bottom: 2px solid var(--brand-dark); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.lms-druglist details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.lms-druglist summary b { display: block; color: var(--brand-dark); font-size: 1.02rem; }
.lms-druglist summary small { display: block; color: var(--muted); font-size: .85rem; }
.lms-druglist-body { padding: 0 1rem .9rem; border-top: 1px solid var(--line); }
.lms-druglist-body p { margin: .6rem 0 0; font-size: .95rem; }
.lms-druglist li[hidden] { display: none; }
.lms-content table.lms-stack { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .4rem 0 1.2rem; }
.lms-content table.lms-stack th, .lms-content table.lms-stack td { border: 1px solid var(--line); padding: .5rem .6rem; vertical-align: top; text-align: left; }
.lms-content table.lms-stack th { background: var(--brand-soft); font-size: .85rem; }
@media (max-width: 760px) {
	.lms-drug-wide { display: none; }
	.lms-druglist { display: block; }
	.lms-druglib .lms-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.lms-druglib .lms-chip { white-space: nowrap; }
	table.lms-stack, table.lms-stack tbody, table.lms-stack tr, table.lms-stack td { display: block; width: 100%; }
	table.lms-stack thead { display: none; }
	table.lms-stack tr { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 12px; padding: 4px 0; background: #fff; }
	.lms-content table.lms-stack td, table.lms-stack td { border: 0; border-bottom: 1px solid var(--line); padding: .45rem .8rem; }
	table.lms-stack td:last-child { border-bottom: 0; }
	table.lms-stack td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 2px; }
	table.lms-stack td:first-child { background: var(--brand-soft); border-radius: 12px 12px 0 0; }
	table.lms-stack td:first-child::before { display: none; }
	.lms-drugpage .lms-table-wrap { overflow: visible; }
}

/* Lab values (2.11.0) */
.lms-content a.lms-lab { color: inherit; text-decoration: underline dotted #6b7c88; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.lms-content a.lms-lab:hover { color: var(--brand-dark); }
.lms-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lms-pop > span { font-size: .85rem; color: var(--muted); margin-right: 2px; }
.lms-labs .lms-chips { border-top: 1px dashed var(--line); padding-top: 10px; }
.lms-lab-panel h2 { margin: 1.4rem 0 .5rem; }
.lms-lab-panel[hidden] { display: none; }
.lms-labtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.lms-labtable th, .lms-labtable td { border: 1px solid var(--line); padding: .55rem .6rem; vertical-align: top; text-align: left; }
.lms-labtable th { background: var(--brand-soft); font-size: .84rem; }
.lms-labtable td[data-col="test"] { width: 19%; }
.lms-labtable td small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.lms-labtable tr.is-target td { background: #fff8e1; }
.lms-lab-more { margin-top: .4rem; font-size: .85rem; }
.lms-lab-more summary { cursor: pointer; color: var(--brand-dark); }
.lms-lab-more p { margin: .35rem 0 0; }
.lms-labs[data-pop]:not([data-pop="all"]) .lms-labtable td[data-col="test"] { width: 35%; }
.lms-labs[data-pop="men"] [data-col]:not([data-col="test"]):not([data-col="men"]) { display: none; }
.lms-labs[data-pop="women"] [data-col]:not([data-col="test"]):not([data-col="women"]) { display: none; }
.lms-labs[data-pop="preg"] [data-col]:not([data-col="test"]):not([data-col="preg"]) { display: none; }
.lms-labs[data-pop="child"] [data-col]:not([data-col="test"]):not([data-col="child"]) { display: none; }
.lms-labs[data-pop="old"] [data-col]:not([data-col="test"]):not([data-col="old"]) { display: none; }

.lms-lab-mini { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .92rem; }
.lms-lab-mini th, .lms-lab-mini td { border-bottom: 1px solid var(--line); padding: .4rem .3rem; text-align: left; vertical-align: top; }
.lms-lab-mini th { width: 34%; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
	.lms-pop { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
	.lms-pop .lms-chip, .lms-labs .lms-chip { white-space: nowrap; }
	.lms-labs .lms-chips { flex-wrap: nowrap; overflow-x: auto; }
	.lms-labtable td[data-col="test"], .lms-labs[data-pop]:not([data-pop="all"]) .lms-labtable td[data-col="test"] { width: 100%; }
}
